10#if !defined(OWL_EDIT_H)
14#if defined(BI_HAS_PRAGMA_ONCE)
52 int GetSize()
const {
return cpMax - cpMin;}
59 int GetNumLines()
const;
64 TRange GetSelection()
const;
65 virtual int GetCurrentPosition()
const;
73 bool IsModified()
const;
76 virtual int GetLineFromPos(
int charPos)
const;
95 bool DeleteSelection();
122 bool FormatLines(
bool addEOL);
125 virtual void LimitText(
int);
126 virtual int GetLimitText()
const;
128 HLOCAL GetMemHandle()
const;
131 void SetPasswordChar(
uint ch);
133 int GetFirstVisibleLine()
const;
135 uint GetPasswordChar()
const;
142 bool CanUndo()
const;
143 void EmptyUndoBuffer();
145 virtual void Paste();
155 void ValidatorError();
156 bool IsRefocusing()
const;
162 void SetNotRequired();
163 void SetRequired(TRequireOption
option = roNonBlank);
164 TRequireOption GetRequired()
const;
165 bool IsRequired()
const;
172 void SetMarginUseFontInfo();
173 uint32 GetMargins()
const;
184 void Clear()
override;
213 void SetupWindow()
override;
221 auto CanClose() ->
bool override;
226 void EvChildInvalid(
HWND);
228 int ScrollText(
int how);
237 TRequireOption Requirement;
245 static TEdit* ValidatorReFocus;
352 return ValidatorReFocus ==
this;
#define PRECONDITION(condition)
Base class for an extensible interface for auto enabling/disabling of commands (menu items,...
A TEdit is an interface object that represents an edit control interface element.
ObjectWindows dynamic-link libraries (DLLs) construct an instance of TModule, which acts as an object...
TNmUpDown is a wrapper of the NM_UPDOWN structure sent with notifications from an 'UpDown' control.
TRect is a mathematical class derived from tagRect.
An interface object that represents a static text interface element.
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...
TResult SendMessage(TMsgId, TParam1=0, TParam2=0) const
Sends a message (msg) to a specified window or windows.
HWND THandle
TWindow encapsulates an HWND.
HWND GetHandle() const
Returns the handle of the window.
#define DECLARE_RESPONSE_TABLE(cls)
#define DECLARE_STREAMABLE_OWL(cls, ver)
#define DECLARE_STREAMABLE_INLINES(cls)
TRequireOption GetRequired() const
Returns the requirement option for the edit control.
void SetLeftMargin(uint16 margin)
void SetReadOnly(bool readOnly)
Sets the edit control to be read-only or read-write.
void SetRect(const TRect &frmtRect)
Sets the formatting rectangle for a multiline edit control.
bool DeleteSelection()
Deletes the currently selected text, and returns false if no text is selected.
void SetRightMargin(uint16 margin)
void ScrollCaret()
EM_SCROLLCARET.
EDITWORDBREAKPROC GetWordBreakProc() const
Get word-breaking procedure.
void Cut()
Deletes the currently selected text and copies it into the Clipboard.
void Scroll(int horizontalUnit, int verticalUnit)
Scroll the text by the specified horizontal and vertical amounts.
void SetMemHandle(HLOCAL localMem)
Sets the memory handle for the edit control's buffer.
virtual uint32 PosFromChar(uint charIndex)
bool FormatLines(bool addEOL)
Indicates if the end-of-line characters (carriage return, linefeed) are to be added or removed from t...
virtual uint32 CharFromPos(int16 x, int16 y)
void CmEditCut()
CM_EDITCUT.
virtual void LimitText(int)
Limit the amount of new text that can be entered in the edit control.
void CmEditUndo()
CM_EDITUNDO.
void CmEditClear()
CM_EDITCLEAR.
bool IsRefocusing() const
Return true when this edit control is attempting to regain focus after an EvKillFocus() with invalid ...
HLOCAL GetMemHandle() const
Return the memory handle for the edit control's buffer.
int LineUp()
EM_SCROLL, SB_LINEUP Scrolls up one line.
virtual void Paste()
Inserts text from the Clipboard into the edit control at the current text insertion point (cursor pos...
void SetMarginUseFontInfo()
void EmptyUndoBuffer()
If an operation inside the edit control can be undone, the edit control undo flag is set.
TValidator * GetValidator()
Return the validator associated with this edit control.
void Copy()
Copies the currently selected text into the Clipboard.
void GetRect(TRect &frmtRect) const
Gets the formatting rectangle of a multiline edit control.
void ClearModify()
Resets the change flag of the edit control causing IsModified to return false.
void Insert(const tstring &str)
virtual int GetLineFromPos(int charPos) const
Return the line number associated with character index "CharPos".
bool CanUndo() const
Returns true if it is possible to undo the last edit.
int GetFirstVisibleLine() const
Indicates the topmost visible line in an edit control.
uint GetPasswordChar() const
Returns the character to be displayed in place of a user-typed character.
int LineDown()
EM_SCROLL, SB_LINEDOWN Scrolls down one line.
uint32 GetMargins() const
void SetNotRequired()
Sets the requirement option for the edit control to reflect a value is not required.
void Insert(LPCTSTR str)
Inserts the text supplied in str into the edit control at the current text insertion point (cursor po...
bool IsRequired() const
Returns true if a value is required for the edit control.
void CmEditPaste()
CM_EDITPASTE.
int PageUp()
EM_SCROLL, SB_PAGEUP Scrolls up one page.
void SetRequired(TRequireOption option=roNonBlank)
Sets the requirement option for the edit control.
bool IsModified() const
Returns true if the user has changed the text in the edit control.
void Undo()
Undoes the last edit.
void CmEditCopy()
CM_EDITCOPY.
int GetNumLines() const
Return the number of lines in the associated edit control.
void Clear() override
Override TStatic virtual member functions.
bool SetSelection(const TRange &r)
void SetRectNP(const TRect &frmtRect)
Sets the formatting rectangle for a multiline edit control.
virtual int GetCurrentPosition() const
Return the current caret position.
void SetWordBreakProc(EDITWORDBREAKPROC proc)
In a multiline edit control, SetWordBreakProc indicates that an application-supplied word-break funct...
void SetTabStops(int numTabs, const int *tabs)
Sets the tab stop positions in a multiline edit control.
int GetLineIndex(int lineNumber) const
In a multiline edit control, GetLineIndex returns the number of characters that appear before the lin...
virtual bool SetSelection(int startPos, int endPos)
Select the characters in the range "startPos .. endPos".
int Search(int startPos, const tstring &text, bool caseSensitive=false, bool wholeWord=false, bool up=false)
TRange GetSelection() const
Functional style overload.
TRange(int b=0, int e=-1)
int PageDown()
EM_SCROLL, SB_PAGEDOWN Scrolls down one page.
bool DeleteSubText(const TRange &r)
void SetPasswordChar(uint ch)
SetPasswordChar sets the character to be displayed in place of a user-typed character.
virtual int GetLimitText() const
void CmEditDelete()
CM_EDITDELETE.
TTransferDirection
The TTransferDirection enum describes the constants that the transfer function uses to determine how ...
Object Windows Library (OWLNext Core)
uint32 MkUint32(uint16 lo, uint16 hi)
uint16 HiUint16(LRESULT r)
LPARAM TParam2
Second parameter type.
WPARAM TParam1
First parameter type.
uint16 LoUint16(LRESULT r)
#define CONST_CAST(targetType, object)
Definition of class TStatic, the class for static controls and base for any control that manages simp...
Represents a half-open range of positions in the edit control, e.g.