Version 1.1 MODIFICATIONS/ENHANCEMENTS from
- 1. Added default parementer values to many methods where they would obviously be useful
(e.g, vwWidget::setOver(int o=True)).
- 2. Removed getFunction() from concrete widgets.
- 3. Exchanged home-grown list template used in vwMediator
with STL list template.
New Class vwPushButton
- vwPushButton is 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 re-sets its pressed state to False. It also overrides the virtual vwButton::setOver() method in order to deflect in Y when
the left wand button is pressed and getOver() is True.
The vwPushButton can be thought of as a semi-automatic rifle. It fires off an event
whenever it is pressed and immediately re-loades to enable it to fire off the same event
again when triggered.
Changes to vwSubject
- vwSubject::setSubjectData(void * data) is no
longer public. It is now protected. The reason for this is that setSubjectData() really
shouldn't be used unless by a knowledgable user who has sub-classed the widget anyway.
Careless use of setSubjectData() can result in undesired side-effect, especially with the vwSlider and vwIncremetor
classes which send a pointer to their data value to attached concrete observers when update() is invoked.
Changes to vwWidget
- 1. vwWidget::~vwWidget() destructor now deletes
its own pfGroup (i.e., pfDCS or pfSCS), if it still exists. It also unreferences it if
- 2. Added getIdent() and getInterface() to vwWidget. These two methods are
meant for application specific widget identification and widget group identification
through the declaration and definition of setIdent() and setInterface() methods (see
example programs) in the subclass and the override of getIdent()
and getInterface() in the subclass.
- 3. Modified the argument list for two static vwWidget functions; handleWidgets() and isOver().
The argument of type, CAVE_ID was moved to the end of the argument list so that it could
be given a default value of CAVE_WAND.
- 4. Added getColor(wColor, float ) to vwWidget, to
allow application to extract a specific 4 component color from a widget into a
pre-declared 4 element float array.
- 4. Converted the structure vwWidget::wdgStruct into a class
nested in vwWidget. This makes for much safer and cleaner garbage-collection by vwWidget::wdgStruct::~wdgStruct. The cleanup method
clean_wdgStruct() has been discarded.
Changes to vwButton
- 1. Modified internals of vwButton::setPressed().
There are now two protected virtual methods, doPushButton()
and doProcessPress(), which are called before notify(). doPushButton() encapsulates the default
displacement behavior of the button when it is pressed. doProcessPress() is a pre-notify()
hook function that does nothing by default. doPostProcessPress()
is a post-notify() hook function that does nothing by default. An example of its use can
be found in the new class vwPushButton, which needs to retain its pressed state of True
for notification, but then immediately needs to revert back to its default state where
getPressed() returns False.
- 2. Modified vwButton::setIsPressed() to call setColor() and doProcessPress().
Changes to vwSlider
- 1. Renamed protected virtual method vwSlider::manageBounds() to vwSlider::applyDrag() in order to better reflect this
method's function. Also renamed private
vwSlider::makeDrag() method to vwSlider::computeDrag() and fixed a memory leak in this
- 2. Modified vwSlider::setDataDrag() to take a
second argument of type int with a default value of False. If the value of this argument
is passed as True, notify() will be called from within
Changes to vwIncrementor
- 1. vwIncrementor::setDataParms() can now
be called multiple times to re-initialize or change data parameters.
- 2. vwIncrementor's subject data pointer has been changed to reference a float regardless
of the incrementor's intialization type. This prevents the need to quiry the incrementor
for its type before casting its data pointer in update()
- 3. Added vwIncrementor::getIncDataType()
method which returns an enum defined in vwIncrementor. This method's return value can be
one of the following: vwIncrementor::INTEGER, vwIncrementor::FLOAT or vwIncrementor::PRE_INITIALIZED.
Changes to vwLabel
- 1. Added vwLabel::setExtrudeSize(float val=1.0)
to allow for explicit manipulation of extrusion size.
- 2. Default parameters for vwLabel and also vwIncrementor have been unified.