X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/61581d48be4b9b8818d5d743dc12c5e1ca2afd0e..6798451bb28561eb2e903ff43a9fa572824145a2:/include/wx/generic/calctrl.h?ds=sidebyside diff --git a/include/wx/generic/calctrl.h b/include/wx/generic/calctrl.h index 0ac0091442..08acaca363 100644 --- a/include/wx/generic/calctrl.h +++ b/include/wx/generic/calctrl.h @@ -9,19 +9,15 @@ // 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 #include "wx/control.h" // the base class #include "wx/dcclient.h" // for wxPaintDC -class WXDLLEXPORT wxComboBox; -class WXDLLEXPORT wxStaticText; -class WXDLLEXPORT wxSpinCtrl; +class WXDLLIMPEXP_FWD_CORE wxComboBox; +class WXDLLIMPEXP_FWD_CORE wxStaticText; +class WXDLLIMPEXP_FWD_CORE wxSpinCtrl; #define wxCalendarNameStr _T("CalendarCtrl") @@ -159,16 +155,31 @@ public: virtual bool Enable(bool enable = true); virtual bool Show(bool show = true); + virtual void SetWindowStyleFlag(long style); + virtual wxVisualAttributes GetDefaultAttributes() const { return GetClassDefaultAttributes(GetWindowVariant()); } static wxVisualAttributes GetClassDefaultAttributes(wxWindowVariant variant = wxWINDOW_VARIANT_NORMAL); + void OnSysColourChanged(wxSysColourChangedEvent& event); + +protected: + // override some base class virtuals + virtual wxSize DoGetBestSize() const; + virtual void DoGetPosition(int *x, int *y) const; + virtual void DoGetSize(int *width, int *height) const; + virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); + virtual void DoMoveWindow(int x, int y, int width, int height); + private: // common part of all ctors void Init(); + // startup colours and reinitialization after colour changes in system + void InitColours(); + // event handlers void OnPaint(wxPaintEvent& event); void OnClick(wxMouseEvent& event); @@ -178,13 +189,6 @@ private: void OnYearChange(wxCommandEvent& event); void OnYearTextChange(wxCommandEvent& event); - // override some base class virtuals - virtual wxSize DoGetBestSize() const; - virtual void DoGetPosition(int *x, int *y) const; - virtual void DoGetSize(int *width, int *height) const; - virtual void DoSetSize(int x, int y, int width, int height, int sizeFlags); - virtual void DoMoveWindow(int x, int y, int width, int height); - // (re)calc m_widthCol and m_heightRow void RecalcGeometry(); @@ -259,7 +263,7 @@ private: // OnPaint helper-methods // Highlight the [fromdate : todate] range using pen and brush - void HighlightRange(wxPaintDC* dc, const wxDateTime& fromdate, const wxDateTime& todate, wxPen* pen, wxBrush* brush); + void HighlightRange(wxPaintDC* dc, const wxDateTime& fromdate, const wxDateTime& todate, const wxPen* pen, const wxBrush* brush); // Get the "coordinates" for the date relative to the month currently displayed. // using (day, week): upper left coord is (1, 1), lower right coord is (7, 6) @@ -290,7 +294,9 @@ private: m_colHolidayFg, m_colHolidayBg, m_colHeaderFg, - m_colHeaderBg; + m_colHeaderBg, + m_colBackground, + m_colSorrounding; // the attributes for each of the month days wxCalendarDateAttr *m_attrs[31];