1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: Common dialogs demo
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart and Markus Holzem
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
15 // Define a new application type
16 class MyApp
: public wxApp
21 wxColour m_canvasTextColour
;
24 // Define a new frame type
25 class MyFrame
: public wxFrame
27 MyFrame(wxWindow
*parent
, const wxString
& title
, const wxPoint
& pos
,
30 void ChooseColour(wxCommandEvent
& event
);
31 void ChooseFont(wxCommandEvent
& event
);
32 void MessageBox(wxCommandEvent
& event
);
33 void SingleChoice(wxCommandEvent
& event
);
34 void TextEntry(wxCommandEvent
& event
);
35 void FileOpen(wxCommandEvent
& event
);
36 void FileSave(wxCommandEvent
& event
);
37 void DirChoose(wxCommandEvent
& event
);
39 #if !defined(__WXMSW__) || wxTEST_GENERIC_DIALOGS_IN_MSW
40 void ChooseColourGeneric(wxCommandEvent
& event
);
41 void ChooseFontGeneric(wxCommandEvent
& event
);
43 void OnExit(wxCommandEvent
& event
);
47 class MyCanvas
: public wxScrolledWindow
50 MyCanvas(wxWindow
*parent
):
51 wxScrolledWindow(parent
)
54 void OnPaint(wxPaintEvent
& event
);
60 #define DIALOGS_CHOOSE_COLOUR 1
61 #define DIALOGS_CHOOSE_COLOUR_GENERIC 2
62 #define DIALOGS_CHOOSE_FONT 3
63 #define DIALOGS_CHOOSE_FONT_GENERIC 4
64 #define DIALOGS_MESSAGE_BOX 5
65 #define DIALOGS_SINGLE_CHOICE 6
66 #define DIALOGS_TEXT_ENTRY 7
67 #define DIALOGS_FILE_OPEN 8
68 #define DIALOGS_FILE_SAVE 9
69 #define DIALOGS_DIR_CHOOSE 10