]> git.saurik.com Git - wxWidgets.git/blame - include/wx/mgl/window.h
bracket unused function
[wxWidgets.git] / include / wx / mgl / window.h
CommitLineData
32b8ec41 1/////////////////////////////////////////////////////////////////////////////
a4bbc9f7
VS
2// Name: wx/mgl/window.h
3// Purpose: wxWindow class
32b8ec41 4// Author: Vaclav Slavik
a4bbc9f7 5// RCS-ID: $Id$
52750c2e 6// Copyright: (c) 2001-2002 SciTech Software, Inc. (www.scitechsoft.com)
65571936 7// Licence: wxWindows licence
32b8ec41
VZ
8/////////////////////////////////////////////////////////////////////////////
9
a4bbc9f7
VS
10#ifndef _WX_WINDOW_H_
11#define _WX_WINDOW_H_
32b8ec41 12
a4bbc9f7
VS
13// ---------------------------------------------------------------------------
14// headers
15// ---------------------------------------------------------------------------
32b8ec41 16
a4bbc9f7 17#include "wx/font.h"
32b8ec41 18
a4bbc9f7
VS
19struct window_t;
20class MGLDevCtx;
21
22// ---------------------------------------------------------------------------
23// wxWindow declaration for MGL
24// ---------------------------------------------------------------------------
32b8ec41 25
53a2db12 26class WXDLLIMPEXP_CORE wxWindowMGL : public wxWindowBase
32b8ec41 27{
32b8ec41 28public:
a4bbc9f7
VS
29 wxWindowMGL() { Init(); }
30
32b8ec41
VZ
31 wxWindowMGL(wxWindow *parent,
32 wxWindowID id,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 long style = 0,
a4bbc9f7
VS
36 const wxString& name = wxPanelNameStr)
37 {
38 Init();
39 Create(parent, id, pos, size, style, name);
40 }
41
42 virtual ~wxWindowMGL();
43
32b8ec41
VZ
44 bool Create(wxWindow *parent,
45 wxWindowID id,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 long style = 0,
a4bbc9f7 49 const wxString& name = wxPanelNameStr);
32b8ec41 50
46ae103b
WS
51 // implement base class (pure) virtual methods
52 // -------------------------------------------
53
54 virtual void SetLabel( const wxString &WXUNUSED(label) ) {}
55 virtual wxString GetLabel() const { return wxEmptyString; }
56
a4bbc9f7
VS
57 virtual void Raise();
58 virtual void Lower();
32b8ec41 59
46ae103b 60 virtual bool Show(bool show = true);
32b8ec41 61
a4bbc9f7 62 virtual void SetFocus();
32b8ec41 63
a4bbc9f7 64 virtual bool Reparent(wxWindowBase *newParent);
32b8ec41 65
a4bbc9f7 66 virtual void WarpPointer(int x, int y);
32b8ec41 67
46ae103b 68 virtual void Refresh(bool eraseBackground = true,
a4bbc9f7
VS
69 const wxRect *rect = (const wxRect *) NULL);
70 virtual void Update();
32b8ec41 71
a4bbc9f7 72 virtual bool SetCursor(const wxCursor &cursor);
46ae103b 73 virtual bool SetFont(const wxFont &font) { m_font = font; return true; }
32b8ec41 74
a4bbc9f7
VS
75 virtual int GetCharHeight() const;
76 virtual int GetCharWidth() const;
32b8ec41
VZ
77
78#if wxUSE_DRAG_AND_DROP
a4bbc9f7 79 virtual void SetDropTarget(wxDropTarget *dropTarget);
32b8ec41
VZ
80#endif // wxUSE_DRAG_AND_DROP
81
a4bbc9f7
VS
82 // Accept files for dragging
83 virtual void DragAcceptFiles(bool accept);
84
a4bbc9f7 85 virtual WXWidget GetHandle() const { return m_wnd; }
46ae103b 86
58061670 87 void SetMGLwindow_t(struct window_t *wnd);
a4bbc9f7 88
a4bbc9f7
VS
89 // implementation from now on
90 // --------------------------
46ae103b 91
a4bbc9f7 92protected:
17808a75
VZ
93 virtual void DoFreeze();
94 virtual void DoThaw();
95
96
a4bbc9f7
VS
97 // the window handle
98 struct window_t *m_wnd;
99 // whether there should be wxEraseEvent before wxPaintEvent or not
100 // (see wxWindow::Refresh)
f41ed3c4 101 bool m_refreshAfterThaw:1;
2b260bc3 102 int m_eraseBackground;
32b8ec41
VZ
103
104 // implement the base class pure virtuals
6de70470
VZ
105 virtual void DoGetTextExtent(const wxString& string,
106 int *x, int *y,
107 int *descent = NULL,
108 int *externalLeading = NULL,
109 const wxFont *font = NULL) const;
a4bbc9f7
VS
110 virtual void DoClientToScreen( int *x, int *y ) const;
111 virtual void DoScreenToClient( int *x, int *y ) const;
112 virtual void DoGetPosition( int *x, int *y ) const;
113 virtual void DoGetSize( int *width, int *height ) const;
114 virtual void DoGetClientSize( int *width, int *height ) const;
32b8ec41
VZ
115 virtual void DoSetSize(int x, int y,
116 int width, int height,
a4bbc9f7
VS
117 int sizeFlags = wxSIZE_AUTO);
118 virtual void DoSetClientSize(int width, int height);
32b8ec41 119
4116c221
VZ
120 virtual void DoCaptureMouse();
121 virtual void DoReleaseMouse();
122
a4bbc9f7
VS
123 // move the window to the specified location and resize it: this is called
124 // from both DoSetSize() and DoSetClientSize() and would usually just call
125 // ::MoveWindow() except for composite controls which will want to arrange
126 // themselves inside the given rectangle
127 virtual void DoMoveWindow(int x, int y, int width, int height);
46ae103b 128
32b8ec41 129private:
a4bbc9f7
VS
130 // common part of all ctors
131 void Init();
132 // counterpart to SetFocus
133 void KillFocus();
46ae103b 134
a4bbc9f7
VS
135 MGLDevCtx *m_paintMGLDC;
136 friend class wxPaintDC;
137
0bd63eb6 138 DECLARE_DYNAMIC_CLASS(wxWindowMGL)
c0c133e1 139 wxDECLARE_NO_COPY_CLASS(wxWindowMGL);
a4bbc9f7
VS
140 DECLARE_EVENT_TABLE()
141
142public:
143 void HandlePaint(MGLDevCtx *dc);
144 // needed by wxWindowPainter
7bdc1879 145 MGLDevCtx *GetPaintMGLDC() const { return m_paintMGLDC; }
32b8ec41
VZ
146};
147
a4bbc9f7 148
46ae103b 149#endif // _WX_WINDOW_H_