]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKDCCLIENTH__
11 #define __GTKDCCLIENTH__
18 #include "wx/window.h"
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 class wxWindowDC
: public wxDC
34 DECLARE_DYNAMIC_CLASS(wxWindowDC
)
38 wxWindowDC( wxWindow
*win
);
42 virtual bool CanDrawBitmap() const { return TRUE
; }
43 virtual bool CanGetTextExtent() const { return TRUE
; }
45 virtual void DoFloodFill( long x
, long y
, const wxColour
& col
, int style
=wxFLOOD_SURFACE
);
46 virtual bool DoGetPixel( long x1
, long y1
, wxColour
*col
) const;
48 virtual void DoDrawLine( long x1
, long y1
, long x2
, long y2
);
49 virtual void DoCrossHair( long x
, long y
);
50 virtual void DoDrawArc( long x1
, long y1
, long x2
, long y2
,
52 virtual void DoDrawEllipticArc( long x
, long y
, long width
, long height
,
53 double sa
, double ea
);
54 virtual void DoDrawPoint( long x
, long y
);
56 virtual void DoDrawLines(int n
, wxPoint points
[],
57 long xoffset
, long yoffset
);
58 virtual void DoDrawPolygon(int n
, wxPoint points
[],
59 long xoffset
, long yoffset
,
60 int fillStyle
= wxODDEVEN_RULE
);
62 virtual void DoDrawRectangle( long x
, long y
, long width
, long height
);
63 virtual void DoDrawRoundedRectangle( long x
, long y
, long width
, long height
, double radius
= 20.0 );
64 virtual void DoDrawEllipse( long x
, long y
, long width
, long height
);
66 virtual void DoDrawIcon( const wxIcon
&icon
, long x
, long y
);
67 virtual void DoDrawBitmap( const wxBitmap
&bitmap
, long x
, long y
,
68 bool useMask
= FALSE
);
70 virtual bool DoBlit( long xdest
, long ydest
, long width
, long height
,
71 wxDC
*source
, long xsrc
, long ysrc
,
72 int logical_func
= wxCOPY
, bool useMask
= FALSE
);
74 virtual void DoDrawText( const wxString
&text
, long x
, long y
);
75 virtual void GetTextExtent( const wxString
&string
,
76 long *width
, long *height
,
77 long *descent
= (long *) NULL
,
78 long *externalLeading
= (long *) NULL
,
79 wxFont
*theFont
= (wxFont
*) NULL
) const;
80 virtual long GetCharWidth() const;
81 virtual long GetCharHeight() const;
85 virtual void SetFont( const wxFont
&font
);
86 virtual void SetPen( const wxPen
&pen
);
87 virtual void SetBrush( const wxBrush
&brush
);
88 virtual void SetBackground( const wxBrush
&brush
);
89 virtual void SetLogicalFunction( int function
);
90 virtual void SetTextForeground( const wxColour
&col
);
91 virtual void SetTextBackground( const wxColour
&col
);
92 virtual void SetBackgroundMode( int mode
);
93 virtual void SetPalette( const wxPalette
& palette
);
95 virtual void DoSetClippingRegion( long x
, long y
, long width
, long height
);
96 virtual void DestroyClippingRegion();
97 virtual void DoSetClippingRegionAsRegion( const wxRegion
®ion
);
100 virtual void DoDrawSpline( wxList
*points
);
103 // Resolution in pixels per logical inch
104 virtual wxSize
GetPPI() const;
105 virtual int GetDepth() const;
121 GdkWindow
*GetWindow() { return m_window
; }
124 //-----------------------------------------------------------------------------
126 //-----------------------------------------------------------------------------
128 class wxPaintDC
: public wxWindowDC
130 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
134 wxPaintDC( wxWindow
*win
);
137 //-----------------------------------------------------------------------------
139 //-----------------------------------------------------------------------------
141 class wxClientDC
: public wxWindowDC
143 DECLARE_DYNAMIC_CLASS(wxClientDC
)
147 wxClientDC( wxWindow
*win
);
151 #endif // __GTKDCCLIENTH__