The IMultiLineEdit class creates and manages multiline edit (MLE) controls. This control is similar to an entry field, but it lets the user enter multiple lines of text rather than just one.
You derive classes from the following handlers and attach them to an MLE control:
The MLE control can enable screen refreshes during its member functions
processing. In doing so, it negates any previous use of
IMultiLineEdit::disableUpdate.
Note:
The Motif XmText widget does not support embedded NULLs or embedded nonprintable characters. Only the text preceding the first NULL is loaded into the control.
For a portable application, do not load text containing embedded NULLs or nonprintable characters into an IMultiLineEdit object. Additionally, remember that end-of-line characters are different on different systems.
The Open Class Library implements this class with the XmText widget. The XmText widget does not support embedded NULLs or embedded nonprintable characters. Only the text preceding the first NULL is loaded into the control.
AIX only supports the noTran format enumerator. If you specify any other EOLFormat, the member functions ignore it and use noTran instead.
The Motif XmText widget does not support line-oriented functions; the Open Class Library has added this support. However, it does not make fine adjustments for a proportional font (to ensure good performance). This means that if a proportional font is used in the control, the number of a line on the screen might not match the calculated line number used internally by the line-oriented functions. Therefore, if you use a proportional font in the control, use character, position-oriented functions instead.
Line-oriented functions may not work if tab characters are used. Typically, Motif converts tabs as 10 blank characters, but if a line ends with a tab, it might cause an incorrect line count.
Handlers derived from IEditVerifyHandler can be attached to IMultiLineEdit objects.
When exporting a file with a format of cfText, a CR-LF sequence is counted as one character. However, importFromFile reads the file in binary so that the CR-LF is counted as two bytes. This makes the size of the imported files larger than the exported file. This can create a problem for very small MLEs. An exception is thrown indicating that the string being inserted into the MLE is larger than the set limit.
You should use the noTran format of the EOLFormat or derive customized import or export functions to handle this condition.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IMultiLineEdit()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IMultiLineEdit(unsigned long id, IWindow* parent)
You can construct objects of this class by using the parent window.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IMultiLineEdit(const IWindowHandle& handle)
You can construct objects of this class by using the handle of an existing MLE.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IMultiLineEdit( unsigned long id, IWindow* parent, IWindow* owner, const IRectangle& initial = IRectangle ( ), const Style& style = defaultStyle ( ) )
You can construct objects of this class by using the parent window, owner window, optional size and location, and optional style parameters.
IInvalidParameter | The parent window pointer specified was invalid. You must specify a valid IWindow pointer as the parent. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to track changes for the MLE.
![]() |
public:
bool hasTextChanged() const
If any changes have been made to the MLE since the last time the changed flag was reset, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IMultiLineEdit& resetTextChangedFlag()
Resets the changed flag so that from this point forward changes to the MLE can be detected. This is the same as IMultiLineEdit::setTextChangedFlag(false).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IMultiLineEdit& setTextChangedFlag( bool changed = true )
Sets a flag indicating the changed status of the MLE. If changed=true, a flag is set to indicate the MLE contents have changed. if changed=false, a flag is set to indicate the MLE contents have not changed.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to transfer data between the clipboard and the multiline edit (MLE) control. Each of these operations deals with the selected text in the MLE control.
Motif-specific: the cut, copy, and clear operations allow the use of a timestamp to avoid race conditions. The optional parameter timestamp on these functions is provided to allow this timestamp to be provided when these functions are called from an event handler. The timestamp to use can be found in the time member of the XEvent structure. The default value is interpreted as "CurrentTime". This parameter is ignored on other platforms.
![]() |
public:
virtual IMultiLineEdit& clear(unsigned long timestamp = 0)
Replaces the selected text in the MLE with blanks.
The user can select text or your code can call selectRange. The code can call hasSelectedText to determine if any text in the MLE is selected before making the call to clear.
To remove the text contents of the MLE, regardless of whether any text is selected, call setText, passing it a 0-length string, or removeAll.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The optional parameter timestamp allows a time stamp value to be passed when this function is called from an event handler. This parameter specifies the time at which the selection value is to be modified. This must be the time of the event that triggered the request. One source of a valid timestamp is the XtLastTimestampProcessed function.
In AIX, get the value for timestamp from the time member of the XEvent structure. The default value is interpreted as CurrentTime.
The OS/2 release does not use the timestamp parameter.
![]() |
public:
virtual IMultiLineEdit& copy(unsigned long timestamp = 0)
Copies the currently selected text from the MLE to the clipboard.
The user can select text or your code can call selectRange. The code can call hasSelectedText to determine if any text in the MLE is selected before making the call to copy.
IInvalidRequest | The MLE has no selected text. |
IAccessError | The operating system's request to copy from the MLE failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The optional parameter timestamp allows a time stamp value to be passed when this function is called from an event handler. This parameter specifies the time at which the selection value is to be modified. This must be the time of the event that triggered the request. One source of a valid timestamp is the XtLastTimestampProcessed function.
In AIX, get the value for timestamp from the time member of the XEvent structure. The default value is interpreted as CurrentTime.
The OS/2 release does not use the timestamp parameter.
![]() |
public:
virtual IMultiLineEdit& cut(unsigned long timestamp = 0)
Removes the currently selected text from the MLE control and places it in the clipboard.
The user can select text or your code can call selectRange. The code can call hasSelectedText to determine if any text in the MLE is selected before making the call to cut.
To remove the text contents of the MLE, regardless of whether any text is selected, call setText, passing it a 0-length string, or removeAll.
IInvalidRequest | The MLE has no selected text. |
IAccessError | The operating system's request to cut from the MLE failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The optional parameter timestamp allows a time stamp value to be passed when this function is called from an event handler. This parameter specifies the time at which the selection value is to be modified. This must be the time of the event that triggered the request. One source of a valid timestamp is the XtLastTimestampProcessed function.
In AIX, get the value for timestamp from the time member of the XEvent structure. The default value is interpreted as CurrentTime.
The OS/2 release does not use the timestamp parameter.
The CR-LF combination is not deleted if a request is made to delete one complete line from the MLE. This behavior results in a blank line in the MLE.
![]() |
public:
virtual IMultiLineEdit& discard()
Deletes all currently selected text.
The user can select text or your code can call selectRange. The code can call hasSelectedText to determine if any text in the MLE is selected before making the call to discard.
To remove the text contents of the MLE, regardless of whether any text is selected, call setText, passing it a 0-length string, or removeAll.
IInvalidRequest | The MLE has no selected text. |
IAccessError | The operating system's request to discard the selected text failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IMultiLineEdit& paste()
Inserts the contents of the clipboard into the MLE at the cursor position, replacing any selected text.
The user can select text or your code can call selectRange. The code can call hasSelectedText to determine if any text in the MLE is selected before making the call to paste.
IInvalidRequest | The clipboard does not contain any text. |
IAccessError | The operating system's request to paste to the MLE failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL. AIX only supports the noTran format enumerator.
Use these members to query the current colors of the MLE.
![]() |
public:
virtual IColor backgroundColor() const
Returns the background color value of the MLE or the default if no color for the area has been set.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Returns the default background color value of the MLE
![]() |
public:
virtual IColor foregroundColor() const
Returns the foreground color value of the MLE or the default if no color for the area has been set.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Returns the default foreground color value of the MLE
Use these members to customize the conditions for detecting a drag operation.
![]() |
protected:
virtual bool isDragStarting(IEvent& event)
Request the start of a drag operation. A drag operation will occur if the MLE contains selected text and the mouse pointer was over that selection area when the button was pressed.
Windows | OS/2 | AIX |
Yes | No | No |
Event-handling implementation members perform processing needed to allow handlers to properly receive GUI events and to route these events.
![]() |
protected:
virtual bool passEventToOwner(IEvent& event)
Determines if the event is passed on to the owner.
Windows | OS/2 | AIX |
Yes | No | Yes |
Use these members to modify the font in the MLE.
![]() |
public:
virtual IMultiLineEdit& setFont(const IFont& font)
Changes the font of the displayed text.
IAccessError | The operating system's request to set the MLE font failed. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to import and export text to a file.
![]() |
public:
virtual unsigned long exportSelectedTextToFile( const char* fileName, EOLFormat type = cfText )
Saves the currently marked text to the specified file and returns the number of bytes written to the file.
IInvalidRequest | The MLE has no selected text. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX only supports the noTran format enumerator.
![]() |
public:
virtual unsigned long exportToFile( const char* fileName, EOLFormat type = cfText )
Saves the contents of the MLE to the specified file and returns the number of bytes written to the file. If the file cannot be opened, zero is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX only supports the noTran format enumerator.
![]() |
public:
virtual unsigned long importFromFile( const char* fileName, EOLFormat type = cfText )
Inserts the contents of the specified file into the MLE at the current cursor position and returns the number of bytes imported.
IAccessError | An attempt to open or read from a file has failed. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL. AIX only supports the noTran format enumerator.
![]() |
protected:
virtual IMultiLineEdit& setLayoutDistorted( unsigned long layoutAttributeOn, unsigned long layoutAttributeOff )
Indicates that changes have occurred in the window causing the layout of the window in a canvas to be updated.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members use the terms line and line number as the arguments or the returns from these members. A line is a line on the display after the application of word-wrap. It does not mean a line as defined by the CR-LF line-break sequence.
![]() |
public:
virtual IMultiLineEdit& addLine( const char* text, unsigned long lineNumber, EOLFormat type = cfText )
Inserts the specified NULL-terminated text at the specified line number.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL. AIX only supports the noTran format enumerator.
If you use a proportional font in the control, line numbers cannot be calculated accurately. Use character-oriented functions instead.
![]() |
public:
virtual IMultiLineEdit& addLineAsLast( const char* text, EOLFormat type = cfText )
Inserts the specified NULL-terminated text as the last line in the MLE.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL. AIX only supports the noTran format enumerator.
If you use a proportional font in the control, line numbers cannot be calculated accurately. Use character-oriented functions instead.
![]() |
public:
unsigned long cursorLinePosition() const
Returns the line number of the line that contains the cursor.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long cursorPosition() const
Returns the character position from the start of the MLE to the current cursor location.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long numberOfLines() const
Returns the number of lines in the MLE, including word breaks. The number of lines is based on the scrollable size of the MLE. You must set the size of the MLE before using this function. Otherwise, the returned value is not correct.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
If you use a proportional font in the control, line numbers cannot be calculated accurately. Use character-oriented functions instead.
![]() |
public:
virtual IMultiLineEdit& removeLine( unsigned long lineNumber )
Deletes the specified line of text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
If you use a proportional font in the control, line numbers cannot be calculated accurately. Use character-oriented functions instead.
![]() |
public:
virtual IMultiLineEdit& setCursorLinePosition( unsigned long lineNumber )
Moves the cursor position to the first position of the specified line. The values you pass are 0 based.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
If you use a proportional font in the control, line numbers cannot be calculated accurately. Use character-oriented functions instead.
![]() |
public:
virtual IMultiLineEdit& setCursorPosition( unsigned long cursorPosition )
Moves the cursor to a specific position in the MLE. The count begins at the first position in the MLE, not at the cursor's current position. The values you pass are 0 based.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IMultiLineEdit& setTop(unsigned long lineNumber)
Makes the specified line the topmost visible line on the screen. The values you pass are 0 based. This function is ignored if the MLE is not scrollable on the screen.
IAccessError | The operating system's request to set the top line of the MLE failed. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long top() const
Returns the line number of the line currently visible at the top of the screen.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long visibleLines() const
Returns the number of lines that completely fits inside the edit region of the MLE. This value is based on the current font.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
If you use a proportional font in the control, line numbers cannot be calculated accurately. Use character-oriented functions instead.
Use these members to identify and enable notifications sent to observer objects.
![]() |
public:
virtual IMultiLineEdit& enableNotification( bool enable = true )
Enables or disables the MLE control to send notifications to any observer objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static INotificationId const dataUpdateId
Notification identifier provided to observers when the data update mode of the MLE changes. IMultiLineEdit provides a boolean value in the eventData field of the INotificationEvent. This value is true if data update is now enabled, and false if data update is disabled.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static INotificationId const limitId
Notification identifier provided to observers when the text limit of the MLE changes. IMultiLineEdit provides the new text limit value in the eventData field of the INotificationEvent.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the read-only style.
![]() |
public:
virtual IMultiLineEdit& disableDataUpdate()
Prevents inserting or changing characters in the MLE's text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IMultiLineEdit& enableDataUpdate( bool update = true )
Enables or disables the read-only mode of the MLE control.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isWriteable() const
If the contents of the MLE can be modified, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to enable and disable screen updates.
![]() |
public:
virtual IMultiLineEdit& disableUpdate()
Disables screen updates. Use this function when your application makes changes throughout an MLE. Doing so avoids unnecessary overhead caused by attempts to keep the screen display updated. While update is disabled, mouse and keyboard messages are processed by beeping and ignoring them. The mouse pointer changes to the standard system "wait" pointer.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Enabling and disabling screen refreshes is not typically done in Motif because screen refresh management is handled automatically by X. However, to ensure the portability of logic that requires disabling of input temporarily whenever refresh is disabled, the Open Class Library disables input in Motif, also. Screen refresh is always enabled.
![]() |
public:
virtual IMultiLineEdit& enableUpdate(bool update = true)
Enables or disables screen updates.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Enabling and disabling screen refreshes is not typically done in Motif, because screen refresh management is handled automatically by X. However, to ensure the portability of logic that requires disabling of input temporarily whenever refresh is disabled, the Open Class Library disables input in Motif, also.
Use these members to access the currently selected text of the MLE.
![]() |
public:
virtual bool hasSelectedText() const
If any of the MLE's text is selected, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IRange selectedRange() const
Returns the range of the selected text. If no text is selected, an exception is thrown. The selected range is the index of the first character selected and the index of the last character selected. The index is 0-based.
IInvalidRequest | The MLE has no selected text. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString selectedText() const
Returns the selected text string. No exception is thrown if there is no text selected; a NULL IString is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual unsigned long selectedTextLength() const
Returns the size of the selected area, in bytes. The length includes CR-LFs, but not NULL terminators. No exception is thrown if there is no text selected; 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IMultiLineEdit& selectRange( const IRange& range = IRange ( 0 , end ), unsigned long timestamp = 0 )
Selects a range of text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
The optional parameter timestamp allows a time stamp value to be passed when this function is called from an event handler. This parameter specifies the time at which the selection value is to be modified. This must be the time of the event that triggered the request. One source of a valid timestamp is the XtLastTimestampProcessed function.
In AIX, get the value for timestamp from the time member of the XEvent structure. The default value is interpreted as CurrentTime.
![]() |
public:
static const long deselect
Denotes that the text should be deselected when calling IMultiLineEdit::selectRange.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const long end
Denotes the end of the text for selecting text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the edit region.
![]() |
public:
unsigned long editRegionHeight() const
Returns the height of the edit region. The edit region is the rectangular area in which the text is displayed.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long editRegionWidth() const
Returns the width of the edit region. The edit region is the rectangular area in which the text is displayed.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Sets the size of the edit region so that it covers the entire MLE window. The edit region is the rectangular area in which the text is displayed.
public:
virtual IMultiLineEdit& setEditRegion()
IAccessError | The operating system's request to set the region failed. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
In Motif, if the window is too small to show all of the text, it is not an error. In this situation, this function does not throw an exception.
public:
virtual IMultiLineEdit& setEditRegion( const ISize& sizeEditRegion )
IInvalidParameter | The operating system's request to set the region width and height failed. The sizeEditRegion parameter is invalid. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
In Motif, if the window is too small to show all of the text, it is not an error. In this situation, this function does not throw an exception.
![]() |
public:
virtual IMultiLineEdit& setEditRegionHeight(long height)
Sets the height of the edit region. The edit region is the rectangular area in which the text is displayed.
IInvalidParameter | The operating system's request to set the region height failed. The height parameter is invalid. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
In Motif, if the window is too small to show all of the text, it is not an error. In this situation, this function does not throw an exception.
![]() |
public:
virtual IMultiLineEdit& setEditRegionWidth(long width)
Sets the width of the edit region. The edit region is the rectangular area in which the text is displayed.
IInvalidParameter | The operating system's request to set the region width failed. The width parameter is invalid. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
In Motif, if the window is too small to show all of the text, it is not an error. In this situation, this function does not throw an exception.
These style members provide a set of valid styles for this class. Use these members to query and set the MLE styles. You can use these styles with the styles in the IWindow Styles class.
![]() |
public:
virtual unsigned long convertToGUIStyle( const IBitFlag& style, bool extendedOnly = false ) const
Converts a style object into a value appropriate for the presentation system. The default action is to return the base GUI styles for the platform. Extended styles, those defined by the application and the Open Class Library, are returned if you set extendedOnly to true.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static Style defaultStyle()
Returns the default style. The default style is classDefaultStyle unless you have changed the style using setDefaultStyle.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static void setDefaultStyle(const Style& style)
Sets the default style for all subsequent MLEs.
This member function is not thread safe. In a multithreaded application, it should only be called when a conflict is not possible. A conflict can arise if you set the default style on one thread at the same time that it is being queried on another. In this situation, the query would take place while the style is in an unknown state.
When you create a window class and do not specifically specify window styles in the constructor, the Open Class Library queries the default style. Therefore, the only safe place to call this member function is when no other application threads that create windows are active.
Another way to avoid a conflict in a multithreaded application is to specifically specify window styles on window construction, rather than calling this member function.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style border
Causes a thin border to be drawn around the MLE.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style border3D
Adds an etched 3D border to the control. This style is ignored if border is not specified.
Windows | OS/2 | AIX |
Yes | Ignored | Ignored |
![]() |
public:
static const Style classDefaultStyle
Provides the original default style for this class, which is the following: IMultiLineEdit::border | IMultiLineEdit::verticalScroll | IMultiLineEdit::wordWrap | IMultiLineEdit::border3D | IWindow::visible.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style horizontalScroll
Adds a horizontal scroll bar to the MLE.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style ignoreTab
Causes the MLE to ignore tab keystrokes. The function sends a keyboard event to the owner of the MLE.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style readOnly
Restricts the user from entering any data.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style verticalScroll
Adds a vertical scroll bar to the MLE.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style wordWrap
Causes text word-wrap at the end of a line.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to manipulate characteristics of the tab operation.
![]() |
public:
virtual IMultiLineEdit& setTab( unsigned long tabPixelInterval )
Sets the interval at which tab stops are placed in the MLE. This interval is expressed in pixels.
IAccessError | The operating system's request to set the tab failed. |
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
Use these members to access the text of the MLE.
![]() |
public:
virtual IMultiLineEdit& add( const char* text, unsigned long textSize = 0, EOLFormat type = cfText )
Inserts the specified text into the MLE at the current cursor position
and positions the cursor at the end of the inserted text.
Note:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL. AIX only supports the noTran format enumerator.
![]() |
public:
virtual IMultiLineEdit& addAsLast( const char* text, unsigned long textSize = 0, EOLFormat type = cfText )
Inserts the specified text into the MLE at the end of the current text but does not change the cursor position.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL. AIX only supports the noTran format enumerator.
![]() |
public:
virtual IMultiLineEdit& addAtOffset( const char* text, unsigned long offset, unsigned long textSize = 0, EOLFormat type = cfText )
Inserts the specified text into the MLE at the point specified. At the conclusion of this insert, this function positions the cursor at the same character as it was before the insert.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL. AIX only supports the noTran format enumerator.
![]() |
public:
unsigned long limit() const
Returns the currently set number of bytes that the MLE can hold.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Returns the value of the current maximum allowable length of a string entered from the keyboard.
![]() |
public:
virtual IMultiLineEdit& setLimit(unsigned long newLimit)
Sets a limit on the number of bytes that can be input into the MLE.
IAccessError | The operating system's request to set the text limit failed, or the MLE already contains more text than the proposed limit. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Sets the value of the current maximum allowable length of a string entered from the keyboard. Text set into the control programmatically will ignore this limit on AIX.
![]() |
Sets the contents of the MLE to the text specified.
public:
virtual IMultiLineEdit& setText( const char* buffer, unsigned long bufferSize )
Overwrites the current contents of the MLE with the specified text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL.
public:
virtual IMultiLineEdit& setText(const char* text)
Overwrites the current contents of the MLE with the specified text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL.
public:
virtual IMultiLineEdit& setText(const IResourceId& text)
Overwrites the current contents of the MLE with the specified text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX does not support embedded NULLs. This function only loads the text up to the first NULL.
![]() |
Returns the current contents of the MLE.
public:
virtual IString text() const
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IString text(unsigned long lineNumber) const
If you do not specify lineNumber, this function returns the current contents of the MLE. If you do specify lineNumber, this function returns the current MLE text at the specified line.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual unsigned long textLength() const
Returns the current length of the MLE text, in bytes. The length includes any CR-LFs present.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members remove text from the MLE.
![]() |
public:
virtual IMultiLineEdit& removeAll()
Deletes the entire contents of the MLE.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members provide undo capabilities.
![]() |
public:
bool isUndoable() const
If any undoable actions have been performed on the contents of the MLE, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
This function always returns false.
![]() |
public:
virtual IMultiLineEdit& undo()
Restores the MLE's content to the state it was in before the last change. If the undo fails, the change flag is reset.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
These members provide for word-wrap in the MLE.
![]() |
public:
virtual IMultiLineEdit& disableWordWrap()
Disables word-wrap mode in the MLE.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IMultiLineEdit& enableWordWrap(bool enable = true)
Enables or disables word-wrap mode in the MLE. Word-wrap breaks the text at word boundaries to keep all of the text in a line visible, even if the text is wider than the MLE's window. The text is still one line of text. No carriage-control or line-feed characters are added.
IAccessError | The operating system's request to enable word-wrapping failed. |
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
bool isWordWrap() const
If the MLE is in word-wrap mode, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum EOLFormat { cfText, noTran, MLEFormat }
Use these enumerators to specify the format for the end-of-line characters when importing and exporting text:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
AIX only supports the noTran format enumerator. If you specify any other EOLFormat, the member functions ignore it and use noTran instead.
virtual ~IControl()
virtual ~INotifier()
virtual INotifier& disableNotification() = 0
virtual INotifier& enableNotification( bool enable = true ) = 0
INotifier()
virtual bool isEnabledForNotification() const = 0
virtual INotifier& notifyObservers( const INotificationEvent& event ) = 0
virtual INotifier& notifyObserversAsync( const INotificationEvent& event )
const IThreadId& threadId() const
virtual ~ITextControl()
static bool clipboardHasTextFormat()
virtual ISize displaySize(const char* text = 0) const
virtual ITextControl& setLayoutDistorted( unsigned long layoutAttributeOn, unsigned long layoutAttributeOff )
virtual ITextControl& setText(const IResourceId& text)
virtual ITextControl& setText(const char* text)
virtual ~IWindow()
IAccelTblHandle acceleratorHandle() const
IAcceleratorTable acceleratorTable() const
virtual IColor activeColor() const
IWindow& addOrReplaceAttribute( const IAttributeName& name, const IAttribute& attribute )
IWindow& adoptWindowData( const DataHandle& typeToken, IWindowData* windowData )
virtual IString asDebugInfo() const
virtual IString asString() const
IAttributeName attributeNameAt( const AttributeCursor& cursor ) const
const IAttribute* attributeWithName( const IAttributeName& name, ESearchType search = kWindowOnly ) const
virtual IWindow& capturePointer(bool capture = true)
ISize characterSize() const
IWindowHandle childAt(const ChildCursor& cursor) const
IWindow* childWindowAt(const ChildCursor& cursor) const
virtual IArgList convertToArgList( const IBitFlag& style ) const
static DataHandle dataHandleWithKey( const char* dataKeyName )
virtual IWindowHandle defaultEmphasisButton() const
static SiblingOrder defaultOrdering()
virtual IWindowHandle defaultPushButton() const
static IWindow* desktopWindow()
virtual IWindow& disable()
virtual IColor disabledBackgroundColor() const
virtual IColor disabledForegroundColor() const
virtual IWindow& disableGroup()
IWindow& disableMinimumSizeCaching()
virtual IWindow& disableNotification()
virtual IWindow& disableTabStop()
virtual IWindow& disableUpdate()
bool dispatchRemainingHandlers( IEvent& event, bool callDefProc = true )
virtual IWindow& enable(bool enableWindow = true)
virtual IWindow& enableGroup(bool enable = true)
IWindow& enableMinimumSizeCaching( bool enableCaching = true )
virtual IWindow& enableNotification(bool enable = true)
virtual IWindow& enableTabStop(bool enable = true)
virtual IWindow& enableUpdate(bool enableWindow = true)
static IWindow::ExceptionFn* exceptionFunction()
virtual IFont font() const
virtual IWindowHandle handle() const
virtual bool handleException( IException& dispatcherException, IEvent& exceptionEvent )
virtual IWindowHandle handleForChildCreation() const
static IWindowHandle handleWithParent( unsigned long identifier, const IWindowHandle& parent )
static IWindowHandle handleWithPointerCaptured()
virtual bool hasFocus() const
virtual bool hasPointerCaptured() const
unsigned long helpId() const
virtual IWindow& hide()
virtual IWindow& hideSourceEmphasis()
virtual IColor hiliteBackgroundColor() const
virtual IColor hiliteForegroundColor() const
virtual unsigned long id() const
virtual IColor inactiveColor() const
virtual IRectangle invalidatedRect() const
virtual IRegionHandle invalidatedRegion() const
bool isAutoDeleteObject() const
bool isAutoDestroyWindow() const
bool isEnabled() const
virtual bool isEnabledForNotification() const
virtual bool isFrameWindow() const
virtual bool isGroup() const
bool isHandling(const EventMask& events) const
virtual bool isLayoutDistorted( unsigned long layoutAttribute ) const
bool isMinimumSizeCachingEnabled() const
bool isShowing() const
virtual bool isTabStop() const
bool isUpdateEnabled() const
virtual bool isValid() const
bool isVisible() const
static bool isWindowValid(const IWindow* window)
IDMItemProvider* itemProvider() const
IWindow(const IWindowHandle& handle)
IWindow(unsigned long identifier, IWindow* parent)
virtual IRectangle layoutAdjustment() const
static IPoint mapPoint( const IPoint& point, const IWindowHandle& from, const IWindowHandle& to )
virtual IWindowHandle matchForMnemonic( unsigned short character ) const
IMessageQueueHandle messageQueue() const
ISize minimumSize(bool windowCalculatedSize = false) const
virtual IPointerHandle mousePointer() const
static void movePointerTo(const IPoint& position)
virtual IWindow& moveSizeTo( const IRectangle& newSizeAndPosition )
virtual IWindow& moveTo(const IPoint& newPosition)
virtual IRectangle nativeRect() const
virtual INotifierAddress notifierAddress() const
virtual IWindow& notifyObservers( const INotificationEvent& event )
virtual IWindow& notifyObserversAsync( const INotificationEvent& event )
static IWindow* objectWindow()
virtual IWindow* owner() const
IWindow* parent() const
virtual ISize parentSize() const
static ISize parentSize(const IWindowHandle& windowHandle)
static IPoint pointerPosition()
virtual IPoint position() const
virtual IWindow& positionBehindSibling( const IWindowHandle& siblingWindow )
virtual IWindow& positionBehindSiblings()
virtual IWindow& positionOnSiblings()
virtual const IWindow& postEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual const IWindow& postEvent( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual const IWindow& postEvent(const IEvent& event) const
virtual IPresSpaceHandle presSpace() const
virtual IRectangle rect() const
virtual IWindow& refresh( const IRectangle& invalidRectangle, bool immediate = false )
virtual IWindow& refresh(RefreshType type = paintAll)
virtual IWindow& releasePointer()
virtual void releasePresSpace( const IPresSpaceHandle& presentationSpaceHandle ) const
IWindow& removeAllAttributes()
IWindow& removeAttribute(const IAttributeName& name)
virtual IWindow& resetActiveColor()
virtual IWindow& resetBackgroundColor()
virtual IWindow& resetDisabledBackgroundColor()
virtual IWindow& resetDisabledForegroundColor()
virtual IWindow& resetFont()
virtual IWindow& resetForegroundColor()
virtual IWindow& resetHiliteBackgroundColor()
virtual IWindow& resetHiliteForegroundColor()
virtual IWindow& resetInactiveColor()
IWindow& resetMinimumSize()
virtual IWindow& resetShadowColor()
virtual IEventResult sendEvent(const IEvent& event) const
virtual IEventResult sendEvent( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual IEventResult sendEvent( EventType eventType, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
IWindow& setAcceleratorHandle( const IAccelTblHandle& handle )
IWindow& setAcceleratorTable( const IAcceleratorTable* acceleratorTable )
virtual IWindow& setActiveColor(const IColor& color)
IWindow& setAutoDeleteObject(bool autoDelete = true)
IWindow& setAutoDestroyWindow(bool autoDestroy = false)
virtual IWindow& setBackgroundColor(const IColor& color)
static void setDefaultOrdering(SiblingOrder order)
virtual IWindow& setDisabledBackgroundColor( const IColor& color )
virtual IWindow& setDisabledForegroundColor( const IColor& color )
static IWindow::ExceptionFn* setExceptionFunction( IWindow::ExceptionFn* exceptionFunction )
virtual IWindow& setFocus()
virtual IWindow& setFont(const IFont& font)
virtual IWindow& setForegroundColor(const IColor& color)
IWindow& setHelpId(unsigned long helpTopicId)
virtual IWindow& setHiliteBackgroundColor( const IColor& color )
virtual IWindow& setHiliteForegroundColor( const IColor& color )
virtual IWindow& setId(unsigned long newIdentifier)
virtual IWindow& setInactiveColor(const IColor& color)
IWindow& setItemProvider(IDMItemProvider* dragProvider)
virtual IWindow& setLayoutDistorted( unsigned long layoutAttributesOn, unsigned long layoutAttributesOff )
IWindow& setMinimumSize(const ISize& size)
virtual IWindow& setMousePointer( const IPointerHandle& mousePointer )
virtual IWindow& setOwner(const IWindow* newOwner)
virtual IWindow& setParent(const IWindow* newParent)
virtual IWindow& setShadowColor(const IColor& color)
virtual IColor shadowColor() const
virtual IWindow& show(bool showWindow = true)
virtual IWindow& showSourceEmphasis(bool show = true)
virtual ISize size() const
virtual IWindow& sizeTo(const ISize& newSize)
IWindow& startHandling(const EventMask& events)
IWindow& stopHandling(const EventMask& events)
virtual IWindow& validateRect( const IRectangle& validatedRectangle )
virtual IWindow& validateRegion( const IRegionHandle& validatedRegion )
virtual IRectangle visibleRectangle() const
IWindowData* windowData(const DataHandle& typeToken) const
static IWindow* windowWithHandle( const IWindowHandle& windowHandle, bool allThreads = true )
static IWindow* windowWithOwner( unsigned long identifier, const IWindow* owner, bool allThreads = true )
static IWindow* windowWithParent( unsigned long identifier, const IWindow* parent, bool allThreads = true )
static INotificationId const activeColorId
static const EventMask allMouseMoves
static INotificationId const attributeAddReplaceId
static INotificationId const attributeRemoveId
static INotificationId const backgroundColorId
static INotificationId const borderColorId
static const Style clipChildren
static const Style clipSiblings
static const Style clipToParent
static INotificationId const commandId
static const Style disabled
static INotificationId const disabledBackgroundColorId
static INotificationId const disabledForegroundColorId
static INotificationId const enableId
static INotificationId const focusId
static INotificationId const fontId
static INotificationId const foregroundColorId
static const Style group
static INotificationId const hiliteBackgroundColorId
static INotificationId const hiliteForegroundColorId
static INotificationId const inactiveColorId
static const Style leftToRight
static const EventMask mouseEntersLeaves
static const Style noStyle
static INotificationId const positionId
static const Style rightToLeft
static const Style saveBits
static INotificationId const shadowColorId
static INotificationId const sizeId
static const EventMask someMouseMoves
static const Style synchPaint
static INotificationId const systemCommandId
static const Style tabStop
static const Style visible
static INotificationId const visibleId
static INotificationId const allChangesId
static INotificationId const deleteId
static INotificationId const textId
IWindow& addHandler(IHandler* newHandler)
virtual IWindow& addObserver( IObserver& observer, const IInterest& interest )
static void addToWindowSet( IWindow* window, const IWindowHandle& windowHandle )
IWindow& bindMessageQueue(bool bindToMessageQueue = true)
virtual ISize calcMinimumSize() const
IColor color( unsigned long colorArea, const IColor& defaultColor ) const
IColor color(unsigned long colorArea) const
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, IXmCreateFunction createFunction, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* callerArgList, unsigned int callerNumberArguments, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, const char* windowClass, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
virtual IWindowHandle create( unsigned long id, const char* text, unsigned long style, const char* windowClass, const IWindowHandle& parent, const IWindowHandle& owner, const IRectangle& initRect, const void* ctlData, const void* presParams, IWindow::SiblingOrder ordering = defaultOrdering ( ), unsigned long extendedStyle = 0 )
virtual IWindowHandle create( unsigned long id, const char* text, const IBitFlag& style, IXmCreateFunction createFunction, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, IWindow::SiblingOrder ordering = defaultOrdering ( ) )
IWindow& defaultProcedure(IEvent& event)
bool deleteIsInProcess() const
bool dispatch(IEvent& event)
virtual unsigned long extendedStyle() const
bool isBoundToMessageQueue() const
bool isPrimaryWindow() const
bool isUserWindowWordReserved() const
IWindow()
IWindowNotifyHandler* notificationHandler() const
virtual IWindow& notifyObservers( const INotificationId& notification )
IObserverList& observerList( const IInterest* interest = 0 ) const
virtual IWindow& prepareForUse( const IWindowHandle& windowHandle )
virtual IWindow& removeAllObservers()
static void removeFromWindowSet(IWindow* window)
IWindow& removeHandler(IHandler* oldHandler)
virtual IWindow& removeObserver(IObserver& observer)
virtual IWindow& removeObserver( IObserver& observer, const IInterest& interest )
IWindow& reserveUserWindowWord(bool reserve = true)
virtual IWindow& resetColor(unsigned long colorArea)
ISize savedMinimumSize() const
IWindow& saveMinimumSize(const ISize& size)
virtual IWindow& setBidiSettings( const IBidiSettings& bidiSettings, bool childInherit, bool refresh )
virtual IWindow& setColor( unsigned long colorArea, const IColor& color )
virtual IWindow& setDefaultEmphasisButton( const IWindowHandle& defaultEmphasisButton, bool enable )
virtual IWindow& setDefaultPushButton( const IWindowHandle& defaultPushButton )
virtual IWindow& setExtendedStyle( unsigned long extendedStyle )
IWindow& setNotificationHandler( IWindowNotifyHandler* notifyHandler )
virtual IWindow& setStyle(unsigned long style)
IWindow& setWindowData( long index, unsigned short dataValue )
IWindow& setWindowData(long index, unsigned long dataValue)
IWindow& startHandlingEventsFor( const IWindowHandle& windowHandle )
IWindow& startHandlingEventsFor( unsigned long identifier, IWindow* parent )
virtual unsigned long style() const
IWindow& unbindMessageQueue()
unsigned long windowULong(long index) const
unsigned short windowUShort(long index) const
virtual INotifier& addObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& notifyObservers( const INotificationId& id ) = 0
virtual IObserverList& observerList( const IInterest* anInterest = 0 ) const = 0
virtual INotifier& removeAllObservers() = 0
virtual INotifier& removeObserver( IObserver& observer, const IInterest& interest )
virtual INotifier& removeObserver(IObserver& observer) = 0
IControl()
ITextControl()