/////////////////////////////////////////////////////////////////////////////
-// Name: textctrl.h
+// Name: wx/msw/textctrl.h
// Purpose: wxTextCtrl class
// Author: Julian Smart
// Modified by:
virtual bool IsModified() const;
virtual bool IsEditable() const;
- // If the return values from and to are the same, there is no selection.
virtual void GetSelection(long* from, long* to) const;
+ virtual wxString GetSelection() const;
// operations
// ----------
// clears the dirty flag
virtual void DiscardEdits();
+ virtual void SetMaxLength(unsigned long len);
+
// writing text inserts it at the current position, appending always
// inserts it at the end
virtual void WriteText(const wxString& text);
#endif
#if wxUSE_RICHEDIT
+ virtual bool MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
+
bool IsRich() const { return m_isRich; }
void SetRichEdit(bool isRich) { m_isRich = isRich; }
#endif // wxUSE_RICHEDIT
virtual void AdoptAttributesFromHWND();
- virtual void SetupColours();
virtual bool AcceptsFocus() const;
void OnUpdateRedo(wxUpdateUIEvent& event);
protected:
-#if wxUSE_RICHEDIT
- bool m_isRich; // Are we using rich text edit to implement this?
-#endif
-
// call this to increase the size limit (will do nothing if the current
// limit is big enough)
- void AdjustSpaceLimit();
+ //
+ // returns true if we increased the limit to allow entering more text,
+ // false if we hit the limit set by SetMaxLength() and so didn't change it
+ bool AdjustSpaceLimit();
+ // override some base class virtuals
+ virtual bool MSWShouldPreProcessMessage(WXMSG* pMsg);
virtual wxSize DoGetBestSize() const;
+#if wxUSE_RICHEDIT
+ bool m_isRich; // Are we using rich text edit to implement this?
+#endif
+
private:
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS(wxTextCtrl)