1. wxApp::ProcessPendingEvents() is now common, added appcmn.cpp and
regenerated the makefiles. wxPostEvent() should work for wxGTK too (untested) 2. long -> wxCoord change for wxGTK and wxMSW, use wxUSE_COMPATIBLE_COORD_TYPES to get the old behaviour 3. wxHTML compilation fixes (for !wxUSE_HTML case) 4. a couple of handy macros in thread.h added git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4054 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -59,7 +59,6 @@ public:
|
||||
static void CleanUp();
|
||||
|
||||
bool ProcessIdle();
|
||||
void ProcessPendingEvents();
|
||||
void DeletePendingObjects();
|
||||
|
||||
// This can be used to suppress the generation of Idle events.
|
||||
|
@@ -62,8 +62,8 @@ public:
|
||||
virtual void SetMapMode( int mode );
|
||||
virtual void SetUserScale( double x, double y );
|
||||
virtual void SetLogicalScale( double x, double y );
|
||||
virtual void SetLogicalOrigin( long x, long y );
|
||||
virtual void SetDeviceOrigin( long x, long y );
|
||||
virtual void SetLogicalOrigin( wxCoord x, wxCoord y );
|
||||
virtual void SetDeviceOrigin( wxCoord x, wxCoord y );
|
||||
|
||||
virtual void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
|
||||
|
||||
@@ -72,70 +72,70 @@ public:
|
||||
|
||||
virtual void ComputeScaleAndOrigin();
|
||||
|
||||
long XDEV2LOG(long x) const
|
||||
wxCoord XDEV2LOG(wxCoord x) const
|
||||
{
|
||||
long new_x = x - m_deviceOriginX;
|
||||
wxCoord new_x = x - m_deviceOriginX;
|
||||
if (new_x > 0)
|
||||
return (long)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX;
|
||||
return (wxCoord)((double)(new_x) / m_scaleX + 0.5) * m_signX + m_logicalOriginX;
|
||||
else
|
||||
return (long)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX;
|
||||
return (wxCoord)((double)(new_x) / m_scaleX - 0.5) * m_signX + m_logicalOriginX;
|
||||
}
|
||||
long XDEV2LOGREL(long x) const
|
||||
wxCoord XDEV2LOGREL(wxCoord x) const
|
||||
{
|
||||
if (x > 0)
|
||||
return (long)((double)(x) / m_scaleX + 0.5);
|
||||
return (wxCoord)((double)(x) / m_scaleX + 0.5);
|
||||
else
|
||||
return (long)((double)(x) / m_scaleX - 0.5);
|
||||
return (wxCoord)((double)(x) / m_scaleX - 0.5);
|
||||
}
|
||||
long YDEV2LOG(long y) const
|
||||
wxCoord YDEV2LOG(wxCoord y) const
|
||||
{
|
||||
long new_y = y - m_deviceOriginY;
|
||||
wxCoord new_y = y - m_deviceOriginY;
|
||||
if (new_y > 0)
|
||||
return (long)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY;
|
||||
return (wxCoord)((double)(new_y) / m_scaleY + 0.5) * m_signY + m_logicalOriginY;
|
||||
else
|
||||
return (long)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY;
|
||||
return (wxCoord)((double)(new_y) / m_scaleY - 0.5) * m_signY + m_logicalOriginY;
|
||||
}
|
||||
long YDEV2LOGREL(long y) const
|
||||
wxCoord YDEV2LOGREL(wxCoord y) const
|
||||
{
|
||||
if (y > 0)
|
||||
return (long)((double)(y) / m_scaleY + 0.5);
|
||||
return (wxCoord)((double)(y) / m_scaleY + 0.5);
|
||||
else
|
||||
return (long)((double)(y) / m_scaleY - 0.5);
|
||||
return (wxCoord)((double)(y) / m_scaleY - 0.5);
|
||||
}
|
||||
long XLOG2DEV(long x) const
|
||||
wxCoord XLOG2DEV(wxCoord x) const
|
||||
{
|
||||
long new_x = x - m_logicalOriginX;
|
||||
wxCoord new_x = x - m_logicalOriginX;
|
||||
if (new_x > 0)
|
||||
return (long)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX;
|
||||
return (wxCoord)((double)(new_x) * m_scaleX + 0.5) * m_signX + m_deviceOriginX;
|
||||
else
|
||||
return (long)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX;
|
||||
return (wxCoord)((double)(new_x) * m_scaleX - 0.5) * m_signX + m_deviceOriginX;
|
||||
}
|
||||
long XLOG2DEVREL(long x) const
|
||||
wxCoord XLOG2DEVREL(wxCoord x) const
|
||||
{
|
||||
if (x > 0)
|
||||
return (long)((double)(x) * m_scaleX + 0.5);
|
||||
return (wxCoord)((double)(x) * m_scaleX + 0.5);
|
||||
else
|
||||
return (long)((double)(x) * m_scaleX - 0.5);
|
||||
return (wxCoord)((double)(x) * m_scaleX - 0.5);
|
||||
}
|
||||
long YLOG2DEV(long y) const
|
||||
wxCoord YLOG2DEV(wxCoord y) const
|
||||
{
|
||||
long new_y = y - m_logicalOriginY;
|
||||
wxCoord new_y = y - m_logicalOriginY;
|
||||
if (new_y > 0)
|
||||
return (long)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY;
|
||||
return (wxCoord)((double)(new_y) * m_scaleY + 0.5) * m_signY + m_deviceOriginY;
|
||||
else
|
||||
return (long)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY;
|
||||
return (wxCoord)((double)(new_y) * m_scaleY - 0.5) * m_signY + m_deviceOriginY;
|
||||
}
|
||||
long YLOG2DEVREL(long y) const
|
||||
wxCoord YLOG2DEVREL(wxCoord y) const
|
||||
{
|
||||
if (y > 0)
|
||||
return (long)((double)(y) * m_scaleY + 0.5);
|
||||
return (wxCoord)((double)(y) * m_scaleY + 0.5);
|
||||
else
|
||||
return (long)((double)(y) * m_scaleY - 0.5);
|
||||
return (wxCoord)((double)(y) * m_scaleY - 0.5);
|
||||
}
|
||||
|
||||
protected:
|
||||
// base class pure virtuals implemented here
|
||||
virtual void DoSetClippingRegion(long x, long y, long width, long height);
|
||||
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
|
||||
virtual void DoGetSize(int *width, int *height) const;
|
||||
virtual void DoGetSizeMM(int* width, int* height) const;
|
||||
|
||||
|
@@ -42,43 +42,43 @@ public:
|
||||
virtual bool CanDrawBitmap() const { return TRUE; }
|
||||
virtual bool CanGetTextExtent() const { return TRUE; }
|
||||
|
||||
virtual void DoFloodFill( long x, long y, const wxColour& col, int style=wxFLOOD_SURFACE );
|
||||
virtual bool DoGetPixel( long x1, long y1, wxColour *col ) const;
|
||||
virtual void DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, int style=wxFLOOD_SURFACE );
|
||||
virtual bool DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const;
|
||||
|
||||
virtual void DoDrawLine( long x1, long y1, long x2, long y2 );
|
||||
virtual void DoCrossHair( long x, long y );
|
||||
virtual void DoDrawArc( long x1, long y1, long x2, long y2,
|
||||
long xc, long yc );
|
||||
virtual void DoDrawEllipticArc( long x, long y, long width, long height,
|
||||
virtual void DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 );
|
||||
virtual void DoCrossHair( wxCoord x, wxCoord y );
|
||||
virtual void DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
|
||||
wxCoord xc, wxCoord yc );
|
||||
virtual void DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord height,
|
||||
double sa, double ea );
|
||||
virtual void DoDrawPoint( long x, long y );
|
||||
virtual void DoDrawPoint( wxCoord x, wxCoord y );
|
||||
|
||||
virtual void DoDrawLines(int n, wxPoint points[],
|
||||
long xoffset, long yoffset);
|
||||
wxCoord xoffset, wxCoord yoffset);
|
||||
virtual void DoDrawPolygon(int n, wxPoint points[],
|
||||
long xoffset, long yoffset,
|
||||
wxCoord xoffset, wxCoord yoffset,
|
||||
int fillStyle = wxODDEVEN_RULE);
|
||||
|
||||
virtual void DoDrawRectangle( long x, long y, long width, long height );
|
||||
virtual void DoDrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 );
|
||||
virtual void DoDrawEllipse( long x, long y, long width, long height );
|
||||
virtual void DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
|
||||
virtual void DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0 );
|
||||
virtual void DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
|
||||
|
||||
virtual void DoDrawIcon( const wxIcon &icon, long x, long y );
|
||||
virtual void DoDrawBitmap( const wxBitmap &bitmap, long x, long y,
|
||||
virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y );
|
||||
virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y,
|
||||
bool useMask = FALSE );
|
||||
|
||||
virtual bool DoBlit( long xdest, long ydest, long width, long height,
|
||||
wxDC *source, long xsrc, long ysrc,
|
||||
virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
int logical_func = wxCOPY, bool useMask = FALSE );
|
||||
|
||||
virtual void DoDrawText( const wxString &text, long x, long y );
|
||||
virtual void GetTextExtent( const wxString &string,
|
||||
long *width, long *height,
|
||||
long *descent = (long *) NULL,
|
||||
long *externalLeading = (long *) NULL,
|
||||
virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y );
|
||||
virtual void DoGetTextExtent( const wxString &string,
|
||||
wxCoord *width, wxCoord *height,
|
||||
wxCoord *descent = (wxCoord *) NULL,
|
||||
wxCoord *externalLeading = (wxCoord *) NULL,
|
||||
wxFont *theFont = (wxFont *) NULL) const;
|
||||
virtual long GetCharWidth() const;
|
||||
virtual long GetCharHeight() const;
|
||||
virtual wxCoord GetCharWidth() const;
|
||||
virtual wxCoord GetCharHeight() const;
|
||||
|
||||
virtual void Clear();
|
||||
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
virtual void SetBackgroundMode( int mode );
|
||||
virtual void SetPalette( const wxPalette& palette );
|
||||
|
||||
virtual void DoSetClippingRegion( long x, long y, long width, long height );
|
||||
virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
|
||||
virtual void DestroyClippingRegion();
|
||||
virtual void DoSetClippingRegionAsRegion( const wxRegion ®ion );
|
||||
|
||||
|
@@ -28,7 +28,7 @@ class wxMemoryDC;
|
||||
// wxMemoryDC
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
class wxMemoryDC: public wxWindowDC
|
||||
class wxMemoryDC : public wxWindowDC
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxMemoryDC)
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
// Author: Robert Roebling
|
||||
// Id: $Id$
|
||||
// Copyright: (c) 1998 Robert Roebling
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef __GTKDCSCREENH__
|
||||
@@ -27,15 +27,15 @@ class wxScreenDC: public wxPaintDC
|
||||
DECLARE_DYNAMIC_CLASS(wxScreenDC)
|
||||
|
||||
public:
|
||||
wxScreenDC(void);
|
||||
~wxScreenDC(void);
|
||||
wxScreenDC();
|
||||
~wxScreenDC();
|
||||
|
||||
static bool StartDrawingOnTop( wxWindow *window );
|
||||
static bool StartDrawingOnTop( wxRect *rect = (wxRect *) NULL );
|
||||
static bool EndDrawingOnTop(void);
|
||||
|
||||
static bool EndDrawingOnTop();
|
||||
|
||||
// implementation
|
||||
|
||||
|
||||
static GdkWindow *sm_overlayWindow;
|
||||
static int sm_overlayWindowX;
|
||||
static int sm_overlayWindowY;
|
||||
|
Reference in New Issue
Block a user