diff options
| author | Paul Reilly | 1994-10-02 11:48:42 +0000 |
|---|---|---|
| committer | Paul Reilly | 1994-10-02 11:48:42 +0000 |
| commit | c884904e1055808183e8a48ccaf413c6e6533fe5 (patch) | |
| tree | 6e1f6a5e42a46563645d6cad7b2ba5c5ee6a3971 | |
| parent | 7bf2b51a34e275b6f4747201e97d64ed25ff55a6 (diff) | |
| download | emacs-c884904e1055808183e8a48ccaf413c6e6533fe5.tar.gz emacs-c884904e1055808183e8a48ccaf413c6e6533fe5.zip | |
(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.
| -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, | |||
| 345 | XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; | 345 | XtSetArg (al [ac], XmNalignment, XmALIGNMENT_BEGINNING); ac++; |
| 346 | XtSetArg (al [ac], XmNuserData, cur->call_data); ac++; | 346 | XtSetArg (al [ac], XmNuserData, cur->call_data); ac++; |
| 347 | 347 | ||
| 348 | if (all_dashes_p (cur->name)) | 348 | if (instance->pop_up_p && !cur->contents && !cur->call_data) |
| 349 | { | ||
| 350 | ac = 0; | ||
| 351 | XtSetArg (al[ac], XmNalignment, XmALIGNMENT_CENTER); ac++; | ||
| 352 | button = XmCreateLabel (widget, cur->name, al, ac); | ||
| 353 | } | ||
| 354 | else if (all_dashes_p (cur->name)) | ||
| 349 | { | 355 | { |
| 350 | button = XmCreateSeparator (widget, cur->name, NULL, 0); | 356 | button = XmCreateSeparator (widget, cur->name, NULL, 0); |
| 351 | } | 357 | } |
| @@ -1515,3 +1521,42 @@ xm_set_keyboard_focus (Widget parent, Widget w) | |||
| 1515 | XmProcessTraversal (w, 0); | 1521 | XmProcessTraversal (w, 0); |
| 1516 | XtSetKeyboardFocus (parent, w); | 1522 | XtSetKeyboardFocus (parent, w); |
| 1517 | } | 1523 | } |
| 1524 | |||
| 1525 | /* Motif hack to set the main window areas. */ | ||
| 1526 | void | ||
| 1527 | xm_set_main_areas (parent, menubar, work_area) | ||
| 1528 | Widget parent; | ||
| 1529 | Widget menubar; | ||
| 1530 | Widget work_area; | ||
| 1531 | { | ||
| 1532 | XmMainWindowSetAreas (parent, | ||
| 1533 | menubar, /* menubar (maybe 0) */ | ||
| 1534 | 0, /* command area (psheets) */ | ||
| 1535 | 0, /* horizontal scroll */ | ||
| 1536 | 0, /* vertical scroll */ | ||
| 1537 | work_area); /* work area */ | ||
| 1538 | } | ||
| 1539 | |||
| 1540 | /* Motif hack to control resizing on the menubar. */ | ||
| 1541 | void | ||
| 1542 | xm_manage_resizing (w, flag) | ||
| 1543 | Widget w; | ||
| 1544 | Boolean flag; | ||
| 1545 | { | ||
| 1546 | if (flag) | ||
| 1547 | { | ||
| 1548 | /* Enable the edit widget for resizing. */ | ||
| 1549 | Arg al[1]; | ||
| 1550 | |||
| 1551 | XtSetArg (al[0], XtNallowShellResize, 0); | ||
| 1552 | XtSetValues (w, al, 1); | ||
| 1553 | } | ||
| 1554 | else | ||
| 1555 | { | ||
| 1556 | /* Disable the edit widget from resizing. */ | ||
| 1557 | Arg al[1]; | ||
| 1558 | |||
| 1559 | XtSetArg (al[0], XtNallowShellResize, 0); | ||
| 1560 | XtSetValues (w, al, 1); | ||
| 1561 | } | ||
| 1562 | } | ||