1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
/////////////////////////////////////////////////////////////////////////////
// Name: wx/xrc/xh_aui.h
// Purpose: XRC resource handler for wxAUI
// Author: Andrea Zanellato, Steve Lamerton (wxAuiNotebook)
// Created: 2011-09-18
// Copyright: (c) 2011 wxWidgets Team
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_XH_AUI_H_
#define _WX_XH_AUI_H_
#include "wx/xrc/xmlres.h"
#if wxUSE_XRC && wxUSE_AUI
#include "wx/vector.h"
class WXDLLIMPEXP_FWD_AUI wxAuiManager;
class WXDLLIMPEXP_FWD_AUI wxAuiNotebook;
class WXDLLIMPEXP_AUI wxAuiXmlHandler : public wxXmlResourceHandler
{
public:
wxAuiXmlHandler();
virtual wxObject *DoCreateResource() wxOVERRIDE;
virtual bool CanHandle(wxXmlNode *node) wxOVERRIDE;
// Returns the wxAuiManager for the specified window
wxAuiManager *GetAuiManager(wxWindow *managed) const;
private:
// Used to UnInit() the wxAuiManager before destroying its managed window
void OnManagedWindowClose(wxWindowDestroyEvent &event);
typedef wxVector<wxAuiManager*> Managers;
Managers m_managers; // all wxAuiManagers created in this handler
wxAuiManager *m_manager; // Current wxAuiManager
wxWindow *m_window; // Current managed wxWindow
wxAuiNotebook *m_notebook;
bool m_mgrInside; // Are we handling a wxAuiManager or panes inside it?
bool m_anbInside; // Are we handling a wxAuiNotebook or pages inside it?
wxDECLARE_DYNAMIC_CLASS(wxAuiXmlHandler);
};
#endif //wxUSE_XRC && wxUSE_AUI
#endif //_WX_XH_AUI_H_
|