]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/cmndlgs.i
GTK version of the SWIG-generated files
[wxWidgets.git] / utils / wxPython / src / cmndlgs.i
CommitLineData
7bf85405
RD
1/////////////////////////////////////////////////////////////////////////////
2// Name: cmndlgs.i
3// Purpose: SWIG definitions for the Common Dialog Classes
4//
5// Author: Robin Dunn
6//
7// Created: 7/25/98
8// RCS-ID: $Id$
9// Copyright: (c) 1998 by Total Control Software
10// Licence: wxWindows license
11/////////////////////////////////////////////////////////////////////////////
12
03e9bead 13%module cmndlgs
7bf85405 14
03e9bead 15%{
7bf85405
RD
16#include "helpers.h"
17#include <wx/colordlg.h>
18#include <wx/dirdlg.h>
19#include <wx/fontdlg.h>
20#include <wx/printdlg.h>
21%}
22
23//----------------------------------------------------------------------
24
25%include typemaps.i
26%include my_typemaps.i
27
28// Import some definitions of other classes, etc.
29%import _defs.i
30%import misc.i
31%import gdi.i
32%import windows.i
33
34
35//----------------------------------------------------------------------
36
37class wxColourData {
38public:
39 wxColourData();
40 ~wxColourData();
41
42 bool GetChooseFull();
43 wxColour& GetColour();
fb5e0af0 44 wxColour GetCustomColour(int i);
7bf85405
RD
45 void SetChooseFull(int flag);
46 void SetColour(const wxColour& colour);
47 void SetCustomColour(int i, const wxColour& colour);
48};
49
50
51class wxColourDialog : public wxDialog {
52public:
53 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
54
fb5e0af0 55#ifdef __WXMSW__
7bf85405 56 wxColourData& GetColourData();
fb5e0af0
RD
57#else
58 wxColourData GetColourData();
59#endif
7bf85405
RD
60 int ShowModal();
61};
62
63
64//----------------------------------------------------------------------
65
fb5e0af0 66#ifdef __WXMSW__
7bf85405
RD
67class wxDirDialog : public wxDialog {
68public:
69 wxDirDialog(wxWindow* parent,
70 char* message = "Choose a directory",
71 char* defaultPath = "",
72 long style = 0,
73 const wxPoint& pos = wxPyDefaultPosition);
74
75 wxString GetPath();
76 wxString GetMessage();
77 long GetStyle();
78 void SetMessage(const wxString& message);
79 void SetPath(const wxString& path);
80 int ShowModal();
81};
fb5e0af0 82#endif
7bf85405
RD
83
84//----------------------------------------------------------------------
85
86class wxFileDialog : public wxDialog {
87public:
88 wxFileDialog(wxWindow* parent,
89 char* message = "Choose a file",
90 char* defaultDir = "",
91 char* defaultFile = "",
92 char* wildcard = "*.*",
93 long style = 0,
94 const wxPoint& pos = wxPyDefaultPosition);
95
96 wxString GetDirectory();
97 wxString GetFilename();
98 int GetFilterIndex();
99 wxString GetMessage();
100 wxString GetPath();
101 long GetStyle();
102 wxString GetWildcard();
103 void SetDirectory(const wxString& directory);
104 void SetFilename(const wxString& setfilename);
105 void SetFilterIndex(int filterIndex);
106 void SetMessage(const wxString& message);
107 void SetPath(const wxString& path);
108 void SetStyle(long style);
109 void SetWildcard(const wxString& wildCard);
110 int ShowModal();
111};
112
113
114//----------------------------------------------------------------------
115
116//TODO: wxMultipleChoiceDialog
117
118//----------------------------------------------------------------------
119
120class wxSingleChoiceDialog : public wxDialog {
121public:
122 %addmethods {
123 // TODO: ignoring clientData for now...
124 // SWIG is messing up the &/*'s for some reason.
125 wxSingleChoiceDialog(wxWindow* parent,
126 wxString* message,
127 wxString* caption,
128 int LCOUNT, wxString* LIST,
129 //char** clientData = NULL,
130 long style = wxOK | wxCANCEL | wxCENTRE,
131 wxPoint* pos = &wxPyDefaultPosition) {
132 return new wxSingleChoiceDialog(parent, *message, *caption,
133 LCOUNT, LIST, NULL, style, *pos);
134 }
135 }
136
137 int GetSelection();
138 wxString GetStringSelection();
139 void SetSelection(int sel);
140 int ShowModal();
141};
142
143
144//----------------------------------------------------------------------
145
146class wxTextEntryDialog : public wxDialog {
147public:
148 wxTextEntryDialog(wxWindow* parent,
149 char* message,
150 char* caption = "Input Text",
151 char* defaultValue = "",
152 long style = wxOK | wxCANCEL | wxCENTRE,
153 const wxPoint& pos = wxPyDefaultPosition);
154
155 wxString GetValue();
156 void SetValue(const wxString& value);
157 int ShowModal();
158};
159
160//----------------------------------------------------------------------
161
162class wxFontData {
163public:
164 wxFontData();
165 ~wxFontData();
166
167 void EnableEffects(bool enable);
168 bool GetAllowSymbols();
169 wxColour& GetColour();
170 wxFont GetChosenFont();
171 bool GetEnableEffects();
172 wxFont GetInitialFont();
173 bool GetShowHelp();
174 void SetAllowSymbols(bool allowSymbols);
175 void SetChosenFont(const wxFont& font);
176 void SetColour(const wxColour& colour);
177 void SetInitialFont(const wxFont& font);
178 void SetRange(int min, int max);
179 void SetShowHelp(bool showHelp);
180};
181
182
183class wxFontDialog : public wxDialog {
184public:
185 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
186
187 wxFontData& GetFontData();
188 int ShowModal();
189};
190
191
192//----------------------------------------------------------------------
193
fb5e0af0 194#ifdef __WXMSW__
7bf85405
RD
195class wxPageSetupData {
196public:
197 wxPageSetupData();
198 ~wxPageSetupData();
199
200 void EnableHelp(bool flag);
201 void EnableMargins(bool flag);
202 void EnableOrientation(bool flag);
203 void EnablePaper(bool flag);
204 void EnablePrinter(bool flag);
205 wxPoint GetPaperSize();
206 wxPoint GetMarginTopLeft();
207 wxPoint GetMarginBottomRight();
208 wxPoint GetMinMarginTopLeft();
209 wxPoint GetMinMarginBottomRight();
210 int GetOrientation();
211 bool GetDefaultMinMargins();
212 bool GetEnableMargins();
213 bool GetEnableOrientation();
214 bool GetEnablePaper();
215 bool GetEnablePrinter();
216 bool GetEnableHelp();
217 bool GetDefaultInfo();
218 void SetPaperSize(const wxPoint& size);
219 void SetMarginTopLeft(const wxPoint& pt);
220 void SetMarginBottomRight(const wxPoint& pt);
221 void SetMinMarginTopLeft(const wxPoint& pt);
222 void SetMinMarginBottomRight(const wxPoint& pt);
223 void SetOrientation(int orientation);
224 void SetDefaultMinMargins(bool flag);
225 void SetDefaultInfo(bool flag);
226};
227
228
229class wxPageSetupDialog : public wxDialog {
230public:
231 wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL);
232
233 wxPageSetupData& GetPageSetupData();
234 int ShowModal();
235};
fb5e0af0 236#endif
7bf85405
RD
237
238//----------------------------------------------------------------------
239
fb5e0af0 240#ifdef __WXMSW__
7bf85405
RD
241class wxPrintData {
242public:
243 wxPrintData();
244 ~wxPrintData();
245
246 void EnableHelp(bool flag);
247 void EnablePageNumbers(bool flag);
248 void EnablePrintToFile(bool flag);
249 void EnableSelection(bool flag);
250 bool GetAllPages();
251 bool GetCollate();
252 int GetFromPage();
253 int GetMaxPage();
254 int GetMinPage();
255 int GetNoCopies();
256 int GetOrientation();
257 int GetToPage();
258 void SetCollate(bool flag);
259 void SetFromPage(int page);
260 void SetMaxPage(int page);
261 void SetMinPage(int page);
262 void SetOrientation(int orientation);
263 void SetNoCopies(int n);
264 void SetPrintToFile(bool flag);
265 void SetSetupDialog(bool flag);
266 void SetToPage(int page);
267};
268
269
270class wxPrintDialog : public wxDialog {
271public:
272 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
273
274 wxPrintData& GetPrintData();
275 wxDC* GetPrintDC();
276 int ShowModal();
277};
fb5e0af0 278#endif
7bf85405
RD
279
280//----------------------------------------------------------------------
281
282class wxMessageDialog : public wxDialog {
283public:
284 wxMessageDialog(wxWindow* parent,
285 char* message,
286 char* caption = "Message box",
287 long style = wxOK | wxCANCEL | wxCENTRE,
288 const wxPoint& pos = wxPyDefaultPosition);
289
290 int ShowModal();
291};
292
293//----------------------------------------------------------------------
294
295
296/////////////////////////////////////////////////////////////////////////////
297//
298// $Log$
fb5e0af0
RD
299// Revision 1.3 1998/08/18 19:48:13 RD
300// more wxGTK compatibility things.
301//
302// It builds now but there are serious runtime problems...
303//
03e9bead
RD
304// Revision 1.2 1998/08/15 07:36:25 RD
305// - Moved the header in the .i files out of the code that gets put into
306// the .cpp files. It caused CVS conflicts because of the RCS ID being
307// different each time.
308//
309// - A few minor fixes.
310//
7bf85405
RD
311// Revision 1.1 1998/08/09 08:25:49 RD
312// Initial version
313//
314//
315