Changeset 81125 in vbox for trunk/src/VBox
- Timestamp:
- Oct 7, 2019 10:21:24 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 133754
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/softkeyboard/UISoftKeyboard.cpp
r81121 r81125 96 96 KeyboardColorType_Pressed, 97 97 KeyboardColorType_Max 98 }; 99 100 enum KeyboardRegion 101 { 102 KeyboardRegion_Main = 0, 103 KeyboardRegion_NumPad, 104 KeyboardRegion_Multimedia, 105 KeyboardRegion_OSMenu, 106 KeyboardRegion_Max 98 107 }; 99 108 … … 349 358 KeyType type() const; 350 359 351 void setIsNumPadKey(bool fIsNumPadKey); 352 bool isNumPadKey() const; 353 354 void setIsOSMenuKey(bool fIsOSMenuKey); 355 bool isOSMenuKey() const; 360 KeyboardRegion keyboardRegion() const; 361 void setKeyboardRegion(KeyboardRegion enmRegion); 356 362 357 363 void setCutout(int iCorner, int iWidth, int iHeight); … … 408 414 LONG m_iUsageId; 409 415 LONG m_iUsagePage; 410 bool m_fIsNumPadKey; 411 bool m_fIsOSMenuKey; 416 KeyboardRegion m_enmKeyboardRegion; 412 417 }; 413 418 … … 1433 1438 , m_iPosition(0) 1434 1439 , m_pParentWidget(0) 1435 , m_fIsNumPadKey(false) 1436 , m_fIsOSMenuKey(false) 1437 1440 , m_enmKeyboardRegion(KeyboardRegion_Main) 1438 1441 { 1439 1442 } … … 1535 1538 } 1536 1539 1537 void UISoftKeyboardKey::setIsNumPadKey(bool fIsNumPadKey) 1538 { 1539 m_fIsNumPadKey = fIsNumPadKey; 1540 } 1541 1542 bool UISoftKeyboardKey::isNumPadKey() const 1543 { 1544 return m_fIsNumPadKey; 1545 } 1546 1547 void UISoftKeyboardKey::setIsOSMenuKey(bool fIsOSMenuKey) 1548 { 1549 m_fIsOSMenuKey = fIsOSMenuKey; 1550 } 1551 1552 bool UISoftKeyboardKey::isOSMenuKey() const 1553 { 1554 return m_fIsOSMenuKey; 1540 KeyboardRegion UISoftKeyboardKey::keyboardRegion() const 1541 { 1542 return m_enmKeyboardRegion; 1543 } 1544 1545 void UISoftKeyboardKey::setKeyboardRegion(KeyboardRegion enmRegion) 1546 { 1547 m_enmKeyboardRegion = enmRegion; 1555 1548 } 1556 1549 … … 2096 2089 { 2097 2090 UISoftKeyboardKey &key = keys[j]; 2098 if (m_fHideOSMenuKeys && key. isOSMenuKey())2091 if (m_fHideOSMenuKeys && key.keyboardRegion() == KeyboardRegion_OSMenu) 2099 2092 continue; 2100 2093 2101 if (m_fHideNumPad && key.isNumPadKey())2094 if (m_fHideNumPad && key.keyboardRegion() == KeyboardRegion_NumPad) 2102 2095 continue; 2103 2096 … … 2647 2640 for (int j = 0; j < row.keys().size(); ++j) 2648 2641 { 2649 row.keys()[j].set IsNumPadKey(true);2642 row.keys()[j].setKeyboardRegion(KeyboardRegion_NumPad); 2650 2643 } 2651 2644 } 2652 2645 return true; 2653 2646 } 2654 2647 /* Go thru all the keys row by row and construct their geometries: */ 2655 2648 int iY = m_iTopMargin; 2656 2649 int iMaxWidth = 0; … … 2694 2687 iX += (m_iXSpacing + key.spaceWidthAfter()); 2695 2688 2696 if ( !key.isNumPadKey())2689 if (key.keyboardRegion() != KeyboardRegion_NumPad) 2697 2690 { 2698 2691 iXNoNumPad += key.width(); … … 3062 3055 { 3063 3056 if (m_xmlReader.readElementText() == "true") 3064 key.set IsOSMenuKey(true);3057 key.setKeyboardRegion(KeyboardRegion_OSMenu); 3065 3058 } 3066 3059 else
Note:
See TracChangeset
for help on using the changeset viewer.