ubit::UMouseEvent Class Reference

mouse events More...

#include <uevent.hpp>

Inheritance diagram for ubit::UMouseEvent:

ubit::UInputEvent ubit::UEvent List of all members.

Public Member Functions

virtual UMouseEventmouseEvent ()
int getX () const
int getY () const
 return the location of the mouse in getView().
int getXwin () const
int getYwin () const
 return the location of the mouse in getWinView().
int getXscreen () const
int getYscreen () const
 return the location of the mouse on the screen.
virtual int getButton () const
 returns the button that was just pressed or released.
virtual int getClickCount () const
 returns the number of mouse clicks.
virtual bool isBrowsing () const
virtual bool isFirstDrag () const
virtual UDatagetData ()
virtual UStrgetStr ()
virtual UDatagetData (UDataProps &)
virtual UStrgetStr (UDataProps &)
 returns the UData/the UStr that was under the mouse.
int getButtons () const
 obsolete: use getState() or getButtonMask().
 UMouseEvent (UEventFlow *f, UView *v, USysEvent e, UTime t, const UCond &c)

Detailed Description

mouse events


Member Function Documentation

int ubit::UMouseEvent::getButton (  )  const [virtual]

returns the button that was just pressed or released.

returns one of UEvent::LeftButton, MidButton, RightButton for UOn::mpress and UOn::mrelease events. BEWARE: returns 0 for move or drag events. Exemple:

  void pressCB(UMouseEvent& e) {
     if (e.getCond() == UOn::mpress
           && (e.getButton() == e::RightButton
               || (e.getButton() == e::LeftButton && e.isControlDown()))
         ) {
        .....
     }
  }
 

UStr * ubit::UMouseEvent::getStr ( UDataProps  )  [virtual]

returns the UData/the UStr that was under the mouse.

returns null if no UData/UStr found. Optional argument UDataProps is filled with useful info on the retreived object (see UDataProps).

Note on UStr(s) which are rendered on several lines (UFlowview rendering) : the region returned in UDataProps does not contain the entire string but just the line that is beneath the mouse


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