Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:59

0001 // Copyright (c) 2016-2019 OPEN CASCADE SAS
0002 //
0003 // This file is part of Open CASCADE Technology software library.
0004 //
0005 // This library is free software; you can redistribute it and/or modify it under
0006 // the terms of the GNU Lesser General Public License version 2.1 as published
0007 // by the Free Software Foundation, with special exception defined in the file
0008 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0009 // distribution for complete text of the license and disclaimer of any warranty.
0010 //
0011 // Alternatively, this file may be used under the terms of Open CASCADE
0012 // commercial license or contractual agreement.
0013 
0014 #ifndef _Aspect_VKey_HeaderFile
0015 #define _Aspect_VKey_HeaderFile
0016 
0017 #include <Aspect_VKeyFlags.hxx>
0018 
0019 //! Define virtual key as integer number to allow extensions.
0020 typedef unsigned int Aspect_VKey;
0021 
0022 //! Enumeration defining virtual keys irrelevant to current keyboard layout for simplified hot-keys management logic.
0023 enum Aspect_VKeyBasic
0024 {
0025   Aspect_VKey_UNKNOWN = 0,
0026 
0027   // main latin alphabet keys
0028   Aspect_VKey_A = 1,
0029   Aspect_VKey_B,
0030   Aspect_VKey_C,
0031   Aspect_VKey_D,
0032   Aspect_VKey_E,
0033   Aspect_VKey_F,
0034   Aspect_VKey_G,
0035   Aspect_VKey_H,
0036   Aspect_VKey_I,
0037   Aspect_VKey_J,
0038   Aspect_VKey_K,
0039   Aspect_VKey_L,
0040   Aspect_VKey_M,
0041   Aspect_VKey_N,
0042   Aspect_VKey_O,
0043   Aspect_VKey_P,
0044   Aspect_VKey_Q,
0045   Aspect_VKey_R,
0046   Aspect_VKey_S,
0047   Aspect_VKey_T,
0048   Aspect_VKey_U,
0049   Aspect_VKey_V,
0050   Aspect_VKey_W,
0051   Aspect_VKey_X,
0052   Aspect_VKey_Y,
0053   Aspect_VKey_Z,
0054 
0055   Aspect_VKey_0,
0056   Aspect_VKey_1,
0057   Aspect_VKey_2,
0058   Aspect_VKey_3,
0059   Aspect_VKey_4,
0060   Aspect_VKey_5,
0061   Aspect_VKey_6,
0062   Aspect_VKey_7,
0063   Aspect_VKey_8,
0064   Aspect_VKey_9,
0065 
0066   Aspect_VKey_F1,
0067   Aspect_VKey_F2,
0068   Aspect_VKey_F3,
0069   Aspect_VKey_F4,
0070   Aspect_VKey_F5,
0071   Aspect_VKey_F6,
0072   Aspect_VKey_F7,
0073   Aspect_VKey_F8,
0074   Aspect_VKey_F9,
0075   Aspect_VKey_F10,
0076   Aspect_VKey_F11,
0077   Aspect_VKey_F12,
0078 
0079   // standard keys
0080   Aspect_VKey_Up,
0081   Aspect_VKey_Down,
0082   Aspect_VKey_Left,
0083   Aspect_VKey_Right,
0084   Aspect_VKey_Plus,         //!< '+'
0085   Aspect_VKey_Minus,        //!< '-'
0086   Aspect_VKey_Equal,        //!< '=+'
0087   Aspect_VKey_PageUp,
0088   Aspect_VKey_PageDown,
0089   Aspect_VKey_Home,
0090   Aspect_VKey_End,
0091   Aspect_VKey_Escape,
0092   Aspect_VKey_Back,
0093   Aspect_VKey_Enter,
0094   Aspect_VKey_Backspace,
0095   Aspect_VKey_Space,
0096   Aspect_VKey_Delete,
0097   Aspect_VKey_Tilde,
0098   Aspect_VKey_Tab,
0099   Aspect_VKey_Comma,        //!< ','
0100   Aspect_VKey_Period,       //!< '.'
0101   Aspect_VKey_Semicolon,    //!< ';:'
0102   Aspect_VKey_Slash,        //!< '/?'
0103   Aspect_VKey_BracketLeft,  //!< '[{'
0104   Aspect_VKey_Backslash,    //!< '\|'
0105   Aspect_VKey_BracketRight, //!< ']}'
0106   Aspect_VKey_Apostrophe,   //!< ''"'
0107   Aspect_VKey_Numlock,      //!< Num Lock key
0108   Aspect_VKey_Scroll,       //!< Scroll Lock key
0109 
0110   // numpad keys
0111   Aspect_VKey_Numpad0,
0112   Aspect_VKey_Numpad1,
0113   Aspect_VKey_Numpad2,
0114   Aspect_VKey_Numpad3,
0115   Aspect_VKey_Numpad4,
0116   Aspect_VKey_Numpad5,
0117   Aspect_VKey_Numpad6,
0118   Aspect_VKey_Numpad7,
0119   Aspect_VKey_Numpad8,
0120   Aspect_VKey_Numpad9,
0121   Aspect_VKey_NumpadMultiply, //!< numpad '*'
0122   Aspect_VKey_NumpadAdd,      //!< numpad '+'
0123   Aspect_VKey_NumpadSubtract, //!< numpad '-'
0124   Aspect_VKey_NumpadDivide,   //!< numpad '/'
0125 
0126   // Multimedia keys
0127   Aspect_VKey_MediaNextTrack,
0128   Aspect_VKey_MediaPreviousTrack,
0129   Aspect_VKey_MediaStop,
0130   Aspect_VKey_MediaPlayPause,
0131   Aspect_VKey_VolumeMute,
0132   Aspect_VKey_VolumeDown,
0133   Aspect_VKey_VolumeUp,
0134   Aspect_VKey_BrowserBack,
0135   Aspect_VKey_BrowserForward,
0136   Aspect_VKey_BrowserRefresh,
0137   Aspect_VKey_BrowserStop,
0138   Aspect_VKey_BrowserSearch,
0139   Aspect_VKey_BrowserFavorites,
0140   Aspect_VKey_BrowserHome,
0141 
0142   // 3d view keys
0143   Aspect_VKey_ViewTop,
0144   Aspect_VKey_ViewBottom,
0145   Aspect_VKey_ViewLeft,
0146   Aspect_VKey_ViewRight,
0147   Aspect_VKey_ViewFront,
0148   Aspect_VKey_ViewBack,
0149   Aspect_VKey_ViewAxoLeftProj,
0150   Aspect_VKey_ViewAxoRightProj,
0151   Aspect_VKey_ViewFitAll,
0152   Aspect_VKey_ViewRoll90CW,
0153   Aspect_VKey_ViewRoll90CCW,
0154   Aspect_VKey_ViewSwitchRotate,
0155 
0156   // modifier keys, @sa Aspect_VKey_ModifiersLower and Aspect_VKey_ModifiersUpper below
0157   Aspect_VKey_Shift,
0158   Aspect_VKey_Control,
0159   Aspect_VKey_Alt,
0160   Aspect_VKey_Menu,
0161   Aspect_VKey_Meta,
0162 
0163   // virtual navigation keys, @sa Aspect_VKey_NavigationKeysLower and Aspect_VKey_NavigationKeysUpper below
0164   Aspect_VKey_NavInteract,         //!< interact
0165   Aspect_VKey_NavForward,          //!< go forward
0166   Aspect_VKey_NavBackward,         //!< go backward
0167   Aspect_VKey_NavSlideLeft,        //!< sidewalk, left
0168   Aspect_VKey_NavSlideRight,       //!< sidewalk, right
0169   Aspect_VKey_NavSlideUp,          //!< lift up
0170   Aspect_VKey_NavSlideDown,        //!< fall down
0171   Aspect_VKey_NavRollCCW,          //!< bank left  (roll counter-clockwise)
0172   Aspect_VKey_NavRollCW,           //!< bank right (roll clockwise)
0173   Aspect_VKey_NavLookLeft,         //!< look left  (yaw counter-clockwise)
0174   Aspect_VKey_NavLookRight,        //!< look right (yaw clockwise)
0175   Aspect_VKey_NavLookUp,           //!< look up    (pitch clockwise)
0176   Aspect_VKey_NavLookDown,         //!< look down  (pitch counter-clockwise)
0177   Aspect_VKey_NavCrouch,           //!< crouch walking
0178   Aspect_VKey_NavJump,             //!< jump
0179   Aspect_VKey_NavThrustForward,    //!< increase continuous velocity in forward  direction
0180   Aspect_VKey_NavThrustBackward,   //!< increase continuous velocity in reversed direction
0181   Aspect_VKey_NavThrustStop,       //!< reset continuous velocity
0182   Aspect_VKey_NavSpeedIncrease,    //!< increase navigation speed
0183   Aspect_VKey_NavSpeedDecrease,    //!< decrease navigation speed
0184 };
0185 
0186 //! Auxiliary ranges.
0187 enum
0188 {
0189   Aspect_VKey_Lower = 0,
0190   Aspect_VKey_ModifiersLower      = Aspect_VKey_Shift,
0191   Aspect_VKey_ModifiersUpper      = Aspect_VKey_Meta,
0192   Aspect_VKey_NavigationKeysLower = Aspect_VKey_NavInteract,
0193   Aspect_VKey_NavigationKeysUpper = Aspect_VKey_NavSpeedDecrease,
0194   Aspect_VKey_Upper = Aspect_VKey_NavSpeedDecrease,
0195   Aspect_VKey_NB  = Aspect_VKey_Upper - Aspect_VKey_Lower + 1,
0196   Aspect_VKey_MAX = 255
0197 };
0198 
0199 //! Return modifier flags for specified modifier key.
0200 inline Aspect_VKeyFlags Aspect_VKey2Modifier (Aspect_VKey theKey)
0201 {
0202   switch (theKey)
0203   {
0204     case Aspect_VKey_Shift:   return Aspect_VKeyFlags_SHIFT;
0205     case Aspect_VKey_Control: return Aspect_VKeyFlags_CTRL;
0206     case Aspect_VKey_Alt:     return Aspect_VKeyFlags_ALT;
0207     case Aspect_VKey_Menu:    return Aspect_VKeyFlags_MENU;
0208     case Aspect_VKey_Meta:    return Aspect_VKeyFlags_META;
0209     default:                  return 0;
0210   }
0211 }
0212 
0213 #endif // _Aspect_VKey_HeaderFile