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

CString  GetFindString() const

Retrieves the current find string.

CString  GetReplaceString() const

Retrieves the current replace string

BOOL  MarkAll() const

Queries whether the user wants to mark all found text.

BOOL  MatchCase() const

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

BOOL  MatchWholeWord() const

Queries whether the user wants to match entire words only.

BOOL  FindNext()const

Queries whether the user wants to find the next match.

BOOL  ReplaceAll() const

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

BOOL  ReplaceCurrent() const

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

BOOL  ReplaceInSelection()

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

BOOL  SearchDown() const

Queries whether the direction the user wants to search.

BOOL  IsTerminating() const

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

void  EnableReplaceInSelection()

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

void  SetFindString(LPCTSTR lpszFindWhat)

Sets the current find string.

void  SetMatchCase(BOOL bMatchCase)

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

void  SetMatchWholeWord(BOOL bMatchWholeWord)

Sets whether to match entire words only.

void  SetReplaceInSelection(BOOL bEnable)

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

void  SetReplaceString(LPCTSTR lpszReplaceWith)

Sets the current replace string.

void  SetSearchDown(BOOL bSearchDown)

Sets the direction to search.

Protected methods

virtual void  UpdateRegExpParams()

Updates dialog options when regular expressions are enabled.

virtual void  UpdateStringLists()

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

virtual void  UpdateCombos()

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

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.