]>
Commit | Line | Data |
---|---|---|
457814b5 JS |
1 | ///////////////////////////////////////////////////////////////////////////// |
2 | // Name: dialogs.h | |
3 | // Purpose: Common dialogs demo | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 04/01/98 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart and Markus Holzem | |
c49245f8 | 9 | // Licence: wxWindows license |
457814b5 JS |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef __DIALOGSH__ | |
13 | #define __DIALOGSH__ | |
14 | ||
15 | // Define a new application type | |
16 | class MyApp: public wxApp | |
c49245f8 VZ |
17 | { |
18 | public: | |
19 | bool OnInit(); | |
457814b5 JS |
20 | |
21 | wxFont m_canvasFont; | |
22 | wxColour m_canvasTextColour; | |
23 | }; | |
24 | ||
4c45f240 VZ |
25 | // A modeless dialog |
26 | class MyModelessDialog : public wxDialog | |
27 | { | |
28 | public: | |
29 | MyModelessDialog(wxWindow *parent); | |
abceee76 VZ |
30 | |
31 | void OnClose(wxCloseEvent& event); | |
32 | ||
33 | private: | |
34 | DECLARE_EVENT_TABLE() | |
4c45f240 VZ |
35 | }; |
36 | ||
457814b5 JS |
37 | // Define a new frame type |
38 | class MyFrame: public wxFrame | |
c49245f8 VZ |
39 | { |
40 | public: | |
41 | MyFrame(wxWindow *parent, const wxString& title, | |
42 | const wxPoint& pos, const wxSize& size); | |
457814b5 | 43 | |
329e86bf RR |
44 | void ChooseColour(wxCommandEvent& event); |
45 | void ChooseFont(wxCommandEvent& event); | |
d93c719a | 46 | void LogDialog(wxCommandEvent& event); |
457814b5 JS |
47 | void MessageBox(wxCommandEvent& event); |
48 | void SingleChoice(wxCommandEvent& event); | |
49 | void TextEntry(wxCommandEvent& event); | |
a294c6d5 | 50 | void PasswordEntry(wxCommandEvent& event); |
c49245f8 | 51 | void NumericEntry(wxCommandEvent& event); |
457814b5 | 52 | void FileOpen(wxCommandEvent& event); |
c61f4f6d | 53 | void FilesOpen(wxCommandEvent& event); |
457814b5 JS |
54 | void FileSave(wxCommandEvent& event); |
55 | void DirChoose(wxCommandEvent& event); | |
c50f1fb9 | 56 | void ShowTip(wxCommandEvent& event); |
4c45f240 | 57 | void ModelessDlg(wxCommandEvent& event); |
abceee76 | 58 | void ShowProgress(wxCommandEvent& event); |
457814b5 | 59 | |
dfad0599 | 60 | #if !defined(__WXMSW__) || wxTEST_GENERIC_DIALOGS_IN_MSW |
329e86bf RR |
61 | void ChooseColourGeneric(wxCommandEvent& event); |
62 | void ChooseFontGeneric(wxCommandEvent& event); | |
457814b5 | 63 | #endif |
c49245f8 | 64 | |
329e86bf | 65 | void OnExit(wxCommandEvent& event); |
c49245f8 | 66 | |
4c45f240 VZ |
67 | void OnButton(wxCommandEvent& event); |
68 | ||
69 | private: | |
70 | MyModelessDialog *m_dialog; | |
71 | ||
72 | DECLARE_EVENT_TABLE() | |
457814b5 JS |
73 | }; |
74 | ||
75 | class MyCanvas: public wxScrolledWindow | |
76 | { | |
c49245f8 VZ |
77 | public: |
78 | MyCanvas(wxWindow *parent) : wxScrolledWindow(parent) { } | |
79 | ||
80 | void OnPaint(wxPaintEvent& event); | |
81 | ||
82 | DECLARE_EVENT_TABLE() | |
457814b5 JS |
83 | }; |
84 | ||
85 | ||
86 | // Menu IDs | |
a294c6d5 VZ |
87 | enum |
88 | { | |
89 | DIALOGS_CHOOSE_COLOUR = 1, | |
90 | DIALOGS_CHOOSE_COLOUR_GENERIC, | |
91 | DIALOGS_CHOOSE_FONT, | |
92 | DIALOGS_CHOOSE_FONT_GENERIC, | |
93 | DIALOGS_MESSAGE_BOX, | |
94 | DIALOGS_SINGLE_CHOICE, | |
95 | DIALOGS_TEXT_ENTRY, | |
96 | DIALOGS_PASSWORD_ENTRY, | |
97 | DIALOGS_FILE_OPEN, | |
98 | DIALOGS_FILES_OPEN, | |
99 | DIALOGS_FILE_SAVE, | |
100 | DIALOGS_DIR_CHOOSE, | |
101 | DIALOGS_TIP, | |
102 | DIALOGS_NUM_ENTRY, | |
4c45f240 VZ |
103 | DIALOGS_LOG_DIALOG, |
104 | DIALOGS_MODELESS, | |
abceee76 VZ |
105 | DIALOGS_MODELESS_BTN, |
106 | DIALOGS_PROGRESS | |
a294c6d5 | 107 | }; |
457814b5 JS |
108 | |
109 | #endif | |
110 |