1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: SWIG interface for the "Common Dialog" classes
7 // Created: 25-July-1998
9 // Copyright: (c) 2003 by Total Control Software
10 // Licence: wxWindows license
11 /////////////////////////////////////////////////////////////////////////////
16 //---------------------------------------------------------------------------
19 MAKE_CONST_WXSTRING(FileSelectorPromptStr);
20 MAKE_CONST_WXSTRING(DirSelectorPromptStr);
21 MAKE_CONST_WXSTRING(DirDialogNameStr);
22 MAKE_CONST_WXSTRING(FileSelectorDefaultWildcardStr);
23 MAKE_CONST_WXSTRING(GetTextFromUserPromptStr);
24 MAKE_CONST_WXSTRING(MessageBoxCaptionStr);
26 //---------------------------------------------------------------------------
30 "This class holds a variety of information related to the colour
31 chooser dialog, used to transfer settings and results to and from the
32 `wx.ColourDialog`.", "");
34 class wxColourData : public wxObject {
38 "Constructor, sets default values.", "");
44 bool , GetChooseFull(),
45 "Under Windows, determines whether the Windows colour dialog will
46 display the full dialog with custom colour selection controls. Has no
47 meaning under other platforms. The default value is true.", "");
50 wxColour , GetColour(),
51 "Gets the colour (pre)selected by the dialog.", "");
54 wxColour , GetCustomColour(int i),
55 "Gets the i'th custom colour associated with the colour dialog. i
56 should be an integer between 0 and 15. The default custom colours are
57 all invalid colours.", "");
60 void , SetChooseFull(int flag),
61 "Under Windows, tells the Windows colour dialog to display the full
62 dialog with custom colour selection controls. Under other platforms,
63 has no effect. The default value is true.", "");
66 void , SetColour(const wxColour& colour),
67 "Sets the default colour for the colour dialog. The default colour is
71 void , SetCustomColour(int i, const wxColour& colour),
72 "Sets the i'th custom colour for the colour dialog. i should be an
73 integer between 0 and 15. The default custom colours are all invalid colours.", "");
80 DocStr(wxColourDialog,
81 "This class represents the colour chooser dialog.", "");
83 MustHaveApp(wxColourDialog);
85 class wxColourDialog : public wxDialog {
87 %pythonAppend wxColourDialog "self._setOORInfo(self)"
90 wxColourDialog(wxWindow* parent, wxColourData* data = NULL),
91 "Constructor. Pass a parent window, and optionally a `wx.ColourData`,
92 which will be copied to the colour dialog's internal ColourData
96 wxColourData& , GetColourData(),
97 "Returns a reference to the `wx.ColourData` used by the dialog.", "");
101 wxColour wxGetColourFromUser(wxWindow *parent = (wxWindow *)NULL,
102 const wxColour& colInit = wxNullColour,
103 const wxString& caption = wxPyEmptyString);
106 //--------------------------------------------------------------------------------
115 "wx.DirDialog allows the user to select a directory by browising the
120 ==================== ==========================================
121 wx.DD_DEFAULT_STYLE Equivalent to a combination of
122 wx.DEFAULT_DIALOG_STYLE, wx.DD_NEW_DIR_BUTTON
123 and wx.RESIZE_BORDER.
125 wx.DD_NEW_DIR_BUTTON Add 'Create new directory' button and allow
126 directory names to be editable. On Windows
127 the new directory button is only available
128 with recent versions of the common dialogs.
130 wx.DD_CHANGE_DIR Change the current working directory to the
131 directory chosen by the user.
132 ==================== ==========================================
135 MustHaveApp(wxDirDialog);
137 class wxDirDialog : public wxDialog {
139 %pythonAppend wxDirDialog "self._setOORInfo(self)"
140 %pythonAppend wxDirDialog() ""
143 wxDirDialog(wxWindow* parent,
144 const wxString& message = wxPyDirSelectorPromptStr,
145 const wxString& defaultPath = wxPyEmptyString,
146 long style = wxDD_DEFAULT_STYLE,
147 const wxPoint& pos = wxDefaultPosition,
148 const wxSize& size = wxDefaultSize,
149 const wxString& name = wxPyDirDialogNameStr),
150 "Constructor. Use ShowModal method to show the dialog.", "");
152 // %RenameCtor(PreDirDialog, wxDirDialog());
154 // bool Create(wxWindow *parent,
155 // const wxString& title = wxDirSelectorPromptStr,
156 // const wxString& defaultPath = wxEmptyString,
157 // long style = wxDD_DEFAULT_STYLE,
158 // const wxPoint& pos = wxDefaultPosition,
159 // const wxSize& sz = wxDefaultSize,
160 // const wxString& name = wxPyDirDialogNameStr);
163 wxString , GetPath(),
164 "Returns the default or user-selected path.", "");
167 wxString , GetMessage(),
168 "Returns the message that will be displayed on the dialog.", "");
171 void , SetMessage(const wxString& message),
172 "Sets the message that will be displayed on the dialog.", "");
175 void , SetPath(const wxString& path),
176 "Sets the default path.", "");
181 //---------------------------------------------------------------------------
184 // These will dissappear in 2.8
194 wxFD_OVERWRITE_PROMPT,
195 wxFD_FILE_MUST_EXIST,
202 "wx.FileDialog allows the user to select one or more files from the
205 In Windows, this is the common file selector dialog. On X based
206 platforms a generic alternative is used. The path and filename are
207 distinct elements of a full file pathname. If path is \"\", the
208 current directory will be used. If filename is \"\", no default
209 filename will be supplied. The wildcard determines what files are
210 displayed in the file selector, and file extension supplies a type
211 extension for the required filename.
213 Both the X and Windows versions implement a wildcard filter. Typing a
214 filename containing wildcards (\*, ?) in the filename text item, and
215 clicking on Ok, will result in only those files matching the pattern
216 being displayed. The wildcard may be a specification for multiple
217 types of file with a description for each, such as::
219 \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"
224 ====================== ==========================================
225 wx.FD_OPEN This is an open dialog.
227 wx.FD_SAVE This is a save dialog.
229 wx.FD_OVERWRITE_PROMPT For save dialog only: prompt for a confirmation
230 if a file will be overwritten.
232 wx.FD_MULTIPLE For open dialog only: allows selecting multiple
235 wx.FD_CHANGE_DIR Change the current working directory to the
236 directory where the file(s) chosen by the user
238 ====================== ==========================================
243 MustHaveApp(wxFileDialog);
245 class wxFileDialog : public wxDialog {
247 %pythonAppend wxFileDialog "self._setOORInfo(self)"
250 wxFileDialog(wxWindow* parent,
251 const wxString& message = wxPyFileSelectorPromptStr,
252 const wxString& defaultDir = wxPyEmptyString,
253 const wxString& defaultFile = wxPyEmptyString,
254 const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
255 long style = wxFD_DEFAULT_STYLE,
256 const wxPoint& pos = wxDefaultPosition),
257 "Constructor. Use ShowModal method to show the dialog.", "");
261 void , SetMessage(const wxString& message),
262 "Sets the message that will be displayed on the dialog.", "");
265 void , SetPath(const wxString& path),
266 "Sets the path (the combined directory and filename that will be
267 returned when the dialog is dismissed).", "");
270 void , SetDirectory(const wxString& dir),
271 "Sets the default directory.", "");
274 void , SetFilename(const wxString& name),
275 "Sets the default filename.", "");
278 void , SetWildcard(const wxString& wildCard),
279 "Sets the wildcard, which can contain multiple file types, for
282 \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"
286 void , SetFilterIndex(int filterIndex),
287 "Sets the default filter index, starting from zero.", "");
290 wxString , GetMessage() const,
291 "Returns the message that will be displayed on the dialog.", "");
294 wxString , GetPath() const,
295 "Returns the full path (directory and filename) of the selected file.", "");
298 wxString , GetDirectory() const,
299 "Returns the default directory.", "");
302 wxString , GetFilename() const,
303 "Returns the default filename.", "");
306 wxString , GetWildcard() const,
307 "Returns the file dialog wildcard.", "");
310 int , GetFilterIndex() const,
311 "Returns the index into the list of filters supplied, optionally, in
312 the wildcard parameter. Before the dialog is shown, this is the index
313 which will be used when the dialog is first displayed. After the
314 dialog is shown, this is the index selected by the user.", "");
319 "Returns a list of filenames chosen in the dialog. This function
320 should only be used with the dialogs which have wx.MULTIPLE style, use
321 GetFilename for the others.", "");
322 PyObject* GetFilenames() {
324 self->GetFilenames(arr);
325 return wxArrayString2PyList_helper(arr);
329 "Fills the array paths with the full paths of the files chosen. This
330 function should only be used with the dialogs which have wx.MULTIPLE
331 style, use GetPath for the others.", "");
333 PyObject* GetPaths() {
336 return wxArrayString2PyList_helper(arr);
341 // // Utility functions
343 // // Parses the wildCard, returning the number of filters.
344 // // Returns 0 if none or if there's a problem,
345 // // The arrays will contain an equal number of items found before the error.
346 // // wildCard is in the form:
347 // // "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
348 // static int ParseWildcard(const wxString& wildCard,
349 // wxArrayString& descriptions,
350 // wxArrayString& filters);
352 // // Append first extension to filePath from a ';' separated extensionList
353 // // if filePath = "path/foo.bar" just return it as is
354 // // if filePath = "foo[.]" and extensionList = "*.jpg;*.png" return "foo.jpg"
355 // // if the extension is "*.j?g" (has wildcards) or "jpg" then return filePath
356 // static wxString AppendExtension(const wxString &filePath,
357 // const wxString &extensionList);
363 //---------------------------------------------------------------------------
365 enum { wxCHOICEDLG_STYLE };
368 DocStr(wxMultiChoiceDialog,
369 "A simple dialog with a multi selection listbox.", "");
371 MustHaveApp(wxMultiChoiceDialog);
373 class wxMultiChoiceDialog : public wxDialog
376 %pythonAppend wxMultiChoiceDialog "self._setOORInfo(self)"
379 wxMultiChoiceDialog(wxWindow *parent,
380 const wxString& message,
381 const wxString& caption,
382 int choices=0, wxString* choices_array=NULL,
383 long style = wxCHOICEDLG_STYLE,
384 const wxPoint& pos = wxDefaultPosition),
385 "__init__(self, Window parent, String message, String caption,
386 List choices=EmptyList, long style=CHOICEDLG_STYLE,
387 Point pos=DefaultPosition) -> MultiChoiceDialog",
388 "Constructor. Use the `ShowModal` method to show the dialog.
390 :param parent: The parent window.
391 :param message: Text to display above the list of selections.
392 :param caption: Text to use in the title bar of the dialog.
393 :param choices: A list of strings or unicode objects that the
394 user is allowed to choose from.
395 :param style: Styles to apply to the dialog. The default value is
396 equivallent to wx.DEFAULT_DIALOG_STYLE|wx.RESIZE_BORDER|wx.OK|wx.CANCEL|wx.CENTER.
397 :param pos: Where to position the dialog (not used on Windows)
403 void, SetSelections(const wxArrayInt& selections),
404 "SetSelections(List selections)",
405 "Specify the items in the list that should be selected, using a list of
406 integers. The list should specify the indexes of the items that
407 should be selected.", "");
409 DocAStr(GetSelections,
410 "GetSelections() -> [selections]",
411 "Returns a list of integers representing the items that are selected.
412 If an item is selected then its index will appear in the list.", "");
414 PyObject* GetSelections() {
415 return wxArrayInt2PyList_helper(self->GetSelections());
421 //---------------------------------------------------------------------------
423 DocStr(wxSingleChoiceDialog,
424 "A simple dialog with a single selection listbox.", "");
426 MustHaveApp(wxSingleChoiceDialog);
428 class wxSingleChoiceDialog : public wxDialog {
430 %pythonAppend wxSingleChoiceDialog "self._setOORInfo(self)"
432 DocAStr(wxSingleChoiceDialog,
433 "__init__(Window parent, String message, String caption,
434 List choices=EmptyList, long style=CHOICEDLG_STYLE,
435 Point pos=DefaultPosition) -> SingleChoiceDialog",
436 "Constructor. Use ShowModal method to show the dialog.", "");
439 // TODO: ignoring clientData for now... FIX THIS
440 // SWIG is messing up the &/*'s for some reason.
441 wxSingleChoiceDialog(wxWindow* parent,
442 const wxString& message,
443 const wxString& caption,
444 int choices, wxString* choices_array,
445 //char** clientData = NULL,
446 long style = wxCHOICEDLG_STYLE,
447 const wxPoint& pos = wxDefaultPosition) {
448 return new wxSingleChoiceDialog(parent, message, caption,
449 choices, choices_array, NULL, style, pos);
454 int , GetSelection(),
455 "Get the index of teh currently selected item.", "");
458 wxString , GetStringSelection(),
459 "Returns the string value of the currently selected item", "");
462 void , SetSelection(int sel),
463 "Set the current selected item to sel", "");
467 //---------------------------------------------------------------------------
469 DocStr(wxTextEntryDialog,
470 "A dialog with text control, [ok] and [cancel] buttons", "");
472 MustHaveApp(wxTextEntryDialog);
474 enum { wxTextEntryDialogStyle };
476 class wxTextEntryDialog : public wxDialog {
478 %pythonAppend wxTextEntryDialog "self._setOORInfo(self)"
481 wxTextEntryDialog(wxWindow* parent,
482 const wxString& message,
483 const wxString& caption = wxPyGetTextFromUserPromptStr,
484 const wxString& defaultValue = wxPyEmptyString,
485 long style = wxTextEntryDialogStyle,
486 const wxPoint& pos = wxDefaultPosition),
487 "Constructor. Use ShowModal method to show the dialog.", "");
490 wxString , GetValue(),
491 "Returns the text that the user has entered if the user has pressed OK,
492 or the original value if the user has pressed Cancel.", "");
495 void , SetValue(const wxString& value),
496 "Sets the default text value.", "");
499 //---------------------------------------------------------------------------
501 MAKE_CONST_WXSTRING(GetPasswordFromUserPromptStr);
503 class wxPasswordEntryDialog : public wxTextEntryDialog
506 wxPasswordEntryDialog(wxWindow *parent,
507 const wxString& message,
508 const wxString& caption = wxPyGetPasswordFromUserPromptStr,
509 const wxString& value = wxPyEmptyString,
510 long style = wxTextEntryDialogStyle,
511 const wxPoint& pos = wxDefaultPosition);
514 //---------------------------------------------------------------------------
518 "This class holds a variety of information related to font dialogs and
519 is used to transfer settings to and results from a `wx.FontDialog`.", "");
522 class wxFontData : public wxObject {
528 void , EnableEffects(bool enable),
529 "Enables or disables 'effects' under MS Windows only. This refers to
530 the controls for manipulating colour, strikeout and underline
531 properties. The default value is true.", "");
534 bool , GetAllowSymbols(),
535 "Under MS Windows, returns a flag determining whether symbol fonts can
536 be selected. Has no effect on other platforms. The default value is
540 wxColour , GetColour(),
541 "Gets the colour associated with the font dialog. The default value is
545 wxFont , GetChosenFont(),
546 "Gets the font chosen by the user.", "");
549 bool , GetEnableEffects(),
550 "Determines whether 'effects' are enabled under Windows.", "");
553 wxFont , GetInitialFont(),
554 "Gets the font that will be initially used by the font dialog. This
555 should have previously been set by the application.", "");
558 bool , GetShowHelp(),
559 "Returns true if the Help button will be shown (Windows only). The
560 default value is false.", "");
563 void , SetAllowSymbols(bool allowSymbols),
564 "Under MS Windows, determines whether symbol fonts can be selected. Has
565 no effect on other platforms. The default value is true.", "");
568 void , SetChosenFont(const wxFont& font),
569 "Sets the font that will be returned to the user (normally for internal
573 void , SetColour(const wxColour& colour),
574 "Sets the colour that will be used for the font foreground colour. The
575 default colour is black.", "");
578 void , SetInitialFont(const wxFont& font),
579 "Sets the font that will be initially used by the font dialog.", "");
582 void , SetRange(int min, int max),
583 "Sets the valid range for the font point size (Windows only). The
584 default is 0, 0 (unrestricted range).", "");
587 void , SetShowHelp(bool showHelp),
588 "Determines whether the Help button will be displayed in the font
589 dialog (Windows only). The default value is false.", "");
596 "wx.FontDialog allows the user to select a system font and its attributes.
601 MustHaveApp(wxFontDialog);
603 class wxFontDialog : public wxDialog {
605 %pythonAppend wxFontDialog "self._setOORInfo(self)"
608 "Constructor. Pass a parent window and the `wx.FontData` object to be
609 used to initialize the dialog controls. Call `ShowModal` to display
610 the dialog. If ShowModal returns ``wx.ID_OK`` then you can fetch the
611 results with via the `wx.FontData` returned by `GetFontData`.", "");
612 wxFontDialog(wxWindow* parent, const wxFontData& data);
616 wxFontData& , GetFontData(),
617 "Returns a reference to the internal `wx.FontData` used by the
618 wx.FontDialog.", "");
622 wxFont wxGetFontFromUser(wxWindow *parent = NULL,
623 const wxFont& fontInit = wxNullFont,
624 const wxString& caption = wxPyEmptyString);
627 //---------------------------------------------------------------------------
630 DocStr(wxMessageDialog,
631 "This class provides a simple dialog that shows a single or multi-line
632 message, with a choice of OK, Yes, No and/or Cancel buttons.", "
636 =================== =============================================
637 wx.OK Show an OK button.
638 wx.CANCEL Show a Cancel button.
639 wx.YES_NO Show Yes and No buttons.
640 wx.YES_DEFAULT Used with wxYES_NO, makes Yes button the
641 default - which is the default behaviour.
642 wx.NO_DEFAULT Used with wxYES_NO, makes No button the default.
643 wx.ICON_EXCLAMATION Shows an exclamation mark icon.
644 wx.ICON_HAND Shows an error icon.
645 wx.ICON_ERROR Shows an error icon - the same as wxICON_HAND.
646 wx.ICON_QUESTION Shows a question mark icon.
647 wx.ICON_INFORMATION Shows an information (i) icon.
648 wx.STAY_ON_TOP The message box stays on top of all other
649 window, even those of the other applications
651 =================== =============================================
655 MustHaveApp(wxMessageDialog);
657 class wxMessageDialog : public wxDialog {
659 %pythonAppend wxMessageDialog "self._setOORInfo(self)"
662 wxMessageDialog(wxWindow* parent,
663 const wxString& message,
664 const wxString& caption = wxPyMessageBoxCaptionStr,
665 long style = wxOK | wxCANCEL | wxCENTRE,
666 const wxPoint& pos = wxDefaultPosition),
667 "Constructor, use `ShowModal` to display the dialog.", "");
671 //---------------------------------------------------------------------------
674 DocStr(wxProgressDialog,
675 "A dialog that shows a short message and a progress bar. Optionally, it
676 can display an ABORT button.", "
680 ==================== =============================================
681 wx.PD_APP_MODAL Make the progress dialog modal. If this flag is
682 not given, it is only \"locally\" modal -
683 that is the input to the parent window is
684 disabled, but not to the other ones.
686 wx.PD_AUTO_HIDE Causes the progress dialog to disappear from
687 screen as soon as the maximum value of the
688 progress meter has been reached.
690 wx.PD_CAN_ABORT This flag tells the dialog that it should have
691 a \"Cancel\" button which the user may press. If
692 this happens, the next call to Update() will
693 return False in the first component of its return
696 wx.PD_CAN_SKIP This flag tells the dialog that it should have a
697 \"Skip\" button which the user may press. If this
698 happens, the next call to Update() will return
699 True in the second component of its return value.
701 wx.PD_ELAPSED_TIME This flag tells the dialog that it should show
702 elapsed time (since creating the dialog).
704 wx.PD_ESTIMATED_TIME This flag tells the dialog that it should show
707 wx.PD_REMAINING_TIME This flag tells the dialog that it should show
710 wx.PD_SMOOTH Uses the wx.GA_SMOOTH style on the embedded
712 ==================== =============================================
716 // TODO: wxPD_CAN_SKIP
718 MustHaveApp(wxProgressDialog);
720 class wxProgressDialog : public wxFrame {
722 %pythonAppend wxProgressDialog "self._setOORInfo(self)"
725 wxProgressDialog(const wxString& title,
726 const wxString& message,
728 wxWindow* parent = NULL,
729 int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL ),
730 "Constructor. Creates the dialog, displays it and disables user input
731 for other windows, or, if wx.PD_APP_MODAL flag is not given, for its
732 parent window only.", "");
734 // TODO: support getting the skipped value back in the return value, but
735 // only if style is set. This is so the API doesn't change for existing
738 virtual bool , Update(int value, const wxString& newmsg = wxPyEmptyString,
740 "Update(self, int value, String newmsg) --> (continue, skip)",
741 "Updates the dialog, setting the progress bar to the new value and, if
742 given changes the message above it. The value given should be less
743 than or equal to the maximum value given to the constructor and the
744 dialog is closed if it is equal to the maximum. Returns a tuple of
745 boolean values, ``(continue, skip)`` where ``continue`` is ``True``
746 unless the Cancel button has been pressed, and ``skip`` is ``False``
747 unless the Skip button (if any) has been pressed.
749 If the ``continue`` return value is ``false``, the application can either
750 immediately destroy the dialog or ask the user for confirmation, and if the
751 abort is not confirmed the dialog may be resumed with `Resume` function.
756 "Can be used to continue with the dialog, after the user had chosen to
761 //---------------------------------------------------------------------------
763 enum wxFindReplaceFlags
765 // downward search/replace selected (otherwise - upwards)
768 // whole word search/replace selected
771 // case sensitive search/replace selected (otherwise - case insensitive)
776 enum wxFindReplaceDialogStyles
778 // replace dialog (otherwise find dialog)
779 wxFR_REPLACEDIALOG = 1,
781 // don't allow changing the search direction
784 // don't allow case sensitive searching
785 wxFR_NOMATCHCASE = 4,
787 // don't allow whole word searching
793 %constant wxEventType wxEVT_COMMAND_FIND;
794 %constant wxEventType wxEVT_COMMAND_FIND_NEXT;
795 %constant wxEventType wxEVT_COMMAND_FIND_REPLACE;
796 %constant wxEventType wxEVT_COMMAND_FIND_REPLACE_ALL;
797 %constant wxEventType wxEVT_COMMAND_FIND_CLOSE;
801 EVT_FIND = wx.PyEventBinder( wxEVT_COMMAND_FIND, 1 )
802 EVT_FIND_NEXT = wx.PyEventBinder( wxEVT_COMMAND_FIND_NEXT, 1 )
803 EVT_FIND_REPLACE = wx.PyEventBinder( wxEVT_COMMAND_FIND_REPLACE, 1 )
804 EVT_FIND_REPLACE_ALL = wx.PyEventBinder( wxEVT_COMMAND_FIND_REPLACE_ALL, 1 )
805 EVT_FIND_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_FIND_CLOSE, 1 )
807 %# For backwards compatibility. Should they be removed?
808 EVT_COMMAND_FIND = EVT_FIND
809 EVT_COMMAND_FIND_NEXT = EVT_FIND_NEXT
810 EVT_COMMAND_FIND_REPLACE = EVT_FIND_REPLACE
811 EVT_COMMAND_FIND_REPLACE_ALL = EVT_FIND_REPLACE_ALL
812 EVT_COMMAND_FIND_CLOSE = EVT_FIND_CLOSE
816 DocStr(wxFindDialogEvent,
817 "Events for the FindReplaceDialog", "");
819 class wxFindDialogEvent : public wxCommandEvent
822 wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
826 "Get the currently selected flags: this is the combination of
827 wx.FR_DOWN, wx.FR_WHOLEWORD and wx.FR_MATCHCASE flags.", "");
830 const wxString& , GetFindString(),
831 "Return the string to find (never empty).", "");
834 const wxString& , GetReplaceString(),
835 "Return the string to replace the search string with (only for replace
836 and replace all events).", "");
839 wxFindReplaceDialog *, GetDialog(),
840 "Return the pointer to the dialog which generated this event.", "");
843 void , SetFlags(int flags),
847 void , SetFindString(const wxString& str),
851 void , SetReplaceString(const wxString& str),
857 DocStr(wxFindReplaceData,
858 "wx.FindReplaceData holds the data for wx.FindReplaceDialog. It is used
859 to initialize the dialog with the default values and will keep the
860 last values from the dialog when it is closed. It is also updated each
861 time a `wx.FindDialogEvent` is generated so instead of using the
862 `wx.FindDialogEvent` methods you can also directly query this object.
864 Note that all SetXXX() methods may only be called before showing the
865 dialog and calling them has no effect later.", "
869 ================ ===============================================
870 wx.FR_DOWN Downward search/replace selected (otherwise,
873 wx.FR_WHOLEWORD Whole word search/replace selected
875 wx.FR_MATCHCASE Case sensitive search/replace selected
876 (otherwise, case insensitive)
877 ================ ===============================================
883 class wxFindReplaceData : public wxObject
887 wxFindReplaceData(int flags=0),
888 "Constuctor initializes the flags to default value (0).", "");
890 ~wxFindReplaceData();
894 const wxString& , GetFindString(),
895 "Get the string to find.", "");
898 const wxString& , GetReplaceString(),
899 "Get the replacement string.", "");
903 "Get the combination of flag values.", "");
906 void , SetFlags(int flags),
907 "Set the flags to use to initialize the controls of the dialog.", "");
910 void , SetFindString(const wxString& str),
911 "Set the string to find (used as initial value by the dialog).", "");
914 void , SetReplaceString(const wxString& str),
915 "Set the replacement string (used as initial value by the dialog).", "");
922 DocStr(wxFindReplaceDialog,
923 "wx.FindReplaceDialog is a standard modeless dialog which is used to
924 allow the user to search for some text (and possibly replace it with
925 something else). The actual searching is supposed to be done in the
926 owner window which is the parent of this dialog. Note that it means
927 that unlike for the other standard dialogs this one must have a parent
928 window. Also note that there is no way to use this dialog in a modal
929 way; it is always, by design and implementation, modeless.", "
935 ===================== =========================================
936 wx.FR_REPLACEDIALOG replace dialog (otherwise find dialog)
938 wx.FR_NOUPDOWN don't allow changing the search direction
940 wx.FR_NOMATCHCASE don't allow case sensitive searching
942 wx.FR_NOWHOLEWORD don't allow whole word searching
943 ===================== =========================================
946 MustHaveApp(wxFindReplaceDialog);
948 class wxFindReplaceDialog : public wxDialog {
950 %pythonAppend wxFindReplaceDialog "self._setOORInfo(self)"
951 %pythonAppend wxFindReplaceDialog() ""
954 wxFindReplaceDialog(wxWindow *parent,
955 wxFindReplaceData *data,
956 const wxString &title,
958 "Create a FindReplaceDialog. The parent and data parameters must be
959 non-None. Use Show to display the dialog.", "");
962 wxFindReplaceDialog(),
963 "Precreate a FindReplaceDialog for 2-phase creation", "",
964 PreFindReplaceDialog);
968 bool , Create(wxWindow *parent, wxFindReplaceData *data,
969 const wxString &title, int style = 0),
970 "Create the dialog, for 2-phase create.", "");
974 const wxFindReplaceData *, GetData(),
975 "Get the FindReplaceData object used by this dialog.", "");
978 void , SetData(wxFindReplaceData *data),
979 "Set the FindReplaceData object used by this dialog.", "");
983 //---------------------------------------------------------------------------
984 //---------------------------------------------------------------------------