Added wxExtDialog and sample.
[wxWidgets.git] / samples / dialogs / dialogs.h
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
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __DIALOGSH__
13 #define __DIALOGSH__
14
15 // Define a new application type
16 class MyApp: public wxApp
17 { public:
18 bool OnInit(void);
19
20 wxFont m_canvasFont;
21 wxColour m_canvasTextColour;
22 };
23
24 // Define a new frame type
25 class MyFrame: public wxFrame
26 { public:
27 MyFrame(wxWindow *parent, const wxString& title, const wxPoint& pos,
28 const wxSize& size);
29
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);
38 void ShowTip(wxCommandEvent& event);
39 void ExtDialog(wxCommandEvent &event);
40
41 #if !defined(__WXMSW__) || wxTEST_GENERIC_DIALOGS_IN_MSW
42 void ChooseColourGeneric(wxCommandEvent& event);
43 void ChooseFontGeneric(wxCommandEvent& event);
44 #endif
45 void OnExit(wxCommandEvent& event);
46
47 DECLARE_EVENT_TABLE()
48 };
49
50 class MyCanvas: public wxScrolledWindow
51 {
52 public:
53 MyCanvas(wxWindow *parent):
54 wxScrolledWindow(parent)
55 {
56 }
57 void OnPaint(wxPaintEvent& event);
58 DECLARE_EVENT_TABLE()
59 };
60
61
62 // Menu IDs
63 #define DIALOGS_CHOOSE_COLOUR 1
64 #define DIALOGS_CHOOSE_COLOUR_GENERIC 2
65 #define DIALOGS_CHOOSE_FONT 3
66 #define DIALOGS_CHOOSE_FONT_GENERIC 4
67 #define DIALOGS_MESSAGE_BOX 5
68 #define DIALOGS_SINGLE_CHOICE 6
69 #define DIALOGS_TEXT_ENTRY 7
70 #define DIALOGS_FILE_OPEN 8
71 #define DIALOGS_FILE_SAVE 9
72 #define DIALOGS_DIR_CHOOSE 10
73 #define DIALOGS_TIP 11
74 #define DIALOGS_EXT_DIALOG 12
75
76 #endif
77