]>
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
49 wxMDIParentFrame( wxWindow
*parent
,
50 wxWindowID id
, const wxString
& title
,
51 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
52 long style
= wxDEFAULT_FRAME_STYLE
| wxVSCROLL
| wxHSCROLL
,
53 const wxString
& name
= wxFrameNameStr
);
54 ~wxMDIParentFrame(void);
55 bool Create( 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
);
61 void GetClientSize(int *width
, int *height
) const;
62 wxMDIChildFrame
*GetActiveChild() const;
64 wxMDIClientWindow
*GetClientWindow() const;
65 virtual wxMDIClientWindow
*OnCreateClient();
67 virtual void Cascade() {}
68 virtual void Tile() {}
69 virtual void ArrangeIcons() {}
70 virtual void ActivateNext();
71 virtual void ActivatePrevious();
73 void OnActivate( wxActivateEvent
& event
);
74 void OnSysColourChanged( wxSysColourChangedEvent
& event
);
78 wxMDIClientWindow
*m_clientWindow
;
81 virtual void GtkOnSize( int x
, int y
, int width
, int height
);
82 virtual void OnInternalIdle();
85 friend class wxMDIChildFrame
;
87 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame
)
91 //-----------------------------------------------------------------------------
93 //-----------------------------------------------------------------------------
95 class wxMDIChildFrame
: public wxFrame
99 wxMDIChildFrame( wxMDIParentFrame
*parent
,
100 wxWindowID id
, const wxString
& title
,
101 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
102 long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
104 bool Create( wxMDIParentFrame
*parent
,
105 wxWindowID id
, const wxString
& title
,
106 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
107 long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
109 virtual void SetMenuBar( wxMenuBar
*menu_bar
);
110 virtual wxMenuBar
*GetMenuBar() const;
112 virtual void GetClientSize( int *width
, int *height
) const;
113 virtual void AddChild( wxWindowBase
*child
);
115 virtual void Activate();
119 virtual wxStatusBar
* CreateStatusBar( int WXUNUSED(number
) = 1,
120 long WXUNUSED(style
) = 1,
121 wxWindowID
WXUNUSED(id
) = 1,
122 const wxString
& WXUNUSED(name
) = wxEmptyString
)
123 { return (wxStatusBar
*)NULL
; }
125 virtual wxStatusBar
*GetStatusBar() const { return (wxStatusBar
*)NULL
; }
126 virtual void SetStatusText( const wxString
&WXUNUSED(text
), int WXUNUSED(number
)=0 ) {}
127 virtual void SetStatusWidths( int WXUNUSED(n
), const int WXUNUSED(widths_field
)[] ) {}
131 virtual void SetSizeHints( int WXUNUSED(minW
), int WXUNUSED(minH
),
132 int WXUNUSED(maxW
), int WXUNUSED(maxH
),
133 int WXUNUSED(incW
), int WXUNUSED(incH
) ) {}
137 virtual wxToolBar
* CreateToolBar( long WXUNUSED(style
), wxWindowID
WXUNUSED(id
),
138 const wxString
& WXUNUSED(name
) ) { return (wxToolBar
*)NULL
; }
139 virtual wxToolBar
*GetToolBar() const { return (wxToolBar
*)NULL
; }
143 void SetIcon( const wxIcon
&icon
) { m_icon
= icon
; }
146 void SetTitle( const wxString
&title
) { m_title
= title
; }
147 wxString
GetTitle() const { return m_title
; }
150 virtual void Maximize( bool WXUNUSED(maximize
) ) {}
151 virtual void Restore() {}
153 virtual bool IsTopLevel() const { return FALSE
; }
155 void OnActivate( wxActivateEvent
&event
);
159 wxMenuBar
*m_menuBar
;
160 GtkNotebookPage
*m_page
;
164 DECLARE_EVENT_TABLE()
165 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame
)
168 //-----------------------------------------------------------------------------
170 //-----------------------------------------------------------------------------
172 class wxMDIClientWindow
: public wxWindow
176 wxMDIClientWindow( wxMDIParentFrame
*parent
, long style
= 0 );
177 ~wxMDIClientWindow();
178 virtual bool CreateClient( wxMDIParentFrame
*parent
, long style
= wxVSCROLL
| wxHSCROLL
);
181 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow
)