Xfce Foundation Classes
Main Page  | IndexNamespace List  |  Alphabetical List  |  Class List  |  File List

Xfc::Gdk::EventButton Class Reference

A GdkEventButton C++ wrapper class. More...

#include <xfc/gdk/events.hh>

Inheritance diagram for Xfc::Gdk::EventButton:

Xfc::Gdk::EventAny Xfc::Gdk::Event Xfc::G::Boxed Xfc::Object Xfc::Trackable List of all members.

Public Member Functions


Detailed Description

A GdkEventButton C++ wrapper class.

An EventButton is used for button press and button release events.

The event type will be one of BUTTON_PRESS, TWO_BUTTON_PRESS, THREE_BUTTON_PRESS and BUTTON_RELEASE. Double and triple-clicks result in a sequence of events being received.

For double-clicks the order of events will be:

Note that the first click is received just like a normal button press, while the second click results in a TWO_BUTTON_PRESS being received just after the BUTTON_PRESS.

Triple-clicks are very similar to double-clicks, except that THREE_BUTTON_PRESS is inserted after the third click. The order of the events is:

For a double click to occur, the second button press must occur within 1/4 of a second of the first. For a triple click to occur, the third button press must also occur within 1/2 second of the first button press.

Member Function Documentation

unsigned int Xfc::Gdk::EventButton::button (  )  const

Returns the button which was pressed or released, numbered from 1 to 5.

Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button. On 2-button mice, the middle button can often be simulated by pressing both mouse buttons together.

Reimplemented from Xfc::Gdk::Event.

The documentation for this class was generated from the following file: Xfce Foundation Classes
Copyright © 2004-2005 The XFC Development Team XFC 4.3