]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/dcclient.h
windows emit wxCreateWindowEvent
[wxWidgets.git] / include / wx / gtk / 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{
b0e0d661 34 DECLARE_DYNAMIC_CLASS(wxWindowDC)
c801d85f 35
ec758a20 36public:
b0e0d661
VZ
37 wxWindowDC();
38 wxWindowDC( wxWindow *win );
39
40 ~wxWindowDC();
41
42 virtual bool CanDrawBitmap() const { return TRUE; }
43 virtual bool CanGetTextExtent() const { return TRUE; }
44
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;
47
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,
51 long xc, long yc );
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 );
55
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);
61
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 );
65
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 );
69
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 );
73
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;
82
83 virtual void Clear();
84
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 );
94
95 virtual void DoSetClippingRegion( long x, long y, long width, long height );
96 virtual void DestroyClippingRegion();
97 virtual void DoSetClippingRegionAsRegion( const wxRegion &region );
98
d54e4256 99#if wxUSE_SPLINES
b0e0d661 100 virtual void DoDrawSpline( wxList *points );
d54e4256 101#endif
b0e0d661
VZ
102
103 // Resolution in pixels per logical inch
104 virtual wxSize GetPPI() const;
105 virtual int GetDepth() const;
106
107 // implementation
108 // --------------
109
110 GdkWindow *m_window;
111 GdkGC *m_penGC;
112 GdkGC *m_brushGC;
113 GdkGC *m_textGC;
114 GdkGC *m_bgGC;
115 GdkColormap *m_cmap;
116 bool m_isMemDC;
117 wxWindow *m_owner;
118
119 void SetUpDC();
120 void Destroy();
121 GdkWindow *GetWindow() { return m_window; }
ec758a20
RR
122};
123
124//-----------------------------------------------------------------------------
125// wxPaintDC
126//-----------------------------------------------------------------------------
127
128class wxPaintDC : public wxWindowDC
129{
b0e0d661 130 DECLARE_DYNAMIC_CLASS(wxPaintDC)
ec758a20
RR
131
132public:
b0e0d661
VZ
133 wxPaintDC();
134 wxPaintDC( wxWindow *win );
c801d85f
KB
135};
136
ec758a20
RR
137//-----------------------------------------------------------------------------
138// wxClientDC
139//-----------------------------------------------------------------------------
140
141class wxClientDC : public wxWindowDC
142{
b0e0d661 143 DECLARE_DYNAMIC_CLASS(wxClientDC)
ec758a20
RR
144
145public:
b0e0d661
VZ
146 wxClientDC();
147 wxClientDC( wxWindow *win );
ec758a20
RR
148};
149
150
c801d85f 151#endif // __GTKDCCLIENTH__