OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
Controls

The control classes support standard Windows controls such as list boxes, combo boxes, group boxes, check boxes, scroll bars, buttons, radio buttons, edit controls, and static controls. More...

Classes

class  owl::TButton
 TButton is an interface class derived from TControl that represents a pushbutton interface element. More...
 
class  owl::TCheckBox
 TCheckBox is a streamable interface class that represents a check box control. More...
 
class  owl::TComboBox
 You can use TComboBox to create a combo box or a combo box control in a parent TWindow, or to facilitate communication between your application and the combo box controls of TDialog. More...
 
class  owl::TComboBoxData
 An interface object that represents a transfer buffer for a TComboBox. More...
 
class  owl::TControl
 TControl unifies its derived control classes, such as TScrollBar, TControlGadget, and TButton. More...
 
class  owl::TEdit
 A TEdit is an interface object that represents an edit control interface element. More...
 
struct  owl::TEdit::TRange
 Represents a half-open range of positions in the edit control, e.g. More...
 
class  owl::TEditFile
 TEditFile is a file-editing window. More...
 
class  owl::TEditSearch
 TEditSearch is an edit control that responds to Find, Replace, and FindNext menu commands. More...
 
class  owl::TGauge
 A streamable class derived from TControl, TGauge defines the basic behavior of gauge controls. More...
 
class  owl::TBtnBitmap
 TBtnBitmap is an enhanced version of TBitmap with the ability to update the face color of a bitmap to match the system setting (COLOR_BTNFACE). More...
 
class  owl::TGlyphButton
 TGlyphButton encapsulates a control which is capable of displaying a bitmap (or glyph) and/or text. More...
 
class  owl::TGroupBox
 An instance of a TGroupBox is an interface object that represents a corresponding group box element. More...
 
class  owl::TListBox
 An interface object that represents a corresponding list box element. More...
 
class  owl::TListBoxData
 Used to transfer the contents of a list box. More...
 
class  owl::TNoteTabItem
 TNoteTabItem holds information about each tab in a notetab control. More...
 
class  owl::TNoteTab
 TNoteTab encapsulates a tab control with each tab item along the bottom of the window. More...
 
class  owl::TPickListPopup
 The PickList allows selection of an item from a popup list. More...
 
class  owl::TPickListDialog
 The PickListDialog allows selection of an item from a list in a dialog with OK and Cancel buttons. More...
 
class  owl::TPictureWindow
 This class displays a dib in a window in different ways. More...
 
class  owl::TProgressBar
 
class  owl::TRadioButton
 Defines an interface object that represents a corresponding radio button element in Windows. More...
 
class  owl::TCharFormat
 TCharFormat encapsulates the CHARFORMAT2 structure which contains information about character formatting in a rich edit control. More...
 
class  owl::TCharRange
 TCharRange encapsulates the CHARRANGE structure, which specifies a range of characters in a rich edit control. More...
 
class  owl::TParaFormat
 TParaFormat encapsulates the PARAFORMAT structure, which contains information about paragraph formatting attributes of a rich edit control. More...
 
class  owl::TFormatRange
 TFormatRange encapsulates the FORMATRANGE structure, which contains information that a rich edit control uses to format its output for a particular device. More...
 
class  owl::TEditStream
 TEditStream encapsulates the EDITSTREAM structure, which contains information about a data stream used with a rich edit control. More...
 
class  owl::TTextRange
 TTextRange encapsulates the TEXTRANGE structure, which contains information about a range of text in a rich edit control. More...
 
class  owl::TFindText
 TFindText encapsulates the FINDTEXT structure, which contains information about text to search for in a rich edit control. More...
 
class  owl::TRichEditModule
 Wrapper object which loads the DLL providing the implementation of the RichEdit control. More...
 
class  owl::TRichEdit
 TRichEdit encapsulates a rich edit control, a window in which a user can enter, edit and format text. More...
 

Typedefs

typedef TDllLoader< TRichEditModuleowl::TRichEditDll
 TRichEditDll is a simple object which takes advantages of OWL's TDllLoader to ensure that only one copy of an object [theoretically representing a DLL] is created.
 

Functions

 owl::TEdit::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).
 
 owl::TEdit::TEdit (TWindow *parent, int id, const tstring &text, int x, int y, int w, int h, uint textLimit=0, bool multiline=false, TModule *=nullptr)
 String-aware overload.
 
 owl::TEdit::TEdit (TWindow *parent, int resourceId, uint textLimit=0, TModule *=nullptr)
 Constructor for TEdit associated with a MS-Windows interface element created by MS-Windows from a resource definition.
 
 owl::TEdit::TEdit (THandle hWnd, TModule *=nullptr)
 Constructs a TEdit object to encapsulate (alias) an existing control.
 
 owl::TEdit::~TEdit () override
 Destructor for a TEdit control.
 
 owl::TEdit::TRange::TRange (int b=0, int e=-1)
 
int owl::TEdit::TRange::GetSize () const
 
virtual void owl::TEdit::GetSubText (TCHAR *textBuf, int startPos, int endPos) const
 Deprecated. Use GetTextRange instead.
 
bool owl::TEdit::IsModified () const
 Returns true if the user has changed the text in the edit control.
 
void owl::TEdit::ClearModify ()
 Resets the change flag of the edit control causing IsModified to return false.
 
virtual int owl::TEdit::GetLineFromPos (int charPos) const
 Return the line number associated with character index "CharPos".
 
int owl::TEdit::GetLineIndex (int lineNumber) const
 In a multiline edit control, GetLineIndex returns the number of characters that appear before the line number specified by lineNumber.
 
auto owl::TEdit::Transfer (void *buffer, TTransferDirection) -> uint override
 Transfers state information for TEdit controls.
 
TCHARowl::TEdit::LockBuffer (uint newSize=0)
 Lock and unlock this edit control's buffer.
 
void owl::TEdit::UnlockBuffer (LPCTSTR buffer, bool updateHandle=false)
 Unlock the edit control's buffer locked by LockBuffer.
 
void owl::TEdit::EvChildInvalid (HWND)
 Handler for input validation message sent by parent.
 
int owl::TEdit::ScrollText (int how)
 
 owl::TEditSearch::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).
 
 owl::TEditSearch::TEditSearch (TWindow *parent, int id, const tstring &text, int x=0, int y=0, int w=0, int h=0, TModule *=nullptr)
 String-aware overload.
 
 owl::TEditSearch::TEditSearch (TWindow *parent, int resourceId, TModule &module)
 This constructor, which aliases an Edit control created from a dialog resource is 'unconventional' in that it expects a TModule reference instead of the traditional 'TModule* = 0'.
 
 owl::TEditSearch::~TEditSearch () override
 
void owl::TEditSearch::SetupWindow () override
 
void owl::TEditSearch::DoSearch ()
 Performs a search or replace operation base on information in SearchData.
 
TFindReplaceDialog::TDataowl::TEditSearch::GetSearchData ()
 Returns the search data used for the common dialog.
 
void owl::TEditSearch::SetSearchData (const TFindReplaceDialog::TData &searchdata)
 Uses new search data.
 
TFindReplaceDialogowl::TEditSearch::GetSearchDialog ()
 Returns the common dialog pointer.
 
void owl::TEditSearch::SetSearchDialog (TFindReplaceDialog *searchdialog)
 Uses new common dialog pointer.
 
uint owl::TEditSearch::GetSearchCmd ()
 Returns the user selected command that brought up the search dialog.
 
void owl::TEditSearch::SetSearchCmd (uint searchcmd)
 Remembers the command the user selected to bring up the search dialog.
 
void owl::TEditSearch::CmEditFind ()
 CM_EDITFIND.
 
void owl::TEditSearch::CmEditReplace ()
 CM_EDITREPLACE.
 
void owl::TEditSearch::CeEditFindReplace (TCommandEnabler &ce)
 Enables the find or replace option (only if no dialog is up).
 
void owl::TEditSearch::CmEditFindNext ()
 CM_EDITFINDNEXT.
 
