class WXDLLEXPORT wxTextCtrlBase : public wxControl
#ifndef NO_TEXT_WINDOW_STREAM
- , public streambuf
+ , public wxSTD streambuf
#endif
{
// 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;
#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__)
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
#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