Skip to Content
Volume 6A: Motif Programming Manual
book

Volume 6A: Motif Programming Manual

by David Brennan, Dan Heller, Paula Ferguson
September 1993
Intermediate to advanced
1014 pages
28h 26m
English
O'Reilly Media, Inc.
Content preview from Volume 6A: Motif Programming Manual
Menu titles should not be dynamically created or destroyed. An application should not make the MenuBar disappear
or add new titles to the MenuBar while the application is running. All of the titles in the MenuBar must be available to
the user when the MainWindow is visible. You can, however, deactivate an entire menu by changing the
XmNsensitive resource on the CascadeButton widget that acts as its title, as discussed in Section #smenusens.
16.3.2 Menu Items
The items in a menu are actually the labels of the PushButtons that make up the menu. Unlike the File title item in the
MenuBar, we chose not to use hard−coded values for the menu item strings, so the strings can be set in a resource file.
While our menu only contains PushButton gadgets, a PulldownMenu can also contain ToggleButtons, Separators, and
CascadeButtons.
You can install a callback routine for each of the items in a menu, or you can install an XmN-entryCallback for
the RowColumn widget to act on behalf of all the menu items. This resource specifies a callback function that
overrides the XmNactivateCallback used by Pushbuttons and the XmNvalueChangedCallback used by
ToggleButtons. Using this resource generates a design that is similar to the simple menu routines described earlier.
See Chapter 8, Manager Widgets, for details on this generic RowColumn resource.
As with the title items, menu items should not be dynamically created or destroyed since it may confuse the user.
However, there is one exception to this guideline. If a ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Volume 7A: XView Programming Manual

Volume 7A: XView Programming Manual

Dan Heller

Publisher Resources

ISBN: 9780596000431