void owl::TEditSearch::CeEditFindNext (TCommandEnabler &ce)
 Enables FindNext (only if there's data to search for).
 
TResult owl::TEditSearch::EvFindMsg (TParam1, TParam2)
 Registered commdlg message.
 
 owl::TNoteTabItem::TNoteTabItem (const tstring &label, INT_PTR clientData=0, int imageIdx=-1, TAbsLocation imageLoc=alLeft)
 Constructor of Notetab Item object.
 
 owl::TNoteTabItem::TNoteTabItem ()
 Default constructor of Notetab Item object.
 
 owl::TNoteTab::TNoteTab (TWindow *parent, int id, int x, int y, int w, int h, TWindow *buddy=0, bool dialogBuddy=true, TModule *module=0)
 Constructor of NoteTab object.
 
 owl::TNoteTab::TNoteTab (TWindow *parent, int resourceId, TWindow *buddy=0, bool dialogBuddy=true, TModule *module=0)
 Constructor of NoteTab object.
 
int owl::TNoteTab::Add (LPCTSTR txt, INT_PTR clientData=0, int imageIdx=-1, TAbsLocation imageLoc=alLeft, bool shouldSelect=true)
 Adds a new tabitem to the notetab control.
 
int owl::TNoteTab::Add (const tstring &txt, INT_PTR clientData=0, int imageIdx=-1, TAbsLocation imageLoc=alLeft, bool shouldSelect=true)
 
int owl::TNoteTab::Insert (LPCTSTR txt, int index, INT_PTR clientData=0, int imageIdx=-1, TAbsLocation imageLoc=alLeft, bool shouldSelect=true)
 Inserts a new TTabItem at the specified index.
 
int owl::TNoteTab::Insert (const tstring &txt, int index, INT_PTR clientData=0, int imageIdx=-1, TAbsLocation imageLoc=alLeft, bool shouldSelect=true)
 
bool owl::TNoteTab::Delete (int index)
 Remove the tabitem at the specified 'index'.
 
bool owl::TNoteTab::DeleteAll ()
 Removes all tab items in the notetab control. Always returns true.
 
int owl::TNoteTab::GetCount () const
 Return the number of tab items in the notetab control.
 
int owl::TNoteTab::GetSel () const
 Returns the index of the selected tabitem.
 
int owl::TNoteTab::SetSel (int index)
 Selects the tabitem at the specified index.
 
void owl::TNoteTab::SetWindowFace (bool)
 Specifies whether active tab should use the system's window color.
 
bool owl::TNoteTab::GetWindowFace () const
 Returns the flag specifying whether the active tab should use the system's window color.
 
void owl::TNoteTab::SetStyle3d (bool)
 Specifies whether the note tab should draw a 3D edge.
 
bool owl::TNoteTab::GetStyle3d () const
 Returns the flag specifying whether the notetab control should draw a 3D border.
 
void owl::TNoteTab::EnableThemes (bool)
 Specifies whether the note tab should use Windows visual styles (themes).
 
bool owl::TNoteTab::AreThemesEnabled () const
 
int owl::TNoteTab::GetFirstVisibleTab () const
 Returns FirstVisibleTab.
 
void owl::TNoteTab::SetFirstVisibleTab (int index)
 Sets FirstVisibleTab to index if index is valid.
 
bool owl::TNoteTab::EnsureVisible (int index)
 If the tab specified by index is not visible, it is scrolled into view.
 
int owl::TNoteTab::GetMinimalHeight ()
 Returns the minimal control height for which tabs are not clipped.
 
TSize owl::TNoteTab::GetMargin () const
 Returns the amount of vertical space above the tabs.
 
void owl::TNoteTab::SetMargin (const TSize &)
 Sets the amount of space to the left of the tabs and above the tabs.
 
TSize owl::TNoteTab::GetLabelMargin () const
 Returns the amount of padding around the tab label.
 
void owl::TNoteTab::SetLabelMargin (const TSize &)
 Sets the amount of padding around the tab label.
 
int owl::TNoteTab::GetLabelImageMargin () const
 Returns the horizontal spacing between image and text in the label.
 
void owl::TNoteTab::SetLabelImageMargin (int)
 Sets the horizontal spacing between image and text in the label.
 
TSize owl::TNoteTab::GetFocusMargin () const
 Returns the margin around the focus rectangle for the selected tab.
 
void owl::TNoteTab::SetFocusMargin (const TSize &)
 Sets the margin around the focus rectangle for the selected tab.
 
int owl::TNoteTab::GetTabSpacing () const
 Returns the horizontal distance between two tabs.
 
void owl::TNoteTab::SetTabSpacing (int)
 Sets the horizontal distance between two tabs.
 
int owl::TNoteTab::GetTabTapering () const
 Returns the amount of narrowing on each side of the tab towards the bottom.
 
void owl::TNoteTab::SetTabTapering (int)
 Sets the amount of narrowing on each side of the tab towards the bottom.
 
int owl::TNoteTab::GetSelectedTabProtrusion () const
 Returns the amount of extra height of the selected tab.
 
void owl::TNoteTab::SetSelectedTabProtrusion (int)
 Sets the amount of extra height of the selected tab.
 
const TFontowl::TNoteTab::GetTabFont () const
 Returns the font used to render the text part of the tab labels.
 
void owl::TNoteTab::SetTabFont (const TFont &)
 Sets the font used to render the text part of the tab labels.
 
const TFontowl::TNoteTab::GetSelectedTabFont () const
 Returns the font used to render the text part of the selected tab label.
 
void owl::TNoteTab::SetSelectedTabFont (const TFont &)
 Sets the font used to render the text part of the selected tab label.
 
TColor owl::TNoteTab::GetTabColor () const
 Returns the fill color used to paint the tabs.
 
void owl::TNoteTab::SetTabColor (const TColor &)
 Sets the fill color used to paint the tabs.
 
TColor owl::TNoteTab::GetSelectedTabColor () const
 Returns the fill color used to paint the selected tab.
 
void owl::TNoteTab::SetSelectedTabColor (const TColor &)
 Sets the fill color used to paint the selected tab.
 
TColor owl::TNoteTab::GetEdgeColor () const
 Returns the pen color used to draw the edges of the tabs.
 
void owl::TNoteTab::SetEdgeColor (const TColor &)
 Sets the pen color used to draw the edges of the tabs.
 
bool owl::TNoteTab::GetItem (int index, TNoteTabItem &item) const
 Retrieve information about the tab item at the specified index.
 
TNoteTabItem owl::TNoteTab::GetItem (int index) const
 Functional style overload.
 
bool owl::TNoteTab::SetItem (int index, const TNoteTabItem &item)
 Updates information about the tab item at the specified index.
 
bool owl::TNoteTab::IsVisible (int index) const
 Returns true if the tab item at the specified index is visible.
 
bool owl::TNoteTab::IsFullyVisible (int index) const
 Returns true if the horizontal projection of the tab item at the specified index is contained within the horizontal projection of the current effective tabs area.
 
TAbsLocation owl::TNoteTab::GetScrollLocation () const
 Get the scroller location.
 
void owl::TNoteTab::SetScrollLocation (TAbsLocation pos)
 Set the scroller location.
 
void owl::TNoteTab::SetCelArray (TCelArray *array, TAutoDelete=AutoDelete)
 Sets the bitmap array to be used for the tabs.
 
TCelArrayowl::TNoteTab::GetCelArray ()
 Get a pointer to the array of bitmaps used for the tabs.
 
void owl::TNoteTab::SetCelArrayTransparentColor (const TColor &)
 Sets the color assigned to denote transparency in the bitmaps used for the tabs (see SetCelArray).
 
TColor owl::TNoteTab::GetCelArrayTransparentColor () const
 Returns the color assigned to denote transparency in the bitmaps used for the tabs (see SetCelArray).
 
HWND owl::TNoteTab::GetBuddy () const
 Return handle of buddy window associated with the notetab control.
 
void owl::TNoteTab::SetBuddy (HWND buddy)
 Sets handle of the buddy window associated with this notetab control.
 
auto owl::TNoteTab::Transfer (void *buffer, TTransferDirection) -> uint override
 Overrides TWindow virtual member function to handle transfers.
 
auto owl::TNoteTab::GetWindowClassName () -> TWindowClassName override
 Returns "OWL_Notetab" - the Window class name of the notetab control object.
 
void owl::TNoteTab::SetupWindow () override
 Overriden virtual of TWindow - Initializes font used by control and resize accordingly.
 
void owl::TNoteTab::Paint (TDC &, bool erase, TRect &) override
 TWindow::Paint override.
 
void owl::TNoteTab::EvSize (uint sizeType, const TSize &size)
 WM_SIZE handler - Relay tab items.
 
void owl::TNoteTab::EvLButtonDown (uint modKeys, const TPoint &point)
 WM_LBUTTONDOWN handler - Checks whether the mouse was clicked on a tab item and selects it.
 
uint owl::TNoteTab::EvGetDlgCode (const MSG *msg)
 WM_GETDLGCODE handler - Informs dialog manager that arrow keys are to be used.
 
void owl::TNoteTab::EvKeyDown (uint key, uint repeatCount, uint flags)
 WM_KEYDOWN handler - handles arrow keys to allow user to navigate through tab items.
 
void owl::TNoteTab::EvSetFocus (THandle hWndLostFocus)
 Handle WM_SETFOCUS: Draw focus to identify selected tab.
 
void owl::TNoteTab::EvKillFocus (THandle hwndGetFocus)
 Handle WM_KillFOCUS: Remove dotted focus rectangle from selected tab.
 
void owl::TNoteTab::EvHScroll (uint scrollCode, uint thumbPos, HWND hWndCtl)
 Sets the first visible tab to the given thumb position.
 
void owl::TNoteTab::EvPaint ()
 EV_WM_PAINT handler.
 
bool owl::TNoteTab::EvEraseBkgnd (HDC)
 Disables automatic background erasure by returning false.
 
void owl::TNoteTab::InitCtrl ()
 Initialize internal variables used by NoteTab.
 
void owl::TNoteTab::SetTabRects (int firstTab)
 Lays out tab items (and scroll buttons) with the specified index at the leftmost.
 
void owl::TNoteTab::InvalidateTab (int index)
 Invalidates the rectangle occupied by the tab at the specified index.
 
void owl::TNoteTab::SetTabSize (int index)
 Updates the internal information stored about the label of a particular tab item.
 
int owl::TNoteTab::TabFromPoint (const TPoint &pt) const
 Returns the index of the tab item at the specified window coordinate.
 
TRect owl::TNoteTab::GetScrollingTabsArea () const
 Returns the rectangle of the area reserved for tabs when scrolling is active.
 
TRect owl::TNoteTab::GetScrollerArea () const
 Returns the desired location of the scrollers within the tab.
 
bool owl::TNoteTab::NotifyAndSelect (int index)
 Selects the tab at the given index and sends the appropriate notifications.
 
void owl::TNoteTab::Update ()
 

Variables

int owl::TEdit::TRange::cpMin
 
int owl::TEdit::TRange::cpMax
 
TRect owl::TNoteTabItem::Rect
 Location of tab [client-area base coords].
 
tstring owl::TNoteTabItem::Label
 Label of tab.
 
TSize owl::TNoteTabItem::LabelSize
 Width and height of label.
 
INT_PTR owl::TNoteTabItem::ClientData
 User-defined data associated with item.
 
int owl::TNoteTabItem::ImageIdx
 Index of tab image.
 
TAbsLocation owl::TNoteTabItem::ImageLoc
 Placement of tab image.
 

Requirement type and functions

enum  owl::TEdit::TRequireOption { owl::TEdit::roNone , owl::TEdit::roNonEmpty , owl::TEdit::roNonBlank }
 
void owl::TEdit::SetNotRequired ()
 Sets the requirement option for the edit control to reflect a value is not required.
 
void owl::TEdit::SetRequired (TRequireOption option=roNonBlank)
 Sets the requirement option for the edit control.
 
TRequireOption owl::TEdit::GetRequired () const
 Returns the requirement option for the edit control.
 
bool owl::TEdit::IsRequired () const
 Returns true if a value is required for the edit control.
 

Accessors

int owl::TEdit::GetNumLines () const
 Return the number of lines in the associated edit control.
 
int owl::TEdit::GetLineLength (int lineNumber) const
 Return the length of line number "lineNumber".
 
bool owl::TEdit::GetLine (TCHAR *str, int strSize, int lineNumber) const
 Return the text of line number "lineNumber" (0-terminated)
 
tstring owl::TEdit::GetLine (int lineNumber) const
 String-aware overload If the length of the returned string differs from GetLineLength an error occured.
 
virtual void owl::TEdit::GetSelection (int &startPos, int &endPos) const
 Return the starting and ending positions of the selected text.
 
TRange owl::TEdit::GetSelection () const
 Functional style overload.
 
virtual int owl::TEdit::GetCurrentPosition () const
 Return the current caret position.
 
virtual tstring owl::TEdit::GetTextRange (const TRange &) const
 Retrieves a specified range of text from the edit control.
 

Operations

bool owl::TEdit::DeleteSubText (int startPos, int endPos)
 Deletes the text between the starting and ending positions specified by startPos and endPos, respectively.
 
bool owl::TEdit::DeleteSubText (const TRange &r)
 
bool owl::TEdit::DeleteLine (int lineNumber)
 Deletes the text in the line specified by lineNumber in a multiline edit control.
 
bool owl::TEdit::DeleteSelection ()
 Deletes the currently selected text, and returns false if no text is selected.
 
virtual bool owl::TEdit::SetSelection (int startPos, int endPos)
 Select the characters in the range "startPos .. endPos".
 
bool owl::TEdit::SetSelection (const TRange &r)
 
bool owl::TEdit::ClearSelection ()
 

Scrolling text

void owl::TEdit::Scroll (int horizontalUnit, int verticalUnit)
 Scroll the text by the specified horizontal and vertical amounts.
 
void owl::TEdit::ScrollCaret ()
 EM_SCROLLCARET.
 
int owl::TEdit::LineDown ()
 EM_SCROLL, SB_LINEDOWN Scrolls down one line.
 
int owl::TEdit::LineUp ()
 EM_SCROLL, SB_LINEUP Scrolls up one line.
 
int owl::TEdit::PageDown ()
 EM_SCROLL, SB_PAGEDOWN Scrolls down one page.
 
int owl::TEdit::PageUp ()
 EM_SCROLL, SB_PAGEUP Scrolls up one page.
 
void owl::TEdit::Insert (LPCTSTR str)
 Inserts the text supplied in str into the edit control at the current text insertion point (cursor position), and replaces any currently selected text.
 
void owl::TEdit::Insert (const tstring &str)
 
virtual int owl::TEdit::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 found
 
int owl::TEdit::Search (int startPos, const tstring &text, bool caseSensitive=false, bool wholeWord=false, bool up=false)
 
void owl::TEdit::GetRect (TRect &frmtRect) const
 Gets the formatting rectangle of a multiline edit control.
 
void owl::TEdit::SetRect (const TRect &frmtRect)
 Sets the formatting rectangle for a multiline edit control.
 
void owl::TEdit::SetRectNP (const TRect &frmtRect)
 Sets the formatting rectangle for a multiline edit control.
 
bool owl::TEdit::FormatLines (bool addEOL)
 Indicates if the end-of-line characters (carriage return, linefeed) are to be added or removed from text lines that are wordwrapped in a multiline edit control.
 
void owl::TEdit::SetTabStops (int numTabs, const int *tabs)
 Sets the tab stop positions in a multiline edit control.
 
virtual void owl::TEdit::LimitText (int)
 Limit the amount of new text that can be entered in the edit control.
 
virtual int owl::TEdit::GetLimitText () const
 
HLOCAL owl::TEdit::GetMemHandle () const
 Return the memory handle for the edit control's buffer.
 
void owl::TEdit::SetMemHandle (HLOCAL localMem)
 Sets the memory handle for the edit control's buffer.
 
void owl::TEdit::SetPasswordChar (uint ch)
 SetPasswordChar sets the character to be displayed in place of a user-typed character.
 
int owl::TEdit::GetFirstVisibleLine () const
 Indicates the topmost visible line in an edit control.
 
void owl::TEdit::SetReadOnly (bool readOnly)
 Sets the edit control to be read-only or read-write.
 
uint owl::TEdit::GetPasswordChar () const
 Returns the character to be displayed in place of a user-typed character.
 
EDITWORDBREAKPROC owl::TEdit::GetWordBreakProc () const
 Get word-breaking procedure.
 
void owl::TEdit::SetWordBreakProc (EDITWORDBREAKPROC proc)
 In a multiline edit control, SetWordBreakProc indicates that an application-supplied word-break function has replaced the default word-break function.
 

Clipboard operations

bool owl::TEdit::CanUndo () const
 Returns true if it is possible to undo the last edit.
 
void owl::TEdit::EmptyUndoBuffer ()
 If an operation inside the edit control can be undone, the edit control undo flag is set.
 
void owl::TEdit::Undo ()
 Undoes the last edit.
 
virtual void owl::TEdit::Paste ()
 Inserts text from the Clipboard into the edit control at the current text insertion point (cursor position).
 
void owl::TEdit::Copy ()
 Copies the currently selected text into the Clipboard.
 
void owl::TEdit::Cut ()
 Deletes the currently selected text and copies it into the Clipboard.
 

Validator functions

bool owl::TEdit::IsValid (bool reportErr=false)
 Always returns true if the TEdit object does not have an associated TValidator object (i.e.
 
TValidatorowl::TEdit::GetValidator ()
 Return the validator associated with this edit control.
 
void owl::TEdit::SetValidator (TValidator *validator)
 Sets a new validator for this control, can be 0. Cleans up the old validator.
 
void owl::TEdit::ValidatorError ()
 Handles validation errors that occur as a result of validating the edit control.
 
bool owl::TEdit::IsRefocusing () const
 Return true when this edit control is attempting to regain focus after an EvKillFocus() with invalid contents.
 

Margin functions

void owl::TEdit::SetLeftMargin (uint16 margin)
 
void owl::TEdit::SetRightMargin (uint16 margin)
 
void owl::TEdit::SetMarginUseFontInfo ()
 
uint32 owl::TEdit::GetMargins () const
 

Position and character functions

virtual uint32 owl::TEdit::CharFromPos (int16 x, int16 y)
 
virtual uint32 owl::TEdit::PosFromChar (uint charIndex)
 
void owl::TEdit::Clear () override
 Override TStatic virtual member functions.
 

Command response functions for edit menu items

void owl::TEdit::CmEditCut ()
 CM_EDITCUT.
 
void owl::TEdit::CmEditCopy ()
 CM_EDITCOPY.
 
void owl::TEdit::CmEditPaste ()
 CM_EDITPASTE.
 
void owl::TEdit::CmEditDelete ()
 CM_EDITDELETE.
 
void owl::TEdit::CmEditClear ()
 CM_EDITCLEAR.
 
void owl::TEdit::CmEditUndo ()
 CM_EDITUNDO.
 

Command enabler functions for edit menu items

void owl::TEdit::CmSelectEnable (TCommandEnabler &commandHandler)
 This function is called for Cut/Copy/Delete menu items to determine whether or not the item is enabled.
 
void owl::TEdit::CmPasteEnable (TCommandEnabler &commandHandler)
 This function is called for the Paste menu item to determine whether or not the item is enabled.
 
void owl::TEdit::CmCharsEnable (TCommandEnabler &commandHandler)
 This function is called for the Clear menu item to determine whether or not the item is enabled.
 
void owl::TEdit::CmModEnable (TCommandEnabler &commandHandler)
 This function is called for the Undo menu item to determine whether or not the item is enabled.
 

Child id notification handled at the child

void owl::TEdit::ENErrSpace ()
 EN_ERRSPACE.
 

Override TWindow virtual member functions

auto owl::TEdit::GetWindowClassName () -> TWindowClassName override
 Return name of predefined Windows edit class.
 
void owl::TEdit::SetupWindow () override
 
void owl::TEdit::EvChar (uint key, uint repeatCount, uint flags)
 Validates Self whenever a character is entered.
 
void owl::TEdit::EvKeyDown (uint key, uint repeatCount, uint flags)
 EvKeyDown translates the virtual key code into a movement.
 
uint owl::TEdit::EvGetDlgCode (const MSG *)
 Responds to WM_GETDLGCODE messages that are sent to a dialog box associated with a control.
 
void owl::TEdit::EvSetFocus (HWND hWndLostFocus)
 Handle the set focus message and make sure the anti-oscillation flag is cleared.
 
void owl::TEdit::EvKillFocus (HWND hWndGetFocus)
 Validates this whenever the focus is about to be lost.
 
bool owl::TEdit::EvUpDown (TNmUpDown &)
 Handles up-down messages from an up-down control and adjusts contents if there is a validator to help.
 
auto owl::TEdit::CanClose () -> bool override
 Checks to see if all child windows can be closed before closing the current window.
 

Detailed Description

The control classes support standard Windows controls such as list boxes, combo boxes, group boxes, check boxes, scroll bars, buttons, radio buttons, edit controls, and static controls.

Although most windows come with scroll bars already installed, you can use TScrollBar to create a standalone vertical or horizontal scroll bar; for example, as a dialog box control.

Unlike standard Windows controls, ObjectWindows supports widgets, specialized controls written entirely in C++. The widget classes ObjectWindows provides include support for sliders, controls that are used for providing nonscrolling position information, and gauges, controls that provide duration or analog information about a particular process.

Typedef Documentation

◆ TRichEditDll

TRichEditDll is a simple object which takes advantages of OWL's TDllLoader to ensure that only one copy of an object [theoretically representing a DLL] is created.

TRichEditDll provides the 'IsAvailable' method which returns true if the DLL is available and loaded. TRichEditDll is used internally by OWL's TRichEdit class to ensure that the DLL is available and loaded. You may consider using TRichEditDll if your application creates rich edit controls without instantiating a TRichEdit object. (For example, if the control is part of a dialog resource). The following snippet illustrates:

if (!TRichEditDll::IsAvailable()) {
Error("Unable to load Rich Edit DLL");
}

Definition at line 244 of file richedit.h.

Enumeration Type Documentation

◆ TRequireOption

Enumerator
roNone 
roNonEmpty 
roNonBlank 

Definition at line 161 of file edit.h.

Function Documentation

◆ TEdit() [1/4]

owl::TEdit::TEdit ( THandle hWnd,
TModule * module = nullptr )

Constructs a TEdit object to encapsulate (alias) an existing control.

Definition at line 144 of file edit.cpp.

References owl::TWindow::EnableTransfer().

◆ TEdit() [2/4]

owl::TEdit::TEdit ( TWindow * parent,
int id,
const tstring & text,
int x,
int y,
int w,
int h,
uint textLimit = 0,
bool multiline = false,
TModule * module = nullptr )

String-aware overload.

Definition at line 115 of file edit.cpp.

References owl::TWindow::ModifyExStyle(), owl::TWindow::ModifyStyle(), and WS_EX_CLIENTEDGE.

◆ TEdit() [3/4]

owl::TEdit::TEdit ( TWindow * parent,
int id,
LPCTSTR text,
int x,
int y,
int w,
int h,
uint textLen = 0,
bool multiline = false,
TModule * module = nullptr )

Constructs an edit control object with a parent window (parent).

Sets the creation attributes of the edit control and fills its Attr data members with the specified control ID (Id), position (x, y) relative to the origin of the parent window's client area, width (w), and height (h). If text buffer length (textLimit) is 0 or 1, there is no explicit limit to the number of characters that can be entered. Otherwise textLimit - 1 characters can be entered. By default, initial text (text) in the edit control is left-justified and the edit control has a border. Multiline edit controls have horizontal and vertical scroll bars

Definition at line 100 of file edit.cpp.

References WS_EX_CLIENTEDGE.

◆ TEdit() [4/4]

owl::TEdit::TEdit ( TWindow * parent,
int resourceId,
uint textLen = 0,
TModule * module = nullptr )

Constructor for TEdit associated with a MS-Windows interface element created by MS-Windows from a resource definition.

Constructs a TEdit object to be associated with an edit control of a TDialog. Invokes the TStatic constructor with identical parameters. The resourceID parameter must correspond to an edit resource that you define. Enables the data transfer mechanism by calling EnableTransfer.

Definition at line 135 of file edit.cpp.

References owl::TWindow::EnableTransfer().

◆ TEditSearch() [1/3]

owl::TEditSearch::TEditSearch ( TWindow * parent,
int id,
const tstring & text,
int x = 0,
int y = 0,
int w = 0,
int h = 0,
TModule * module = nullptr )

String-aware overload.

Definition at line 52 of file editsear.cpp.

◆ TEditSearch() [2/3]

owl::TEditSearch::TEditSearch ( TWindow * parent,
int resourceId,
TModule & module )
inline

This constructor, which aliases an Edit control created from a dialog resource is 'unconventional' in that it expects a TModule reference instead of the traditional 'TModule* = 0'.

This is, however, to avoid ambiguities between the two forms of constructor. Since it is traditionally created as a child of a TDialog-derived class, you can simply use the module of the parent object. For example,

TMyDialog::TMyDialog(....)
{
edit = new TEditSearch(this, ID_EDIT1, *GetModule());
}
TModule * GetModule() const
Returns a pointer to the module object.
Definition window.h:1841
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).
Definition editsear.cpp:35

Definition at line 126 of file editsear.h.

◆ TEditSearch() [3/3]

owl::TEditSearch::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).

