X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/98ccd5452290db2280d7b23698d66584c3e66732..15fa4de377053c3c38f62593b2df941c217ea34b:/interface/wx/calctrl.h diff --git a/interface/wx/calctrl.h b/interface/wx/calctrl.h index 02d8675c2c..799465bc89 100644 --- a/interface/wx/calctrl.h +++ b/interface/wx/calctrl.h @@ -3,7 +3,7 @@ // Purpose: interface of wxCalendarCtrl // Author: wxWidgets team // RCS-ID: $Id$ -// Licence: wxWindows license +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// /** @@ -30,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); }; @@ -53,22 +53,17 @@ enum wxCalendarDateBorder of this class are used with wxCalendarCtrl. @library{wxadv} - @category{misc} + @category{data} @see wxCalendarCtrl */ 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, @@ -83,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. @@ -93,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. @@ -187,7 +182,11 @@ enum wxCalendarHitTestResult { wxCAL_HITTEST_NOWHERE, ///< Hit outside of anything. wxCAL_HITTEST_HEADER, ///< Hit on the header (weekdays). - wxCAL_HITTEST_DAY ///< Hit on a day in the calendar. + wxCAL_HITTEST_DAY, ///< Hit on a day in the calendar. + wxCAL_HITTEST_INCMONTH, ///< Hit on next month arrow (in alternate month selector mode). + wxCAL_HITTEST_DECMONTH, ///< Hit on previous month arrow (in alternate month selector mode). + wxCAL_HITTEST_SURROUNDING_WEEK, ///< Hit on surrounding week of previous/next month (if shown). + wxCAL_HITTEST_WEEK ///< Hit on week of the year number (if shown). }; /** @@ -238,7 +237,7 @@ enum wxCalendarHitTestResult Show week numbers on the left side of the calendar. (not in generic) @endStyleTable - @beginEventTable{wxCalendarEvent} + @beginEventEmissionTable{wxCalendarEvent} @event{EVT_CALENDAR(id, func)} A day was double clicked in the calendar. @event{EVT_CALENDAR_SEL_CHANGED(id, func)} @@ -247,6 +246,8 @@ enum wxCalendarHitTestResult The selected month (and/or year) changed. @event{EVT_CALENDAR_WEEKDAY_CLICKED(id, func)} User clicked on the week day header (only generic). + @event{EVT_CALENDAR_WEEK_CLICKED(id, func)} + User clicked on the week of the year number (only generic). @endEventTable @note Changing the selected date will trigger an EVT_CALENDAR_DAY, MONTH or @@ -254,7 +255,7 @@ enum wxCalendarHitTestResult @library{wxadv} @category{ctrl} - + @appearance{calendarctrl.png} @nativeimpl{wxgtk,wxmsw} @@ -305,8 +306,8 @@ public: /** This function should be used instead of changing @c wxCAL_NO_MONTH_CHANGE style bit. It allows or disallows the user to - change the month interactively. Note that if the month can not be - changed, the year can not be changed neither. + change the month interactively. Note that if the month cannot be + changed, the year cannot be changed neither. @return @true if the value of this option really changed or @false if it was already set to the requested value. @@ -425,7 +426,7 @@ public: The @a date parameter must be valid. */ - virtual void SetDate(const wxDateTime& date); + virtual bool SetDate(const wxDateTime& date); /** Set the colours used for painting the weekdays at the top of the @@ -492,10 +493,10 @@ public: @param lowerdate The low limit for the dates shown by the control or - @c wxDefaultDateTime. + ::wxDefaultDateTime. @param upperdate The high limit for the dates shown by the control or - @c wxDefaultDateTime. + ::wxDefaultDateTime. @return @true if either limit is valid, @false otherwise */ @@ -509,11 +510,11 @@ public: @param lowerdate If non-@NULL, the value of the low limit for the dates shown by the - control is returned (which may be @c wxDefaultDateTime if no limit + control is returned (which may be ::wxDefaultDateTime if no limit is set). @param upperdate If non-@NULL, the value of the upper limit for the dates shown by - the control is returned (which may be @c wxDefaultDateTime if no + the control is returned (which may be ::wxDefaultDateTime if no limit is set). @return @true if either limit is set, @false otherwise