ubit::UInputEvent Class Reference

input events (base class for UMouseEvent and un KeyEvent) More...

#include <uevent.hpp>

Inheritance diagram for ubit::UInputEvent:

ubit::UEvent ubit::UKeyEvent ubit::UMouseEvent ubit::UWheelEvent List of all members.

Public Member Functions

virtual UInputEventinputEvent ()
int getState () const
 returns an ORed mask of the modifier keys and mouse buttons BEFORE the event occured.
int getButtonState () const
 returns an ORed mask of mouse buttons BEFORE the event occured.
bool isShiftDown () const
bool isControlDown () const
bool isAltDown () const
bool isAltGraphDown () const
bool isMetaDown () const
 return true if this modifier is pressed.
virtual bool setPosAndSource (int x_hardwin, int y_hardwin)
 [Impl] sets the position and the corresponding source x, y are the position in the hardwin.
 UInputEvent (UEventFlow *f, UView *v, USysEvent e, UTime t, const UCond &c)

Detailed Description

input events (base class for UMouseEvent and un KeyEvent)


Member Function Documentation

int ubit::UInputEvent::getState (  )  const

returns an ORed mask of the modifier keys and mouse buttons BEFORE the event occured.

Exemple:

   void dragMouseCB(UMousetEvent& e) {
      if (e.getState() & (e.LeftButton | e.ShiftButton)) {
         .....
      }
   }
 

bool ubit::UInputEvent::setPosAndSource ( int  x_hardwin,
int  y_hardwin 
) [virtual]

[Impl] sets the position and the corresponding source x, y are the position in the hardwin.

They are used to find the source in the widget hierarchy. Note that setPosAndSource() will be moved in UMouseEvent


The documentation for this class was generated from the following files:
Generated on Mon Jan 29 00:20:49 2007 for Ubit by  doxygen 1.4.7