Tidied space and tabs in wxMac files

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19397 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2003-02-28 23:48:13 +00:00
parent 7de24929eb
commit e40298d54e
202 changed files with 17354 additions and 17176 deletions

View File

@@ -206,22 +206,24 @@ unsigned long wxBrush::GetMacThemeBackground( WXRECTPTR extent) const
short wxBrush::GetMacTheme() const short wxBrush::GetMacTheme() const
{ {
return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack); return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack);
}; }
wxColour& wxBrush::GetColour() const wxColour& wxBrush::GetColour() const
{ return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; {
return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour);
}
int wxBrush::GetStyle() const int wxBrush::GetStyle() const
{ {
return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0);
}; }
wxBitmap *wxBrush::GetStipple() const wxBitmap *wxBrush::GetStipple() const
{ {
return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0);
}; }
wxMacBrushKind wxBrush::MacGetBrushKind() const wxMacBrushKind wxBrush::MacGetBrushKind() const
{ {
return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour); return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour);
}; }

View File

@@ -206,22 +206,24 @@ unsigned long wxBrush::GetMacThemeBackground( WXRECTPTR extent) const
short wxBrush::GetMacTheme() const short wxBrush::GetMacTheme() const
{ {
return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack); return (M_BRUSHDATA ? ( M_BRUSHDATA->m_macBrushKind == kwxMacBrushTheme ? M_BRUSHDATA->m_macThemeBrush : kThemeBrushBlack) : kThemeBrushBlack);
}; }
wxColour& wxBrush::GetColour() const wxColour& wxBrush::GetColour() const
{ return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour); }; {
return (M_BRUSHDATA ? M_BRUSHDATA->m_colour : wxNullColour);
}
int wxBrush::GetStyle() const int wxBrush::GetStyle() const
{ {
return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0); return (M_BRUSHDATA ? M_BRUSHDATA->m_style : 0);
}; }
wxBitmap *wxBrush::GetStipple() const wxBitmap *wxBrush::GetStipple() const
{ {
return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0); return (M_BRUSHDATA ? & M_BRUSHDATA->m_stipple : 0);
}; }
wxMacBrushKind wxBrush::MacGetBrushKind() const wxMacBrushKind wxBrush::MacGetBrushKind() const
{ {
return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour); return (M_BRUSHDATA ? M_BRUSHDATA->m_macBrushKind : kwxMacBrushColour);
}; }

View File

