Include wx/dc.h according to precompiled headers of wx/wx.h (with other minor cleaning).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -11,8 +11,9 @@
|
|||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#include "wx/app.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
|
@@ -6,13 +6,15 @@
|
|||||||
// Created: 2003/04/01
|
// Created: 2003/04/01
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 2003 David Elliott
|
// Copyright: (c) 2003 David Elliott
|
||||||
// Licence: wxWidgets licence
|
// Licence: wxWidgets licence
|
||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#include "wx/dc.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#endif //WX_PRECOMP
|
#endif //WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/cocoa/autorelease.h"
|
#include "wx/cocoa/autorelease.h"
|
||||||
@@ -374,8 +376,8 @@ void wxDC::DoDrawIcon( const wxIcon &WXUNUSED(icon), int WXUNUSED(x), int WXUNUS
|
|||||||
{
|
{
|
||||||
};
|
};
|
||||||
|
|
||||||
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)
|
||||||
@@ -424,7 +426,7 @@ bool wxDC::DoGetPixel(wxCoord x, wxCoord y, wxColour *col) const
|
|||||||
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)
|
void wxDC::SetPen(const wxPen& pen)
|
||||||
{
|
{
|
||||||
m_pen = pen;
|
m_pen = pen;
|
||||||
@@ -505,7 +507,7 @@ void wxDC::DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y, bool useMask)
|
|||||||
fromRect: NSMakeRect(0.0,0.0,bmp.GetWidth(),bmp.GetHeight())
|
fromRect: NSMakeRect(0.0,0.0,bmp.GetWidth(),bmp.GetHeight())
|
||||||
operation: NSCompositeSourceOver
|
operation: NSCompositeSourceOver
|
||||||
fraction: 1.0];
|
fraction: 1.0];
|
||||||
|
|
||||||
[nsimage release];
|
[nsimage release];
|
||||||
[context restoreGraphicsState];
|
[context restoreGraphicsState];
|
||||||
}
|
}
|
||||||
@@ -596,7 +598,7 @@ void wxDC::SetLogicalFunction(int)
|
|||||||
|
|
||||||
void wxDC::SetMapMode( int mode )
|
void wxDC::SetMapMode( int mode )
|
||||||
{
|
{
|
||||||
switch (mode)
|
switch (mode)
|
||||||
{
|
{
|
||||||
case wxMM_TWIPS:
|
case wxMM_TWIPS:
|
||||||
break;
|
break;
|
||||||
@@ -660,7 +662,7 @@ void wxDC::ComputeScaleAndOrigin(void)
|
|||||||
m_scaleX = m_logicalScaleX * m_userScaleX;
|
m_scaleX = m_logicalScaleX * m_userScaleX;
|
||||||
m_scaleY = m_logicalScaleY * m_userScaleY;
|
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)
|
if (m_scaleX != origScaleX || m_scaleY != origScaleY)
|
||||||
{
|
{
|
||||||
// this is a bit artificial, but we need to force wxDC to think
|
// this is a bit artificial, but we need to force wxDC to think
|
||||||
@@ -671,4 +673,3 @@ void wxDC::ComputeScaleAndOrigin(void)
|
|||||||
SetPen(* pen);
|
SetPen(* pen);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -10,11 +10,13 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/log.h"
|
#include "wx/log.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#endif //WX_PRECOMP
|
#endif //WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/tooltip.h"
|
#include "wx/tooltip.h"
|
||||||
|
|
||||||
#include "wx/cocoa/autorelease.h"
|
#include "wx/cocoa/autorelease.h"
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: common/fontcmn.cpp
|
// Name: src/common/fontcmn.cpp
|
||||||
// Purpose: implementation of wxFontBase methods
|
// Purpose: implementation of wxFontBase methods
|
||||||
// Author: Vadim Zeitlin
|
// Author: Vadim Zeitlin
|
||||||
// Modified by:
|
// Modified by:
|
||||||
@@ -21,12 +21,13 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/font.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#include "wx/font.h"
|
|
||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/dcscreen.h"
|
#include "wx/dcscreen.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
@@ -686,4 +687,3 @@ bool wxNativeFontInfo::FromUserString(const wxString& s)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // generic or wxMSW or wxOS2
|
#endif // generic or wxMSW or wxOS2
|
||||||
|
|
||||||
|
@@ -27,6 +27,7 @@
|
|||||||
#include "wx/event.h"
|
#include "wx/event.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/brush.h"
|
#include "wx/brush.h"
|
||||||
@@ -36,7 +37,6 @@
|
|||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
#include "wx/font.h"
|
#include "wx/font.h"
|
||||||
#include "wx/palette.h"
|
#include "wx/palette.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/hashmap.h"
|
#include "wx/hashmap.h"
|
||||||
|
|
||||||
|
@@ -20,9 +20,12 @@
|
|||||||
|
|
||||||
#include "wx/generic/imaglist.h"
|
#include "wx/generic/imaglist.h"
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/dc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// wxImageList
|
// wxImageList
|
||||||
@@ -217,7 +220,7 @@ bool wxGenericImageList::Replace( int index, const wxBitmap &bitmap, const wxBit
|
|||||||
m_images.Erase( node );
|
m_images.Erase( node );
|
||||||
m_images.Insert( next, newBitmap );
|
m_images.Insert( next, newBitmap );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask.Ok())
|
if (mask.Ok())
|
||||||
newBitmap->SetMask(new wxMask(mask));
|
newBitmap->SetMask(new wxMask(mask));
|
||||||
|
|
||||||
@@ -277,5 +280,6 @@ bool wxGenericImageList::Draw( int index, wxDC &dc, int x, int y,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // wxUSE_IMAGLIST
|
|
||||||
#endif // __WXPALMOS__
|
#endif // __WXPALMOS__
|
||||||
|
|
||||||
|
#endif // wxUSE_IMAGLIST
|
||||||
|
@@ -24,18 +24,19 @@
|
|||||||
#pragma hdrstop
|
#pragma hdrstop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/renderer.h"
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/string.h"
|
#include "wx/string.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif //WX_PRECOMP
|
#endif //WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
|
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
#include "wx/splitter.h"
|
#include "wx/splitter.h"
|
||||||
#include "wx/dcmirror.h"
|
#include "wx/dcmirror.h"
|
||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
#include "wx/renderer.h"
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxRendererGeneric: our wxRendererNative implementation
|
// wxRendererGeneric: our wxRendererNative implementation
|
||||||
|
@@ -13,9 +13,9 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
|
|
||||||
/* Current cursor, in order to hang on to
|
/* Current cursor, in order to hang on to
|
||||||
|
@@ -28,12 +28,12 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "wx/gtk/win_gtk.h"
|
#include "wx/gtk/win_gtk.h"
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
|
|
||||||
|
@@ -13,9 +13,9 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/object.h"
|
#include "wx/object.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
|
|
||||||
/* Current cursor, in order to hang on to
|
/* Current cursor, in order to hang on to
|
||||||
|
@@ -28,12 +28,12 @@
|
|||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gtk/gtk.h>
|
#include <gtk/gtk.h>
|
||||||
#include "wx/gtk1/win_gtk.h"
|
#include "wx/gtk1/win_gtk.h"
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
|
||||||
// RR: After a correction to the orientation of the sash
|
// RR: After a correction to the orientation of the sash
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
#include "wx/dc.h"
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/print.h"
|
#include "wx/print.h"
|
||||||
#include "wx/printdlg.h"
|
#include "wx/printdlg.h"
|
||||||
#include "wx/html/htmprint.h"
|
#include "wx/html/htmprint.h"
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/button.h"
|
#include "wx/button.h"
|
||||||
@@ -28,7 +29,6 @@
|
|||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
#include "wx/palette.h"
|
#include "wx/palette.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
|
@@ -16,9 +16,9 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/notebook.h"
|
#include "wx/notebook.h"
|
||||||
#include "wx/tabctrl.h"
|
#include "wx/tabctrl.h"
|
||||||
|
@@ -16,9 +16,13 @@
|
|||||||
#if wxUSE_IMAGLIST
|
#if wxUSE_IMAGLIST
|
||||||
|
|
||||||
#include "wx/imaglist.h"
|
#include "wx/imaglist.h"
|
||||||
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/dc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
#include "wx/image.h"
|
#include "wx/image.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
|
|
||||||
IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject)
|
IMPLEMENT_DYNAMIC_CLASS(wxImageList, wxObject)
|
||||||
|
|
||||||
@@ -75,7 +79,7 @@ int wxImageList::Add( const wxBitmap &bitmap )
|
|||||||
|| (m_width == 0 && m_height == 0),
|
|| (m_width == 0 && m_height == 0),
|
||||||
_T("invalid bitmap size in wxImageList: this might work ")
|
_T("invalid bitmap size in wxImageList: this might work ")
|
||||||
_T("on this platform but definitely won't under Windows.") );
|
_T("on this platform but definitely won't under Windows.") );
|
||||||
|
|
||||||
// Mimic behavior of Windows ImageList_Add that automatically breaks up the added
|
// Mimic behavior of Windows ImageList_Add that automatically breaks up the added
|
||||||
// bitmap into sub-images of the correct size
|
// bitmap into sub-images of the correct size
|
||||||
if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height)
|
if (m_width > 0 && bitmap.GetWidth() > m_width && bitmap.GetHeight() >= m_height)
|
||||||
@@ -98,7 +102,7 @@ int wxImageList::Add( const wxBitmap &bitmap )
|
|||||||
m_width = bitmap.GetWidth();
|
m_width = bitmap.GetWidth();
|
||||||
m_height = bitmap.GetHeight();
|
m_height = bitmap.GetHeight();
|
||||||
}
|
}
|
||||||
|
|
||||||
return m_images.GetCount() - 1;
|
return m_images.GetCount() - 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -227,7 +231,7 @@ bool wxImageList::Replace( int index, const wxBitmap &bitmap, const wxBitmap &ma
|
|||||||
m_images.Erase( node );
|
m_images.Erase( node );
|
||||||
m_images.Insert( next, newBitmap );
|
m_images.Insert( next, newBitmap );
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mask.Ok())
|
if (mask.Ok())
|
||||||
newBitmap->SetMask(new wxMask(mask));
|
newBitmap->SetMask(new wxMask(mask));
|
||||||
|
|
||||||
|
@@ -12,7 +12,11 @@
|
|||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
#include "wx/statusbr.h"
|
#include "wx/statusbr.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/dc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
|
||||||
#include "wx/mac/private.h"
|
#include "wx/mac/private.h"
|
||||||
|
@@ -18,11 +18,11 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/notebook.h"
|
#include "wx/notebook.h"
|
||||||
#include "wx/tabctrl.h"
|
#include "wx/tabctrl.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
|
|
||||||
|
@@ -19,6 +19,7 @@
|
|||||||
#include "wx/intl.h"
|
#include "wx/intl.h"
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __DARWIN__
|
#ifdef __DARWIN__
|
||||||
@@ -38,7 +39,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/button.h"
|
#include "wx/button.h"
|
||||||
#include "wx/toplevel.h"
|
#include "wx/toplevel.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
|
@@ -16,9 +16,9 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
#include "wx/geometry.h"
|
#include "wx/geometry.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
@@ -19,10 +19,10 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/layout.h"
|
#include "wx/layout.h"
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
@@ -39,7 +39,6 @@
|
|||||||
#include "wx/textctrl.h"
|
#include "wx/textctrl.h"
|
||||||
|
|
||||||
#include "wx/toolbar.h"
|
#include "wx/toolbar.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
|
|
||||||
#if wxUSE_CARET
|
#if wxUSE_CARET
|
||||||
#include "wx/caret.h"
|
#include "wx/caret.h"
|
||||||
|
@@ -23,6 +23,7 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/button.h"
|
#include "wx/button.h"
|
||||||
@@ -32,7 +33,6 @@
|
|||||||
#include "wx/cursor.h"
|
#include "wx/cursor.h"
|
||||||
#include "wx/icon.h"
|
#include "wx/icon.h"
|
||||||
#include "wx/palette.h"
|
#include "wx/palette.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/msgdlg.h"
|
#include "wx/msgdlg.h"
|
||||||
#include "wx/module.h"
|
#include "wx/module.h"
|
||||||
|
@@ -20,9 +20,9 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif // WX_PRECOMP
|
#endif // WX_PRECOMP
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/notebook.h"
|
#include "wx/notebook.h"
|
||||||
#include "wx/tabctrl.h"
|
#include "wx/tabctrl.h"
|
||||||
|
@@ -1,8 +1,8 @@
|
|||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: statbar.cpp
|
// Name: src/mac/classic/statbar.cpp
|
||||||
// Purpose: native implementation of wxStatusBar (optional)
|
// Purpose: native implementation of wxStatusBar (optional)
|
||||||
// Author: Stefan Csomor
|
// Author: Stefan Csomor
|
||||||
// Modified by:
|
// Modified by:
|
||||||
// Created: 1998-01-01
|
// Created: 1998-01-01
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Copyright: (c) 1998 Stefan Csomor
|
// Copyright: (c) 1998 Stefan Csomor
|
||||||
@@ -14,7 +14,11 @@
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/statusbr.h"
|
#include "wx/statusbr.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
|
#ifndef WX_PRECOMP
|
||||||
|
#include "wx/dc.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric)
|
BEGIN_EVENT_TABLE(wxStatusBarMac, wxStatusBarGeneric)
|
||||||
@@ -52,28 +56,28 @@ bool wxStatusBarMac::Create(wxWindow *parent, wxWindowID id,
|
|||||||
void wxStatusBarMac::DrawFieldText(wxDC& dc, int i)
|
void wxStatusBarMac::DrawFieldText(wxDC& dc, int i)
|
||||||
{
|
{
|
||||||
int leftMargin = 2;
|
int leftMargin = 2;
|
||||||
|
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
GetFieldRect(i, rect);
|
GetFieldRect(i, rect);
|
||||||
|
|
||||||
if ( !IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
|
if ( !IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
|
||||||
{
|
{
|
||||||
dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ;
|
dc.SetTextForeground( wxColour( 0x80 , 0x80 , 0x80 ) ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString text(GetStatusText(i));
|
wxString text(GetStatusText(i));
|
||||||
|
|
||||||
long x, y;
|
long x, y;
|
||||||
|
|
||||||
dc.GetTextExtent(text, &x, &y);
|
dc.GetTextExtent(text, &x, &y);
|
||||||
|
|
||||||
int xpos = rect.x + leftMargin + 1 ;
|
int xpos = rect.x + leftMargin + 1 ;
|
||||||
int ypos = 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -86,7 +90,7 @@ void wxStatusBarMac::SetStatusText(const wxString& text, int number)
|
|||||||
{
|
{
|
||||||
wxCHECK_RET( (number >= 0) && (number < m_nFields),
|
wxCHECK_RET( (number >= 0) && (number < m_nFields),
|
||||||
_T("invalid status bar field index") );
|
_T("invalid status bar field index") );
|
||||||
|
|
||||||
m_statusStrings[number] = text;
|
m_statusStrings[number] = text;
|
||||||
wxRect rect;
|
wxRect rect;
|
||||||
GetFieldRect(number, rect);
|
GetFieldRect(number, rect);
|
||||||
@@ -98,53 +102,53 @@ void wxStatusBarMac::SetStatusText(const wxString& text, int number)
|
|||||||
|
|
||||||
void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
void wxStatusBarMac::OnPaint(wxPaintEvent& WXUNUSED(event) )
|
||||||
{
|
{
|
||||||
wxPaintDC dc(this);
|
wxPaintDC dc(this);
|
||||||
dc.Clear() ;
|
dc.Clear() ;
|
||||||
|
|
||||||
int major,minor;
|
int major,minor;
|
||||||
wxGetOsVersion( &major, &minor );
|
wxGetOsVersion( &major, &minor );
|
||||||
|
|
||||||
if ( IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
|
if ( IsWindowHilited( MAC_WXHWND( MacGetRootWindow() ) ) )
|
||||||
{
|
{
|
||||||
wxPen white( wxWHITE , 1 , wxSOLID ) ;
|
wxPen white( wxWHITE , 1 , wxSOLID ) ;
|
||||||
if (major >= 10)
|
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
|
else
|
||||||
{
|
{
|
||||||
wxPen black( wxBLACK , 1 , wxSOLID ) ;
|
wxPen black( wxBLACK , 1 , wxSOLID ) ;
|
||||||
dc.SetPen(black);
|
dc.SetPen(black);
|
||||||
}
|
}
|
||||||
dc.DrawLine(0, 0 ,
|
dc.DrawLine(0, 0 ,
|
||||||
m_width , 0);
|
m_width , 0);
|
||||||
dc.SetPen(white);
|
dc.SetPen(white);
|
||||||
dc.DrawLine(0, 1 ,
|
dc.DrawLine(0, 1 ,
|
||||||
m_width , 1);
|
m_width , 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (major >= 10)
|
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
|
else
|
||||||
dc.SetPen(wxPen(wxColour(0x80,0x80,0x80),1,wxSOLID));
|
dc.SetPen(wxPen(wxColour(0x80,0x80,0x80),1,wxSOLID));
|
||||||
|
|
||||||
dc.DrawLine(0, 0 ,
|
dc.DrawLine(0, 0 ,
|
||||||
m_width , 0);
|
m_width , 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int i;
|
int i;
|
||||||
if ( GetFont().Ok() )
|
if ( GetFont().Ok() )
|
||||||
dc.SetFont(GetFont());
|
dc.SetFont(GetFont());
|
||||||
dc.SetBackgroundMode(wxTRANSPARENT);
|
dc.SetBackgroundMode(wxTRANSPARENT);
|
||||||
|
|
||||||
for ( i = 0; i < m_nFields; i ++ )
|
for ( i = 0; i < m_nFields; i ++ )
|
||||||
DrawField(dc, i);
|
DrawField(dc, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void wxStatusBarMac::MacSuperEnabled( bool enabled )
|
void wxStatusBarMac::MacSuperEnabled( bool enabled )
|
||||||
{
|
{
|
||||||
Refresh(FALSE) ;
|
Refresh(FALSE) ;
|
||||||
wxWindow::MacSuperEnabled( enabled ) ;
|
wxWindow::MacSuperEnabled( enabled ) ;
|
||||||
|
@@ -16,11 +16,11 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/notebook.h"
|
#include "wx/notebook.h"
|
||||||
#include "wx/tabctrl.h"
|
#include "wx/tabctrl.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/settings.h"
|
#include "wx/settings.h"
|
||||||
|
|
||||||
|
@@ -22,6 +22,7 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __DARWIN__
|
#ifdef __DARWIN__
|
||||||
@@ -41,7 +42,6 @@
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/button.h"
|
#include "wx/button.h"
|
||||||
#include "wx/toplevel.h"
|
#include "wx/toplevel.h"
|
||||||
#include "wx/notebook.h"
|
#include "wx/notebook.h"
|
||||||
|
@@ -20,9 +20,9 @@
|
|||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/window.h"
|
#include "wx/window.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
#include "wx/geometry.h"
|
#include "wx/geometry.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
@@ -19,10 +19,10 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/layout.h"
|
#include "wx/layout.h"
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
|
@@ -32,10 +32,10 @@
|
|||||||
#include "wx/app.h"
|
#include "wx/app.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/layout.h"
|
#include "wx/layout.h"
|
||||||
#include "wx/button.h"
|
#include "wx/button.h"
|
||||||
|
@@ -33,10 +33,10 @@
|
|||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
#include "wx/frame.h"
|
#include "wx/frame.h"
|
||||||
|
#include "wx/dc.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/dc.h"
|
|
||||||
#include "wx/dcclient.h"
|
#include "wx/dcclient.h"
|
||||||
#include "wx/layout.h"
|
#include "wx/layout.h"
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
|
Reference in New Issue
Block a user