2013-11-23 00:34:55 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/xrc/xh_toolb.h
|
|
|
|
// Purpose: XML resource handler for wxAuiToolBar
|
2013-11-25 12:31:26 +00:00
|
|
|
// Author: Rodolphe Suescun
|
2013-11-23 00:34:55 +00:00
|
|
|
// Created: 2013-11-23
|
2013-11-25 12:31:26 +00:00
|
|
|
// Copyright: (c) 2013 Rodolphe Suescun
|
2013-11-23 00:34:55 +00:00
|
|
|
// Licence: wxWindows licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_XH_AUITOOLB_H_
|
|
|
|
#define _WX_XH_AUITOOLB_H_
|
|
|
|
|
|
|
|
#include "wx/aui/auibar.h"
|
|
|
|
#include "wx/menu.h"
|
|
|
|
#include "wx/vector.h"
|
|
|
|
#include "wx/xrc/xmlres.h"
|
|
|
|
|
|
|
|
#if wxUSE_XRC && wxUSE_AUI
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_FWD_AUI wxAuiToolBar;
|
|
|
|
|
|
|
|
class WXDLLIMPEXP_AUI wxAuiToolBarXmlHandler : public wxXmlResourceHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxAuiToolBarXmlHandler();
|
|
|
|
virtual wxObject *DoCreateResource();
|
|
|
|
virtual bool CanHandle(wxXmlNode *node);
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool m_isInside;
|
|
|
|
wxAuiToolBar *m_toolbar;
|
|
|
|
wxSize m_toolSize;
|
|
|
|
|
|
|
|
class MenuHandler : public wxEvtHandler
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void OnDropDown(wxAuiToolBarEvent& event);
|
|
|
|
unsigned RegisterMenu(wxAuiToolBar *toobar, int id, wxMenu *menu);
|
|
|
|
|
|
|
|
private:
|
|
|
|
wxVector<wxMenu*> m_menus;
|
|
|
|
};
|
|
|
|
|
|
|
|
MenuHandler m_menuHandler;
|
|
|
|
|
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxAuiToolBarXmlHandler);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_XRC && wxUSE_AUI
|
|
|
|
|
|
|
|
#endif // _WX_XH_AUITOOLB_H_
|