X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ca65c0440a7163e4e37e48b1c4329709d722db47..20ceebaa878e9fb54e678c6498aeaeeaae9f0590:/include/wx/generic/calctrl.h?ds=sidebyside diff --git a/include/wx/generic/calctrl.h b/include/wx/generic/calctrl.h index c6d66e2372..21a6bb95e8 100644 --- a/include/wx/generic/calctrl.h +++ b/include/wx/generic/calctrl.h @@ -9,10 +9,6 @@ // Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// -#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) - #pragma interface "calctrl.h" -#endif - #ifndef _WX_GENERIC_CALCTRL_H #define _WX_GENERIC_CALCTRL_H @@ -31,9 +27,6 @@ class WXDLLEXPORT wxSpinCtrl; class WXDLLIMPEXP_ADV wxCalendarCtrl : public wxControl { -friend class wxMonthComboBox; -friend class wxYearSpinCtrl; - public: // construction wxCalendarCtrl() { Init(); } @@ -162,6 +155,12 @@ public: virtual bool Enable(bool enable = true); virtual bool Show(bool show = true); + virtual wxVisualAttributes GetDefaultAttributes() const + { return GetClassDefaultAttributes(GetWindowVariant()); } + + static wxVisualAttributes + GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + private: // common part of all ctors void Init(); @@ -173,6 +172,7 @@ private: void OnChar(wxKeyEvent& event); void OnMonthChange(wxCommandEvent& event); void OnYearChange(wxCommandEvent& event); + void OnYearTextChange(wxCommandEvent& event); // override some base class virtuals virtual wxSize DoGetBestSize() const; @@ -242,6 +242,10 @@ private: // show the correct controls void ShowCurrentControls(); + // create the month combo and year spin controls + void CreateMonthComboBox(); + void CreateYearSpinCtrl(); + public: // get the currently shown control for month/year wxControl *GetMonthControl() const;