Lines Matching refs:smw

195 #define ForAllChildren(smw, childP) \
196 for ( (childP) = (SmeObject *) (smw)->composite.children ; \
197 (childP) < (SmeObject *) ( (smw)->composite.children + \
198 (smw)->composite.num_children ) ; \
259 SimpleMenuWidget smw = (SimpleMenuWidget) new;
263 if (smw->simple_menu.label_class == NULL)
264 smw->simple_menu.label_class = smeBSBObjectClass;
266 smw->simple_menu.label = NULL;
267 smw->simple_menu.entry_set = NULL;
268 smw->simple_menu.recursive_set_values = FALSE;
270 if (smw->simple_menu.label_string != NULL)
273 smw->simple_menu.menu_width = TRUE;
275 if (smw->core.width == 0) {
276 smw->simple_menu.menu_width = FALSE;
277 smw->core.width = GetMenuWidth(new, (Widget)NULL);
280 smw->simple_menu.menu_height = TRUE;
282 if (smw->core.height == 0) {
283 smw->simple_menu.menu_height = FALSE;
284 smw->core.height = GetMenuHeight(new);
309 SimpleMenuWidget smw = (SimpleMenuWidget) w;
320 ForAllChildren(smw, entry) {
355 SimpleMenuWidget smw = (SimpleMenuWidget) w;
357 attrs->cursor = smw->simple_menu.cursor;
359 if ((smw->simple_menu.backing_store == Always) ||
360 (smw->simple_menu.backing_store == NotUseful) ||
361 (smw->simple_menu.backing_store == WhenMapped) ) {
363 attrs->backing_store = smw->simple_menu.backing_store;
381 SimpleMenuWidget smw = (SimpleMenuWidget) w;
386 ForAllChildren(smw, entry) /* reset width of all entries. */
388 (*entry)->rectangle.width = smw->core.width;
516 SimpleMenuWidget smw = (SimpleMenuWidget) XtParent(w);
550 Layout(( Widget) smw, (Dimension *)NULL, (Dimension *)NULL);
692 SimpleMenuWidget smw = (SimpleMenuWidget) w;
693 SmeObject entry = smw->simple_menu.entry_set;
698 smw->simple_menu.entry_set = NULL;
719 SimpleMenuWidget smw = (SimpleMenuWidget) w;
727 if (entry == smw->simple_menu.entry_set) return;
734 smw->simple_menu.entry_set = NULL;
738 smw->simple_menu.entry_set = entry;
760 SimpleMenuWidget smw = (SimpleMenuWidget) w;
761 SmeObject entry = smw->simple_menu.entry_set;
797 * Arguments: w - the smw widget.
809 SimpleMenuWidget smw = (SimpleMenuWidget) w;
811 return( (Widget) smw->simple_menu.entry_set);
816 * Arguments: w - the smw widget.
828 SimpleMenuWidget smw = (SimpleMenuWidget) w;
830 smw->simple_menu.entry_set = NULL;
841 * Arguments: w - the smw widget.
852 SimpleMenuWidget smw = (SimpleMenuWidget) w;
857 if ( (smw->simple_menu.label_string == NULL) ||
858 (smw->simple_menu.label != NULL) ) {
868 XtSetArg(args[0], XtNlabel, smw->simple_menu.label_string);
870 smw->simple_menu.label = (SmeObject)
872 smw->simple_menu.label_class, w,
876 for (child = smw->composite.children + smw->composite.num_children,
877 i = smw->composite.num_children ; i > 0 ; i--, child--) {
882 *child = (Widget) smw->simple_menu.label;
908 SimpleMenuWidget smw;
915 smw = (SimpleMenuWidget) w;
919 smw = (SimpleMenuWidget) XtParent(w);
923 allow_change_size = (!XtIsRealized((Widget)smw) ||
924 (smw->shell.allow_shell_resize));
926 if ( smw->simple_menu.menu_height )
927 height = smw->core.height;
930 height = smw->simple_menu.top_margin;
931 ForAllChildren(smw, entry) {
934 if ( (smw->simple_menu.row_height != 0) &&
935 (*entry != smw->simple_menu.label) )
936 (*entry)->rectangle.height = smw->simple_menu.row_height;
942 height += smw->simple_menu.bottom_margin;
945 if ((smw->simple_menu.row_height != 0) &&
946 (current_entry != smw->simple_menu.label) )
947 height = smw->simple_menu.row_height;
950 if (smw->simple_menu.menu_width)
951 width = smw->core.width;
953 width = GetMenuWidth((Widget) smw, (Widget) current_entry);
955 width = smw->core.width;
958 ForAllChildren(smw, entry)
963 MakeSetValuesRequest((Widget) smw, width, height);
1025 SimpleMenuWidget smw = (SimpleMenuWidget) w;
1055 if (smw->simple_menu.popup_entry == NULL)
1056 entry = smw->simple_menu.label;
1058 entry = smw->simple_menu.popup_entry;
1081 SimpleMenuWidget smw = (SimpleMenuWidget) w;
1083 if (smw->simple_menu.menu_on_screen) {
1123 SimpleMenuWidget smw = (SimpleMenuWidget) w;
1132 smw->simple_menu.cursor,
1149 SimpleMenuWidget smw = (SimpleMenuWidget) w;
1153 if ( !smw->simple_menu.recursive_set_values ) {
1154 if ( (smw->core.width != width) || (smw->core.height != height) ) {
1155 smw->simple_menu.recursive_set_values = TRUE;
1160 else if (XtIsRealized( (Widget) smw))
1161 Redisplay((Widget) smw, (XEvent *) NULL, (Region) NULL);
1163 smw->simple_menu.recursive_set_values = FALSE;
1177 SimpleMenuWidget smw = (SimpleMenuWidget) w;
1181 if ( smw->simple_menu.menu_width )
1182 return(smw->core.width);
1184 ForAllChildren(smw, entry) {
1217 SimpleMenuWidget smw = (SimpleMenuWidget) w;
1221 if (smw->simple_menu.menu_height)
1222 return(smw->core.height);
1224 height = smw->simple_menu.top_margin + smw->simple_menu.bottom_margin;
1226 if (smw->simple_menu.row_height == 0) {
1227 ForAllChildren(smw, entry)
1231 height += smw->simple_menu.row_height * smw->composite.num_children;
1249 SimpleMenuWidget smw = (SimpleMenuWidget) w;
1273 if ( (x_loc < 0) || (x_loc >= (int)smw->core.width) || (y_loc < 0) ||
1274 (y_loc >= (int)smw->core.height) )
1277 ForAllChildren(smw, entry) {
1282 if ( *entry == smw->simple_menu.label )