1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980 |
- #include "copyright.h"
- #include "XMenuInt.h"
- int
- XMenuLocate(register Display *display, register XMenu *menu, int p_num, int s_num, int x_pos, int y_pos, int *ul_x, int *ul_y, int *width, int *height)
-
-
-
-
-
-
-
-
-
-
- {
- register XMPane *p_ptr;
- register XMSelect *s_ptr;
-
- if ((x_pos <= 0) || (y_pos <= 0)) {
- _XMErrorCode = XME_ARG_BOUNDS;
- return(XM_FAILURE);
- }
-
- p_ptr = _XMGetPanePtr(menu, p_num);
- if (p_ptr == NULL) return(XM_FAILURE);
-
- s_ptr = _XMGetSelectionPtr(p_ptr, s_num);
-
- if (menu->recompute) XMenuRecompute(display, menu);
-
- _XMTransToOrigin(display, menu, p_ptr, s_ptr, x_pos, y_pos, ul_x, ul_y);
-
- *width = menu->width;
- *height = menu->height;
-
- _XMErrorCode = XME_NO_ERROR;
- return(XM_SUCCESS);
- }
|