Panda3D

mouseButton.h

00001 // Filename: mouseButton.h
00002 // Created by:  drose (01Mar00)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 #ifndef MOUSEBUTTON_H
00016 #define MOUSEBUTTON_H
00017 
00018 #include "pandabase.h"
00019 
00020 #include "buttonHandle.h"
00021 
00022 ////////////////////////////////////////////////////////////////////
00023 //       Class : MouseButton
00024 // Description : This class is just used as a convenient namespace for
00025 //               grouping all of these handy functions that return
00026 //               buttons which map to standard mouse buttons.
00027 ////////////////////////////////////////////////////////////////////
00028 class EXPCL_PANDA_PUTIL MouseButton {
00029 PUBLISHED:
00030   static ButtonHandle button(int button_number);
00031   static ButtonHandle one();
00032   static ButtonHandle two();
00033   static ButtonHandle three();
00034   static ButtonHandle four();
00035   static ButtonHandle five();
00036   static ButtonHandle wheel_up();
00037   static ButtonHandle wheel_down();
00038   static ButtonHandle wheel_left();
00039   static ButtonHandle wheel_right();
00040 
00041   static bool is_mouse_button(ButtonHandle button);
00042 
00043 public:
00044   static void init_mouse_buttons();
00045 
00046   enum { num_mouse_buttons = 5 };
00047   static ButtonHandle _buttons[num_mouse_buttons];
00048   static ButtonHandle _wheel_up;
00049   static ButtonHandle _wheel_down;
00050   static ButtonHandle _wheel_left;
00051   static ButtonHandle _wheel_right;
00052 };
00053 
00054 #endif
 All Classes Functions Variables Enumerations