Definition at line 35 of file editsear.cpp.

◆ TNoteTab() [1/2]

owl::TNoteTab::TNoteTab ( TWindow * parent,
int id,
int x,
int y,
int w,
int h,
TWindow * buddy = 0,
bool dialogBuddy = true,
TModule * module = 0 )

Constructor of NoteTab object.

Use this constructor when creating a notetab control from scratch.

Definition at line 64 of file notetab.cpp.

References owl::TNoteTab::InitCtrl().

◆ TNoteTab() [2/2]

owl::TNoteTab::TNoteTab ( TWindow * parent,
int resourceId,
TWindow * buddy = 0,
bool dialogBuddy = true,
TModule * module = 0 )

Constructor of NoteTab object.

Use this constructor when aliasing a control defined within a dialog template.

Definition at line 82 of file notetab.cpp.

References owl::TNoteTab::InitCtrl().

◆ TNoteTabItem() [1/2]

owl::TNoteTabItem::TNoteTabItem ( )
inline

Default constructor of Notetab Item object.

Definition at line 343 of file notetab.h.

◆ TNoteTabItem() [2/2]

owl::TNoteTabItem::TNoteTabItem ( const tstring & label,
INT_PTR clientData = 0,
int imageIdx = -1,
TAbsLocation imageLoc = alLeft )
inline

