VkMenuBar(3x) VkMenuBar(3x)
VkMenuBar - A ViewKit Menu Bar
VkMenu : VkMenuItem : VkComponent : VkCallbackObject
#include <Vk/VkMenuBar.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkMenuBar(Boolean showHelpPane = TRUE);
VkMenuBar(const char *name,
Boolean showHelpPane = TRUE);
VkMenuBar(VkMenuDesc *desc,
XtPointer defaultCientData= NULL,
Boolean showHelpPane = TRUE);
VkMenuBar(const char *name,
VkMenuDesc *name,
XtPointer defaultCientData= NULL,
Boolean showHelpPane = TRUE);
virtual ~VkMenuBar();
Access Functions [Toc] [Back]
VkSubMenu *helpPane() const {return _helpPane;}
virtual VkMenuItemType menuType();
virtual const char* className();
void showHelpPane(Boolean showit);
The VkMenuBar class provides a menu bar designed to work with the
VkWindow class. By default, instances of VkMenuBar automatically create a
help pane that interfaces to the ViewKit help system. Other panes may be
added using the interface supported by VkMenu.
FUNCTION DESCRIPTIONS [Toc] [Back] VkMenuBar
VkMenuBar(Boolean showHelpPane = TRUE);
VkMenuBar(const char *name,
Boolean showHelpPane = TRUE);
VkMenuBar(VkMenuDesc *desc,
XtPointer defaultCientData= NULL,
Boolean showHelpPane = TRUE);
VkMenuBar(const char *name,
VkMenuDesc *desc,
XtPointer defaultCientData= NULL,
Boolean showHelpPane = TRUE);
Page 1
VkMenuBar(3x) VkMenuBar(3x)
The VkMenuBar constructor initializes an instance of VkMenuBar. To work
with SGI's color schemes (See Schemes(3X)), the name of this instance
should be "menuBar". If a form that does not take a name argument is
used, the name "menuBar" will be used automatically. Another name can
also be specified, but schemes will not work correctly. That last
argument to each version of this constructor specifies whether or not a
help menu pane will be added. The default is to install a help pane.
Two forms of this constructor support a defaultClientData argument. If
provided, any menu item that does not provide a client data argument will
use this argument instead. This allows menus to be specified statically,
while still allowing an instance pointer to be used with callbacks. For
example, the following code segment creates a menubar with a menu pane.
All callbacks associated with the menu will be passed the instance
pointer of the object that creates the menu bar object.
class Sample: public VkWindow {
private:
static void oneCallback( Widget,
XtPointer,
XtPointer);
static void twoCallback( Widget,
XtPointer ,
XtPointer);
static void cutCallback( Widget,
XtPointer,
XtPointer);
static void pasteCallback( Widget,
XtPointer ,
XtPointer);
static VkMenuDesc applicationPane[];
static VkMenuDesc editPane[];
static VkMenuDesc menu[];
protected:
public:
Sample(const char *name) : VkWindow(name)
// Other members
};
SampleWindow::SampleWindow(char *name) : VkWindow(name)
{
setMenuBar(new VkMenuBar(menu, (XtPointer) this));
// Other actions
Page 2
VkMenuBar(3x) VkMenuBar(3x)
}
~VkMenuBar
virtual ~VkMenuBar();
The VkMenuBar destructor is empty.
helpPane
VkSubMenu *helpPane();
Returns the VkSubMenu item used as the help pane.
menuType
virtual VkMenuItemType menuType();
The menuType of this class is BAR.
className
virtual const char* className();
The class name of this class is "VkMenuBar".
showHelpPane
void showHelpPane(Boolean showit = TRUE);
Controls whether the Help pane is visible or not. The default is to
show the Help menu pane.
See VkMenu(3X) for examples
INHERITED MEMBER FUNCTIONS [Toc] [Back] Inherited from VkMenu
isContainer(), findParent(), addAction(), addActionWidget(),
addConfirmFirstAction(), addSeparator(), addLabel(), addToggle(),
addToggle(), add(), addSubmenu(), addRadioSubmenu(),
registerSubmenu(), findNamedItem(), removeItem(), activateItem(),
deactivateItem(), replace(), getItemPosition(), getItemPosition(),
getItemPosition(), operator[](), numItems(), _contents, _nItems,
_maxItems,
Inherited from VkMenuItem [Toc] [Back]
Page 3
VkMenuBar(3x) VkMenuBar(3x)
show(), hide(), manageAll(), setLabel(), setPosition(), activate(),
deactivate(), remove(), show(), _position, _isBuilt, _sensitive,
_parentMenu, _label, _isHidden, _unmanagedWidgets,
_numUnmanagedWidgets,
Inherited from VkComponent [Toc] [Back]
installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
setDefaultResources(), getResources(), manage(), unmanage(),
baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback
Inherited from VkCallbackObject [Toc] [Back]
callCallbacks(), addCallback(), removeCallback(),
removeAllCallbacks()
CLASSES USED BY THIS CLASS
HelpFacilityMotif, VkApp, VkDialogManager, VkMenu, VkMenuItem, VkSubMenu
KNOWN CLASSES THAT USE THIS CLASS [Toc] [Back] VkWindow
VkMenu, VkMenuItem, VkComponent, HelpFacilityMotif, VkApp,
VkDialogManager, VkSubMenu, VkWindow
ViewKit Programmer's Guide
The X Window System, DEC Press, Bob Sheifler and Jim Gettys
The X Window System Toolkit, DEC Press, Paul Asente and Ralph Swick
The OSF/Motif Programmers Reference, Prentice Hall, OSF
PPPPaaaaggggeeee 4444 [ Back ]
|