git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39054
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
29 files changed:
#include "wx/dc.h"
#include "wx/intl.h"
#include "wx/log.h"
#include "wx/dc.h"
#include "wx/intl.h"
#include "wx/log.h"
// Created: 2003/04/01
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
// Created: 2003/04/01
// RCS-ID: $Id$
// Copyright: (c) 2003 David Elliott
-// Licence: wxWidgets licence
+// Licence: wxWidgets licence
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#endif //WX_PRECOMP
#include "wx/cocoa/autorelease.h"
#endif //WX_PRECOMP
#include "wx/cocoa/autorelease.h"
-void wxDC::DoDrawPoint( int x, int y )
-{
+void wxDC::DoDrawPoint( int x, int y )
+{
};
void wxDC::DoDrawPolygon( int, wxPoint *, int, int, int)
};
void wxDC::DoDrawPolygon( int, wxPoint *, int, int, int)
void wxDC::DoDrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc)
{
}
void wxDC::DoDrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc)
{
}
void wxDC::SetPen(const wxPen& pen)
{
m_pen = pen;
void wxDC::SetPen(const wxPen& pen)
{
m_pen = pen;
fromRect: NSMakeRect(0.0,0.0,bmp.GetWidth(),bmp.GetHeight())
operation: NSCompositeSourceOver
fraction: 1.0];
fromRect: NSMakeRect(0.0,0.0,bmp.GetWidth(),bmp.GetHeight())
operation: NSCompositeSourceOver
fraction: 1.0];
[nsimage release];
[context restoreGraphicsState];
}
[nsimage release];
[context restoreGraphicsState];
}
void wxDC::SetMapMode( int mode )
{
void wxDC::SetMapMode( int mode )
{
{
case wxMM_TWIPS:
break;
{
case wxMM_TWIPS:
break;
m_scaleX = m_logicalScaleX * m_userScaleX;
m_scaleY = m_logicalScaleY * m_userScaleY;
m_scaleX = m_logicalScaleX * m_userScaleX;
m_scaleY = m_logicalScaleY * m_userScaleY;
- // CMB: if scale has changed call SetPen to recalulate the line width
+ // CMB: if scale has changed call SetPen to recalulate the line width
if (m_scaleX != origScaleX || m_scaleY != origScaleY)
{
// this is a bit artificial, but we need to force wxDC to think
if (m_scaleX != origScaleX || m_scaleY != origScaleY)
{
// this is a bit artificial, but we need to force wxDC to think
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
/////////////////////////////////////////////////////////////////////////////
#include "wx/wxprec.h"
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/window.h"
#include "wx/dc.h"
#endif //WX_PRECOMP
#ifndef WX_PRECOMP
#include "wx/log.h"
#include "wx/window.h"
#include "wx/dc.h"
#endif //WX_PRECOMP
#include "wx/tooltip.h"
#include "wx/cocoa/autorelease.h"
#include "wx/tooltip.h"
#include "wx/cocoa/autorelease.h"
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: common/fontcmn.cpp
+// Name: src/common/fontcmn.cpp
// Purpose: implementation of wxFontBase methods
// Author: Vadim Zeitlin
// Modified by:
// Purpose: implementation of wxFontBase methods
// Author: Vadim Zeitlin
// Modified by:
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#include "wx/wxprec.h"
#ifdef __BORLANDC__
#ifndef WX_PRECOMP
#include "wx/dc.h"
#ifndef WX_PRECOMP
#include "wx/dc.h"
#include "wx/intl.h"
#include "wx/dcscreen.h"
#endif // WX_PRECOMP
#include "wx/intl.h"
#include "wx/dcscreen.h"
#endif // WX_PRECOMP
}
#endif // generic or wxMSW or wxOS2
}
#endif // generic or wxMSW or wxOS2
#include "wx/event.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/event.h"
#include "wx/app.h"
#include "wx/utils.h"
#endif
#include "wx/brush.h"
#endif
#include "wx/brush.h"
#include "wx/cursor.h"
#include "wx/font.h"
#include "wx/palette.h"
#include "wx/cursor.h"
#include "wx/font.h"
#include "wx/palette.h"
#include "wx/settings.h"
#include "wx/hashmap.h"
#include "wx/settings.h"
#include "wx/hashmap.h"
#include "wx/generic/imaglist.h"
#include "wx/generic/imaglist.h"
+#ifndef WX_PRECOMP
+ #include "wx/dc.h"
+#endif
+
#include "wx/icon.h"
#include "wx/image.h"
#include "wx/icon.h"
#include "wx/image.h"
//-----------------------------------------------------------------------------
// wxImageList
//-----------------------------------------------------------------------------
// wxImageList
m_images.Erase( node );
m_images.Insert( next, newBitmap );
}
m_images.Erase( node );
m_images.Insert( next, newBitmap );
}
if (mask.Ok())
newBitmap->SetMask(new wxMask(mask));
if (mask.Ok())
newBitmap->SetMask(new wxMask(mask));
-#endif // wxUSE_IMAGLIST
+
+#endif // wxUSE_IMAGLIST
+#include "wx/renderer.h"
+
#ifndef WX_PRECOMP
#include "wx/string.h"
#ifndef WX_PRECOMP
#include "wx/string.h"
#endif //WX_PRECOMP
#include "wx/gdicmn.h"
#endif //WX_PRECOMP
#include "wx/gdicmn.h"
#include "wx/settings.h"
#include "wx/splitter.h"
#include "wx/dcmirror.h"
#include "wx/module.h"
#include "wx/settings.h"
#include "wx/splitter.h"
#include "wx/dcmirror.h"
#include "wx/module.h"
-#include "wx/renderer.h"
// ----------------------------------------------------------------------------
// wxRendererGeneric: our wxRendererNative implementation
// ----------------------------------------------------------------------------
// wxRendererGeneric: our wxRendererNative implementation
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/window.h"
#include "wx/cursor.h"
/* Current cursor, in order to hang on to
#include "wx/cursor.h"
/* Current cursor, in order to hang on to
#ifndef WX_PRECOMP
#include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/window.h"
#endif
#include <gtk/gtk.h>
#include "wx/gtk/win_gtk.h"
#endif
#include <gtk/gtk.h>
#include "wx/gtk/win_gtk.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/object.h"
#include "wx/window.h"
#include "wx/cursor.h"
/* Current cursor, in order to hang on to
#include "wx/cursor.h"
/* Current cursor, in order to hang on to
#ifndef WX_PRECOMP
#include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/window.h"
#endif
#include <gtk/gtk.h>
#include "wx/gtk1/win_gtk.h"
#endif
#include <gtk/gtk.h>
#include "wx/gtk1/win_gtk.h"
#include "wx/dcclient.h"
// RR: After a correction to the orientation of the sash
#include "wx/dcclient.h"
// RR: After a correction to the orientation of the sash
#include "wx/dc.h"
#endif
#include "wx/dc.h"
#endif
#include "wx/print.h"
#include "wx/printdlg.h"
#include "wx/html/htmprint.h"
#include "wx/print.h"
#include "wx/printdlg.h"
#include "wx/html/htmprint.h"
#include "wx/utils.h"
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/utils.h"
#include "wx/window.h"
#include "wx/frame.h"
#endif
#include "wx/button.h"
#endif
#include "wx/button.h"
#include "wx/cursor.h"
#include "wx/icon.h"
#include "wx/palette.h"
#include "wx/cursor.h"
#include "wx/icon.h"
#include "wx/palette.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/module.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/module.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/panel.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/panel.h"
#include "wx/dcclient.h"
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dcclient.h"
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#if wxUSE_IMAGLIST
#include "wx/imaglist.h"
#if wxUSE_IMAGLIST
#include "wx/imaglist.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/dc.h"
+#endif
+
#include "wx/icon.h"
#include "wx/image.h"
#include "wx/icon.h"
#include "wx/image.h"
IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject)
|| (m_width == 0 && m_height == 0),
_T("invalid bitmap size in wxImageList: this might work ")
_T("on this platform but definitely won't under Windows.") );
|| (m_width == 0 && m_height == 0),
_T("invalid bitmap size in wxImageList: this might work ")
_T("on this platform but definitely won't under Windows.") );
// Mimic behavior of Windows ImageList_Add that automatically breaks up the added
// bitmap into sub-images of the correct size
if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height)
// Mimic behavior of Windows ImageList_Add that automatically breaks up the added
// bitmap into sub-images of the correct size
if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height)
m_width = bitmap.GetWidth();
m_height = bitmap.GetHeight();
}
m_width = bitmap.GetWidth();
m_height = bitmap.GetHeight();
}
return m_images.GetCount() - 1;
}
return m_images.GetCount() - 1;
}
m_images.Erase( node );
m_images.Insert( next, newBitmap );
}
m_images.Erase( node );
m_images.Insert( next, newBitmap );
}
if (mask.Ok())
newBitmap->SetMask(new wxMask(mask));
if (mask.Ok())
newBitmap->SetMask(new wxMask(mask));
#include "wx/wxprec.h"
#include "wx/statusbr.h"
#include "wx/wxprec.h"
#include "wx/statusbr.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/dc.h"
+#endif
+
#include "wx/dcclient.h"
#include "wx/mac/private.h"
#include "wx/dcclient.h"
#include "wx/mac/private.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/utils.h"
#endif // WX_PRECOMP
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#endif // WX_PRECOMP
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#include "wx/intl.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/intl.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/button.h"
#include "wx/toplevel.h"
#include "wx/settings.h"
#include "wx/button.h"
#include "wx/toplevel.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/window.h"
#include "wx/timer.h"
#include "wx/geometry.h"
#include "wx/mac/uma.h"
#include "wx/timer.h"
#include "wx/geometry.h"
#include "wx/mac/uma.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/frame.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/frame.h"
#endif
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/textctrl.h"
#include "wx/toolbar.h"
#include "wx/textctrl.h"
#include "wx/toolbar.h"
#if wxUSE_CARET
#include "wx/caret.h"
#if wxUSE_CARET
#include "wx/caret.h"
#include "wx/utils.h"
#include "wx/window.h"
#include "wx/frame.h"
#include "wx/utils.h"
#include "wx/window.h"
#include "wx/frame.h"
#endif
#include "wx/button.h"
#endif
#include "wx/button.h"
#include "wx/cursor.h"
#include "wx/icon.h"
#include "wx/palette.h"
#include "wx/cursor.h"
#include "wx/icon.h"
#include "wx/palette.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/module.h"
#include "wx/dialog.h"
#include "wx/msgdlg.h"
#include "wx/module.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/panel.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/panel.h"
#include "wx/dcclient.h"
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dcclient.h"
#include "wx/notebook.h"
#include "wx/tabctrl.h"
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
+// Name: src/mac/classic/statbar.cpp
// Purpose: native implementation of wxStatusBar (optional)
// Author: Stefan Csomor
// Purpose: native implementation of wxStatusBar (optional)
// Author: Stefan Csomor
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) 1998 Stefan Csomor
// Created: 1998-01-01
// RCS-ID: $Id$
// Copyright: (c) 1998 Stefan Csomor
// ----------------------------------------------------------------------------
#include "wx/statusbr.h"
// ----------------------------------------------------------------------------
#include "wx/statusbr.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/dc.h"
+#endif
+
#include "wx/dcclient.h"
BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric)
#include "wx/dcclient.h"
BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric)
void wxStatusBarMac::DrawFieldText(wxDC& dc, int i)
{
int leftMargin = 2;
void wxStatusBarMac::DrawFieldText(wxDC& dc, int i)
{
int leftMargin = 2;
wxRect rect;
GetFieldRect(i, rect);
wxRect rect;
GetFieldRect(i, rect);
if ( !IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
{
dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ;
}
if ( !IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
{
dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ;
}
wxString text(GetStatusText(i));
wxString text(GetStatusText(i));
dc.GetTextExtent(text, &x, &y);
dc.GetTextExtent(text, &x, &y);
int xpos = rect.x + leftMargin + 1 ;
int ypos = 1 ;
int xpos = rect.x + leftMargin + 1 ;
int ypos = 1 ;
dc.SetClippingRegion(rect.x, 0, rect.width, m_height);
dc.SetClippingRegion(rect.x, 0, rect.width, m_height);
dc.DrawText(text, xpos, ypos);
dc.DrawText(text, xpos, ypos);
dc.DestroyClippingRegion();
}
dc.DestroyClippingRegion();
}
{
wxCHECK_RET( (number >= 0) && (number < m_nFields),
_T("invalid status bar field index") );
{
wxCHECK_RET( (number >= 0) && (number < m_nFields),
_T("invalid status bar field index") );
m_statusStrings[number] = text;
wxRect rect;
GetFieldRect(number, rect);
m_statusStrings[number] = text;
wxRect rect;
GetFieldRect(number, rect);
void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) )
{
void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) )
{
- wxPaintDC dc(this);
- dc.Clear() ;
+ wxPaintDC dc(this);
+ dc.Clear() ;
int major,minor;
wxGetOsVersion( &major, &minor );
int major,minor;
wxGetOsVersion( &major, &minor );
- if ( IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
- {
- wxPen white( wxWHITE , 1 , wxSOLID ) ;
- if (major >= 10)
+ if ( IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
+ {
+ wxPen white( wxWHITE , 1 , wxSOLID ) ;
+ if (major >= 10)
{
//Finder statusbar border color: (Project builder similar is 9B9B9B)
{
//Finder statusbar border color: (Project builder similar is 9B9B9B)
- dc.SetPen(wxPen(wxColour(0xB1,0xB1,0xB1),1,wxSOLID));
+ dc.SetPen(wxPen(wxColour(0xB1,0xB1,0xB1),1,wxSOLID));
}
else
{
wxPen black( wxBLACK , 1 , wxSOLID ) ;
dc.SetPen(black);
}
else
{
wxPen black( wxBLACK , 1 , wxSOLID ) ;
dc.SetPen(black);
- }
- dc.DrawLine(0, 0 ,
- m_width , 0);
- dc.SetPen(white);
- dc.DrawLine(0, 1 ,
- m_width , 1);
- }
- else
- {
- if (major >= 10)
+ }
+ dc.DrawLine(0, 0 ,
+ m_width , 0);
+ dc.SetPen(white);
+ dc.DrawLine(0, 1 ,
+ m_width , 1);
+ }
+ else
+ {
+ if (major >= 10)
//Finder statusbar border color: (Project builder similar is 9B9B9B)
//Finder statusbar border color: (Project builder similar is 9B9B9B)
- dc.SetPen(wxPen(wxColour(0xB1,0xB1,0xB1),1,wxSOLID));
+ dc.SetPen(wxPen(wxColour(0xB1,0xB1,0xB1),1,wxSOLID));
else
dc.SetPen(wxPen(wxColour(0x80,0x80,0x80),1,wxSOLID));
else
dc.SetPen(wxPen(wxColour(0x80,0x80,0x80),1,wxSOLID));
- dc.DrawLine(0, 0 ,
- m_width , 0);
- }
+ dc.DrawLine(0, 0 ,
+ m_width , 0);
+ }
- int i;
- if ( GetFont().Ok() )
- dc.SetFont(GetFont());
- dc.SetBackgroundMode(wxTRANSPARENT);
+ int i;
+ if ( GetFont().Ok() )
+ dc.SetFont(GetFont());
+ dc.SetBackgroundMode(wxTRANSPARENT);
- for ( i = 0; i < m_nFields; i ++ )
- DrawField(dc, i);
+ for ( i = 0; i < m_nFields; i ++ )
+ DrawField(dc, i);
-void wxStatusBarMac::MacSuperEnabled( bool enabled )
+void wxStatusBarMac::MacSuperEnabled( bool enabled )
{
Refresh(FALSE) ;
wxWindow::MacSuperEnabled( enabled ) ;
{
Refresh(FALSE) ;
wxWindow::MacSuperEnabled( enabled ) ;
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/utils.h"
#endif
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#endif
#include "wx/notebook.h"
#include "wx/tabctrl.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#include "wx/dcclient.h"
#include "wx/settings.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/utils.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/button.h"
#include "wx/toplevel.h"
#include "wx/notebook.h"
#include "wx/button.h"
#include "wx/toplevel.h"
#include "wx/notebook.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/window.h"
#ifndef WX_PRECOMP
#include "wx/app.h"
#include "wx/window.h"
#include "wx/timer.h"
#include "wx/geometry.h"
#include "wx/mac/uma.h"
#include "wx/timer.h"
#include "wx/geometry.h"
#include "wx/mac/uma.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/frame.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/frame.h"
#endif
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/frame.h"
#include "wx/app.h"
#include "wx/utils.h"
#include "wx/frame.h"
#endif
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/button.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/button.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/frame.h"
#include "wx/utils.h"
#include "wx/panel.h"
#include "wx/frame.h"
#endif
#include "wx/menu.h"
#endif
#include "wx/menu.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/dialog.h"
#include "wx/dcclient.h"
#include "wx/layout.h"
#include "wx/dialog.h"