2006-04-23 16:14:18 -07:00
|
|
|
//#include "wx/tglbtn.h"
|
|
|
|
|
|
2006-11-11 20:02:36 -08:00
|
|
|
#include <map>
|
|
|
|
|
|
2006-04-23 16:14:18 -07:00
|
|
|
class ITool;
|
2006-07-12 07:49:10 -07:00
|
|
|
class SectionLayout;
|
2007-09-02 16:38:58 -07:00
|
|
|
class ToolManager;
|
2006-04-23 16:14:18 -07:00
|
|
|
|
|
|
|
|
class ToolButton : public wxButton
|
|
|
|
|
{
|
|
|
|
|
public:
|
2007-09-02 16:38:58 -07:00
|
|
|
ToolButton(ToolManager& toolManager, wxWindow *parent, const wxString& label, const wxString& toolName, const wxSize& size = wxDefaultSize, long style = 0);
|
2006-04-23 16:14:18 -07:00
|
|
|
|
|
|
|
|
void SetSelectedAppearance(bool selected);
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void OnClick(wxCommandEvent& evt);
|
|
|
|
|
|
|
|
|
|
private:
|
2007-09-02 16:38:58 -07:00
|
|
|
ToolManager& m_ToolManager;
|
2006-04-23 16:14:18 -07:00
|
|
|
wxString m_Tool;
|
|
|
|
|
bool m_Selected;
|
|
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class ToolButtonBar : public wxToolBar
|
|
|
|
|
{
|
|
|
|
|
public:
|
2007-09-02 16:38:58 -07:00
|
|
|
ToolButtonBar(ToolManager& toolManager, wxWindow* parent, SectionLayout* sectionLayout, int baseID);
|
2006-07-12 07:49:10 -07:00
|
|
|
void AddToolButton(const wxString& shortLabel, const wxString& longLabel,
|
|
|
|
|
const wxString& iconPNGFilename, const wxString& toolName, const wxString& sectionPage);
|
2006-04-23 16:14:18 -07:00
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
void OnTool(wxCommandEvent& evt);
|
|
|
|
|
|
|
|
|
|
private:
|
2007-09-02 16:38:58 -07:00
|
|
|
ToolManager& m_ToolManager;
|
2006-04-23 16:14:18 -07:00
|
|
|
int m_Id;
|
|
|
|
|
int m_Size;
|
2006-07-12 07:49:10 -07:00
|
|
|
struct Button
|
|
|
|
|
{
|
|
|
|
|
Button() {}
|
|
|
|
|
Button(const wxString& name, const wxString& sectionPage) : name(name), sectionPage(sectionPage) {}
|
|
|
|
|
wxString name;
|
|
|
|
|
wxString sectionPage;
|
|
|
|
|
};
|
|
|
|
|
std::map<int, Button> m_Buttons;
|
|
|
|
|
SectionLayout* m_SectionLayout;
|
2006-04-23 16:14:18 -07:00
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE();
|
2006-07-12 07:49:10 -07:00
|
|
|
};
|