# HG changeset patch # User Paul Reilly # Date 781098522 0 # Node ID b4563001d783f75d2bec2decccf9fff561ee7ce9 # Parent da3ee9703b44b3d69ec0021a4c530b37d760c440 (make_menu_in_widget): Add support for displaying a title in pop up menus. (make_main, xm_set_main_areas, xm_manage_resizing): New functions to create and manage a Motif Main Window widget. diff -r da3ee9703b44 -r b4563001d783 lwlib/lwlib-Xm.c --- a/lwlib/lwlib-Xm.c Sun Oct 02 11:28:06 1994 +0000 +++ b/lwlib/lwlib-Xm.c Sun Oct 02 11:48:42 1994 +0000 @@ -345,7 +345,13 @@ XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; XtSetArg (al [ac], XmNuserData, cur->call_data); ac++; - if (all_dashes_p (cur->name)) + if (instance->pop_up_p && !cur->contents && !cur->call_data) + { + ac = 0; + XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++; + button = XmCreateLabel (widget, cur->name, al, ac); + } + else if (all_dashes_p (cur->name)) { button = XmCreateSeparator (widget, cur->name, NULL, 0); } @@ -1515,3 +1521,42 @@ XmProcessTraversal (w, 0); XtSetKeyboardFocus (parent, w); } + +/* Motif hack to set the main window areas. */ +void +xm_set_main_areas (parent, menubar, work_area) + Widget parent; + Widget menubar; + Widget work_area; +{ + XmMainWindowSetAreas (parent, + menubar, /* menubar (maybe 0) */ + 0, /* command area (psheets) */ + 0, /* horizontal scroll */ + 0, /* vertical scroll */ + work_area); /* work area */ +} + +/* Motif hack to control resizing on the menubar. */ +void +xm_manage_resizing (w, flag) + Widget w; + Boolean flag; +{ + if (flag) + { + /* Enable the edit widget for resizing. */ + Arg al[1]; + + XtSetArg (al[0], XtNallowShellResize, 0); + XtSetValues (w, al, 1); + } + else + { + /* Disable the edit widget from resizing. */ + Arg al[1]; + + XtSetArg (al[0], XtNallowShellResize, 0); + XtSetValues (w, al, 1); + } +}