]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/gtk/mdi.h
make wxS_DEFAULT consistend with standard Unix behaviour
[wxWidgets.git] / include / wx / gtk / mdi.h
... / ...
CommitLineData
1/////////////////////////////////////////////////////////////////////////////
2// Name: mdi.h
3// Purpose:
4// Author: Robert Roebling
5// Created: 01/02/97
6// Id:
7// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8// Licence: wxWindows licence
9/////////////////////////////////////////////////////////////////////////////
10
11
12#ifndef __MDIH__
13#define __MDIH__
14
15#ifdef __GNUG__
16#pragma interface
17#endif
18
19#include "wx/defs.h"
20#include "wx/object.h"
21#include "wx/list.h"
22#include "wx/control.h"
23#include "wx/panel.h"
24#include "wx/frame.h"
25#include "wx/toolbar.h"
26
27//-----------------------------------------------------------------------------
28// classes
29//-----------------------------------------------------------------------------
30
31class wxMDIParentFrame;
32class wxMDIClientWindow;
33class wxMDIChildFrame;
34
35//-----------------------------------------------------------------------------
36// global data
37//-----------------------------------------------------------------------------
38
39extern const char* wxFrameNameStr;
40extern const char* wxStatusLineNameStr;
41
42//-----------------------------------------------------------------------------
43// wxMDIParentFrame
44//-----------------------------------------------------------------------------
45
46class wxMDIParentFrame: public wxFrame
47{
48 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
49
50 friend class wxMDIChildFrame;
51
52 public:
53
54 wxMDIParentFrame(void);
55 wxMDIParentFrame( wxWindow *parent,
56 wxWindowID id, const wxString& title,
57 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
58 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
59 const wxString& name = wxFrameNameStr );
60 ~wxMDIParentFrame(void);
61 bool Create( wxWindow *parent,
62 wxWindowID id, const wxString& title,
63 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
64 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
65 const wxString& name = wxFrameNameStr );
66
67
68 void GetClientSize(int *width, int *height) const;
69 wxMDIChildFrame *GetActiveChild(void) const;
70
71 wxMDIClientWindow *GetClientWindow(void) const;
72 virtual wxMDIClientWindow *OnCreateClient(void);
73
74 virtual void Cascade(void) {};
75 virtual void Tile(void) {};
76 virtual void ArrangeIcons(void) {};
77 virtual void ActivateNext(void);
78 virtual void ActivatePrevious(void);
79
80 void OnActivate( wxActivateEvent& event );
81 void OnSysColourChanged( wxSysColourChangedEvent& event );
82
83 //private:
84
85 wxMDIChildFrame *m_currentChild;
86
87 void SetMDIMenuBar( wxMenuBar *menu_bar );
88 virtual void GtkOnSize( int x, int y, int width, int height );
89
90 private:
91
92 wxMDIClientWindow *m_clientWindow;
93 bool m_parentFrameActive;
94 wxMenuBar *m_mdiMenuBar;
95
96 DECLARE_EVENT_TABLE()
97};
98
99//-----------------------------------------------------------------------------
100// wxMDIChildFrame
101//-----------------------------------------------------------------------------
102
103class wxMDIChildFrame: public wxPanel
104{
105 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
106
107 public:
108
109 wxMDIChildFrame(void);
110 wxMDIChildFrame( wxMDIParentFrame *parent,
111 wxWindowID id, const wxString& title,
112 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
113 long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
114 ~wxMDIChildFrame(void);
115 bool Create( wxMDIParentFrame *parent,
116 wxWindowID id, const wxString& title,
117 const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
118 long style = wxDEFAULT_FRAME_STYLE, const wxString& name = wxFrameNameStr );
119 void SetMenuBar( wxMenuBar *menu_bar );
120
121 // no status bars in wxGTK
122 virtual bool CreateStatusBar( int WXUNUSED(number) = 1 ) { return FALSE; };
123 virtual void SetStatusText( const wxString &WXUNUSED(text), int WXUNUSED(number) ) {};
124 virtual void SetStatusWidths( int WXUNUSED(n), int *WXUNUSED(width) ) {};
125
126 virtual void Maximize(void) {};
127 virtual void Restore(void) {};
128 virtual void Activate(void);
129
130 bool Destroy(void);
131 void OnCloseWindow( wxCloseEvent& event );
132
133 public:
134
135 wxString m_title;
136 wxMenuBar *m_menuBar;
137
138// private:
139
140 GtkNotebookPage *m_page;
141
142 DECLARE_EVENT_TABLE()
143};
144
145//-----------------------------------------------------------------------------
146// wxMDIClientWindow
147//-----------------------------------------------------------------------------
148
149class wxMDIClientWindow: public wxWindow
150{
151 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
152
153 public:
154
155 wxMDIClientWindow(void);
156 wxMDIClientWindow( wxMDIParentFrame *parent, long style = 0 );
157 ~wxMDIClientWindow(void);
158 virtual bool CreateClient( wxMDIParentFrame *parent, long style = wxVSCROLL | wxHSCROLL );
159 void AddChild( wxWindow *child );
160};
161
162#endif // __MDIH__
163