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:
@@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user