Public Member Functions | |
| CKeyManager (bool autoDelete=false) | |
| Constructor. | |
| ~CKeyManager () | |
| Destructor. | |
| virtual BOOL | OnKeyDown (CGrid &grid, UINT nChar, UINT nRepCnt, UINT nFlags) |
| Called when a non-system key is pressed. | |
| virtual BOOL | OnKeyUp (CGrid &grid, UINT nChar, UINT nRepCnt, UINT nFlags) |
| Called when a non-system key is released. | |
| virtual void | NavigateKeyUp (CGrid &grid, bool bShift, bool bCtrl) |
| Moves the focus up and scrolls down one line according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | NavigateKeyDown (CGrid &grid, bool bShift, bool bCtrl) |
| Moves the focus down and scrolls up one line according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | NavigateKeyPageUp (CGrid &grid, bool bShift, bool bCtrl) |
| Moves the focus up and scrolls down one page according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | NavigateKeyPageDown (CGrid &grid, bool bShift, bool bCtrl) |
| Moves the focus down and scrolls up one page according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | NavigateKeyHome (CGrid &grid, bool bShift, bool bCtrl) |
| Focuses the first line in the fixed or scrollable context according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | NavigateKeyEnd (CGrid &grid, bool bShift, bool bCtrl) |
| Focuses the last line in the fixed or scrollable context according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | NavigateKeyLeft (CGrid &grid, bool bShift, bool bCtrl) |
| Collapses lines and Moves the focus up according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | NavigateKeyRight (CGrid &grid, bool bShift, bool bCtrl) |
| Expands lines and Moves the focus down according to specified values of bShift and bCtrl and navigation settings. | |
| virtual void | OnEscape (CGrid &grid) |
| Handles 'Escape' key pressing. | |
| virtual void | OnReturn (CGrid &grid) |
| Handles 'Return' key pressing. | |
| virtual void | OnSelectAll (CGrid &grid) |
| Handles 'Ctri+A' key pressing. Selects all contents of the grid. | |
| virtual void | OnCopySelection (CGrid &grid) |
| Handles 'Ctri+C' key pressing. Copies selection to the clipboard. | |
| virtual void | OnCutSelection (CGrid &grid) |
| Handles 'Ctri+X' key pressing. Cuts selection to the clipboard. | |
| virtual void | OnPasteSelection (CGrid &grid) |
| Handles 'Ctri+V' key pressing. Copies clipboard content to the grid. | |
| virtual bool | AutoDelete () const |
| IAutoDelete implementation. Returns the value, passed in the constructor. | |
The given manager processes the following events:
Pressing Shift key together with KeyUp KeyDown inverts selection multiple lines. The manager can be used for navigation and selection in either one or both contexts.
| CKeyManager | ( | bool | autoDelete = false |
) |
| BOOL OnKeyDown | ( | CGrid & | grid, | |
| UINT | nChar, | |||
| UINT | nRepCnt, | |||
| UINT | nFlags | |||
| ) | [virtual] |
Called when a non-system key is pressed.
| [in] | grid | The grid. |
| [in] | nChar | Specifies a virtual key code of a given key. For a list of standard virtual key codes, see Winuser.h |
| [in] | nRepCnt | Repeat a count (a number of times the keystroke is repeated as a result of the user holding down the key). |
| [in] | nFlags | Specifies a scan code, key-transition code, previous key state, and context code. |
Implements IKeyManager.
| BOOL OnKeyUp | ( | CGrid & | grid, | |
| UINT | nChar, | |||
| UINT | nRepCnt, | |||
| UINT | nFlags | |||
| ) | [virtual] |
Called when a non-system key is released.
| [in] | grid | The grid. |
| [in] | nChar | Specifies a virtual key code of a given key. For a list of standard virtual key codes, see Winuser.h |
| [in] | nRepCnt | Repeat a count (a number of times the keystroke is repeated as a result of the user holding down the key). |
| [in] | nFlags | Specifies a scan code, key-transition code, previous key state, and context code. |
Implements IKeyManager.
| void NavigateKeyUp | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Moves the focus up and scrolls down one line according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void NavigateKeyDown | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Moves the focus down and scrolls up one line according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void NavigateKeyPageUp | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Moves the focus up and scrolls down one page according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void NavigateKeyPageDown | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Moves the focus down and scrolls up one page according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void NavigateKeyHome | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Focuses the first line in the fixed or scrollable context according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void NavigateKeyEnd | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Focuses the last line in the fixed or scrollable context according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void NavigateKeyLeft | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Collapses lines and Moves the focus up according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void NavigateKeyRight | ( | CGrid & | grid, | |
| bool | bShift, | |||
| bool | bCtrl | |||
| ) | [virtual] |
Expands lines and Moves the focus down according to specified values of bShift and bCtrl and navigation settings.
| [in] | grid | The grid where a focus and selection are changed. |
| [in] | bShift | Indicates whether the shift button is pressed |
| [in] | bCtrl | Indicates whether the control button is pressed |
Implements IKeyManager.
| void OnEscape | ( | CGrid & | grid | ) | [virtual] |
Handles 'Escape' key pressing.
| [in] | grid | The grid |
| void OnReturn | ( | CGrid & | grid | ) | [virtual] |
Handles 'Return' key pressing.
Collapses or expandes a focused line.
| [in] | grid | The grid |
| void OnSelectAll | ( | CGrid & | grid | ) | [virtual] |
Handles 'Ctri+A' key pressing. Selects all contents of the grid.
Calls CGrid::SelectAll() function.
| [in] | grid | The grid |
| void OnCopySelection | ( | CGrid & | grid | ) | [virtual] |
Handles 'Ctri+C' key pressing. Copies selection to the clipboard.
Calls CGrid::Copy() function.
| [in] | grid | The grid |
| void OnCutSelection | ( | CGrid & | grid | ) | [virtual] |
Handles 'Ctri+X' key pressing. Cuts selection to the clipboard.
Calls CGrid::Cut() function.
| [in] | grid | The grid |
| void OnPasteSelection | ( | CGrid & | grid | ) | [virtual] |
Handles 'Ctri+V' key pressing. Copies clipboard content to the grid.
Calls CGrid::Paste() function.
| [in] | grid | The grid |
| bool AutoDelete | ( | ) | const [virtual] |
IAutoDelete implementation. Returns the value, passed in the constructor.
Implements IAutoDelete.
| Copyright Dapfor 2007-2009 | Generated on Wed Jul 7 03:24:43 2010 for MFCGrid by 1.5.5 |