X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad0bae85d8aa925f3e598d489efd96f25d4e75f5..15678bec37c6e3cb8a67a8b041579af595d4ccf3:/include/wx/textctrl.h diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index f70f125f4c..d0b8ad3ff7 100644 --- a/include/wx/textctrl.h +++ b/include/wx/textctrl.h @@ -132,7 +132,7 @@ private: class WXDLLEXPORT wxTextCtrlBase : public wxControl #ifndef NO_TEXT_WINDOW_STREAM - , public streambuf + , public wxSTD streambuf #endif { @@ -174,6 +174,10 @@ public: // clears the dirty flag virtual void DiscardEdits() = 0; + // set the max number of characters which may be entered in a single line + // text control + virtual void SetMaxLength(unsigned long WXUNUSED(len)) { } + // writing text inserts it at the current position, appending always // inserts it at the end virtual void WriteText(const wxString& text) = 0; @@ -269,8 +273,6 @@ private: #include "wx/motif/textctrl.h" #elif defined(__WXGTK__) #include "wx/gtk/textctrl.h" -#elif defined(__WXQT__) - #include "wx/qt/textctrl.h" #elif defined(__WXMAC__) #include "wx/mac/textctrl.h" #elif defined(__WXPM__) @@ -289,6 +291,7 @@ BEGIN_DECLARE_EVENT_TYPES() DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_UPDATED, 7) DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_ENTER, 8) DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_URL, 13) + DECLARE_EVENT_TYPE(wxEVT_COMMAND_TEXT_MAXLEN, 14) END_DECLARE_EVENT_TYPES() #endif // !WXWIN_COMPATIBILITY_EVENT_TYPES @@ -332,6 +335,7 @@ typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&); #define EVT_TEXT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TEXT_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #define EVT_TEXT_URL(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_URL, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) (wxTextUrlEventFunction) & fn, (wxObject *) NULL ), +#define EVT_TEXT_MAXLEN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_MAXLEN, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) & fn, (wxObject *) NULL ), #endif // wxUSE_TEXTCTRL