Constructor of Notetab Item object.

Initializes object with specified string label and optional user-defined data.

Definition at line 329 of file notetab.h.

◆ TRange()

owl::TEdit::TRange::TRange ( int b = 0,
int e = -1 )
inline

Definition at line 50 of file edit.h.

◆ ~TEdit()

owl::TEdit::~TEdit ( )
override

Destructor for a TEdit control.

Definition at line 154 of file edit.cpp.

References owl::TEdit::SetValidator().

◆ ~TEditSearch()

owl::TEditSearch::~TEditSearch ( )
override

Definition at line 70 of file editsear.cpp.

◆ Add() [1/2]

int owl::TNoteTab::Add ( const tstring & txt,
INT_PTR clientData = 0,
int imageIdx = -1,
TAbsLocation imageLoc = alLeft,
bool shouldSelect = true )
inline

Definition at line 94 of file notetab.h.

◆ Add() [2/2]

int owl::TNoteTab::Add ( LPCTSTR txt,
INT_PTR clientData = 0,
int imageIdx = -1,
TAbsLocation imageLoc = alLeft,
bool shouldSelect = true )

Adds a new tabitem to the notetab control.

Definition at line 122 of file notetab.cpp.

References owl::TNoteTab::GetCount(), and owl::TNoteTab::Insert().

◆ AreThemesEnabled()

bool owl::TNoteTab::AreThemesEnabled ( ) const
inline

Definition at line 136 of file notetab.h.

◆ CanClose()

bool owl::TEdit::CanClose ( ) -> bool
overrideprotectedvirtual

Checks to see if all child windows can be closed before closing the current window.

If any child window returns false, CanClose returns false and terminates the process. If all child windows can be closed, CanClose returns true.

Reimplemented from owl::TWindow.

Reimplemented in owl::TEditFile, owl::TEditView, and owl::TRichEditView.

Definition at line 432 of file edit.cpp.

References owl::TWindow::CanClose(), owl::TEdit::IsValid(), and owl::TWindow::IsWindowEnabled().

◆ CanUndo()

bool owl::TEdit::CanUndo ( ) const
inline

Returns true if it is possible to undo the last edit.

Definition at line 690 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ CeEditFindNext()

void owl::TEditSearch::CeEditFindNext ( TCommandEnabler & ce)
protected

