X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/c125040724ae879a10f692f1122af2b4f0b5f652..b9efe021b554fa3967d1442cf758435c5cd5ae8f:/src/xrc/xh_cald.cpp diff --git a/src/xrc/xh_cald.cpp b/src/xrc/xh_cald.cpp index 29ab1b9b94..2f9399a2db 100644 --- a/src/xrc/xh_cald.cpp +++ b/src/xrc/xh_cald.cpp @@ -7,8 +7,8 @@ // Copyright: (c) 2000 Brian Gavin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ + +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "xh_cald.h" #endif @@ -19,9 +19,7 @@ #pragma hdrstop #endif -#include "wx/setup.h" - -#if wxUSE_CALENDARCTRL +#if wxUSE_XRC && wxUSE_CALENDARCTRL #include "wx/xrc/xh_cald.h" #include "wx/event.h" @@ -29,8 +27,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxCalendarCtrlXmlHandler, wxXmlResourceHandler) -wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler() -: wxXmlResourceHandler() +wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler() +: wxXmlResourceHandler() { XRC_ADD_STYLE(wxCAL_SUNDAY_FIRST); XRC_ADD_STYLE(wxCAL_MONDAY_FIRST); @@ -45,7 +43,7 @@ wxCalendarCtrlXmlHandler::wxCalendarCtrlXmlHandler() wxObject *wxCalendarCtrlXmlHandler::DoCreateResource() -{ +{ XRC_MAKE_INSTANCE(calendar, wxCalendarCtrl); calendar->Create(m_parentAsWindow, @@ -55,9 +53,9 @@ wxObject *wxCalendarCtrlXmlHandler::DoCreateResource() GetPosition(), GetSize(), GetStyle(), GetName()); - + SetupWindow(calendar); - + return calendar; } @@ -66,4 +64,4 @@ bool wxCalendarCtrlXmlHandler::CanHandle(wxXmlNode *node) return IsOfClass(node, wxT("wxCalendarCtrl")); } -#endif +#endif // wxUSE_XRC && wxUSE_CALENDARCTRL