SECEditFindReplaceDlg Class

class SECEditFindReplaceDlg

The SECEditFindReplaceDlg class displays a dialog that provides the user with either find-only or find-and-replace functionality. It can be instantiated either as a modeless dialog, or as a modal dialog using the DoModal() method.

Defined in: SECEditFindReplaceDlg.h

Comments

The dialog notifies a single object as actions are requested by the user. This object must implement the ISECFindReplaceNotify interface. Typically, it is the controller (specifically, SECEditController) which acts as the target of notifications.

enum SECEditFindReplaceAction

Find/Replace actions

Class Members

Construction

ifdef _DEBUG

Constructor

Attributes

EDIT_API CString GetFindString() const

Retrieves the current find string.

EDIT_API CString GetReplaceString() const

Retrieves the current replace string

EDIT_API BOOL MarkAll() const

Queries whether the user wants to mark all found text.

EDIT_API BOOL MatchCase() const

Queries whether the user wants to match the case of the find string exactly.

EDIT_API BOOL MatchWholeWord() const

Queries whether the user wants to match entire words only.

EDIT_API BOOL FindNext()const

Queries whether the user wants to find the next match.

EDIT_API BOOL ReplaceAll() const

Queries whether the user wants to replace all occurrences of the string to be replaced.

EDIT_API BOOL ReplaceCurrent() const

Queries whether the user wants the current word to be replaced.

EDIT_API BOOL ReplaceInSelection()

Queries whether the user wants find/replace operations to occur in selected text only.

EDIT_API BOOL SearchDown() const

Queries whether the direction the user wants to search.

EDIT_API BOOL IsTerminating() const

Queries whether the dialog is terminating (i.e., cancelling).

EDIT_API void EnableReplaceInSelection()

Sets whether find/replace operations should occur in selected text only.

EDIT_API void SetFindString(LPCTSTR lpszFindWhat)

Sets the current find string.

EDIT_API void SetMatchCase(BOOL bMatchCase)

Sets whether to match the case of the find string exactly.

EDIT_API void SetMatchWholeWord(BOOL bMatchWholeWord)

Sets whether to match entire words only.

EDIT_API void SetReplaceInSelection(BOOL bEnable)

Sets whether find/replace operations should occur in selected text only.

EDIT_API void SetReplaceString(LPCTSTR lpszReplaceWith)

Sets the current replace string.

EDIT_API void SetSearchDown(BOOL bSearchDown)

Sets the direction to search.

Protected methods

EDIT_API virtual void UpdateRegExpParams()

Updates dialog options when regular expressions are enabled.

EDIT_API virtual void UpdateStringLists()

Updates the string lists based on the find/replace comboboxes.

EDIT_API virtual void UpdateCombos()

Updates the string list combo boxes with lastest find/replace strings.

EDIT_API virtual BOOL EnableFindButton()

Enables the buttons based on the state on the dialog.

Public data members

BOOL m_bFindOnly

Indicates whether the dialog is to be used only for finding text.

BOOL m_bRegExpSupported

Indicates whether regular expressions are supported.

ISECEditFindReplaceNotify* m_pNotify

Points to the object to be notified of actions.

CStringList* m_pFindList

The history of find strings.

CStringList* m_pReplaceList

The history of replace strings.

CMenu m_RegExpMenu

The menu of regular expressions.

BOOL m_bModal

Indicates whether the dialog is modal.

BOOL m_bEnableReplaceInSelection

Indicates whether "replace in selection only" is enabled.