Sourceforge.net - The VCF's Project Host
   The VCF Website Home   |   Online Discussion Forums   |   Sourceforge.net Project Page   

VCF::ActionEvent Class Reference

The ActionEvent is used to store and read the state about a particular action. More...

#include <ActionEvent.h>

Inheritance diagram for VCF::ActionEvent:

VCF::Event VCF::Object List of all members.

Public Member Functions

 ActionEvent (Object *source, const uint32 &eventType)
 ActionEvent (const ActionEvent &rhs)
ActionEventoperator= (const ActionEvent &rhs)
virtual Objectclone (bool deep=false)
 Makes a complete clone of this object.
void setText (const String &val)
 Sets the text for a an ActionEvent.
void setEnabled (const bool &val)
 Sets whether or not the target should consider itself enabled or not.
void setState (const int32 &val)
 Sets a user defined state, that is up to the target implementer to interpret.
void setChecked (const bool &val)
 Sets whether target should consider itself "checked".
void setExclusiveChecked (const bool &val)
 Sets whether or not the checked value of this action event should be considered as an exclusive value.
void setStatusText (const String &val)
 Sets the status text for this action event.
String getText ()
 Returns the text of this Action event.
bool isEnabled ()
 returns whether or not the event is enabled
int32 getState ()
 returns the user defined state of the event
bool isModified ()
 returns whether the event has been modified.
bool isChecked ()
 Returns whether the event is checked.
bool isExclusiveChecked ()
 Returns whether the value returned from isChecked() should be interpreted as an exclusive checked state.
String getStatusText ()
 returns a string that represents status text, such as what a status bar might use

Protected Attributes

String text_
bool enabled_
int32 state_
bool modified_
bool checked_
bool exlusiveChecked_
String statusText_

Detailed Description

The ActionEvent is used to store and read the state about a particular action.

With the ActionEvent you can store the text, enabled, checked, or user defined state of a particular actions. This ActionEvent is then handled (if appropriate) by the rtegistered component target in the target's handleEvent function, where the state is read and applied to the target however it makes the most sense.


Constructor & Destructor Documentation

VCF::ActionEvent::ActionEvent Object source,
const uint32 eventType
[inline]
 

VCF::ActionEvent::ActionEvent const ActionEvent rhs  )  [inline]
 


Member Function Documentation

virtual Object* VCF::ActionEvent::clone bool  deep = false  )  [inline, virtual]
 

Makes a complete clone of this object.

A typical implementation might be:

    virtual Object* clone( bool deep ) {
        return new MyObject( this );
    }
In which the implementer simply creates a new instance on the heap and calls the copy constructor. Objects which support cloning should also have a copy constructor defined as well.

Parameters:
bool deep if deep is true then any object instances that this object owns should probably be cloned as well, with full new copies made. Otherwise it would be acceptable to simply copy the pointer values. The default value is for deep cloning to be false.
Returns:
Object a new instance that should be an copy of this. If the object doesn't support cloning the return will value will be NULL.

Reimplemented from VCF::Event.

int32 VCF::ActionEvent::getState  )  [inline]
 

returns the user defined state of the event

String VCF::ActionEvent::getStatusText  )  [inline]
 

returns a string that represents status text, such as what a status bar might use

String VCF::ActionEvent::getText  )  [inline]
 

Returns the text of this Action event.

bool VCF::ActionEvent::isChecked  )  [inline]
 

Returns whether the event is checked.

bool VCF::ActionEvent::isEnabled  )  [inline]
 

returns whether or not the event is enabled

bool VCF::ActionEvent::isExclusiveChecked  )  [inline]
 

Returns whether the value returned from isChecked() should be interpreted as an exclusive checked state.

Useful for user interface items that may have multiple options but only allow one to be selected, such as radio item menus, or radio buttons.

bool VCF::ActionEvent::isModified  )  [inline]
 

returns whether the event has been modified.

A new event has not yet been modified. Any calls to setText(), setEnabled(), setState(), setChecked(), or setExclusiveChecked() cause the event to be marked as modified.

ActionEvent& VCF::ActionEvent::operator= const ActionEvent rhs  )  [inline]
 

void VCF::ActionEvent::setChecked const bool &  val  )  [inline]
 

Sets whether target should consider itself "checked".

A MenuItem might choose to call it's MenuItem::setChecked() with this value.

void VCF::ActionEvent::setEnabled const bool &  val  )  [inline]
 

Sets whether or not the target should consider itself enabled or not.

void VCF::ActionEvent::setExclusiveChecked const bool &  val  )  [inline]
 

Sets whether or not the checked value of this action event should be considered as an exclusive value.

For example, if the action event's exclusive checked is true, then a MenuItem might call it's MenuItem::setRadioItem() with the value of the action events checked member.

void VCF::ActionEvent::setState const int32 val  )  [inline]
 

Sets a user defined state, that is up to the target implementer to interpret.

For example, a ToolbarItem looks at this value and queries whether the ToolbarItem::tisPressed bits are set. A MenuItem might look at this value entirely differently (or even ignore it).

void VCF::ActionEvent::setStatusText const String val  )  [inline]
 

Sets the status text for this action event.

void VCF::ActionEvent::setText const String val  )  [inline]
 

Sets the text for a an ActionEvent.


Member Data Documentation

bool VCF::ActionEvent::checked_ [protected]
 

bool VCF::ActionEvent::enabled_ [protected]
 

bool VCF::ActionEvent::exlusiveChecked_ [protected]
 

bool VCF::ActionEvent::modified_ [protected]
 

int32 VCF::ActionEvent::state_ [protected]
 

String VCF::ActionEvent::statusText_ [protected]
 

String VCF::ActionEvent::text_ [protected]
 


The documentation for this class was generated from the following file:
   Comments or Suggestions?    License Information