X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..478ba84485d00d0d9a80ce3304f226355f457471:/include/wx/control.h diff --git a/include/wx/control.h b/include/wx/control.h index d3c7c8f896..5fd882ce0c 100644 --- a/include/wx/control.h +++ b/include/wx/control.h @@ -6,7 +6,7 @@ // Created: 26.07.99 // RCS-ID: $Id$ // Copyright: (c) wxWidgets team -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_CONTROL_H_BASE_ @@ -32,10 +32,11 @@ WXDLLEXPORT_DATA(extern const wxChar*) wxControlNameStr; // wxControl is the base class for all controls // ---------------------------------------------------------------------------- + class WXDLLEXPORT wxControlBase : public wxWindow { public: - wxControlBase() { } + wxControlBase() { Init(); } virtual ~wxControlBase(); @@ -63,7 +64,16 @@ public: // if the button was clicked) virtual void Command(wxCommandEvent &event); + + virtual void SetLabel(const wxString& label); + virtual bool SetFont(const wxFont& font); + virtual bool GetAdjustMinSizeFlag() const { return m_adjustMinSize; } + void SetAdjustMinSizeFlag(bool adjust) { m_adjustMinSize = adjust; } + + protected: + void Init(); + // creates the control (calls wxWindowBase::CreateBase inside) and adds it // to the list of parents children bool CreateControl(wxWindowBase *parent, @@ -88,6 +98,9 @@ protected: SetBestSize(size); } + // should minsize and size be adjusted when font or label change? + bool m_adjustMinSize; + DECLARE_NO_COPY_CLASS(wxControlBase) };