]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/cmndlgs.i
jconfig.h uses configures results
[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
b8b8dda7 34%pragma(python) code = "import wx"
7bf85405
RD
35
36//----------------------------------------------------------------------
37
38class wxColourData {
39public:
40 wxColourData();
41 ~wxColourData();
42
43 bool GetChooseFull();
44 wxColour& GetColour();
fb5e0af0 45 wxColour GetCustomColour(int i);
7bf85405
RD
46 void SetChooseFull(int flag);
47 void SetColour(const wxColour& colour);
48 void SetCustomColour(int i, const wxColour& colour);
49};
50
51
52class wxColourDialog : public wxDialog {
53public:
54 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
55
b8b8dda7 56 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 57
7bf85405
RD
58 wxColourData& GetColourData();
59 int ShowModal();
60};
61
62
63//----------------------------------------------------------------------
64
65class wxDirDialog : public wxDialog {
66public:
67 wxDirDialog(wxWindow* parent,
68 char* message = "Choose a directory",
69 char* defaultPath = "",
70 long style = 0,
71 const wxPoint& pos = wxPyDefaultPosition);
72
b8b8dda7 73 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 74
7bf85405
RD
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};
82
83//----------------------------------------------------------------------
84
85class wxFileDialog : public wxDialog {
86public:
87 wxFileDialog(wxWindow* parent,
88 char* message = "Choose a file",
89 char* defaultDir = "",
90 char* defaultFile = "",
91 char* wildcard = "*.*",
92 long style = 0,
93 const wxPoint& pos = wxPyDefaultPosition);
94
b8b8dda7 95 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 96
7bf85405
RD
97 wxString GetDirectory();
98 wxString GetFilename();
99 int GetFilterIndex();
100 wxString GetMessage();
101 wxString GetPath();
102 long GetStyle();
103 wxString GetWildcard();
104 void SetDirectory(const wxString& directory);
105 void SetFilename(const wxString& setfilename);
106 void SetFilterIndex(int filterIndex);
107 void SetMessage(const wxString& message);
108 void SetPath(const wxString& path);
109 void SetStyle(long style);
110 void SetWildcard(const wxString& wildCard);
111 int ShowModal();
112};
113
114
115//----------------------------------------------------------------------
116
117//TODO: wxMultipleChoiceDialog
118
119//----------------------------------------------------------------------
120
121class wxSingleChoiceDialog : public wxDialog {
122public:
123 %addmethods {
124 // TODO: ignoring clientData for now...
125 // SWIG is messing up the &/*'s for some reason.
126 wxSingleChoiceDialog(wxWindow* parent,
127 wxString* message,
128 wxString* caption,
129 int LCOUNT, wxString* LIST,
130 //char** clientData = NULL,
131 long style = wxOK | wxCANCEL | wxCENTRE,
132 wxPoint* pos = &wxPyDefaultPosition) {
133 return new wxSingleChoiceDialog(parent, *message, *caption,
134 LCOUNT, LIST, NULL, style, *pos);
135 }
136 }
137
b8b8dda7 138 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 139
7bf85405
RD
140 int GetSelection();
141 wxString GetStringSelection();
142 void SetSelection(int sel);
143 int ShowModal();
144};
145
146
147//----------------------------------------------------------------------
148
149class wxTextEntryDialog : public wxDialog {
150public:
151 wxTextEntryDialog(wxWindow* parent,
152 char* message,
153 char* caption = "Input Text",
154 char* defaultValue = "",
155 long style = wxOK | wxCANCEL | wxCENTRE,
156 const wxPoint& pos = wxPyDefaultPosition);
157
b8b8dda7 158 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 159
7bf85405
RD
160 wxString GetValue();
161 void SetValue(const wxString& value);
162 int ShowModal();
163};
164
165//----------------------------------------------------------------------
166
167class wxFontData {
168public:
169 wxFontData();
170 ~wxFontData();
171
172 void EnableEffects(bool enable);
173 bool GetAllowSymbols();
174 wxColour& GetColour();
175 wxFont GetChosenFont();
176 bool GetEnableEffects();
177 wxFont GetInitialFont();
178 bool GetShowHelp();
179 void SetAllowSymbols(bool allowSymbols);
180 void SetChosenFont(const wxFont& font);
181 void SetColour(const wxColour& colour);
182 void SetInitialFont(const wxFont& font);
183 void SetRange(int min, int max);
184 void SetShowHelp(bool showHelp);
185};
186
187
188class wxFontDialog : public wxDialog {
189public:
190 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
191
b8b8dda7 192 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 193
7bf85405
RD
194 wxFontData& GetFontData();
195 int ShowModal();
196};
197
198
199//----------------------------------------------------------------------
200
cf694132
RD
201
202class wxPageSetupDialogData {
7bf85405 203public:
cf694132
RD
204 wxPageSetupDialogData();
205 ~wxPageSetupDialogData();
7bf85405
RD
206
207 void EnableHelp(bool flag);
208 void EnableMargins(bool flag);
209 void EnableOrientation(bool flag);
210 void EnablePaper(bool flag);
211 void EnablePrinter(bool flag);
7bf85405
RD
212 bool GetDefaultMinMargins();
213 bool GetEnableMargins();
214 bool GetEnableOrientation();
215 bool GetEnablePaper();
216 bool GetEnablePrinter();
217 bool GetEnableHelp();
218 bool GetDefaultInfo();
cf694132
RD
219 wxPoint GetMarginTopLeft();
220 wxPoint GetMarginBottomRight();
221 wxPoint GetMinMarginTopLeft();
222 wxPoint GetMinMarginBottomRight();
223 wxPaperSize GetPaperId();
224 wxSize GetPaperSize();
225 wxPrintData& GetPrintData();
226 void SetDefaultInfo(bool flag);
227 void SetDefaultMinMargins(bool flag);
7bf85405
RD
228 void SetMarginTopLeft(const wxPoint& pt);
229 void SetMarginBottomRight(const wxPoint& pt);
230 void SetMinMarginTopLeft(const wxPoint& pt);
231 void SetMinMarginBottomRight(const wxPoint& pt);
cf694132
RD
232 void SetPaperId(wxPaperSize& id);
233 void SetPaperSize(const wxSize& size);
234 void SetPrintData(const wxPrintData& printData);
7bf85405
RD
235};
236
237
238class wxPageSetupDialog : public wxDialog {
239public:
cf694132 240 wxPageSetupDialog(wxWindow* parent, wxPageSetupDialogData* data = NULL);
7bf85405 241
b8b8dda7 242 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 243
cf694132 244 wxPageSetupDialogData& GetPageSetupData();
7bf85405
RD
245 int ShowModal();
246};
247
248//----------------------------------------------------------------------
249
cf694132
RD
250
251class wxPrintDialogData {
7bf85405 252public:
cf694132
RD
253 wxPrintDialogData();
254 ~wxPrintDialogData();
7bf85405
RD
255
256 void EnableHelp(bool flag);
257 void EnablePageNumbers(bool flag);
258 void EnablePrintToFile(bool flag);
259 void EnableSelection(bool flag);
260 bool GetAllPages();
261 bool GetCollate();
262 int GetFromPage();
263 int GetMaxPage();
264 int GetMinPage();
265 int GetNoCopies();
cf694132
RD
266 wxPrintData& GetPrintData();
267 bool GetPrintToFile();
7bf85405
RD
268 int GetToPage();
269 void SetCollate(bool flag);
270 void SetFromPage(int page);
271 void SetMaxPage(int page);
272 void SetMinPage(int page);
7bf85405 273 void SetNoCopies(int n);
cf694132 274 void SetPrintData(const wxPrintData& printData);
7bf85405
RD
275 void SetPrintToFile(bool flag);
276 void SetSetupDialog(bool flag);
277 void SetToPage(int page);
278};
279
280
281class wxPrintDialog : public wxDialog {
282public:
cf694132 283 wxPrintDialog(wxWindow* parent, wxPrintDialogData* data = NULL);
7bf85405 284
b8b8dda7 285 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 286
cf694132 287 wxPrintDialogData& GetPrintDialogData();
b639c3c5 288 %new wxDC* GetPrintDC();
7bf85405
RD
289 int ShowModal();
290};
291
292//----------------------------------------------------------------------
293
294class wxMessageDialog : public wxDialog {
295public:
296 wxMessageDialog(wxWindow* parent,
297 char* message,
298 char* caption = "Message box",
299 long style = wxOK | wxCANCEL | wxCENTRE,
300 const wxPoint& pos = wxPyDefaultPosition);
301
b8b8dda7 302 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 303
7bf85405
RD
304 int ShowModal();
305};
306
307//----------------------------------------------------------------------
308
309
310/////////////////////////////////////////////////////////////////////////////
311//
312// $Log$
cf694132
RD
313// Revision 1.9 1999/04/30 03:29:18 RD
314// wxPython 2.0b9, first phase (win32)
315// Added gobs of stuff, see wxPython/README.txt for details
316//
4f22cf8d 317// Revision 1.8 1998/12/17 14:07:25 RR
cf694132 318//
4f22cf8d
RR
319// Removed minor differences between wxMSW and wxGTK
320//
b8b8dda7
RD
321// Revision 1.7 1998/12/15 20:41:14 RD
322// Changed the import semantics from "from wxPython import *" to "from
323// wxPython.wx import *" This is for people who are worried about
324// namespace pollution, they can use "from wxPython import wx" and then
325// prefix all the wxPython identifiers with "wx."
326//
327// Added wxTaskbarIcon for wxMSW.
328//
329// Made the events work for wxGrid.
330//
331// Added wxConfig.
332//
333// Added wxMiniFrame for wxGTK, (untested.)
334//
335// Changed many of the args and return values that were pointers to gdi
336// objects to references to reflect changes in the wxWindows API.
337//
338// Other assorted fixes and additions.
339//
b639c3c5 340// Revision 1.6 1998/11/25 08:45:22 RD
b8b8dda7 341//
b639c3c5
RD
342// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
343// Added events for wxGrid
344// Other various fixes and additions
345//
faf3cb35
RD
346// Revision 1.5 1998/11/15 23:03:43 RD
347// Removing some ifdef's for wxGTK
348//
9c039d08 349// Revision 1.4 1998/10/02 06:40:34 RD
faf3cb35 350//
9c039d08
RD
351// Version 0.4 of wxPython for MSW.
352//
fb5e0af0
RD
353// Revision 1.3 1998/08/18 19:48:13 RD
354// more wxGTK compatibility things.
355//
356// It builds now but there are serious runtime problems...
357//
03e9bead
RD
358// Revision 1.2 1998/08/15 07:36:25 RD
359// - Moved the header in the .i files out of the code that gets put into
360// the .cpp files. It caused CVS conflicts because of the RCS ID being
361// different each time.
362//
363// - A few minor fixes.
364//
7bf85405
RD
365// Revision 1.1 1998/08/09 08:25:49 RD
366// Initial version
367//
368//
369