1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFrameView and wxFrameManager classes.
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #if defined(__GNUG__) && !defined(__APPLE__)
16 #pragma interface "frmview.h"
19 #include "wx/module.h"
22 #include "wx/fl/objstore.h"
25 class wxObjectStorage
;
27 #include "wx/fl/controlbar.h"
32 It is not clear what this class does. It is not used elsewhere in FL.
35 class WXDLLIMPEXP_FL wxFrameView
: public wxEvtHandler
38 wxStringList mTopMenus
;
39 wxFrameLayout
* mpLayout
;
40 wxFrameManager
* mpFrameMgr
;
43 friend class wxFrameManager
;
44 friend class wxFrameViewSerializer
;
47 void OnIdle( wxIdleEvent
& event
);
53 virtual void Activate();
54 virtual void Deactivate();
56 wxFrame
* GetParentFrame();
57 wxWindow
* GetClientWindow();
59 wxFrameManager
& GetFrameManager();
61 void RegisterMenu( const wxString
& topMenuName
);
64 wxFrameLayout
* GetLayout();
65 void SetLayout( wxFrameLayout
* pLayout
);
66 void SetToolUpdates( bool doToolUpdates
= true );
69 // hooks for specific frame-views
71 virtual void OnInit() {}
73 virtual void OnSerialize( wxObjectStorage
& WXUNUSED(store
) ) {}
74 virtual void OnActiveate() {}
75 virtual void OnDeactivate() {}
78 virtual void OnRecreate() {}
79 virtual void OnInitMenus() {}
87 It is not clear what this class does. It is not used elsewhere in FL.
90 class WXDLLIMPEXP_FL wxFrameManager
: public wxObject
96 wxWindow
* mpClientWnd
;
99 wxObjectStorage mStore
;
102 wxString mSettingsFile
;
105 void DoSerialize( wxObjectStorage
& store
);
107 int GetViewNo( wxFrameView
* pView
);
108 void EnableMenusForView( wxFrameView
* pView
, bool enable
);
115 // if file name is empty, views are are not saved/loaded
117 virtual void Init( wxWindow
* pMainFrame
,
118 const wxString
& settingsFile
= wxEmptyString
);
121 wxFrame
* GetParentFrame();
122 wxWindow
* GetParentWindow();
124 int GetActiveViewNo();
125 wxFrameView
* GetActiveView();
126 wxNode
* GetActiveViewNode();
128 wxFrameView
* GetView( int viewNo
);
130 void SetClinetWindow( wxWindow
* pFrameClient
);
131 wxWindow
* GetClientWindow();
133 void AddView( wxFrameView
* pFrmView
);
134 void RemoveView( wxFrameView
* pFrmView
);
136 void ActivateView( int viewNo
);
137 void ActivateView( wxFrameView
* pFrmView
);
138 void DeactivateCurrentView();
140 wxObjectStorage
& GetObjectStore();
145 bool ViewsAreLoaded();
148 #endif /* __FRMVIEW_G__ */