GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmtMenuGetMenuItem(3) FreeBSD Library Functions Manual XmtMenuGetMenuItem(3)

XmtMenuGetMenuItem(), XmtMenuItemGetSubmenu(), XmtMenuItemGetWidget(), XmtMenuItemSetSensitivity(), XmtMenuItemGetState(), XmtMenuItemSetState() - look up items in an XmtMenu widget by name, and manipulate them.

#include <Xmt/Menu.h>

XmtMenuItem *XmtMenuGetMenuItem(Widget w, String name)

Widget XmtMenuItemGetSubmenu(XmtMenuItem *item)

Widget XmtMenuItemGetWidget(XmtMenuItem *item)

void XmtMenuItemSetSensitivity(XmtMenuItem *item, Boolean sensitive)

Boolean XmtMenuItemGetState(XmtMenuItem *item)

void XmtMenuItemSetState(XmtMenuItem *item, Boolean state, Boolean notify)

INPUTS
w
An XmtMenu widget in which an item is to be looked up by name.
name
The name of the item to look up in w.
item
The menu item to manipulate.
sensitive
For XmtMenuItemSetSensitivity(), whether the specified item should be made sensitive (True) or insensitive (False).
state
For XmtMenuItemSetState(), the state to set on the specified toggle button item. Specify True to set the button and False to unset it.
notify
For XmtMenuItemSetState(), this argument specifies whether the XmNvalueChangedCallback of the specified toggle button item should be invoked in response to the change.

RETURNS

XmtMenuGetMenuItem() returns the named menu item, or NULL if it could not be found.

XmtMenuItemGetSubmenu() returns the XmtMenu widget that is associated with the specified cascade button menu item.

XmtMenuItemGetWidget() returns the widget associated with the specified menu item.

XmtMenuItemGetState() returns True if the specified toggle button menu item is selected an False if it is unselected.

The items in an XmtMenu widget are described by XmtMenuItem structures. If you specify your menu in C code, then you will declare and initialize these structures explicitly. If you specify your menu in a resource file, you can use XmtMenuGetMenuItem() to look up the XmtMenuItem structure of a named item. The other functions described here perform various manipulations on a specified menu item.

XmtMenuGetMenuItem() searches for and returns the menu item named name in the XmtMenu widget w, and also recursively searches any pulldown and pullright menus attached to w. You can specify a name for a menu item created in C code by setting the name field of the XmtMenuItem structure. You can specify a name for a menu item described in a resource file by specifying the name followed by a colon as the first element in the menu item description. See Chapter 20, Easy Menu Creation, for more information.

For menu items that are cascade buttons, XmtMenuItemGetSubmenu() returns the XmtMenu widget that forms the menu pane attached to that cascade button. If you call this function for a menu item that is not a cascade button, it will print an error message.

XmtMenuItemGetWidget() returns the widget associated with any menu item. This may be an XmPushButton, an XmToggleButton, an XmCascadeButton, an XmLabel, or an XmSeparator.

XmtMenuItemSetSensitivity() lets you set the sensitivity of a menu item. Like XtSetSensitive(), the second argument to XmtMenuItemSetSensitivity() is a Boolean. If True, the item will be made sensitive; if False, the item will be made insensitive, and will be grayed out. Unlike XtSetSensitive(), however, XmtMenuItemSetSensitivity() keeps a count of how many times it has been called for an item. If the function is called twice for an item with the sensitive argument of False, then the item will not become sensitive again until the function is called twice with the argument True.

XmtMenuItemGetState() returns True if the specified toggle button is selected, and False otherwise. This function will print a warning message if called for a menu item that is not a toggle button.

XmtMenuItemSetState() sets the button state as specified by the state argument, and if notify is True, it calls any callbacks registered for the toggle button. This function will print a warning message if called for a menu item that is not a toggle button.

Chapter 20, Easy Menu Creation,
XmtMenu, XmtMenuActivateProcedure(), XmtMenuInactivateProcedure().
Motif Tools Xmt

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.