]>
git.saurik.com Git - wxWidgets.git/blob - contrib/include/wx/fl/frmview.h
1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Contrib. demo
4 // Author: Aleksandras Gluchovas
8 // Copyright: (c) Aleksandras Gluchovas
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
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"
31 class 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
& store
) {}
70 virtual void OnActiveate() {}
71 virtual void OnDeactivate() {}
74 virtual void OnRecreate() {}
75 virtual void OnInitMenus() {}
82 class wxFrameManager
: wxObject
88 wxWindow
* mpClientWnd
;
91 wxObjectStorage mStore
;
94 wxString mSettingsFile
;
97 void DoSerialize( wxObjectStorage
& store
);
99 int GetViewNo( wxFrameView
* pView
);
100 void EnableMenusForView( wxFrameView
* pView
, bool enable
);
107 // if file name is empty, views are are not saved/loaded
109 virtual void Init( wxWindow
* pMainFrame
, const wxString
& settingsFile
= "" );
112 wxFrame
* GetParentFrame();
113 wxWindow
* GetParentWindow();
115 int GetActiveViewNo();
116 wxFrameView
* GetActiveView();
117 wxNode
* GetActiveViewNode();
119 wxFrameView
* GetView( int viewNo
);
121 void SetClinetWindow( wxWindow
* pFrameClient
);
122 wxWindow
* GetClientWindow();
124 void AddView( wxFrameView
* pFrmView
);
125 void RemoveView( wxFrameView
* pFrmView
);
127 void ActivateView( int viewNo
);
128 void ActivateView( wxFrameView
* pFrmView
);
129 void DeactivateCurrentView();
131 wxObjectStorage
& GetObjectStore();
136 bool ViewsAreLoaded();
139 #endif /* __FRMVIEW_G__ */