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