Panda3D
Public Types | Static Public Member Functions | Static Public Attributes | List of all members
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"

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. More...
 
static ButtonHandle five ()
 Returns the ButtonHandle associated with the fifth mouse button. More...
 
static ButtonHandle four ()
 Returns the ButtonHandle associated with the fourth mouse button. More...
 
static void init_mouse_buttons ()
 This is intended to be called only once, by the static initialization performed in config_putil.cxx. More...
 
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. More...
 
static ButtonHandle one ()
 Returns the ButtonHandle associated with the first mouse button. More...
 
static ButtonHandle three ()
 Returns the ButtonHandle associated with the third mouse button. More...
 
static ButtonHandle two ()
 Returns the ButtonHandle associated with the second mouse button. More...
 
static ButtonHandle wheel_down ()
 Returns the ButtonHandle generated when the mouse wheel is rolled one notch downwards. More...
 
static ButtonHandle wheel_left ()
 Returns the ButtonHandle generated when the mouse is scrolled to the left. More...
 
static ButtonHandle wheel_right ()
 Returns the ButtonHandle generated when the mouse is scrolled to the right. More...
 
static ButtonHandle wheel_up ()
 Returns the ButtonHandle generated when the mouse wheel is rolled one notch upwards. More...
 

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 25 of file mouseButton.h.

Member Function Documentation

◆ button()

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 32 of file mouseButton.cxx.

◆ five()

ButtonHandle MouseButton::five ( )
static

Returns the ButtonHandle associated with the fifth mouse button.

Definition at line 75 of file mouseButton.cxx.

Referenced by PGEntry::press().

◆ four()

ButtonHandle MouseButton::four ( )
static

Returns the ButtonHandle associated with the fourth mouse button.

Definition at line 67 of file mouseButton.cxx.

Referenced by PGEntry::press().

◆ init_mouse_buttons()

void MouseButton::init_mouse_buttons ( )
static

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

Definition at line 135 of file mouseButton.cxx.

Referenced by init_libputil().

◆ is_mouse_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 120 of file mouseButton.cxx.

Referenced by PGSliderBar::release().

◆ one()

ButtonHandle MouseButton::one ( )
static

Returns the ButtonHandle associated with the first mouse button.

Definition at line 43 of file mouseButton.cxx.

Referenced by PGSliderBar::press(), and PGEntry::press().

◆ three()

ButtonHandle MouseButton::three ( )
static

Returns the ButtonHandle associated with the third mouse button.

Definition at line 59 of file mouseButton.cxx.

Referenced by PGEntry::press().

◆ two()

ButtonHandle MouseButton::two ( )
static

Returns the ButtonHandle associated with the second mouse button.

Definition at line 51 of file mouseButton.cxx.

Referenced by PGEntry::press().

◆ wheel_down()

ButtonHandle MouseButton::wheel_down ( )
static

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

Definition at line 93 of file mouseButton.cxx.

◆ wheel_left()

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 102 of file mouseButton.cxx.

◆ wheel_right()

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 111 of file mouseButton.cxx.

◆ wheel_up()

ButtonHandle MouseButton::wheel_up ( )
static

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

Definition at line 84 of file mouseButton.cxx.


The documentation for this class was generated from the following files: