]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/cmndlgs.i
1. log::save works with wxGTK
[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
9c039d08
RD
55 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
56
fb5e0af0 57#ifdef __WXMSW__
7bf85405 58 wxColourData& GetColourData();
fb5e0af0
RD
59#else
60 wxColourData GetColourData();
61#endif
7bf85405
RD
62 int ShowModal();
63};
64
65
66//----------------------------------------------------------------------
67
fb5e0af0 68#ifdef __WXMSW__
7bf85405
RD
69class wxDirDialog : public wxDialog {
70public:
71 wxDirDialog(wxWindow* parent,
72 char* message = "Choose a directory",
73 char* defaultPath = "",
74 long style = 0,
75 const wxPoint& pos = wxPyDefaultPosition);
76
9c039d08
RD
77 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
78
7bf85405
RD
79 wxString GetPath();
80 wxString GetMessage();
81 long GetStyle();
82 void SetMessage(const wxString& message);
83 void SetPath(const wxString& path);
84 int ShowModal();
85};
fb5e0af0 86#endif
7bf85405
RD
87
88//----------------------------------------------------------------------
89
90class wxFileDialog : public wxDialog {
91public:
92 wxFileDialog(wxWindow* parent,
93 char* message = "Choose a file",
94 char* defaultDir = "",
95 char* defaultFile = "",
96 char* wildcard = "*.*",
97 long style = 0,
98 const wxPoint& pos = wxPyDefaultPosition);
99
9c039d08
RD
100 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
101
7bf85405
RD
102 wxString GetDirectory();
103 wxString GetFilename();
104 int GetFilterIndex();
105 wxString GetMessage();
106 wxString GetPath();
107 long GetStyle();
108 wxString GetWildcard();
109 void SetDirectory(const wxString& directory);
110 void SetFilename(const wxString& setfilename);
111 void SetFilterIndex(int filterIndex);
112 void SetMessage(const wxString& message);
113 void SetPath(const wxString& path);
114 void SetStyle(long style);
115 void SetWildcard(const wxString& wildCard);
116 int ShowModal();
117};
118
119
120//----------------------------------------------------------------------
121
122//TODO: wxMultipleChoiceDialog
123
124//----------------------------------------------------------------------
125
126class wxSingleChoiceDialog : public wxDialog {
127public:
128 %addmethods {
129 // TODO: ignoring clientData for now...
130 // SWIG is messing up the &/*'s for some reason.
131 wxSingleChoiceDialog(wxWindow* parent,
132 wxString* message,
133 wxString* caption,
134 int LCOUNT, wxString* LIST,
135 //char** clientData = NULL,
136 long style = wxOK | wxCANCEL | wxCENTRE,
137 wxPoint* pos = &wxPyDefaultPosition) {
138 return new wxSingleChoiceDialog(parent, *message, *caption,
139 LCOUNT, LIST, NULL, style, *pos);
140 }
141 }
142
9c039d08
RD
143 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
144
7bf85405
RD
145 int GetSelection();
146 wxString GetStringSelection();
147 void SetSelection(int sel);
148 int ShowModal();
149};
150
151
152//----------------------------------------------------------------------
153
154class wxTextEntryDialog : public wxDialog {
155public:
156 wxTextEntryDialog(wxWindow* parent,
157 char* message,
158 char* caption = "Input Text",
159 char* defaultValue = "",
160 long style = wxOK | wxCANCEL | wxCENTRE,
161 const wxPoint& pos = wxPyDefaultPosition);
162
9c039d08
RD
163 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
164
7bf85405
RD
165 wxString GetValue();
166 void SetValue(const wxString& value);
167 int ShowModal();
168};
169
170//----------------------------------------------------------------------
171
172class wxFontData {
173public:
174 wxFontData();
175 ~wxFontData();
176
177 void EnableEffects(bool enable);
178 bool GetAllowSymbols();
179 wxColour& GetColour();
180 wxFont GetChosenFont();
181 bool GetEnableEffects();
182 wxFont GetInitialFont();
183 bool GetShowHelp();
184 void SetAllowSymbols(bool allowSymbols);
185 void SetChosenFont(const wxFont& font);
186 void SetColour(const wxColour& colour);
187 void SetInitialFont(const wxFont& font);
188 void SetRange(int min, int max);
189 void SetShowHelp(bool showHelp);
190};
191
192
193class wxFontDialog : public wxDialog {
194public:
195 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
196
9c039d08
RD
197 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
198
7bf85405
RD
199 wxFontData& GetFontData();
200 int ShowModal();
201};
202
203
204//----------------------------------------------------------------------
205
206class wxPageSetupData {
207public:
208 wxPageSetupData();
209 ~wxPageSetupData();
210
211 void EnableHelp(bool flag);
212 void EnableMargins(bool flag);
213 void EnableOrientation(bool flag);
214 void EnablePaper(bool flag);
215 void EnablePrinter(bool flag);
216 wxPoint GetPaperSize();
217 wxPoint GetMarginTopLeft();
218 wxPoint GetMarginBottomRight();
219 wxPoint GetMinMarginTopLeft();
220 wxPoint GetMinMarginBottomRight();
221 int GetOrientation();
222 bool GetDefaultMinMargins();
223 bool GetEnableMargins();
224 bool GetEnableOrientation();
225 bool GetEnablePaper();
226 bool GetEnablePrinter();
227 bool GetEnableHelp();
228 bool GetDefaultInfo();
229 void SetPaperSize(const wxPoint& size);
230 void SetMarginTopLeft(const wxPoint& pt);
231 void SetMarginBottomRight(const wxPoint& pt);
232 void SetMinMarginTopLeft(const wxPoint& pt);
233 void SetMinMarginBottomRight(const wxPoint& pt);
234 void SetOrientation(int orientation);
235 void SetDefaultMinMargins(bool flag);
236 void SetDefaultInfo(bool flag);
237};
238
239
240class wxPageSetupDialog : public wxDialog {
241public:
242 wxPageSetupDialog(wxWindow* parent, wxPageSetupData* data = NULL);
243
9c039d08
RD
244 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
245
7bf85405
RD
246 wxPageSetupData& GetPageSetupData();
247 int ShowModal();
248};
249
250//----------------------------------------------------------------------
251
252class wxPrintData {
253public:
254 wxPrintData();
255 ~wxPrintData();
256
257 void EnableHelp(bool flag);
258 void EnablePageNumbers(bool flag);
259 void EnablePrintToFile(bool flag);
260 void EnableSelection(bool flag);
261 bool GetAllPages();
262 bool GetCollate();
263 int GetFromPage();
264 int GetMaxPage();
265 int GetMinPage();
266 int GetNoCopies();
267 int GetOrientation();
268 int GetToPage();
269 void SetCollate(bool flag);
270 void SetFromPage(int page);
271 void SetMaxPage(int page);
272 void SetMinPage(int page);
273 void SetOrientation(int orientation);
274 void SetNoCopies(int n);
275 void SetPrintToFile(bool flag);
276 void SetSetupDialog(bool flag);
277 void SetToPage(int page);
278};
279
280
281class wxPrintDialog : public wxDialog {
282public:
283 wxPrintDialog(wxWindow* parent, wxPrintData* data = NULL);
284
9c039d08
RD
285 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
286
7bf85405 287 wxPrintData& GetPrintData();
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
9c039d08
RD
302 %pragma(python) addtomethod = "__init__:wxp._StdDialogCallbacks(self)"
303
7bf85405
RD
304 int ShowModal();
305};
306
307//----------------------------------------------------------------------
308
309
310/////////////////////////////////////////////////////////////////////////////
311//
312// $Log$
b639c3c5
RD
313// Revision 1.6 1998/11/25 08:45:22 RD
314// Added wxPalette, wxRegion, wxRegionIterator, wxTaskbarIcon
315// Added events for wxGrid
316// Other various fixes and additions
317//
faf3cb35
RD
318// Revision 1.5 1998/11/15 23:03:43 RD
319// Removing some ifdef's for wxGTK
320//
9c039d08 321// Revision 1.4 1998/10/02 06:40:34 RD
faf3cb35 322//
9c039d08
RD
323// Version 0.4 of wxPython for MSW.
324//
fb5e0af0
RD
325// Revision 1.3 1998/08/18 19:48:13 RD
326// more wxGTK compatibility things.
327//
328// It builds now but there are serious runtime problems...
329//
03e9bead
RD
330// Revision 1.2 1998/08/15 07:36:25 RD
331// - Moved the header in the .i files out of the code that gets put into
332// the .cpp files. It caused CVS conflicts because of the RCS ID being
333// different each time.
334//
335// - A few minor fixes.
336//
7bf85405
RD
337// Revision 1.1 1998/08/09 08:25:49 RD
338// Initial version
339//
340//
341