]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/window.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Vaclav Slavik
6 // Copyright: (c) 2001 Vaclav Slavik
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_WINDOW_H__
12 #define __WX_WINDOW_H__
15 #pragma interface "window.h"
19 //-----------------------------------------------------------------------------
21 //-----------------------------------------------------------------------------
23 class WXDLLEXPORT wxWindowMGL
: public wxWindowBase
25 DECLARE_DYNAMIC_CLASS(wxWindowMGL
)
28 // creating the window
29 // -------------------
31 wxWindowMGL(wxWindow
*parent
,
33 const wxPoint
& pos
= wxDefaultPosition
,
34 const wxSize
& size
= wxDefaultSize
,
36 const wxString
& name
= wxPanelNameStr
) {}
37 bool Create(wxWindow
*parent
,
39 const wxPoint
& pos
= wxDefaultPosition
,
40 const wxSize
& size
= wxDefaultSize
,
42 const wxString
& name
= wxPanelNameStr
) {}
43 virtual ~wxWindowMGL() {}
45 // implement base class (pure) virtual methods
46 // -------------------------------------------
47 virtual bool Destroy() {return TRUE
;}
49 virtual void Raise() {}
50 virtual void Lower() {}
52 virtual bool Show( bool show
= TRUE
) {return TRUE
;}
53 virtual bool Enable( bool enable
= TRUE
) {return TRUE
;}
55 virtual bool IsRetained() const {return TRUE
;}
57 virtual void SetFocus() {}
58 virtual bool AcceptsFocus() const {return TRUE
;}
60 virtual bool Reparent( wxWindowBase
*newParent
) {return TRUE
;}
62 virtual void WarpPointer(int x
, int y
) {}
63 virtual void CaptureMouse() {}
64 virtual void ReleaseMouse() {}
66 virtual void Refresh( bool eraseBackground
= TRUE
,
67 const wxRect
*rect
= (const wxRect
*) NULL
) {}
68 virtual void Clear() {}
70 virtual bool SetBackgroundColour( const wxColour
&colour
) {return TRUE
;}
71 virtual bool SetForegroundColour( const wxColour
&colour
) {return TRUE
;}
72 virtual bool SetCursor( const wxCursor
&cursor
) {return TRUE
;}
73 virtual bool SetFont( const wxFont
&font
) {return TRUE
;}
75 virtual int GetCharHeight() const {return 0;}
76 virtual int GetCharWidth() const {return 0;}
77 virtual void GetTextExtent(const wxString
& string
,
79 int *descent
= (int *) NULL
,
80 int *externalLeading
= (int *) NULL
,
81 const wxFont
*theFont
= (const wxFont
*) NULL
)
84 virtual bool DoPopupMenu( wxMenu
*menu
, int x
, int y
) {return TRUE
;}
86 virtual void SetScrollbar( int orient
, int pos
, int thumbVisible
,
87 int range
, bool refresh
= TRUE
) {}
88 virtual void SetScrollPos( int orient
, int pos
, bool refresh
= TRUE
) {}
89 virtual int GetScrollPos( int orient
) const {return 0;}
90 virtual int GetScrollThumb( int orient
) const {return 0;}
91 virtual int GetScrollRange( int orient
) const {return 0;}
92 virtual void ScrollWindow( int dx
, int dy
,
93 const wxRect
* rect
= (wxRect
*) NULL
) {}
95 #if wxUSE_DRAG_AND_DROP
96 virtual void SetDropTarget( wxDropTarget
*dropTarget
) {}
97 #endif // wxUSE_DRAG_AND_DROP
99 virtual WXWidget
GetHandle() const { return NULL
; }
101 /* For compatibility across platforms (not in event table) */
102 void OnIdle(wxIdleEvent
& WXUNUSED(event
)) {};
104 // implement the base class pure virtuals
105 virtual void DoClientToScreen( int *x
, int *y
) const {}
106 virtual void DoScreenToClient( int *x
, int *y
) const {}
107 virtual void DoGetPosition( int *x
, int *y
) const {}
108 virtual void DoGetSize( int *width
, int *height
) const {}
109 virtual void DoGetClientSize( int *width
, int *height
) const {}
110 virtual void DoSetSize(int x
, int y
,
111 int width
, int height
,
112 int sizeFlags
= wxSIZE_AUTO
) {}
113 virtual void DoSetClientSize(int width
, int height
) {}
114 virtual void DoMoveWindow(int x
, int y
, int width
, int height
) {}
117 virtual void DoSetToolTip( wxToolTip
*tip
) {}
118 #endif // wxUSE_TOOLTIPS
120 // common part of all ctors (can't be virtual because called from ctor)
124 DECLARE_NO_COPY_CLASS(wxWindowMGL
);
127 #endif // ___WX_WINDOW_H__