]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/wx/pickerbase.h
Set svn properties on recently added files.
[wxWidgets.git] / interface / wx / pickerbase.h
index eec1fec175c637ee35d96620f6ab3d24fa061f8b..c4b2f108f5732ffa65a316246a09563f7b28758e 100644 (file)
@@ -6,6 +6,11 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
+
+#define wxPB_USE_TEXTCTRL           0x0002
+#define wxPB_SMALL                  0x8000
+
+
 /**
     @class wxPickerBase
 
 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.
 
@@ -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();
 };