]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk/mdi.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
6 // Copyright: (c) 1998 Robert Roebling
7 // Licence: wxWindows licence
8 /////////////////////////////////////////////////////////////////////////////
19 #include "wx/object.h"
21 #include "wx/control.h"
24 #include "wx/toolbar.h"
26 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 class wxMDIParentFrame
;
31 class wxMDIClientWindow
;
32 class wxMDIChildFrame
;
34 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 extern const wxChar
* wxFrameNameStr
;
39 extern const wxChar
* wxStatusLineNameStr
;
41 //-----------------------------------------------------------------------------
43 //-----------------------------------------------------------------------------
45 class wxMDIParentFrame
: public wxFrame
48 wxMDIParentFrame() { Init(); }
49 wxMDIParentFrame(wxWindow
*parent
,
51 const wxString
& title
,
52 const wxPoint
& pos
= wxDefaultPosition
,
53 const wxSize
& size
= wxDefaultSize
,
54 long style
= wxDEFAULT_FRAME_STYLE
| wxVSCROLL
| wxHSCROLL
,
55 const wxString
& name
= wxFrameNameStr
)
59 (void)Create(parent
, id
, title
, pos
, size
, style
, name
);
62 ~wxMDIParentFrame(void);
63 bool Create( wxWindow
*parent
,
64 wxWindowID id
, const wxString
& title
,
65 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
66 long style
= wxDEFAULT_FRAME_STYLE
| wxVSCROLL
| wxHSCROLL
,
67 const wxString
& name
= wxFrameNameStr
);
69 wxMDIChildFrame
*GetActiveChild() const;
71 wxMDIClientWindow
*GetClientWindow() const;
72 virtual wxMDIClientWindow
*OnCreateClient();
74 virtual void Cascade() {}
75 virtual void Tile() {}
76 virtual void ArrangeIcons() {}
77 virtual void ActivateNext();
78 virtual void ActivatePrevious();
82 wxMDIClientWindow
*m_clientWindow
;
85 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
86 virtual void OnInternalIdle();
91 virtual void DoGetClientSize(int *width
, int *height
) const;
94 friend class wxMDIChildFrame
;
96 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame
)
99 //-----------------------------------------------------------------------------
101 //-----------------------------------------------------------------------------
103 class wxMDIChildFrame
: public wxFrame
107 wxMDIChildFrame( wxMDIParentFrame
*parent
,
109 const wxString
& title
,
110 const wxPoint
& pos
= wxDefaultPosition
,
111 const wxSize
& size
= wxDefaultSize
,
112 long style
= wxDEFAULT_FRAME_STYLE
,
113 const wxString
& name
= wxFrameNameStr
);
115 virtual ~wxMDIChildFrame();
116 bool Create( wxMDIParentFrame
*parent
,
118 const wxString
& title
,
119 const wxPoint
& pos
= wxDefaultPosition
,
120 const wxSize
& size
= wxDefaultSize
,
121 long style
= wxDEFAULT_FRAME_STYLE
,
122 const wxString
& name
= wxFrameNameStr
);
124 virtual void SetMenuBar( wxMenuBar
*menu_bar
);
125 virtual wxMenuBar
*GetMenuBar() const;
127 virtual void AddChild( wxWindowBase
*child
);
129 virtual void Activate();
133 virtual wxStatusBar
* CreateStatusBar( int WXUNUSED(number
) = 1,
134 long WXUNUSED(style
) = 1,
135 wxWindowID
WXUNUSED(id
) = 1,
136 const wxString
& WXUNUSED(name
) = wxEmptyString
)
137 { return (wxStatusBar
*)NULL
; }
139 virtual wxStatusBar
*GetStatusBar() const { return (wxStatusBar
*)NULL
; }
140 virtual void SetStatusText( const wxString
&WXUNUSED(text
), int WXUNUSED(number
)=0 ) {}
141 virtual void SetStatusWidths( int WXUNUSED(n
), const int WXUNUSED(widths_field
)[] ) {}
145 virtual void SetSizeHints( int WXUNUSED(minW
), int WXUNUSED(minH
),
146 int WXUNUSED(maxW
), int WXUNUSED(maxH
),
147 int WXUNUSED(incW
), int WXUNUSED(incH
) ) {}
151 virtual wxToolBar
* CreateToolBar( long WXUNUSED(style
),
152 wxWindowID
WXUNUSED(id
),
153 const wxString
& WXUNUSED(name
) )
154 { return (wxToolBar
*)NULL
; }
155 virtual wxToolBar
*GetToolBar() const { return (wxToolBar
*)NULL
; }
159 void SetIcon( const wxIcon
&icon
) { m_icon
= icon
; }
162 void SetTitle( const wxString
&title
);
163 wxString
GetTitle() const { return m_title
; }
166 virtual void Maximize( bool WXUNUSED(maximize
) ) {}
167 virtual void Restore() {}
169 virtual bool IsTopLevel() const { return FALSE
; }
171 void OnActivate( wxActivateEvent
& event
);
172 void OnMenuHighlight( wxMenuEvent
& event
);
176 wxMenuBar
*m_menuBar
;
177 GtkNotebookPage
*m_page
;
181 virtual void DoGetClientSize( int *width
, int *height
) const;
184 DECLARE_EVENT_TABLE()
185 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame
)
188 //-----------------------------------------------------------------------------
190 //-----------------------------------------------------------------------------
192 class wxMDIClientWindow
: public wxWindow
196 wxMDIClientWindow( wxMDIParentFrame
*parent
, long style
= 0 );
197 ~wxMDIClientWindow();
198 virtual bool CreateClient( wxMDIParentFrame
*parent
, long style
= wxVSCROLL
| wxHSCROLL
);
201 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow
)