38 int x,
int y,
int w,
int h,
41 TEdit(parent,
id, text, x, y, w, h, 0, true, module),
44 Attr.Style |= ES_NOHIDESEL;
45 SearchDialog =
nullptr;
56 int x,
int y,
int w,
int h,
59 :
TEdit(parent, id, text, x, y, w, h, 0, true, module),
62 Attr.Style |= ES_NOHIDESEL;
63 SearchDialog =
nullptr;
94 if (
Search(-1, SearchData.FindWhat,
bool(SearchData.Flags&FR_MATCHCASE),
95 bool(SearchData.Flags&FR_WHOLEWORD),
96 !(SearchData.Flags&FR_DOWN)) >= 0)
98 if (SearchData.Flags & (FR_REPLACE|FR_REPLACEALL))
99 Insert(SearchData.ReplaceWith);
103 if (SearchData.Flags & (FR_FINDNEXT|FR_REPLACE))
107 else if (SearchData.Flags & FR_REPLACEALL)
110 }
while (SearchData.Flags & FR_REPLACEALL);
121 SearchCmd = CM_EDITFIND;
124 SearchDialog->Create();
136 SearchCmd = CM_EDITREPLACE;
139 SearchDialog->Create();
160 SearchDialog->UpdateData();
161 SearchData.Flags |= FR_FINDNEXT;
171 ce.
Enable(SearchData.FindWhat && *SearchData.FindWhat);
184 SearchDialog->UpdateData(param2);
185 if (SearchData.Flags & FR_DIALOGTERM)
197#if OWL_PERSISTENT_STREAMS
208 GetObject()->SearchData.Read(is);
209 is >> GetObject()->SearchCmd;
210 GetObject()->SearchDialog = 0;
218TEditSearch::Streamer::Write(opstream& os)
const
222 GetObject()->SearchData.Write(os);
223 os << GetObject()->SearchCmd;
Definition of class TApplication.
#define PRECONDITION(condition)
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
virtual void Enable(bool enable=true)
Enables or disables the command sender.
A TEdit is an interface object that represents an edit control interface element.
TEditSearch is an edit control that responds to Find, Replace, and FindNext menu commands.
TFindDialog(TWindow *parent, TData &data, TResId templateId=0, LPCTSTR title=nullptr, TModule *module=nullptr)
Constructs a TFindDialog object with the given parent window, resource ID, and caption.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TReplaceDialog(TWindow *parent, TData &data, TResId templateId=0, LPCTSTR title=nullptr, TModule *module=nullptr)
Constructs a TReplaceDialog object with a parent window, resource ID, template name,...
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
tstring LoadString(uint id) const
auto FormatMessageBox(const tstring &formatStr, const tstring &caption, uint flags,...) const -> int
bool PostMessage(TMsgId, TParam1=0, TParam2=0)
Posts a message (msg) to the window in the application's message queue.
ipstream, a specialized input stream derivative of pstream, is the base class for reading (extracting...
Definition of class TEdit.
Definition of class TEditSearch, an edit control that responds to Find, Replace and FindNext menu com...
#define DEFINE_RESPONSE_TABLE1(cls, base)
Macro to define a response table for a class with one base.
Definition of FindReplace- abstract, Find-, Replace- common Dialog classes.
void ReadBaseObject(Base *base, ipstream &in)
void WriteBaseObject(Base *base, opstream &out)
TResult EvFindMsg(TParam1, TParam2)
Registered commdlg message.
void CmEditFindNext()
CM_EDITFINDNEXT.
void DoSearch()
Performs a search or replace operation base on information in SearchData.
TEditSearch(TWindow *parent=nullptr, int id=0, LPCTSTR text=nullptr, int x=0, int y=0, int w=0, int h=0, TModule *module=nullptr)
Constructs a TEditSearch object given the parent window, resource ID, and character string (text).
void CmEditFind()
CM_EDITFIND.
void SetupWindow() override
void SetupWindow() override
void CeEditFindReplace(TCommandEnabler &ce)
Enables the find or replace option (only if no dialog is up).
void Insert(LPCTSTR str)
Inserts the text supplied in str into the edit control at the current text insertion point (cursor po...
virtual int Search(int startPos, LPCTSTR text, bool caseSensitive=false, bool wholeWord=false, bool up=false)
searches for and selects the given text and returns the offset of the text or -1 if the text is not f...
void CeEditFindNext(TCommandEnabler &ce)
Enables FindNext (only if there's data to search for).
TEdit(TWindow *parent, int id, LPCTSTR text, int x, int y, int w, int h, uint textLimit=0, bool multiline=false, TModule *=nullptr)
Constructs an edit control object with a parent window (parent).
void CmEditReplace()
CM_EDITREPLACE.
Object Windows Library (OWLNext Core).
LPARAM TParam2
Second parameter type.
EV_REGISTERED(DRAGLISTMSGSTRING, DragNotify)
WPARAM TParam1
First parameter type.
LRESULT TResult
Result type.
EV_COMMAND_ENABLE(CM_FILENEW, CeFileNew)
IMPLEMENT_STREAMABLE1(TApplication, TModule)
EV_COMMAND(IDOK, CmOkCancel)