1998-05-22 19:57:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: dialogs.h
|
|
|
|
// Purpose: Common dialogs demo
|
|
|
|
// Author: Julian Smart
|
2004-06-11 20:43:45 +00:00
|
|
|
// Modified by: ABX (2004) - adjustementd for conditional building
|
1998-05-22 19:57:05 +00:00
|
|
|
// Created: 04/01/98
|
|
|
|
// RCS-ID: $Id$
|
2003-03-17 11:55:54 +00:00
|
|
|
// Copyright: (c) Julian Smart
|
1999-07-22 23:39:47 +00:00
|
|
|
// Licence: wxWindows license
|
1998-05-22 19:57:05 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2004-09-16 18:35:43 +00:00
|
|
|
/*
|
2004-09-22 11:56:48 +00:00
|
|
|
This sample shows how to use the common dialogs available from wxWidgets.
|
2004-09-16 18:35:43 +00:00
|
|
|
It also shows that generic implementations of common dialogs can be exchanged
|
|
|
|
with native dialogs and can coexist in one application. The need for generic
|
|
|
|
dialogs addition is recognized thanks to setup of below USE_*** setting. Their
|
2004-09-22 11:56:48 +00:00
|
|
|
combinations reflects conditions of makefiles and project files to avoid unresolved
|
|
|
|
references during linking. For now some generic dialogs are added in static builds
|
2004-09-16 18:35:43 +00:00
|
|
|
of MSW, MAC and OS2
|
|
|
|
*/
|
|
|
|
|
1998-05-22 19:57:05 +00:00
|
|
|
#ifndef __DIALOGSH__
|
|
|
|
#define __DIALOGSH__
|
|
|
|
|
2004-06-23 09:39:42 +00:00
|
|
|
#ifdef __WXUNIVERSAL__
|
|
|
|
#define USE_WXUNIVERSAL 1
|
|
|
|
#else
|
|
|
|
#define USE_WXUNIVERSAL 0
|
|
|
|
#endif
|
|
|
|
|
2004-08-31 11:39:25 +00:00
|
|
|
#ifdef WXUSINGDLL
|
|
|
|
#define USE_DLL 1
|
|
|
|
#else
|
|
|
|
#define USE_DLL 0
|
|
|
|
#endif
|
|
|
|
|
2006-03-07 01:50:45 +00:00
|
|
|
#if defined(__WXWINCE__)
|
|
|
|
#define USE_WXWINCE 1
|
|
|
|
#else
|
|
|
|
#define USE_WXWINCE 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if defined(__WXMSW__) && !USE_WXWINCE
|
2004-06-23 09:39:42 +00:00
|
|
|
#define USE_WXMSW 1
|
|
|
|
#else
|
|
|
|
#define USE_WXMSW 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __WXMAC__
|
|
|
|
#define USE_WXMAC 1
|
|
|
|
#else
|
|
|
|
#define USE_WXMAC 0
|
|
|
|
#endif
|
|
|
|
|
2004-10-01 01:57:31 +00:00
|
|
|
#if defined(__WXMAC_OSX__) && ( MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_2) && USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
2004-09-27 13:14:22 +00:00
|
|
|
#define USE_WXMACFONTDLG 1
|
|
|
|
#else
|
|
|
|
#define USE_WXMACFONTDLG 0
|
|
|
|
#endif
|
|
|
|
|
2004-06-23 09:39:42 +00:00
|
|
|
#ifdef __WXGTK__
|
|
|
|
#define USE_WXGTK 1
|
|
|
|
#else
|
|
|
|
#define USE_WXGTK 0
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef __WXPM__
|
|
|
|
#define USE_WXPM 1
|
|
|
|
#else
|
|
|
|
#define USE_WXPM 0
|
|
|
|
#endif
|
|
|
|
|
2004-09-08 10:49:36 +00:00
|
|
|
#define USE_GENERIC_DIALOGS (!USE_WXUNIVERSAL && !USE_DLL)
|
2004-06-11 20:43:45 +00:00
|
|
|
|
2004-09-08 10:49:36 +00:00
|
|
|
#define USE_COLOURDLG_GENERIC \
|
|
|
|
((USE_WXMSW || USE_WXMAC) && USE_GENERIC_DIALOGS && wxUSE_COLOURDLG)
|
|
|
|
#define USE_DIRDLG_GENERIC \
|
|
|
|
((USE_WXMSW || USE_WXMAC) && USE_GENERIC_DIALOGS && wxUSE_DIRDLG)
|
|
|
|
#define USE_FILEDLG_GENERIC \
|
2008-03-02 14:33:47 +00:00
|
|
|
((((USE_WXMSW || USE_WXMAC || USE_WXPM || USE_WXGTK) \
|
|
|
|
&& USE_GENERIC_DIALOGS) || USE_WXWINCE) && wxUSE_FILEDLG)
|
2004-09-08 10:49:36 +00:00
|
|
|
#define USE_FONTDLG_GENERIC \
|
2006-03-07 01:50:45 +00:00
|
|
|
((USE_WXMSW || USE_WXMACFONTDLG || USE_WXPM) && USE_GENERIC_DIALOGS && wxUSE_FONTDLG)
|
2004-09-16 18:35:43 +00:00
|
|
|
|
2004-09-22 11:56:48 +00:00
|
|
|
// Turn USE_MODAL_PRESENTATION to 0 if there is any reason for not presenting difference
|
|
|
|
// between modal and modeless dialogs (ie. not implemented it in your port yet)
|
2005-06-10 17:53:19 +00:00
|
|
|
#if defined(__SMARTPHONE__) || !wxUSE_BOOKCTRL
|
2004-09-22 11:56:48 +00:00
|
|
|
#define USE_MODAL_PRESENTATION 0
|
|
|
|
#else
|
|
|
|
#define USE_MODAL_PRESENTATION 1
|
|
|
|
#endif
|
2004-09-16 18:35:43 +00:00
|
|
|
|
2004-06-11 20:43:45 +00:00
|
|
|
|
2005-06-10 17:53:19 +00:00
|
|
|
// Turn USE_SETTINGS_DIALOG to 0 if supported
|
|
|
|
#if wxUSE_BOOKCTRL
|
|
|
|
#define USE_SETTINGS_DIALOG 1
|
|
|
|
#else
|
|
|
|
#define USE_SETTINGS_DIALOG 0
|
|
|
|
#endif
|
|
|
|
|
2008-09-11 13:58:54 +00:00
|
|
|
#if wxUSE_LOG
|
|
|
|
|
|
|
|
// Custom application traits class which we use to override the default log
|
|
|
|
// target creation
|
|
|
|
class MyAppTraits : public wxGUIAppTraits
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual wxLog *CreateLogTarget();
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // wxUSE_LOG
|
2005-06-10 17:53:19 +00:00
|
|
|
|
1998-05-22 19:57:05 +00:00
|
|
|
// Define a new application type
|
|
|
|
class MyApp: public wxApp
|
1999-07-22 23:39:47 +00:00
|
|
|
{
|
|
|
|
public:
|
2008-09-11 13:58:54 +00:00
|
|
|
virtual bool OnInit();
|
1998-05-22 19:57:05 +00:00
|
|
|
|
|
|
|
wxFont m_canvasFont;
|
|
|
|
wxColour m_canvasTextColour;
|
2008-09-11 13:58:54 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
#if wxUSE_LOG
|
|
|
|
virtual wxAppTraits *CreateTraits() { return new MyAppTraits; }
|
|
|
|
#endif // wxUSE_LOG
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
2004-06-21 10:31:39 +00:00
|
|
|
#if USE_MODAL_PRESENTATION
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
// A custom modeless dialog
|
2000-01-30 01:33:02 +00:00
|
|
|
class MyModelessDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyModelessDialog(wxWindow *parent);
|
2000-02-25 02:20:44 +00:00
|
|
|
|
2001-08-20 23:01:17 +00:00
|
|
|
void OnButton(wxCommandEvent& event);
|
2000-02-25 02:20:44 +00:00
|
|
|
void OnClose(wxCloseEvent& event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
2000-01-30 01:33:02 +00:00
|
|
|
};
|
|
|
|
|
2000-07-15 19:51:35 +00:00
|
|
|
// A custom modal dialog
|
|
|
|
class MyModalDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
MyModalDialog(wxWindow *parent);
|
|
|
|
|
|
|
|
void OnButton(wxCommandEvent& event);
|
|
|
|
|
|
|
|
private:
|
2003-02-25 12:33:35 +00:00
|
|
|
wxButton *m_btnModal,
|
|
|
|
*m_btnModeless,
|
|
|
|
*m_btnDelete;
|
2000-07-15 19:51:35 +00:00
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
2004-06-21 10:31:39 +00:00
|
|
|
#endif // USE_MODAL_PRESENTATION
|
|
|
|
|
2008-09-08 00:49:06 +00:00
|
|
|
// A class demonstrating CreateStdDialogButtonSizer()
|
2007-04-22 21:25:24 +00:00
|
|
|
class StdButtonSizerDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
StdButtonSizerDialog(wxWindow *parent);
|
|
|
|
|
|
|
|
void OnEvent(wxCommandEvent& event);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void EnableDisableControls();
|
|
|
|
|
|
|
|
wxCheckBox *m_chkboxAffirmativeButton;
|
|
|
|
wxRadioButton *m_radiobtnOk,
|
|
|
|
*m_radiobtnYes;
|
|
|
|
|
|
|
|
wxCheckBox *m_chkboxDismissButton;
|
|
|
|
wxRadioButton *m_radiobtnClose,
|
|
|
|
*m_radiobtnCancel;
|
|
|
|
|
|
|
|
wxCheckBox *m_chkboxApply,
|
|
|
|
*m_chkboxNo,
|
|
|
|
*m_chkboxHelp,
|
|
|
|
*m_chkboxNoDefault;
|
|
|
|
|
|
|
|
wxSizer *m_buttonsSizer;
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
2008-09-08 00:49:06 +00:00
|
|
|
// Test harness for wxMessageDialog.
|
|
|
|
class TestMessageBoxDialog : public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestMessageBoxDialog(wxWindow *parent);
|
|
|
|
|
|
|
|
private:
|
|
|
|
void OnApply(wxCommandEvent& event);
|
|
|
|
void OnClose(wxCommandEvent& event);
|
|
|
|
void OnUpdateLabelUI(wxUpdateUIEvent& event);
|
2008-09-09 17:25:34 +00:00
|
|
|
void OnUpdateNoDefaultUI(wxUpdateUIEvent& event);
|
2008-09-08 00:49:06 +00:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
Btn_Yes,
|
|
|
|
Btn_No,
|
|
|
|
Btn_Ok,
|
|
|
|
Btn_Cancel,
|
|
|
|
Btn_Max
|
|
|
|
};
|
|
|
|
|
|
|
|
struct BtnInfo
|
|
|
|
{
|
|
|
|
int flag;
|
2008-09-11 11:22:58 +00:00
|
|
|
const char *name;
|
2008-09-08 00:49:06 +00:00
|
|
|
};
|
|
|
|
|
2008-09-11 11:22:58 +00:00
|
|
|
static const BtnInfo ms_btnInfo[Btn_Max];
|
2008-09-08 00:49:06 +00:00
|
|
|
|
|
|
|
wxTextCtrl *m_textMsg,
|
|
|
|
*m_textExtMsg;
|
|
|
|
|
|
|
|
wxCheckBox *m_buttons[Btn_Max];
|
|
|
|
wxTextCtrl *m_labels[Btn_Max];
|
|
|
|
|
|
|
|
wxRadioBox *m_icons;
|
|
|
|
|
2008-09-09 17:25:34 +00:00
|
|
|
wxCheckBox *m_chkNoDefault,
|
|
|
|
*m_chkCentre;
|
|
|
|
|
2008-09-08 00:49:06 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
DECLARE_NO_COPY_CLASS(TestMessageBoxDialog)
|
|
|
|
};
|
|
|
|
|
2008-01-12 14:59:17 +00:00
|
|
|
class TestDefaultActionDialog: public wxDialog
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TestDefaultActionDialog( wxWindow *parent );
|
2008-09-08 00:49:06 +00:00
|
|
|
|
2008-01-12 14:59:17 +00:00
|
|
|
void OnListBoxDClick(wxCommandEvent& event);
|
|
|
|
void OnCatchListBoxDClick(wxCommandEvent& event);
|
2008-09-08 00:49:06 +00:00
|
|
|
|
2008-01-12 14:59:17 +00:00
|
|
|
private:
|
|
|
|
bool m_catchListBoxDClick;
|
|
|
|
|
|
|
|
private:
|
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2005-06-10 17:53:19 +00:00
|
|
|
#if USE_SETTINGS_DIALOG
|
2005-04-01 14:27:55 +00:00
|
|
|
// Property sheet dialog
|
|
|
|
class SettingsDialog: public wxPropertySheetDialog
|
|
|
|
{
|
|
|
|
DECLARE_CLASS(SettingsDialog)
|
|
|
|
public:
|
2006-04-14 09:15:10 +00:00
|
|
|
SettingsDialog(wxWindow* parent, int dialogType);
|
2006-01-31 13:54:17 +00:00
|
|
|
~SettingsDialog();
|
2005-04-01 14:27:55 +00:00
|
|
|
|
|
|
|
wxPanel* CreateGeneralSettingsPage(wxWindow* parent);
|
|
|
|
wxPanel* CreateAestheticSettingsPage(wxWindow* parent);
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
enum {
|
|
|
|
ID_SHOW_TOOLTIPS = 100,
|
|
|
|
ID_AUTO_SAVE,
|
|
|
|
ID_AUTO_SAVE_MINS,
|
|
|
|
ID_LOAD_LAST_PROJECT,
|
|
|
|
|
|
|
|
ID_APPLY_SETTINGS_TO,
|
|
|
|
ID_BACKGROUND_STYLE,
|
|
|
|
ID_FONT_SIZE
|
|
|
|
};
|
|
|
|
|
2006-01-31 13:54:17 +00:00
|
|
|
wxImageList* m_imageList;
|
|
|
|
|
2005-04-01 14:27:55 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
|
|
|
};
|
|
|
|
|
2005-06-10 17:53:19 +00:00
|
|
|
#endif // USE_SETTINGS_DIALOG
|
|
|
|
|
1998-05-22 19:57:05 +00:00
|
|
|
// Define a new frame type
|
|
|
|
class MyFrame: public wxFrame
|
1999-07-22 23:39:47 +00:00
|
|
|
{
|
|
|
|
public:
|
2004-06-11 20:43:45 +00:00
|
|
|
MyFrame(wxWindow *parent, const wxString& title);
|
2007-11-24 01:56:13 +00:00
|
|
|
virtual ~MyFrame();
|
2004-06-11 20:43:45 +00:00
|
|
|
|
2007-11-18 19:56:03 +00:00
|
|
|
#if wxUSE_MSGDLG
|
2004-06-11 20:43:45 +00:00
|
|
|
void MessageBox(wxCommandEvent& event);
|
2008-09-08 00:49:06 +00:00
|
|
|
void MessageBoxDialog(wxCommandEvent& event);
|
2007-11-18 19:56:03 +00:00
|
|
|
void MessageBoxInfo(wxCommandEvent& event);
|
|
|
|
#endif // wxUSE_MSGDLG
|
1998-05-22 19:57:05 +00:00
|
|
|
|
2004-06-11 20:43:45 +00:00
|
|
|
#if wxUSE_COLOURDLG
|
1999-07-03 16:40:54 +00:00
|
|
|
void ChooseColour(wxCommandEvent& event);
|
2007-11-18 19:33:34 +00:00
|
|
|
void GetColour(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_COLOURDLG
|
|
|
|
|
|
|
|
#if wxUSE_FONTDLG
|
1999-07-03 16:40:54 +00:00
|
|
|
void ChooseFont(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_FONTDLG
|
|
|
|
|
|
|
|
#if wxUSE_LOG_DIALOG
|
2000-01-21 02:31:49 +00:00
|
|
|
void LogDialog(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_LOG_DIALOG
|
|
|
|
|
|
|
|
#if wxUSE_CHOICEDLG
|
1998-05-22 19:57:05 +00:00
|
|
|
void SingleChoice(wxCommandEvent& event);
|
2000-11-03 20:52:17 +00:00
|
|
|
void MultiChoice(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_CHOICEDLG
|
|
|
|
|
|
|
|
#if wxUSE_TEXTDLG
|
1998-05-22 19:57:05 +00:00
|
|
|
void TextEntry(wxCommandEvent& event);
|
2000-01-24 18:26:54 +00:00
|
|
|
void PasswordEntry(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_TEXTDLG
|
|
|
|
|
|
|
|
#if wxUSE_NUMBERDLG
|
1999-07-22 23:39:47 +00:00
|
|
|
void NumericEntry(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_NUMBERDLG
|
|
|
|
|
|
|
|
#if wxUSE_FILEDLG
|
1998-05-22 19:57:05 +00:00
|
|
|
void FileOpen(wxCommandEvent& event);
|
2000-08-23 22:47:33 +00:00
|
|
|
void FileOpen2(wxCommandEvent& event);
|
1999-12-07 00:48:45 +00:00
|
|
|
void FilesOpen(wxCommandEvent& event);
|
1998-05-22 19:57:05 +00:00
|
|
|
void FileSave(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_FILEDLG
|
|
|
|
|
2004-06-16 15:03:44 +00:00
|
|
|
#if USE_FILEDLG_GENERIC
|
|
|
|
void FileOpenGeneric(wxCommandEvent& event);
|
|
|
|
void FilesOpenGeneric(wxCommandEvent& event);
|
|
|
|
void FileSaveGeneric(wxCommandEvent& event);
|
|
|
|
#endif // USE_FILEDLG_GENERIC
|
|
|
|
|
2004-06-11 20:43:45 +00:00
|
|
|
#if wxUSE_DIRDLG
|
1998-05-22 19:57:05 +00:00
|
|
|
void DirChoose(wxCommandEvent& event);
|
2003-02-01 22:51:07 +00:00
|
|
|
void DirChooseNew(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_DIRDLG
|
|
|
|
|
|
|
|
#if USE_DIRDLG_GENERIC
|
2000-07-23 19:10:27 +00:00
|
|
|
void GenericDirChoose(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // USE_DIRDLG_GENERIC
|
|
|
|
|
|
|
|
#if wxUSE_STARTUP_TIPS
|
1999-06-28 21:39:49 +00:00
|
|
|
void ShowTip(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_STARTUP_TIPS
|
|
|
|
|
|
|
|
#if USE_MODAL_PRESENTATION
|
2000-07-15 19:51:35 +00:00
|
|
|
void ModalDlg(wxCommandEvent& event);
|
2007-07-29 00:21:45 +00:00
|
|
|
#endif // USE_MODAL_PRESENTATION
|
2000-01-30 01:33:02 +00:00
|
|
|
void ModelessDlg(wxCommandEvent& event);
|
2006-02-09 23:17:35 +00:00
|
|
|
void DlgCenteredScreen(wxCommandEvent& event);
|
|
|
|
void DlgCenteredParent(wxCommandEvent& event);
|
2007-07-29 00:21:45 +00:00
|
|
|
void MiniFrame(wxCommandEvent& event);
|
2007-10-07 22:11:55 +00:00
|
|
|
void DlgOnTop(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
|
2001-08-01 02:29:35 +00:00
|
|
|
#if wxUSE_PROGRESSDLG
|
2000-02-25 02:20:44 +00:00
|
|
|
void ShowProgress(wxCommandEvent& event);
|
2001-08-01 02:29:35 +00:00
|
|
|
#endif // wxUSE_PROGRESSDLG
|
2004-06-11 20:43:45 +00:00
|
|
|
|
2006-10-08 01:02:04 +00:00
|
|
|
#if wxUSE_ABOUTDLG
|
|
|
|
void ShowSimpleAboutDialog(wxCommandEvent& event);
|
|
|
|
void ShowFancyAboutDialog(wxCommandEvent& event);
|
2006-10-08 14:12:59 +00:00
|
|
|
void ShowFullAboutDialog(wxCommandEvent& event);
|
|
|
|
void ShowCustomAboutDialog(wxCommandEvent& event);
|
2006-10-08 01:02:04 +00:00
|
|
|
#endif // wxUSE_ABOUTDLG
|
|
|
|
|
2001-10-29 13:21:29 +00:00
|
|
|
#if wxUSE_BUSYINFO
|
|
|
|
void ShowBusyInfo(wxCommandEvent& event);
|
|
|
|
#endif // wxUSE_BUSYINFO
|
2004-06-11 20:43:45 +00:00
|
|
|
|
2001-08-01 02:29:35 +00:00
|
|
|
#if wxUSE_FINDREPLDLG
|
|
|
|
void ShowFindDialog(wxCommandEvent& event);
|
|
|
|
void ShowReplaceDialog(wxCommandEvent& event);
|
|
|
|
void OnFindDialog(wxFindDialogEvent& event);
|
|
|
|
#endif // wxUSE_FINDREPLDLG
|
1998-05-22 19:57:05 +00:00
|
|
|
|
2004-06-11 20:43:45 +00:00
|
|
|
#if USE_COLOURDLG_GENERIC
|
1999-07-03 16:40:54 +00:00
|
|
|
void ChooseColourGeneric(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // USE_COLOURDLG_GENERIC
|
|
|
|
|
|
|
|
#if USE_FONTDLG_GENERIC
|
1999-07-03 16:40:54 +00:00
|
|
|
void ChooseFontGeneric(wxCommandEvent& event);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // USE_FONTDLG_GENERIC
|
1999-07-22 23:39:47 +00:00
|
|
|
|
2005-04-01 14:27:55 +00:00
|
|
|
void OnPropertySheet(wxCommandEvent& event);
|
2007-11-24 01:56:13 +00:00
|
|
|
|
2004-09-08 10:49:36 +00:00
|
|
|
void OnRequestUserAttention(wxCommandEvent& event);
|
2007-11-24 01:56:13 +00:00
|
|
|
#if wxUSE_NOTIFICATION_MESSAGE
|
|
|
|
void OnNotifMsgAuto(wxCommandEvent& event);
|
|
|
|
void OnNotifMsgShow(wxCommandEvent& event);
|
|
|
|
void OnNotifMsgHide(wxCommandEvent& event);
|
|
|
|
#endif // wxUSE_NOTIFICATION_MESSAGE
|
|
|
|
|
2007-04-22 21:25:24 +00:00
|
|
|
void OnStandardButtonsSizerDialog(wxCommandEvent& event);
|
2008-09-08 00:49:06 +00:00
|
|
|
|
2008-01-12 14:59:17 +00:00
|
|
|
void OnTestDefaultActionDialog(wxCommandEvent& event);
|
2008-09-08 00:49:06 +00:00
|
|
|
|
1999-07-03 16:40:54 +00:00
|
|
|
void OnExit(wxCommandEvent& event);
|
1999-07-22 23:39:47 +00:00
|
|
|
|
2000-01-30 01:33:02 +00:00
|
|
|
private:
|
2004-06-11 20:43:45 +00:00
|
|
|
#if wxUSE_DIRDLG
|
2003-02-01 22:51:07 +00:00
|
|
|
void DoDirChoose(int style);
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // wxUSE_DIRDLG
|
2003-02-01 22:51:07 +00:00
|
|
|
|
2004-06-11 20:43:45 +00:00
|
|
|
#if USE_MODAL_PRESENTATION
|
2000-01-30 01:33:02 +00:00
|
|
|
MyModelessDialog *m_dialog;
|
2004-06-11 20:43:45 +00:00
|
|
|
#endif // USE_MODAL_PRESENTATION
|
2000-01-30 01:33:02 +00:00
|
|
|
|
2001-08-01 02:29:35 +00:00
|
|
|
#if wxUSE_FINDREPLDLG
|
|
|
|
wxFindReplaceData m_findData;
|
2001-11-18 23:06:43 +00:00
|
|
|
|
|
|
|
wxFindReplaceDialog *m_dlgFind,
|
|
|
|
*m_dlgReplace;
|
2001-08-01 02:29:35 +00:00
|
|
|
#endif // wxUSE_FINDREPLDLG
|
|
|
|
|
2007-11-24 01:56:13 +00:00
|
|
|
#if wxUSE_NOTIFICATION_MESSAGE
|
|
|
|
wxNotificationMessage *m_notifMsg;
|
|
|
|
#endif // wxUSE_NOTIFICATION_MESSAGE
|
|
|
|
|
2004-06-04 15:57:12 +00:00
|
|
|
wxColourData m_clrData;
|
|
|
|
|
2000-01-30 01:33:02 +00:00
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class MyCanvas: public wxScrolledWindow
|
|
|
|
{
|
1999-07-22 23:39:47 +00:00
|
|
|
public:
|
2004-09-22 11:56:48 +00:00
|
|
|
MyCanvas(wxWindow *parent) :
|
2004-06-11 20:43:45 +00:00
|
|
|
wxScrolledWindow(parent,wxID_ANY,wxDefaultPosition,wxDefaultSize,wxNO_FULL_REPAINT_ON_RESIZE) { }
|
1999-07-22 23:39:47 +00:00
|
|
|
|
|
|
|
void OnPaint(wxPaintEvent& event);
|
|
|
|
|
|
|
|
DECLARE_EVENT_TABLE()
|
1998-05-22 19:57:05 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// Menu IDs
|
2000-01-24 18:26:54 +00:00
|
|
|
enum
|
|
|
|
{
|
2004-06-11 20:43:45 +00:00
|
|
|
DIALOGS_CHOOSE_COLOUR = wxID_HIGHEST,
|
2007-11-18 19:33:34 +00:00
|
|
|
DIALOGS_GET_COLOUR,
|
2000-01-24 18:26:54 +00:00
|
|
|
DIALOGS_CHOOSE_COLOUR_GENERIC,
|
|
|
|
DIALOGS_CHOOSE_FONT,
|
|
|
|
DIALOGS_CHOOSE_FONT_GENERIC,
|
|
|
|
DIALOGS_MESSAGE_BOX,
|
2008-09-08 00:49:06 +00:00
|
|
|
DIALOGS_MESSAGE_DIALOG,
|
2007-11-18 19:56:03 +00:00
|
|
|
DIALOGS_MESSAGE_BOX_WXINFO,
|
2000-01-24 18:26:54 +00:00
|
|
|
DIALOGS_SINGLE_CHOICE,
|
2000-11-03 20:52:17 +00:00
|
|
|
DIALOGS_MULTI_CHOICE,
|
2000-01-24 18:26:54 +00:00
|
|
|
DIALOGS_TEXT_ENTRY,
|
|
|
|
DIALOGS_PASSWORD_ENTRY,
|
|
|
|
DIALOGS_FILE_OPEN,
|
2000-08-23 22:47:33 +00:00
|
|
|
DIALOGS_FILE_OPEN2,
|
2000-01-24 18:26:54 +00:00
|
|
|
DIALOGS_FILES_OPEN,
|
|
|
|
DIALOGS_FILE_SAVE,
|
2004-06-16 15:03:44 +00:00
|
|
|
DIALOGS_FILE_OPEN_GENERIC,
|
|
|
|
DIALOGS_FILES_OPEN_GENERIC,
|
|
|
|
DIALOGS_FILE_SAVE_GENERIC,
|
2000-01-24 18:26:54 +00:00
|
|
|
DIALOGS_DIR_CHOOSE,
|
2003-02-01 22:51:07 +00:00
|
|
|
DIALOGS_DIRNEW_CHOOSE,
|
2000-07-23 19:10:27 +00:00
|
|
|
DIALOGS_GENERIC_DIR_CHOOSE,
|
2000-01-24 18:26:54 +00:00
|
|
|
DIALOGS_TIP,
|
|
|
|
DIALOGS_NUM_ENTRY,
|
2000-01-30 01:33:02 +00:00
|
|
|
DIALOGS_LOG_DIALOG,
|
2000-07-15 19:51:35 +00:00
|
|
|
DIALOGS_MODAL,
|
2000-01-30 01:33:02 +00:00
|
|
|
DIALOGS_MODELESS,
|
2006-02-09 23:17:35 +00:00
|
|
|
DIALOGS_CENTRE_SCREEN,
|
|
|
|
DIALOGS_CENTRE_PARENT,
|
2007-07-29 00:21:45 +00:00
|
|
|
DIALOGS_MINIFRAME,
|
2007-10-07 22:11:55 +00:00
|
|
|
DIALOGS_ONTOP,
|
2000-02-25 02:20:44 +00:00
|
|
|
DIALOGS_MODELESS_BTN,
|
2001-08-01 02:29:35 +00:00
|
|
|
DIALOGS_PROGRESS,
|
2006-10-08 01:02:04 +00:00
|
|
|
DIALOGS_ABOUTDLG_SIMPLE,
|
|
|
|
DIALOGS_ABOUTDLG_FANCY,
|
2006-10-08 14:12:59 +00:00
|
|
|
DIALOGS_ABOUTDLG_FULL,
|
|
|
|
DIALOGS_ABOUTDLG_CUSTOM,
|
2001-10-29 13:21:29 +00:00
|
|
|
DIALOGS_BUSYINFO,
|
2001-08-01 02:29:35 +00:00
|
|
|
DIALOGS_FIND,
|
2004-09-08 10:49:36 +00:00
|
|
|
DIALOGS_REPLACE,
|
2005-04-01 14:27:55 +00:00
|
|
|
DIALOGS_REQUEST,
|
2007-11-24 01:56:13 +00:00
|
|
|
DIALOGS_NOTIFY_AUTO,
|
|
|
|
DIALOGS_NOTIFY_SHOW,
|
|
|
|
DIALOGS_NOTIFY_HIDE,
|
2006-01-31 13:54:17 +00:00
|
|
|
DIALOGS_PROPERTY_SHEET,
|
2006-04-14 09:15:10 +00:00
|
|
|
DIALOGS_PROPERTY_SHEET_TOOLBOOK,
|
2007-04-22 21:25:24 +00:00
|
|
|
DIALOGS_PROPERTY_SHEET_BUTTONTOOLBOOK,
|
2008-01-12 14:59:17 +00:00
|
|
|
DIALOGS_STANDARD_BUTTON_SIZER_DIALOG,
|
|
|
|
DIALOGS_TEST_DEFAULT_ACTION
|
2000-01-24 18:26:54 +00:00
|
|
|
};
|
1998-05-22 19:57:05 +00:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|