No real changes, just cleanup week days handling in wxGenericCalendarCtrl.
Use helper GetWeek{Start,End}() functions instead of repeating tests for wxCAL_MONDAY_FIRST over and over again. Also replace some occurrences of GetWindowStyle() with shorter and more clear HasFlag(). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65902 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -199,6 +199,20 @@ private:
|
||||
// get the date from which we start drawing days
|
||||
wxDateTime GetStartDate() const;
|
||||
|
||||
// get the first/last days of the week corresponding to the current style
|
||||
wxDateTime::WeekDay GetWeekStart() const
|
||||
{
|
||||
return HasFlag(wxCAL_MONDAY_FIRST) ? wxDateTime::Mon
|
||||
: wxDateTime::Sun;
|
||||
}
|
||||
|
||||
wxDateTime::WeekDay GetWeekEnd() const
|
||||
{
|
||||
return HasFlag(wxCAL_MONDAY_FIRST) ? wxDateTime::Sun
|
||||
: wxDateTime::Sat;
|
||||
}
|
||||
|
||||
|
||||
// is this date shown?
|
||||
bool IsDateShown(const wxDateTime& date) const;
|
||||
|
||||
|
Reference in New Issue
Block a user