*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->IRIX man pages -> Vk/VkCheckBox (3)              
Title
Content
Arch
Section
 

Contents


VkCheckBox(3x)							VkCheckBox(3x)


NAME    [Toc]    [Back]

     VkCheckBox	- A simple interface to	a multi-choice preference panel

INHERITS FROM    [Toc]    [Back]

     VkComponent : VkCallbackObject

HEADER FILE    [Toc]    [Back]

     #include <Vk/VkCheckBox.h>

PUBLIC PROTOCOL	SUMMARY
   Constructor/Destructor
	   VkCheckBox(const char* name,	Widget parent);
	   virtual void	~VkCheckBox(void);


   Adding items    [Toc]    [Back]
	   Widget addItem(char*	name, Boolean set = 0,
			  XtCallbackProc proc =	NULL,
			  XtPointer clientData = NULL);


   Setting and Getting State    [Toc]    [Back]
	   void	setValue(int index, Boolean newValue);
	   void	setValues(Boolean* values, int numValues);
	   int getValue(int index);

PROTECTED PROTOCOL SUMMARY    [Toc]    [Back]

   Detecting State Changes
	   virtual void	valueChanged(int index,	Boolean	newValue);


   Protected Data Members    [Toc]    [Back]
	   WidgetList _widgetList;
	   Widget _rc, _label;

CLASS DESCRIPTION    [Toc]    [Back]

	  The VkCheckBox class offers a	simple interface for creating a	set of
	  check	boxes. Instantiating the component creates an empty, labeled
	  component that contains a Motif XmRowColumn widget. Adding items via
	  the addItem()	member function	creates	XmToggleButton widgets to be
	  added	to the XmRowColumn widget. The state of	any individual check
	  item can be set using	the setValue() or setValues() member
	  functions. The current value of any item can be queried using
	  getValue(). The class	also supports a	virtual	member function	that
	  can notify derived classes when the state of any item	changes.  The
	  class	can also be used directly using	the VkCheckBox::itemChanged()
	  ViewKit callback.






									Page 1






VkCheckBox(3x)							VkCheckBox(3x)




DERIVING SUBCLASSES    [Toc]    [Back]

	  Derived classes can be notified of changes to	the state of any item
	  by overriding	the valueChanged() member function. Derived classes
	  also have access to the _widgetList member, which contains the
	  toggle buttons added to the checkbox,	as well	as the rowcolumn
	  widget _rc that holds	the toggle buttons and the label widget	_label
	  supported by this class.


FUNCTION DESCRIPTIONS    [Toc]    [Back]

   valueChanged()
	   virtual void	valueChanged(int index,	Boolean	newValue);


	  This virtual member function is called when the state	of any item in
	  the checkbox changes.	The arguments indicate the index of the	item
	  that has changed and the current (new) value of that item.

   VkCheckBox()    [Toc]    [Back]
	   VkCheckBox(const char* name,	Widget parent);


	  Initialize the VkCheckBox object. Various manager widgets are
	  created to support the items in the checkbox.

   ~VkCheckBox()
	   virtual void	~VkCheckBox(void);


	  Free all storage associated with a VkCheckBox	object.

   addItem()
	   Widget addItem(char		*name,
			 Boolean	initialValue = 0,
			 XtCallbackProc	callback     = NULL,
			 XtPointer	clientData   = NULL);


	  Add a	new item to the	checkbox. Create an XmToggleButton widget,
	  whose	state is initially set to the given optional value. The
	  optional callback must be an Xt-style	callback. The clientData
	  argument, if provided	will be	passed to the Xt callback when it is
	  called. The function returns the XmToggleButton widget that is
	  created by this function.

   setValue()
	   void	setValue(int index, Boolean newValue);





									Page 2






VkCheckBox(3x)							VkCheckBox(3x)



	  Set the value	of the item indicated by the index to the given	new
	  value.

   setValues()
	   void	setValues(Boolean* values, int numValues);


	  Set the values of numValues items at once. The values	argument is
	  expected to be an array of Boolean values of less than or equal to
	  the number of	items in the check box.

   getValue()
	   int getValue(int index);


	  Retrieve the current value of	the specified item.

DATA MEMBER DESCRIPTIONS    [Toc]    [Back]

   _widgets
	   WidgetList _widgets;


	  The list of XmToggleButton widgets in	the checkbox.

   itemChangedCallback
	   static const	char* const itemChangedCallback;


	  A callback list that is invoked when any item	changes	state.	The
	  index	of the item that changed is returned as	call data.

INHERITED MEMBER FUNCTIONS    [Toc]    [Back]

   Inherited from VkComponent
	  installDestroyHandler(), removeDestroyHandler(), widgetDestroyed(),
	  setDefaultResources(), getResources(), VkComponent(),	manage(),
	  unmanage(), baseWidget(), okToQuit(),	_name, _baseWidget, _w,
	  deleteCallback


   Inherited from VkCallbackObject    [Toc]    [Back]
	  callCallbacks(), addCallback(), removeCallback(),
	  removeAllCallbacks(),

KNOWN DERIVED CLASSES    [Toc]    [Back]

     VkRadioBox

SEE ALSO    [Toc]    [Back]

      
      
     VkComponent, VkCheckBox 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



									Page 3






VkCheckBox(3x)							VkCheckBox(3x)


									PPPPaaaaggggeeee 4444
[ Back ]
 Similar pages
Name OS Title
VkPrefDialog IRIX Preference dialog interface for preference package
VkPrefToggle IRIX Toggle interface for preference package
VkPrefRadio IRIX Radio box interface for preference package
VkPrefGroup IRIX Grouping interface for preference package
VkPrefList IRIX List-arrangement interface for preference package
hunt OpenBSD a multi-player multi-terminal game
hunt NetBSD a multi-player multi-terminal game
monpanel IRIX monitor control panel for Presenter Flat Panel Displays
CGI::Push IRIX Simple Interface to Server Push
dialog_msgbox FreeBSD provide a simple ncurses-based GUI interface
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service