@@ -8,17 +8,22 @@
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "choice.h" #pragma implementation "choice.h"
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/choice.h" #include "wx/choice.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#endif #endif
extern MenuHandle NewUniqueMenu() ; extern MenuHandle NewUniqueMenu() ;
wxChoice::~wxChoice() wxChoice::~wxChoice()
{ {
if ( HasClientObjectData() ) if ( HasClientObjectData() )
@@ -32,6 +37,7 @@ wxChoice::~wxChoice()
// DeleteMenu( m_macPopUpMenuId ) ; // DeleteMenu( m_macPopUpMenuId ) ;
// DisposeMenu( m_macPopUpMenuHandle ) ; // DisposeMenu( m_macPopUpMenuHandle ) ;
} }
bool wxChoice::Create(wxWindow *parent, wxWindowID id, bool wxChoice::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
@@ -60,6 +66,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
} }
return TRUE; return TRUE;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// adding/deleting items to/from the list // adding/deleting items to/from the list
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -73,6 +80,7 @@ int wxChoice::DoAppend(const wxString& item)
SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ; SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ;
return index ; return index ;
} }
void wxChoice::Delete(int n) void wxChoice::Delete(int n)
{ {
wxCHECK_RET( n < GetCount(), wxT("invalid item index in wxChoice::Delete") ); wxCHECK_RET( n < GetCount(), wxT("invalid item index in wxChoice::Delete") );
@@ -85,6 +93,7 @@ void wxChoice::Delete(int n)
m_datas.RemoveAt( n ) ; m_datas.RemoveAt( n ) ;
SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ; SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ;
} }
void wxChoice::Clear() void wxChoice::Clear()
{ {
FreeData(); FreeData();
@@ -96,6 +105,7 @@ void wxChoice::Clear()
m_datas.Empty() ; m_datas.Empty() ;
SetControl32BitMaximum( (ControlHandle) m_macControl , 0 ) ; SetControl32BitMaximum( (ControlHandle) m_macControl , 0 ) ;
} }
void wxChoice::FreeData() void wxChoice::FreeData()
{ {
if ( HasClientObjectData() ) if ( HasClientObjectData() )
@@ -107,6 +117,7 @@ void wxChoice::FreeData()
} }
} }
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// selection // selection
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -114,17 +125,21 @@ int wxChoice::GetSelection() const
{ {
return GetControl32BitValue( (ControlHandle) m_macControl ) -1 ; return GetControl32BitValue( (ControlHandle) m_macControl ) -1 ;
} }
void wxChoice::SetSelection(int n) void wxChoice::SetSelection(int n)
{ {
SetControl32BitValue( (ControlHandle) m_macControl , n + 1 ) ; SetControl32BitValue( (ControlHandle) m_macControl , n + 1 ) ;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// string list functions // string list functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
int wxChoice::GetCount() const int wxChoice::GetCount() const
{ {
return m_strings.GetCount() ; return m_strings.GetCount() ;
} }
int wxChoice::FindString(const wxString& s) const int wxChoice::FindString(const wxString& s) const
{ {
for( int i = 0 ; i < GetCount() ; i++ ) for( int i = 0 ; i < GetCount() ; i++ )
@@ -134,6 +149,7 @@ int wxChoice::FindString(const wxString& s) const
} }
return wxNOT_FOUND ; return wxNOT_FOUND ;
} }
void wxChoice::SetString(int n, const wxString& s) void wxChoice::SetString(int n, const wxString& s)
{ {
wxFAIL_MSG(wxT("wxChoice::SetString() not yet implemented")); wxFAIL_MSG(wxT("wxChoice::SetString() not yet implemented"));
@@ -157,20 +173,24 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
m_datas[n] = (char*) clientData ; m_datas[n] = (char*) clientData ;
} }
void *wxChoice::DoGetItemClientData(int n) const void *wxChoice::DoGetItemClientData(int n) const
{ {
wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL, wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
"invalid index in wxChoice::GetClientData" ); "invalid index in wxChoice::GetClientData" );
return (void *)m_datas[n]; return (void *)m_datas[n];
} }
void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData ) void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
{ {
DoSetItemClientData(n, clientData); DoSetItemClientData(n, clientData);
} }
wxClientData* wxChoice::DoGetItemClientObject( int n ) const wxClientData* wxChoice::DoGetItemClientObject( int n ) const
{ {
return (wxClientData *)DoGetItemClientData(n); return (wxClientData *)DoGetItemClientData(n);
} }
void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
{ {
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId ); wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId );
@@ -188,6 +208,7 @@ void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
ProcessCommand(event); ProcessCommand(event);
} }
} }
wxSize wxChoice::DoGetBestSize() const wxSize wxChoice::DoGetBestSize() const
{ {
int lbWidth = 100; // some defaults int lbWidth = 100; // some defaults

View File

@@ -895,12 +895,11 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
bool wxControl::MacCanFocus() const bool wxControl::MacCanFocus() const
{ {
{ if ( (ControlHandle) m_macControl == NULL ) if ( (ControlHandle) m_macControl == NULL )
return true ; return true ;
else else
return false ; return false ;
} }
}
void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
{ {

View File

@@ -8,9 +8,11 @@
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "dc.h" #pragma implementation "dc.h"
#endif #endif
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -30,9 +32,11 @@ using namespace std ;
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#define mm2inches 0.0393700787402 #define mm2inches 0.0393700787402
#define inches2mm 25.4 #define inches2mm 25.4
#define mm2twips 56.6929133859 #define mm2twips 56.6929133859
@@ -45,6 +49,7 @@ const double M_PI = 3.14159265358979 ;
const double RAD2DEG = 180.0 / M_PI; const double RAD2DEG = 180.0 / M_PI;
const short kEmulatedMode = -1 ; const short kEmulatedMode = -1 ;
const short kUnsupportedMode = -2 ; const short kUnsupportedMode = -2 ;
wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) : wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) :
m_ph( (GrafPtr) dc->m_macPort ) m_ph( (GrafPtr) dc->m_macPort )
{ {
@@ -52,10 +57,12 @@ wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) :
m_dc = dc ; m_dc = dc ;
dc->MacSetupPort(&m_ph) ; dc->MacSetupPort(&m_ph) ;
} }
wxMacPortSetter::~wxMacPortSetter() wxMacPortSetter::~wxMacPortSetter()
{ {
m_dc->MacCleanupPort(&m_ph) ; m_dc->MacCleanupPort(&m_ph) ;
} }
wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win )
{ {
m_formerClip = NewRgn() ; m_formerClip = NewRgn() ;
@@ -89,24 +96,28 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win )
SetClip( m_newClip ) ; SetClip( m_newClip ) ;
} }
} }
wxMacWindowClipper::~wxMacWindowClipper() wxMacWindowClipper::~wxMacWindowClipper()
{ {
SetClip( m_formerClip ) ; SetClip( m_formerClip ) ;
DisposeRgn( m_newClip ) ; DisposeRgn( m_newClip ) ;
DisposeRgn( m_formerClip ) ; DisposeRgn( m_formerClip ) ;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Local functions // Local functions
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static inline double dmin(double a, double b) { return a < b ? a : b; } static inline double dmin(double a, double b) { return a < b ? a : b; }
static inline double dmax(double a, double b) { return a > b ? a : b; } static inline double dmax(double a, double b) { return a > b ? a : b; }
static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxDC // wxDC
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// this function emulates all wx colour manipulations, used to verify the implementation // this function emulates all wx colour manipulations, used to verify the implementation
// by setting the mode in the blitting functions to kEmulatedMode // by setting the mode in the blitting functions to kEmulatedMode
void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor ) ; void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor ) ;
void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor ) void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor )
{ {
switch ( logical_func ) switch ( logical_func )
@@ -190,6 +201,7 @@ void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColo
break ; break ;
} }
} }
wxDC::wxDC() wxDC::wxDC()
{ {
m_ok = FALSE; m_ok = FALSE;
@@ -228,11 +240,13 @@ wxDC::wxDC()
m_macForegroundPixMap = NULL ; m_macForegroundPixMap = NULL ;
m_macBackgroundPixMap = NULL ; m_macBackgroundPixMap = NULL ;
} }
wxDC::~wxDC(void) wxDC::~wxDC(void)
{ {
DisposeRgn( (RgnHandle) m_macBoundaryClipRgn ) ; DisposeRgn( (RgnHandle) m_macBoundaryClipRgn ) ;
DisposeRgn( (RgnHandle) m_macCurrentClipRgn ) ; DisposeRgn( (RgnHandle) m_macCurrentClipRgn ) ;
} }
void wxDC::MacSetupPort(wxMacPortStateHelper* help) const void wxDC::MacSetupPort(wxMacPortStateHelper* help) const
{ {
wxASSERT( m_macCurrentPortStateHelper == NULL ) ; wxASSERT( m_macCurrentPortStateHelper == NULL ) ;
@@ -242,6 +256,7 @@ void wxDC::MacSetupPort(wxMacPortStateHelper* help) const
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macPenInstalled = false ; m_macPenInstalled = false ;
} }
void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const
{ {
wxASSERT( m_macCurrentPortStateHelper == help ) ; wxASSERT( m_macCurrentPortStateHelper == help ) ;
@@ -271,6 +286,7 @@ void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const
m_macBackgroundPixMap = NULL ; m_macBackgroundPixMap = NULL ;
} }
} }
void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask ) void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask )
{ {
wxCHECK_RET( Ok(), wxT("invalid window dc") ); wxCHECK_RET( Ok(), wxT("invalid window dc") );
@@ -356,12 +372,14 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ) void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
{ {
wxCHECK_RET(Ok(), wxT("Invalid dc wxDC::DoDrawIcon")); wxCHECK_RET(Ok(), wxT("Invalid dc wxDC::DoDrawIcon"));
wxCHECK_RET(icon.Ok(), wxT("Invalid icon wxDC::DoDrawIcon")); wxCHECK_RET(icon.Ok(), wxT("Invalid icon wxDC::DoDrawIcon"));
DoDrawBitmap( icon , x , y , icon.GetMask() != NULL ) ; DoDrawBitmap( icon , x , y , icon.GetMask() != NULL ) ;
} }
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
{ {
wxCHECK_RET(Ok(), wxT("wxDC::DoSetClippingRegion Invalid DC")); wxCHECK_RET(Ok(), wxT("wxDC::DoSetClippingRegion Invalid DC"));
@@ -388,6 +406,7 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei
m_clipY2 = yy + hh; m_clipY2 = yy + hh;
} }
} }
void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region ) void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region )
{ {
wxCHECK_RET( Ok(), wxT("invalid window dc") ) ; wxCHECK_RET( Ok(), wxT("invalid window dc") ) ;
@@ -435,17 +454,20 @@ void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region )
} }
} }
} }
void wxDC::DestroyClippingRegion() void wxDC::DestroyClippingRegion()
{ {
wxMacPortSetter helper(this) ; wxMacPortSetter helper(this) ;
CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ; CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
m_clipping = FALSE; m_clipping = FALSE;
} }
void wxDC::DoGetSize( int* width, int* height ) const void wxDC::DoGetSize( int* width, int* height ) const
{ {
*width = m_maxX-m_minX; *width = m_maxX-m_minX;
*height = m_maxY-m_minY; *height = m_maxY-m_minY;
} }
void wxDC::DoGetSizeMM( int* width, int* height ) const void wxDC::DoGetSizeMM( int* width, int* height ) const
{ {
int w = 0; int w = 0;
@@ -454,18 +476,21 @@ void wxDC::DoGetSizeMM( int* width, int* height ) const
*width = long( double(w) / (m_scaleX*m_mm_to_pix_x) ); *width = long( double(w) / (m_scaleX*m_mm_to_pix_x) );
*height = long( double(h) / (m_scaleY*m_mm_to_pix_y) ); *height = long( double(h) / (m_scaleY*m_mm_to_pix_y) );
} }
void wxDC::SetTextForeground( const wxColour &col ) void wxDC::SetTextForeground( const wxColour &col )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
m_textForegroundColour = col; m_textForegroundColour = col;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::SetTextBackground( const wxColour &col ) void wxDC::SetTextBackground( const wxColour &col )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
m_textBackgroundColour = col; m_textBackgroundColour = col;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::SetMapMode( int mode ) void wxDC::SetMapMode( int mode )
{ {
switch (mode) switch (mode)
@@ -493,6 +518,7 @@ void wxDC::SetMapMode( int mode )
m_needComputeScaleY = TRUE; m_needComputeScaleY = TRUE;
} }
} }
void wxDC::SetUserScale( double x, double y ) void wxDC::SetUserScale( double x, double y )
{ {
// allow negative ? -> no // allow negative ? -> no
@@ -500,6 +526,7 @@ void wxDC::SetUserScale( double x, double y )
m_userScaleY = y; m_userScaleY = y;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
void wxDC::SetLogicalScale( double x, double y ) void wxDC::SetLogicalScale( double x, double y )
{ {
// allow negative ? // allow negative ?
@@ -507,18 +534,21 @@ void wxDC::SetLogicalScale( double x, double y )
m_logicalScaleY = y; m_logicalScaleY = y;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
void wxDC::SetLogicalOrigin( wxCoord x, wxCoord y ) void wxDC::SetLogicalOrigin( wxCoord x, wxCoord y )
{ {
m_logicalOriginX = x * m_signX; // is this still correct ? m_logicalOriginX = x * m_signX; // is this still correct ?
m_logicalOriginY = y * m_signY; m_logicalOriginY = y * m_signY;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
void wxDC::SetDeviceOrigin( wxCoord x, wxCoord y ) void wxDC::SetDeviceOrigin( wxCoord x, wxCoord y )
{ {
m_externalDeviceOriginX = x; m_externalDeviceOriginX = x;
m_externalDeviceOriginY = y; m_externalDeviceOriginY = y;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
#if 0 #if 0
void wxDC::SetInternalDeviceOrigin( long x, long y ) void wxDC::SetInternalDeviceOrigin( long x, long y )
{ {
@@ -532,16 +562,19 @@ void wxDC::GetInternalDeviceOrigin( long *x, long *y )
if (y) *y = m_internalDeviceOriginY; if (y) *y = m_internalDeviceOriginY;
} }
#endif #endif
void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
{ {
m_signX = (xLeftRight ? 1 : -1); m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1); m_signY = (yBottomUp ? -1 : 1);
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
wxSize wxDC::GetPPI() const wxSize wxDC::GetPPI() const
{ {
return wxSize(72, 72); return wxSize(72, 72);
} }
int wxDC::GetDepth() const int wxDC::GetDepth() const
{ {
if ( IsPortColor( (CGrafPtr) m_macPort ) ) if ( IsPortColor( (CGrafPtr) m_macPort ) )
@@ -550,6 +583,7 @@ int wxDC::GetDepth() const
} }
return 1 ; return 1 ;
} }
void wxDC::ComputeScaleAndOrigin() void wxDC::ComputeScaleAndOrigin()
{ {
// CMB: copy scale to see if it changes // CMB: copy scale to see if it changes
@@ -570,18 +604,22 @@ void wxDC::ComputeScaleAndOrigin()
SetPen(* pen); SetPen(* pen);
} }
} }
void wxDC::SetPalette( const wxPalette& palette ) void wxDC::SetPalette( const wxPalette& palette )
{ {
} }
void wxDC::SetBackgroundMode( int mode ) void wxDC::SetBackgroundMode( int mode )
{ {
m_backgroundMode = mode ; m_backgroundMode = mode ;
} }
void wxDC::SetFont( const wxFont &font ) void wxDC::SetFont( const wxFont &font )
{ {
m_font = font; m_font = font;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::SetPen( const wxPen &pen ) void wxDC::SetPen( const wxPen &pen )
{ {
if ( m_pen == pen ) if ( m_pen == pen )
@@ -589,6 +627,7 @@ void wxDC::SetPen( const wxPen &pen )
m_pen = pen; m_pen = pen;
m_macPenInstalled = false ; m_macPenInstalled = false ;
} }
void wxDC::SetBrush( const wxBrush &brush ) void wxDC::SetBrush( const wxBrush &brush )
{ {
if (m_brush == brush) if (m_brush == brush)
@@ -596,6 +635,7 @@ void wxDC::SetBrush( const wxBrush &brush )
m_brush = brush; m_brush = brush;
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
} }
void wxDC::SetBackground( const wxBrush &brush ) void wxDC::SetBackground( const wxBrush &brush )
{ {
if (m_backgroundBrush == brush) if (m_backgroundBrush == brush)
@@ -605,6 +645,7 @@ void wxDC::SetBackground( const wxBrush &brush )
return; return;
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
} }
void wxDC::SetLogicalFunction( int function ) void wxDC::SetLogicalFunction( int function )
{ {
if (m_logicalFunction == function) if (m_logicalFunction == function)
@@ -614,13 +655,16 @@ void wxDC::SetLogicalFunction( int function )
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macPenInstalled = false ; m_macPenInstalled = false ;
} }
extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
const wxColour & col, int style); const wxColour & col, int style);
bool wxDC::DoFloodFill(wxCoord x, wxCoord y, bool wxDC::DoFloodFill(wxCoord x, wxCoord y,
const wxColour& col, int style) const wxColour& col, int style)
{ {
return wxDoFloodFill(this, x, y, col, style); return wxDoFloodFill(this, x, y, col, style);
} }
bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const
{ {
wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") ); wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") );
@@ -633,6 +677,7 @@ bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const
colour.blue >> 8); colour.blue >> 8);
return true ; return true ;
} }
void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 ) void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -670,6 +715,7 @@ void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )
::LineTo(xx2, yy2); ::LineTo(xx2, yy2);
} }
} }
void wxDC::DoCrossHair( wxCoord x, wxCoord y ) void wxDC::DoCrossHair( wxCoord x, wxCoord y )
{ {
wxCHECK_RET( Ok(), wxT("wxDC::DoCrossHair Invalid window dc") ); wxCHECK_RET( Ok(), wxT("wxDC::DoCrossHair Invalid window dc") );
@@ -690,6 +736,7 @@ void wxDC::DoCrossHair( wxCoord x, wxCoord y )
CalcBoundingBox(x+w, y+h); CalcBoundingBox(x+w, y+h);
} }
} }
/* /*
* To draw arcs properly the angles need to be converted from the WX style: * To draw arcs properly the angles need to be converted from the WX style:
* Angles start on the +ve X axis and go anti-clockwise (As you would draw on * Angles start on the +ve X axis and go anti-clockwise (As you would draw on
@@ -698,6 +745,7 @@ void wxDC::DoCrossHair( wxCoord x, wxCoord y )
* the Mac style: * the Mac style:
* Angles start on the +ve y axis and go clockwise. * Angles start on the +ve y axis and go clockwise.
*/ */
static double wxConvertWXangleToMACangle(double angle) static double wxConvertWXangleToMACangle(double angle)
{ {
double newAngle = 90 - angle ; double newAngle = 90 - angle ;
@@ -705,6 +753,7 @@ static double wxConvertWXangleToMACangle(double angle)
newAngle += 360 ; newAngle += 360 ;
return newAngle ; return newAngle ;
} }
void wxDC::DoDrawArc( wxCoord x1, wxCoord y1, void wxDC::DoDrawArc( wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2, wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc ) wxCoord xc, wxCoord yc )
@@ -755,6 +804,7 @@ void wxDC::DoDrawArc( wxCoord x1, wxCoord y1,
FrameArc(&r, alpha1, alpha2); FrameArc(&r, alpha1, alpha2);
} }
} }
void wxDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, void wxDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea ) double sa, double ea )
{ {
@@ -786,6 +836,7 @@ void wxDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
FrameArc(&r, (short)sa, (short)angle); FrameArc(&r, (short)sa, (short)angle);
} }
} }
void wxDC::DoDrawPoint( wxCoord x, wxCoord y ) void wxDC::DoDrawPoint( wxCoord x, wxCoord y )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -799,6 +850,7 @@ void wxDC::DoDrawPoint( wxCoord x, wxCoord y )
CalcBoundingBox(x, y); CalcBoundingBox(x, y);
} }
} }
void wxDC::DoDrawLines(int n, wxPoint points[], void wxDC::DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset) wxCoord xoffset, wxCoord yoffset)
{ {
@@ -820,6 +872,7 @@ void wxDC::DoDrawLines(int n, wxPoint points[],
::LineTo( x2 - offset, y2 - offset ); ::LineTo( x2 - offset, y2 - offset );
} }
} }
void wxDC::DoDrawPolygon(int n, wxPoint points[], void wxDC::DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset, wxCoord xoffset, wxCoord yoffset,
int fillStyle ) int fillStyle )
@@ -857,6 +910,7 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[],
} }
KillPoly( polygon ); KillPoly( polygon );
} }
void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -891,6 +945,7 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
::FrameRect( &rect ) ; ::FrameRect( &rect ) ;
} }
} }
void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y,
wxCoord width, wxCoord height, wxCoord width, wxCoord height,
double radius) double radius)
@@ -929,6 +984,7 @@ void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y,
::FrameRoundRect( &rect , int(radius * 2) , int(radius * 2) ) ; ::FrameRoundRect( &rect , int(radius * 2) , int(radius * 2) ) ;
} }
} }
void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -964,7 +1020,6 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
} }
} }
bool wxDC::CanDrawBitmap(void) const bool wxDC::CanDrawBitmap(void) const
{ {
return true ; return true ;
@@ -1217,10 +1272,12 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
m_macFontInstalled = false ; m_macFontInstalled = false ;
return TRUE; return TRUE;
} }
inline Fixed IntToFixed( int inInt ) inline Fixed IntToFixed( int inInt )
{ {
return (((SInt32) inInt) << 16); return (((SInt32) inInt) << 16);
} }
inline int FixedToInt( Fixed inFixed ) inline int FixedToInt( Fixed inFixed )
{ {
return (((SInt32) inFixed) >> 16); return (((SInt32) inFixed) >> 16);
@@ -1319,6 +1376,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
::ATSUDisposeTextLayout(atsuLayout); ::ATSUDisposeTextLayout(atsuLayout);
delete[] buf ; delete[] buf ;
} }
void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y) void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
{ {
wxCHECK_RET(Ok(), wxT("wxDC::DoDrawText Invalid DC")); wxCHECK_RET(Ok(), wxT("wxDC::DoDrawText Invalid DC"));
@@ -1452,11 +1510,13 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
} }
::TextMode( srcOr ) ; ::TextMode( srcOr ) ;
} }
bool wxDC::CanGetTextExtent() const bool wxDC::CanGetTextExtent() const
{ {
wxCHECK_MSG(Ok(), false, wxT("Invalid DC")); wxCHECK_MSG(Ok(), false, wxT("Invalid DC"));
return true ; return true ;
} }
void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height, void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading , wxCoord *descent, wxCoord *externalLeading ,
wxFont *theFont ) const wxFont *theFont ) const
@@ -1566,6 +1626,7 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
} }
wxCoord wxDC::GetCharWidth(void) const wxCoord wxDC::GetCharWidth(void) const
{ {
wxCHECK_MSG(Ok(), 1, wxT("Invalid DC")); wxCHECK_MSG(Ok(), 1, wxT("Invalid DC"));
@@ -1600,6 +1661,7 @@ wxCoord wxDC::GetCharWidth(void) const
} }
return YDEV2LOGREL(width) ; return YDEV2LOGREL(width) ;
} }
wxCoord wxDC::GetCharHeight(void) const wxCoord wxDC::GetCharHeight(void) const
{ {
wxCHECK_MSG(Ok(), 1, wxT("Invalid DC")); wxCHECK_MSG(Ok(), 1, wxT("Invalid DC"));
@@ -1609,6 +1671,7 @@ wxCoord wxDC::GetCharHeight(void) const
::GetFontInfo( &fi ) ; ::GetFontInfo( &fi ) ;
return YDEV2LOGREL( fi.descent + fi.ascent ); return YDEV2LOGREL( fi.descent + fi.ascent );
} }
void wxDC::Clear(void) void wxDC::Clear(void)
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -1622,6 +1685,7 @@ void wxDC::Clear(void)
::EraseRect( &rect ) ; ::EraseRect( &rect ) ;
} }
} }
void wxDC::MacInstallFont() const void wxDC::MacInstallFont() const
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -1753,6 +1817,7 @@ void wxDC::MacInstallFont() const
atsuTags, atsuSizes, atsuValues); atsuTags, atsuSizes, atsuValues);
wxASSERT_MSG( status == noErr , "couldn't set create ATSU style" ) ; wxASSERT_MSG( status == noErr , "couldn't set create ATSU style" ) ;
} }
Pattern gHatchPatterns[] = Pattern gHatchPatterns[] =
{ {
{ { 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } }, { { 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } },
@@ -1763,6 +1828,7 @@ Pattern gHatchPatterns[] =
{ { 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } }, { { 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } },
{ { 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } } { { 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } }
} ; } ;
static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern) static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern)
{ {
int theIndex = 1 ; int theIndex = 1 ;
@@ -1792,6 +1858,7 @@ static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern)
} }
*pattern = gHatchPatterns[theIndex-1] ; *pattern = gHatchPatterns[theIndex-1] ;
} }
void wxDC::MacInstallPen() const void wxDC::MacInstallPen() const
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -1905,6 +1972,7 @@ void wxDC::MacInstallPen() const
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background ) void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background )
{ {
Pattern whiteColor ; Pattern whiteColor ;
@@ -1942,6 +2010,7 @@ void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background )
} }
} }
} }
void wxDC::MacInstallBrush() const void wxDC::MacInstallBrush() const
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -2083,6 +2152,7 @@ void wxDC::MacInstallBrush() const
m_macPenInstalled = false ; m_macPenInstalled = false ;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// coordinates transformations // coordinates transformations
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -2091,30 +2161,37 @@ wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
{ {
return ((wxDC *)this)->XDEV2LOG(x); return ((wxDC *)this)->XDEV2LOG(x);
} }
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
{ {
return ((wxDC *)this)->YDEV2LOG(y); return ((wxDC *)this)->YDEV2LOG(y);
} }
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
{ {
return ((wxDC *)this)->XDEV2LOGREL(x); return ((wxDC *)this)->XDEV2LOGREL(x);
} }
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
{ {
return ((wxDC *)this)->YDEV2LOGREL(y); return ((wxDC *)this)->YDEV2LOGREL(y);
} }
wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
{ {
return ((wxDC *)this)->XLOG2DEV(x); return ((wxDC *)this)->XLOG2DEV(x);
} }
wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
{ {
return ((wxDC *)this)->YLOG2DEV(y); return ((wxDC *)this)->YLOG2DEV(y);
} }
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
{ {
return ((wxDC *)this)->XLOG2DEVREL(x); return ((wxDC *)this)->XLOG2DEVREL(x);
} }
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
{ {
return ((wxDC *)this)->YLOG2DEVREL(y); return ((wxDC *)this)->YLOG2DEVREL(y);

View File

@@ -57,7 +57,6 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
long style, long style,
const wxString& name) const wxString& name)
{ {
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
@@ -68,6 +67,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
return TRUE; return TRUE;
} }
@@ -96,8 +96,7 @@ wxDialog::~wxDialog()
// By default, pressing escape cancels the dialog , on mac command-stop does the same thing // By default, pressing escape cancels the dialog , on mac command-stop does the same thing
void wxDialog::OnCharHook(wxKeyEvent& event) void wxDialog::OnCharHook(wxKeyEvent& event)
{ {
if ( if (( event.m_keyCode == WXK_ESCAPE ||
( event.m_keyCode == WXK_ESCAPE ||
( event.m_keyCode == '.' && event.MetaDown() ) ) ( event.m_keyCode == '.' && event.MetaDown() ) )
&& FindWindow(wxID_CANCEL) ) && FindWindow(wxID_CANCEL) )
{ {

View File

@@ -121,7 +121,6 @@ wxFrame::~wxFrame()
m_isBeingDeleted = TRUE; m_isBeingDeleted = TRUE;
DeleteAllBars(); DeleteAllBars();
} }

View File

@@ -9,7 +9,6 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "menu.h" #pragma implementation "menu.h"
#pragma implementation "menuitem.h" #pragma implementation "menuitem.h"

View File

@@ -38,7 +38,6 @@ END_EVENT_TABLE()
* eg. if(GetWindowStyle() & wxSL_VERTICAL) {} else { horizontal case }> * eg. if(GetWindowStyle() & wxSL_VERTICAL) {} else { horizontal case }>
*/ */
// Slider // Slider
wxSlider::wxSlider() wxSlider::wxSlider()
{ {

View File

@@ -902,5 +902,3 @@ bool WXDLLEXPORT wxIsWaitingForThread()
#include "wx/thrimpl.cpp" #include "wx/thrimpl.cpp"
#endif // wxUSE_THREADS #endif // wxUSE_THREADS
// vi:sts=4:sw=4:et

View File

@@ -116,7 +116,6 @@ void wxToolBar::Init()
bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name) long style, const wxString& name)
{ {
int x = pos.x; int x = pos.x;
int y = pos.y; int y = pos.y;
int width = size.x; int width = size.x;

View File

@@ -632,7 +632,6 @@ WXWidget wxTopLevelWindowMac::MacGetContainerForEmbedding()
void wxTopLevelWindowMac::MacUpdate( long timestamp) void wxTopLevelWindowMac::MacUpdate( long timestamp)
{ {
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( (WindowRef) m_macWindow) ) ; wxMacPortStateHelper help( (GrafPtr) GetWindowPort( (WindowRef) m_macWindow) ) ;
BeginUpdate( (WindowRef)m_macWindow ) ; BeginUpdate( (WindowRef)m_macWindow ) ;
@@ -770,6 +769,7 @@ void wxTopLevelWindowMac::MacFireMouseEvent(
MacDispatchMouseEvent( event ) ; MacDispatchMouseEvent( event ) ;
} }
} }
#if !TARGET_CARBON #if !TARGET_CARBON
void wxTopLevelWindowMac::MacMouseDown( WXEVENTREF ev , short part) void wxTopLevelWindowMac::MacMouseDown( WXEVENTREF ev , short part)

View File

@@ -692,8 +692,6 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow,
} }
// events // events
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
{ {
@@ -707,7 +705,6 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
UpdateControls( inWindow , inRgn ) ; UpdateControls( inWindow , inRgn ) ;
InvalWindowRgn( inWindow, updateRgn) ; InvalWindowRgn( inWindow, updateRgn) ;
DisposeRgn( updateRgn ) ; DisposeRgn( updateRgn ) ;
} }
bool UMAIsWindowFloating( WindowRef inWindow ) bool UMAIsWindowFloating( WindowRef inWindow )
@@ -750,6 +747,7 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
SetPort( port ) ; SetPort( port ) ;
} }
} }
OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState )
{ {
return ::DrawThemePlacard( inRect , inState ) ; return ::DrawThemePlacard( inRect , inState ) ;

View File

@@ -980,7 +980,7 @@ wxWindowMac *wxGetActiveWindow()
// Coordinates relative to the window // Coordinates relative to the window
void wxWindowMac::WarpPointer (int x_pos, int y_pos) void wxWindowMac::WarpPointer (int x_pos, int y_pos)
{ {
// We really dont move the mouse programmatically under mac // We really don't move the mouse programmatically under Mac.
} }
const wxBrush& wxWindowMac::MacGetBackgroundBrush() const wxBrush& wxWindowMac::MacGetBackgroundBrush()
@@ -1045,7 +1045,6 @@ const wxBrush& wxWindowMac::MacGetBackgroundBrush()
} }
return m_macBackgroundBrush ; return m_macBackgroundBrush ;
} }
void wxWindowMac::OnEraseBackground(wxEraseEvent& event) void wxWindowMac::OnEraseBackground(wxEraseEvent& event)

