]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dcclient.h
added combobox editor
[wxWidgets.git] / include / wx / gtk1 / dcclient.h
CommitLineData
c801d85f
KB
1/////////////////////////////////////////////////////////////////////////////
2// Name: dcclient.h
3// Purpose:
4// Author: Robert Roebling
dbf858b5
RR
5// Id: $Id$
6// Copyright: (c) 1998 Robert Roebling
8bbe427f 7// Licence: wxWindows licence
c801d85f
KB
8/////////////////////////////////////////////////////////////////////////////
9
c801d85f
KB
10#ifndef __GTKDCCLIENTH__
11#define __GTKDCCLIENTH__
12
13#ifdef __GNUG__
14#pragma interface
15#endif
16
17#include "wx/dc.h"
18#include "wx/window.h"
19
20//-----------------------------------------------------------------------------
21// classes
22//-----------------------------------------------------------------------------
23
ec758a20 24class wxWindowDC;
c801d85f 25class wxPaintDC;
ec758a20 26class wxClientDC;
c801d85f
KB
27
28//-----------------------------------------------------------------------------
ec758a20 29// wxWindowDC
c801d85f
KB
30//-----------------------------------------------------------------------------
31
b0e0d661 32class wxWindowDC : public wxDC
c801d85f 33{
ec758a20 34public:
b0e0d661
VZ
35 wxWindowDC();
36 wxWindowDC( wxWindow *win );
37
38 ~wxWindowDC();
39
40 virtual bool CanDrawBitmap() const { return TRUE; }
41 virtual bool CanGetTextExtent() const { return TRUE; }
42
cd9da200 43//protected:
72cdf4c9
VZ
44 virtual void DoFloodFill( wxCoord x, wxCoord y, const wxColour& col, int style=wxFLOOD_SURFACE );
45 virtual bool DoGetPixel( wxCoord x1, wxCoord y1, wxColour *col ) const;
46
47 virtual void DoDrawLine( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2 );
48 virtual void DoCrossHair( wxCoord x, wxCoord y );
49 virtual void DoDrawArc( wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2,
50 wxCoord xc, wxCoord yc );
51 virtual void DoDrawEllipticArc( wxCoord x, wxCoord y, wxCoord width, wxCoord height,
b0e0d661 52 double sa, double ea );
72cdf4c9 53 virtual void DoDrawPoint( wxCoord x, wxCoord y );
b0e0d661
VZ
54
55 virtual void DoDrawLines(int n, wxPoint points[],
72cdf4c9 56 wxCoord xoffset, wxCoord yoffset);
b0e0d661 57 virtual void DoDrawPolygon(int n, wxPoint points[],
72cdf4c9 58 wxCoord xoffset, wxCoord yoffset,
b0e0d661
VZ
59 int fillStyle = wxODDEVEN_RULE);
60
72cdf4c9
VZ
61 virtual void DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
62 virtual void DoDrawRoundedRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord height, double radius = 20.0 );
63 virtual void DoDrawEllipse( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
b0e0d661 64
72cdf4c9
VZ
65 virtual void DoDrawIcon( const wxIcon &icon, wxCoord x, wxCoord y );
66 virtual void DoDrawBitmap( const wxBitmap &bitmap, wxCoord x, wxCoord y,
b0e0d661
VZ
67 bool useMask = FALSE );
68
72cdf4c9
VZ
69 virtual bool DoBlit( wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
70 wxDC *source, wxCoord xsrc, wxCoord ysrc,
b0e0d661
VZ
71 int logical_func = wxCOPY, bool useMask = FALSE );
72
72cdf4c9 73 virtual void DoDrawText( const wxString &text, wxCoord x, wxCoord y );
95724b1a
VZ
74 virtual void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y,
75 double angle);
72cdf4c9
VZ
76 virtual void DoGetTextExtent( const wxString &string,
77 wxCoord *width, wxCoord *height,
78 wxCoord *descent = (wxCoord *) NULL,
79 wxCoord *externalLeading = (wxCoord *) NULL,
b0e0d661 80 wxFont *theFont = (wxFont *) NULL) const;
72cdf4c9
VZ
81 virtual wxCoord GetCharWidth() const;
82 virtual wxCoord GetCharHeight() const;
b0e0d661
VZ
83
84 virtual void Clear();
85
86 virtual void SetFont( const wxFont &font );
87 virtual void SetPen( const wxPen &pen );
88 virtual void SetBrush( const wxBrush &brush );
89 virtual void SetBackground( const wxBrush &brush );
90 virtual void SetLogicalFunction( int function );
91 virtual void SetTextForeground( const wxColour &col );
92 virtual void SetTextBackground( const wxColour &col );
93 virtual void SetBackgroundMode( int mode );
94 virtual void SetPalette( const wxPalette& palette );
95
72cdf4c9 96 virtual void DoSetClippingRegion( wxCoord x, wxCoord y, wxCoord width, wxCoord height );
b0e0d661
VZ
97 virtual void DestroyClippingRegion();
98 virtual void DoSetClippingRegionAsRegion( const wxRegion &region );
99
d54e4256 100#if wxUSE_SPLINES
b0e0d661 101 virtual void DoDrawSpline( wxList *points );
d54e4256 102#endif
b0e0d661
VZ
103
104 // Resolution in pixels per logical inch
105 virtual wxSize GetPPI() const;
106 virtual int GetDepth() const;
107
108 // implementation
109 // --------------
110
111 GdkWindow *m_window;
112 GdkGC *m_penGC;
113 GdkGC *m_brushGC;
114 GdkGC *m_textGC;
115 GdkGC *m_bgGC;
116 GdkColormap *m_cmap;
117 bool m_isMemDC;
118 wxWindow *m_owner;
3d2d8da1
RR
119 wxRegion m_currentClippingRegion;
120 wxRegion m_paintClippingRegion;
b0e0d661
VZ
121
122 void SetUpDC();
123 void Destroy();
238d735d
RR
124 void ComputeScaleAndOrigin();
125
b0e0d661 126 GdkWindow *GetWindow() { return m_window; }
cd9da200 127
20e05ffb
RR
128private:
129 DECLARE_DYNAMIC_CLASS(wxWindowDC)
ec758a20
RR
130};
131
132//-----------------------------------------------------------------------------
133// wxPaintDC
134//-----------------------------------------------------------------------------
135
136class wxPaintDC : public wxWindowDC
137{
ec758a20 138public:
b0e0d661
VZ
139 wxPaintDC();
140 wxPaintDC( wxWindow *win );
cd9da200 141
20e05ffb
RR
142private:
143 DECLARE_DYNAMIC_CLASS(wxPaintDC)
c801d85f
KB
144};
145
ec758a20
RR
146//-----------------------------------------------------------------------------
147// wxClientDC
148//-----------------------------------------------------------------------------
149
150class wxClientDC : public wxWindowDC
151{
ec758a20 152public:
b0e0d661
VZ
153 wxClientDC();
154 wxClientDC( wxWindow *win );
cd9da200 155
20e05ffb
RR
156private:
157 DECLARE_DYNAMIC_CLASS(wxClientDC)
ec758a20
RR
158};
159
c801d85f 160#endif // __GTKDCCLIENTH__