X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ae3c17b4013e80b99976c750c19fca47729517f6..6496345c33824373fdb8cf7de04a43197fa0341c:/interface/wx/calctrl.h?ds=sidebyside diff --git a/interface/wx/calctrl.h b/interface/wx/calctrl.h index 397b4760ef..11a09e7fa0 100644 --- a/interface/wx/calctrl.h +++ b/interface/wx/calctrl.h @@ -8,7 +8,6 @@ /** @class wxCalendarEvent - @wxheader{calctrl.h} The wxCalendarEvent class is used together with wxCalendarCtrl. @@ -31,7 +30,7 @@ public: Sets the week day carried by the event, normally only used by the library internally. */ - void SetWeekDay(wxDateTime::WeekDay day); + void SetWeekDay(const wxDateTime::WeekDay day); }; @@ -49,7 +48,6 @@ enum wxCalendarDateBorder /** @class wxCalendarDateAttr - @wxheader{calctrl.h} wxCalendarDateAttr is a custom attributes for a calendar date. The objects of this class are used with wxCalendarCtrl. @@ -62,15 +60,10 @@ enum wxCalendarDateBorder class wxCalendarDateAttr { public: - /** - Default constructor. - */ - wxCalendarDateAttr(); - /** Constructor for specifying all wxCalendarDateAttr properties. */ - wxCalendarDateAttr(const wxColour& colText, + wxCalendarDateAttr(const wxColour& colText = wxNullColour, const wxColour& colBack = wxNullColour, const wxColour& colBorder = wxNullColour, const wxFont& font = wxNullFont, @@ -85,7 +78,7 @@ public: /** Returns the background colour set for the calendar date. */ - const wxColour GetBackgroundColour() const; + const wxColour& GetBackgroundColour() const; /** Returns the border set for the calendar date. @@ -95,17 +88,17 @@ public: /** Returns the border colour set for the calendar date. */ - const wxColour GetBorderColour() const; + const wxColour& GetBorderColour() const; /** Returns the font set for the calendar date. */ - const wxFont GetFont() const; + const wxFont& GetFont() const; /** Returns the text colour set for the calendar date. */ - const wxColour GetTextColour() const; + const wxColour& GetTextColour() const; /** Returns @true if a non-default text background colour is set. @@ -194,7 +187,6 @@ enum wxCalendarHitTestResult /** @class wxCalendarCtrl - @wxheader{calctrl.h} The calendar control allows the user to pick a date. The user can move the current selection using the keyboard and select the date (generating @@ -257,7 +249,7 @@ enum wxCalendarHitTestResult @library{wxadv} @category{ctrl} - + @appearance{calendarctrl.png} @nativeimpl{wxgtk,wxmsw} @@ -303,7 +295,7 @@ public: style bit directly. It enables or disables the special highlighting of the holidays. */ - void EnableHolidayDisplay(bool display = true); + virtual void EnableHolidayDisplay(bool display = true); /** This function should be used instead of changing @@ -314,7 +306,7 @@ public: @return @true if the value of this option really changed or @false if it was already set to the requested value. */ - bool EnableMonthChange(bool enable = true); + virtual bool EnableMonthChange(bool enable = true); /** @deprecated @@ -323,19 +315,19 @@ public: @c wxCAL_NO_YEAR_CHANGE style bit directly. It allows or disallows the user to change the year interactively. Only in generic wxCalendarCtrl. */ - void EnableYearChange(bool enable = true); + virtual void EnableYearChange(bool enable = true); /** Returns the attribute for the given date (should be in the range 1...31). The returned pointer may be @NULL. Only in generic wxCalendarCtrl. */ - wxCalendarDateAttr* GetAttr(size_t day) const; + virtual wxCalendarDateAttr* GetAttr(size_t day) const; /** Gets the currently selected date. */ - const wxDateTime GetDate() const; + virtual wxDateTime GetDate() const; /** Gets the background colour of the header part of the calendar window. @@ -345,7 +337,7 @@ public: @see SetHeaderColours() */ - const wxColour GetHeaderColourBg() const; + virtual const wxColour& GetHeaderColourBg() const; /** Gets the foreground colour of the header part of the calendar window. @@ -355,7 +347,7 @@ public: @see SetHeaderColours() */ - const wxColour GetHeaderColourFg() const; + virtual const wxColour& GetHeaderColourFg() const; /** Gets the background highlight colour. Only in generic wxCalendarCtrl. @@ -365,7 +357,7 @@ public: @see SetHighlightColours() */ - const wxColour GetHighlightColourBg() const; + virtual const wxColour& GetHighlightColourBg() const; /** Gets the foreground highlight colour. Only in generic wxCalendarCtrl. @@ -375,7 +367,7 @@ public: @see SetHighlightColours() */ - const wxColour GetHighlightColourFg() const; + virtual const wxColour& GetHighlightColourFg() const; /** Return the background colour currently used for holiday highlighting. @@ -386,7 +378,7 @@ public: @see SetHolidayColours() */ - const wxColour GetHolidayColourBg() const; + virtual const wxColour& GetHolidayColourBg() const; /** Return the foreground colour currently used for holiday highlighting. @@ -397,38 +389,38 @@ public: @see SetHolidayColours() */ - const wxColour GetHolidayColourFg() const; + virtual const wxColour& GetHolidayColourFg() const; /** Returns one of wxCalendarHitTestResult constants and fills either @a date or @a wd pointer with the corresponding value depending on the hit test code. - + Not implemented in wxGTK currently. */ - wxCalendarHitTestResult HitTest(const wxPoint& pos, - wxDateTime* date = NULL, - wxDateTime::WeekDay* wd = NULL); + virtual wxCalendarHitTestResult HitTest(const wxPoint& pos, + wxDateTime* date = NULL, + wxDateTime::WeekDay* wd = NULL); /** Clears any attributes associated with the given day (in the range 1...31). Only in generic wxCalendarCtrl. */ - void ResetAttr(size_t day); + virtual void ResetAttr(size_t day); /** Associates the attribute with the specified date (in the range 1...31). If the pointer is @NULL, the items attribute is cleared. Only in generic wxCalendarCtrl. */ - void SetAttr(size_t day, wxCalendarDateAttr* attr); + virtual void SetAttr(size_t day, wxCalendarDateAttr* attr); /** Sets the current date. The @a date parameter must be valid. */ - void SetDate(const wxDateTime& date); + virtual bool SetDate(const wxDateTime& date); /** Set the colours used for painting the weekdays at the top of the @@ -437,8 +429,8 @@ public: This method is currently only implemented in generic wxCalendarCtrl and does nothing in the native versions. */ - void SetHeaderColours(const wxColour& colFg, - const wxColour& colBg); + virtual void SetHeaderColours(const wxColour& colFg, + const wxColour& colBg); /** Set the colours to be used for highlighting the currently selected @@ -447,8 +439,8 @@ public: This method is currently only implemented in generic wxCalendarCtrl and does nothing in the native versions. */ - void SetHighlightColours(const wxColour& colFg, - const wxColour& colBg); + virtual void SetHighlightColours(const wxColour& colFg, + const wxColour& colBg); /** Marks the specified day as being a holiday in the current month. @@ -456,25 +448,25 @@ public: This method is only implemented in the generic version of the control and does nothing in the native ones. */ - void SetHoliday(size_t day); + virtual void SetHoliday(size_t day); /** Sets the colours to be used for the holidays highlighting. - + This method is only implemented in the generic version of the control and does nothing in the native ones. It should also only be called if the window style includes @c wxCAL_SHOW_HOLIDAYS flag or EnableHolidayDisplay() had been called. */ - void SetHolidayColours(const wxColour& colFg, - const wxColour& colBg); + virtual void SetHolidayColours(const wxColour& colFg, + const wxColour& colBg); /** Mark or unmark the day. This day of month will be marked in every month. In generic wxCalendarCtrl, */ - void Mark(size_t day, bool mark); + virtual void Mark(size_t day, bool mark); /** @name Date Range Functions @@ -496,7 +488,7 @@ public: @param lowerdate The low limit for the dates shown by the control or @c wxDefaultDateTime. - @param highlighting + @param upperdate The high limit for the dates shown by the control or @c wxDefaultDateTime. @return