]> git.saurik.com Git - wxWidgets.git/blame - samples/dialogs/dialogs.h
oops... extra #endif removed
[wxWidgets.git] / samples / dialogs / dialogs.h
CommitLineData
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
16class MyApp: public wxApp
c49245f8
VZ
17{
18public:
19 bool OnInit();
457814b5
JS
20
21 wxFont m_canvasFont;
22 wxColour m_canvasTextColour;
23};
24
25// Define a new frame type
26class MyFrame: public wxFrame
c49245f8
VZ
27{
28public:
29 MyFrame(wxWindow *parent, const wxString& title,
30 const wxPoint& pos, const wxSize& size);
457814b5 31
329e86bf
RR
32 void ChooseColour(wxCommandEvent& event);
33 void ChooseFont(wxCommandEvent& event);
457814b5
JS
34 void MessageBox(wxCommandEvent& event);
35 void SingleChoice(wxCommandEvent& event);
36 void TextEntry(wxCommandEvent& event);
c49245f8 37 void NumericEntry(wxCommandEvent& event);
457814b5 38 void FileOpen(wxCommandEvent& event);
c61f4f6d 39 void FilesOpen(wxCommandEvent& event);
457814b5
JS
40 void FileSave(wxCommandEvent& event);
41 void DirChoose(wxCommandEvent& event);
c50f1fb9 42 void ShowTip(wxCommandEvent& event);
457814b5 43
dfad0599 44#if !defined(__WXMSW__) || wxTEST_GENERIC_DIALOGS_IN_MSW
329e86bf
RR
45 void ChooseColourGeneric(wxCommandEvent& event);
46 void ChooseFontGeneric(wxCommandEvent& event);
457814b5 47#endif
c49245f8 48
329e86bf 49 void OnExit(wxCommandEvent& event);
c49245f8 50
329e86bf 51 DECLARE_EVENT_TABLE()
457814b5
JS
52};
53
54class MyCanvas: public wxScrolledWindow
55{
c49245f8
VZ
56public:
57 MyCanvas(wxWindow *parent) : wxScrolledWindow(parent) { }
58
59 void OnPaint(wxPaintEvent& event);
60
61 DECLARE_EVENT_TABLE()
457814b5
JS
62};
63
64
65// Menu IDs
66#define DIALOGS_CHOOSE_COLOUR 1
67#define DIALOGS_CHOOSE_COLOUR_GENERIC 2
68#define DIALOGS_CHOOSE_FONT 3
69#define DIALOGS_CHOOSE_FONT_GENERIC 4
70#define DIALOGS_MESSAGE_BOX 5
71#define DIALOGS_SINGLE_CHOICE 6
72#define DIALOGS_TEXT_ENTRY 7
73#define DIALOGS_FILE_OPEN 8
c61f4f6d
VZ
74#define DIALOGS_FILES_OPEN 9
75#define DIALOGS_FILE_SAVE 10
76#define DIALOGS_DIR_CHOOSE 11
77#define DIALOGS_TIP 12
c49245f8 78#define DIALOGS_NUM_ENTRY 13
457814b5
JS
79
80#endif
81