Show/Hide Toolbars

EmEditor Help

Navigation: EmEditor Help > Plug-in Reference > Inline Functions

EmEditor Plug-in Reference: Editor_Filter

Scroll Prev Top Next More
EmEditor Home - EmEditor Help - Plug-in Reference - Inline Functions

Editor_Filter

Filters the document with the specified string and settings. You can use this inline function or explicitly send the EE_FILTER message.

Editor_Filter( HWND hwnd, LPCWSTR szFilter, int iColumn, UINT64 nFlags, INT_PTR xBegin, INT_PTR xEnd );

Parameters

hwnd

Specifies the window handle of the view or frame of EmEditor.

szFilter

Specifies a string to search for.

iColumn

Specifies the index of the column of the text you want to search, or -1 if you want to search whole lines.

nFlags

You can specify a combination of the following values.

FLAG_FIND_CASE

Matches cases.

FLAG_FIND_CONTINUE

Specifies the Editor_Filter inline function called next time should not clear the filter. This filter is not applifed immediately after this inline function is called. This flag is used when you want to create multiple levels of the filter. It is similar to the FLAG_FIND_KEEP_PREVIOUS flag, but since the actual filter is not applifed each time the message is called, this method works faster if there are multiple filter levels.

FLAG_FIND_ESCAPE

Uses escape sequences.

FLAG_FIND_KEEP_PREVIOUS

Specifies the Editor_Filter inline function should not clear the existing filter before applying the new filter. This flag is used when you want to create multiple levels of the filter.

FLAG_FIND_LOGICAL_OR

Specifies a logical disjunction (logical OR) to the previous level in case of multiple levels of the filter.

FLAG_FIND_NEGATIVE

Shows the Filter toolbar and excludes the lines that match the specified string.

FLAG_FIND_ONLY_WORD

Searches only words.

FLAG_FIND_REG_EXP

Uses a regular expression.

FLAG_FIND_REMOVE_LAST

Removes the last added filter level.

xBegin

Specifies the index of beginning of the column (in logical characters) of the text you want to search, or -1 if you want to count the last portion of the text and specify as xEnd.

xEnd

Specifies the index of ending of the column (in logical characters) of the text you want to search, or -1 if you want to search all the rest of the text.

Return Values

The return value is the number of the lines that match the specified string. If the specified string is an empty string, the return value is -1. If FLAG_FIND_CONTINUE is specified, the return value is 0.

Version

Supported on EmEditor Professional Version 14.7 or later.

Copyright © 2003-2016 by Emurasoft, Inc.