1998-05-22 19:57:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: validate.h
|
|
|
|
// Purpose: wxWindows validation sample
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 04/01/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart and Markus Holzem
|
1999-02-25 14:47:18 +00:00
|
|
|
// Licence: wxWindows license
|
1998-05-22 19:57:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
// #pragma interface
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// Define a new application type
|
1999-02-25 14:47:18 +00:00
|
|
|
class MyApp : public wxApp
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool OnInit();
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
// Define a new frame type
|
1999-02-25 14:47:18 +00:00
|
|
|
class MyFrame : public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyFrame(wxFrame *frame, const char *title, int x, int y, int w, int h);
|
|
|
|
|
1998-05-22 19:57:05 +00:00
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
|
|
void OnTestDialog(wxCommandEvent& event);
|
1999-02-25 14:47:18 +00:00
|
|
|
void OnSilent(wxCommandEvent& event);
|
1998-05-22 19:57:05 +00:00
|
|
|
|
1999-02-25 14:47:18 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
1999-02-25 14:47:18 +00:00
|
|
|
class MyDialog : public wxDialog
|
1998-05-22 19:57:05 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyDialog(wxWindow *parent, const wxString& title, const wxPoint& pos, const wxSize& size,
|
1999-02-25 14:47:18 +00:00
|
|
|
const long style = wxDEFAULT_DIALOG_STYLE);
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class MyData
|
|
|
|
{
|
1999-02-25 14:47:18 +00:00
|
|
|
public:
|
1998-05-22 19:57:05 +00:00
|
|
|
wxString m_string;
|
|
|
|
|
|
|
|
MyData() { m_string = "My string"; }
|
|
|
|
};
|
|
|
|
|
|
|
|
#define VALIDATE_DIALOG_ID 200
|
|
|
|
|
|
|
|
#define VALIDATE_TEST_DIALOG 2
|
1999-02-25 14:47:18 +00:00
|
|
|
#define VALIDATE_SILENT 3
|
1998-05-22 19:57:05 +00:00
|
|
|
#define VALIDATE_TEXT 101
|
|
|
|
|