1998-07-23 10:39:46 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// 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);
|
1998-07-24 11:43:03 -04:00
|
|
|
bool InitToolbar(wxToolBar* toolBar);
|
1998-07-23 10:39:46 -04:00
|
|
|
};
|
|
|
|
|
1998-12-09 12:30:17 -05:00
|
|
|
class MyTimer : public wxTimer
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyTimer(wxFrame *frame) { m_frame = frame; }
|
|
|
|
|
1999-04-24 21:00:34 -04:00
|
|
|
virtual void Notify() { wxLogStatus(m_frame, _T("Timer arrived!") ); }
|
1998-12-09 12:30:17 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxFrame *m_frame;
|
|
|
|
};
|
|
|
|
|
1998-07-23 10:39:46 -04:00
|
|
|
// 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);
|
1998-07-24 11:43:03 -04:00
|
|
|
void OnToolLeftClick(wxCommandEvent& event);
|
|
|
|
void OnToolEnter(wxCommandEvent& event);
|
1998-07-23 10:39:46 -04:00
|
|
|
|
|
|
|
private:
|
|
|
|
wxTextCtrl* m_textWindow;
|
|
|
|
|
1999-01-12 18:51:13 -05:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-07-23 10:39:46 -04:00
|
|
|
};
|
|
|
|
|
1998-07-27 05:47:57 -04:00
|
|
|
#define ID_TOOLBAR 500
|
|
|
|
|