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 //--------------------------------------------------------------------------------
 
 105        "wx.DirDialog allows the user to select a directory by browising the
 
 110     ====================  ==========================================
 
 111     wx.DD_NEW_DIR_BUTTON  Add 'Create new directory' button and allow
 
 112                           directory names to be editable. On Windows
 
 113                           the new directory button is only available
 
 114                           with recent versions of the common dialogs.
 
 115     ====================  ==========================================
 
 118 MustHaveApp(wxDirDialog);
 
 120 class wxDirDialog : public wxDialog {
 
 122     %pythonAppend wxDirDialog   "self._setOORInfo(self)"
 
 125         wxDirDialog(wxWindow* parent,
 
 126                     const wxString& message = wxPyDirSelectorPromptStr,
 
 127                     const wxString& defaultPath = wxPyEmptyString,
 
 129                     const wxPoint& pos = wxDefaultPosition,
 
 130                     const wxSize& size = wxDefaultSize,
 
 131                     const wxString& name = wxPyDirDialogNameStr),
 
 132         "Constructor.  Use ShowModal method to show the dialog.", "");
 
 136         wxString , GetPath(),
 
 137         "Returns the default or user-selected path.", "");
 
 140         wxString , GetMessage(),
 
 141         "Returns the message that will be displayed on the dialog.", "");
 
 145         "Returns the dialog style.", "");
 
 148         void , SetMessage(const wxString& message),
 
 149         "Sets the message that will be displayed on the dialog.", "");
 
 152         void , SetPath(const wxString& path),
 
 153         "Sets the default path.", "");
 
 158 //---------------------------------------------------------------------------
 
 161 "wx.FileDialog allows the user to select one or more files from the
 
 164 In Windows, this is the common file selector dialog. On X based
 
 165 platforms a generic alternative is used.  The path and filename are
 
 166 distinct elements of a full file pathname. If path is \"\", the
 
 167 current directory will be used. If filename is \"\", no default
 
 168 filename will be supplied. The wildcard determines what files are
 
 169 displayed in the file selector, and file extension supplies a type
 
 170 extension for the required filename.
 
 172 Both the X and Windows versions implement a wildcard filter. Typing a
 
 173 filename containing wildcards (\*, ?) in the filename text item, and
 
 174 clicking on Ok, will result in only those files matching the pattern
 
 175 being displayed. The wildcard may be a specification for multiple
 
 176 types of file with a description for each, such as::
 
 178    \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"
 
 183     ===================   ==========================================
 
 184     wx.OPEN               This is an open dialog.
 
 186     wx.SAVE               This is a save dialog.
 
 188     wx.HIDE_READONLY      For open dialog only: hide the checkbox
 
 189                           allowing to open the file in read-only mode.
 
 191     wx.OVERWRITE_PROMPT   For save dialog only: prompt for a confirmation
 
 192                           if a file will be overwritten.
 
 194     wx.MULTIPLE           For open dialog only: allows selecting multiple
 
 197     wx.CHANGE_DIR         Change the current working directory to the
 
 198                           directory  where the file(s) chosen by the user
 
 200     ===================   ==========================================
 
 205 MustHaveApp(wxFileDialog);
 
 207 class wxFileDialog : public wxDialog {
 
 209     %pythonAppend wxFileDialog   "self._setOORInfo(self)"
 
 212         wxFileDialog(wxWindow* parent,
 
 213                      const wxString& message = wxPyFileSelectorPromptStr,
 
 214                      const wxString& defaultDir = wxPyEmptyString,
 
 215                      const wxString& defaultFile = wxPyEmptyString,
 
 216                      const wxString& wildcard = wxPyFileSelectorDefaultWildcardStr,
 
 218                      const wxPoint& pos = wxDefaultPosition),
 
 219         "Constructor.  Use ShowModal method to show the dialog.", "");
 
 223         void , SetMessage(const wxString& message),
 
 224         "Sets the message that will be displayed on the dialog.", "");
 
 227         void , SetPath(const wxString& path),
 
 228         "Sets the path (the combined directory and filename that will be
 
 229 returned when the dialog is dismissed).", "");
 
 232         void , SetDirectory(const wxString& dir),
 
 233         "Sets the default directory.", "");
 
 236         void , SetFilename(const wxString& name),
 
 237         "Sets the default filename.", "");
 
 240         void , SetWildcard(const wxString& wildCard),
 
 241         "Sets the wildcard, which can contain multiple file types, for
 
 244     \"BMP files (*.bmp)|*.bmp|GIF files (*.gif)|*.gif\"
 
 248         void , SetStyle(long style),
 
 249         "Sets the dialog style.", "");
 
 252         void , SetFilterIndex(int filterIndex),
 
 253         "Sets the default filter index, starting from zero.", "");
 
 256         wxString , GetMessage() const,
 
 257         "Returns the message that will be displayed on the dialog.", "");
 
 260         wxString , GetPath() const,
 
 261         "Returns the full path (directory and filename) of the selected file.", "");
 
 264         wxString , GetDirectory() const,
 
 265         "Returns the default directory.", "");
 
 268         wxString , GetFilename() const,
 
 269         "Returns the default filename.", "");
 
 272         wxString , GetWildcard() const,
 
 273         "Returns the file dialog wildcard.", "");
 
 276         long , GetStyle() const,
 
 277         "Returns the dialog style.", "");
 
 280         int , GetFilterIndex() const,
 
 281         "Returns the index into the list of filters supplied, optionally, in
 
 282 the wildcard parameter. Before the dialog is shown, this is the index
 
 283 which will be used when the dialog is first displayed. After the
 
 284 dialog is shown, this is the index selected by the user.", "");
 
 288         "Returns a list of filenames chosen in the dialog.  This function
 
 289 should only be used with the dialogs which have wx.MULTIPLE style, use
 
 290 GetFilename for the others.", "");
 
 293         "Fills the array paths with the full paths of the files chosen. This
 
 294 function should only be used with the dialogs which have wx.MULTIPLE
 
 295 style, use GetPath for the others.", "");   
 
 298         PyObject* GetFilenames() {
 
 300             self->GetFilenames(arr);
 
 301             return wxArrayString2PyList_helper(arr);
 
 304         PyObject* GetPaths() {
 
 307             return wxArrayString2PyList_helper(arr);
 
 312 //     // Utility functions
 
 314 //     // Parses the wildCard, returning the number of filters.
 
 315 //     // Returns 0 if none or if there's a problem,
 
 316 //     // The arrays will contain an equal number of items found before the error.
 
 317 //     // wildCard is in the form:
 
 318 //     // "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
 
 319 //     static int ParseWildcard(const wxString& wildCard,
 
 320 //                              wxArrayString& descriptions,
 
 321 //                              wxArrayString& filters);
 
 323 //     // Append first extension to filePath from a ';' separated extensionList
 
 324 //     // if filePath = "path/foo.bar" just return it as is
 
 325 //     // if filePath = "foo[.]" and extensionList = "*.jpg;*.png" return "foo.jpg"
 
 326 //     // if the extension is "*.j?g" (has wildcards) or "jpg" then return filePath
 
 327 //     static wxString AppendExtension(const wxString &filePath,
 
 328 //                                     const wxString &extensionList);
 
 334 //---------------------------------------------------------------------------
 
 336 enum { wxCHOICEDLG_STYLE };
 
 339 DocStr(wxMultiChoiceDialog,
 
 340        "A simple dialog with a multi selection listbox.", "");
 
 342 MustHaveApp(wxMultiChoiceDialog);
 
 344 class wxMultiChoiceDialog : public wxDialog
 
 347     %pythonAppend wxMultiChoiceDialog   "self._setOORInfo(self)"
 
 350         wxMultiChoiceDialog(wxWindow *parent,
 
 351                             const wxString& message,
 
 352                             const wxString& caption,
 
 353                             int choices=0, wxString* choices_array=NULL,
 
 354                             long style = wxCHOICEDLG_STYLE,
 
 355                             const wxPoint& pos = wxDefaultPosition),
 
 356         "__init__(Window parent, String message, String caption,
 
 357     List choices=[], long style=CHOICEDLG_STYLE,
 
 358     Point pos=DefaultPosition) -> MultiChoiceDialog",
 
 359         "Constructor.  Use ShowModal method to show the dialog.", "");
 
 363         void, SetSelections(const wxArrayInt& selections),
 
 364         "SetSelections(List selections)",
 
 365         "Specify the items in the list that should be selected, using a list of
 
 368     DocAStr(GetSelections,
 
 369             "GetSelections() -> [selections]",
 
 370             "Returns a list of integers representing the items that are selected.", "");
 
 372         PyObject* GetSelections() {
 
 373             return wxArrayInt2PyList_helper(self->GetSelections());
 
 379 //---------------------------------------------------------------------------
 
 381 DocStr(wxSingleChoiceDialog,
 
 382        "A simple dialog with a single selection listbox.", "");
 
 384 MustHaveApp(wxSingleChoiceDialog);
 
 386 class wxSingleChoiceDialog : public wxDialog {
 
 388     %pythonAppend wxSingleChoiceDialog   "self._setOORInfo(self)"
 
 390     DocAStr(wxSingleChoiceDialog,
 
 391             "__init__(Window parent, String message, String caption,
 
 392     List choices=[], long style=CHOICEDLG_STYLE,
 
 393     Point pos=DefaultPosition) -> SingleChoiceDialog",
 
 394             "Constructor.  Use ShowModal method to show the dialog.", "");
 
 397         // TODO: ignoring clientData for now...  FIX THIS
 
 398         //       SWIG is messing up the &/*'s for some reason.
 
 399         wxSingleChoiceDialog(wxWindow* parent,
 
 400                              const wxString& message,
 
 401                              const wxString& caption,
 
 402                              int choices, wxString* choices_array,
 
 403                              //char** clientData = NULL,
 
 404                              long style = wxCHOICEDLG_STYLE,
 
 405                              const wxPoint& pos = wxDefaultPosition) {
 
 406             return new wxSingleChoiceDialog(parent, message, caption,
 
 407                                             choices, choices_array, NULL, style, pos);
 
 412         int , GetSelection(),
 
 413         "Get the index of teh currently selected item.", "");
 
 416         wxString , GetStringSelection(),
 
 417         "Returns the string value of the currently selected item", "");
 
 420         void , SetSelection(int sel),
 
 421         "Set the current selected item to sel", "");
 
 425 //---------------------------------------------------------------------------
 
 427 DocStr(wxTextEntryDialog,
 
 428        "A dialog with text control, [ok] and [cancel] buttons", "");
 
 430 MustHaveApp(wxTextEntryDialog);
 
 432 enum { wxTextEntryDialogStyle };
 
 434 class wxTextEntryDialog : public wxDialog {
 
 436     %pythonAppend wxTextEntryDialog   "self._setOORInfo(self)"
 
 439         wxTextEntryDialog(wxWindow* parent,
 
 440                           const wxString& message,
 
 441                           const wxString& caption = wxPyGetTextFromUserPromptStr,
 
 442                           const wxString& defaultValue = wxPyEmptyString,
 
 443                           long style = wxTextEntryDialogStyle,
 
 444                           const wxPoint& pos = wxDefaultPosition),
 
 445         "Constructor.  Use ShowModal method to show the dialog.", "");
 
 448         wxString , GetValue(),
 
 449         "Returns the text that the user has entered if the user has pressed OK,
 
 450 or the original value if the user has pressed Cancel.", "");
 
 453         void , SetValue(const wxString& value),
 
 454         "Sets the default text value.", "");
 
 457 //---------------------------------------------------------------------------
 
 459 MAKE_CONST_WXSTRING(GetPasswordFromUserPromptStr);
 
 461 class wxPasswordEntryDialog : public wxTextEntryDialog
 
 464     wxPasswordEntryDialog(wxWindow *parent,
 
 465                       const wxString& message,
 
 466                       const wxString& caption = wxPyGetPasswordFromUserPromptStr,
 
 467                       const wxString& value = wxPyEmptyString,
 
 468                       long style = wxTextEntryDialogStyle,
 
 469                       const wxPoint& pos = wxDefaultPosition);
 
 472 //---------------------------------------------------------------------------
 
 476        "This class holds a variety of information related to font dialogs and
 
 477 is used to transfer settings to and results from a `wx.FontDialog`.", "");
 
 480 class wxFontData : public wxObject {
 
 486         void , EnableEffects(bool enable),
 
 487         "Enables or disables 'effects' under MS Windows only. This refers to
 
 488 the controls for manipulating colour, strikeout and underline
 
 489 properties.  The default value is true.", "");
 
 492         bool , GetAllowSymbols(),
 
 493         "Under MS Windows, returns a flag determining whether symbol fonts can
 
 494 be selected. Has no effect on other platforms. The default value is
 
 498         wxColour , GetColour(),
 
 499         "Gets the colour associated with the font dialog. The default value is
 
 503         wxFont , GetChosenFont(),
 
 504         "Gets the font chosen by the user.", "");
 
 507         bool , GetEnableEffects(),
 
 508         "Determines whether 'effects' are enabled under Windows.", "");
 
 511         wxFont , GetInitialFont(),
 
 512         "Gets the font that will be initially used by the font dialog. This
 
 513 should have previously been set by the application.", "");
 
 516         bool , GetShowHelp(),
 
 517         "Returns true if the Help button will be shown (Windows only).  The
 
 518 default value is false.", "");
 
 521         void , SetAllowSymbols(bool allowSymbols),
 
 522         "Under MS Windows, determines whether symbol fonts can be selected. Has
 
 523 no effect on other platforms.  The default value is true.", "");
 
 526         void , SetChosenFont(const wxFont& font),
 
 527         "Sets the font that will be returned to the user (normally for internal
 
 531         void , SetColour(const wxColour& colour),
 
 532         "Sets the colour that will be used for the font foreground colour.  The
 
 533 default colour is black.", "");
 
 536         void , SetInitialFont(const wxFont& font),
 
 537         "Sets the font that will be initially used by the font dialog.", "");
 
 540         void , SetRange(int min, int max),
 
 541         "Sets the valid range for the font point size (Windows only).  The
 
 542 default is 0, 0 (unrestricted range).", "");
 
 545         void , SetShowHelp(bool showHelp),
 
 546         "Determines whether the Help button will be displayed in the font
 
 547 dialog (Windows only).  The default value is false.", "");
 
 554        "wx.FontDialog allows the user to select a system font and its attributes.
 
 559 MustHaveApp(wxFontDialog);
 
 561 class wxFontDialog : public wxDialog {
 
 563     %pythonAppend wxFontDialog   "self._setOORInfo(self)"
 
 566            "Constructor. Pass a parent window and the `wx.FontData` object to be
 
 567 used to initialize the dialog controls.  Call `ShowModal` to display
 
 568 the dialog.  If ShowModal returns ``wx.ID_OK`` then you can fetch the
 
 569 results with via the `wx.FontData` returned by `GetFontData`.", "");
 
 570     wxFontDialog(wxWindow* parent, const wxFontData& data);
 
 574         wxFontData& , GetFontData(),
 
 575         "Returns a reference to the internal `wx.FontData` used by the
 
 576 wx.FontDialog.", "");    
 
 580 //---------------------------------------------------------------------------
 
 583 DocStr(wxMessageDialog,
 
 584 "This class provides a simple dialog that shows a single or multi-line
 
 585 message, with a choice of OK, Yes, No and/or Cancel buttons.", "
 
 589     ===================    =============================================
 
 590     wx.OK                  Show an OK button.
 
 591     wx.CANCEL              Show a Cancel button.
 
 592     wx.YES_NO              Show Yes and No buttons.
 
 593     wx.YES_DEFAULT         Used with wxYES_NO, makes Yes button the
 
 594                            default - which is the default behaviour.
 
 595     wx.NO_DEFAULT          Used with wxYES_NO, makes No button the default.
 
 596     wx.ICON_EXCLAMATION    Shows an exclamation mark icon.
 
 597     wx.ICON_HAND           Shows an error icon.
 
 598     wx.ICON_ERROR          Shows an error icon - the same as wxICON_HAND.
 
 599     wx.ICON_QUESTION       Shows a question mark icon.
 
 600     wx.ICON_INFORMATION    Shows an information (i) icon.
 
 601     wx.STAY_ON_TOP         The message box stays on top of all other
 
 602                            window, even those of the other applications
 
 604     ===================    =============================================
 
 608 MustHaveApp(wxMessageDialog);
 
 610 class wxMessageDialog : public wxDialog {
 
 612     %pythonAppend wxMessageDialog   "self._setOORInfo(self)"
 
 615         wxMessageDialog(wxWindow* parent,
 
 616                         const wxString& message,
 
 617                         const wxString& caption = wxPyMessageBoxCaptionStr,
 
 618                         long style = wxOK | wxCANCEL | wxCENTRE,
 
 619                         const wxPoint& pos = wxDefaultPosition),
 
 620         "Constructor, use `ShowModal` to display the dialog.", "");
 
 624 //---------------------------------------------------------------------------
 
 627 DocStr(wxProgressDialog,
 
 628 "A dialog that shows a short message and a progress bar. Optionally, it
 
 629 can display an ABORT button.", "
 
 633     ====================     =============================================
 
 634     wx.PD_APP_MODAL          Make the progress dialog modal. If this flag is
 
 635                              not given, it is only \"locally\" modal -
 
 636                              that is the input to the parent window is
 
 637                              disabled, but not to the other ones.
 
 639     wx.PD_AUTO_HIDE          Causes the progress dialog to disappear from
 
 640                              screen as soon as the maximum value of the
 
 641                              progress meter has been reached.
 
 643     wx.PD_CAN_ABORT          This flag tells the dialog that it should have
 
 644                              a \"Cancel\" button which the user may press. If
 
 645                              this happens, the next call to Update() will
 
 648     wx.PD_ELAPSED_TIME       This flag tells the dialog that it should show
 
 649                              elapsed time (since creating the dialog).
 
 651     wx.PD_ESTIMATED_TIME     This flag tells the dialog that it should show
 
 654     wx.PD_REMAINING_TIME     This flag tells the dialog that it should show
 
 657     wx.PD_SMOOTH             Uses the wx.GA_SMOOTH style on the embedded
 
 659     ====================     =============================================
 
 663 // TODO: wxPD_CAN_SKIP
 
 665 MustHaveApp(wxProgressDialog);
 
 667 class wxProgressDialog : public wxFrame {
 
 669     %pythonAppend wxProgressDialog   "self._setOORInfo(self)"
 
 672         wxProgressDialog(const wxString& title,
 
 673                          const wxString& message,
 
 675                          wxWindow* parent = NULL,
 
 676                          int style = wxPD_AUTO_HIDE | wxPD_APP_MODAL ),
 
 677         "Constructor. Creates the dialog, displays it and disables user input
 
 678 for other windows, or, if wx.PD_APP_MODAL flag is not given, for its
 
 679 parent window only.", "");
 
 681     // TODO: support getting the skipped value back in the return value, but
 
 682     // only if style is set.  This is so the API doesn't change for existing
 
 685         virtual bool , Update(int value, const wxString& newmsg = wxPyEmptyString),
 
 686         "Updates the dialog, setting the progress bar to the new value and, if
 
 687 given changes the message above it. The value given should be less
 
 688 than or equal to the maximum value given to the constructor and the
 
 689 dialog is closed if it is equal to the maximum.  Returns True unless
 
 690 the Cancel button has been pressed.
 
 692 If false is returned, the application can either immediately destroy
 
 693 the dialog or ask the user for the confirmation and if the abort is
 
 694 not confirmed the dialog may be resumed with Resume function.", "");
 
 698         "Can be used to continue with the dialog, after the user had chosen to
 
 703 //---------------------------------------------------------------------------
 
 705 enum wxFindReplaceFlags
 
 707     // downward search/replace selected (otherwise - upwards)
 
 710     // whole word search/replace selected
 
 713     // case sensitive search/replace selected (otherwise - case insensitive)
 
 718 enum wxFindReplaceDialogStyles
 
 720     // replace dialog (otherwise find dialog)
 
 721     wxFR_REPLACEDIALOG = 1,
 
 723     // don't allow changing the search direction
 
 726     // don't allow case sensitive searching
 
 727     wxFR_NOMATCHCASE   = 4,
 
 729     // don't allow whole word searching
 
 735 %constant wxEventType wxEVT_COMMAND_FIND;
 
 736 %constant wxEventType wxEVT_COMMAND_FIND_NEXT;
 
 737 %constant wxEventType wxEVT_COMMAND_FIND_REPLACE;
 
 738 %constant wxEventType wxEVT_COMMAND_FIND_REPLACE_ALL;
 
 739 %constant wxEventType wxEVT_COMMAND_FIND_CLOSE;
 
 743 EVT_FIND = wx.PyEventBinder( wxEVT_COMMAND_FIND, 1 )
 
 744 EVT_FIND_NEXT = wx.PyEventBinder( wxEVT_COMMAND_FIND_NEXT, 1 )
 
 745 EVT_FIND_REPLACE = wx.PyEventBinder( wxEVT_COMMAND_FIND_REPLACE, 1 )
 
 746 EVT_FIND_REPLACE_ALL = wx.PyEventBinder( wxEVT_COMMAND_FIND_REPLACE_ALL, 1 )
 
 747 EVT_FIND_CLOSE = wx.PyEventBinder( wxEVT_COMMAND_FIND_CLOSE, 1 )
 
 749 %# For backwards compatibility.  Should they be removed?
 
 750 EVT_COMMAND_FIND             = EVT_FIND 
 
 751 EVT_COMMAND_FIND_NEXT        = EVT_FIND_NEXT
 
 752 EVT_COMMAND_FIND_REPLACE     = EVT_FIND_REPLACE
 
 753 EVT_COMMAND_FIND_REPLACE_ALL = EVT_FIND_REPLACE_ALL
 
 754 EVT_COMMAND_FIND_CLOSE       = EVT_FIND_CLOSE        
 
 758 DocStr(wxFindDialogEvent,
 
 759        "Events for the FindReplaceDialog", "");
 
 761 class wxFindDialogEvent : public wxCommandEvent
 
 764     wxFindDialogEvent(wxEventType commandType = wxEVT_NULL, int id = 0);
 
 768         "Get the currently selected flags: this is the combination of
 
 769 wx.FR_DOWN, wx.FR_WHOLEWORD and wx.FR_MATCHCASE flags.", "");
 
 772         const wxString& , GetFindString(),
 
 773         "Return the string to find (never empty).", "");
 
 776         const wxString& , GetReplaceString(),
 
 777         "Return the string to replace the search string with (only for replace
 
 778 and replace all events).", "");
 
 781         wxFindReplaceDialog *, GetDialog(),
 
 782         "Return the pointer to the dialog which generated this event.", "");
 
 785         void , SetFlags(int flags),
 
 789         void , SetFindString(const wxString& str),
 
 793         void , SetReplaceString(const wxString& str),
 
 799 DocStr(wxFindReplaceData, 
 
 800 "wx.FindReplaceData holds the data for wx.FindReplaceDialog. It is used
 
 801 to initialize the dialog with the default values and will keep the
 
 802 last values from the dialog when it is closed. It is also updated each
 
 803 time a `wx.FindDialogEvent` is generated so instead of using the
 
 804 `wx.FindDialogEvent` methods you can also directly query this object.
 
 806 Note that all SetXXX() methods may only be called before showing the
 
 807 dialog and calling them has no effect later.", "
 
 811     ================   ===============================================  
 
 812     wx.FR_DOWN         Downward search/replace selected (otherwise,
 
 815     wx.FR_WHOLEWORD    Whole word search/replace selected
 
 817     wx.FR_MATCHCASE    Case sensitive search/replace selected
 
 818                        (otherwise, case insensitive)
 
 819     ================   ===============================================  
 
 825 class wxFindReplaceData : public wxObject
 
 829         wxFindReplaceData(int flags=0),
 
 830         "Constuctor initializes the flags to default value (0).", "");
 
 832     ~wxFindReplaceData();
 
 836         const wxString& , GetFindString(),
 
 837         "Get the string to find.", "");
 
 840         const wxString& , GetReplaceString(),
 
 841         "Get the replacement string.", "");
 
 845         "Get the combination of flag values.", "");
 
 848         void , SetFlags(int flags),
 
 849         "Set the flags to use to initialize the controls of the dialog.", "");
 
 852         void , SetFindString(const wxString& str),
 
 853         "Set the string to find (used as initial value by the dialog).", "");
 
 856         void , SetReplaceString(const wxString& str),
 
 857         "Set the replacement string (used as initial value by the dialog).", "");
 
 864 DocStr(wxFindReplaceDialog,
 
 865 "wx.FindReplaceDialog is a standard modeless dialog which is used to
 
 866 allow the user to search for some text (and possibly replace it with
 
 867 something else). The actual searching is supposed to be done in the
 
 868 owner window which is the parent of this dialog. Note that it means
 
 869 that unlike for the other standard dialogs this one must have a parent
 
 870 window. Also note that there is no way to use this dialog in a modal
 
 871 way; it is always, by design and implementation, modeless.", "
 
 877     =====================  =========================================
 
 878     wx.FR_REPLACEDIALOG    replace dialog (otherwise find dialog)
 
 880     wx.FR_NOUPDOWN         don't allow changing the search direction
 
 882     wx.FR_NOMATCHCASE      don't allow case sensitive searching
 
 884     wx.FR_NOWHOLEWORD      don't allow whole word searching
 
 885     =====================  =========================================
 
 888 MustHaveApp(wxFindReplaceDialog);
 
 890 class wxFindReplaceDialog : public wxDialog {
 
 892     %pythonAppend wxFindReplaceDialog     "self._setOORInfo(self)"
 
 893     %pythonAppend wxFindReplaceDialog()   ""
 
 896         wxFindReplaceDialog(wxWindow *parent,
 
 897                             wxFindReplaceData *data,
 
 898                             const wxString &title,
 
 900         "Create a FindReplaceDialog.  The parent and data parameters must be
 
 901 non-None.  Use Show to display the dialog.", "");
 
 904         wxFindReplaceDialog(),
 
 905         "Precreate a FindReplaceDialog for 2-phase creation", "",
 
 906         PreFindReplaceDialog);
 
 910         bool , Create(wxWindow *parent, wxFindReplaceData *data,
 
 911                       const wxString &title, int style = 0),
 
 912         "Create the dialog, for 2-phase create.", "");
 
 916         const wxFindReplaceData *, GetData(),
 
 917         "Get the FindReplaceData object used by this dialog.", "");
 
 920         void , SetData(wxFindReplaceData *data),
 
 921         "Set the FindReplaceData object used by this dialog.", "");
 
 925 //---------------------------------------------------------------------------
 
 926 //---------------------------------------------------------------------------