1. wxTextCtrl::Replace() does work now - added many tests for it in univ sample
2. extracted wxCommand and wxCommandProcessor to separate files 3. fixed bug in wxStringTokenizer with strings consisting of sole delimiter 4. implemented (but untested) undo/redo for text ctrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/wxUNIVERSAL@8698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
#endif
|
||||
|
||||
class WXDLLEXPORT wxCaret;
|
||||
class WXDLLEXPORT wxTextCtrlCommandProcessor;
|
||||
|
||||
#include "wx/scrolwin.h" // for wxScrollHelper
|
||||
|
||||
@@ -25,6 +26,9 @@ class WXDLLEXPORT wxCaret;
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// cursor movement and also selection and delete operations
|
||||
#define wxACTION_TEXT_GOTO _T("goto") // to pos in numArg
|
||||
#define wxACTION_TEXT_FIRST _T("first") // go to pos 0
|
||||
#define wxACTION_TEXT_LAST _T("last") // go to last pos
|
||||
#define wxACTION_TEXT_HOME _T("home")
|
||||
#define wxACTION_TEXT_END _T("end")
|
||||
#define wxACTION_TEXT_LEFT _T("left")
|
||||
@@ -56,6 +60,10 @@ class WXDLLEXPORT wxCaret;
|
||||
#define wxACTION_TEXT_SEL_WORD _T("wordsel")
|
||||
#define wxACTION_TEXT_SEL_LINE _T("linesel")
|
||||
|
||||
// undo or redo
|
||||
#define wxACTION_TEXT_UNDO _T("undo")
|
||||
#define wxACTION_TEXT_REDO _T("redo")
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxTextCtrl::HitTest return values
|
||||
// ----------------------------------------------------------------------------
|
||||
@@ -102,6 +110,8 @@ public:
|
||||
const wxValidator& validator = wxDefaultValidator,
|
||||
const wxString& name = wxTextCtrlNameStr);
|
||||
|
||||
virtual ~wxTextCtrl();
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
|
||||
@@ -332,6 +342,11 @@ protected:
|
||||
m_value = value;
|
||||
}
|
||||
|
||||
// clipboard operations (unlike the versions without Do prefix, they have a
|
||||
// return code)
|
||||
bool DoCut();
|
||||
bool DoPaste();
|
||||
|
||||
private:
|
||||
// update the scrollbars (only called from OnIdle)
|
||||
void UpdateScrollbars();
|
||||
@@ -390,6 +405,9 @@ private:
|
||||
// the max line length in pixels
|
||||
wxCoord m_widthMax;
|
||||
|
||||
// the object to which we delegate our undo/redo implementation
|
||||
wxTextCtrlCommandProcessor *m_cmdProcessor;
|
||||
|
||||
DECLARE_EVENT_TABLE()
|
||||
DECLARE_DYNAMIC_CLASS(wxTextCtrl)
|
||||
};
|
||||
|
Reference in New Issue
Block a user