9#if !defined(OWL_RICHEDIT_H)
13#if defined(BI_HAS_PRAGMA_ONCE)
29#define CFM_ALL (CFM_BOLD | CFM_ITALIC | CFM_UNDERLINE | CFM_STRIKEOUT |\
30 CFM_PROTECTED | CFM_SIZE | CFM_COLOR | CFM_FACE | \
31 CFM_OFFSET | CFM_CHARSET)
38#define PFM_ALL (PFM_ALIGNMENT|PFM_NUMBERING|PFM_OFFSET|PFM_OFFSETINDENT|\
39 PFM_RIGHTINDENT|PFM_STARTINDENT|PFM_TABSTOPS)
65 void EnableBold(
bool =
true);
66 void EnableItalic(
bool =
true);
67 void EnableUnderline(
bool =
true);
68 void EnableStrikeOut(
bool =
true);
69 void EnableProtected(
bool =
true);
73 void SetTextColor(
const TColor& = TColor::None);
74 void SetCharSet(
uint8);
75 void SetPitchAndFamily(
uint8);
79 TColor GetTextColor()
const;
91 void SetStyle(
int16 style);
126 void SetNumbering(
uint16);
127 void SetStartIndent(
long,
bool relative =
false);
128 void SetRightIndent(
long);
129 void SetOffset(
long);
130 void SetAlignment(
uint16);
131 void SetTabCount(
short,
long*);
135 void SetSpaceBefore(
long space);
136 void SetSpaceAfter(
long space);
138 void SetStyle(
int16 style);
142 void SetNumStyle(
uint16 style);
167 void SetRenderDC(
HDC);
168 void SetTargetDC(
HDC);
169 void SetRenderRect(
const TRect&);
170 void SetPageRect(
const TRect&);
172 void SetRange(
long,
long);
226 static int GetVersion(
bool force_old =
false);
246#if defined(_OWLDLL) || defined(BI_APP_DLL)
266 int x,
int y,
int w,
int h,
274 int x,
int y,
int w,
int h,
315 bool HasSelection()
const;
319 ulong GetSelectionType()
const;
324 using TEditFile::GetSelection;
326 using TEditFile::SetSelection;
330 bool EnableAutoURL(
bool enable=
true);
331 int GetIMEMode()
const;
332 void SetLangOptions(
int options);
333 int GetLangOptions()
const;
334 void SetTextMode(
int mode);
335 int GetTextMode()
const;
336 void SetUndoLimit(
int maxnum);
337 void StopGroupTyping();
341 int GetTextLength()
const;
345 tstring GetSelectedText()
const;
352 auto GetTextRange(
const TRange&)
const ->
tstring override;
357 void LimitText(
int maxValue)
override;
358 auto GetLineFromPos(
int charPos)
const ->
int override;
377 bool CanRedo()
const;
378 int GetUndoName()
const;
379 int GetRedoName()
const;
385 void Paste()
override;
394 bool DisplayBand(
TRect &);
401 void RequestResize();
410 uint GetFormat()
const;
416 ulong GetEventMask()
const;
430 using TEditFile::Read;
433 using TEditFile::Write;
467 void SetupWindow()
override;
486 void FormatLines(
bool addEOL);
488 void UnlockBuffer(
LPCTSTR,
bool =
false);
489 void SetTabStops(
int numTabs,
const int *);
490 HLOCAL GetMemHandle()
const;
492 uint GetPasswordChar()
const;
493 void SetPasswordChar(
uint ch);
498 void SetMarginUseFontInfo();
499 uint32 GetMargins()
const;
506 void ValidatorError();
660 memset(
reinterpret_cast<FORMATRANGE*
>(
this), 0,
sizeof(FORMATRANGE));
TCharRange encapsulates the CHARRANGE structure, which specifies a range of characters in a rich edit...
TCharRange(int minValue=0, int maxValue=-1)
Constructs a TCharRange structure initialized with the specified 'minValue' and 'maxValue' parameters...
TCharRange(const TEdit::TRange &r)
Class wrapper for management of color values.
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
TEditFile is a file-editing window.
TEditStream encapsulates the EDITSTREAM structure, which contains information about a data stream use...
TEditStream()
Constructs a default 'TEditStream' object.
TFindText encapsulates the FINDTEXT structure, which contains information about text to search for in...
TFindText(const TCharRange &range, const tstring &text)
Constructs a 'TFindText' describing the text to search for and the range of the search using the 'tex...
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TRect is a mathematical class derived from tagRect.
TRichEdit encapsulates a rich edit control, a window in which a user can enter, edit and format text.
void CmEditDelete()
Handler of the CM_EDITDELETE command - invokes the 'DeleteSelection' method.
TFmtStatus
Enumeration of flags returned when querrying a RichEdit about a particular character attribute for a ...
@ Yes
The attribute is absent from the selection.
@ No
The whole selection has the attribute.
void CmEditClear()
Handler of the CM_EDITCLEAR command - invokes the 'Clear' method.
void CmEditUndo()
Handler of the CM_EDITUNDO command - invokes the 'Undo' method.
void CmEditPaste()
Handler of the CM_EDITPASTE command - invokes the 'Paste' method.
int Search(int startPos, const tstring &text, bool caseSensitive=false, bool wholeWord=false, bool up=false)
void CmEditCopy()
Handler of the CM_EDITCOPY command - invokes the'Copy' method.
int FindText(uint flags, const TCharRange &r, const tstring &text)
void CmEditCut()
Handler of the CM_EDITCUT command - Invokes the 'Cut' method.
Wrapper object which loads the DLL providing the implementation of the RichEdit control.
TTextRange encapsulates the TEXTRANGE structure, which contains information about a range of text in ...
TTextRange()
Constructs a default 'TTextRange' structure with the data members describing the range and text initi...
A streamable class, TValidator defines an abstract data validation object.
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition of classes for CommonControl encapsulation.
Definition of class TEditFile, a text edit which can find/replace and read/write from/to a file.
#define DECLARE_RESPONSE_TABLE(cls)
#define DECLARE_STREAMABLE_OWL(cls, ver)
#define DECLARE_STREAMABLE_INLINES(cls)
bool DeleteSelection()
Deletes the currently selected text, and returns false if no text is selected.
void Cut()
Deletes the currently selected text and copies it into the Clipboard.
TDllLoader< TRichEditModule > TRichEditDll
TRichEditDll is a simple object which takes advantages of OWL's TDllLoader to ensure that only one co...
void Copy()
Copies the currently selected text into the Clipboard.
void Undo()
Undoes the last edit.
void Clear() override
Override TStatic virtual member functions.
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Object Windows Library (OWLNext Core)
Definition of class TRichEdit.
Represents a half-open range of positions in the edit control, e.g.