// 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
// -------------
// corresponds to wxCAL_NO_YEAR_CHANGE bit, deprecated, generic only
void EnableYearChange(bool enable = true);
- // corresponds to wxCAL_SHOW_HOLIDAYS bit, generic only
- virtual void EnableHolidayDisplay(bool display = true);
-
// customization
// -------------
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
// change the date inside the same month/year
void ChangeDay(const wxDateTime& date);
- // set the attributes for the holidays if needed
- void SetHolidayAttrs();
-
- // reset all holidays
- void ResetHolidayAttrs();
-
// deprecated
bool AllowYearChange() const
{
wxControl *GetYearControl() const;
private:
+ virtual void ResetHolidayAttrs();
+ virtual void RefreshHolidays() { Refresh(); }
+
// OnPaint helper-methods
// Highlight the [fromdate : todate] range using pen and brush
// typed in by the user
void SetUserChangedYear() { m_userChangedYear = true; }
+
// the subcontrols
wxStaticText *m_staticMonth;
wxComboBox *m_comboMonth;
m_colHeaderFg,
m_colHeaderBg,
m_colBackground,
- m_colSorrounding;
+ m_colSurrounding;
// the attributes for each of the month days
wxCalendarDateAttr *m_attrs[31];