Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

keyboard_be.h

Go to the documentation of this file.
00001 /*
00002         $Id: keyboard_be.h,v 1.1 2001/03/06 15:09:20 mbn Exp $
00003 
00004         ------------------------------------------------------------------------
00005         ClanLib, the platform independent game SDK.
00006 
00007         This library is distributed under the GNU LIBRARY GENERAL PUBLIC LICENSE
00008         version 2. See COPYING for details.
00009 
00010         For a total list of contributers see CREDITS.
00011 
00012         ------------------------------------------------------------------------
00013 */
00014 
00015 #ifndef header_keyboard_be
00016 #define header_keyboard_be
00017 
00018 #include "API/Display/Input/inputbutton.h"
00019 #include "API/Display/Input/keyboard.h"
00020 #include "Core/System/Be/app_beos.h"
00021 #include "API/Core/System/keep_alive.h"
00022 
00023 #include <Message.h>
00024 
00025 class CL_InputButton_BeKeyboard : public CL_InputButton
00026 {
00027 public:
00028         CL_InputButton_BeKeyboard(int key, bool *keymap);
00029         bool is_pressed();
00030 
00031 private:
00032         int key;
00033         bool *keymap;
00034 };
00035 
00036 class CL_BeKeyboard : public CL_Keyboard, CL_KeepAlive
00037 {
00038 public:
00039         CL_BeKeyboard();
00040         virtual ~CL_BeKeyboard();
00041 
00042         virtual char *get_name() const;
00043 
00044         virtual int get_num_buttons() const;
00045         virtual CL_InputButton *get_button(int button_num);
00046 
00047         virtual int get_num_axes() const;
00048         virtual CL_InputAxis *get_axis(int axis_num);
00049 
00050         virtual int get_num_hats() const;
00051         virtual CL_InputHat *get_hat(int hat_num);
00052 
00053         virtual int get_num_cursors() const;
00054         virtual CL_InputCursor *get_cursor(int cursor_num);
00055 
00056         void handle_key( BMessage* msg, bool down );
00057         void handle_modifiers( BMessage* msg );
00058 
00059 private:
00060         bool keymap[128];
00061         
00062         char translate(int kb_value);
00063         
00064         CL_InputButton_BeKeyboard **buttons;
00065 //      CL_Array<CL_InputButton_BeKeyboard> buttons;
00066 };
00067 
00068 #endif

Generated at Wed Apr 4 19:54:01 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001