Enables FindNext (only if there's data to search for).

Definition at line 169 of file editsear.cpp.

References owl::TFindReplaceDialog::TData::FindWhat.

◆ CeEditFindReplace()

void owl::TEditSearch::CeEditFindReplace ( TCommandEnabler & ce)
protected

Enables the find or replace option (only if no dialog is up).

Definition at line 147 of file editsear.cpp.

◆ CharFromPos()

uint32 owl::TEdit::CharFromPos ( int16 x,
int16 y )
inlinevirtual

Reimplemented in owl::TRichEdit.

Definition at line 732 of file edit.h.

References owl::TWindow::GetHandle(), owl::MkUint32(), PRECONDITION, and owl::TWindow::SendMessage().

◆ Clear()

void owl::TEdit::Clear ( )
overridevirtual

Override TStatic virtual member functions.

Overrides TStatic's virtual member function and clears all text.

Reimplemented from owl::TStatic.

Definition at line 421 of file edit.cpp.

References owl::TEdit::DeleteSubText().

◆ ClearModify()

void owl::TEdit::ClearModify ( )
inline

Resets the change flag of the edit control causing IsModified to return false.

The flag is set when text is modified.

Definition at line 276 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ ClearSelection()

bool owl::TEdit::ClearSelection ( )
inline

Definition at line 98 of file edit.h.

◆ CmCharsEnable()

void owl::TEdit::CmCharsEnable ( TCommandEnabler & commandHandler)
protected

This function is called for the Clear menu item to determine whether or not the item is enabled.

Definition at line 466 of file edit.cpp.

References owl::TEdit::GetLineLength(), and owl::TEdit::GetNumLines().

◆ CmEditClear()

void owl::TEdit::CmEditClear ( )
inlineprotected

CM_EDITCLEAR.

Automatically responds to a menu selection with a menu ID of CM_EDITCLEAR by calling Clear().

Definition at line 390 of file edit.h.

References owl::TEdit::Clear().

◆ CmEditCopy()

void owl::TEdit::CmEditCopy ( )
inlineprotected

CM_EDITCOPY.

Automatically responds to a menu selection with a menu ID of CM_EDITCOPY by calling Copy().

Definition at line 366 of file edit.h.

References owl::TEdit::Copy().

◆ CmEditCut()

void owl::TEdit::CmEditCut ( )
inlineprotected

CM_EDITCUT.

Automatically responds to a menu selection with a menu ID of CM_EDITCUT by calling Cut().

Definition at line 358 of file edit.h.

References owl::TEdit::Cut().

◆ CmEditDelete()

void owl::TEdit::CmEditDelete ( )
inlineprotected

CM_EDITDELETE.

Automatically responds to a menu selection with a menu ID of CM_EDITDELETE by calling DeleteSelection().

Definition at line 382 of file edit.h.

References owl::TEdit::DeleteSelection().

◆ CmEditFind()

void owl::TEditSearch::CmEditFind ( )
protected

CM_EDITFIND.

Opens a modeless TFindDialog in response to an incoming Find command with a CM_EDITFIND command.

Definition at line 118 of file editsear.cpp.

References owl::TDialog::Create().

◆ CmEditFindNext()

void owl::TEditSearch::CmEditFindNext ( )
protected

CM_EDITFINDNEXT.

Responds to an incoming FindNext command with a CM_EDITFINDNEXT command identifier by calling DoSearch to repeat the search operation.

Definition at line 157 of file editsear.cpp.

References owl::TEditSearch::DoSearch(), owl::TFindReplaceDialog::TData::Flags, and owl::TFindReplaceDialog::UpdateData().

◆ CmEditPaste()

void owl::TEdit::CmEditPaste ( )
inlineprotected

CM_EDITPASTE.

Automatically responds to a menu selection with a menu ID of CM_EDITPASTE by calling Paste().

Definition at line 374 of file edit.h.

References owl::TEdit::Paste().

◆ CmEditReplace()

void owl::TEditSearch::CmEditReplace ( )
protected

CM_EDITREPLACE.

Opens a TReplaceDialog in response to an incoming Replace command with a CM_EDITREPLACE command.

Definition at line 133 of file editsear.cpp.

References owl::TDialog::Create().

◆ CmEditUndo()

void owl::TEdit::CmEditUndo ( )
inlineprotected

CM_EDITUNDO.

Automatically responds to a menu selection with a menu ID of CM_EDITUNDO by calling Undo().

Definition at line 398 of file edit.h.

References owl::TEdit::Undo().

◆ CmModEnable()

void owl::TEdit::CmModEnable ( TCommandEnabler & commandHandler)
protected

This function is called for the Undo menu item to determine whether or not the item is enabled.

Definition at line 476 of file edit.cpp.

References owl::TEdit::IsModified().

◆ CmPasteEnable()

void owl::TEdit::CmPasteEnable ( TCommandEnabler & commandHandler)
protected

This function is called for the Paste menu item to determine whether or not the item is enabled.

Definition at line 455 of file edit.cpp.

References owl::TClipboard::IsClipboardFormatAvailable().

◆ CmSelectEnable()

void owl::TEdit::CmSelectEnable ( TCommandEnabler & commandHandler)
protected

This function is called for Cut/Copy/Delete menu items to determine whether or not the item is enabled.

Definition at line 442 of file edit.cpp.

References owl::TEdit::GetSelection().

◆ Copy()

void owl::TEdit::Copy ( )
inline

Copies the currently selected text into the Clipboard.

Definition at line 323 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ Cut()

void owl::TEdit::Cut ( )
inline

Deletes the currently selected text and copies it into the Clipboard.

Definition at line 332 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ Delete()

bool owl::TNoteTab::Delete ( int index)

Remove the tabitem at the specified 'index'.

Returns true on success; false otherwise.

Definition at line 162 of file notetab.cpp.

References CHECK, owl::TNoteTab::GetCount(), owl::TNoteTab::InvalidateTab(), owl::TNoteTab::IsVisible(), and owl::TNoteTab::SetTabRects().

◆ DeleteAll()

bool owl::TNoteTab::DeleteAll ( )

Removes all tab items in the notetab control. Always returns true.

Definition at line 209 of file notetab.cpp.

◆ DeleteLine()

bool owl::TEdit::DeleteLine ( int lineNumber)

Deletes the text in the line specified by lineNumber in a multiline edit control.

If -1 passed, deletes the current line. DeleteLine does not delete the line break and affects no other lines. Returns true if successful. Returns false if lineNumber is not -1 and is out of range or if an error occurs.

Definition at line 854 of file edit.cpp.

References _T, owl::TEdit::DeleteSubText(), owl::TEdit::GetLineFromPos(), owl::TEdit::GetLineIndex(), owl::TEdit::GetLineLength(), and owl::TStatic::SetText().

◆ DeleteSelection()

bool owl::TEdit::DeleteSelection ( )

Deletes the currently selected text, and returns false if no text is selected.

Definition at line 819 of file edit.cpp.

References owl::TEdit::GetSelection(), and owl::TWindow::SendMessage().

◆ DeleteSubText() [1/2]

bool owl::TEdit::DeleteSubText ( const TRange & r)
inline

Definition at line 93 of file edit.h.

References owl::TEdit::DeleteSubText().

◆ DeleteSubText() [2/2]

bool owl::TEdit::DeleteSubText ( int startPos,
int endPos )

Deletes the text between the starting and ending positions specified by startPos and endPos, respectively.

DeleteSubText returns true if successful.

Definition at line 838 of file edit.cpp.

References owl::TEdit::DeleteSelection(), and owl::TEdit::SetSelection().

◆ DoSearch()

void owl::TEditSearch::DoSearch ( )

◆ EmptyUndoBuffer()

void owl::TEdit::EmptyUndoBuffer ( )
inline

If an operation inside the edit control can be undone, the edit control undo flag is set.

EmptyUndoBuffer resets or clears this flag.

Definition at line 296 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ EnableThemes()

void owl::TNoteTab::EnableThemes ( bool st)
inline

Specifies whether the note tab should use Windows visual styles (themes).

Definition at line 396 of file notetab.h.

References owl::TNoteTab::Update().

◆ ENErrSpace()

void owl::TEdit::ENErrSpace ( )
protected

EN_ERRSPACE.

Beeps when edit control runs out of space.

Sounds a beep in response to an error notification message that is sent when the edit control unsuccessfully attempts to allocate more memory.

Definition at line 166 of file edit.cpp.

References owl::TWindow::DefaultProcessing().

◆ EnsureVisible()

bool owl::TNoteTab::EnsureVisible ( int index)

If the tab specified by index is not visible, it is scrolled into view.

If the given index is -1, the index of the selected tab is used instead. Returns true if successful, false on failure.

Definition at line 1637 of file notetab.cpp.

References CHECK, owl::TNoteTab::GetCount(), owl::TNoteTab::GetFirstVisibleTab(), owl::TNoteTab::GetSel(), owl::TNoteTab::IsFullyVisible(), PRECONDITION, and owl::TNoteTab::SetFirstVisibleTab().

◆ EvChar()

void owl::TEdit::EvChar ( uint key,
uint repeatCount,
uint flags )
protected

Validates Self whenever a character is entered.

Allows the character entry to be processed normally, then validates the result and restores Self's text to its original state if there is an incorrect entry. By default, the SupressFill parameter of the IsValidInput method call to the Validator is set to False, so that it is free to modify the string, if it is so configured.

Definition at line 214 of file edit.cpp.

References _tcscpy, _tcslen, owl::TValidator::Error(), owl::TWindow::EvChar(), owl::TEdit::GetSelection(), owl::TStatic::GetText(), owl::TStatic::GetTextLen(), owl::TValidator::HasOption(), owl::TEdit::IsModified(), owl::TValidator::IsValidInput(), owl::TEdit::LockBuffer(), owl::TWindow::SendMessage(), owl::TEdit::SetSelection(), owl::TEdit::UnlockBuffer(), and owl::voOnAppend.

◆ EvChildInvalid()

void owl::TEdit::EvChildInvalid ( HWND )
protected

Handler for input validation message sent by parent.

Handle input validation message sent by parent.

Definition at line 403 of file edit.cpp.

References owl::TEdit::ValidatorError().

◆ EvEraseBkgnd()

bool owl::TNoteTab::EvEraseBkgnd ( HDC )
protected

Disables automatic background erasure by returning false.

Definition at line 1672 of file notetab.cpp.

◆ EvFindMsg()

TResult owl::TEditSearch::EvFindMsg ( TParam1 ,
TParam2 param2 )
protected

Registered commdlg message.

Responds to a message sent by the modeless find or replace dialog box.

Calls DoSearch to continue searching if text is not found or the end of the document has not been reached.

Definition at line 180 of file editsear.cpp.

References owl::TEditSearch::DoSearch(), owl::TFindReplaceDialog::TData::Flags, PRECONDITION, and owl::TFindReplaceDialog::UpdateData().

◆ EvGetDlgCode() [1/2]

uint owl::TEdit::EvGetDlgCode ( const MSG * msg)
protected

Responds to WM_GETDLGCODE messages that are sent to a dialog box associated with a control.

EvGetDlgCode allows the dialog manager to intercept a message that would normally go to a control and then ask the control if it wants to process this message. If not, the dialog manager processes the message. The msg parameter indicates the kind of message, for example a control, command, or edit message, sent to the dialog box manager. If the edit control contains valid input, then TABs are allowed for changing focus. Otherwise, request that TABs be sent to Self, where we will generate the Invalid message (See EvKeyDown()). Tabulator handling is needed, because if EvKillFocus simply disregards validating upon focus changes to the Ok/Cancel buttons, then tabbing to either of those controls from an invalid field would bypass validation, an undesired side-effect. Or simply, if focus is set to the Cancel button because it was pressed, we don't want validation; if focus was set via tabbing, we do want validation. So tabulator handling is captured since EvKillFocus won't know the difference.

Definition at line 193 of file edit.cpp.

References owl::TWindow::EvGetDlgCode(), and owl::TEdit::IsValid().

◆ EvGetDlgCode() [2/2]

uint owl::TNoteTab::EvGetDlgCode ( const MSG * msg)
protected

WM_GETDLGCODE handler - Informs dialog manager that arrow keys are to be used.

Definition at line 1223 of file notetab.cpp.

References owl::TWindow::EvGetDlgCode().

◆ EvHScroll()

void owl::TNoteTab::EvHScroll ( uint scrollCode,
uint thumbPos,
HWND hWndCtl )
protected

Sets the first visible tab to the given thumb position.

Definition at line 1653 of file notetab.cpp.

References owl::TNoteTab::SetFirstVisibleTab().

◆ EvKeyDown() [1/2]

void owl::TEdit::EvKeyDown ( uint key,
uint repeatCount,
uint flags )
protected

EvKeyDown translates the virtual key code into a movement.

key indicates the virtual key code of the pressed key, repeatCount holds the number of times the same key is pressed, flags contains one of the messages that translates to a virtual key (VK) code for the mode indicators. If the Tab key is sent to the edit control, EvKeyDown checks the validity before allowing the focus to change. The control will only get a TAB if EvGetDlgCode(above) allows it, which is done when the control contains invalid input (we re-validate here just for completeness, in case descendants redefine any of this behavior). We need to validate on TAB focus-changes because there is a case not handled by EvKillFocus: when focus is lost to an OK or Cancel button by tabbing. See EvGetDlgCode for more information. Otherwise, for validators with the OnAppend option, perform an input validation if the selection moves to the end. i.e. it becomes appending.

Definition at line 285 of file edit.cpp.

References _tcslen, owl::TWindow::DefaultProcessing(), owl::TValidator::Error(), owl::TEdit::GetSelection(), owl::TStatic::GetTextLen(), owl::TValidator::HasOption(), owl::TEdit::IsValid(), owl::TValidator::IsValidInput(), owl::TEdit::LockBuffer(), owl::TEdit::UnlockBuffer(), owl::TEdit::ValidatorError(), and owl::voOnAppend.

◆ EvKeyDown() [2/2]

void owl::TNoteTab::EvKeyDown ( uint key,
uint repeatCount,
uint flags )
protected

◆ EvKillFocus() [1/2]

void owl::TEdit::EvKillFocus ( HWND hWndGetFocus)
protected

Validates this whenever the focus is about to be lost.

In response to a WM_KILLFOCUS message sent to a window that is losing the keyboard, EvKillFocus hides and then destroys the caret. EvKillFocus validates text whenever the focus is about to be lost and will reclaim the focus if the text is not valid. It doesn't kill the focus if another application, a Cancel button, or an OK button (in which case CanClose is called to validate text if pressed) has the focus. See EvGetDlgCode for more information.

Note
Causes focus to be reclaimed via WM_CHILDINVALID. Checks first to make sure that the focus is not being taken by either (a) another app, or (b) a Cancel button, or (c) an OK button (in which case CanClose will validate); in each case, we don't want to validate.

Definition at line 330 of file edit.cpp.

References owl::TWindow::EvKillFocus(), owl::TWindow::GetDlgCtrlID(), owl::TWindow::GetHandle(), owl::TWindow::GetParent(), owl::TWindow::GetParentO(), owl::GetWindowPtr(), owl::TEdit::IsRequired(), owl::TEdit::IsValid(), owl::TWindow::PostMessage(), and WM_CHILDINVALID.

◆ EvKillFocus() [2/2]

void owl::TNoteTab::EvKillFocus ( THandle hwndGetFocus)
protected

Handle WM_KillFOCUS: Remove dotted focus rectangle from selected tab.

Definition at line 1211 of file notetab.cpp.

References owl::TWindow::EvKillFocus(), owl::TNoteTab::GetCount(), owl::TWindow::InvalidateRect(), PRECONDITION, and owl::TWindow::UpdateWindow().

◆ EvLButtonDown()

void owl::TNoteTab::EvLButtonDown ( uint modKeys,
const TPoint & point )
protected

WM_LBUTTONDOWN handler - Checks whether the mouse was clicked on a tab item and selects it.

Note
A notification is sent to the parent before and after selecting the tab. The parent may choose to veto the selection after receiving the first notification.

Definition at line 1183 of file notetab.cpp.

References owl::TNoteTab::GetScrollerArea(), owl::TWindow::IsWindowVisible(), owl::TNoteTab::NotifyAndSelect(), PRECONDITION, owl::TWindow::SetFocus(), and owl::TNoteTab::TabFromPoint().

◆ EvPaint()

void owl::TNoteTab::EvPaint ( )
protected

EV_WM_PAINT handler.

Definition at line 1663 of file notetab.cpp.

References owl::TControl::EvPaint().

◆ EvSetFocus() [1/2]

void owl::TEdit::EvSetFocus ( HWND hWndLostFocus)
protected

Handle the set focus message and make sure the anti-oscillation flag is cleared.

Definition at line 365 of file edit.cpp.

References owl::TWindow::EvSetFocus().

◆ EvSetFocus() [2/2]

void owl::TNoteTab::EvSetFocus ( THandle hWndLostFocus)
protected

Handle WM_SETFOCUS: Draw focus to identify selected tab.

Definition at line 1199 of file notetab.cpp.

References owl::TWindow::EvSetFocus(), owl::TNoteTab::GetCount(), owl::TWindow::InvalidateRect(), PRECONDITION, and owl::TWindow::UpdateWindow().

◆ EvSize()

◆ EvUpDown()

bool owl::TEdit::EvUpDown ( TNmUpDown & )
protected

Handles up-down messages from an up-down control and adjusts contents if there is a validator to help.

Definition at line 382 of file edit.cpp.

References _tcscpy, owl::TValidator::Adjust(), owl::TEdit::GetSelection(), owl::TEdit::LockBuffer(), owl::TEdit::SetSelection(), and owl::TEdit::UnlockBuffer().

◆ FormatLines()

bool owl::TEdit::FormatLines ( bool addEOL)
inline

Indicates if the end-of-line characters (carriage return, linefeed) are to be added or removed from text lines that are wordwrapped in a multiline edit control.

Returns true if these characters are placed at the end of wordwrapped lines or false if they are removed.

Definition at line 593 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ GetBuddy()

HWND owl::TNoteTab::GetBuddy ( ) const

Return handle of buddy window associated with the notetab control.

Definition at line 479 of file notetab.cpp.

◆ GetCelArray()

TCelArray * owl::TNoteTab::GetCelArray ( )
inline

Get a pointer to the array of bitmaps used for the tabs.

Definition at line 423 of file notetab.h.

◆ GetCelArrayTransparentColor()

TColor owl::TNoteTab::GetCelArrayTransparentColor ( ) const
inline

Returns the color assigned to denote transparency in the bitmaps used for the tabs (see SetCelArray).

Definition at line 432 of file notetab.h.

◆ GetCount()

int owl::TNoteTab::GetCount ( ) const

Return the number of tab items in the notetab control.

Definition at line 222 of file notetab.cpp.

References PRECONDITION.

◆ GetCurrentPosition()

int owl::TEdit::GetCurrentPosition ( ) const
inlinevirtual

Return the current caret position.

Definition at line 454 of file edit.h.

References owl::TWindow::GetHandle(), owl::TEdit::GetSelection(), and PRECONDITION.

◆ GetEdgeColor()

TColor owl::TNoteTab::GetEdgeColor ( ) const
inline

Returns the pen color used to draw the edges of the tabs.

Definition at line 210 of file notetab.h.

◆ GetFirstVisibleLine()

int owl::TEdit::GetFirstVisibleLine ( ) const
inline

Indicates the topmost visible line in an edit control.

For single-line edit controls, the return value is 0. For multiline edit controls, the return value is the index of the topmost visible line.

Definition at line 640 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetFirstVisibleTab()

int owl::TNoteTab::GetFirstVisibleTab ( ) const
inline

Returns FirstVisibleTab.

Definition at line 406 of file notetab.h.

◆ GetFocusMargin()

TSize owl::TNoteTab::GetFocusMargin ( ) const
inline

Returns the margin around the focus rectangle for the selected tab.

Definition at line 167 of file notetab.h.

◆ GetItem() [1/2]

TNoteTabItem owl::TNoteTab::GetItem ( int index) const

Functional style overload.

Definition at line 449 of file notetab.cpp.

References CHECK, owl::TNoteTab::GetItem(), and owl::InUse().

◆ GetItem() [2/2]

bool owl::TNoteTab::GetItem ( int index,
TNoteTabItem & tabItem ) const

Retrieve information about the tab item at the specified index.

Always returns true.

Definition at line 436 of file notetab.cpp.

References owl::TNoteTab::GetCount(), and PRECONDITION.

◆ GetLabelImageMargin()

int owl::TNoteTab::GetLabelImageMargin ( ) const
inline

Returns the horizontal spacing between image and text in the label.

Definition at line 161 of file notetab.h.

◆ GetLabelMargin()

TSize owl::TNoteTab::GetLabelMargin ( ) const
inline

Returns the amount of padding around the tab label.

Definition at line 155 of file notetab.h.

◆ GetLimitText()

int owl::TEdit::GetLimitText ( ) const
inlinevirtual

Definition at line 725 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetLine() [1/2]

tstring owl::TEdit::GetLine ( int lineNumber) const

String-aware overload If the length of the returned string differs from GetLineLength an error occured.

Definition at line 560 of file edit.cpp.

References owl::CopyText(), and owl::TEdit::GetLineLength().

◆ GetLine() [2/2]

bool owl::TEdit::GetLine ( TCHAR * textString,
int strSize,
int lineNumber ) const

Return the text of line number "lineNumber" (0-terminated)

Retrieves a line of text (whose line number is supplied) from the edit control and returns it in str (NULL-terminated). strSize indicates how many characters to retrieve. GetLine returns false if it is unable to retrieve the text or if the supplied buffer is too small.

Note
Requires a buffer of at least 2 bytes, even when the line length is 1

Definition at line 511 of file edit.cpp.

References CONST_CAST, owl::TEdit::GetLineLength(), and owl::TWindow::SendMessage().

◆ GetLineFromPos()

int owl::TEdit::GetLineFromPos ( int charPos) const
inlinevirtual

Return the line number associated with character index "CharPos".

From a multiline edit control, returns the line number on which the character position specified by charPos occurs. If charPos is greater than the position of the last character, the number of the last line is returned. If charPos is-1, the number of the line that contains the first selected character is returned. If there is no selection, the line containing the caret is returned.

Reimplemented in owl::TRichEdit.

Definition at line 472 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetLineIndex()

int owl::TEdit::GetLineIndex ( int lineNumber) const
inline

In a multiline edit control, GetLineIndex returns the number of characters that appear before the line number specified by lineNumber.

If lineNumber is -1, GetLineIndex returns the number of the line that contains the caret is returned.

Definition at line 483 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetLineLength()

int owl::TEdit::GetLineLength ( int lineNumber) const

Return the length of line number "lineNumber".

From a multiline edit control, GetLineLength returns the number of characters in the line specified by lineNumber. If it is -1, the following applies:

  • if no text is selected, GetLineLength returns the length of the line where the caret is positioned;
  • if text is selected on the line, GetLineLength returns the line length minus the number of selected characters;
  • if selected text spans more than one line, GetLineLength returns the length of the lines minus the number of selected characters.

Definition at line 494 of file edit.cpp.

References CONST_CAST, and owl::TEdit::GetLineIndex().

◆ GetMargin()

TSize owl::TNoteTab::GetMargin ( ) const
inline

Returns the amount of vertical space above the tabs.

Definition at line 149 of file notetab.h.

◆ GetMargins()

uint32 owl::TEdit::GetMargins ( ) const
inline

Definition at line 718 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetMemHandle()

HLOCAL owl::TEdit::GetMemHandle ( ) const
inline

Return the memory handle for the edit control's buffer.

Definition at line 620 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetMinimalHeight()

int owl::TNoteTab::GetMinimalHeight ( )

Returns the minimal control height for which tabs are not clipped.

Definition at line 271 of file notetab.cpp.

References owl::TUIMetric::CyEdge, owl::TNoteTab::GetCount(), and owl::TNoteTab::SetTabSize().

◆ GetNumLines()

int owl::TEdit::GetNumLines ( ) const
inline

Return the number of lines in the associated edit control.

Note
return 1 when the edit control has no text (i.e. it has one line with no text in it). Return zero if an error occurs

Definition at line 409 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetPasswordChar()

uint owl::TEdit::GetPasswordChar ( ) const
inline

Returns the character to be displayed in place of a user-typed character.

When the edit control is created with the ES_PASSWORD style specified, the default display character is an asterisk (*).

Definition at line 660 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetRect()

void owl::TEdit::GetRect ( TRect & frmtRect) const
inline

Gets the formatting rectangle of a multiline edit control.

Definition at line 562 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetRequired()

TEdit::TRequireOption owl::TEdit::GetRequired ( ) const
inline

Returns the requirement option for the edit control.

Definition at line 763 of file edit.h.

◆ GetScrollerArea()

TRect owl::TNoteTab::GetScrollerArea ( ) const
protected

Returns the desired location of the scrollers within the tab.

Definition at line 1540 of file notetab.cpp.

References owl::alLeft, owl::alNone, owl::alRight, owl::TUIMetric::CxFixedFrame, owl::TUIMetric::CxHScroll, owl::TUIMetric::CyFixedFrame, owl::TUIMetric::CyHScroll, and owl::TWindow::GetClientRect().

◆ GetScrollingTabsArea()

TRect owl::TNoteTab::GetScrollingTabsArea ( ) const
protected

Returns the rectangle of the area reserved for tabs when scrolling is active.

Definition at line 1571 of file notetab.cpp.

References owl::alLeft, owl::alRight, owl::TWindow::GetClientRect(), and owl::TNoteTab::GetScrollerArea().

◆ GetScrollLocation()

TAbsLocation owl::TNoteTab::GetScrollLocation ( ) const
inline

Get the scroller location.

Definition at line 415 of file notetab.h.

◆ GetSearchCmd()

uint owl::TEditSearch::GetSearchCmd ( )
inline

Returns the user selected command that brought up the search dialog.

Definition at line 164 of file editsear.h.

◆ GetSearchData()

TFindReplaceDialog::TData & owl::TEditSearch::GetSearchData ( )
inline

Returns the search data used for the common dialog.

Definition at line 136 of file editsear.h.

◆ GetSearchDialog()

TFindReplaceDialog * owl::TEditSearch::GetSearchDialog ( )
inline

Returns the common dialog pointer.

Definition at line 150 of file editsear.h.

◆ GetSel()

int owl::TNoteTab::GetSel ( ) const

Returns the index of the selected tabitem.

Note
Returns a zero-based index or -1 if there are no tab items in the notetab control.

Definition at line 234 of file notetab.cpp.

◆ GetSelectedTabColor()

TColor owl::TNoteTab::GetSelectedTabColor ( ) const
inline

Returns the fill color used to paint the selected tab.

This color is only used when WindowFace mode is selected.

Definition at line 204 of file notetab.h.

◆ GetSelectedTabFont()

const TFont & owl::TNoteTab::GetSelectedTabFont ( ) const

Returns the font used to render the text part of the selected tab label.

Definition at line 384 of file notetab.cpp.

References PRECONDITION.

◆ GetSelectedTabProtrusion()

int owl::TNoteTab::GetSelectedTabProtrusion ( ) const
inline

Returns the amount of extra height of the selected tab.

Definition at line 185 of file notetab.h.

◆ GetSelection() [1/2]

TEdit::TRange owl::TEdit::GetSelection ( ) const

Functional style overload.

Definition at line 979 of file edit.cpp.

References owl::TEdit::GetSelection().

◆ GetSelection() [2/2]

void owl::TEdit::GetSelection ( int & startPos,
int & endPos ) const
inlinevirtual

Return the starting and ending positions of the selected text.

Returns the starting (startPos) and ending (endPos) positions of the currently selected text. By using GetSelection in conjunction with GetSubText, you can get the currently selected text.

Reimplemented in owl::TRichEdit.

Definition at line 443 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ GetSize()

int owl::TEdit::TRange::GetSize ( ) const
inline

Definition at line 52 of file edit.h.

◆ GetStyle3d()

bool owl::TNoteTab::GetStyle3d ( ) const
inline

Returns the flag specifying whether the notetab control should draw a 3D border.

Definition at line 387 of file notetab.h.

◆ GetSubText()

void owl::TEdit::GetSubText ( TCHAR * textBuf,
int startPos,
int endPos ) const
virtual

Deprecated. Use GetTextRange instead.

Retrieve the text of the associated edit control between the given positions.

Note that the buffer must be large enough to hold the text, otherwise buffer overrun will occur. The destination is always null-terminated.

NB! This function is deprecated. Use GetTextRange instead.

Reimplemented in owl::TRichEdit.

Definition at line 887 of file edit.cpp.

References _T, _tcscpy, owl::TEdit::GetTextRange(), and WARN.

◆ GetTabColor()

TColor owl::TNoteTab::GetTabColor ( ) const
inline

Returns the fill color used to paint the tabs.

Definition at line 197 of file notetab.h.

◆ GetTabFont()

const TFont & owl::TNoteTab::GetTabFont ( ) const

Returns the font used to render the text part of the tab labels.

Definition at line 364 of file notetab.cpp.

References PRECONDITION.

◆ GetTabSpacing()

int owl::TNoteTab::GetTabSpacing ( ) const
inline

Returns the horizontal distance between two tabs.

Definition at line 173 of file notetab.h.

◆ GetTabTapering()

int owl::TNoteTab::GetTabTapering ( ) const
inline

Returns the amount of narrowing on each side of the tab towards the bottom.

Definition at line 179 of file notetab.h.

◆ GetTextRange()

tstring owl::TEdit::GetTextRange ( const TRange & r) const
virtual

Retrieves a specified range of text from the edit control.

The range is half-open; i.e. range [0,2) for "abc" returns "ab". An empty string is returned if either

  • the control is empty (no text), or
  • the range is invalid (empty or inverted), or
  • whole range is beyond the extents of the actual text.

If the end of the range is beyond the valid range then it is limited to the valid range. A special case is the range [0, -1). It will return the full text.

Todo
Must be tested

Reimplemented in owl::TRichEdit.

Definition at line 910 of file edit.cpp.

References _T, CHECK, owl::TEdit::GetLine(), owl::TEdit::GetLineFromPos(), owl::TEdit::GetLineIndex(), owl::TStatic::GetText(), owl::TStatic::GetTextLen(), and WARN.

◆ GetValidator()

TValidator * owl::TEdit::GetValidator ( )
inline

Return the validator associated with this edit control.

Definition at line 341 of file edit.h.

◆ GetWindowClassName() [1/2]

auto owl::TEdit::GetWindowClassName ( ) -> TWindowClassName
overrideprotectedvirtual

Return name of predefined Windows edit class.

Reimplemented from owl::TWindow.

Reimplemented in owl::TRichEdit.

Definition at line 990 of file edit.cpp.

References _T.

◆ GetWindowClassName() [2/2]

auto owl::TNoteTab::GetWindowClassName ( ) -> TWindowClassName
overrideprotectedvirtual

Returns "OWL_Notetab" - the Window class name of the notetab control object.

Reimplemented from owl::TWindow.

Definition at line 98 of file notetab.cpp.

References OWL_NOTETAB.

◆ GetWindowFace()

bool owl::TNoteTab::GetWindowFace ( ) const
inline

Returns the flag specifying whether the active tab should use the system's window color.

Definition at line 367 of file notetab.h.

◆ GetWordBreakProc()

EDITWORDBREAKPROC owl::TEdit::GetWordBreakProc ( ) const
inline

Get word-breaking procedure.

Definition at line 669 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ InitCtrl()

void owl::TNoteTab::InitCtrl ( )
protected

◆ Insert() [1/4]

void owl::TEdit::Insert ( const tstring & str)
inline

Definition at line 114 of file edit.h.

References owl::TEdit::Insert().

◆ Insert() [2/4]

int owl::TNoteTab::Insert ( const tstring & txt,
int index,
INT_PTR clientData = 0,
int imageIdx = -1,
TAbsLocation imageLoc = alLeft,
bool shouldSelect = true )
inline

Definition at line 112 of file notetab.h.

◆ Insert() [3/4]

void owl::TEdit::Insert ( LPCTSTR str)
inline

Inserts the text supplied in str into the edit control at the current text insertion point (cursor position), and replaces any currently selected text.

Insert is similar to Paste(), but does not affect the Clipboard.

Definition at line 553 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ Insert() [4/4]

int owl::TNoteTab::Insert ( LPCTSTR txt,
int index,
INT_PTR clientData = 0,
int imageIdx = -1,
TAbsLocation imageLoc = alLeft,
bool shouldSelect = true )

Inserts a new TTabItem at the specified index.

Definition at line 136 of file notetab.cpp.

References owl::TNoteTab::GetCount(), PRECONDITION, owl::TNoteTab::SetSel(), owl::TNoteTab::SetTabRects(), and owl::TNoteTab::SetTabSize().

◆ InvalidateTab()

void owl::TNoteTab::InvalidateTab ( int index)
protected

Invalidates the rectangle occupied by the tab at the specified index.

Definition at line 561 of file notetab.cpp.

References owl::TNoteTab::GetCount(), owl::TWindow::GetHandle(), owl::TWindow::InvalidateRect(), and PRECONDITION.

◆ IsFullyVisible()

bool owl::TNoteTab::IsFullyVisible ( int index) const

Returns true if the horizontal projection of the tab item at the specified index is contained within the horizontal projection of the current effective tabs area.

Vertical visibility is ignored.

Definition at line 1610 of file notetab.cpp.

References CHECK, owl::TNoteTab::GetCount(), owl::TRect::IsEmpty(), owl::TNoteTab::IsVisible(), and PRECONDITION.

◆ IsModified()

bool owl::TEdit::IsModified ( ) const
inline

Returns true if the user has changed the text in the edit control.

Definition at line 418 of file edit.h.

References CONST_CAST, owl::TWindow::GetHandle(), and PRECONDITION.

◆ IsRefocusing()

bool owl::TEdit::IsRefocusing ( ) const
inline

Return true when this edit control is attempting to regain focus after an EvKillFocus() with invalid contents.

Definition at line 350 of file edit.h.

◆ IsRequired()

bool owl::TEdit::IsRequired ( ) const
inline

Returns true if a value is required for the edit control.

Definition at line 771 of file edit.h.

References owl::TEdit::GetRequired(), and owl::TEdit::roNone.

◆ IsValid()

bool owl::TEdit::IsValid ( bool reportError = false)

Always returns true if the TEdit object does not have an associated TValidator object (i.e.

if TEdit.Validator == 0) and it is not required. If the edit control is required, requirement is validated. If the edit control has a validator, and the reportError parameter is set to true, then IsValid calls the validator's Valid method. If the reportError parameter is false, IsValid calls the validator's IsValid method.

Definition at line 1019 of file edit.cpp.

References _T, _tcslen, _tcsspn, owl::TWindow::GetFocus(), owl::TEdit::GetRequired(), owl::TEdit::IsRequired(), owl::TValidator::IsValid(), owl::TWindow::LoadString(), owl::TEdit::LockBuffer(), owl::TWindow::MessageBox(), owl::TEdit::roNonBlank, owl::TWindow::SetFocus(), owl::TEdit::UnlockBuffer(), and owl::TValidator::Valid().

◆ IsVisible()

bool owl::TNoteTab::IsVisible ( int index) const

Returns true if the tab item at the specified index is visible.

Note that true is returned even if the tab is only partially visible. Use IsFullyVisible to check for full visibility.

Definition at line 1598 of file notetab.cpp.

References owl::TNoteTab::GetCount(), and PRECONDITION.

◆ LimitText()

void owl::TEdit::LimitText ( int txtLen)
inlinevirtual

Limit the amount of new text that can be entered in the edit control.

Reimplemented in owl::TRichEdit.

Definition at line 611 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ LineDown()

int owl::TEdit::LineDown ( )
inline

EM_SCROLL, SB_LINEDOWN Scrolls down one line.

Definition at line 523 of file edit.h.

References owl::TEdit::ScrollText().

◆ LineUp()

int owl::TEdit::LineUp ( )
inline

EM_SCROLL, SB_LINEUP Scrolls up one line.

Definition at line 530 of file edit.h.

References owl::TEdit::ScrollText().

◆ LockBuffer()

TCHAR * owl::TEdit::LockBuffer ( uint newSize = 0)

Lock and unlock this edit control's buffer.

Lock the edit control's buffer, optionally resizing it first, and return a pointer to the beginning of it, or 0 if failure.

Allows direct access to the text in the edit control.

Must call UnlockBuffer when finished with buffer.

Definition at line 571 of file edit.cpp.

References owl::GetCommCtrlVersion(), owl::TEdit::GetMemHandle(), owl::TStatic::GetText(), owl::TStatic::GetTextLen(), and owl::TWindow::GetWindowLong().

◆ NotifyAndSelect()

bool owl::TNoteTab::NotifyAndSelect ( int index)
protected

Selects the tab at the given index and sends the appropriate notifications.

Returns false if the change was vetoed by the buddy/parent, true otherwise. Does nothing and returns false if the tab at the given index is already selected.

Definition at line 1499 of file notetab.cpp.

References owl::TNoteTab::GetCount(), owl::TWindow::GetHandle(), owl::TWindow::GetParent(), PRECONDITION, owl::TWindow::SendNotification(), and owl::TNoteTab::SetSel().

◆ PageDown()

int owl::TEdit::PageDown ( )
inline

EM_SCROLL, SB_PAGEDOWN Scrolls down one page.

Definition at line 537 of file edit.h.

References owl::TEdit::ScrollText().

◆ PageUp()

int owl::TEdit::PageUp ( )
inline

EM_SCROLL, SB_PAGEUP Scrolls up one page.

Definition at line 544 of file edit.h.

References owl::TEdit::ScrollText().

◆ Paint()

◆ Paste()

void owl::TEdit::Paste ( )
inlinevirtual

Inserts text from the Clipboard into the edit control at the current text insertion point (cursor position).

Reimplemented in owl::TRichEdit.

Definition at line 314 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ PosFromChar()

uint32 owl::TEdit::PosFromChar ( uint charIndex)
inlinevirtual

Reimplemented in owl::TRichEdit.

Definition at line 738 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ Scroll()

void owl::TEdit::Scroll ( int horizUnit,
int vertUnit )
inline

Scroll the text by the specified horizontal and vertical amounts.

Scrolls a multiline edit control horizontally and vertically using the numbers of characters specified in horizontalUnit and verticalUnit. Positive values result in scrolling to the right or down in the edit control, and negative values result in scrolling to the left or up.

Definition at line 497 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ ScrollCaret()

void owl::TEdit::ScrollCaret ( )
inline

EM_SCROLLCARET.

Sroll the caret into view in an edit control.

Definition at line 505 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ ScrollText()

int owl::TEdit::ScrollText ( int how)
inlineprotected

Definition at line 513 of file edit.h.

References owl::HiUint16(), owl::LoUint16(), and owl::TWindow::SendMessage().

◆ Search() [1/2]

int owl::TEdit::Search ( int startPos,
const tstring & text,
bool caseSensitive = false,
bool wholeWord = false,
bool up = false )
inline

Definition at line 116 of file edit.h.

◆ Search() [2/2]

int owl::TEdit::Search ( int startPos,
LPCTSTR text,
bool caseSensitive = false,
bool wholeWord = false,
bool up = false )
virtual

searches for and selects the given text and returns the offset of the text or -1 if the text is not found

Performs either a case-sensitive or case-insensitive search for the supplied text. If the text is found, the matching text is selected, and Search returns the position of the beginning of the matched text. If the text is not found in the edit control's text, Search returns -1. If -1 is passed as startPos, then the search starts from either the end or the beginning of the currently selected text, depending on the search direction.

Reimplemented in owl::TRichEdit.

Definition at line 746 of file edit.cpp.

References _istalnum, _tcslen, AnsiNext, AnsiPrev, owl::TEdit::GetSelection(), owl::TEdit::LockBuffer(), owl::TWindow::SendMessage(), owl::TEdit::SetSelection(), and owl::TEdit::UnlockBuffer().

◆ SetBuddy()

void owl::TNoteTab::SetBuddy ( HWND buddy)

Sets handle of the buddy window associated with this notetab control.

Definition at line 488 of file notetab.cpp.

References owl::TWindow::TWindow(), and owl::GetWindowPtr().

◆ SetCelArray()

void owl::TNoteTab::SetCelArray ( TCelArray * array,
TAutoDelete del = AutoDelete )

Sets the bitmap array to be used for the tabs.

Use SetCelArrayTransparentColor to set the bitmap pixel color that should not be drawn. The default color is TColor::Sys3dFace.

Definition at line 1697 of file notetab.cpp.

References owl::AutoDelete, and owl::TNoteTab::Update().

◆ SetCelArrayTransparentColor()

void owl::TNoteTab::SetCelArrayTransparentColor ( const TColor & c)

Sets the color assigned to denote transparency in the bitmaps used for the tabs (see SetCelArray).

All the bitmap pixels of this color will be fully transparent (i.e. not drawn).

Definition at line 1710 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetEdgeColor()

void owl::TNoteTab::SetEdgeColor ( const TColor & v)

Sets the pen color used to draw the edges of the tabs.

Definition at line 425 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetFirstVisibleTab()

void owl::TNoteTab::SetFirstVisibleTab ( int index)

Sets FirstVisibleTab to index if index is valid.

Definition at line 1624 of file notetab.cpp.

References owl::TNoteTab::GetCount(), owl::TNoteTab::GetFirstVisibleTab(), and owl::TNoteTab::SetTabRects().

◆ SetFocusMargin()

void owl::TNoteTab::SetFocusMargin ( const TSize & v)

Sets the margin around the focus rectangle for the selected tab.

Definition at line 324 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetItem()

bool owl::TNoteTab::SetItem ( int index,
const TNoteTabItem & item )

Updates information about the tab item at the specified index.

Definition at line 460 of file notetab.cpp.

References owl::TNoteTab::GetCount(), owl::TNoteTab::InvalidateTab(), owl::TNoteTab::SetTabRects(), and owl::TNoteTab::SetTabSize().

◆ SetLabelImageMargin()

void owl::TNoteTab::SetLabelImageMargin ( int v)

Sets the horizontal spacing between image and text in the label.

Definition at line 314 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetLabelMargin()

void owl::TNoteTab::SetLabelMargin ( const TSize & v)

Sets the amount of padding around the tab label.

Definition at line 304 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetLeftMargin()

void owl::TEdit::SetLeftMargin ( uint16 margin)
inline

◆ SetMargin()

void owl::TNoteTab::SetMargin ( const TSize & v)

Sets the amount of space to the left of the tabs and above the tabs.

Note that the horizontal margin is additional to the space required for scroll buttons, if the latter are aligned to the left and visible. In this case, the horizontal margin is the space between the scroll buttons and the first visible tab. Otherwise, the horizontal margin is the space between the left edge of the control and the first visible tab.

Definition at line 294 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetMarginUseFontInfo()

void owl::TEdit::SetMarginUseFontInfo ( )
inline

◆ SetMemHandle()

void owl::TEdit::SetMemHandle ( HLOCAL localMem)
inline

Sets the memory handle for the edit control's buffer.

Definition at line 629 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ SetNotRequired()

void owl::TEdit::SetNotRequired ( )
inline

Sets the requirement option for the edit control to reflect a value is not required.

Definition at line 755 of file edit.h.

References owl::TEdit::roNone, and owl::TEdit::SetRequired().

◆ SetPasswordChar()

void owl::TEdit::SetPasswordChar ( uint ch)
inline

SetPasswordChar sets the character to be displayed in place of a user-typed character.

When the ES_PASSWORD style is specified, the default display character is an asterisk (*).

Definition at line 286 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ SetReadOnly()

void owl::TEdit::SetReadOnly ( bool readOnly)
inline

Sets the edit control to be read-only or read-write.

Definition at line 649 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ SetRect()

void owl::TEdit::SetRect ( const TRect & frmtRect)
inline

Sets the formatting rectangle for a multiline edit control.

Definition at line 571 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ SetRectNP()

void owl::TEdit::SetRectNP ( const TRect & frmtRect)
inline

Sets the formatting rectangle for a multiline edit control.

Unlike SetRect(), SetRectNP does not repaint the edit control.

Definition at line 581 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ SetRequired()

void owl::TEdit::SetRequired ( TEdit::TRequireOption option = roNonBlank)
inline

Sets the requirement option for the edit control.

Definition at line 746 of file edit.h.

◆ SetRightMargin()

void owl::TEdit::SetRightMargin ( uint16 margin)
inline

◆ SetScrollLocation()

void owl::TNoteTab::SetScrollLocation ( TAbsLocation pos)

Set the scroller location.

Definition at line 1681 of file notetab.cpp.

References owl::TNoteTab::SetTabRects().

◆ SetSearchCmd()

void owl::TEditSearch::SetSearchCmd ( uint searchcmd)
inline

Remembers the command the user selected to bring up the search dialog.

Definition at line 171 of file editsear.h.

◆ SetSearchData()

void owl::TEditSearch::SetSearchData ( const TFindReplaceDialog::TData & searchdata)
inline

Uses new search data.

Definition at line 143 of file editsear.h.

◆ SetSearchDialog()

void owl::TEditSearch::SetSearchDialog ( TFindReplaceDialog * searchdialog)
inline

Uses new common dialog pointer.

Definition at line 157 of file editsear.h.

◆ SetSel()

int owl::TNoteTab::SetSel ( int index)

Selects the tabitem at the specified index.

Note
SetSel does not send any notifications to the parent and/or buddy. Returns the 0 based index of the tab item selected or -1 on failure.

Definition at line 246 of file notetab.cpp.

References owl::TNoteTab::GetCount(), owl::TNoteTab::InvalidateTab(), and owl::TNoteTab::SetTabRects().

◆ SetSelectedTabColor()

void owl::TNoteTab::SetSelectedTabColor ( const TColor & v)

Sets the fill color used to paint the selected tab.

This color is only used when WindowFace mode is selected.

Definition at line 415 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetSelectedTabFont()

void owl::TNoteTab::SetSelectedTabFont ( const TFont & font)

Sets the font used to render the text part of the selected tab label.

Definition at line 394 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetSelectedTabProtrusion()

void owl::TNoteTab::SetSelectedTabProtrusion ( int v)

Sets the amount of extra height of the selected tab.

Definition at line 354 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetSelection() [1/2]

bool owl::TEdit::SetSelection ( const TRange & r)
inline

Definition at line 97 of file edit.h.

References owl::TEdit::SetSelection().

◆ SetSelection() [2/2]

bool owl::TEdit::SetSelection ( int startPos,
int endPos )
inlinevirtual

Select the characters in the range "startPos .. endPos".

Forces the selection of the text between the positions specified by startPos and endPos, but not including the character at endPos.

Reimplemented in owl::TRichEdit.

Definition at line 430 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ SetStyle3d()

void owl::TNoteTab::SetStyle3d ( bool st)
inline

Specifies whether the note tab should draw a 3D edge.

If 'st' is true, the control displays a 3D edge.

Definition at line 377 of file notetab.h.

References owl::TNoteTab::Update().

◆ SetTabColor()

void owl::TNoteTab::SetTabColor ( const TColor & v)

Sets the fill color used to paint the tabs.

Definition at line 404 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetTabFont()

void owl::TNoteTab::SetTabFont ( const TFont & font)

Sets the font used to render the text part of the tab labels.

Definition at line 374 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetTabRects()

void owl::TNoteTab::SetTabRects ( int firstTab)
protected

Lays out tab items (and scroll buttons) with the specified index at the leftmost.

Scroll buttons are enabled when needed (unless the scroll location is set to alNone).

Definition at line 1420 of file notetab.cpp.

References owl::alNone, CHECK, owl::TWindow::GetClientRect(), owl::TNoteTab::GetCount(), owl::TWindow::GetHandle(), owl::TNoteTab::GetScrollerArea(), owl::TNoteTab::GetScrollingTabsArea(), owl::TNoteTab::IsFullyVisible(), owl::TWindow::MoveWindow(), PRECONDITION, owl::TUpDown::SetPos(), owl::TUpDown::SetRange(), owl::TWindow::ShowWindow(), and owl::TWindow::UpdateWindow().

◆ SetTabSize()

void owl::TNoteTab::SetTabSize ( int index)
protected

Updates the internal information stored about the label of a particular tab item.

Definition at line 1301 of file notetab.cpp.

References _T, owl::TCelArray::CelSize(), owl::TNoteTab::GetSelectedTabFont(), and PRECONDITION.

◆ SetTabSpacing()

void owl::TNoteTab::SetTabSpacing ( int v)

Sets the horizontal distance between two tabs.

Definition at line 334 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetTabStops()

void owl::TEdit::SetTabStops ( int numTabs,
const int * tabs )
inline

Sets the tab stop positions in a multiline edit control.

Definition at line 602 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ SetTabTapering()

void owl::TNoteTab::SetTabTapering ( int v)

Sets the amount of narrowing on each side of the tab towards the bottom.

Definition at line 344 of file notetab.cpp.

References owl::TNoteTab::Update().

◆ SetupWindow() [1/3]

void owl::TEdit::SetupWindow ( )
overrideprotectedvirtual
Note
If the textLimit data member is nonzero, SetupWindow limits the number of characters that can be entered into the edit control to textLimit -1.

Reimplemented from owl::TWindow.

Reimplemented in owl::TEditFile, owl::TEditSearch, owl::TFlatEdit, owl::TRichEdit, and owl::TRichEditView.

Definition at line 1000 of file edit.cpp.

References owl::TEdit::LimitText(), and owl::TWindow::SetupWindow().

◆ SetupWindow() [2/3]

void owl::TEditSearch::SetupWindow ( )
overridevirtual

Reimplemented from owl::TEdit.

Reimplemented in owl::TRichEdit, and owl::TRichEditView.

Definition at line 80 of file editsear.cpp.

References owl::TWindow::PostMessage(), and owl::TEdit::SetupWindow().

◆ SetupWindow() [3/3]

void owl::TNoteTab::SetupWindow ( )
overrideprotectedvirtual

Overriden virtual of TWindow - Initializes font used by control and resize accordingly.

Reimplemented from owl::TWindow.

Definition at line 108 of file notetab.cpp.

References owl::TWindow::GetHandle(), and owl::TWindow::SetupWindow().

◆ SetValidator()

void owl::TEdit::SetValidator ( TValidator * validator)

Sets a new validator for this control, can be 0. Cleans up the old validator.

Definition at line 1081 of file edit.cpp.

◆ SetWindowFace()

void owl::TNoteTab::SetWindowFace ( bool wf)
inline

Specifies whether active tab should use the system's window color.

If the 'wf' parameter is true, the system's window color is used.

Definition at line 356 of file notetab.h.

References owl::TNoteTab::Update().

◆ SetWordBreakProc()

void owl::TEdit::SetWordBreakProc ( EDITWORDBREAKPROC proc)
inline

In a multiline edit control, SetWordBreakProc indicates that an application-supplied word-break function has replaced the default word-break function.

The application-supplied word-break function might break the words in the text buffer at a character other than the default blank character.

Definition at line 681 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ TabFromPoint()

int owl::TNoteTab::TabFromPoint ( const TPoint & pt) const
protected

Returns the index of the tab item at the specified window coordinate.

Returns -1 on failure.

Definition at line 1482 of file notetab.cpp.

References owl::TNoteTab::GetCount().

◆ Transfer() [1/2]

uint owl::TEdit::Transfer ( void * buffer,
TTransferDirection direction ) -> uint
overridevirtual

Transfers state information for TEdit controls.

Transfers information for TEdit controls and sends information to the Validator if one exists, and if it has the transfer option set. Transfer can perform type conversion when validators are in place, for example, when TRangeValidator transfers integers. The return value is the size (in bytes) of the transfer data. Delegates to the Validator if there is one & it has the transfer option set, allowing the Validator to convert the text to/from the appropriate type. Else passes to base, TStatic. The return value is the size (in bytes) of the transfer data

Reimplemented from owl::TWindow.

Reimplemented in owl::TRichEdit.

Definition at line 1103 of file edit.cpp.

References CHECK, owl::TEdit::GetNumLines(), owl::TStatic::GetText(), owl::TWindow::GetWindowTextLength(), owl::TValidator::HasOption(), owl::TStatic::SetText(), owl::tdSetData, owl::TValidator::Transfer(), owl::TStatic::Transfer(), and owl::voTransfer.

◆ Transfer() [2/2]

uint owl::TNoteTab::Transfer ( void * buffer,
TTransferDirection  ) -> uint
overridevirtual

Overrides TWindow virtual member function to handle transfers.

There are no transfers for NoteTab controls.

Reimplemented from owl::TWindow.

Definition at line 501 of file notetab.cpp.

◆ Undo()

void owl::TEdit::Undo ( )
inline

Undoes the last edit.

Definition at line 305 of file edit.h.

References owl::TWindow::GetHandle(), PRECONDITION, and owl::TWindow::SendMessage().

◆ UnlockBuffer()

void owl::TEdit::UnlockBuffer ( LPCTSTR buffer,
bool updateHandle = false )

Unlock the edit control's buffer locked by LockBuffer.

If the contents were changed (buffer is resized or written to), updateHandle should be true. Ignores call if buffer is 0

Definition at line 604 of file edit.cpp.

References owl::GetCommCtrlVersion(), owl::TWindow::GetWindowLong(), owl::TEdit::SetMemHandle(), and owl::TStatic::SetText().

◆ Update()

◆ ValidatorError()

void owl::TEdit::ValidatorError ( )

Handles validation errors that occur as a result of validating the edit control.

Definition at line 412 of file edit.cpp.

References owl::TEdit::IsValid().

Variable Documentation

◆ ClientData

INT_PTR owl::TNoteTabItem::ClientData

User-defined data associated with item.

Definition at line 59 of file notetab.h.

◆ cpMax

int owl::TEdit::TRange::cpMax

Definition at line 54 of file edit.h.

◆ cpMin

int owl::TEdit::TRange::cpMin

Definition at line 54 of file edit.h.

◆ ImageIdx

int owl::TNoteTabItem::ImageIdx

Index of tab image.

Definition at line 60 of file notetab.h.

◆ ImageLoc

TAbsLocation owl::TNoteTabItem::ImageLoc

Placement of tab image.

Definition at line 61 of file notetab.h.

◆ Label

tstring owl::TNoteTabItem::Label

Label of tab.

Definition at line 57 of file notetab.h.

◆ LabelSize

TSize owl::TNoteTabItem::LabelSize

Width and height of label.

Definition at line 58 of file notetab.h.

◆ Rect

TRect owl::TNoteTabItem::Rect

Location of tab [client-area base coords].

Definition at line 56 of file notetab.h.