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
22 wxColour m_canvasTextColour
;
25 // Define a new frame type
26 class MyFrame
: public wxFrame
29 MyFrame(wxWindow
*parent
, const wxString
& title
,
30 const wxPoint
& pos
, const wxSize
& size
);
32 void ChooseColour(wxCommandEvent
& event
);
33 void ChooseFont(wxCommandEvent
& event
);
34 void MessageBox(wxCommandEvent
& event
);
35 void SingleChoice(wxCommandEvent
& event
);
36 void TextEntry(wxCommandEvent
& event
);
37 void NumericEntry(wxCommandEvent
& event
);
38 void FileOpen(wxCommandEvent
& event
);
39 void FileSave(wxCommandEvent
& event
);
40 void DirChoose(wxCommandEvent
& event
);
41 void ShowTip(wxCommandEvent
& event
);
43 #if !defined(__WXMSW__) || wxTEST_GENERIC_DIALOGS_IN_MSW
44 void ChooseColourGeneric(wxCommandEvent
& event
);
45 void ChooseFontGeneric(wxCommandEvent
& event
);
48 void OnExit(wxCommandEvent
& event
);
53 class MyCanvas
: public wxScrolledWindow
56 MyCanvas(wxWindow
*parent
) : wxScrolledWindow(parent
) { }
58 void OnPaint(wxPaintEvent
& event
);
65 #define DIALOGS_CHOOSE_COLOUR 1
66 #define DIALOGS_CHOOSE_COLOUR_GENERIC 2
67 #define DIALOGS_CHOOSE_FONT 3
68 #define DIALOGS_CHOOSE_FONT_GENERIC 4
69 #define DIALOGS_MESSAGE_BOX 5
70 #define DIALOGS_SINGLE_CHOICE 6
71 #define DIALOGS_TEXT_ENTRY 7
72 #define DIALOGS_FILE_OPEN 8
73 #define DIALOGS_FILE_SAVE 9
74 #define DIALOGS_DIR_CHOOSE 10
75 #define DIALOGS_TIP 11
76 #define DIALOGS_NUM_ENTRY 13