]>
Commit | Line | Data |
---|---|---|
7c23a0b0 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dcclient.h | |
5e25ba90 | 3 | // Purpose: wxClientDC, wxPaintDC and wxWindowDC classes |
7c23a0b0 JS |
4 | // Author: AUTHOR |
5 | // Modified by: | |
6 | // Created: ??/??/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) AUTHOR | |
9 | // Licence: wxWindows licence | |
10 | ///////////////////////////////////////////////////////////////////////////// | |
11 | ||
12 | #ifndef _WX_DCCLIENT_H_ | |
13 | #define _WX_DCCLIENT_H_ | |
14 | ||
15 | #ifdef __GNUG__ | |
16 | #pragma interface "dcclient.h" | |
17 | #endif | |
18 | ||
19 | #include "wx/dc.h" | |
20 | ||
5e25ba90 JS |
21 | //----------------------------------------------------------------------------- |
22 | // classes | |
23 | //----------------------------------------------------------------------------- | |
7c23a0b0 | 24 | |
5e25ba90 | 25 | class WXDLLEXPORT wxPaintDC; |
34138703 | 26 | class WXDLLEXPORT wxWindow; |
7c23a0b0 | 27 | |
5e25ba90 JS |
28 | // Under Windows, wxClientDC, wxPaintDC and wxWindowDC are implemented differently. |
29 | // On many platforms, however, they will be the same. | |
7c23a0b0 | 30 | |
5e25ba90 JS |
31 | typedef wxPaintDC wxClientDC; |
32 | typedef wxPaintDC wxWindowDC; | |
7c23a0b0 | 33 | |
5e25ba90 JS |
34 | //----------------------------------------------------------------------------- |
35 | // wxPaintDC | |
36 | //----------------------------------------------------------------------------- | |
7c23a0b0 JS |
37 | |
38 | class WXDLLEXPORT wxPaintDC: public wxDC | |
39 | { | |
40 | DECLARE_DYNAMIC_CLASS(wxPaintDC) | |
41 | ||
5e25ba90 JS |
42 | public: |
43 | ||
44 | wxPaintDC(void); | |
45 | wxPaintDC( wxWindow *win ); | |
46 | ||
47 | ~wxPaintDC(void); | |
48 | ||
34138703 | 49 | virtual void FloodFill( long x1, long y1, wxColour* col, int style=wxFLOOD_SURFACE ); |
5e25ba90 JS |
50 | virtual bool GetPixel( long x1, long y1, wxColour *col ) const; |
51 | ||
52 | virtual void DrawLine( long x1, long y1, long x2, long y2 ); | |
53 | virtual void CrossHair( long x, long y ); | |
34138703 | 54 | virtual void DrawArc( long x1, long y1, long x2, long y2, long xc, long yc ); |
5e25ba90 JS |
55 | virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea ); |
56 | virtual void DrawPoint( long x, long y ); | |
57 | ||
58 | virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 ); | |
59 | virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 ); | |
60 | virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0, | |
61 | int fillStyle=wxODDEVEN_RULE ); | |
62 | virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0, | |
63 | int fillStyle=wxODDEVEN_RULE ); | |
64 | ||
65 | virtual void DrawRectangle( long x, long y, long width, long height ); | |
66 | virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 ); | |
67 | virtual void DrawEllipse( long x, long y, long width, long height ); | |
68 | ||
69 | virtual bool CanDrawBitmap(void) const; | |
70 | virtual void DrawIcon( const wxIcon &icon, long x, long y, bool useMask=FALSE ); | |
71 | virtual bool Blit( long xdest, long ydest, long width, long height, | |
72 | wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE ); | |
73 | ||
74 | virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE ); | |
75 | virtual bool CanGetTextExtent(void) const; | |
76 | virtual void GetTextExtent( const wxString &string, long *width, long *height, | |
77 | long *descent = NULL, long *externalLeading = NULL, | |
78 | wxFont *theFont = NULL, bool use16 = FALSE ); | |
79 | virtual long GetCharWidth(void); | |
80 | virtual long GetCharHeight(void); | |
81 | ||
82 | virtual void Clear(void); | |
83 | ||
84 | virtual void SetFont( const wxFont &font ); | |
85 | virtual void SetPen( const wxPen &pen ); | |
86 | virtual void SetBrush( const wxBrush &brush ); | |
87 | virtual void SetBackground( const wxBrush &brush ); | |
88 | virtual void SetLogicalFunction( int function ); | |
89 | virtual void SetTextForeground( const wxColour &col ); | |
90 | virtual void SetTextBackground( const wxColour &col ); | |
91 | virtual void SetBackgroundMode( int mode ); | |
92 | virtual void SetPalette( const wxPalette& palette ); | |
93 | ||
94 | virtual void SetClippingRegion( long x, long y, long width, long height ); | |
95 | virtual void DestroyClippingRegion(void); | |
96 | ||
dfad0599 | 97 | virtual void DrawSpline( wxList *points ); |
7c23a0b0 JS |
98 | }; |
99 | ||
100 | #endif | |
101 | // _WX_DCCLIENT_H_ |