]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/gtk1/mdi.h
1 /////////////////////////////////////////////////////////////////////////////
4 // Author: Robert Roebling
7 // Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
20 #include "wx/object.h"
22 #include "wx/control.h"
26 //-----------------------------------------------------------------------------
28 //-----------------------------------------------------------------------------
30 class wxMDIParentFrame
;
31 class wxMDIClientWindow
;
32 class wxMDIChildFrame
;
34 //-----------------------------------------------------------------------------
36 //-----------------------------------------------------------------------------
38 extern const char* wxFrameNameStr
;
39 extern const char* wxStatusLineNameStr
;
41 //-----------------------------------------------------------------------------
43 //-----------------------------------------------------------------------------
45 class wxMDIParentFrame
: public wxFrame
47 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame
)
49 friend class wxMDIChildFrame
;
53 wxMDIParentFrame(void);
54 wxMDIParentFrame( wxWindow
*parent
,
55 const wxWindowID id
, const wxString
& title
,
56 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
57 const long style
= wxDEFAULT_FRAME_STYLE
| wxVSCROLL
| wxHSCROLL
,
58 const wxString
& name
= wxFrameNameStr
);
59 ~wxMDIParentFrame(void);
60 bool Create( wxWindow
*parent
,
61 const wxWindowID id
, const wxString
& title
,
62 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
63 const long style
= wxDEFAULT_FRAME_STYLE
| wxVSCROLL
| wxHSCROLL
,
64 const wxString
& name
= wxFrameNameStr
);
66 void OnSize( wxSizeEvent
& event
);
67 void OnActivate( wxActivateEvent
& event
);
69 void SetMenuBar( wxMenuBar
*menu_bar
);
70 void GetClientSize(int *width
, int *height
) const;
71 wxMDIChildFrame
*GetActiveChild(void) const;
73 wxMDIClientWindow
*GetClientWindow(void) const;
74 virtual wxMDIClientWindow
*OnCreateClient(void);
76 virtual void Cascade(void) {};
77 virtual void Tile(void) {};
78 virtual void ArrangeIcons(void) {};
79 virtual void ActivateNext(void);
80 virtual void ActivatePrevious(void);
82 void OnSysColourChanged(wxSysColourChangedEvent
& event
);
85 wxMDIClientWindow
* m_clientWindow
;
86 wxMDIChildFrame
* m_currentChild
;
87 bool m_parentFrameActive
;
89 // DECLARE_EVENT_TABLE()
92 //-----------------------------------------------------------------------------
94 //-----------------------------------------------------------------------------
96 class wxMDIChildFrame
: public wxPanel
98 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame
)
102 wxMDIChildFrame(void);
103 wxMDIChildFrame( wxMDIParentFrame
*parent
,
104 const wxWindowID id
, const wxString
& title
,
105 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
106 const long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
107 ~wxMDIChildFrame(void);
108 bool Create( wxMDIParentFrame
*parent
,
109 const wxWindowID id
, const wxString
& title
,
110 const wxPoint
& pos
= wxDefaultPosition
, const wxSize
& size
= wxDefaultSize
,
111 const long style
= wxDEFAULT_FRAME_STYLE
, const wxString
& name
= wxFrameNameStr
);
112 void SetMenuBar( wxMenuBar
*menu_bar
);
114 // no status bars in wxGTK
115 virtual bool CreateStatusBar( const int WXUNUSED(number
) = 1 ) { return FALSE
; };
116 virtual void SetStatusText( const wxString
&WXUNUSED(text
), const int WXUNUSED(number
) ) {};
117 virtual void SetStatusWidths( const int WXUNUSED(n
), const int *WXUNUSED(width
) ) {};
119 virtual void Maximize(void) {};
120 virtual void Restore(void) {};
121 virtual void Activate(void);
128 //-----------------------------------------------------------------------------
130 //-----------------------------------------------------------------------------
132 class wxMDIClientWindow
: public wxWindow
134 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow
)
138 wxMDIClientWindow(void);
139 wxMDIClientWindow( wxMDIParentFrame
*parent
, const long style
= 0 );
140 ~wxMDIClientWindow(void);
141 virtual bool CreateClient( wxMDIParentFrame
*parent
, const long style
= wxVSCROLL
| wxHSCROLL
);
142 void AddChild( wxWindow
*child
);