Added symbolic names for native control week days.

No real changes, but MonthCal_Monday/Sunday is more clear than 0 or 6.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61593 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-08-03 20:36:56 +00:00
parent f9d2e19d21
commit 18547275bb

View File

@ -36,6 +36,27 @@
IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrl, wxControl)
// ----------------------------------------------------------------------------
// constants
// ----------------------------------------------------------------------------
namespace
{
// values of week days used by the native control
enum
{
MonthCal_Monday,
MonthCal_Tuesday,
MonthCal_Wednesday,
MonthCal_Thursday,
MonthCal_Friday,
MonthCal_Saturday,
MonthCal_Sunday
};
} // anonymous namespace
// ============================================================================
// implementation
// ============================================================================
@ -376,7 +397,9 @@ void wxCalendarCtrl::UpdateMarks()
void wxCalendarCtrl::UpdateFirstDayOfWeek()
{
MonthCal_SetFirstDayOfWeek(GetHwnd(), HasFlag(wxCAL_MONDAY_FIRST) ? 0 : 6);
MonthCal_SetFirstDayOfWeek(GetHwnd(),
HasFlag(wxCAL_MONDAY_FIRST) ? MonthCal_Monday
: MonthCal_Sunday);
}
// ----------------------------------------------------------------------------