HotKey Control.
More...
#include <SHotKeyCtrl.h>
|
| SHotKeyCtrl (void) |
| Constructor.
|
|
virtual | ~SHotKeyCtrl (void) |
| Destructor.
|
|
void | SetRule (WORD wInvalidComp, WORD wModifier) OVERRIDE |
| Set the rules for invalid combinations and modifiers.
|
|
void | SetHotKey (WORD wKey, WORD wModifiers) OVERRIDE |
| Set the hotkey.
|
|
void | GetHotKey (WORD *wKey, WORD *wModifiers) SCONST OVERRIDE |
| Get the hotkey.
|
|
virtual SStringT | GetWindowText (BOOL bRawText=FALSE) |
| Get the window text.
|
|
| SAccelerator (DWORD dwAccel) |
| Constructor.
|
|
| SAccelerator (WORD vKey=0, bool bCtrl=false, bool bAlt=false, bool bShift=false) |
| Constructor.
|
|
| ~SAccelerator (void) |
| Destructor.
|
|
WORD | GetModifier () SCONST OVERRIDE |
| Gets the modifier keys.
|
|
WORD | GetKey () SCONST OVERRIDE |
| Gets the key value.
|
|
DWORD | GetAcc () SCONST OVERRIDE |
| Gets the accelerator key value.
|
|
SStringT | FormatHotkey () |
| Formats the accelerator key as a string.
|
|
|
virtual UINT WINAPI | OnGetDlgCode () const |
| Get the dialog code.
|
|
void | OnLButtonDown (UINT nFlags, CPoint pt) |
| Handle left mouse button down event.
|
|
void | OnPaint (IRenderTarget *pRT) |
| Paint the control.
|
|
void | OnSetFocus (SWND wndOld) |
| Handle set focus event.
|
|
void | OnKillFocus (SWND wndFocus) |
| Handle kill focus event.
|
|
void | OnKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) |
| Handle key down event.
|
|
void | OnKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags) |
| Handle key up event.
|
|
void | OnSysKeyDown (UINT nChar, UINT nRepCnt, UINT nFlags) |
| Handle system key down event.
|
|
void | OnSysKeyUp (UINT nChar, UINT nRepCnt, UINT nFlags) |
| Handle system key up event.
|
|
void | UpdateModifier () |
| Update the modifier keys.
|
|
void | UpdateCaret (IRenderTarget *pRT) |
| Update the caret position.
|
|
UINT | GetTextAlign () |
| Get the text alignment.
|
|
HRESULT | OnAttrInvalidComb (const SStringW &value, BOOL bLoading) |
| Handle custom attribute "invalidComb".
|
|
HRESULT | OnAttrInvalidSysKey (const SStringW &value, BOOL bLoading) |
| Handle custom attribute "invalidSysKey".
|
|
HRESULT | OnAttrInvalidModifier (const SStringW &value, BOOL bLoading) |
| Handle custom attribute "invalidModifier".
|
|
HRESULT | OnAttrHotKey (const SStringW &value, BOOL bLoading) |
| Handle custom attribute "hotKey".
|
|
virtual HRESULT | SetAttribute (const SNS::SStringW &amp;amp;amp;strAttribName, const SNS::SStringW &amp;amp;amp;strValue, BOOL bLoading=FALSE) |
|
|
static WORD | VkFromString (LPCTSTR pszKey) |
| Converts a string to a virtual key code.
|
|
static SStringT | GetKeyName (WORD vk) |
| Converts a virtual key code to its string representation.
|
|
static SStringT | FormatAccelKey (DWORD dwAccel) |
| Formats an accelerator key as a string.
|
|
static DWORD | TranslateAccelKey (LPCTSTR pszKeyName) |
| Translates a string to an accelerator key value.
|
|
HotKey Control.
A control for setting and displaying hotkeys.
Definition at line 16 of file SHotKeyCtrl.h.
◆ SHotKeyCtrl()
SNSBEGIN SHotKeyCtrl::SHotKeyCtrl |
( |
void | | ) |
|
◆ ~SHotKeyCtrl()
SHotKeyCtrl::~SHotKeyCtrl |
( |
void | | ) |
|
|
virtual |
◆ GetHotKey()
void SHotKeyCtrl::GetHotKey |
( |
WORD * | wKey, |
|
|
WORD * | wModifiers ) |
Get the hotkey.
- Parameters
-
wKey | Output key code |
wModifiers | Output modifier flags |
Definition at line 208 of file SHotKeyCtrl.cpp.
◆ GetTextAlign()
UINT SHotKeyCtrl::GetTextAlign |
( |
| ) |
|
|
protected |
Get the text alignment.
- Returns
- Text alignment
Definition at line 57 of file SHotKeyCtrl.cpp.
◆ GetWindowText()
SStringT SHotKeyCtrl::GetWindowText |
( |
BOOL | bRawText = FALSE | ) |
|
|
virtual |
Get the window text.
- Parameters
-
bRawText | Whether to get raw text |
- Returns
- Window text
Reimplemented from SWindow.
Definition at line 216 of file SHotKeyCtrl.cpp.
◆ OnAttrHotKey()
HRESULT SHotKeyCtrl::OnAttrHotKey |
( |
const SStringW & | value, |
|
|
BOOL | bLoading ) |
|
protected |
Handle custom attribute "hotKey".
- Parameters
-
value | Attribute value |
bLoading | Loading flag |
- Returns
- HRESULT
Definition at line 286 of file SHotKeyCtrl.cpp.
◆ OnAttrInvalidComb()
HRESULT SHotKeyCtrl::OnAttrInvalidComb |
( |
const SStringW & | value, |
|
|
BOOL | bLoading ) |
|
protected |
Handle custom attribute "invalidComb".
- Parameters
-
value | Attribute value |
bLoading | Loading flag |
- Returns
- HRESULT
Definition at line 221 of file SHotKeyCtrl.cpp.
◆ OnAttrInvalidModifier()
HRESULT SHotKeyCtrl::OnAttrInvalidModifier |
( |
const SStringW & | value, |
|
|
BOOL | bLoading ) |
|
protected |
Handle custom attribute "invalidModifier".
- Parameters
-
value | Attribute value |
bLoading | Loading flag |
- Returns
- HRESULT
Definition at line 279 of file SHotKeyCtrl.cpp.
◆ OnAttrInvalidSysKey()
HRESULT SHotKeyCtrl::OnAttrInvalidSysKey |
( |
const SStringW & | value, |
|
|
BOOL | bLoading ) |
|
protected |
Handle custom attribute "invalidSysKey".
- Parameters
-
value | Attribute value |
bLoading | Loading flag |
- Returns
- HRESULT
Definition at line 256 of file SHotKeyCtrl.cpp.
◆ OnGetDlgCode()
virtual UINT WINAPI SHotKeyCtrl::OnGetDlgCode |
( |
| ) |
const |
|
inlineprotectedvirtual |
Get the dialog code.
- Returns
- Dialog code
This function is a message handler.
Definition at line 76 of file SHotKeyCtrl.h.
◆ OnKeyDown()
void SHotKeyCtrl::OnKeyDown |
( |
UINT | nChar, |
|
|
UINT | nRepCnt, |
|
|
UINT | nFlags ) |
|
protected |
Handle key down event.
- Parameters
-
nChar | Key code |
nRepCnt | Repeat count |
nFlags | Flags |
This function is a message handler.
Definition at line 126 of file SHotKeyCtrl.cpp.
◆ OnKeyUp()
void SHotKeyCtrl::OnKeyUp |
( |
UINT | nChar, |
|
|
UINT | nRepCnt, |
|
|
UINT | nFlags ) |
|
protected |
Handle key up event.
- Parameters
-
nChar | Key code |
nRepCnt | Repeat count |
nFlags | Flags |
This function is a message handler.
Definition at line 147 of file SHotKeyCtrl.cpp.
◆ OnKillFocus()
void SHotKeyCtrl::OnKillFocus |
( |
SWND | wndFocus | ) |
|
|
protected |
Handle kill focus event.
- Parameters
-
wndFocus | New focus window handle |
This function is a message handler.
Definition at line 84 of file SHotKeyCtrl.cpp.
◆ OnLButtonDown()
void SHotKeyCtrl::OnLButtonDown |
( |
UINT | nFlags, |
|
|
CPoint | pt ) |
|
protected |
Handle left mouse button down event.
- Parameters
-
nFlags | Flags |
pt | Mouse coordinates |
This function is a message handler.
Definition at line 19 of file SHotKeyCtrl.cpp.
◆ OnPaint()
Paint the control.
- Parameters
-
pRT | Rendering target handle |
This function is a message handler.
Definition at line 25 of file SHotKeyCtrl.cpp.
◆ OnSetFocus()
void SHotKeyCtrl::OnSetFocus |
( |
SWND | wndOld | ) |
|
|
protected |
Handle set focus event.
- Parameters
-
wndOld | Previous focus window handle |
This function is a message handler.
Definition at line 65 of file SHotKeyCtrl.cpp.
◆ OnSysKeyDown()
void SHotKeyCtrl::OnSysKeyDown |
( |
UINT | nChar, |
|
|
UINT | nRepCnt, |
|
|
UINT | nFlags ) |
|
protected |
Handle system key down event.
- Parameters
-
nChar | Key code |
nRepCnt | Repeat count |
nFlags | Flags |
This function is a message handler.
Definition at line 175 of file SHotKeyCtrl.cpp.
◆ OnSysKeyUp()
void SHotKeyCtrl::OnSysKeyUp |
( |
UINT | nChar, |
|
|
UINT | nRepCnt, |
|
|
UINT | nFlags ) |
|
protected |
Handle system key up event.
- Parameters
-
nChar | Key code |
nRepCnt | Repeat count |
nFlags | Flags |
This function is a message handler.
Definition at line 183 of file SHotKeyCtrl.cpp.
◆ SetAttribute()
virtual HRESULT SHotKeyCtrl::SetAttribute |
( |
const SNS::SStringW &amp;amp;amp; | strAttribName, |
|
|
const SNS::SStringW &amp;amp;amp; | strValue, |
|
|
BOOL | bLoading = FALSE ) |
|
inlineprotectedvirtual |
◆ SetHotKey()
void SHotKeyCtrl::SetHotKey |
( |
WORD | wKey, |
|
|
WORD | wModifiers ) |
Set the hotkey.
- Parameters
-
wKey | Key code |
wModifiers | Modifier flags |
Definition at line 197 of file SHotKeyCtrl.cpp.
◆ SetRule()
void SHotKeyCtrl::SetRule |
( |
WORD | wInvalidComp, |
|
|
WORD | wModifier ) |
Set the rules for invalid combinations and modifiers.
- Parameters
-
wInvalidComp | Invalid combination flags |
wModifier | Modifier flags |
Definition at line 191 of file SHotKeyCtrl.cpp.
◆ UpdateCaret()
Update the caret position.
- Parameters
-
pRT | Rendering target handle |
Definition at line 37 of file SHotKeyCtrl.cpp.
◆ UpdateModifier()
void SHotKeyCtrl::UpdateModifier |
( |
| ) |
|
|
protected |
◆ m_bInSetting
BOOL SHotKeyCtrl::m_bInSetting |
|
protected |
Flag indicating if the control is being set
Definition at line 217 of file SHotKeyCtrl.h.
◆ m_wInvalidComb
WORD SHotKeyCtrl::m_wInvalidComb |
|
protected |
Flags for invalid key combinations
Definition at line 215 of file SHotKeyCtrl.h.
◆ m_wInvalidModifier
WORD SHotKeyCtrl::m_wInvalidModifier |
|
protected |
Replacement modifiers for invalid combinations
Definition at line 216 of file SHotKeyCtrl.h.
The documentation for this class was generated from the following files: