]> git.saurik.com Git - wxWidgets.git/blame - utils/wxPython/src/cmndlgs.i
minor fixes
[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>
bb0054cd 20#include <wx/progdlg.h>
7bf85405
RD
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
bb0054cd 33%import frames.i
7bf85405 34
b8b8dda7 35%pragma(python) code = "import wx"
7bf85405
RD
36
37//----------------------------------------------------------------------
38
39class wxColourData {
40public:
41 wxColourData();
42 ~wxColourData();
43
44 bool GetChooseFull();
45 wxColour& GetColour();
fb5e0af0 46 wxColour GetCustomColour(int i);
7bf85405
RD
47 void SetChooseFull(int flag);
48 void SetColour(const wxColour& colour);
49 void SetCustomColour(int i, const wxColour& colour);
50};
51
52
53class wxColourDialog : public wxDialog {
54public:
55 wxColourDialog(wxWindow* parent, wxColourData* data = NULL);
56
b8b8dda7 57 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 58
7bf85405
RD
59 wxColourData& GetColourData();
60 int ShowModal();
61};
62
63
64//----------------------------------------------------------------------
65
66class wxDirDialog : public wxDialog {
67public:
68 wxDirDialog(wxWindow* parent,
69 char* message = "Choose a directory",
70 char* defaultPath = "",
71 long style = 0,
72 const wxPoint& pos = wxPyDefaultPosition);
73
b8b8dda7 74 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 75
7bf85405
RD
76 wxString GetPath();
77 wxString GetMessage();
78 long GetStyle();
79 void SetMessage(const wxString& message);
80 void SetPath(const wxString& path);
81 int ShowModal();
82};
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
b8b8dda7 96 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 97
7bf85405
RD
98 wxString GetDirectory();
99 wxString GetFilename();
100 int GetFilterIndex();
101 wxString GetMessage();
102 wxString GetPath();
103 long GetStyle();
104 wxString GetWildcard();
105 void SetDirectory(const wxString& directory);
106 void SetFilename(const wxString& setfilename);
107 void SetFilterIndex(int filterIndex);
108 void SetMessage(const wxString& message);
109 void SetPath(const wxString& path);
110 void SetStyle(long style);
111 void SetWildcard(const wxString& wildCard);
112 int ShowModal();
113};
114
115
116//----------------------------------------------------------------------
117
118//TODO: wxMultipleChoiceDialog
119
120//----------------------------------------------------------------------
121
122class wxSingleChoiceDialog : public wxDialog {
123public:
124 %addmethods {
125 // TODO: ignoring clientData for now...
126 // SWIG is messing up the &/*'s for some reason.
127 wxSingleChoiceDialog(wxWindow* parent,
128 wxString* message,
129 wxString* caption,
130 int LCOUNT, wxString* LIST,
131 //char** clientData = NULL,
132 long style = wxOK | wxCANCEL | wxCENTRE,
133 wxPoint* pos = &wxPyDefaultPosition) {
134 return new wxSingleChoiceDialog(parent, *message, *caption,
135 LCOUNT, LIST, NULL, style, *pos);
136 }
137 }
138
b8b8dda7 139 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 140
7bf85405
RD
141 int GetSelection();
142 wxString GetStringSelection();
143 void SetSelection(int sel);
144 int ShowModal();
145};
146
147
148//----------------------------------------------------------------------
149
150class wxTextEntryDialog : public wxDialog {
151public:
152 wxTextEntryDialog(wxWindow* parent,
153 char* message,
154 char* caption = "Input Text",
155 char* defaultValue = "",
156 long style = wxOK | wxCANCEL | wxCENTRE,
157 const wxPoint& pos = wxPyDefaultPosition);
158
b8b8dda7 159 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 160
7bf85405
RD
161 wxString GetValue();
162 void SetValue(const wxString& value);
163 int ShowModal();
164};
165
166//----------------------------------------------------------------------
167
168class wxFontData {
169public:
170 wxFontData();
171 ~wxFontData();
172
173 void EnableEffects(bool enable);
174 bool GetAllowSymbols();
175 wxColour& GetColour();
176 wxFont GetChosenFont();
177 bool GetEnableEffects();
178 wxFont GetInitialFont();
179 bool GetShowHelp();
180 void SetAllowSymbols(bool allowSymbols);
181 void SetChosenFont(const wxFont& font);
182 void SetColour(const wxColour& colour);
183 void SetInitialFont(const wxFont& font);
184 void SetRange(int min, int max);
185 void SetShowHelp(bool showHelp);
186};
187
188
189class wxFontDialog : public wxDialog {
190public:
191 wxFontDialog(wxWindow* parent, wxFontData* data = NULL);
192
b8b8dda7 193 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 194
7bf85405
RD
195 wxFontData& GetFontData();
196 int ShowModal();
197};
198
199
7bf85405
RD
200//----------------------------------------------------------------------
201
202class wxMessageDialog : public wxDialog {
203public:
204 wxMessageDialog(wxWindow* parent,
205 char* message,
206 char* caption = "Message box",
207 long style = wxOK | wxCANCEL | wxCENTRE,
208 const wxPoint& pos = wxPyDefaultPosition);
209
b8b8dda7 210 %pragma(python) addtomethod = "__init__:wx._StdDialogCallbacks(self)"
9c039d08 211
7bf85405
RD
212 int ShowModal();
213};
214
215//----------------------------------------------------------------------
216
bb0054cd
RD
217class wxProgressDialog : public wxFrame {
218public:
219 wxProgressDialog(const wxString& title,
220 const wxString& message,
221 int maximum = 100,
222 wxWindow* parent = NULL,
223 int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL );
7bf85405 224
7bf85405 225
bb0054cd
RD
226 bool Update(int value = -1, const char* newmsg = NULL);
227 void Resume();
228}
229
230//----------------------------------------------------------------------