Updated the toolbar sample to reflect updated event handling.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@353 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
1998-07-24 15:43:03 +00:00
parent 44216b3b2e
commit 13437238cd
2 changed files with 74 additions and 118 deletions

View File

@@ -14,6 +14,7 @@ class MyApp: public wxApp
{
public:
bool OnInit(void);
bool InitToolbar(wxToolBar* toolBar);
};
// Define a new frame
@@ -25,9 +26,10 @@ public:
long style = wxDEFAULT_FRAME_STYLE);
void OnCloseWindow(wxCloseEvent& event);
void OnMenuHighlight(wxMenuEvent& event);
void OnQuit(wxCommandEvent& event);
void OnAbout(wxCommandEvent& event);
void OnToolLeftClick(wxCommandEvent& event);
void OnToolEnter(wxCommandEvent& event);
private:
wxTextCtrl* m_textWindow;
@@ -35,19 +37,3 @@ private:
DECLARE_EVENT_TABLE()
};
class TestToolBar: public wxToolBar
{
public:
TestToolBar(wxFrame *parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = wxNO_BORDER, int direction = wxVERTICAL, int RowsOrColumns = 2);
bool OnLeftClick(int toolIndex, bool toggled);
void OnMouseEnter(int toolIndex);
void OnPaint(wxPaintEvent& event);
DECLARE_EVENT_TABLE()
};
#define TEST_QUIT 100
#define TEST_ABOUT 101