The IEntryField class creates and manages entry field controls. An entry field control is a control window which allows a user to type and edit a single line of text.
You derive classes from the following handlers and attach them to an entry field control:
The Open Class Library implements this class with the XmText widget (instead of XmTextField) to allow more uniformity between IEntryField and IMultiLineEdit.
You can implement specific keystroke processing, such as creating a numeric-only input field, by deriving a handler from IEditVerifyHandler and attaching your handler to the entry field object.
You can construct and destruct objects of this class.
![]() |
public:
virtual ~IEntryField()
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IEntryField(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:
IEntryField(const IWindowHandle& handle)
You can construct objects of this class by using the handle of an existing entry field.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
IEntryField( 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. |
IInvalidStyle | Alignment styles specified were in conflict. You must specify only one alignment style. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
protected:
IEntryField()
Constructs objects of this class. This is a protected constructor that can be used by derived classes. This is the default constructor and accepts no parameters.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query and change characteristics of the entry field control.
![]() |
public:
Alignment alignment() const
Returns the current alignment for this entry field object. The returned value is an enumerator provided by Alignment.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Left alignment is always returned.
![]() |
public:
CharType charType() const
Returns the current type of character that this entry field accepts. The returned value is an enumerator provided by CharType.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
An IEntryField is always of type any.
An IEntryField is always of type any.
![]() |
public:
virtual IEntryField& setAlignment(Alignment alignment)
Sets the alignment of the entry field control.
IInvalidParameter | An invalid Alignment was specified. You must specify one of the valid Alignment values. Current valid values are left, center, and right. |
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
Alignment can only be set to left.
Alignment can be specified on the constructor, but cannot be changed dynamically.
![]() |
public:
virtual IEntryField& setCharType(CharType type)
Sets the type of character the entry field control can accept.
IInvalidParameter | An invalid CharType was specified. You must specify one of the valid CharType values. Current valid values are sbcs, dbcs, any, and mixed. |
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
This platform only supports the CharType enumerator any. This type corresponds to the X multibyte character set (MBCS).
Use auto scroll members to query and change the autoScroll style of the entry field object. The autoScroll style determines if the entry field automatically scrolls in the appropriate direction if the user tries to move off the end of a line.
![]() |
public:
virtual IEntryField& disableAutoScroll()
Disables the style autoScroll on an entry field control.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IEntryField& enableAutoScroll(bool enable = true)
Enables or disables the style autoScroll on an entry field control.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
bool isAutoScroll() const
If the entry field control has the style autoScroll set, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use auto tab members to query and change the autoTab style of the entry field object. The autoTab style determines if the entry field will automatically generate a tab character when the field is filled by adding a character to the end of the text.
![]() |
public:
virtual IEntryField& disableAutoTab()
Disables the style autoTab on an entry field control.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IEntryField& enableAutoTab(bool enable = true)
Enables or disables the style autoTab on an entry field control.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
bool isAutoTab() const
If the entry field control has the style autoTab set, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to transfer data between the clipboard and the entry field control. Each of these operations deals with the selected text in the entry field control.
![]() |
public:
virtual IEntryField& clear(unsigned long timestamp = 0)
Replaces the selected text in the entry field 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 entry field is selected before making the call to clear.
To remove the text contents of the entry field, regardless of whether any text is selected, call setText, passing it a 0-length string, or removeAll.
IInvalidRequest | The entry field has no text selected. |
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.
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 Windows release does not use the timestamp parameter.
![]() |
public:
virtual IEntryField& copy(unsigned long timestamp = 0)
Copies the selected text 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 entry field is selected before making the call to copy.
IInvalidRequest | The entry field has no text selected. |
IAccessError | The operating system's request to copy from the entry field 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.
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 Windows release does not use the timestamp parameter.
![]() |
public:
virtual IEntryField& cut(unsigned long timestamp = 0)
Removes the selected text from the entry field control and puts 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 entry field is selected before making the call to cut.
To remove the text contents of the entry field, regardless of whether any text is selected, call setText, passing it a 0-length string, or removeAll.
IInvalidRequest | The entry field has no text selected. |
IAccessError | The operating system's request to cut from the entry field 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.
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 Windows release does not use the timestamp parameter.
![]() |
public:
virtual IEntryField& discard()
Deletes the 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 entry field is selected before making the call to discard.
To remove the text contents of the entry field, regardless of whether any text is selected, call setText, passing it a 0-length string, or removeAll.
IInvalidRequest | The entry field has no text selected. |
IAccessError | The operating system's request to discard the text from the entry field failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IEntryField& paste()
Copies text from the clipboard to the entry field control, 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 entry field 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 entry field failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query, set, and reset colors of the entry field.
![]() |
public:
virtual IColor backgroundColor() const
Returns the background color value of the entry field. If you have not set this color, the default is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This member is overridden in this derived class for specific operating system behavior.
![]() |
public:
virtual IColor foregroundColor() const
Returns the foreground color value of the entry field. If you have not set this color, the default is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This member is overridden in this derived class for specific operating system behavior.
Use these members to query and change the command style of the entry field object. The command style identifies the entry field as a command entry field. This information can be used to provide command help if the user requests help for this field.
![]() |
public:
virtual IEntryField& disableCommand()
Disables the style command on an entry field control.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IEntryField& enableCommand(bool enable = true)
Enables or disables the style command on an entry field control.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
bool isCommand() const
If the entry field control has the style command set, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
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 entryfield 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:
IEntryField& initialize( unsigned long style, const IWindowHandle& wh )
Initializes private data for the entry field control. Both the IEntryField constructors and the derived classes' constructors call this function. This function can only be called after IWindow::startHandlingEventsFor or IWindow::create has been called.
Windows | OS/2 | AIX |
No | No | Yes |
![]() |
protected:
virtual bool passEventToOwner(IEvent& event)
This member function is use to determine if an event should continue to be dispatched up the owner chain.
Windows | OS/2 | AIX |
Yes | No | Yes |
This override stops mouse down, up and click events and most key events that are dispatched to an IEntryField object from propagating up the owner chain. The override does allow the enter key event to propagate up the owner chain so the IFrameWindow object that is up the owner chain can handle the enter key for default button behavior.
This override stops mouse down, up and click events that are dispatched to an IEntryField object from propagating up the owner chain.
These members provide utilities used to implement this class.
![]() |
protected:
virtual IEntryField& setStyle(unsigned long style)
Replaces the style of an entry field control, while preserving the cursor position and selected text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the insert mode for the entry field. The insert mode determines whether characters are inserted or replaced at the cursor position.
![]() |
public:
virtual IEntryField& disableInsertMode()
Enables the entry field for overtype mode and changes the cursor's appearance.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IEntryField& enableInsertMode(bool insert = true)
Enables the entry field for insert mode and changes the cursor's appearance.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
bool isInsertMode() const
Queries whether the entry field is in insert mode.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Layout support members supply information used by the canvas classes to provide dialog-like behavior.
![]() |
protected:
virtual ISize calcMinimumSize() const
Returns the minimum size that this entry field control can be, based on the text string length limit and the current font.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
protected:
virtual IEntryField& 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 |
Use these members to set and query the left index of the entry field. The left index is the index of the first displayed character at the left edge of the entry field.
![]() |
public:
unsigned long leftIndex() const
Returns the index of the first character displayed at the left edge of the entry field control. The index is 0-based. This function is ignored unless the field is visibly scrollable.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
This member is not supported on Windows. It will always return 0 on this platform.
![]() |
public:
virtual IEntryField& setLeftIndex(unsigned long index)
Sets the first displayed character at the left edge of the entry field control. The index is 0-based.
IAccessError | The operating system's request to set the left index failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use margin members to query and change the margin style of the entry field object. The margin style determines if the entry field control will be drawn with a border around the editable text.
![]() |
public:
virtual IEntryField& disableMargin()
Disables the style margin on an entry field control. As a result, the entry field will not have a border surrounding its edit rectangle.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
virtual IEntryField& enableMargin(bool enable = true)
Enables or disables the style margin on an entry field control. As a result, this function adds or removes a border from the edit area.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
bool isMargin() const
If the entry field control has the style margin set, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to identify and enable notifications sent to observer objects.
![]() |
public:
virtual IEntryField& enableNotification(bool enable = true)
Enables or disables the entry field control to send notifications to any observer objects.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static INotificationId const characterTypeId
Notification identifier provided to observers when the character type of the entry field control changes. IEntryField provides the character type in the INotificationEvent::eventData field of the INotificationEvent. This value is one of the predefined CharType enum values defined in this class.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This notification identifier is ignored on Windows.
![]() |
public:
static INotificationId const dataUpdateId
Notification identifier provided to observers when the data update mode of the entry field control changes. IEntryField provides a boolean value in the INotificationEvent::eventData field of the INotificationEvent. This value is true if the user can now update the data, and false if the user cannot update the data.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static INotificationId const insertModeId
Notification identifier provided to observers when the insert mode of the entry field control changes. IEntryField provides a boolean value in the INotificationEvent::eventData field of the INotificationEvent. This value is true if insert mode is now enabled, and false if replace mode is enabled.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
static INotificationId const limitId
Notification identifier provided to observers when the text limit of the entry field control changes. IEntryField provides the new text limit value in the INotificationEvent::eventData field of the INotificationEvent. This value will be the new text limit.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members are overloaded to ensure a disabled entry field is set to a read-only state to prevent user input.
![]() |
public:
virtual IEntryField& disable()
Disables an entry field control. When you disable the entry field, the entry field has the following characteristics:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IEntryField& enable(bool enable = true)
Enables or disables an entry field control.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
Overwrites the current contents of the entry field with the specified text.
If the text length exceeds the text limit of the entry field, the text is truncated.
public:
virtual IEntryField& setText(const IResourceId& text)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
public:
virtual IEntryField& setText(const char* text)
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IString text() const
Returns the text of the entry field's control window.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
This override is added for a Motif-unreadable style.
These members query and modify the read-only mode in the entry field, which specifies if the user can change the entry field text.
![]() |
public:
virtual IEntryField& disableDataUpdate()
Prevents inserting or changing characters in the entry field's text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IEntryField& enableDataUpdate(bool update = true)
Enables or disables the read-only mode on an entry field control.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isWriteable() const
If the contents of the entry field can be modified, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to manipulate selected text.
![]() |
public:
unsigned long cursorPosition() const
Returns the character position from the start of the entry field to the current cursor location.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IRange selectedRange() const
Returns the range of the selected text. If no text is selected, an exception is thrown. The selected range is the 0-based index of the first character selected and the 0-based index of the last character selected.
IInvalidRequest | The entry field has no text selected. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
IString selectedText() const
Returns the selected text string.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
unsigned long selectedTextLength() const
Returns the size of the selected area in bytes. The length does not include the NULL terminator. No exception is thrown if there is no text selected; 0 is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IEntryField& selectRange( const IRange& range = IRange ( 0 , end ), unsigned long timestamp = 0 )
Selects a range of text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IEntryField& setCursorPosition( unsigned long newCursorPos )
Moves the cursor to a specific position in the entry field. The count begins at the first position in the entry field, not at the cursor's current position.
IAccessError | The operating system's request to set the cursor position failed. See the exception text for further information about the failure. |
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 |
These style members provide a set of valid styles for this class. Use these members to query and set the entry field 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 entry fields.
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 anyData
Sets the entry field to accept text that is a mixture of single-byte character set (SBCS) and double-byte character set (DBCS) characters.
If the text contains both SBCS and DBCS characters and will be converted from an ASCII code page to an EBCDIC code page, this style causes an entry field to ignore accounting for shift-in and shift-out characters that would be introduced into its text.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style autoScroll
If the user tries to move off the end of a line, the entry field automatically scrolls one-third the width of the window in the appropriate direction.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style autoTab
Causes a tab key to be generated when the entry field is filled by adding a character at the text limit of the entry field text.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
static const Style border3D
Adds an etched 3D border to the control.
Windows | OS/2 | AIX |
Yes | Ignored | Ignored |
![]() |
public:
static const Style centerAlign
Sets the text in the entry field to be centered.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
This style cannot be mixed with the autoScroll or unreadable styles.
![]() |
public:
static const Style classDefaultStyle
Provides the original default style for this class, which is the following: IWindow::visible | IEntryField::margin | IEntryField::autoScroll | IEntryField::leftAlign | IEntryField::anyData | IEntryField::border3D.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style command
Creates information used by the Help Manager to provide command help if the user requests help for this entry field. No more than one entry field on each window should be given this style.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
static const Style dbcsData
Sets the entry field to accept double-byte text only.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
static const Style leftAlign
Set the text in the entry field to be left-justified.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style margin
Causes a border to be drawn around the entry field, with a margin between the border and the entry field. The margin's size is determined by the current font being used for entry field text (half a character-width wide and half a character-height high).
Because the margin and border are drawn around the entry field, using the margin style does not change the position of the entry field itself.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style mixedData
Sets the entry field to accept text that is a mixture of SBCS and DBCS characters. Conversion from an ASCII DBCS code page to an EBCDIC DBCS code page can result in a possible increase in the length of the data because of the addition of shift-in and shift-out characters, but it will not exceed the text limit of the entry field.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
static const Style readOnly
Prevents insertions or changes to the text in the entry field.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
static const Style rightAlign
Sets the text in the entry field to be right-justified.
Windows | OS/2 | AIX |
Yes | Yes | Ignored |
This style cannot be mixed with the autoScroll or unreadable styles.
![]() |
public:
static const Style sbcsData
Sets the entry field to accept single-byte text only.
Windows | OS/2 | AIX |
Ignored | Yes | Yes |
![]() |
public:
static const Style unreadable
Causes the text in the entry field to be displayed using an asterisk for each character.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to query the entry field.
![]() |
public:
bool hasSelectedText() const
If any of the entry field text is selected, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool hasTextChanged() const
If any changes have been made to the entry field since the last time the changed flag was reset, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
bool isEmpty() const
If the entry field is empty, true is returned. Otherwise, false is returned.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IEntryField& resetTextChangedFlag()
Resets the changed flag so that from this point forward changes to the entry field can be detected. This is the same as IEntryField::setTextChangedFlag(false).
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
public:
virtual IEntryField& setTextChangedFlag( bool changed = true )
Sets a flag indicating the changed status of the entry field. If changed=true, a flag is set to indicate the entry field contents have changed. if changed=false, a flag is set to indicate the entry field contents have not changed.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Use these members to set and query the text limit of the entry field.
![]() |
public:
virtual unsigned long limit() const
Returns the length, in bytes, of the longest text the entry field can hold.
Note:
IAccessError | The operating system's request to query the entry field limit failed. See the exception text for further information about the failure. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Returns the value of the current maximum allowable length of a string entered from the keyboard.
The default text limit in the OS/2 operating system environment is 32.
![]() |
Sets the maximum number of bytes the entry field can contain.
The calcMinimumSize function uses
the text limit to determine the minimum size of the entry field.
Note:
public:
virtual IEntryField& setLimit(const IResourceId& textLimit)
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.
The default text limit in the OS/2 operating system environment is 32.
public:
virtual IEntryField& setLimit(unsigned long textLimit)
IInvalidRequest | The entry field already contains more characters than the proposed limit. |
Windows | OS/2 | AIX |
Yes | Yes | Yes |
These members remove text from the entry field.
![]() |
public:
virtual IEntryField& removeAll()
Deletes the entire contents of the entry field control.
Windows | OS/2 | AIX |
Yes | Yes | Yes |
![]() |
enum Alignment { left, center, right }
Use these enumerators to specify the alignment of text in the entry field:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
Alignment enumeration is ignored. All entry fields have left alignment.
![]() |
enum CharType { any, sbcs, dbcs, mixed }
Use these enumerators to specify the type of character data allowed in the entry field:
Windows | OS/2 | AIX |
Yes | Yes | Yes |
CharType enumeration is ignored. All entry fields are of type any.
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 char* text)
virtual ITextControl& setText(const IResourceId& text)
virtual unsigned long textLength() const
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( unsigned long eventId, const IEventParameter1& parm1 = 0, const IEventParameter2& parm2 = 0 ) const
virtual const IWindow& postEvent( EventType eventType, 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)
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, const IBitFlag& style, IXmCreateFunction createFunction, const IWindow* parent, const IWindow* owner, const IRectangle& initRect, 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 )
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( unsigned long identifier, IWindow* parent )
IWindow& startHandlingEventsFor( const IWindowHandle& windowHandle )
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()