class WXDLLIMPEXP_FWD_BASE wxArrayString;
class WXDLLIMPEXP_FWD_CORE wxTextEntryHintData;
+class WXDLLIMPEXP_FWD_CORE wxWindow;
+
+#include "wx/gdicmn.h" // for wxPoint
// ----------------------------------------------------------------------------
// wxTextEntryBase
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
virtual void DoSetValue(const wxString& value, int flags);
virtual wxString DoGetValue() const = 0;
+ // override this to return the associated window, it will be used for event
+ // 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
//
// if suppress argument in ctor is false, nothing is done
bool EventsAllowed() const { return m_eventsBlock == 0; }
private:
- // override this to return the associated window, it will be used for event
- // generation and also by generic hints implementation
- virtual wxWindow *GetEditableWindow() = 0;
-
-
// suppress or resume the text changed events generation: don't use these
// functions directly, use EventsSuppressor class above instead
void SuppressTextChangedEvents()