VkPrefOption(3x)
VkPrefOption - Option menu preference field
As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.
NAME VkPrefOption - Option menu preference field INHERITS FROM VkPrefItem : VkComponent : VkCallbackObject HEADER FILE #include <Vk/VkPrefItem.h> PUBLIC PROTOCOL SUMMARY Constructor/Destructor VkPrefOption(const char* name, int numEntries); virtual void ~VkPrefOption(void); Setting and Getting Values void setValue(int index); int getValue(void); Access Functions int getSize(void); void setSize(int numEntries); void setLabel(int index,char* label); char* getLabel(int index); Widget getButton(int index); CLASS DESCRIPTION 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 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() 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 Inherited from VkPrefItem VkPrefItem(), ~VkPrefItem(), activate(), deleteChildren(), labelHeight(), baseHeight(), setLabelHeight(), setBaseHeight(), activateCallback(), installDestroyHandlers(), labelWidget(), buildLabel(), getHeight(), setHeight(), _labelWidget, _baseName, _labelName, _activated, _homogeneous, Inherited from VkComponent installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(), setDefaultResources(), getResources(), manage(), unmanage(), baseWidget(), okToQuit(), _name, _baseWidget, _w, deleteCallback Inherited from VkCallbackObject callCallbacks(), addCallback(), removeCallback(), removeAllCallbacks() SEE ALSO 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