first raw revision

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@52959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Francesco Montorsi
2008-04-01 13:55:38 +00:00
parent 008e999e14
commit 0ce6d6c89a
5 changed files with 209 additions and 106 deletions

View File

@@ -1,17 +1,66 @@
/////////////////////////////////////////////////////////////////////////////
// Name: fdrepdlg.h
// Purpose: interface of wxFindDialogEvent
// Purpose: interface of wxFindDialogEvent, wxFindReplaceDialog
// Author: wxWidgets team
// RCS-ID: $Id$
// Licence: wxWindows license
/////////////////////////////////////////////////////////////////////////////
/**
See wxFindDialogEvent::GetFlags().
*/
enum wxFindReplaceFlags
{
/** downward search/replace selected (otherwise - upwards) */
wxFR_DOWN = 1,
/** whole word search/replace selected */
wxFR_WHOLEWORD = 2,
/** case sensitive search/replace selected (otherwise - case insensitive) */
wxFR_MATCHCASE = 4
}
/**
These flags can be specified in wxFindReplaceDialog ctor or Create():
*/
enum wxFindReplaceDialogStyles
{
/** replace dialog (otherwise find dialog) */
wxFR_REPLACEDIALOG = 1,
/** don't allow changing the search direction */
wxFR_NOUPDOWN = 2,
/** don't allow case sensitive searching */
wxFR_NOMATCHCASE = 4,
/** don't allow whole word searching */
wxFR_NOWHOLEWORD = 8
}
/**
@class wxFindDialogEvent
@wxheader{fdrepdlg.h}
wxFindReplaceDialog events
@beginEventTable{wxFindDialogEvent}
@event{EVT_FIND(id, func)}:
Find button was pressed in the dialog.
@event{EVT_FIND_NEXT(id, func)}:
Find next button was pressed in the dialog.
@event{EVT_FIND_REPLACE(id, func)}:
Replace button was pressed in the dialog.
@event{EVT_FIND_REPLACE_ALL(id, func)}:
Replace all button was pressed in the dialog.
@event{EVT_FIND_CLOSE(id, func)}:
The dialog is being destroyed, any pointers to it cannot be used any longer.
@endEventTable
@library{wxcore}
@category{events}
*/
@@ -35,8 +84,8 @@ public:
wxString GetFindString() const;
/**
Get the currently selected flags: this is the combination of @c wxFR_DOWN,
@c wxFR_WHOLEWORD and @c wxFR_MATCHCASE flags.
Get the currently selected flags: this is the combination of
the ::wxFindReplaceFlags enumeration values.
*/
int GetFlags() const;
@@ -44,7 +93,7 @@ public:
Return the string to replace the search string with (only for replace and
replace all events).
*/
const wxString GetReplaceString() const;
const wxString& GetReplaceString() const;
};
@@ -53,18 +102,18 @@ public:
@class wxFindReplaceData
@wxheader{fdrepdlg.h}
wxFindReplaceData holds the data for
wxFindReplaceDialog. It is used to initialize
the dialog with the default values and will keep the last values from the
dialog when it is closed. It is also updated each time a
wxFindDialogEvent is generated so instead of
using the wxFindDialogEvent methods you can also directly query this object.
wxFindReplaceData holds the data for wxFindReplaceDialog.
It is used to initialize the dialog with the default values and will keep the
last values from the dialog when it is closed. It is also updated each time a
wxFindDialogEvent is generated so instead of using the wxFindDialogEvent
methods you can also directly query this object.
Note that all @c SetXXX() methods may only be called before showing the
dialog and calling them has no effect later.
@library{wxcore}
@category{FIXME}
@category{data}
*/
class wxFindReplaceData : public wxObject
{
@@ -113,13 +162,14 @@ public:
wxFindReplaceDialog is a standard modeless dialog which is used to allow the
user to search for some text (and possibly replace it with something else).
The actual searching is supposed to be done in the owner window which is the
parent of this dialog. Note that it means that unlike for the other standard
dialogs this one @b must have a parent window. Also note that there is no
way to use this dialog in a modal way; it is always, by design and
implementation, modeless.
Please see the dialogs sample for an example of using it.
Please see the @ref page_samples_dialogs sample for an example of using it.
@library{wxcore}
@category{cmndlg}
@@ -127,18 +177,17 @@ public:
class wxFindReplaceDialog : public wxDialog
{
public:
//@{
wxFindReplaceDialog();
/**
After using default constructor Create()
must be called.
After using default constructor Create() must be called.
The @a parent and @a data parameters must be non-@NULL.
*/
wxFindReplaceDialog();
wxFindReplaceDialog(wxWindow* parent,
wxFindReplaceData* data,
const wxString& title,
int style = 0);
//@}
/**
Destructor.
@@ -147,14 +196,14 @@ public:
/**
Creates the dialog; use wxWindow::Show to show it on screen.
The @a parent and @a data parameters must be non-@NULL.
*/
bool Create(wxWindow* parent, wxFindReplaceData* data,
const wxString& title, int style = 0);
/**
Get the wxFindReplaceData object used by this
dialog.
Get the wxFindReplaceData object used by this dialog.
*/
const wxFindReplaceData* GetData() const;
};