diff options
author | Paul Reilly <pmr@pajato.com> | 1994-10-02 11:48:42 +0000 |
---|---|---|
committer | Paul Reilly <pmr@pajato.com> | 1994-10-02 11:48:42 +0000 |
commit | c884904e1055808183e8a48ccaf413c6e6533fe5 (patch) | |
tree | 6e1f6a5e42a46563645d6cad7b2ba5c5ee6a3971 /lwlib | |
parent | 7bf2b51a34e275b6f4747201e97d64ed25ff55a6 (diff) | |
download | emacs-c884904e1055808183e8a48ccaf413c6e6533fe5.tar.gz |
(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.
Diffstat (limited to 'lwlib')
-rw-r--r-- | lwlib/lwlib-Xm.c | 47 |
1 files changed, 46 insertions, 1 deletions
diff --git a/lwlib/lwlib-Xm.c b/lwlib/lwlib-Xm.c index 16d25ea20a7..7444d3634dc 100644 --- a/lwlib/lwlib-Xm.c +++ b/lwlib/lwlib-Xm.c @@ -345,7 +345,13 @@ make_menu_in_widget (widget_instance* instance, Widget widget, 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 @@ xm_set_keyboard_focus (Widget parent, Widget w) 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); + } +} |