X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4ba5f250eaa04e8bd00fed171fee84ae3f1e9bd4..03773e400b6ff2692f2a9ba045d652c3b7b7109d:/include/wx/textentry.h?ds=sidebyside diff --git a/include/wx/textentry.h b/include/wx/textentry.h index 19dd21a83f..130446a4a3 100644 --- a/include/wx/textentry.h +++ b/include/wx/textentry.h @@ -17,6 +17,9 @@ typedef long wxTextPos; class WXDLLIMPEXP_FWD_BASE wxArrayString; class WXDLLIMPEXP_FWD_CORE wxTextEntryHintData; +class WXDLLIMPEXP_FWD_CORE wxWindow; + +#include "wx/gdicmn.h" // for wxPoint // ---------------------------------------------------------------------------- // wxTextEntryBase @@ -141,6 +144,20 @@ public: virtual wxString GetHint() const; + // margins + // ------- + + // margins are the empty space between borders of control and the text + // itself. When setting margin, use value -1 to indicate that specific + // margin should not be changed. + + bool SetMargins(const wxPoint& pt) + { return DoSetMargins(pt); } + bool SetMargins(wxCoord left, wxCoord top = -1) + { return DoSetMargins(wxPoint(left, top)); } + wxPoint GetMargins() const + { return DoGetMargins(); } + protected: // flags for DoSetValue(): common part of SetValue() and ChangeValue() and // also used to implement WriteText() in wxMSW @@ -158,6 +175,10 @@ protected: // generation and also by generic hints implementation virtual wxWindow *GetEditableWindow() = 0; + // margins functions + virtual bool DoSetMargins(const wxPoint& pt); + virtual wxPoint DoGetMargins() const; + // class which should be used to temporarily disable text change events //