1 ///////////////////////////////////////////////////////////////////////////// 
   3 // Purpose:     interface of wxFindDialogEvent, wxFindReplaceDialog 
   4 // Author:      wxWidgets team 
   6 // Licence:     wxWindows license 
   7 ///////////////////////////////////////////////////////////////////////////// 
  11     See wxFindDialogEvent::GetFlags(). 
  13 enum wxFindReplaceFlags
 
  15     /** downward search/replace selected (otherwise - upwards) */ 
  18     /** whole word search/replace selected */ 
  21     /** case sensitive search/replace selected (otherwise - case insensitive) */ 
  27     These flags can be specified in wxFindReplaceDialog ctor or Create(): 
  29 enum wxFindReplaceDialogStyles
 
  31     /** replace dialog (otherwise find dialog) */ 
  32     wxFR_REPLACEDIALOG 
= 1, 
  34     /** don't allow changing the search direction */ 
  37     /** don't allow case sensitive searching */ 
  40     /** don't allow whole word searching */ 
  46     @class wxFindDialogEvent 
  48     wxFindReplaceDialog events 
  50     @beginEventTable{wxFindDialogEvent} 
  51     @event{EVT_FIND(id, func)} 
  52         Find button was pressed in the dialog. 
  53     @event{EVT_FIND_NEXT(id, func)} 
  54         Find next button was pressed in the dialog. 
  55     @event{EVT_FIND_REPLACE(id, func)} 
  56         Replace button was pressed in the dialog. 
  57     @event{EVT_FIND_REPLACE_ALL(id, func)} 
  58         Replace all button was pressed in the dialog. 
  59     @event{EVT_FIND_CLOSE(id, func)} 
  60         The dialog is being destroyed, any pointers to it cannot be used any longer. 
  66 class wxFindDialogEvent 
: public wxCommandEvent
 
  70         Constuctor used by wxWidgets only. 
  72     wxFindDialogEvent(wxEventType commandType 
= wxEVT_NULL
, 
  76         Return the pointer to the dialog which generated this event. 
  78     wxFindReplaceDialog
* GetDialog() const; 
  81         Return the string to find (never empty). 
  83     wxString 
GetFindString() const; 
  86         Get the currently selected flags: this is the combination of 
  87         the ::wxFindReplaceFlags enumeration values. 
  92         Return the string to replace the search string with (only for replace and 
  95     const wxString
& GetReplaceString() const; 
 101     @class wxFindReplaceData 
 103     wxFindReplaceData holds the data for wxFindReplaceDialog. 
 105     It is used to initialize the dialog with the default values and will keep the 
 106     last values from the dialog when it is closed. It is also updated each time a 
 107     wxFindDialogEvent is generated so instead of using the wxFindDialogEvent 
 108     methods you can also directly query this object. 
 110     Note that all @c SetXXX() methods may only be called before showing the 
 111     dialog and calling them has no effect later. 
 116 class wxFindReplaceData 
: public wxObject
 
 120         Constuctor initializes the flags to default value (0). 
 122     wxFindReplaceData(wxUint32 flags 
= 0); 
 125         Get the string to find. 
 127     const wxString
& GetFindString(); 
 130         Get the combination of @c wxFindReplaceFlags values. 
 132     int GetFlags() const; 
 135         Get the replacement string. 
 137     const wxString
& GetReplaceString(); 
 140         Set the string to find (used as initial value by the dialog). 
 142     void SetFindString(const wxString
& str
); 
 145         Set the flags to use to initialize the controls of the dialog. 
 147     void SetFlags(wxUint32 flags
); 
 150         Set the replacement string (used as initial value by the dialog). 
 152     void SetReplaceString(const wxString
& str
); 
 158     @class wxFindReplaceDialog 
 160     wxFindReplaceDialog is a standard modeless dialog which is used to allow the 
 161     user to search for some text (and possibly replace it with something else). 
 163     The actual searching is supposed to be done in the owner window which is the 
 164     parent of this dialog. Note that it means that unlike for the other standard 
 165     dialogs this one @b must have a parent window. Also note that there is no 
 166     way to use this dialog in a modal way; it is always, by design and 
 167     implementation, modeless. 
 169     Please see the @ref page_samples_dialogs sample for an example of using it. 
 174 class wxFindReplaceDialog 
: public wxDialog
 
 177     wxFindReplaceDialog(); 
 180         After using default constructor Create() must be called. 
 182         The @a parent and @a data parameters must be non-@NULL. 
 184     wxFindReplaceDialog(wxWindow
* parent
, 
 185                         wxFindReplaceData
* data
, 
 186                         const wxString
& title
, 
 192     virtual ~wxFindReplaceDialog(); 
 195         Creates the dialog; use wxWindow::Show to show it on screen. 
 197         The @a parent and @a data parameters must be non-@NULL. 
 199     bool Create(wxWindow
* parent
, wxFindReplaceData
* data
, 
 200                 const wxString
& title
, int style 
= 0); 
 203         Get the wxFindReplaceData object used by this dialog. 
 205     const wxFindReplaceData
* GetData() const;