1998-05-22 15:57:05 -04: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
|
2002-03-17 09:16:03 -05:00
|
|
|
// Licence: wxWindows license
|
1998-05-22 15:57:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
// #pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Define a new application
|
|
|
|
class MyApp: public wxApp
|
|
|
|
{
|
1999-01-12 18:51:13 -05:00
|
|
|
public:
|
|
|
|
MyApp();
|
|
|
|
|
|
|
|
virtual bool OnInit();
|
|
|
|
|
|
|
|
virtual ~MyApp();
|
1998-05-22 15:57:05 -04:00
|
|
|
};
|
|
|
|
|
1998-08-15 08:06:45 -04:00
|
|
|
class MyPanel: public wxPanel
|
|
|
|
{
|
1999-01-12 18:51:13 -05:00
|
|
|
public:
|
|
|
|
MyPanel(wxWindow *parent, wxWindowID id, const wxPoint& pos,
|
|
|
|
const wxSize& size, int style, const wxString &name);
|
1998-08-15 08:06:45 -04:00
|
|
|
void OnClick(wxMouseEvent &event);
|
1999-01-12 18:51:13 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-08-15 08:06:45 -04:00
|
|
|
};
|
|
|
|
|
1998-05-22 15:57:05 -04:00
|
|
|
class MyFrame: public wxFrame
|
|
|
|
{
|
1999-01-12 18:51:13 -05:00
|
|
|
public:
|
|
|
|
MyFrame(wxWindow *parent, const wxWindowID id, const wxString& title,
|
|
|
|
const wxPoint& pos, const wxSize& size);
|
1998-05-22 15:57:05 -04:00
|
|
|
void OnQuit(wxCommandEvent& event);
|
1999-01-12 18:51:13 -05:00
|
|
|
void OnAbout(wxCommandEvent& event);
|
|
|
|
void OnTestDialog(wxCommandEvent& event);
|
|
|
|
|
|
|
|
wxWindow *panel;
|
1998-05-22 15:57:05 -04:00
|
|
|
|
1999-01-12 18:51:13 -05:00
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-22 15:57:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
class MyDialog : public wxDialog
|
|
|
|
{
|
1999-01-12 18:51:13 -05:00
|
|
|
public:
|
1998-05-22 15:57:05 -04:00
|
|
|
void OnOk(wxCommandEvent& event);
|
|
|
|
void OnCancel(wxCommandEvent& event);
|
1999-01-12 18:51:13 -05:00
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-22 15:57:05 -04:00
|
|
|
};
|
|
|
|
|
1999-01-12 18:51:13 -05:00
|
|
|
// the values should be the same as in menu.wxr file!
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
RESOURCE_TESTDIALOG = 2,
|
|
|
|
RESOURCE_QUIT = 4,
|
|
|
|
RESOURCE_ABOUT = 6
|
|
|
|
};
|