X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c57e33394ca152e6e13f10363b76aef6e74a4705..15678bec37c6e3cb8a67a8b041579af595d4ccf3:/include/wx/textctrl.h diff --git a/include/wx/textctrl.h b/include/wx/textctrl.h index aa8f5bf48a..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__) @@ -283,12 +285,17 @@ private: // wxTextCtrl events // ---------------------------------------------------------------------------- +#if !WXWIN_COMPATIBILITY_EVENT_TYPES + 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 + class WXDLLEXPORT wxTextUrlEvent : public wxCommandEvent { public: @@ -328,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