]>
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 /////////////////////////////////////////////////////////////////////////////
10 #ifndef __GTKDCCLIENTH__
11 #define __GTKDCCLIENTH__
18 #include "wx/window.h"
20 //-----------------------------------------------------------------------------
22 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
32 class wxWindowDC
: public wxDC
36 wxWindowDC( wxWindow
*win
);
40 virtual bool CanDrawBitmap() const { return TRUE
; }
41 virtual bool CanGetTextExtent() const { return TRUE
; }
43 virtual void DoFloodFill( wxCoord x
, wxCoord y
, const wxColour
& col
, int style
=wxFLOOD_SURFACE
);
44 virtual bool DoGetPixel( wxCoord x1
, wxCoord y1
, wxColour
*col
) const;
46 virtual void DoDrawLine( wxCoord x1
, wxCoord y1
, wxCoord x2
, wxCoord y2
);
47 virtual void DoCrossHair( wxCoord x
, wxCoord y
);
48 virtual void DoDrawArc( wxCoord x1
, wxCoord y1
, wxCoord x2
, wxCoord y2
,
49 wxCoord xc
, wxCoord yc
);
50 virtual void DoDrawEllipticArc( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
,
51 double sa
, double ea
);
52 virtual void DoDrawPoint( wxCoord x
, wxCoord y
);
54 virtual void DoDrawLines(int n
, wxPoint points
[],
55 wxCoord xoffset
, wxCoord yoffset
);
56 virtual void DoDrawPolygon(int n
, wxPoint points
[],
57 wxCoord xoffset
, wxCoord yoffset
,
58 int fillStyle
= wxODDEVEN_RULE
);
60 virtual void DoDrawRectangle( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
);
61 virtual void DoDrawRoundedRectangle( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
, double radius
= 20.0 );
62 virtual void DoDrawEllipse( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
);
64 virtual void DoDrawIcon( const wxIcon
&icon
, wxCoord x
, wxCoord y
);
65 virtual void DoDrawBitmap( const wxBitmap
&bitmap
, wxCoord x
, wxCoord y
,
66 bool useMask
= FALSE
);
68 virtual bool DoBlit( wxCoord xdest
, wxCoord ydest
, wxCoord width
, wxCoord height
,
69 wxDC
*source
, wxCoord xsrc
, wxCoord ysrc
,
70 int logical_func
= wxCOPY
, bool useMask
= FALSE
);
72 virtual void DoDrawText( const wxString
&text
, wxCoord x
, wxCoord y
);
73 virtual void DoGetTextExtent( const wxString
&string
,
74 wxCoord
*width
, wxCoord
*height
,
75 wxCoord
*descent
= (wxCoord
*) NULL
,
76 wxCoord
*externalLeading
= (wxCoord
*) NULL
,
77 wxFont
*theFont
= (wxFont
*) NULL
) const;
78 virtual wxCoord
GetCharWidth() const;
79 virtual wxCoord
GetCharHeight() const;
83 virtual void SetFont( const wxFont
&font
);
84 virtual void SetPen( const wxPen
&pen
);
85 virtual void SetBrush( const wxBrush
&brush
);
86 virtual void SetBackground( const wxBrush
&brush
);
87 virtual void SetLogicalFunction( int function
);
88 virtual void SetTextForeground( const wxColour
&col
);
89 virtual void SetTextBackground( const wxColour
&col
);
90 virtual void SetBackgroundMode( int mode
);
91 virtual void SetPalette( const wxPalette
& palette
);
93 virtual void DoSetClippingRegion( wxCoord x
, wxCoord y
, wxCoord width
, wxCoord height
);
94 virtual void DestroyClippingRegion();
95 virtual void DoSetClippingRegionAsRegion( const wxRegion
®ion
);
98 virtual void DoDrawSpline( wxList
*points
);
101 // Resolution in pixels per logical inch
102 virtual wxSize
GetPPI() const;
103 virtual int GetDepth() const;
119 void ComputeScaleAndOrigin();
121 GdkWindow
*GetWindow() { return m_window
; }
124 DECLARE_DYNAMIC_CLASS(wxWindowDC
)
127 //-----------------------------------------------------------------------------
129 //-----------------------------------------------------------------------------
131 class wxPaintDC
: public wxWindowDC
135 wxPaintDC( wxWindow
*win
);
138 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
141 //-----------------------------------------------------------------------------
143 //-----------------------------------------------------------------------------
145 class wxClientDC
: public wxWindowDC
149 wxClientDC( wxWindow
*win
);
152 DECLARE_DYNAMIC_CLASS(wxClientDC
)
155 #endif // __GTKDCCLIENTH__