8bbe427f8e
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1142 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
55 lines
1.3 KiB
C++
55 lines
1.3 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: test.h
|
|
// Purpose: wxToolBar sample
|
|
// Author: Julian Smart
|
|
// Modified by:
|
|
// Created: 23/07/98
|
|
// RCS-ID: $Id$
|
|
// Copyright: (c) Julian Smart
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Define a new application
|
|
class MyApp: public wxApp
|
|
{
|
|
public:
|
|
bool OnInit(void);
|
|
bool InitToolbar(wxToolBar* toolBar);
|
|
};
|
|
|
|
class MyTimer : public wxTimer
|
|
{
|
|
public:
|
|
MyTimer(wxFrame *frame) { m_frame = frame; }
|
|
|
|
virtual void Notify() { wxLogStatus(m_frame, "Timer arrived!"); }
|
|
|
|
private:
|
|
wxFrame *m_frame;
|
|
};
|
|
|
|
// Define a new frame
|
|
class MyFrame: public wxFrame
|
|
{
|
|
public:
|
|
MyFrame(wxFrame *parent, wxWindowID id = -1, const wxString& title = "wxToolBar Sample",
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
long style = wxDEFAULT_FRAME_STYLE);
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
void OnQuit(wxCommandEvent& event);
|
|
void OnAbout(wxCommandEvent& event);
|
|
void OnToolLeftClick(wxCommandEvent& event);
|
|
void OnToolEnter(wxCommandEvent& event);
|
|
|
|
private:
|
|
wxTextCtrl* m_textWindow;
|
|
|
|
MyTimer m_timer;
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
};
|
|
|
|
#define ID_TOOLBAR 500
|
|
|