]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __GTKDCCLIENTH__
12 #define __GTKDCCLIENTH__
19 #include "wx/window.h"
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
26 typedef wxPaintDC wxClientDC
;
27 typedef wxPaintDC wxWindowDC
;
29 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
33 class wxPaintDC
: public wxDC
35 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
40 wxPaintDC( wxWindow
*win
);
44 virtual void FloodFill( long x1
, long y1
, wxColour
*col
, int style
=wxFLOOD_SURFACE
);
45 virtual bool GetPixel( long x1
, long y1
, wxColour
*col
) const;
47 virtual void DrawLine( long x1
, long y1
, long x2
, long y2
);
48 virtual void CrossHair( long x
, long y
);
49 virtual void DrawArc( long x1
, long y1
, long x2
, long y2
, double xc
, double yc
);
50 virtual void DrawEllipticArc( long x
, long y
, long width
, long height
, double sa
, double ea
);
51 virtual void DrawPoint( long x
, long y
);
53 virtual void DrawLines( int n
, wxPoint points
[], long xoffset
= 0, long yoffset
= 0 );
54 virtual void DrawLines( wxList
*points
, long xoffset
= 0, long yoffset
= 0 );
55 virtual void DrawPolygon( int n
, wxPoint points
[], long xoffset
= 0, long yoffset
= 0,
56 int fillStyle
=wxODDEVEN_RULE
);
57 virtual void DrawPolygon( wxList
*lines
, long xoffset
= 0, long yoffset
= 0,
58 int fillStyle
=wxODDEVEN_RULE
);
60 virtual void DrawRectangle( long x
, long y
, long width
, long height
);
61 virtual void DrawRoundedRectangle( long x
, long y
, long width
, long height
, double radius
= 20.0 );
62 virtual void DrawEllipse( long x
, long y
, long width
, long height
);
64 virtual bool CanDrawBitmap(void) const;
65 virtual void DrawIcon( const wxIcon
&icon
, long x
, long y
, bool useMask
=FALSE
);
66 virtual bool Blit( long xdest
, long ydest
, long width
, long height
,
67 wxDC
*source
, long xsrc
, long ysrc
, int logical_func
= wxCOPY
, bool useMask
=FALSE
);
69 virtual void DrawText( const wxString
&text
, long x
, long y
, bool use16
= FALSE
);
70 virtual bool CanGetTextExtent(void) const;
71 virtual void GetTextExtent( const wxString
&string
, long *width
, long *height
,
72 long *descent
= (long *) NULL
, long *externalLeading
= (long *) NULL
,
73 wxFont
*theFont
= (wxFont
*) NULL
, bool use16
= FALSE
);
74 virtual long GetCharWidth(void);
75 virtual long GetCharHeight(void);
77 virtual void Clear(void);
79 virtual void SetFont( const wxFont
&font
);
80 virtual void SetPen( const wxPen
&pen
);
81 virtual void SetBrush( const wxBrush
&brush
);
82 virtual void SetBackground( const wxBrush
&brush
);
83 virtual void SetLogicalFunction( int function
);
84 virtual void SetTextForeground( const wxColour
&col
);
85 virtual void SetTextBackground( const wxColour
&col
);
86 virtual void SetBackgroundMode( int mode
);
87 virtual void SetPalette( const wxPalette
& palette
);
89 virtual void SetClippingRegion( long x
, long y
, long width
, long height
);
90 virtual void DestroyClippingRegion(void);
92 virtual void DrawSpline( wxList
*points
);
94 public: // shouldn't be public
106 GdkWindow
*GetWindow(void);
109 #endif // __GTKDCCLIENTH__