VWLib REFERENCE MANUAL


NAME
vwPushButton - A pushbutton class.

INHERITS FROM
vwButton

HEADER FILE
#include <vwPushButton.h>

PUBLIC METHOD SUMMARY
vwPushButton::vwPushButton ( vwMediator * concreteMediator, pfDCS * dcs);
virtual vwPushButton::~vwPushButton ( void);
virtual void vwPushButton::setOver ( int overState=True);

PROTECTED METHOD SUMMARY
virtual int vwPushButton::doPostProcessPress ( void);

INHERITED PUBLIC METHODS

   Inherited from vwButton
virtual void vwButton::setOver ( int overState=Tue);
virtual void vwButton::setPressed ( int pressedState);
virtual void vwButton::setPressed ( void);
virtual void vwButton::setIsPressed ( int isPressed=True);
inline int vwButton::getNumChildren ( void);
inline int vwButton::isGeneric ( void);
inline void vwButton::setPushDistance ( float pushDistance=1.0);
inline int vwButton::getExpanded ( void);
inline void vwButton::setExpanded ( int expandedState=True);
virtual char * vwButton::getChild ( int childListIndex=0);
virtual int vwButton::addChild ( char * child);

   Inherited from vwLabel
void vwLabel::setLabelColor ( float * rgba);
void vwLabel::setLabelText ( vwWidget::wdgStruct *widget_struct, pfFont *font);
void vwLabel::addToLabel ( char *word, int column, int row);
void vwLabel::initLabelParms ( pfFont * font, int total_words=1, int total_rows=1);
inline void vwLabel::setLabelSize ( float size=1.0);
inline void vwLabel::setLabelVSpc ( float verticalSpacing=1.0);
inline void vwLabel::setExtrudeSize ( float extrudeSize=1.0);
inline void vwLabel::setSpacingScale( float horizSpc, float vertSpc, float depthSpc);
inline void vwLabel::setLabelHeight ( float hight=0.0);
inline void vwLabel::setFlatten ( int flatten=True);
inline void vwLabel::clearLabel ( void);

   Inherited from vwObserver
virtual void vwObserver::update ( vwSubject * callingSubject, void * data) = 0;

   Inherited from vwWidget
virtual void vwWidget::setActive ( int activeState=True);
virtual void vwWidget::setOver ( int overState=True);
virtual void vwWidget::setVisible ( int visibiltyState=True);
inline int vwWidget::getActive ( void);
inline int vwWidget::getOver ( void);

inline int vwWidget::getPressed (

void);
inline int vwWidget::getVisible ( void);
inline int vwWidget::getDragged ( void);
inline int vwWidget::getIdent ( void);
inline int vwWidget::getInterface ( void);
void vwWidget::getColor ( wColor colorIndex, float rgba[]);
inline void vwWidget::setColor ( wColor colorIndex=ACTIVE);
void vwWidget::registerColor ( wColor colorIndex, float *rgba);
inline int vwWidget::isOfType ( wType wdg_type);
inline pfSCS * vwWidget::getSCS ( void);
inline pfDCS * vwWidget::getDCS ( void);
inline void vwWidget::getParentMtx ( pfMatrix * m);

   Inherited from vwSubject
virtual void vwSubject::attach ( vwObserver *concreteObserver);
virtual void vwSubject::detach ( vwObserver *concreteObserver);
inline void vwSubject::setSubectData ( void * data);
inline void * vwSubject::getSubjectData ( void);
inline unsigned long vwSubject::getID ( void);

INHERITED PROTECTED METHODS

   Inherited from vwButton
virtual void vwButton::doProcessPress ( void);
virtual void vwButton::doPostProcessPress ( void);
virtual void vwButton::doPushButton ( void);

   Inherited from vwWidget
virtual void vwWidget::doSetColor ( wColor colorIndex);
virtual void vwWidget::setWType ( wType widgetType);

   Inherited from vwSubject
virtual void vwSubject::notify ( void);

CLASS DESCRIPTION

vwPushButton is a state-reverting button publically derived from vwButton. Unlike vwButton, which retains its new pressed state after vwButton::setPressed() is called, vwPushButton generates an event via notify() and then its pressed state reverts from True back to False. In other words, its pressed state is always False, except during the course of a setPressed() or setPressed(True) operation. It overrides the public virtual vwButton:setOver() method in order to deflect when the left wand button is pressed and getOver() is True. If this button is pressed, the deflection is removed (i.e., it presses in and then rebounds upon release). The vwPushButton can be thought of as a semi-automatic rifle. It fires off an event whenever it is pressed and immediately re-loads, enabling it to fire off the same event again when triggered. Note, if the overloaded method vwButton::setPressed(int) is called with the argument value False, as with vwButton, an event will still be generated. But since the vwPushButtton's pressed state is False already, it's pressed state will not change during this operation.


METHOD DESCRIPTIONS

   vwPushButton()
vwRadioButton ( vwMediator *concreteMediator, pfDCS *dcs);

Construct a radiobutton.

*concreteMediator specifies a pointer to the concrete mediator of the interface being created.

*dcs specifies a pointer to a Performer pfDCS containing the radiobutton's geometry.

   ~vwPushButton()
virtual ~vwPushButton ( void);

Destruct an instance.

   setOver()
virtual void setOver ( int overState);

Set's the pushButton's Over State. Overrides vwButton:setOver(). setOver() monitors CAVEBUTTON1. If CAVEBUTTON1 is True and the button's Over State is True, the button will be deflected (pushed back), else the button will be in its default position.

overState specifies a value of False (0) or True. Default value is True.

   doPostProcessPress() [Protected]
virtual int doPostProcessPress ( void);

Called for within setPressed() after notify(). Resets the pushButton's pressed state to False and returns it to its non-deflected, default position.

SEE ALSO
vwButton

vrmedlab.jpg (7272 bytes)