1998-05-22 19:57:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: resource.h
|
|
|
|
// Purpose: Dialog resource sample
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 04/01/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart and Markus Holzem
|
|
|
|
// Licence: wxWindows license
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
// #pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Define a new application
|
|
|
|
class MyApp: public wxApp
|
|
|
|
{
|
1999-01-12 23:51:13 +00:00
|
|
|
public:
|
|
|
|
MyApp();
|
|
|
|
|
|
|
|
virtual bool OnInit();
|
|
|
|
|
|
|
|
virtual ~MyApp();
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
1998-08-15 12:06:45 +00:00
|
|
|
class MyPanel: public wxPanel
|
|
|
|
{
|
1999-01-12 23:51:13 +00:00
|
|
|
public:
|
|
|
|
MyPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
|
|
|
const wxSize& size, int style, const wxString &name);
|
1998-08-15 12:06:45 +00:00
|
|
|
void OnClick(wxMouseEvent &event);
|
1999-01-12 23:51:13 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-08-15 12:06:45 +00:00
|
|
|
};
|
|
|
|
|
1998-05-22 19:57:05 +00:00
|
|
|
class MyFrame: public wxFrame
|
|
|
|
{
|
1999-01-12 23:51:13 +00:00
|
|
|
public:
|
|
|
|
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
|
|
|
const wxPoint& pos, const wxSize& size);
|
1998-05-22 19:57:05 +00:00
|
|
|
void OnQuit(wxCommandEvent& event);
|
1999-01-12 23:51:13 +00:00
|
|
|
void OnAbout(wxCommandEvent& event);
|
|
|
|
void OnTestDialog(wxCommandEvent& event);
|
|
|
|
|
|
|
|
wxWindow *panel;
|
1998-05-22 19:57:05 +00:00
|
|
|
|
1999-01-12 23:51:13 +00:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class MyDialog : public wxDialog
|
|
|
|
{
|
1999-01-12 23:51:13 +00:00
|
|
|
public:
|
1998-05-22 19:57:05 +00:00
|
|
|
void OnOk(wxCommandEvent& event);
|
|
|
|
void OnCancel(wxCommandEvent& event);
|
1999-01-12 23:51:13 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
1999-01-12 23:51:13 +00:00
|
|
|
// the values should be the same as in menu.wxr file!
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
RESOURCE_TESTDIALOG = 2,
|
|
|
|
RESOURCE_QUIT = 4,
|
|
|
|
RESOURCE_ABOUT = 6
|
|
|
|
};
|