]> git.saurik.com Git - wxWidgets.git/blame - samples/dialogs/dialogs.h
added support for readonly cells and 3d border drawing
[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
4c45f240
VZ
25// A modeless dialog
26class MyModelessDialog : public wxDialog
27{
28public:
29 MyModelessDialog(wxWindow *parent);
30};
31
457814b5
JS
32// Define a new frame type
33class MyFrame: public wxFrame
c49245f8
VZ
34{
35public:
36 MyFrame(wxWindow *parent, const wxString& title,
37 const wxPoint& pos, const wxSize& size);
457814b5 38
329e86bf
RR
39 void ChooseColour(wxCommandEvent& event);
40 void ChooseFont(wxCommandEvent& event);
d93c719a 41 void LogDialog(wxCommandEvent& event);
457814b5
JS
42 void MessageBox(wxCommandEvent& event);
43 void SingleChoice(wxCommandEvent& event);
44 void TextEntry(wxCommandEvent& event);
a294c6d5 45 void PasswordEntry(wxCommandEvent& event);
c49245f8 46 void NumericEntry(wxCommandEvent& event);
457814b5 47 void FileOpen(wxCommandEvent& event);
c61f4f6d 48 void FilesOpen(wxCommandEvent& event);
457814b5
JS
49 void FileSave(wxCommandEvent& event);
50 void DirChoose(wxCommandEvent& event);
c50f1fb9 51 void ShowTip(wxCommandEvent& event);
4c45f240 52 void ModelessDlg(wxCommandEvent& event);
457814b5 53
dfad0599 54#if !defined(__WXMSW__) || wxTEST_GENERIC_DIALOGS_IN_MSW
329e86bf
RR
55 void ChooseColourGeneric(wxCommandEvent& event);
56 void ChooseFontGeneric(wxCommandEvent& event);
457814b5 57#endif
c49245f8 58
329e86bf 59 void OnExit(wxCommandEvent& event);
c49245f8 60
4c45f240
VZ
61 void OnButton(wxCommandEvent& event);
62
63private:
64 MyModelessDialog *m_dialog;
65
66 DECLARE_EVENT_TABLE()
457814b5
JS
67};
68
69class MyCanvas: public wxScrolledWindow
70{
c49245f8
VZ
71public:
72 MyCanvas(wxWindow *parent) : wxScrolledWindow(parent) { }
73
74 void OnPaint(wxPaintEvent& event);
75
76 DECLARE_EVENT_TABLE()
457814b5
JS
77};
78
79
80// Menu IDs
a294c6d5
VZ
81enum
82{
83 DIALOGS_CHOOSE_COLOUR = 1,
84 DIALOGS_CHOOSE_COLOUR_GENERIC,
85 DIALOGS_CHOOSE_FONT,
86 DIALOGS_CHOOSE_FONT_GENERIC,
87 DIALOGS_MESSAGE_BOX,
88 DIALOGS_SINGLE_CHOICE,
89 DIALOGS_TEXT_ENTRY,
90 DIALOGS_PASSWORD_ENTRY,
91 DIALOGS_FILE_OPEN,
92 DIALOGS_FILES_OPEN,
93 DIALOGS_FILE_SAVE,
94 DIALOGS_DIR_CHOOSE,
95 DIALOGS_TIP,
96 DIALOGS_NUM_ENTRY,
4c45f240
VZ
97 DIALOGS_LOG_DIALOG,
98 DIALOGS_MODELESS,
99 DIALOGS_MODELESS_BTN
a294c6d5 100};
457814b5
JS
101
102#endif
103