]>
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 void GetClientSize(int *width
, int *height
) const;
70 wxMDIChildFrame
*GetActiveChild() const;
72 wxMDIClientWindow
*GetClientWindow() const;
73 virtual wxMDIClientWindow
*OnCreateClient();
75 virtual void Cascade() {}
76 virtual void Tile() {}
77 virtual void ArrangeIcons() {}
78 virtual void ActivateNext();
79 virtual void ActivatePrevious();
83 wxMDIClientWindow
*m_clientWindow
;
86 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
87 virtual void OnInternalIdle();
93 friend class wxMDIChildFrame
;
95 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame
)
98 //-----------------------------------------------------------------------------
100 //-----------------------------------------------------------------------------
102 class wxMDIChildFrame
: public wxFrame
106 wxMDIChildFrame( wxMDIParentFrame
*parent
,
107 wxWindowID id
, const wxString
& title
,
108 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
109 long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
111 bool Create( wxMDIParentFrame
*parent
,
112 wxWindowID id
, const wxString
& title
,
113 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
114 long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
116 virtual void SetMenuBar( wxMenuBar
*menu_bar
);
117 virtual wxMenuBar
*GetMenuBar() const;
119 virtual void GetClientSize( int *width
, int *height
) const;
120 virtual void AddChild( wxWindowBase
*child
);
122 virtual void Activate();
126 virtual wxStatusBar
* CreateStatusBar( int WXUNUSED(number
) = 1,
127 long WXUNUSED(style
) = 1,
128 wxWindowID
WXUNUSED(id
) = 1,
129 const wxString
& WXUNUSED(name
) = wxEmptyString
)
130 { return (wxStatusBar
*)NULL
; }
132 virtual wxStatusBar
*GetStatusBar() const { return (wxStatusBar
*)NULL
; }
133 virtual void SetStatusText( const wxString
&WXUNUSED(text
), int WXUNUSED(number
)=0 ) {}
134 virtual void SetStatusWidths( int WXUNUSED(n
), const int WXUNUSED(widths_field
)[] ) {}
138 virtual void SetSizeHints( int WXUNUSED(minW
), int WXUNUSED(minH
),
139 int WXUNUSED(maxW
), int WXUNUSED(maxH
),
140 int WXUNUSED(incW
), int WXUNUSED(incH
) ) {}
144 virtual wxToolBar
* CreateToolBar( long WXUNUSED(style
), wxWindowID
WXUNUSED(id
),
145 const wxString
& WXUNUSED(name
) ) { return (wxToolBar
*)NULL
; }
146 virtual wxToolBar
*GetToolBar() const { return (wxToolBar
*)NULL
; }
150 void SetIcon( const wxIcon
&icon
) { m_icon
= icon
; }
153 void SetTitle( const wxString
&title
);
154 wxString
GetTitle() const { return m_title
; }
157 virtual void Maximize( bool WXUNUSED(maximize
) ) {}
158 virtual void Restore() {}
160 virtual bool IsTopLevel() const { return FALSE
; }
162 void OnActivate( wxActivateEvent
& event
);
163 void OnMenuHighlight( wxMenuEvent
& event
);
167 wxMenuBar
*m_menuBar
;
168 GtkNotebookPage
*m_page
;
172 DECLARE_EVENT_TABLE()
173 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame
)
176 //-----------------------------------------------------------------------------
178 //-----------------------------------------------------------------------------
180 class wxMDIClientWindow
: public wxWindow
184 wxMDIClientWindow( wxMDIParentFrame
*parent
, long style
= 0 );
185 ~wxMDIClientWindow();
186 virtual bool CreateClient( wxMDIParentFrame
*parent
, long style
= wxVSCROLL
| wxHSCROLL
);
189 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow
)