omgui::MouseEvent Class Reference

#include <omgui/event.h>

Inherits omgui::Event.

List of all members.


Detailed Description

Event object for the following events:

Public Types

enum  BUTTON_FLAGS { LEFT = 0x1, RIGHT = 0x2, MIDDLE = 0x4 }
enum  KEY_FLAGS { NONE = 0x0, SHIFT = 0x1, ALT = 0x2, CONTROL = 0x4 }

Public Member Functions

virtual bool can_veto () const
int get_button_flags () const
bool get_button_state (BUTTON_FLAGS button) const
event_id get_id () const
int get_key_flags () const
bool get_key_state (KEY_FLAGS key) const
object_id get_object_id () const
omgui::Point get_position () const
bool get_veto () const
 MouseEvent (const MouseEvent &other)
 MouseEvent (event_id id, object_id obj, const omgui::Point &pos, int button_flags, int key_flags)
void veto (bool v=true) const

Private Attributes

int m_button_flags
 Identifies what mouse buttons were pressed whe the event was generated.
int m_key_flags
 Identifies what keys were pressed when the event was generated.
omgui::Point m_position
 position of the mouse event in client coordinates

Member Enumeration Documentation

Bit flags for identifying which mouse buttons are pressed, if any.

Enumerator:
LEFT 
RIGHT 
MIDDLE 

Bit flags for the keys that may have been pressed when the event was sent

Enumerator:
NONE 
SHIFT 
ALT 
CONTROL 


Constructor & Destructor Documentation

omgui::MouseEvent::MouseEvent ( event_id  id,
object_id  obj,
const omgui::Point pos,
int  button_flags,
int  key_flags 
)

Constructs a MouseEvent

Parameters:
id The event_id of the event
obj The object_id of the object associated with the event
pos Position of the mouse in client coordinates of the widget
button_flags Identifies what mouse buttons were pressed when the mouse event was generated
key_flags Identifies what keys were pressed when the mouse event was generated

omgui::MouseEvent::MouseEvent ( const MouseEvent other  ) 


Member Function Documentation

bool omgui::Event::can_veto (  )  const [virtual, inherited]

Returns:
True if this event is allowed to be vetoed

Reimplemented in omgui::WindowCloseEvent, and omgui::NotebookEvent.

int omgui::MouseEvent::get_button_flags (  )  const

Returns:
A bitmask identifying which keys were pressed when the event was sent

bool omgui::MouseEvent::get_button_state ( BUTTON_FLAGS  button  )  const

Returns:
Whether or not the given mouse button was pressed when the event was sent

event_id omgui::Event::get_id (  )  const [inherited]

Returns:
The id of this event

int omgui::MouseEvent::get_key_flags (  )  const

Returns:
A bitmask identifying which keys were pressed when the event was sent

bool omgui::MouseEvent::get_key_state ( KEY_FLAGS  key  )  const

Returns:
Whether or not the given key was pressed when the event was sent

object_id omgui::Event::get_object_id (  )  const [inherited]

Returns:
The id of the object associated with this event

omgui::Point omgui::MouseEvent::get_position (  )  const

Returns:
Position of the mouse in client coordinates when this event was sent

bool omgui::Event::get_veto (  )  const [inherited]

Returns:
Whether or not this event has been vetoed.

void omgui::Event::veto ( bool  v = true  )  const [inherited]

Vetos the event.

Precondition:
The event is vetoable. That is, can_veto() returns true.


Member Data Documentation

Identifies what mouse buttons were pressed whe the event was generated.

Identifies what keys were pressed when the event was generated.

position of the mouse event in client coordinates


doxygen SourceForge.net Logo