X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b3231f0aaf369e384d41b2e5890b75a3e26f3fea..4813bb8d72d4e6821e031f2b19baaa338b714d39:/src/mac/carbon/drawer.cpp diff --git a/src/mac/carbon/drawer.cpp b/src/mac/carbon/drawer.cpp index 67f43412ac..2c02dd4260 100644 --- a/src/mac/carbon/drawer.cpp +++ b/src/mac/carbon/drawer.cpp @@ -4,28 +4,25 @@ // Drawer windows appear under their parent window and // behave like a drawer, opening and closing to reveal // content that does not need to be visible at all times. -// Author: Jason Bagley & Ryan Norton -// Modified by: +// Author: Jason Bagley +// Modified by: Ryan Norton (To make it work :), plus bug fixes) // Created: 2004-30-01 // RCS-ID: $Id$ // Copyright: (c) Jason Bagley; Art & Logic, Inc. // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ -#pragma implementation "control.h" -#endif +#include "wx/wxprec.h" -#include "wx/defs.h" - -#include "wx/mac/carbon/drawer.h" #include "wx/mac/private.h" -#if defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 ) +#if defined( __WXMAC__ ) + +#include "wx/mac/carbon/drawer.h" IMPLEMENT_DYNAMIC_CLASS(wxDrawerWindow, wxWindow) -// Use consants for now. +// Use constants for now. // These can be made into member variables and set dynamically. const int kLeadingOffset = 20; const int kTrailingOffset = 20; @@ -82,9 +79,8 @@ bool wxDrawerWindow::Create(wxWindow *parent, if (success) { // Use drawer brush. - m_macBackgroundBrush.MacSetTheme(kThemeBrushDrawerBackground); - ::SetThemeWindowBackground((WindowRef)m_macWindow, - m_macBackgroundBrush.MacGetTheme(), false); + SetBackgroundColour( wxColour( wxMacCreateCGColorFromHITheme( kThemeBrushDrawerBackground ) ) ); + ::SetThemeWindowBackground((WindowRef)m_macWindow, kThemeBrushDrawerBackground, false); // Leading and trailing offset are gaps from parent window edges // to where the drawer starts. @@ -200,5 +196,4 @@ wxDirection WindowEdgeToDirection(OptionBits edge) return direction; } -#endif // defined( __WXMAC__ ) && TARGET_API_MAC_OSX && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2 ) - +#endif // defined( __WXMAC__ )