X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2859935bb1403eec9a5c8e382cbb2827491d3f57..b09857ae000a60704207d63290be937584805fb0:/interface/wx/pickerbase.h?ds=sidebyside diff --git a/interface/wx/pickerbase.h b/interface/wx/pickerbase.h index cd5f6cf05f..24a00f9ab6 100644 --- a/interface/wx/pickerbase.h +++ b/interface/wx/pickerbase.h @@ -3,9 +3,14 @@ // Purpose: interface of wxPickerBase // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + +#define wxPB_USE_TEXTCTRL 0x0002 +#define wxPB_SMALL 0x8000 + + /** @class wxPickerBase @@ -33,6 +38,20 @@ class wxPickerBase : public wxControl { public: + wxPickerBase(); + virtual ~wxPickerBase(); + + // if present, intercepts wxPB_USE_TEXTCTRL style and creates the text control + // The 3rd argument is the initial wxString to display in the text control + bool CreateBase(wxWindow *parent, + wxWindowID id, + const wxString& text = wxEmptyString, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxValidator& validator = wxDefaultValidator, + const wxString& name = wxButtonNameStr); + /** Returns the margin (in pixel) between the picker and the text control. @@ -87,7 +106,7 @@ public: int GetTextCtrlProportion() const; /** - Returns @true if this window has a valid text control (i.e. if the @c + Returns @true if this window has a valid text control (i.e.\ if the @c wxPB_USE_TEXTCTRL style was given when creating this control). */ bool HasTextCtrl() const; @@ -138,5 +157,17 @@ public: This function can be used only when HasTextCtrl() returns @true. */ void SetTextCtrlProportion(int prop); + + + void SetTextCtrl(wxTextCtrl* text); + void SetPickerCtrl(wxControl* picker); + + virtual void UpdatePickerFromTextCtrl() = 0; + virtual void UpdateTextCtrlFromPicker() = 0; + +protected: + virtual long GetTextCtrlStyle(long style) const; + virtual long GetPickerStyle(long style) const; + void PostCreation(); };