1998-12-31 16:15:45 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2000-03-14 18:20:11 +00:00
|
|
|
// Name: proplist.h
|
1998-12-31 16:15:45 +00:00
|
|
|
// Purpose: Property sheet sample
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 04/01/98
|
|
|
|
// RCS-ID: $Id$
|
|
|
|
// Copyright: (c) Julian Smart
|
2002-03-17 14:16:03 +00:00
|
|
|
// Licence: wxWindows license
|
1998-12-31 16:15:45 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
2001-07-22 20:25:27 +00:00
|
|
|
#pragma interface "proplist_sample.h"
|
1998-12-31 16:15:45 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef _PROPTEST_H_
|
|
|
|
#define _PROPTEST_H_
|
|
|
|
|
|
|
|
#include "wx/proplist.h"
|
|
|
|
#include "wx/propform.h"
|
|
|
|
|
|
|
|
class MyChild;
|
|
|
|
|
|
|
|
// Define a new application
|
|
|
|
class MyFrame;
|
|
|
|
class MyApp: public wxApp
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyApp(void);
|
|
|
|
bool OnInit(void);
|
|
|
|
|
|
|
|
void RegisterValidators(void);
|
|
|
|
void PropertyListTest(bool useDialog);
|
|
|
|
void PropertyFormTest(bool useDialog);
|
|
|
|
|
|
|
|
MyFrame* m_mainFrame;
|
|
|
|
wxWindow* m_childWindow;
|
|
|
|
};
|
|
|
|
|
|
|
|
DECLARE_APP(MyApp)
|
|
|
|
|
|
|
|
// Define a new frame
|
|
|
|
class MyFrame: public wxFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyFrame(wxFrame *frame, const wxString& title, const wxPoint& pos, const wxSize& size, long type);
|
|
|
|
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
|
|
void OnQuit(wxCommandEvent& event);
|
|
|
|
void OnDialogList(wxCommandEvent& event);
|
|
|
|
void OnFrameList(wxCommandEvent& event);
|
|
|
|
void OnDialogForm(wxCommandEvent& event);
|
|
|
|
void OnFrameForm(wxCommandEvent& event);
|
|
|
|
void OnAbout(wxCommandEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
class PropListFrame: public wxPropertyListFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PropListFrame(wxPropertyListView *v, wxFrame *parent, const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
1999-01-07 08:43:47 +00:00
|
|
|
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"):
|
1998-12-31 16:15:45 +00:00
|
|
|
wxPropertyListFrame(v, parent, title, pos, size, style, name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
class PropListDialog: public wxPropertyListDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PropListDialog(wxPropertyListView *v, wxWindow *parent, const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"):
|
|
|
|
wxPropertyListDialog(v, parent, title, pos, size, style, name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
class PropFormFrame: public wxPropertyFormFrame
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PropFormFrame(wxPropertyFormView *v, wxFrame *parent, const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
1999-01-16 00:13:58 +00:00
|
|
|
long style = wxDEFAULT_FRAME_STYLE, const wxString& name = "frame"):
|
1998-12-31 16:15:45 +00:00
|
|
|
wxPropertyFormFrame(v, parent, title, pos, size, style, name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
1999-09-29 15:55:50 +00:00
|
|
|
void OnSize(wxSizeEvent& event);
|
1998-12-31 16:15:45 +00:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
class PropFormDialog: public wxPropertyFormDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
PropFormDialog(wxPropertyFormView *v, wxWindow *parent, const wxString& title,
|
|
|
|
const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
|
|
|
|
long style = wxDEFAULT_DIALOG_STYLE, const wxString& name = "dialogBox"):
|
|
|
|
wxPropertyFormDialog(v, parent, title, pos, size, style, name)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void OnCloseWindow(wxCloseEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
#define PROPERTY_QUIT 1
|
|
|
|
#define PROPERTY_ABOUT 2
|
|
|
|
#define PROPERTY_TEST_DIALOG_LIST 3
|
|
|
|
#define PROPERTY_TEST_FRAME_LIST 4
|
|
|
|
#define PROPERTY_TEST_DIALOG_FORM 5
|
|
|
|
#define PROPERTY_TEST_FRAME_FORM 6
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|