Panda3D
Public Types | Static Public Member Functions | Static Public Attributes

MouseButton Class Reference

This class is just used as a convenient namespace for grouping all of these handy functions that return buttons which map to standard mouse buttons. More...

#include "mouseButton.h"

List of all members.

Public Types

enum  { num_mouse_buttons = 5 }

Static Public Member Functions

static ButtonHandle button (int button_number)
 Returns the ButtonHandle associated with the particular numbered mouse button (zero-based), if there is one, or ButtonHandle::none() if there is not.
static ButtonHandle five ()
 Returns the ButtonHandle associated with the fifth mouse button.
static ButtonHandle four ()
 Returns the ButtonHandle associated with the fourth mouse button.
static void init_mouse_buttons ()
 This is intended to be called only once, by the static initialization performed in config_util.cxx.
static bool is_mouse_button (ButtonHandle button)
 Returns true if the indicated ButtonHandle is a mouse button, false if it is some other kind of button.
static ButtonHandle one ()
 Returns the ButtonHandle associated with the first mouse button.
static ButtonHandle three ()
 Returns the ButtonHandle associated with the third mouse button.
static ButtonHandle two ()
 Returns the ButtonHandle associated with the second mouse button.
static ButtonHandle wheel_down ()
 Returns the ButtonHandle generated when the mouse wheel is rolled one notch downwards.
static ButtonHandle wheel_left ()
 Returns the ButtonHandle generated when the mouse is scrolled to the left.
static ButtonHandle wheel_right ()
 Returns the ButtonHandle generated when the mouse is scrolled to the right.
static ButtonHandle wheel_up ()
 Returns the ButtonHandle generated when the mouse wheel is rolled one notch upwards.

Static Public Attributes

static ButtonHandle _buttons [num_mouse_buttons]
static ButtonHandle _wheel_down
static ButtonHandle _wheel_left
static ButtonHandle _wheel_right
static ButtonHandle _wheel_up

Detailed Description

This class is just used as a convenient namespace for grouping all of these handy functions that return buttons which map to standard mouse buttons.

Definition at line 28 of file mouseButton.h.


Member Function Documentation

ButtonHandle MouseButton::button ( int  button_number) [static]

Returns the ButtonHandle associated with the particular numbered mouse button (zero-based), if there is one, or ButtonHandle::none() if there is not.

Definition at line 36 of file mouseButton.cxx.

References ButtonHandle::none().

Referenced by x11GraphicsWindow::get_mouse_button(), x11GraphicsWindow::poll_raw_mice(), and WinGraphicsWindow::window_proc().

ButtonHandle MouseButton::five ( ) [static]

Returns the ButtonHandle associated with the fifth mouse button.

Definition at line 94 of file mouseButton.cxx.

Referenced by RocketInputHandler::do_transmit_data(), and PGEntry::press().

ButtonHandle MouseButton::four ( ) [static]

Returns the ButtonHandle associated with the fourth mouse button.

Definition at line 83 of file mouseButton.cxx.

Referenced by RocketInputHandler::do_transmit_data(), and PGEntry::press().

void MouseButton::init_mouse_buttons ( ) [static]

This is intended to be called only once, by the static initialization performed in config_util.cxx.

Definition at line 168 of file mouseButton.cxx.

References ButtonRegistry::ptr(), and ButtonRegistry::register_button().

bool MouseButton::is_mouse_button ( ButtonHandle  button) [static]

Returns true if the indicated ButtonHandle is a mouse button, false if it is some other kind of button.

Definition at line 151 of file mouseButton.cxx.

Referenced by MouseWatcher::do_transmit_data(), MouseWatcher::press(), MouseWatcher::release(), and PGSliderBar::release().

ButtonHandle MouseButton::one ( ) [static]
ButtonHandle MouseButton::three ( ) [static]

Returns the ButtonHandle associated with the third mouse button.

Definition at line 72 of file mouseButton.cxx.

Referenced by Trackball::do_transmit_data(), RocketInputHandler::do_transmit_data(), and PGEntry::press().

ButtonHandle MouseButton::two ( ) [static]

Returns the ButtonHandle associated with the second mouse button.

Definition at line 61 of file mouseButton.cxx.

Referenced by Trackball::do_transmit_data(), RocketInputHandler::do_transmit_data(), and PGEntry::press().

ButtonHandle MouseButton::wheel_down ( ) [static]

Returns the ButtonHandle generated when the mouse wheel is rolled one notch downwards.

Definition at line 116 of file mouseButton.cxx.

Referenced by RocketInputHandler::do_transmit_data(), x11GraphicsWindow::get_mouse_button(), and WinGraphicsWindow::window_proc().

ButtonHandle MouseButton::wheel_left ( ) [static]

Returns the ButtonHandle generated when the mouse is scrolled to the left.

Usually, you'll only find the horizontal scroll on laptops.

Definition at line 128 of file mouseButton.cxx.

Referenced by x11GraphicsWindow::get_mouse_button().

ButtonHandle MouseButton::wheel_right ( ) [static]

Returns the ButtonHandle generated when the mouse is scrolled to the right.

Usually, you'll only find the horizontal scroll on laptops.

Definition at line 140 of file mouseButton.cxx.

Referenced by x11GraphicsWindow::get_mouse_button().

ButtonHandle MouseButton::wheel_up ( ) [static]

Returns the ButtonHandle generated when the mouse wheel is rolled one notch upwards.

Definition at line 105 of file mouseButton.cxx.

Referenced by RocketInputHandler::do_transmit_data(), x11GraphicsWindow::get_mouse_button(), and WinGraphicsWindow::window_proc().


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations