OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
richedit.h
Go to the documentation of this file.
1//----------------------------------------------------------------------------
2// ObjectWindows
3// Copyright (c) 1995, 1996 by Borland International, All Rights Reserved
4//
5/// \file
6/// Definition of class TRichEdit.
7//----------------------------------------------------------------------------
8
9#if !defined(OWL_RICHEDIT_H)
10#define OWL_RICHEDIT_H
11
12#include <owl/private/defs.h>
13#if defined(BI_HAS_PRAGMA_ONCE)
14# pragma once
15#endif
16
17#include <owl/editfile.h>
18#include <owl/commctrl.h>
19
20#include <richedit.h>
21#include <richole.h>
22
23namespace owl {
24
25//
26// Macro representing all CHARFORMAT flags
27//
28#if !defined(CFM_ALL)
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)
32#endif
33
34//
35// Macro representing all the PARAFORMAT flags
36//
37#if !defined(PFM_ALL)
38#define PFM_ALL (PFM_ALIGNMENT|PFM_NUMBERING|PFM_OFFSET|PFM_OFFSETINDENT|\
39 PFM_RIGHTINDENT|PFM_STARTINDENT|PFM_TABSTOPS)
40#endif
41
42//
43// Forward References
44//
45class _OWLCLASS TRichEdit;
46
47#include <owl/preclass.h>
48
49/// \addtogroup ctrl
50/// @{
51/// \class TCharFormat
52// ~~~~~ ~~~~~~~~~~~
53/// TCharFormat encapsulates the CHARFORMAT2 structure which contains
54/// information about character formatting in a rich edit control.
55//
56class _OWLCLASS TCharFormat : public CHARFORMAT2 {
57 public:
59 TCharFormat(const TRichEdit&, bool selection = true,
61
62 void ToggleEffectsBit(ulong flag);
63 void ToggleMaskBit(ulong flag);
64
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);
70
71 void SetHeight(long);
72 void SetOffset(long);
73 void SetTextColor(const TColor& = TColor::None);
74 void SetCharSet(uint8);
75 void SetPitchAndFamily(uint8);
76 void SetFaceName(LPCTSTR);
77 void SetFaceName(const tstring& f) {SetFaceName(f.c_str());}
78
79 TColor GetTextColor() const;
80 TColor GetBkColor() const;
81
82 void SetFontInfo(LOGFONT& lf) const;
83 void GetFontInfo(const LOGFONT& lf);
84
85 // RichEdit 2.0 specific
86 //
87 void SetWeight(uint16 weigh); ///< Font weight (LOGFONT value)
88 void SetSpacing(int16 spacing); ///< Amount to space between letters
89 void SetBkColor(const TColor& clr);///< Background color
90 void SetLCID(LCID lcid); ///< Locale ID
91 void SetStyle(int16 style); ///< Style handle
92 void SetKerning(uint16 kern); ///< Twip size above which to kern char pair
93 void SetUnderlineType(uint8 utype);///< Underline type
94 void SetAnimation(uint8 anim); ///< Animated text like marching ants
95 void SetRevAuthor(uint8 revav); ///< Revision author index
96};
97
98//
99/// \class TCharRange
100// ~~~~~ ~~~~~~~~~~
101/// TCharRange encapsulates the CHARRANGE structure, which specifies a range of
102/// characters in a rich edit control.
103/// Can convert to and from TEdit::TRange.
104//
105class _OWLCLASS TCharRange : public CHARRANGE {
106 public:
107 TCharRange(int minValue = 0, int maxValue = -1);
108 TCharRange(const TEdit::TRange& r) {cpMin = r.cpMin; cpMax = r.cpMax;}
109
110 operator TEdit::TRange() {return TEdit::TRange(cpMin, cpMax);}
111};
112
113//
114/// \class TParaFormat
115// ~~~~~ ~~~~~~~~~~~
116/// TParaFormat encapsulates the PARAFORMAT structure, which contains information
117/// about paragraph formatting attributes of a rich edit control.
118//
119class _OWLCLASS TParaFormat : public PARAFORMAT2 {
120 public:
123
124 void ToggleMaskBit(ulong flag);
125
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*);
132
133 // RichEdit 2.0 specific
134 //
135 void SetSpaceBefore(long space); ///< Vertical spacing before para
136 void SetSpaceAfter(long space); ///< Vertical spacing after para
137 void SetLineSpacing(long space, uint8 rule);///< Line spacing depending on Rule
138 void SetStyle(int16 style); ///< Style handle
139 void SetShading(uint16 wight,uint16 style); ///< Shading in hundredths of a per cent
140 ///< Nibble 0: style, 1: cfpat, 2: cbpat
141 void SetNumStart(uint16 start); ///< Starting value for numbering
142 void SetNumStyle(uint16 style); ///< Alignment, roman/arabic, (), ), ., etc.
143 void SetNumTab(uint16 tab); ///< Space bet 1st indent and 1st-line text
144 // Space between border and text (twips)
145 // Border pen width (twips)
146 // Byte 0: bits specify which borders, Nibble 2: border style, 3: color index
147 void SetBorder(uint16 spac, uint16 width, uint16 border);
148};
149
150//
151/// \class TFormatRange
152// ~~~~~ ~~~~~~~~~~~~
153/// TFormatRange encapsulates the FORMATRANGE structure, which contains information
154/// that a rich edit control uses to format its output for a particular device.
155//
156class _OWLCLASS TFormatRange : public FORMATRANGE {
157 public:
158 TFormatRange();
160 const TRect& renderArea, const TRect& entireArea,
161 const TCharRange& txtRange);
162
164 const TRect& renderArea, const TRect& entireArea,
165 long firstChar, long lastChar);
166
167 void SetRenderDC(HDC);
168 void SetTargetDC(HDC);
169 void SetRenderRect(const TRect&);
170 void SetPageRect(const TRect&);
171 void SetRange(const TCharRange&);
172 void SetRange(long, long);
173};
174
175//
176/// \class TEditStream
177// ~~~~~ ~~~~~~~~~~~
178/// TEditStream encapsulates the EDITSTREAM structure, which contains information
179/// about a data stream used with a rich edit control.
180//
181class _OWLCLASS TEditStream : public EDITSTREAM {
182 public:
183 TEditStream();
185};
186
187//
188/// \class TTextRange
189// ~~~~~ ~~~~~~~~~~
190/// TTextRange encapsulates the TEXTRANGE structure, which contains information
191/// about a range of text in a rich edit control.
192//
193class _OWLCLASS TTextRange : public ::TEXTRANGE {
194 public:
195 TTextRange();
197 TTextRange(int beg, int end, LPTSTR buffer);
198};
199
200//
201/// \class TFindText
202// ~~~~~ ~~~~~~~~~
203/// TFindText encapsulates the FINDTEXT structure, which contains information about
204/// text to search for in a rich edit control.
205//
206class _OWLCLASS TFindText : public ::FINDTEXT {
207 public:
208 TFindText(const TCharRange& range, const tstring& text);
209 TFindText(int beg, int end, const tstring& text);
210 private:
211 tstring t;
212};
213
214//----------------------------------------------------------------------------
215
216//
217/// \class TRichEditModule
218// ~~~~~ ~~~~~~~~~~~~~~~
219/// Wrapper object which loads the DLL providing the implementation of
220/// the RichEdit control
221//
223 public:
225
226 static int GetVersion(bool force_old = false);
227};
228
229//
230/// TRichEditDll is a simple object which takes advantages of OWL's
231/// TDllLoader to ensure that only one copy of an object [theoretically
232/// representing a DLL] is created.
233/// TRichEditDll provides the 'IsAvailable' method which returns true if the
234/// DLL is available and loaded. TRichEditDll is used internally by OWL's
235/// TRichEdit class to ensure that the DLL is available and loaded. You may
236/// consider using TRichEditDll if your application creates rich edit controls
237/// without instantiating a TRichEdit object. (For example, if the control
238/// is part of a dialog resource). The following snippet illustrates:
239/// \code
240/// if (!TRichEditDll::IsAvailable()) {
241/// Error("Unable to load Rich Edit DLL");
242/// }
243/// \endcode
245
246#if defined(_OWLDLL) || defined(BI_APP_DLL)
247 //
248 // Export template of TDllLoader<TRichEditModule> when building ObjectWindows
249 // DLL and provide import declaration of DLL instance for users of the class.
250 //
251// template class _OWLCLASS TDllLoader<TRichEditModule>;
252#endif
253
254
255//
256/// \class TRichEdit
257// ~~~~~ ~~~~~~~~~
258/// TRichEdit encapsulates a rich edit control, a window in which a user can enter,
259/// edit and format text.
260//
262 public:
263 TRichEdit(TWindow* parent,
264 int id,
266 int x, int y, int w, int h,
267 LPCTSTR fileName = nullptr,
268 TModule* module = nullptr);
269
270 TRichEdit(
271 TWindow* parent,
272 int id,
273 const tstring& text,
274 int x, int y, int w, int h,
275 const tstring& fileName = tstring(),
276 TModule* = nullptr);
277
278 TRichEdit(TWindow* parent,
279 int resourceId,
280 TModule* module = nullptr);
281
282 // Generic Formatting Methods
283 //
284 ulong GetCharFormat(TCharFormat &, bool selection = false) const;
285 ulong GetParaFormat(TParaFormat &) const;
286 bool SetCharFormat(const TCharFormat &, uint flags= SCF_SELECTION);
287 bool SetParaFormat(const TParaFormat &);
288 TColor SetBkgndColor(const TColor& = TColor::None);
289
290 /// Enumeration of flags returned when querrying a RichEdit about
291 /// a particular character attribute for a chunk of selected text.
292 //
294 No, ///< The whole selection has the attribute
295 Yes, ///< The attribute is absent from the selection
296 Partly ///< Part of the selection has the attribute
297 };
298
299 // More specialized character formatting or querrying methods
300 //
301 uint HasCharAttribute(ulong mask, uint32 effects);
302 bool ToggleCharAttribute(ulong mask, uint32 effects);
303 bool ChangeCharPointSize(int pointSizeDelta);
304
305// !BB Consider adding following font methods - investigate optimal
306// !BB encapsulation which can be flexible and easily overriden
307// !BB bool SetFont(const char * fntName);
308// !BB bool SetFont(const LOGFONT& lf);
309// !BB
310// !BB bool GetFont(char * fntName, int size);
311// !BB bool GetFont(LOGFRONT& lf);
312
313 // Selection and Hit Testing
314 //
315 bool HasSelection() const;
316 void GetSelRange(TCharRange &) const; // Deprecated; use GetSelection instead.
317 int SetSelRange(const TCharRange &); // Deprecated; use SetSelection instead.
318 void HideSelection(bool hide, bool changeStyle);
319 ulong GetSelectionType() const;
320
321 // TEdit overrides
322 //
323 void GetSelection(int& startPos, int& endPos) const override;
324 using TEditFile::GetSelection; // Inject TRange-based overload.
325 auto SetSelection(int startPos, int endPos) -> bool override;
326 using TEditFile::SetSelection; // Inject TRange-based overload.
327
328 // Various settings
329 //
330 bool EnableAutoURL(bool enable=true); // RichEdit 2.0 specific
331 int GetIMEMode() const; // RichEdit 2.0 specific
332 void SetLangOptions(int options); // RichEdit 2.0 specific
333 int GetLangOptions() const; // RichEdit 2.0 specific
334 void SetTextMode(int mode); // RichEdit 2.0 specific
335 int GetTextMode() const; // RichEdit 2.0 specific
336 void SetUndoLimit(int maxnum); // RichEdit 2.0 specific
337 void StopGroupTyping(); // RichEdit 2.0 specific
338
339 // Text Operations
340 //
341 int GetTextLength() const;
342 int GetTextRange(TTextRange &) const; // deprecated
343 int GetTextRange(const TCharRange &, LPTSTR buffer) const; // deprecated
344 int GetSelectedText(LPTSTR buffer) const; // deprecated
345 tstring GetSelectedText() const;
346 int FindText(uint flags, const TFindText &);
347 int FindText(uint flags, const TCharRange &, LPCTSTR text);
348 int FindText(uint flags, const TCharRange& r, const tstring& text) {return FindText(flags, r, text.c_str());}
349
350 // TEdit overrides
351 //
352 auto GetTextRange(const TRange&) const -> tstring override;
353 void GetSubText(LPTSTR textBuf, int startPos, int endPos) const override; // deprecated
354 auto Search(int startPos, LPCTSTR text, bool caseSensitive = false, bool wholeWord = false, bool up = false) -> int override;
355 int Search(int startPos, const tstring& text, bool caseSensitive = false, bool wholeWord = false, bool up = false)
356 {return TEdit::Search(startPos, text, caseSensitive, wholeWord, up);}
357 void LimitText(int maxValue) override;
358 auto GetLineFromPos(int charPos) const -> int override; // EM_EXLINEFROMCHAR
359 auto CharFromPos(int16 x, int16 y) -> uint32 override;
360 auto PosFromChar(uint charIndex) -> uint32 override;
361
362 // Word and Line Breaks
363 //
364 int FindWordBreak(uint code, int start);
365
366 // Lines and Scrolling
367 //
368// !BB int GetNumLines() const;
369// !BB int GetLineLength(int lineNumber) const;
370// !BB bool GetLine(char * str, int strSize, int lineNumber) const;
371// !BB uint GetLineIndex(int lineNumber) const;
372// !BB void Scroll(int horizontalUnit, int verticalUnit);
373
374 // Editing Operations
375 //
376 bool CanPaste(uint format) const;
377 bool CanRedo() const; // RichEdit 2.0 specific
378 int GetUndoName() const; // RichEdit 2.0 specific
379 int GetRedoName() const; // RichEdit 2.0 specific
380 void Redo(); // RichEdit 2.0 specific
381 void PasteSpecial(uint format);
382
383 // TEdit overrides
384 //
385 void Paste() override;
386
387 // Streams
388 //
389 ulong StreamIn(uint format, TEditStream &);
390 ulong StreamOut(uint format, TEditStream &);
391
392 // Printing
393 //
394 bool DisplayBand(TRect &);
395 int FormatRange(const TFormatRange & range, bool render = true);
396 int FormatRange();
397 bool SetTargetDevice(HDC, int lineWidth);
398
399 // Bottomless Rich Edit Controls
400 //
401 void RequestResize();
402
403 // OLE Interfaces
404 //
405 bool GetOleInterface(IRichEditOle * &) const;
406 bool SetOleInterface(IRichEditOleCallback *);
407
408 // Querry/Set control's data format
409 //
410 uint GetFormat() const;
411 void SetFormat(uint fmt);
412 bool IsRTF() const;
413
414 // Misc
415 //
416 ulong GetEventMask() const;
417 ulong SetEventMask(ulong msk);
418// !BB void SetReadOnly(bool readOnly);
419// !BB bool IsModified() const;
420// !BB void ClearModify() {HandleMessage(EM_SETMODIFY);}
421// !BB void SetModify(); // !BB Add to TEdit ??
422
423 // Override to use RichEdit streaming capabilities
424 //
425 auto Transfer(void* buffer, TTransferDirection) -> uint override;
426
427 // Override TEditFile's I/O
428 //
429 auto Read(LPCTSTR fileName = nullptr) -> bool override;
430 using TEditFile::Read; ///< String-aware overload
431
432 auto Write(LPCTSTR fileName = nullptr) -> bool override;
433 using TEditFile::Write; ///< String-aware overload
434
435 bool ReadFromStream(tistream&, uint format = SF_RTF);
436 bool WriteToStream(tostream&, uint format = SF_RTF);
437
438 protected:
439
440 // Data format of control
441 //
443
444 // Command response functions
445 //
446 void CmEditCut(); // CM_EDITCUT
447 void CmEditCopy(); // CM_EDITCOPY
448 void CmEditPaste(); // CM_EDITPASTE
449 void CmEditDelete(); // CM_EDITDELETE
450 void CmEditClear(); // CM_EDITCLEAR
451 void CmEditUndo(); // CM_EDITUNDO
452
453 // Command enabler functions
454 //
455 void CeHasSelect(TCommandEnabler& commandHandler);
456 void CeEditPaste(TCommandEnabler& commandHandler);
457 void CeEditClear(TCommandEnabler& commandHandler);
458 void CeEditUndo(TCommandEnabler& commandHandler);
459
460 // Child id notification handled at the child
461 //
462 void ENErrSpace(); // EN_ERRSPACE
463
464 // Override TWindow virtual member functions
465 //
466 auto GetWindowClassName() -> TWindowClassName override;
467 void SetupWindow() override;
468
469 // Event handlers to override TEdit's handlers
470 //
471 void EvChar(uint key, uint repeatCount, uint flags);
472 void EvKeyDown(uint key, uint repeatCount, uint flags);
473 uint EvGetDlgCode(const MSG*);
474 void EvSetFocus(HWND hWndLostFocus);
475 void EvKillFocus(HWND hWndGetFocus);
476
477 private:
478 // Hidden to prevent accidental copying or assignment
479 //
480 TRichEdit(const TRichEdit&);
482
483 // The following are TEdit methods which encapsulates messages/API
484 // which are *NOT* supported by the RICHEDIT class.
485 //
486 void FormatLines(bool addEOL);
487 LPTSTR LockBuffer(uint newSize = 0);
488 void UnlockBuffer(LPCTSTR, bool = false);
489 void SetTabStops(int numTabs, const int *);
490 HLOCAL GetMemHandle() const; // Yura 06/15/98
491 void SetMemHandle(HLOCAL localMem); // Yura 06/15/98
492 uint GetPasswordChar() const;
493 void SetPasswordChar(uint ch);
494 void SetRectNP(const TRect& frmtRect);
495
496 void SetLeftMargin(uint16 margin); // Yura 19/23/98
497 void SetRightMargin(uint16 margin); // Yura 19/23/98
498 void SetMarginUseFontInfo(); // Yura 19/23/98
499 uint32 GetMargins() const; // Yura 19/23/98
500
501 // Validators are not applicable to RichEdit where the text
502 // is not plain ASCII...
503 //
504 bool IsValid(bool reportErr = false);
505 void SetValidator(TValidator* validator);
506 void ValidatorError();
507
510};
511
513
514/// @}
515
516#include <owl/posclass.h>
517
518
519//----------------------------------------------------------------------------
520// Inline implementation
521//
522
523//
524/// Handler of the CM_EDITCUT command - Invokes the 'Cut' method.
525//
527{
528 Cut();
529}
530
531//
532/// Handler of the CM_EDITCOPY command - invokes the'Copy' method
533//
535{
536 Copy();
537}
538
539//
540/// Handler of the CM_EDITPASTE command - invokes the 'Paste' method
541//
543{
544 Paste();
545}
546
547//
548/// Handler of the CM_EDITDELETE command - invokes the 'DeleteSelection' method
549//
551{
553}
554
555//
556/// Handler of the CM_EDITCLEAR command - invokes the 'Clear' method
557//
559{
560 Clear();
561}
562
563//
564/// Handler of the CM_EDITUNDO command - invokes the 'Undo' method
565//
567{
568 Undo();
569}
570
571//
572/// Constructor of a 'TCharFormat' structure initialized with the specified mask.
573/// \note This constructor is typically used for constructing an
574/// object which will be filled with the appropriate character format
575/// information by a rich edit control. The 'mask' specifies which field
576/// should be filled.
577//
579{
580 cbSize = sizeof(::CHARFORMAT);//LB, for VCL build
581 dwMask = mask;
582}
583
584//
585/// Toggles the effect bits specified in the 'flag' parameter.
586//
591
592//
593/// Toggles the mask bits specified in the 'flag' parameter.
594//
596{
597 dwMask ^= flag;
598}
599
600//
601/// Constructs a TCharRange structure initialized with the specified 'minValue' and 'maxValue' parameters.
602//
604{
605 cpMin = minValue;
606 cpMax = maxValue;
607}
608
609//
610/// Constructs a default 'TEditStream' object. The members of the base 'EDITSTREAM'
611/// object are initialized to zero.
612//
614{
615 dwCookie = 0;
616 dwError = 0;
617 pfnCallback = nullptr;
618}
619
620//
621/// Constructs a 'TEditStream' object initializing the members with the specified
622/// parameter.
623//
630
631//
632/// Constructs a 'TFindText' describing the text to search for and the range of the
633/// search using the 'text' and 'range' parameters respectively.
634//
635inline TFindText::TFindText(const TCharRange& range, const tstring& text)
636: t(text)
637{
638 chrg = range;
639 lpstrText = &t[0];
640}
641
642//
643/// Constructs a 'TFindText' describing the text to search for via the 'text'
644/// parameter, and the range to search for via the 'beg' and 'end' parameters,
645/// respectively.
646//
647inline TFindText::TFindText(int beg, int end, const tstring& text)
648: t(text)
649{
650 chrg.cpMin = beg;
651 chrg.cpMax = end;
652 lpstrText = &t[0];
653}
654
655//
656/// Constructs a default 'TFormatRange' object with all members initialized to zero.
657//
659{
660 memset(reinterpret_cast<FORMATRANGE*>(this), 0, sizeof(FORMATRANGE));
661}
662
663//
664/// Constructs a default 'TTextRange' structure with the data members describing the
665/// range and text initialized to zero.
666//
668{
669 chrg.cpMin = 0;
670 chrg.cpMax = 0;
671 lpstrText = nullptr;
672}
673
674//
675/// Constructs a 'TTextRange' structure by initializing the range and text members
676/// with the 'rng' and 'buffer' parameters respectively.
677//
679{
680 chrg = rng;
682}
683
684//
685/// Constructs a 'TTextRange' structure by initializing the text with the 'buffer'
686/// parameter, and the range using 'beg' and 'end'.
687//
688inline TTextRange::TTextRange(int beg, int end, LPTSTR buffer)
689{
690 chrg.cpMin = beg;
691 chrg.cpMax = end;
693}
694
695//
696//
697//
698inline uint
700 return Format;
701}
702
703//
704//
705//
706inline void
710
711//
712//
713//
714inline bool
716 return Format == SF_RTF;
717}
718
719
720} // OWL namespace
721
722
723#endif // OWL_RICHEDIT_H
TCharFormat encapsulates the CHARFORMAT2 structure which contains information about character formatt...
Definition richedit.h:56
void SetFaceName(const tstring &f)
Definition richedit.h:77
void ToggleEffectsBit(ulong flag)
Toggles the effect bits specified in the 'flag' parameter.
Definition richedit.h:587
TCharFormat(ulong mask=0)
Constructor of a 'TCharFormat' structure initialized with the specified mask.
Definition richedit.h:578
void ToggleMaskBit(ulong flag)
Toggles the mask bits specified in the 'flag' parameter.
Definition richedit.h:595
TCharRange encapsulates the CHARRANGE structure, which specifies a range of characters in a rich edit...
Definition richedit.h:105
TCharRange(int minValue=0, int maxValue=-1)
Constructs a TCharRange structure initialized with the specified 'minValue' and 'maxValue' parameters...
Definition richedit.h:603
TCharRange(const TEdit::TRange &r)
Definition richedit.h:108
Class wrapper for management of color values.
Definition color.h:245
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
Definition window.h:209
TEditFile is a file-editing window.
Definition editfile.h:35
TEditStream encapsulates the EDITSTREAM structure, which contains information about a data stream use...
Definition richedit.h:181
TEditStream()
Constructs a default 'TEditStream' object.
Definition richedit.h:613
TFindText encapsulates the FINDTEXT structure, which contains information about text to search for in...
Definition richedit.h:206
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...
Definition richedit.h:635
TFormatRange encapsulates the FORMATRANGE structure, which contains information that a rich edit cont...
Definition richedit.h:156
TFormatRange(HDC renderDC, HDC targetDC, const TRect &renderArea, const TRect &entireArea, long firstChar, long lastChar)
TFormatRange()
Constructs a default 'TFormatRange' object with all members initialized to zero.
Definition richedit.h:658
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
Definition module.h:75
TParaFormat encapsulates the PARAFORMAT structure, which contains information about paragraph formatt...
Definition richedit.h:119
TRect is a mathematical class derived from tagRect.
Definition geometry.h:308
TRichEdit encapsulates a rich edit control, a window in which a user can enter, edit and format text.
Definition richedit.h:261
void Paste() override
void CmEditDelete()
Handler of the CM_EDITDELETE command - invokes the 'DeleteSelection' method.
Definition richedit.h:550
TFmtStatus
Enumeration of flags returned when querrying a RichEdit about a particular character attribute for a ...
Definition richedit.h:293
@ Yes
The attribute is absent from the selection.
Definition richedit.h:295
@ No
The whole selection has the attribute.
Definition richedit.h:294
void CmEditClear()
Handler of the CM_EDITCLEAR command - invokes the 'Clear' method.
Definition richedit.h:558
bool IsRTF() const
Definition richedit.h:715
uint GetFormat() const
Definition richedit.h:699
void CmEditUndo()
Handler of the CM_EDITUNDO command - invokes the 'Undo' method.
Definition richedit.h:566
void CmEditPaste()
Handler of the CM_EDITPASTE command - invokes the 'Paste' method.
Definition richedit.h:542
int Search(int startPos, const tstring &text, bool caseSensitive=false, bool wholeWord=false, bool up=false)
Definition richedit.h:355
void CmEditCopy()
Handler of the CM_EDITCOPY command - invokes the'Copy' method.
Definition richedit.h:534
int FindText(uint flags, const TCharRange &r, const tstring &text)
Definition richedit.h:348
void SetFormat(uint fmt)
Definition richedit.h:707
void CmEditCut()
Handler of the CM_EDITCUT command - Invokes the 'Cut' method.
Definition richedit.h:526
Wrapper object which loads the DLL providing the implementation of the RichEdit control.
Definition richedit.h:222
TTextRange encapsulates the TEXTRANGE structure, which contains information about a range of text in ...
Definition richedit.h:193
TTextRange()
Constructs a default 'TTextRange' structure with the data members describing the range and text initi...
Definition richedit.h:667
A streamable class, TValidator defines an abstract data validation object.
Definition validate.h:71
Type-safe encapsulation of a Windows class name, a union between ATOM and LPCTSTR.
Definition module.h:47
TWindow, derived from TEventHandler and TStreamableBase, provides window-specific behavior and encaps...
Definition window.h:414
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)
Definition eventhan.h:436
#define DECLARE_STREAMABLE_OWL(cls, ver)
Definition objstrm.h:1529
#define DECLARE_STREAMABLE_INLINES(cls)
Definition objstrm.h:1538
bool DeleteSelection()
Deletes the currently selected text, and returns false if no text is selected.
Definition edit.cpp:819
void Cut()
Deletes the currently selected text and copies it into the Clipboard.
Definition edit.h:332
TDllLoader< TRichEditModule > TRichEditDll
TRichEditDll is a simple object which takes advantages of OWL's TDllLoader to ensure that only one co...
Definition richedit.h:244
void Copy()
Copies the currently selected text into the Clipboard.
Definition edit.h:323
void Undo()
Undoes the last edit.
Definition edit.h:305
void Clear() override
Override TStatic virtual member functions.
Definition edit.cpp:421
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Definition window.h:92
Object Windows Library (OWLNext Core)
Definition animctrl.h:22
unsigned long ulong
Definition number.h:26
unsigned char uint8
Definition number.h:32
unsigned long uint32
Definition number.h:34
signed short int16
Definition number.h:29
std::istream tistream
Definition strmdefs.h:39
unsigned short uint16
Definition number.h:33
std::string tstring
Definition defs.h:79
unsigned int uint
Definition number.h:25
std::ostream tostream
Definition strmdefs.h:40
#define _OWLCLASS
Definition defs.h:338
Definition of class TRichEdit.
#define CFM_ALL
Definition richedit.h:29
#define PFM_ALL
Definition richedit.h:38
Represents a half-open range of positions in the edit control, e.g.
Definition edit.h:49