1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxFrameView and wxFrameManager classes.
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
15 #include "wx/module.h"
18 #include "wx/fl/objstore.h"
21 class wxObjectStorage
;
23 #include "wx/fl/controlbar.h"
28 It is not clear what this class does. It is not used elsewhere in FL.
31 class WXDLLIMPEXP_FL wxFrameView
: public wxEvtHandler
34 wxStringList mTopMenus
;
35 wxFrameLayout
* mpLayout
;
36 wxFrameManager
* mpFrameMgr
;
39 friend class wxFrameManager
;
40 friend class wxFrameViewSerializer
;
43 void OnIdle( wxIdleEvent
& event
);
49 virtual void Activate();
50 virtual void Deactivate();
52 wxFrame
* GetParentFrame();
53 wxWindow
* GetClientWindow();
55 wxFrameManager
& GetFrameManager();
57 void RegisterMenu( const wxString
& topMenuName
);
60 wxFrameLayout
* GetLayout();
61 void SetLayout( wxFrameLayout
* pLayout
);
62 void SetToolUpdates( bool doToolUpdates
= true );
65 // hooks for specific frame-views
67 virtual void OnInit() {}
69 virtual void OnSerialize( wxObjectStorage
& WXUNUSED(store
) ) {}
70 virtual void OnActiveate() {}
71 virtual void OnDeactivate() {}
74 virtual void OnRecreate() {}
75 virtual void OnInitMenus() {}
83 It is not clear what this class does. It is not used elsewhere in FL.
86 class WXDLLIMPEXP_FL wxFrameManager
: public wxObject
92 wxWindow
* mpClientWnd
;
95 wxObjectStorage mStore
;
98 wxString mSettingsFile
;
101 void DoSerialize( wxObjectStorage
& store
);
103 int GetViewNo( wxFrameView
* pView
);
104 void EnableMenusForView( wxFrameView
* pView
, bool enable
);
111 // if file name is empty, views are are not saved/loaded
113 virtual void Init( wxWindow
* pMainFrame
,
114 const wxString
& settingsFile
= wxEmptyString
);
117 wxFrame
* GetParentFrame();
118 wxWindow
* GetParentWindow();
120 int GetActiveViewNo();
121 wxFrameView
* GetActiveView();
122 wxObjectList::compatibility_iterator
GetActiveViewNode();
124 wxFrameView
* GetView( int viewNo
);
126 void SetClinetWindow( wxWindow
* pFrameClient
);
127 wxWindow
* GetClientWindow();
129 void AddView( wxFrameView
* pFrmView
);
130 void RemoveView( wxFrameView
* pFrmView
);
132 void ActivateView( int viewNo
);
133 void ActivateView( wxFrameView
* pFrmView
);
134 void DeactivateCurrentView();
136 wxObjectStorage
& GetObjectStore();
141 bool ViewsAreLoaded();
144 #endif /* __FRMVIEW_G__ */