]> git.saurik.com Git - wxWidgets.git/blob - include/wx/mgl/frame.h
added dependency handling to Makefiles
[wxWidgets.git] / include / wx / mgl / frame.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/gtk/frame.h
3 // Purpose:
4 // Author: Vaclav Slavik
5 // Id: $Id$
6 // Copyright: (c) 2001 SciTech Software, Inc. (www.scitechsoft.com)
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
9
10
11 #ifndef __MGL_FRAME_H__
12 #define __MGL_FRAME_H__
13
14 #ifdef __GNUG__
15 #pragma interface "frame.h"
16 #endif
17
18 //-----------------------------------------------------------------------------
19 // classes
20 //-----------------------------------------------------------------------------
21
22 class WXDLLEXPORT wxMDIChildFrame;
23 class WXDLLEXPORT wxMDIClientWindow;
24 class WXDLLEXPORT wxMenu;
25 class WXDLLEXPORT wxMenuBar;
26 class WXDLLEXPORT wxToolBar;
27 class WXDLLEXPORT wxStatusBar;
28
29 class WXDLLEXPORT wxFrame;
30
31 //-----------------------------------------------------------------------------
32 // wxFrame
33 //-----------------------------------------------------------------------------
34
35 //FIXME_MGL
36 class WXDLLEXPORT wxFrame : public wxFrameBase
37 {
38 public:
39 // construction
40 wxFrame() { Init(); }
41 wxFrame(wxWindow *parent,
42 wxWindowID id,
43 const wxString& title,
44 const wxPoint& pos = wxDefaultPosition,
45 const wxSize& size = wxDefaultSize,
46 long style = wxDEFAULT_FRAME_STYLE,
47 const wxString& name = wxFrameNameStr)
48 {
49 Init();
50
51 Create(parent, id, title, pos, size, style, name);
52 }
53
54 bool Create(wxWindow *parent,
55 wxWindowID id,
56 const wxString& title,
57 const wxPoint& pos = wxDefaultPosition,
58 const wxSize& size = wxDefaultSize,
59 long style = wxDEFAULT_FRAME_STYLE,
60 const wxString& name = wxFrameNameStr) {}
61
62 virtual ~wxFrame() {}
63
64 // implement base class pure virtuals
65 virtual void Maximize(bool maximize = TRUE) {}
66 virtual bool IsMaximized() const {}
67 virtual void Iconize(bool iconize = TRUE) {}
68 virtual bool IsIconized() const {}
69 virtual void SetIcon(const wxIcon& icon) {}
70 virtual void MakeModal(bool modal = TRUE) {}
71 virtual void Restore() {}
72
73 #if wxUSE_MENUS
74 virtual void SetMenuBar( wxMenuBar *menuBar ) {}
75 #endif // wxUSE_MENUS
76
77 #if wxUSE_STATUSBAR
78 virtual void PositionStatusBar() {}
79
80 virtual wxStatusBar* CreateStatusBar(int number = 1,
81 long style = wxST_SIZEGRIP,
82 wxWindowID id = 0,
83 const wxString& name = wxStatusLineNameStr) {}
84 #endif // wxUSE_STATUSBAR
85
86 #if wxUSE_TOOLBAR
87 virtual wxToolBar* CreateToolBar(long style = wxNO_BORDER | wxTB_HORIZONTAL | wxTB_FLAT,
88 wxWindowID id = -1,
89 const wxString& name = wxToolBarNameStr) {}
90 void SetToolBar(wxToolBar *toolbar) {}
91 #endif // wxUSE_TOOLBAR
92
93 virtual bool Show(bool show = TRUE) {}
94
95 virtual void SetTitle( const wxString &title ) {}
96 virtual wxString GetTitle() const { return m_title; }
97
98 // implementation from now on
99 // --------------------------
100
101 // move the window to the specified location and resize it: this is called
102 // from both DoSetSize() and DoSetClientSize()
103 virtual void DoMoveWindow(int x, int y, int width, int height) {}
104
105 // GTK callbacks
106 virtual void GtkOnSize( int x, int y, int width, int height ) {}
107 virtual void OnInternalIdle() {}
108
109 wxString m_title;
110 int m_miniEdge,
111 m_miniTitle;
112 bool m_menuBarDetached;
113 bool m_toolBarDetached;
114 bool m_insertInClientArea; /* not from within OnCreateXXX */
115
116 protected:
117 // common part of all ctors
118 void Init() {}
119
120 // override wxWindow methods to take into account tool/menu/statusbars
121 virtual void DoSetSize(int x, int y,
122 int width, int height,
123 int sizeFlags = wxSIZE_AUTO) {}
124
125 virtual void DoSetClientSize(int width, int height) {}
126 virtual void DoGetClientSize( int *width, int *height ) const {}
127
128 private:
129 DECLARE_DYNAMIC_CLASS(wxFrame)
130 };
131
132 #endif // __WX_FRAME_H__