| 1 |
///////////////////////////////////////////////////////////////////////////// |
| 2 |
// Name: wx/xrc/xh_toolb.h |
| 3 |
// Purpose: XML resource handler for wxAuiToolBar |
| 4 |
// Author: Vaclav Slavik |
| 5 |
// Created: 2000/08/11 |
| 6 |
// RCS-ID: $Id: xh_toolb.h 60522 2009-05-05 18:23:04Z VS $ |
| 7 |
// Copyright: (c) 2000 Vaclav Slavik |
| 8 |
// Licence: wxWindows licence |
| 9 |
///////////////////////////////////////////////////////////////////////////// |
| 10 |
|
| 11 |
#ifndef _MY_WX_XH_AUITOOLB_H_ |
| 12 |
#define _MY_WX_XH_AUITOOLB_H_ |
| 13 |
#include <wx/bitmap.h> |
| 14 |
#include "wx/aui/auibar.h" |
| 15 |
#include "wx/menu.h" |
| 16 |
#include <wx/xrc/xmlres.h> |
| 17 |
|
| 18 |
class wxAuiToolBar; |
| 19 |
|
| 20 |
class MyWxAuiToolBarXmlHandler : public wxXmlResourceHandler |
| 21 |
{ |
| 22 |
public: |
| 23 |
MyWxAuiToolBarXmlHandler(); |
| 24 |
virtual wxObject* DoCreateResource(); |
| 25 |
virtual bool CanHandle(wxXmlNode* node); |
| 26 |
|
| 27 |
private: |
| 28 |
bool m_isInside; |
| 29 |
wxAuiToolBar* m_toolbar; |
| 30 |
wxSize m_toolSize; |
| 31 |
|
| 32 |
class MenuHandler : public wxEvtHandler // From the official wx3.1 handler |
| 33 |
{ |
| 34 |
public: |
| 35 |
void OnDropDown(wxAuiToolBarEvent& event); |
| 36 |
unsigned RegisterMenu(wxAuiToolBar* toobar, int id, wxMenu* menu); |
| 37 |
|
| 38 |
private: |
| 39 |
wxVector<wxMenu*> m_menus; |
| 40 |
}; |
| 41 |
|
| 42 |
MenuHandler m_menuHandler; |
| 43 |
}; |
| 44 |
|
| 45 |
#endif // _WX_XH_TOOLB_H_ |