]> git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/dcclient.h
Removed DrawOpenSpline since it doesn't seem to be needed, with required changes
[wxWidgets.git] / include / wx / gtk / dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: dcclient.h
3 // Purpose:
4 // Author: Robert Roebling
5 // Created: 01/02/97
6 // Id:
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
10
11
12 #ifndef __GTKDCCLIENTH__
13 #define __GTKDCCLIENTH__
14
15 #ifdef __GNUG__
16 #pragma interface
17 #endif
18
19 #include "wx/dc.h"
20 #include "wx/window.h"
21
22 //-----------------------------------------------------------------------------
23 // classes
24 //-----------------------------------------------------------------------------
25
26 class wxPaintDC;
27 typedef wxPaintDC wxClientDC;
28 typedef wxPaintDC wxWindowDC;
29
30 //-----------------------------------------------------------------------------
31 // wxPaintDC
32 //-----------------------------------------------------------------------------
33
34 class wxPaintDC: public wxDC
35 {
36 DECLARE_DYNAMIC_CLASS(wxPaintDC)
37
38 public:
39
40 wxPaintDC(void);
41 wxPaintDC( wxWindow *win );
42
43 ~wxPaintDC(void);
44
45 virtual void FloodFill( long x1, long y1, wxColour *col, int style=wxFLOOD_SURFACE );
46 virtual bool GetPixel( long x1, long y1, wxColour *col ) const;
47
48 virtual void DrawLine( long x1, long y1, long x2, long y2 );
49 virtual void CrossHair( long x, long y );
50 virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc );
51 virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea );
52 virtual void DrawPoint( long x, long y );
53
54 virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 );
55 virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 );
56 virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0,
57 int fillStyle=wxODDEVEN_RULE );
58 virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0,
59 int fillStyle=wxODDEVEN_RULE );
60
61 virtual void DrawRectangle( long x, long y, long width, long height );
62 virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 );
63 virtual void DrawEllipse( long x, long y, long width, long height );
64
65 virtual bool CanDrawBitmap(void) const;
66 virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE );
67 virtual bool Blit( long xdest, long ydest, long width, long height,
68 wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE );
69
70 virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE );
71 virtual bool CanGetTextExtent(void) const;
72 virtual void GetTextExtent( const wxString &string, long *width, long *height,
73 long *descent = (long *) NULL, long *externalLeading = (long *) NULL,
74 wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE );
75 virtual long GetCharWidth(void);
76 virtual long GetCharHeight(void);
77
78 virtual void Clear(void);
79
80 virtual void SetFont( const wxFont &font );
81 virtual void SetPen( const wxPen &pen );
82 virtual void SetBrush( const wxBrush &brush );
83 virtual void SetBackground( const wxBrush &brush );
84 virtual void SetLogicalFunction( int function );
85 virtual void SetTextForeground( const wxColour &col );
86 virtual void SetTextBackground( const wxColour &col );
87 virtual void SetBackgroundMode( int mode );
88 virtual void SetPalette( const wxPalette& palette );
89
90 virtual void SetClippingRegion( long x, long y, long width, long height );
91 virtual void DestroyClippingRegion(void);
92
93 virtual void DrawSpline( wxList *points );
94
95 public: // shouldn't be public
96
97 GdkWindow *m_window;
98 GdkGC *m_penGC;
99 GdkGC *m_brushGC;
100 GdkGC *m_textGC;
101 GdkGC *m_bgGC;
102 GdkColormap *m_cmap;
103 bool m_isDrawable;
104
105 void SetUpDC(void);
106 GdkWindow *GetWindow(void);
107 };
108
109 #endif // __GTKDCCLIENTH__