]> git.saurik.com Git - wxWidgets.git/blame - include/wx/gtk/mdi.h
removing outdated code
[wxWidgets.git] / include / wx / gtk / mdi.h
CommitLineData
c801d85f 1/////////////////////////////////////////////////////////////////////////////
cb8cc250 2// Name: wx/gtk/mdi.h
d2824cdb 3// Purpose: TDI-based MDI implementation for wxGTK
c801d85f 4// Author: Robert Roebling
d2824cdb 5// Modified by: 2008-10-31 Vadim Zeitlin: derive from the base classes
58614078
RR
6// Id: $Id$
7// Copyright: (c) 1998 Robert Roebling
d2824cdb 8// (c) 2008 Vadim Zeitlin
65571936 9// Licence: wxWindows licence
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
0416c418
PC
12#ifndef _WX_GTK_MDI_H_
13#define _WX_GTK_MDI_H_
c801d85f 14
0416c418 15#include "wx/frame.h"
c801d85f 16
cca410b3
PC
17class WXDLLIMPEXP_FWD_CORE wxMDIChildFrame;
18class WXDLLIMPEXP_FWD_CORE wxMDIClientWindow;
19
d2824cdb
VZ
20typedef struct _GtkNotebook GtkNotebook;
21
c801d85f
KB
22//-----------------------------------------------------------------------------
23// wxMDIParentFrame
24//-----------------------------------------------------------------------------
25
d2824cdb 26class WXDLLIMPEXP_CORE wxMDIParentFrame : public wxMDIParentFrameBase
c801d85f 27{
ab2b3dd4 28public:
f6bcfd97
BP
29 wxMDIParentFrame() { Init(); }
30 wxMDIParentFrame(wxWindow *parent,
31 wxWindowID id,
32 const wxString& title,
33 const wxPoint& pos = wxDefaultPosition,
34 const wxSize& size = wxDefaultSize,
35 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
36 const wxString& name = wxFrameNameStr)
37 {
38 Init();
39
40 (void)Create(parent, id, title, pos, size, style, name);
41 }
42
d2824cdb
VZ
43 bool Create(wxWindow *parent,
44 wxWindowID id,
45 const wxString& title,
46 const wxPoint& pos = wxDefaultPosition,
47 const wxSize& size = wxDefaultSize,
48 long style = wxDEFAULT_FRAME_STYLE | wxVSCROLL | wxHSCROLL,
49 const wxString& name = wxFrameNameStr);
c801d85f 50
d2824cdb
VZ
51 // we don't store the active child in m_currentChild unlike the base class
52 // version so override this method to find it dynamically
53 virtual wxMDIChildFrame *GetActiveChild() const;
f6bcfd97 54
d2824cdb
VZ
55 // implement base class pure virtuals
56 // ----------------------------------
f6bcfd97 57
ab2b3dd4
RR
58 virtual void ActivateNext();
59 virtual void ActivatePrevious();
716b7364 60
d2824cdb
VZ
61 static bool IsTDI() { return true; }
62
f6bcfd97 63 // implementation
ab2b3dd4 64
ab2b3dd4
RR
65 bool m_justInserted;
66
ab2b3dd4 67 virtual void OnInternalIdle();
f6bcfd97
BP
68
69protected:
cca410b3 70 virtual void DoGetClientSize(int* width, int* height) const;
f6bcfd97 71
8487f887
RR
72private:
73 friend class wxMDIChildFrame;
95dc31e0 74 void Init();
f6bcfd97 75
8487f887 76 DECLARE_DYNAMIC_CLASS(wxMDIParentFrame)
c801d85f
KB
77};
78
79//-----------------------------------------------------------------------------
80// wxMDIChildFrame
81//-----------------------------------------------------------------------------
82
d2824cdb 83class WXDLLIMPEXP_CORE wxMDIChildFrame : public wxTDIChildFrame
c801d85f 84{
8487f887 85public:
d2824cdb
VZ
86 wxMDIChildFrame() { Init(); }
87 wxMDIChildFrame(wxMDIParentFrame *parent,
88 wxWindowID id,
89 const wxString& title,
90 const wxPoint& pos = wxDefaultPosition,
91 const wxSize& size = wxDefaultSize,
92 long style = wxDEFAULT_FRAME_STYLE,
93 const wxString& name = wxFrameNameStr)
94 {
95 Init();
96
97 Create(parent, id, title, pos, size, style, name);
98 }
99
100 bool Create(wxMDIParentFrame *parent,
101 wxWindowID id,
102 const wxString& title,
103 const wxPoint& pos = wxDefaultPosition,
104 const wxSize& size = wxDefaultSize,
105 long style = wxDEFAULT_FRAME_STYLE,
106 const wxString& name = wxFrameNameStr);
885df446
VZ
107
108 virtual ~wxMDIChildFrame();
f6bcfd97 109
8487f887
RR
110 virtual void SetMenuBar( wxMenuBar *menu_bar );
111 virtual wxMenuBar *GetMenuBar() const;
c801d85f 112
8487f887 113 virtual void Activate();
f6bcfd97 114
d2824cdb
VZ
115 virtual void SetTitle(const wxString& title);
116
117 // implementation
3811dacb 118
f6bcfd97
BP
119 void OnActivate( wxActivateEvent& event );
120 void OnMenuHighlight( wxMenuEvent& event );
3ec3c160 121 virtual void GTKHandleRealized();
f6bcfd97 122
716b7364 123 wxMenuBar *m_menuBar;
ab2b3dd4 124 bool m_justInserted;
f6bcfd97 125
d2824cdb
VZ
126private:
127 void Init();
885df446 128
d2824cdb 129 GtkNotebook *GTKGetNotebook() const;
b2e10dac 130
f6bcfd97 131 DECLARE_EVENT_TABLE()
8487f887 132 DECLARE_DYNAMIC_CLASS(wxMDIChildFrame)
c801d85f
KB
133};
134
135//-----------------------------------------------------------------------------
136// wxMDIClientWindow
137//-----------------------------------------------------------------------------
138
d2824cdb 139class WXDLLIMPEXP_CORE wxMDIClientWindow : public wxMDIClientWindowBase
c801d85f 140{
ab2b3dd4 141public:
d2824cdb 142 wxMDIClientWindow() { }
5a0a15cf 143 ~wxMDIClientWindow();
d2824cdb
VZ
144
145 virtual bool CreateClient(wxMDIParentFrame *parent,
146 long style = wxVSCROLL | wxHSCROLL);
8487f887
RR
147
148private:
48200154
PC
149 virtual void AddChildGTK(wxWindowGTK* child);
150
8487f887 151 DECLARE_DYNAMIC_CLASS(wxMDIClientWindow)
c801d85f
KB
152};
153
0416c418 154#endif // _WX_GTK_MDI_H_