]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk1/dcclient.h
GetHandle() added (back)
[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
10
11#ifndef __GTKDCCLIENTH__
12#define __GTKDCCLIENTH__
13
14#ifdef __GNUG__
15#pragma interface
16#endif
17
18#include "wx/dc.h"
19#include "wx/window.h"
20
21//-----------------------------------------------------------------------------
22// classes
23//-----------------------------------------------------------------------------
24
ec758a20 25class wxWindowDC;
c801d85f 26class wxPaintDC;
ec758a20 27class wxClientDC;
c801d85f
KB
28
29//-----------------------------------------------------------------------------
ec758a20 30// wxWindowDC
c801d85f
KB
31//-----------------------------------------------------------------------------
32
ec758a20 33class wxWindowDC: public wxDC
c801d85f 34{
ec758a20 35 DECLARE_DYNAMIC_CLASS(wxWindowDC)
c801d85f 36
ec758a20 37public:
4bc67cc5 38 wxWindowDC();
ec758a20 39 wxWindowDC( wxWindow *win );
8bbe427f 40
4bc67cc5 41 ~wxWindowDC();
8bbe427f 42
463c1fa1 43 virtual void FloodFill( long x, long y, const wxColour& col, int style=wxFLOOD_SURFACE );
ec758a20
RR
44 virtual bool GetPixel( long x1, long y1, wxColour *col ) const;
45
46 virtual void DrawLine( long x1, long y1, long x2, long y2 );
47 virtual void CrossHair( long x, long y );
48 virtual void DrawArc( long x1, long y1, long x2, long y2, double xc, double yc );
49 virtual void DrawEllipticArc( long x, long y, long width, long height, double sa, double ea );
50 virtual void DrawPoint( long x, long y );
8bbe427f 51
ec758a20
RR
52 virtual void DrawLines( int n, wxPoint points[], long xoffset = 0, long yoffset = 0 );
53 virtual void DrawLines( wxList *points, long xoffset = 0, long yoffset = 0 );
8bbe427f 54 virtual void DrawPolygon( int n, wxPoint points[], long xoffset = 0, long yoffset = 0,
ec758a20 55 int fillStyle=wxODDEVEN_RULE );
8bbe427f 56 virtual void DrawPolygon( wxList *lines, long xoffset = 0, long yoffset = 0,
ec758a20 57 int fillStyle=wxODDEVEN_RULE );
8bbe427f 58
ec758a20
RR
59 virtual void DrawRectangle( long x, long y, long width, long height );
60 virtual void DrawRoundedRectangle( long x, long y, long width, long height, double radius = 20.0 );
61 virtual void DrawEllipse( long x, long y, long width, long height );
8bbe427f 62
4bc67cc5 63 virtual bool CanDrawBitmap() const;
463c1fa1
RR
64 virtual void DrawIcon( const wxIcon &icon, long x, long y );
65 virtual void DrawBitmap( const wxBitmap &bitmap, long x, long y, bool useMask=FALSE );
ec758a20
RR
66 virtual bool Blit( long xdest, long ydest, long width, long height,
67 wxDC *source, long xsrc, long ysrc, int logical_func = wxCOPY, bool useMask=FALSE );
68
69 virtual void DrawText( const wxString &text, long x, long y, bool use16 = FALSE );
4bc67cc5 70 virtual bool CanGetTextExtent() const;
ec758a20 71 virtual void GetTextExtent( const wxString &string, long *width, long *height,
c67daf87
UR
72 long *descent = (long *) NULL, long *externalLeading = (long *) NULL,
73 wxFont *theFont = (wxFont *) NULL, bool use16 = FALSE );
4bc67cc5
RR
74 virtual long GetCharWidth();
75 virtual long GetCharHeight();
8bbe427f 76
4bc67cc5 77 virtual void Clear();
8bbe427f 78
ec758a20
RR
79 virtual void SetFont( const wxFont &font );
80 virtual void SetPen( const wxPen &pen );
81 virtual void SetBrush( const wxBrush &brush );
82 virtual void SetBackground( const wxBrush &brush );
83 virtual void SetLogicalFunction( int function );
84 virtual void SetTextForeground( const wxColour &col );
85 virtual void SetTextBackground( const wxColour &col );
86 virtual void SetBackgroundMode( int mode );
87 virtual void SetPalette( const wxPalette& palette );
8bbe427f 88
ec758a20 89 virtual void SetClippingRegion( long x, long y, long width, long height );
4bc67cc5 90 virtual void DestroyClippingRegion();
463c1fa1 91 virtual void SetClippingRegion( const wxRegion &region );
8bbe427f 92
ec758a20 93 virtual void DrawSpline( wxList *points );
8bbe427f 94
7bcb11d3
JS
95 // Resolution in pixels per logical inch
96 wxSize GetPPI(void) const;
97
ec758a20 98 // implementation
8bbe427f 99
ec758a20
RR
100 GdkWindow *m_window;
101 GdkGC *m_penGC;
102 GdkGC *m_brushGC;
103 GdkGC *m_textGC;
104 GdkGC *m_bgGC;
105 GdkColormap *m_cmap;
106 bool m_isMemDC;
bbbbe360 107 wxWindow *m_owner;
8bbe427f 108
4bc67cc5
RR
109 void SetUpDC();
110 void Destroy();
111 GdkWindow *GetWindow();
ec758a20
RR
112};
113
114//-----------------------------------------------------------------------------
115// wxPaintDC
116//-----------------------------------------------------------------------------
117
118class wxPaintDC : public wxWindowDC
119{
120 DECLARE_DYNAMIC_CLASS(wxPaintDC)
121
122public:
4bc67cc5 123 wxPaintDC();
ec758a20 124 wxPaintDC( wxWindow *win );
c801d85f
KB
125};
126
ec758a20
RR
127//-----------------------------------------------------------------------------
128// wxClientDC
129//-----------------------------------------------------------------------------
130
131class wxClientDC : public wxWindowDC
132{
133 DECLARE_DYNAMIC_CLASS(wxClientDC)
134
135public:
4bc67cc5 136 wxClientDC();
ec758a20
RR
137 wxClientDC( wxWindow *win );
138};
139
140
c801d85f 141#endif // __GTKDCCLIENTH__