X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/628e155d8c70da0f962289cf1e1dea3699255707..eed04c9999d7929fad7d18fab4e8071b515f6aa7:/include/wx/generic/calctrlg.h diff --git a/include/wx/generic/calctrlg.h b/include/wx/generic/calctrlg.h index 682227cc37..9d9d296c92 100644 --- a/include/wx/generic/calctrlg.h +++ b/include/wx/generic/calctrlg.h @@ -58,15 +58,18 @@ public: // set/get the range in which selection can occur // --------------------------------------------- - // all functions in this section are for generic version only + virtual bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, + const wxDateTime& upperdate = wxDefaultDateTime); + + virtual bool GetDateRange(wxDateTime *lowerdate, wxDateTime *upperdate) const; + + // these functions are for generic version only, don't use them but use the + // Set/GetDateRange() above instead bool SetLowerDateLimit(const wxDateTime& date = wxDefaultDateTime); const wxDateTime& GetLowerDateLimit() const { return m_lowdate; } bool SetUpperDateLimit(const wxDateTime& date = wxDefaultDateTime); const wxDateTime& GetUpperDateLimit() const { return m_highdate; } - bool SetDateRange(const wxDateTime& lowerdate = wxDefaultDateTime, - const wxDateTime& upperdate = wxDefaultDateTime); - // calendar mode // ------------- @@ -82,7 +85,7 @@ public: void EnableYearChange(bool enable = true); // corresponds to wxCAL_SHOW_HOLIDAYS bit, generic only - void EnableHolidayDisplay(bool display = true); + virtual void EnableHolidayDisplay(bool display = true); // customization @@ -93,34 +96,34 @@ public: // all other functions in this section are for generic version only // header colours are used for painting the weekdays at the top - void SetHeaderColours(const wxColour& colFg, const wxColour& colBg) + virtual void SetHeaderColours(const wxColour& colFg, const wxColour& colBg) { m_colHeaderFg = colFg; m_colHeaderBg = colBg; } - const wxColour& GetHeaderColourFg() const { return m_colHeaderFg; } - const wxColour& GetHeaderColourBg() const { return m_colHeaderBg; } + virtual const wxColour& GetHeaderColourFg() const { return m_colHeaderFg; } + virtual const wxColour& GetHeaderColourBg() const { return m_colHeaderBg; } // highlight colour is used for the currently selected date - void SetHighlightColours(const wxColour& colFg, const wxColour& colBg) + virtual void SetHighlightColours(const wxColour& colFg, const wxColour& colBg) { m_colHighlightFg = colFg; m_colHighlightBg = colBg; } - const wxColour& GetHighlightColourFg() const { return m_colHighlightFg; } - const wxColour& GetHighlightColourBg() const { return m_colHighlightBg; } + virtual const wxColour& GetHighlightColourFg() const { return m_colHighlightFg; } + virtual const wxColour& GetHighlightColourBg() const { return m_colHighlightBg; } // holiday colour is used for the holidays (if style & wxCAL_SHOW_HOLIDAYS) - void SetHolidayColours(const wxColour& colFg, const wxColour& colBg) + virtual void SetHolidayColours(const wxColour& colFg, const wxColour& colBg) { m_colHolidayFg = colFg; m_colHolidayBg = colBg; } - const wxColour& GetHolidayColourFg() const { return m_colHolidayFg; } - const wxColour& GetHolidayColourBg() const { return m_colHolidayBg; } + virtual const wxColour& GetHolidayColourFg() const { return m_colHolidayFg; } + virtual const wxColour& GetHolidayColourBg() const { return m_colHolidayBg; } virtual wxCalendarDateAttr *GetAttr(size_t day) const { @@ -139,7 +142,7 @@ public: virtual void ResetAttr(size_t day) { SetAttr(day, NULL); } - void SetHoliday(size_t day); + virtual void SetHoliday(size_t day); virtual wxCalendarHitTestResult HitTest(const wxPoint& pos, wxDateTime *date = NULL, @@ -165,10 +168,8 @@ public: 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); + virtual void DoGetSize(int *width, int *height) const; private: // common part of all ctors @@ -253,6 +254,7 @@ private: // typed in by the user void SetUserChangedYear() { m_userChangedYear = true; } + // the subcontrols wxStaticText *m_staticMonth; wxComboBox *m_comboMonth; @@ -275,7 +277,7 @@ private: m_colHeaderFg, m_colHeaderBg, m_colBackground, - m_colSorrounding; + m_colSurrounding; // the attributes for each of the month days wxCalendarDateAttr *m_attrs[31];