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

VCF::Event Class Reference

The Event class is root object for events in the Framework. More...

#include <vcf/FoundationKit/Event.h>

Inheritance diagram for VCF::Event:

VCF::Object VCF::ActionEvent VCF::ButtonEvent VCF::ClipboardEvent VCF::ColumnItemEvent VCF::ComponentEvent VCF::ControlEvent VCF::ControlPopupMenuMenuEvent VCF::DialogEvent VCF::DocManagerEvent VCF::DocumentEvent VCF::DragScrollEvent VCF::DragSourceEvent VCF::DropTargetEvent VCF::FocusEvent VCF::FrameEvent VCF::HelpEvent VCF::HTMLAuthenticationEvent VCF::HTMLElementEvent VCF::HTMLEvent VCF::HTMLNewWindowEvent VCF::ImageEvent VCF::ImageListEvent VCF::ItemEditorEvent VCF::ItemEvent VCF::JavaScriptEvent VCF::KeyboardEvent VCF::MenuItemEvent VCF::ModelEvent VCF::MouseEvent VCF::OutputReadyEvent VCF::PrintEvent VCF::PropertyChangeEvent VCF::ScrollEvent VCF::SocketEvent VCF::TableCellEvent VCF::TabModelEvent VCF::ThreadEvent VCF::TimerEvent VCF::ToolTipEvent VCF::UndoRedoEvent VCF::URLAuthenticationEvent VCF::URLEvent VCF::ValidationEvent VCF::WhatsThisHelpEvent VCF::WindowEvent VCF::XMLParserEvent List of all members.

Public Member Functions

 Event (Object *source)
 Event (Object *source, const uint32 &eventType)
 Event (const Event &rhs)
Eventoperator= (const Event &rhs)
void init ()
virtual void consume ()
bool getConsumed () const
 shows whether or not the event has been consumed.
void setConsumed (const bool &isConsumed)
bool isConsumed ()
ObjectgetSource () const
 retrieves the events source, in other words, who actually caused the event to be generated
uint32 getType () const
 gets the type of event.
void setType (const uint32 &type)
time_t getTime () const
 gets the time the event was created.
void setUserData (void *userData)
void * getUserData () const
virtual Objectclone (bool deep=false) const
 Makes a complete clone of this object.

Protected Attributes

bool consumed_
Objectsource_
void * userData_
uint32 eventType_
time_t time_

Detailed Description

The Event class is root object for events in the Framework.

Events are defined as any action that is generated in response to some change in the system. Moving the mouse, typing on the keyboard, etc are all example of Window System events that are generated by the User, but events can also be generated by an objects change in state. For example, a text model can fire events if the state of it's text has changed.

Version:
1.0
Author:
Jim Crafton


Constructor & Destructor Documentation

VCF::Event::Event Object source  )  [inline]
 

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

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


Member Function Documentation

virtual Object* VCF::Event::clone bool  deep = false  )  const [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::Object.

Reimplemented in VCF::ComponentEvent, VCF::OutputReadyEvent, VCF::PropertyChangeEvent, and VCF::ThreadEvent.

virtual void VCF::Event::consume  )  [inline, virtual]
 

bool VCF::Event::getConsumed  )  const [inline]
 

shows whether or not the event has been consumed.

primarily used by the Listener list implementation

Object * VCF::Event::getSource  )  const [inline]
 

retrieves the events source, in other words, who actually caused the event to be generated

time_t VCF::Event::getTime  )  const [inline]
 

gets the time the event was created.

uint32 VCF::Event::getType  )  const [inline]
 

gets the type of event.

Some events may not put anything useful here, but events associated with Listeners that have multiple methods (like MouseListener) will definitely store a flag here. See the specific event class for the exact event types the event types can be set to

void * VCF::Event::getUserData  )  const [inline]
 

void VCF::Event::init  )  [inline]
 

bool VCF::Event::isConsumed  )  [inline]
 

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

void VCF::Event::setConsumed const bool &  isConsumed  )  [inline]
 

void VCF::Event::setType const uint32 type  )  [inline]
 

void VCF::Event::setUserData void *  userData  )  [inline]
 


Member Data Documentation

bool VCF::Event::consumed_ [protected]
 

uint32 VCF::Event::eventType_ [protected]
 

Object* VCF::Event::source_ [protected]
 

time_t VCF::Event::time_ [protected]
 

void* VCF::Event::userData_ [protected]
 


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