]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/os2/dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
8 // Copyright: (c) AUTHOR
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_DCCLIENT_H_
13 #define _WX_DCCLIENT_H_
16 #pragma interface "dcclient.h"
21 //-----------------------------------------------------------------------------
23 //-----------------------------------------------------------------------------
25 class WXDLLEXPORT wxPaintDC
;
26 class WXDLLEXPORT wxWindow
;
28 // Under Windows, wxClientDC, wxPaintDC and wxWindowDC are implemented differently.
29 // On many platforms, however, they will be the same.
31 class WXDLLEXPORT wxWindowDC
: public wxDC
33 DECLARE_DYNAMIC_CLASS(wxWindowDC
)
38 wxWindowDC( wxWindow
*win
);
42 virtual void FloodFill( long x1
, long y1
, const wxColour
& col
, int style
=wxFLOOD_SURFACE
);
43 virtual bool GetPixel( long x1
, long y1
, wxColour
*col
) const;
45 virtual void DrawLine( long x1
, long y1
, long x2
, long y2
);
46 virtual void CrossHair( long x
, long y
);
47 virtual void DrawArc( long x1
, long y1
, long x2
, long y2
, long xc
, long yc
);
48 virtual void DrawEllipticArc( long x
, long y
, long width
, long height
, double sa
, double ea
);
49 virtual void DrawPoint( long x
, long y
);
51 virtual void DrawLines( int n
, wxPoint points
[], long xoffset
= 0, long yoffset
= 0 );
52 virtual void DrawLines( wxList
*points
, long xoffset
= 0, long yoffset
= 0 );
53 virtual void DrawPolygon( int n
, wxPoint points
[], long xoffset
= 0, long yoffset
= 0,
54 int fillStyle
=wxODDEVEN_RULE
);
55 virtual void DrawPolygon( wxList
*lines
, long xoffset
= 0, long yoffset
= 0,
56 int fillStyle
=wxODDEVEN_RULE
);
58 virtual void DrawRectangle( long x
, long y
, long width
, long height
);
59 virtual void DrawRoundedRectangle( long x
, long y
, long width
, long height
, double radius
= 20.0 );
60 virtual void DrawEllipse( long x
, long y
, long width
, long height
);
62 virtual bool CanDrawBitmap(void) const;
63 virtual void DrawIcon( const wxIcon
&icon
, long x
, long y
, bool useMask
=FALSE
);
64 virtual bool Blit( long xdest
, long ydest
, long width
, long height
,
65 wxDC
*source
, long xsrc
, long ysrc
, int logical_func
= wxCOPY
, bool useMask
=FALSE
);
67 virtual void DrawText( const wxString
&text
, long x
, long y
, bool use16
= FALSE
);
68 virtual bool CanGetTextExtent(void) const;
69 virtual void GetTextExtent( const wxString
&string
, long *width
, long *height
,
70 long *descent
= NULL
, long *externalLeading
= NULL
,
71 wxFont
*theFont
= NULL
, bool use16
= FALSE
) const;
72 virtual long GetCharWidth(void) const;
73 virtual long GetCharHeight(void) const;
75 virtual void Clear(void);
77 virtual void SetFont( const wxFont
&font
);
78 virtual void SetPen( const wxPen
&pen
);
79 virtual void SetBrush( const wxBrush
&brush
);
80 virtual void SetBackground( const wxBrush
&brush
);
81 virtual void SetLogicalFunction( int function
);
82 virtual void SetTextForeground( const wxColour
&col
);
83 virtual void SetTextBackground( const wxColour
&col
);
84 virtual void SetBackgroundMode( int mode
);
85 virtual void SetPalette( const wxPalette
& palette
);
87 virtual void SetClippingRegion( long x
, long y
, long width
, long height
);
88 virtual void SetClippingRegion( const wxRegion
& region
) ;
89 virtual void DestroyClippingRegion(void);
91 virtual void DrawSpline( wxList
*points
);
93 // to supress virtual function hiding, do not use
94 void DrawEllipticArc(const wxPoint
& pt
, const wxSize
& sz
,
96 { wxDC::DrawEllipticArc(pt
, sz
, sa
, ea
); };
97 void DrawPoint(wxPoint
& pt
)
98 { wxDC
:DrawPoint(pt
); };
99 void DrawSpline(int n
, wxPoint points
[])
100 { wxDC::DrawSpline(n
, points
); };
101 void DrawSpline(long x1
, long y1
, long x2
, long y2
, long x3
, long y3
)
102 { wxDC::DrawSpline(x1
, y1
, x2
, y2
, x3
, y3
); };
103 virtual void GetTextExtent( const wxString
&string
, long *width
, long *height
,
104 long *descent
= NULL
, long *externalLeading
= NULL
,
105 wxFont
*theFont
= NULL
) const
106 { GetTextExtent(string
, width
, height
, descent
, externalLeading
, theFont
, FALSE
); };
109 //-----------------------------------------------------------------------------
111 //-----------------------------------------------------------------------------
113 class WXDLLEXPORT wxPaintDC
: public wxWindowDC
115 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
119 wxPaintDC(void):wxWindowDC() {};
120 wxPaintDC( wxWindow
*win
): wxWindowDC(win
) {};
124 //-----------------------------------------------------------------------------
126 //-----------------------------------------------------------------------------
128 class WXDLLEXPORT wxClientDC
: public wxWindowDC
130 DECLARE_DYNAMIC_CLASS(wxClientDC
)
134 wxClientDC(void):wxWindowDC() {};
135 wxClientDC( wxWindow
*win
): wxWindowDC(win
) {};