1. wxKeyEvent::GetKeyCode() and HasModifiers() added and documented

2. wxGridCellEditor::IsAcceptedKey() added and implemented
3. no changes in other files (but cvs wants to commit them)


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7626 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-06-21 09:15:59 +00:00
parent 3ffdc4cfeb
commit 7669ba3c67
6 changed files with 241 additions and 70 deletions

View File

@@ -328,9 +328,18 @@ public:
// Reset the value in the control back to its starting value
virtual void Reset() = 0;
// If the editor is enabled by pressing keys on the grid,
// this will be called to let the editor do something about
// that first key if desired.
// return TRUE to allow the given key to start editing: the base class
// version only checks that the event has no modifiers. The derived
// classes are supposed to do "if ( base::IsAcceptedKey() && ... )" in
// their IsAcceptedKey() implementation, although, of course, it is not a
// mandatory requirment.
//
// NB: if the key is F2 (special), editing will always start and this
// method will not be called at all (but StartingKey() will)
virtual bool IsAcceptedKey(wxKeyEvent& event);
// If the editor is enabled by pressing keys on the grid, this will be
// called to let the editor do something about that first key if desired
virtual void StartingKey(wxKeyEvent& event);
// if the editor is enabled by clicking on the cell, this method will be
@@ -379,6 +388,7 @@ public:
virtual void PaintBackground(const wxRect& rectCell, wxGridCellAttr *attr);
virtual bool IsAcceptedKey(wxKeyEvent& event);
virtual void BeginEdit(int row, int col, wxGrid* grid);
virtual bool EndEdit(int row, int col, wxGrid* grid);
@@ -416,6 +426,7 @@ public:
wxWindowID id,
wxEvtHandler* evtHandler);
virtual bool IsAcceptedKey(wxKeyEvent& event);
virtual void BeginEdit(int row, int col, wxGrid* grid);
virtual bool EndEdit(int row, int col, wxGrid* grid);
@@ -455,6 +466,7 @@ public:
wxWindowID id,
wxEvtHandler* evtHandler);
virtual bool IsAcceptedKey(wxKeyEvent& event);
virtual void BeginEdit(int row, int col, wxGrid* grid);
virtual bool EndEdit(int row, int col, wxGrid* grid);
@@ -488,6 +500,7 @@ public:
virtual void SetSize(const wxRect& rect);
virtual void Show(bool show, wxGridCellAttr *attr = (wxGridCellAttr *)NULL);
virtual bool IsAcceptedKey(wxKeyEvent& event);
virtual void BeginEdit(int row, int col, wxGrid* grid);
virtual bool EndEdit(int row, int col, wxGrid* grid);