• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • Examples
  • File List
  • Globals

MyGUI_InputDefine.h

Go to the documentation of this file.
00001 
00007 /*
00008     This file is part of MyGUI.
00009     
00010     MyGUI is free software: you can redistribute it and/or modify
00011     it under the terms of the GNU Lesser General Public License as published by
00012     the Free Software Foundation, either version 3 of the License, or
00013     (at your option) any later version.
00014     
00015     MyGUI is distributed in the hope that it will be useful,
00016     but WITHOUT ANY WARRANTY; without even the implied warranty of
00017     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018     GNU Lesser General Public License for more details.
00019     
00020     You should have received a copy of the GNU Lesser General Public License
00021     along with MyGUI.  If not, see <http://www.gnu.org/licenses/>.
00022 */
00023 #ifndef __MYGUI_INPUT_DEFINE_H__
00024 #define __MYGUI_INPUT_DEFINE_H__
00025 
00026 #include "MyGUI_Prerequest.h"
00027 
00028 namespace MyGUI
00029 {
00030 
00031     struct MYGUI_EXPORT MouseButton
00032     {
00033         enum Enum
00034         {
00035             Left = 0,
00036             Right,
00037             Middle,
00038 
00039             Button0 = 0,
00040             Button1,
00041             Button2,
00042             Button3,
00043             Button4,
00044             Button5,
00045             Button6,
00046             Button7,
00047 
00048             None = -1
00049         };
00050 
00051         MouseButton(Enum _value = None) : value(_value) { }
00052 
00053         friend bool operator == (MouseButton const& a, MouseButton const& b) { return a.value == b.value; }
00054         friend bool operator != (MouseButton const& a, MouseButton const& b) { return a.value != b.value; }
00055 
00056         int toValue() { return (int)value; }
00057 
00058     private:
00059         Enum value;
00060     };
00061 
00062     struct MYGUI_EXPORT KeyCode
00063     {
00064         enum Enum
00065         {
00066             None          = 0x00,
00067             Escape          = 0x01,
00068             One             = 0x02,
00069             Two             = 0x03,
00070             Three           = 0x04,
00071             Four            = 0x05,
00072             Five            = 0x06,
00073             Six             = 0x07,
00074             Seven           = 0x08,
00075             Eight           = 0x09,
00076             Nine            = 0x0A,
00077             Zero            = 0x0B,
00078             Minus           = 0x0C,    /* - on main keyboard */
00079             Equals          = 0x0D,
00080             Backspace       = 0x0E,    /* Backspace */
00081             Tab             = 0x0F,
00082             Q               = 0x10,
00083             W               = 0x11,
00084             E               = 0x12,
00085             R               = 0x13,
00086             T               = 0x14,
00087             Y               = 0x15,
00088             U               = 0x16,
00089             I               = 0x17,
00090             O               = 0x18,
00091             P               = 0x19,
00092             LeftBracket     = 0x1A,
00093             RightBracket    = 0x1B,
00094             Return          = 0x1C,    /* Enter on main keyboard */
00095             LeftControl     = 0x1D,
00096             A               = 0x1E,
00097             S               = 0x1F,
00098             D               = 0x20,
00099             F               = 0x21,
00100             G               = 0x22,
00101             H               = 0x23,
00102             J               = 0x24,
00103             K               = 0x25,
00104             L               = 0x26,
00105             Semicolon       = 0x27,
00106             Apostrophe      = 0x28,
00107             Grave           = 0x29,    /* Accent grave ( ~ ) */
00108             LeftShift       = 0x2A,
00109             Backslash       = 0x2B,
00110             Z               = 0x2C,
00111             X               = 0x2D,
00112             C               = 0x2E,
00113             V               = 0x2F,
00114             B               = 0x30,
00115             N               = 0x31,
00116             M               = 0x32,
00117             Comma           = 0x33,
00118             Period          = 0x34,    /* . on main keyboard */
00119             Slash           = 0x35,    /* '/' on main keyboard */
00120             RightShift      = 0x36,
00121             Multiply        = 0x37,    /* * on numeric keypad */
00122             LeftAlt        = 0x38,    /* Left Alt */
00123             Space           = 0x39,
00124             Capital         = 0x3A,
00125             F1              = 0x3B,
00126             F2              = 0x3C,
00127             F3              = 0x3D,
00128             F4              = 0x3E,
00129             F5              = 0x3F,
00130             F6              = 0x40,
00131             F7              = 0x41,
00132             F8              = 0x42,
00133             F9              = 0x43,
00134             F10             = 0x44,
00135             NumLock         = 0x45,
00136             ScrollLock      = 0x46,    /* Scroll Lock */
00137             Numpad7         = 0x47,
00138             Numpad8         = 0x48,
00139             Numpad9         = 0x49,
00140             Subtract        = 0x4A,    /* - on numeric keypad */
00141             Numpad4         = 0x4B,
00142             Numpad5         = 0x4C,
00143             Numpad6         = 0x4D,
00144             Add             = 0x4E,    /* + on numeric keypad */
00145             Numpad1         = 0x4F,
00146             Numpad2         = 0x50,
00147             Numpad3         = 0x51,
00148             Numpad0         = 0x52,
00149             Decimal         = 0x53,    /* . on numeric keypad */
00150             OEM_102         = 0x56,    /* < > | on UK/Germany keyboards */
00151             F11             = 0x57,
00152             F12             = 0x58,
00153             F13             = 0x64,    /*                     (NEC PC98) */
00154             F14             = 0x65,    /*                     (NEC PC98) */
00155             F15             = 0x66,    /*                     (NEC PC98) */
00156             Kana            = 0x70,    /* (Japanese keyboard)            */
00157             ABNT_C1         = 0x73,    /* / ? on Portugese (Brazilian) keyboards */
00158             Convert         = 0x79,    /* (Japanese keyboard)            */
00159             NoConvert       = 0x7B,    /* (Japanese keyboard)            */
00160             Yen             = 0x7D,    /* (Japanese keyboard)            */
00161             ABNT_C2         = 0x7E,    /* Numpad . on Portugese (Brazilian) keyboards */
00162             NumpadEquals    = 0x8D,    /* = on numeric keypad (NEC PC98) */
00163             PrevTrack       = 0x90,    /* Previous Track (KC_CIRCUMFLEX on Japanese keyboard) */
00164             At              = 0x91,    /*                     (NEC PC98) */
00165             Colon           = 0x92,    /*                     (NEC PC98) */
00166             Underline       = 0x93,    /*                     (NEC PC98) */
00167             Kanji           = 0x94,    /* (Japanese keyboard)            */
00168             Stop            = 0x95,    /*                     (NEC PC98) */
00169             AX              = 0x96,    /*                     (Japan AX) */
00170             Unlabeled       = 0x97,    /*                        (J3100) */
00171             NextTrack       = 0x99,    /* Next Track */
00172             NumpadEnter     = 0x9C,    /* Enter on numeric keypad */
00173             RightControl    = 0x9D,
00174             Mute            = 0xA0,
00175             Calculator      = 0xA1,
00176             PlayPause       = 0xA2,    /* Play / Pause */
00177             MediaStop       = 0xA4,    /* Media Stop */
00178             VolumeDown      = 0xAE,    /* Volume - */
00179             VolumeUp        = 0xB0,    /* Volume + */
00180             WebHome         = 0xB2,    /* Web home */
00181             NumpadComma     = 0xB3,    /* , on numeric keypad (NEC PC98) */
00182             Divide          = 0xB5,    /* / on numeric keypad */
00183             SysRq           = 0xB7,
00184             RightAlt        = 0xB8,    /* Right Alt */
00185             Pause           = 0xC5,
00186             Home            = 0xC7,    /* Home on arrow keypad */
00187             ArrowUp         = 0xC8,    /* UpArrow on arrow keypad */
00188             PageUp          = 0xC9,    /* PgUp on arrow keypad */
00189             ArrowLeft       = 0xCB,    /* LeftArrow on arrow keypad */
00190             ArrowRight      = 0xCD,    /* RightArrow on arrow keypad */
00191             End             = 0xCF,    /* End on arrow keypad */
00192             ArrowDown       = 0xD0,    /* DownArrow on arrow keypad */
00193             PageDown        = 0xD1,    /* PgDn on arrow keypad */
00194             Insert          = 0xD2,    /* Insert on arrow keypad */
00195             Delete          = 0xD3,    /* Delete on arrow keypad */
00196             LeftWindows     = 0xDB,    /* Left Windows key */
00197             RightWindow     = 0xDC,    /* Right Windows key */
00198             RightWindows    = 0xDC,    /* Right Windows key - Correct spelling :) */
00199             AppMenu         = 0xDD,    /* AppMenu key */
00200             Power           = 0xDE,    /* System Power */
00201             Sleep           = 0xDF,    /* System Sleep */
00202             Wake            = 0xE3,    /* System Wake */
00203             WebSearch       = 0xE5,
00204             WebFavorites    = 0xE6,
00205             WebRefresh      = 0xE7,
00206             WebStop         = 0xE8,
00207             WebForward      = 0xE9,
00208             WebBack         = 0xEA,
00209             MyComputer      = 0xEB,
00210             Mail            = 0xEC,
00211             MediaSelect     = 0xED
00212         };
00213 
00214         KeyCode(Enum _value = None) : value(_value) { }
00215 
00216         friend bool operator == (KeyCode const& a, KeyCode const& b) { return a.value == b.value; }
00217         friend bool operator != (KeyCode const& a, KeyCode const& b) { return a.value != b.value; }
00218 
00219         int toValue() { return (int)value; }
00220 
00221     private:
00222         Enum value;
00223     };
00224 
00225 } // namespace MyGUI
00226 
00227 #endif // __MYGUI_INPUT_DEFINE_H__

Generated on Sun Jan 30 2011 for MyGUI by  doxygen 1.7.1