00001
00002
00003
00004
00005
00006
00007
00008
00010
00011
#ifndef WXVILLALIB_VERTICAL_TOOLBAR_H
00012
#define WXVILLALIB_VERTICAL_TOOLBAR_H
00013
00014
#include <wx/wx.h>
00015
#include <wx/toolbar.h>
00016
00017
class wxVertButton
00018 {
00019
public:
00020 wxVertButton(
int toolId,
const wxString& label,
const wxBitmap& bitmap,
00021 wxItemKind kind = wxITEM_NORMAL,
const wxString& shortHelpString = wxT(
""))
00022 {
00023 this->toolId = toolId; this->label = label;
00024 this->bitmap = bitmap; this->kind = kind;
00025 this->shortHelpString = shortHelpString;
00026 }
00027
00028
int toolId;
00029 wxString label;
00030 wxBitmap bitmap;
00031 wxItemKind kind;
00032 wxString shortHelpString;
00033 };
00034
00035 WX_DECLARE_OBJARRAY(wxVertButton, wxVertButtons);
00036
00038 class wxVerticalToolbar
00039 {
00040
public:
00041
wxVerticalToolbar(wxToolBar* toolbar);
00042 ~
wxVerticalToolbar() { }
00043
00044
void AddTool(
int toolId,
const wxString& label,
const wxBitmap& bitmap,
00045 wxItemKind kind = wxITEM_NORMAL,
00046
const wxString& shortHelpString = wxT(
""));
00047
void Update();
00048
00049
void InsertTool(
int pos,
int toolId);
00050
00051
protected:
00052 wxToolBar* m_toolbar;
00053 wxVertButtons m_buttons;
00054
int m_sw, m_sh;
00055 wxMemoryDC m_btDc;
00056
void InsertVerticalButton(
int pos, wxVertButton& button);
00057 };
00058
00059
#endif // WXVILLALIB_VERTICAL_TOOLBAR_H
00060