]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/generic/datectrl.h
Use stock labels. Native wxRadioButton. Getting position and size for the controls...
[wxWidgets.git] / include / wx / generic / datectrl.h
index 8fa4b2c590feb37239185ca194161285c799e10a..701fce4ca79e2b43ca3f06dd15ca69005e38423d 100644 (file)
 #ifndef _WX_GENERIC_DATECTRL_H_
 #define _WX_GENERIC_DATECTRL_H_
 
+class WXDLLIMPEXP_CORE wxButton;
 class WXDLLIMPEXP_ADV wxCalendarDateAttr;
 class WXDLLIMPEXP_ADV wxCalendarCtrl;
 class WXDLLIMPEXP_ADV wxCalendarEvent;
+class WXDLLIMPEXP_CORE wxPopupWindow;
+class WXDLLIMPEXP_CORE wxTextCtrl;
 
-class WXDLLIMPEXP_ADV wxDatePickerCtrl : public wxDatePickerCtrlBase
+class WXDLLIMPEXP_ADV wxDatePickerCtrlGeneric : public wxDatePickerCtrlBase
 {
 public:
     // creating the control
-    wxDatePickerCtrl() { Init(); }
-    wxDatePickerCtrl(wxWindow *parent,
-                   wxWindowID id,
-                   const wxDateTime& date = wxDefaultDateTime,
-                   const wxPoint& pos = wxDefaultPosition,
-                   const wxSize& size = wxDefaultSize,
-                   long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
-                   const wxString& name = wxDatePickerCtrlNameStr);
+    wxDatePickerCtrlGeneric() { Init(); }
+    wxDatePickerCtrlGeneric(wxWindow *parent,
+                            wxWindowID id,
+                            const wxDateTime& date = wxDefaultDateTime,
+                            const wxPoint& pos = wxDefaultPosition,
+                            const wxSize& size = wxDefaultSize,
+                            long style = wxDP_DEFAULT | wxDP_SHOWCENTURY,
+                            const wxString& name = wxDatePickerCtrlNameStr)
+    {
+        Init();
+
+        (void)Create(parent, id, date, pos, size, style, name);
+    }
 
     bool Create(wxWindow *parent,
                 wxWindowID id,
@@ -66,16 +74,8 @@ protected:
     virtual void DoMoveWindow(int x, int y, int width, int height);
 
 private:
-    wxDialog *m_dlg;
-    wxTextCtrl *m_txt;
-    wxCalendarCtrl *m_cal;
-    wxButton *m_btn;
-    wxString m_format;
-
-    bool m_dropped, m_ignoreDrop;
-
     void Init();
-    void DropDown(bool down=true);
+    void DropDown(bool down = true);
 
     void OnText(wxCommandEvent &ev);
     void OnEditKey(wxKeyEvent & event);
@@ -86,9 +86,19 @@ private:
     void OnKillFocus(wxFocusEvent &ev);
     void OnChildSetFocus(wxChildFocusEvent &ev);
 
-    DECLARE_DYNAMIC_CLASS(wxDatePickerCtrl)
+
+    wxPopupWindow *m_popup;
+    wxTextCtrl *m_txt;
+    wxCalendarCtrl *m_cal;
+    wxButton *m_btn;
+    wxString m_format;
+
+    bool m_dropped,
+         m_ignoreDrop;
+
+
     DECLARE_EVENT_TABLE()
-    DECLARE_NO_COPY_CLASS(wxDatePickerCtrl)
+    DECLARE_NO_COPY_CLASS(wxDatePickerCtrlGeneric)
 };
 
 #endif // _WX_GENERIC_DATECTRL_H_