View File

@@ -8,17 +8,22 @@
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "choice.h" #pragma implementation "choice.h"
#endif #endif
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/choice.h" #include "wx/choice.h"
#include "wx/menu.h" #include "wx/menu.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl) IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
#endif #endif
extern MenuHandle NewUniqueMenu() ; extern MenuHandle NewUniqueMenu() ;
wxChoice::~wxChoice() wxChoice::~wxChoice()
{ {
if ( HasClientObjectData() ) if ( HasClientObjectData() )
@@ -32,6 +37,7 @@ wxChoice::~wxChoice()
// DeleteMenu( m_macPopUpMenuId ) ; // DeleteMenu( m_macPopUpMenuId ) ;
// DisposeMenu( m_macPopUpMenuHandle ) ; // DisposeMenu( m_macPopUpMenuHandle ) ;
} }
bool wxChoice::Create(wxWindow *parent, wxWindowID id, bool wxChoice::Create(wxWindow *parent, wxWindowID id,
const wxPoint& pos, const wxPoint& pos,
const wxSize& size, const wxSize& size,
@@ -60,6 +66,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
} }
return TRUE; return TRUE;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// adding/deleting items to/from the list // adding/deleting items to/from the list
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -73,6 +80,7 @@ int wxChoice::DoAppend(const wxString& item)
SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ; SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ;
return index ; return index ;
} }
void wxChoice::Delete(int n) void wxChoice::Delete(int n)
{ {
wxCHECK_RET( n < GetCount(), wxT("invalid item index in wxChoice::Delete") ); wxCHECK_RET( n < GetCount(), wxT("invalid item index in wxChoice::Delete") );
@@ -85,6 +93,7 @@ void wxChoice::Delete(int n)
m_datas.RemoveAt( n ) ; m_datas.RemoveAt( n ) ;
SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ; SetControl32BitMaximum( (ControlHandle) m_macControl , GetCount()) ;
} }
void wxChoice::Clear() void wxChoice::Clear()
{ {
FreeData(); FreeData();
@@ -96,6 +105,7 @@ void wxChoice::Clear()
m_datas.Empty() ; m_datas.Empty() ;
SetControl32BitMaximum( (ControlHandle) m_macControl , 0 ) ; SetControl32BitMaximum( (ControlHandle) m_macControl , 0 ) ;
} }
void wxChoice::FreeData() void wxChoice::FreeData()
{ {
if ( HasClientObjectData() ) if ( HasClientObjectData() )
@@ -107,6 +117,7 @@ void wxChoice::FreeData()
} }
} }
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// selection // selection
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -114,17 +125,21 @@ int wxChoice::GetSelection() const
{ {
return GetControl32BitValue( (ControlHandle) m_macControl ) -1 ; return GetControl32BitValue( (ControlHandle) m_macControl ) -1 ;
} }
void wxChoice::SetSelection(int n) void wxChoice::SetSelection(int n)
{ {
SetControl32BitValue( (ControlHandle) m_macControl , n + 1 ) ; SetControl32BitValue( (ControlHandle) m_macControl , n + 1 ) ;
} }
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// string list functions // string list functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
int wxChoice::GetCount() const int wxChoice::GetCount() const
{ {
return m_strings.GetCount() ; return m_strings.GetCount() ;
} }
int wxChoice::FindString(const wxString& s) const int wxChoice::FindString(const wxString& s) const
{ {
for( int i = 0 ; i < GetCount() ; i++ ) for( int i = 0 ; i < GetCount() ; i++ )
@@ -134,6 +149,7 @@ int wxChoice::FindString(const wxString& s) const
} }
return wxNOT_FOUND ; return wxNOT_FOUND ;
} }
void wxChoice::SetString(int n, const wxString& s) void wxChoice::SetString(int n, const wxString& s)
{ {
wxFAIL_MSG(wxT("wxChoice::SetString() not yet implemented")); wxFAIL_MSG(wxT("wxChoice::SetString() not yet implemented"));
@@ -157,20 +173,24 @@ void wxChoice::DoSetItemClientData( int n, void* clientData )
m_datas[n] = (char*) clientData ; m_datas[n] = (char*) clientData ;
} }
void *wxChoice::DoGetItemClientData(int n) const void *wxChoice::DoGetItemClientData(int n) const
{ {
wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL, wxCHECK_MSG( n >= 0 && (size_t)n < m_datas.GetCount(), NULL,
"invalid index in wxChoice::GetClientData" ); "invalid index in wxChoice::GetClientData" );
return (void *)m_datas[n]; return (void *)m_datas[n];
} }
void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData ) void wxChoice::DoSetItemClientObject( int n, wxClientData* clientData )
{ {
DoSetItemClientData(n, clientData); DoSetItemClientData(n, clientData);
} }
wxClientData* wxChoice::DoGetItemClientObject( int n ) const wxClientData* wxChoice::DoGetItemClientObject( int n ) const
{ {
return (wxClientData *)DoGetItemClientData(n); return (wxClientData *)DoGetItemClientData(n);
} }
void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
{ {
wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId ); wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId );
@@ -188,6 +208,7 @@ void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
ProcessCommand(event); ProcessCommand(event);
} }
} }
wxSize wxChoice::DoGetBestSize() const wxSize wxChoice::DoGetBestSize() const
{ {
int lbWidth = 100; // some defaults int lbWidth = 100; // some defaults

View File

@@ -895,12 +895,11 @@ void wxControl::OnMouseEvent( wxMouseEvent &event )
bool wxControl::MacCanFocus() const bool wxControl::MacCanFocus() const
{ {
{ if ( (ControlHandle) m_macControl == NULL ) if ( (ControlHandle) m_macControl == NULL )
return true ; return true ;
else else
return false ; return false ;
} }
}
void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart ) void wxControl::MacHandleControlClick( WXWidget control , wxInt16 controlpart )
{ {

View File

@@ -8,9 +8,11 @@
// Copyright: (c) Stefan Csomor // Copyright: (c) Stefan Csomor
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "dc.h" #pragma implementation "dc.h"
#endif #endif
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/app.h" #include "wx/app.h"
#include "wx/mac/uma.h" #include "wx/mac/uma.h"
@@ -30,9 +32,11 @@ using namespace std ;
#if !USE_SHARED_LIBRARY #if !USE_SHARED_LIBRARY
IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject) IMPLEMENT_ABSTRACT_CLASS(wxDC, wxObject)
#endif #endif
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// constants // constants
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
#define mm2inches 0.0393700787402 #define mm2inches 0.0393700787402
#define inches2mm 25.4 #define inches2mm 25.4
#define mm2twips 56.6929133859 #define mm2twips 56.6929133859
@@ -45,6 +49,7 @@ const double M_PI = 3.14159265358979 ;
const double RAD2DEG = 180.0 / M_PI; const double RAD2DEG = 180.0 / M_PI;
const short kEmulatedMode = -1 ; const short kEmulatedMode = -1 ;
const short kUnsupportedMode = -2 ; const short kUnsupportedMode = -2 ;
wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) : wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) :
m_ph( (GrafPtr) dc->m_macPort ) m_ph( (GrafPtr) dc->m_macPort )
{ {
@@ -52,10 +57,12 @@ wxMacPortSetter::wxMacPortSetter( const wxDC* dc ) :
m_dc = dc ; m_dc = dc ;
dc->MacSetupPort(&m_ph) ; dc->MacSetupPort(&m_ph) ;
} }
wxMacPortSetter::~wxMacPortSetter() wxMacPortSetter::~wxMacPortSetter()
{ {
m_dc->MacCleanupPort(&m_ph) ; m_dc->MacCleanupPort(&m_ph) ;
} }
wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win ) wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win )
{ {
m_formerClip = NewRgn() ; m_formerClip = NewRgn() ;
@@ -89,24 +96,28 @@ wxMacWindowClipper::wxMacWindowClipper( const wxWindow* win )
SetClip( m_newClip ) ; SetClip( m_newClip ) ;
} }
} }
wxMacWindowClipper::~wxMacWindowClipper() wxMacWindowClipper::~wxMacWindowClipper()
{ {
SetClip( m_formerClip ) ; SetClip( m_formerClip ) ;
DisposeRgn( m_newClip ) ; DisposeRgn( m_newClip ) ;
DisposeRgn( m_formerClip ) ; DisposeRgn( m_formerClip ) ;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// Local functions // Local functions
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
static inline double dmin(double a, double b) { return a < b ? a : b; } static inline double dmin(double a, double b) { return a < b ? a : b; }
static inline double dmax(double a, double b) { return a > b ? a : b; } static inline double dmax(double a, double b) { return a > b ? a : b; }
static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; } static inline double DegToRad(double deg) { return (deg * M_PI) / 180.0; }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxDC // wxDC
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// this function emulates all wx colour manipulations, used to verify the implementation // this function emulates all wx colour manipulations, used to verify the implementation
// by setting the mode in the blitting functions to kEmulatedMode // by setting the mode in the blitting functions to kEmulatedMode
void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor ) ; void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor ) ;
void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor ) void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColor &dstColor )
{ {
switch ( logical_func ) switch ( logical_func )
@@ -190,6 +201,7 @@ void wxMacCalculateColour( int logical_func , const RGBColor &srcColor , RGBColo
break ; break ;
} }
} }
wxDC::wxDC() wxDC::wxDC()
{ {
m_ok = FALSE; m_ok = FALSE;
@@ -228,11 +240,13 @@ wxDC::wxDC()
m_macForegroundPixMap = NULL ; m_macForegroundPixMap = NULL ;
m_macBackgroundPixMap = NULL ; m_macBackgroundPixMap = NULL ;
} }
wxDC::~wxDC(void) wxDC::~wxDC(void)
{ {
DisposeRgn( (RgnHandle) m_macBoundaryClipRgn ) ; DisposeRgn( (RgnHandle) m_macBoundaryClipRgn ) ;
DisposeRgn( (RgnHandle) m_macCurrentClipRgn ) ; DisposeRgn( (RgnHandle) m_macCurrentClipRgn ) ;
} }
void wxDC::MacSetupPort(wxMacPortStateHelper* help) const void wxDC::MacSetupPort(wxMacPortStateHelper* help) const
{ {
wxASSERT( m_macCurrentPortStateHelper == NULL ) ; wxASSERT( m_macCurrentPortStateHelper == NULL ) ;
@@ -242,6 +256,7 @@ void wxDC::MacSetupPort(wxMacPortStateHelper* help) const
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macPenInstalled = false ; m_macPenInstalled = false ;
} }
void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const
{ {
wxASSERT( m_macCurrentPortStateHelper == help ) ; wxASSERT( m_macCurrentPortStateHelper == help ) ;
@@ -271,6 +286,7 @@ void wxDC::MacCleanupPort(wxMacPortStateHelper* help) const
m_macBackgroundPixMap = NULL ; m_macBackgroundPixMap = NULL ;
} }
} }
void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask ) void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask )
{ {
wxCHECK_RET( Ok(), wxT("invalid window dc") ); wxCHECK_RET( Ok(), wxT("invalid window dc") );
@@ -356,12 +372,14 @@ void wxDC::DoDrawBitmap( const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y ) void wxDC::DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y )
{ {
wxCHECK_RET(Ok(), wxT("Invalid dc wxDC::DoDrawIcon")); wxCHECK_RET(Ok(), wxT("Invalid dc wxDC::DoDrawIcon"));
wxCHECK_RET(icon.Ok(), wxT("Invalid icon wxDC::DoDrawIcon")); wxCHECK_RET(icon.Ok(), wxT("Invalid icon wxDC::DoDrawIcon"));
DoDrawBitmap( icon , x , y , icon.GetMask() != NULL ) ; DoDrawBitmap( icon , x , y , icon.GetMask() != NULL ) ;
} }
void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height ) void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height )
{ {
wxCHECK_RET(Ok(), wxT("wxDC::DoSetClippingRegion Invalid DC")); wxCHECK_RET(Ok(), wxT("wxDC::DoSetClippingRegion Invalid DC"));
@@ -388,6 +406,7 @@ void wxDC::DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord hei
m_clipY2 = yy + hh; m_clipY2 = yy + hh;
} }
} }
void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region ) void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region )
{ {
wxCHECK_RET( Ok(), wxT("invalid window dc") ) ; wxCHECK_RET( Ok(), wxT("invalid window dc") ) ;
@@ -435,17 +454,20 @@ void wxDC::DoSetClippingRegionAsRegion( const wxRegion &region )
} }
} }
} }
void wxDC::DestroyClippingRegion() void wxDC::DestroyClippingRegion()
{ {
wxMacPortSetter helper(this) ; wxMacPortSetter helper(this) ;
CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ; CopyRgn( (RgnHandle) m_macBoundaryClipRgn , (RgnHandle) m_macCurrentClipRgn ) ;
m_clipping = FALSE; m_clipping = FALSE;
} }
void wxDC::DoGetSize( int* width, int* height ) const void wxDC::DoGetSize( int* width, int* height ) const
{ {
*width = m_maxX-m_minX; *width = m_maxX-m_minX;
*height = m_maxY-m_minY; *height = m_maxY-m_minY;
} }
void wxDC::DoGetSizeMM( int* width, int* height ) const void wxDC::DoGetSizeMM( int* width, int* height ) const
{ {
int w = 0; int w = 0;
@@ -454,18 +476,21 @@ void wxDC::DoGetSizeMM( int* width, int* height ) const
*width = long( double(w) / (m_scaleX*m_mm_to_pix_x) ); *width = long( double(w) / (m_scaleX*m_mm_to_pix_x) );
*height = long( double(h) / (m_scaleY*m_mm_to_pix_y) ); *height = long( double(h) / (m_scaleY*m_mm_to_pix_y) );
} }
void wxDC::SetTextForeground( const wxColour &col ) void wxDC::SetTextForeground( const wxColour &col )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
m_textForegroundColour = col; m_textForegroundColour = col;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::SetTextBackground( const wxColour &col ) void wxDC::SetTextBackground( const wxColour &col )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
m_textBackgroundColour = col; m_textBackgroundColour = col;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::SetMapMode( int mode ) void wxDC::SetMapMode( int mode )
{ {
switch (mode) switch (mode)
@@ -493,6 +518,7 @@ void wxDC::SetMapMode( int mode )
m_needComputeScaleY = TRUE; m_needComputeScaleY = TRUE;
} }
} }
void wxDC::SetUserScale( double x, double y ) void wxDC::SetUserScale( double x, double y )
{ {
// allow negative ? -> no // allow negative ? -> no
@@ -500,6 +526,7 @@ void wxDC::SetUserScale( double x, double y )
m_userScaleY = y; m_userScaleY = y;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
void wxDC::SetLogicalScale( double x, double y ) void wxDC::SetLogicalScale( double x, double y )
{ {
// allow negative ? // allow negative ?
@@ -507,18 +534,21 @@ void wxDC::SetLogicalScale( double x, double y )
m_logicalScaleY = y; m_logicalScaleY = y;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
void wxDC::SetLogicalOrigin( wxCoord x, wxCoord y ) void wxDC::SetLogicalOrigin( wxCoord x, wxCoord y )
{ {
m_logicalOriginX = x * m_signX; // is this still correct ? m_logicalOriginX = x * m_signX; // is this still correct ?
m_logicalOriginY = y * m_signY; m_logicalOriginY = y * m_signY;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
void wxDC::SetDeviceOrigin( wxCoord x, wxCoord y ) void wxDC::SetDeviceOrigin( wxCoord x, wxCoord y )
{ {
m_externalDeviceOriginX = x; m_externalDeviceOriginX = x;
m_externalDeviceOriginY = y; m_externalDeviceOriginY = y;
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
#if 0 #if 0
void wxDC::SetInternalDeviceOrigin( long x, long y ) void wxDC::SetInternalDeviceOrigin( long x, long y )
{ {
@@ -532,16 +562,19 @@ void wxDC::GetInternalDeviceOrigin( long *x, long *y )
if (y) *y = m_internalDeviceOriginY; if (y) *y = m_internalDeviceOriginY;
} }
#endif #endif
void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp ) void wxDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
{ {
m_signX = (xLeftRight ? 1 : -1); m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1); m_signY = (yBottomUp ? -1 : 1);
ComputeScaleAndOrigin(); ComputeScaleAndOrigin();
} }
wxSize wxDC::GetPPI() const wxSize wxDC::GetPPI() const
{ {
return wxSize(72, 72); return wxSize(72, 72);
} }
int wxDC::GetDepth() const int wxDC::GetDepth() const
{ {
if ( IsPortColor( (CGrafPtr) m_macPort ) ) if ( IsPortColor( (CGrafPtr) m_macPort ) )
@@ -550,6 +583,7 @@ int wxDC::GetDepth() const
} }
return 1 ; return 1 ;
} }
void wxDC::ComputeScaleAndOrigin() void wxDC::ComputeScaleAndOrigin()
{ {
// CMB: copy scale to see if it changes // CMB: copy scale to see if it changes
@@ -570,18 +604,22 @@ void wxDC::ComputeScaleAndOrigin()
SetPen(* pen); SetPen(* pen);
} }
} }
void wxDC::SetPalette( const wxPalette& palette ) void wxDC::SetPalette( const wxPalette& palette )
{ {
} }
void wxDC::SetBackgroundMode( int mode ) void wxDC::SetBackgroundMode( int mode )
{ {
m_backgroundMode = mode ; m_backgroundMode = mode ;
} }
void wxDC::SetFont( const wxFont &font ) void wxDC::SetFont( const wxFont &font )
{ {
m_font = font; m_font = font;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::SetPen( const wxPen &pen ) void wxDC::SetPen( const wxPen &pen )
{ {
if ( m_pen == pen ) if ( m_pen == pen )
@@ -589,6 +627,7 @@ void wxDC::SetPen( const wxPen &pen )
m_pen = pen; m_pen = pen;
m_macPenInstalled = false ; m_macPenInstalled = false ;
} }
void wxDC::SetBrush( const wxBrush &brush ) void wxDC::SetBrush( const wxBrush &brush )
{ {
if (m_brush == brush) if (m_brush == brush)
@@ -596,6 +635,7 @@ void wxDC::SetBrush( const wxBrush &brush )
m_brush = brush; m_brush = brush;
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
} }
void wxDC::SetBackground( const wxBrush &brush ) void wxDC::SetBackground( const wxBrush &brush )
{ {
if (m_backgroundBrush == brush) if (m_backgroundBrush == brush)
@@ -605,6 +645,7 @@ void wxDC::SetBackground( const wxBrush &brush )
return; return;
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
} }
void wxDC::SetLogicalFunction( int function ) void wxDC::SetLogicalFunction( int function )
{ {
if (m_logicalFunction == function) if (m_logicalFunction == function)
@@ -614,13 +655,16 @@ void wxDC::SetLogicalFunction( int function )
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macPenInstalled = false ; m_macPenInstalled = false ;
} }
extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y, extern bool wxDoFloodFill(wxDC *dc, wxCoord x, wxCoord y,
const wxColour & col, int style); const wxColour & col, int style);
bool wxDC::DoFloodFill(wxCoord x, wxCoord y, bool wxDC::DoFloodFill(wxCoord x, wxCoord y,
const wxColour& col, int style) const wxColour& col, int style)
{ {
return wxDoFloodFill(this, x, y, col, style); return wxDoFloodFill(this, x, y, col, style);
} }
bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const
{ {
wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") ); wxCHECK_MSG( Ok(), false, wxT("wxDC::DoGetPixel Invalid DC") );
@@ -633,6 +677,7 @@ bool wxDC::DoGetPixel( wxCoord x, wxCoord y, wxColour *col ) const
colour.blue >> 8); colour.blue >> 8);
return true ; return true ;
} }
void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 ) void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -670,6 +715,7 @@ void wxDC::DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 )
::LineTo(xx2, yy2); ::LineTo(xx2, yy2);
} }
} }
void wxDC::DoCrossHair( wxCoord x, wxCoord y ) void wxDC::DoCrossHair( wxCoord x, wxCoord y )
{ {
wxCHECK_RET( Ok(), wxT("wxDC::DoCrossHair Invalid window dc") ); wxCHECK_RET( Ok(), wxT("wxDC::DoCrossHair Invalid window dc") );
@@ -690,6 +736,7 @@ void wxDC::DoCrossHair( wxCoord x, wxCoord y )
CalcBoundingBox(x+w, y+h); CalcBoundingBox(x+w, y+h);
} }
} }
/* /*
* To draw arcs properly the angles need to be converted from the WX style: * To draw arcs properly the angles need to be converted from the WX style:
* Angles start on the +ve X axis and go anti-clockwise (As you would draw on * Angles start on the +ve X axis and go anti-clockwise (As you would draw on
@@ -698,6 +745,7 @@ void wxDC::DoCrossHair( wxCoord x, wxCoord y )
* the Mac style: * the Mac style:
* Angles start on the +ve y axis and go clockwise. * Angles start on the +ve y axis and go clockwise.
*/ */
static double wxConvertWXangleToMACangle(double angle) static double wxConvertWXangleToMACangle(double angle)
{ {
double newAngle = 90 - angle ; double newAngle = 90 - angle ;
@@ -705,6 +753,7 @@ static double wxConvertWXangleToMACangle(double angle)
newAngle += 360 ; newAngle += 360 ;
return newAngle ; return newAngle ;
} }
void wxDC::DoDrawArc( wxCoord x1, wxCoord y1, void wxDC::DoDrawArc( wxCoord x1, wxCoord y1,
wxCoord x2, wxCoord y2, wxCoord x2, wxCoord y2,
wxCoord xc, wxCoord yc ) wxCoord xc, wxCoord yc )
@@ -755,6 +804,7 @@ void wxDC::DoDrawArc( wxCoord x1, wxCoord y1,
FrameArc(&r, alpha1, alpha2); FrameArc(&r, alpha1, alpha2);
} }
} }
void wxDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h, void wxDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
double sa, double ea ) double sa, double ea )
{ {
@@ -786,6 +836,7 @@ void wxDC::DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord w, wxCoord h,
FrameArc(&r, (short)sa, (short)angle); FrameArc(&r, (short)sa, (short)angle);
} }
} }
void wxDC::DoDrawPoint( wxCoord x, wxCoord y ) void wxDC::DoDrawPoint( wxCoord x, wxCoord y )
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -799,6 +850,7 @@ void wxDC::DoDrawPoint( wxCoord x, wxCoord y )
CalcBoundingBox(x, y); CalcBoundingBox(x, y);
} }
} }
void wxDC::DoDrawLines(int n, wxPoint points[], void wxDC::DoDrawLines(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset) wxCoord xoffset, wxCoord yoffset)
{ {
@@ -820,6 +872,7 @@ void wxDC::DoDrawLines(int n, wxPoint points[],
::LineTo( x2 - offset, y2 - offset ); ::LineTo( x2 - offset, y2 - offset );
} }
} }
void wxDC::DoDrawPolygon(int n, wxPoint points[], void wxDC::DoDrawPolygon(int n, wxPoint points[],
wxCoord xoffset, wxCoord yoffset, wxCoord xoffset, wxCoord yoffset,
int fillStyle ) int fillStyle )
@@ -857,6 +910,7 @@ void wxDC::DoDrawPolygon(int n, wxPoint points[],
} }
KillPoly( polygon ); KillPoly( polygon );
} }
void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height) void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -891,6 +945,7 @@ void wxDC::DoDrawRectangle(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
::FrameRect( &rect ) ; ::FrameRect( &rect ) ;
} }
} }
void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y, void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y,
wxCoord width, wxCoord height, wxCoord width, wxCoord height,
double radius) double radius)
@@ -929,6 +984,7 @@ void wxDC::DoDrawRoundedRectangle(wxCoord x, wxCoord y,
::FrameRoundRect( &rect , int(radius * 2) , int(radius * 2) ) ; ::FrameRoundRect( &rect , int(radius * 2) , int(radius * 2) ) ;
} }
} }
void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height) void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -964,7 +1020,6 @@ void wxDC::DoDrawEllipse(wxCoord x, wxCoord y, wxCoord width, wxCoord height)
} }
} }
bool wxDC::CanDrawBitmap(void) const bool wxDC::CanDrawBitmap(void) const
{ {
return true ; return true ;
@@ -1217,10 +1272,12 @@ bool wxDC::DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
m_macFontInstalled = false ; m_macFontInstalled = false ;
return TRUE; return TRUE;
} }
inline Fixed IntToFixed( int inInt ) inline Fixed IntToFixed( int inInt )
{ {
return (((SInt32) inInt) << 16); return (((SInt32) inInt) << 16);
} }
inline int FixedToInt( Fixed inFixed ) inline int FixedToInt( Fixed inFixed )
{ {
return (((SInt32) inFixed) >> 16); return (((SInt32) inFixed) >> 16);
@@ -1319,6 +1376,7 @@ void wxDC::DoDrawRotatedText(const wxString& str, wxCoord x, wxCoord y,
::ATSUDisposeTextLayout(atsuLayout); ::ATSUDisposeTextLayout(atsuLayout);
delete[] buf ; delete[] buf ;
} }
void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y) void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
{ {
wxCHECK_RET(Ok(), wxT("wxDC::DoDrawText Invalid DC")); wxCHECK_RET(Ok(), wxT("wxDC::DoDrawText Invalid DC"));
@@ -1452,11 +1510,13 @@ void wxDC::DoDrawText(const wxString& strtext, wxCoord x, wxCoord y)
} }
::TextMode( srcOr ) ; ::TextMode( srcOr ) ;
} }
bool wxDC::CanGetTextExtent() const bool wxDC::CanGetTextExtent() const
{ {
wxCHECK_MSG(Ok(), false, wxT("Invalid DC")); wxCHECK_MSG(Ok(), false, wxT("Invalid DC"));
return true ; return true ;
} }
void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height, void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *height,
wxCoord *descent, wxCoord *externalLeading , wxCoord *descent, wxCoord *externalLeading ,
wxFont *theFont ) const wxFont *theFont ) const
@@ -1566,6 +1626,7 @@ void wxDC::DoGetTextExtent( const wxString &string, wxCoord *width, wxCoord *he
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
} }
wxCoord wxDC::GetCharWidth(void) const wxCoord wxDC::GetCharWidth(void) const
{ {
wxCHECK_MSG(Ok(), 1, wxT("Invalid DC")); wxCHECK_MSG(Ok(), 1, wxT("Invalid DC"));
@@ -1600,6 +1661,7 @@ wxCoord wxDC::GetCharWidth(void) const
} }
return YDEV2LOGREL(width) ; return YDEV2LOGREL(width) ;
} }
wxCoord wxDC::GetCharHeight(void) const wxCoord wxDC::GetCharHeight(void) const
{ {
wxCHECK_MSG(Ok(), 1, wxT("Invalid DC")); wxCHECK_MSG(Ok(), 1, wxT("Invalid DC"));
@@ -1609,6 +1671,7 @@ wxCoord wxDC::GetCharHeight(void) const
::GetFontInfo( &fi ) ; ::GetFontInfo( &fi ) ;
return YDEV2LOGREL( fi.descent + fi.ascent ); return YDEV2LOGREL( fi.descent + fi.ascent );
} }
void wxDC::Clear(void) void wxDC::Clear(void)
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -1622,6 +1685,7 @@ void wxDC::Clear(void)
::EraseRect( &rect ) ; ::EraseRect( &rect ) ;
} }
} }
void wxDC::MacInstallFont() const void wxDC::MacInstallFont() const
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -1753,6 +1817,7 @@ void wxDC::MacInstallFont() const
atsuTags, atsuSizes, atsuValues); atsuTags, atsuSizes, atsuValues);
wxASSERT_MSG( status == noErr , "couldn't set create ATSU style" ) ; wxASSERT_MSG( status == noErr , "couldn't set create ATSU style" ) ;
} }
Pattern gHatchPatterns[] = Pattern gHatchPatterns[] =
{ {
{ { 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } }, { { 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF , 0xFF } },
@@ -1763,6 +1828,7 @@ Pattern gHatchPatterns[] =
{ { 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } }, { { 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 , 0x10 } },
{ { 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } } { { 0x81 , 0x42 , 0x24 , 0x18 , 0x18 , 0x24 , 0x42 , 0x81 } }
} ; } ;
static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern) static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern)
{ {
int theIndex = 1 ; int theIndex = 1 ;
@@ -1792,6 +1858,7 @@ static void wxMacGetHatchPattern(int hatchStyle, Pattern *pattern)
} }
*pattern = gHatchPatterns[theIndex-1] ; *pattern = gHatchPatterns[theIndex-1] ;
} }
void wxDC::MacInstallPen() const void wxDC::MacInstallPen() const
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -1905,6 +1972,7 @@ void wxDC::MacInstallPen() const
m_macBrushInstalled = false ; m_macBrushInstalled = false ;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background ) void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background )
{ {
Pattern whiteColor ; Pattern whiteColor ;
@@ -1942,6 +2010,7 @@ void wxDC::MacSetupBackgroundForCurrentPort(const wxBrush& background )
} }
} }
} }
void wxDC::MacInstallBrush() const void wxDC::MacInstallBrush() const
{ {
wxCHECK_RET(Ok(), wxT("Invalid DC")); wxCHECK_RET(Ok(), wxT("Invalid DC"));
@@ -2083,6 +2152,7 @@ void wxDC::MacInstallBrush() const
m_macPenInstalled = false ; m_macPenInstalled = false ;
m_macFontInstalled = false ; m_macFontInstalled = false ;
} }
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// coordinates transformations // coordinates transformations
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -2091,30 +2161,37 @@ wxCoord wxDCBase::DeviceToLogicalX(wxCoord x) const
{ {
return ((wxDC *)this)->XDEV2LOG(x); return ((wxDC *)this)->XDEV2LOG(x);
} }
wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const wxCoord wxDCBase::DeviceToLogicalY(wxCoord y) const
{ {
return ((wxDC *)this)->YDEV2LOG(y); return ((wxDC *)this)->YDEV2LOG(y);
} }
wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const wxCoord wxDCBase::DeviceToLogicalXRel(wxCoord x) const
{ {
return ((wxDC *)this)->XDEV2LOGREL(x); return ((wxDC *)this)->XDEV2LOGREL(x);
} }
wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const wxCoord wxDCBase::DeviceToLogicalYRel(wxCoord y) const
{ {
return ((wxDC *)this)->YDEV2LOGREL(y); return ((wxDC *)this)->YDEV2LOGREL(y);
} }
wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const wxCoord wxDCBase::LogicalToDeviceX(wxCoord x) const
{ {
return ((wxDC *)this)->XLOG2DEV(x); return ((wxDC *)this)->XLOG2DEV(x);
} }
wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const wxCoord wxDCBase::LogicalToDeviceY(wxCoord y) const
{ {
return ((wxDC *)this)->YLOG2DEV(y); return ((wxDC *)this)->YLOG2DEV(y);
} }
wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const wxCoord wxDCBase::LogicalToDeviceXRel(wxCoord x) const
{ {
return ((wxDC *)this)->XLOG2DEVREL(x); return ((wxDC *)this)->XLOG2DEVREL(x);
} }
wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const wxCoord wxDCBase::LogicalToDeviceYRel(wxCoord y) const
{ {
return ((wxDC *)this)->YLOG2DEVREL(y); return ((wxDC *)this)->YLOG2DEVREL(y);

View File

@@ -57,7 +57,6 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
long style, long style,
const wxString& name) const wxString& name)
{ {
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
@@ -68,6 +67,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id,
m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ; m_macWindowBackgroundTheme = kThemeBrushDialogBackgroundActive ;
SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ; SetThemeWindowBackground( (WindowRef) m_macWindow , m_macWindowBackgroundTheme , false ) ;
return TRUE; return TRUE;
} }
@@ -96,8 +96,7 @@ wxDialog::~wxDialog()
// By default, pressing escape cancels the dialog , on mac command-stop does the same thing // By default, pressing escape cancels the dialog , on mac command-stop does the same thing
void wxDialog::OnCharHook(wxKeyEvent& event) void wxDialog::OnCharHook(wxKeyEvent& event)
{ {
if ( if (( event.m_keyCode == WXK_ESCAPE ||
( event.m_keyCode == WXK_ESCAPE ||
( event.m_keyCode == '.' && event.MetaDown() ) ) ( event.m_keyCode == '.' && event.MetaDown() ) )
&& FindWindow(wxID_CANCEL) ) && FindWindow(wxID_CANCEL) )
{ {

View File

@@ -121,7 +121,6 @@ wxFrame::~wxFrame()
m_isBeingDeleted = TRUE; m_isBeingDeleted = TRUE;
DeleteAllBars(); DeleteAllBars();
} }

View File

@@ -9,7 +9,6 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifdef __GNUG__ #ifdef __GNUG__
#pragma implementation "menu.h" #pragma implementation "menu.h"
#pragma implementation "menuitem.h" #pragma implementation "menuitem.h"

View File

@@ -38,7 +38,6 @@ END_EVENT_TABLE()
* eg. if(GetWindowStyle() & wxSL_VERTICAL) {} else { horizontal case }> * eg. if(GetWindowStyle() & wxSL_VERTICAL) {} else { horizontal case }>
*/ */
// Slider // Slider
wxSlider::wxSlider() wxSlider::wxSlider()
{ {

View File

@@ -902,5 +902,3 @@ bool WXDLLEXPORT wxIsWaitingForThread()
#include "wx/thrimpl.cpp" #include "wx/thrimpl.cpp"
#endif // wxUSE_THREADS #endif // wxUSE_THREADS
// vi:sts=4:sw=4:et

View File

@@ -116,7 +116,6 @@ void wxToolBar::Init()
bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size, bool wxToolBar::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
long style, const wxString& name) long style, const wxString& name)
{ {
int x = pos.x; int x = pos.x;
int y = pos.y; int y = pos.y;
int width = size.x; int width = size.x;

View File

@@ -632,7 +632,6 @@ WXWidget wxTopLevelWindowMac::MacGetContainerForEmbedding()
void wxTopLevelWindowMac::MacUpdate( long timestamp) void wxTopLevelWindowMac::MacUpdate( long timestamp)
{ {
wxMacPortStateHelper help( (GrafPtr) GetWindowPort( (WindowRef) m_macWindow) ) ; wxMacPortStateHelper help( (GrafPtr) GetWindowPort( (WindowRef) m_macWindow) ) ;
BeginUpdate( (WindowRef)m_macWindow ) ; BeginUpdate( (WindowRef)m_macWindow ) ;
@@ -770,6 +769,7 @@ void wxTopLevelWindowMac::MacFireMouseEvent(
MacDispatchMouseEvent( event ) ; MacDispatchMouseEvent( event ) ;
} }
} }
#if !TARGET_CARBON #if !TARGET_CARBON
void wxTopLevelWindowMac::MacMouseDown( WXEVENTREF ev , short part) void wxTopLevelWindowMac::MacMouseDown( WXEVENTREF ev , short part)

View File

@@ -692,8 +692,6 @@ OSErr UMASetKeyboardFocus (WindowPtr inWindow,
} }
// events // events
void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn ) void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
{ {
@@ -707,7 +705,6 @@ void UMAUpdateControls( WindowPtr inWindow , RgnHandle inRgn )
UpdateControls( inWindow , inRgn ) ; UpdateControls( inWindow , inRgn ) ;
InvalWindowRgn( inWindow, updateRgn) ; InvalWindowRgn( inWindow, updateRgn) ;
DisposeRgn( updateRgn ) ; DisposeRgn( updateRgn ) ;
} }
bool UMAIsWindowFloating( WindowRef inWindow ) bool UMAIsWindowFloating( WindowRef inWindow )
@@ -750,6 +747,7 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate )
SetPort( port ) ; SetPort( port ) ;
} }
} }
OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState ) OSStatus UMADrawThemePlacard( const Rect *inRect , ThemeDrawState inState )
{ {
return ::DrawThemePlacard( inRect , inState ) ; return ::DrawThemePlacard( inRect , inState ) ;

View File

@@ -980,7 +980,7 @@ wxWindowMac *wxGetActiveWindow()
// Coordinates relative to the window // Coordinates relative to the window
void wxWindowMac::WarpPointer (int x_pos, int y_pos) void wxWindowMac::WarpPointer (int x_pos, int y_pos)
{ {
// We really dont move the mouse programmatically under mac // We really don't move the mouse programmatically under Mac.
} }
const wxBrush& wxWindowMac::MacGetBackgroundBrush() const wxBrush& wxWindowMac::MacGetBackgroundBrush()
@@ -1045,7 +1045,6 @@ const wxBrush& wxWindowMac::MacGetBackgroundBrush()
} }
return m_macBackgroundBrush ; return m_macBackgroundBrush ;
} }
void wxWindowMac::OnEraseBackground(wxEraseEvent& event) void wxWindowMac::OnEraseBackground(wxEraseEvent& event)