VkPrefOption(3x) VkPrefOption(3x)
VkPrefOption - Option menu preference field
VkPrefItem : VkComponent : VkCallbackObject
#include <Vk/VkPrefItem.h>
PUBLIC PROTOCOL SUMMARY
Constructor/Destructor
VkPrefOption(const char* name, int numEntries);
virtual void ~VkPrefOption(void);
Setting and Getting Values [Toc] [Back]
void setValue(int index);
int getValue(void);
Access Functions [Toc] [Back]
int getSize(void);
void setSize(int numEntries);
void setLabel(int index,char* label);
char* getLabel(int index);
Widget getButton(int index);
VkPrefOption is an option menu preference object. Option menus
consist of a collection of individual Motif buttons, and keep track
of the last button selected by the user. See VkPrefItem for more
generic information about preference objects.
FUNCTION DESCRIPTIONS [Toc] [Back] VkPrefOption()
VkPrefOption(const char* name, int numEntries);
virtual void ~VkPrefOption(void);
Creates a Motif XmOptionMenu widget as its base, using the name
"optionMenu". This name is hardcoded for the effective use of color
schemes. A label widget is created using the name suffixed by
"Label". The number of entries in the option menu is specified by
the second argument. The individual buttons are created using the
name suffixed by "Button" suffixed by the zero-based button number.
setValue()
Page 1
VkPrefOption(3x) VkPrefOption(3x)
void setValue(int index);
Changes the option object's current and real value. The value is
the zero-based button index of the selected button.
getValue()
int getValue(void);
Copies the option object's current value to the real value, and
returns it.
getSize()
int getSize(void);
Returns the current number of buttons in the option menu.
setSize()
void setSize(int numEntries);
Change the number of buttons in the option menu.
setLabel()
void setLabel(int index, char* label);
Changes the label of a particular button in the option menu. The
string will be looked up first as a resource and if that fails, used
verbatim.
getLabel()
char* getLabel(int index);
Retrieves the label of a particular button in the option menu.
getButton()
Widget getButton(int index);
Returns the Motif XmPushButton widget associated with a particular
button in the option menu.
INHERITED MEMBER FUNCTIONS [Toc] [Back] Inherited from VkPrefItem
VkPrefItem(), ~VkPrefItem(), activate(), deleteChildren(),
labelHeight(), baseHeight(), setLabelHeight(), setBaseHeight(),
activateCallback(), installDestroyHandlers(), labelWidget(),
buildLabel(), getHeight(), setHeight(), _labelWidget, _baseName,
Page 2
VkPrefOption(3x) VkPrefOption(3x)
_labelName, _activated, _homogeneous,
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()
VkPrefItem, VkComponent
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 3333 [ Back ]
|