API Documentation > Interface Classes > Class uifcTextArea
Class uifcTextArea

# include <uifcTextArea.h>

class
uifcTextArea
: public virtual
uifcText
{
xaideclare(uifcTextArea)
...
};


Description
Method Summary
void
void
void
CreateTimer (uifcTextAreaTimer_ptr timer, xrstring timerName, xbool writeInTrail)
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
SetHeight (xint value)
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
StartTimer (xrstring timerName, xint duration)
void
StopTimer (xrstring timerName)
void
Methods Inherited from Class uifcComponent::
Methods Inherited from Class uifcText::
Method Detail
GetFrameOrigin
()
Determine the position of the component, in pixels, relative to its parent.
Returns:
GetLineOffset
(xint line)
Get the offset of the given line within the text, i.e. get the caret position which represents the start of the given line.
Parameters:
line
Returns:
GetCaretPosition
()
Get the caret position.
Returns:
void
InputBackspaceKeys
(xint count)
Execute a number of BACKSPACE key presses in the component.
Parameters:
count
Returns:
void
ReplaceSelectionWithText
(xint start, xint end, xrstring text)
Replace the text between the start and end caret positions with the given text.
Parameters:
start
end
text
Returns:
void
InsertTextIntoSelection
(xrstring text)
Insert the given text at the current caret position, replacing any selected text.
Parameters:
text
Returns:
GetLineLength
(xint line)
Get the length of the given line, i.e. the number of characters in it.
Parameters:
line
Returns:
InsertPopupMenu
(uifcComponent_ptr component)
Add a MenuPane to be displayed when the user presses the right mouse button over the component.
Parameters:
component
Returns:
void
UndoLastChange
()
Undo the last change applied to the text.
Returns:
void
SetSelectedRange
(uifcPoint_ptr value)
Select the text between the start and end caret positions. Note: If start < 0 then the selection is removed, forcing the selection anchor to move to the caret position. If end < 0, the entire text is selected from the start position onwards.
Parameters:
value
Returns:
void
ReplaceLineWithText
(xint line, xrstring text)
Replaces the text of the given line with the given text.
Parameters:
line
text
Returns:
void
PasteClipboardToSelection
()
Replace the selected text with the contents of the system clipboard.
Returns:
GetFrameSize
()
Determine the size of the component, in pixels.
Returns:
void
DeletePopupMenu
()
Delete a MenuPane from the component.
Returns:
void
SelectAll
()
Select all the text of the TextArea. The use of this operation has been superceded by SelectedRange operation is provided for backwards compatibility only.
Returns:
GetScreenOrigin
()
Determine the screen position of the component, in pixels.
Returns:
void
CopySelectionToClipboard
()
Copy the selected text into the system clipboard.
Returns:
void
CutSelectionToClipboard
()
Copy the selected text into the system clipboard and then delete the selected text.
Returns:
void
SetFrameSize
Set the size of the component, in pixels. This operation is only supported when the component's parent is one of the following classes : DrawingArea NakedWindow PGLWindow
Parameters:
value
Returns:
void
InputDeleteKeys
(xint count)
Execute a number of DELETE key presses in the component.
Parameters:
count
Returns:
GetFrameRectangle
()
Determine the size and position of the component, in pixels.
Returns:
GetLineCount
()
Get the number of lines of text in the TextArea.
Returns:
void
SetCaretPosition
(xint position)
Set the caret and the selection anchor positions.
Parameters:
position
Returns:
void
SetFrameOrigin
(uifcPoint_ptr value)
Set the screen position of the component, in pixels, relative to its parent. This operation is only supported when the component's parent is one of the following classes : DrawingArea NakedWindow PGLWindow
Parameters:
value
Returns:
GetSelectedRange
()
Get the caret positions of the start and the end of the selected text.
Returns:
GetFrameMinimumSize
()
Determine the minimum size of the component, in pixels.
Returns:
GetLineText
(xint line)
Returns a copy of the text of the given line. This must be freed with relmem after use.
Parameters:
line
Returns:
GetScreenRectangle
()
Determine the size and screen position of the component, in pixels.
Returns:
void
SetFrameRectangle
Set the size and screen position of the component, in pixels. This operation is only supported when the component's parent is one of the following classes : DrawingArea NakedWindow PGLWindow
Parameters:
rect
Returns:
void
RedoLastUndo
()
Repeat the last change which was undone.
Returns:
GetSelectedText
()
Get the selected text of the component.
Returns:
GetRectangleOfMonitor
()
Determine the rectangle of the screen upon which the majority of the given component is displayed.
Returns:
DoesActivateOnReturn
()
Returns:
Flag indicating whether a RETURN key press should generate a OnActivate() callback (xtrue) or whether it should cause the default button in the Dialog to be pressed (xfalse).
void
SetActivateOnReturn
(xbool flag)
Sets flag indicating whether a RETURN key press should generate a OnActivate() callback (xtrue) or whether it should cause the default button in the Dialog to be pressed (xfalse).
Parameters:
flag
Returns:
GetMinimumWidth
()
Returns:
The minimum width of the TextArea, in character widths.
void
SetMinimumWidth
(xint value)
Sets the minimum width of the TextArea, in character widths.
Parameters:
value
Returns:
GetPrompt
()
Returns:
The text to be displayed in the TextArea when the component does not have the focus and its contents are empty.
void
SetPrompt
(xrstring value)
Sets the text to be displayed in the TextArea when the component does not have the focus and its contents are empty.
Parameters:
value
Returns:
HasBorder
()
Returns:
Flag indicating whether the TextArea has a decorated shadow border.
void
SetHasBorder
(xbool flag)
Sets flag indicating whether the TextArea has a decorated shadow border.
Parameters:
flag
Returns:
GetMinimumHeight
()
Returns:
The minimum number of rows of the TextArea.
void
SetMinimumHeight
(xint value)
Sets the minimum number of rows of the TextArea.
Parameters:
value
Returns:
DoesAllowReturnInput
()
Returns:
Flag indicating whether to allow RETURN key presses to be ignored by the TextArea itself and instead passed to the application via a OnKeyDown() callback (xfalse) or whether they should be inserted into the text as a new-line character (xtrue).
void
SetAllowReturnInput
(xbool flag)
Sets flag indicating whether to allow RETURN key presses to be ignored by the TextArea itself and instead passed to the application via a OnKeyDown() callback (xfalse) or whether they should be inserted into the text as a new-line character (xtrue).
Parameters:
flag
Returns:
CanDrawContentDisabled
()
Returns:
Flag indicating whether the images embedded in the text contents of the TextArea should be greyed-out whenever the TextArea is insensitive.
void
SetCanDrawContentDisabled
(xbool flag)
Sets flag indicating whether the images embedded in the text contents of the TextArea should be greyed-out whenever the TextArea is insensitive.
Parameters:
flag
Returns:
IsHeightFixed
()
Returns:
Flag indicating whether the TextArea should increase its height to accomodate its contents (xfalse) or whether it should maintain its height as the contents grow (xtrue).
void
SetHeightFixed
(xbool flag)
Sets flag indicating whether the TextArea should increase its height to accomodate its contents (xfalse) or whether it should maintain its height as the contents grow (xtrue).
Parameters:
flag
Returns:
HasTextChanged
()
Returns:
Flag indicating whether the text contents of the TextArea have been modified.
The TextArea sets the value of this attribute to xfalse when the entire text is modified programmatically. The value is then automatically set to xtrue when the text is next changed.
This flag is provided for application use so that any "save if needed" functionality can be implemented for text editors. In this case the value should be set to xfalse once the text has been saved.
void
SetHasTextChanged
(xbool flag)
Sets flag indicating whether the text contents of the TextArea have been modified.
The TextArea sets the value of this attribute to xfalse when the entire text is modified programmatically. The value is then automatically set to xtrue when the text is next changed.
This flag is provided for application use so that any "save if needed" functionality can be implemented for text editors. In this case the value should be set to xfalse once the text has been saved.
Parameters:
flag
Returns:
GetStringValue
()
Returns:
The text contents of the TextArea as a string.
void
SetStringValue
(xrstring value)
Sets the text contents of the TextArea as a string.
Parameters:
value
Returns:
HasScrollBarsWhenNeeded
()
Returns:
Flag indicating whether scrollbars should only be displayed when they are required (xtrue) or whether they should always be displayed (xfalse).
void
SetHasScrollBarsWhenNeeded
(xbool flag)
Sets flag indicating whether scrollbars should only be displayed when they are required (xtrue) or whether they should always be displayed (xfalse).
Parameters:
flag
Returns:
GetKeyPressed
()
Returns:
The key whih was inserted via InputKey operation. The TextArea indicates that the key should not be passed on to, for example, the mapkey buffer by setting this attribute to KEY_NONE.
void
SetKeyPressed
(uifcKey_ptr key)
Sets the key whih was inserted via InputKey operation. The TextArea indicates that the key should not be passed on to, for example, the mapkey buffer by setting this attribute to KEY_NONE.
Parameters:
key
Returns:
DoesSizeByContents
()
Returns:
Flag indicating whether the TextArea should be sized according to its contents (xtrue) or whether it should use its Width attribute.
void
SetSizeByContents
(xbool flag)
Sets flag indicating whether the TextArea should be sized according to its contents (xtrue) or whether it should use its Width attribute.
Parameters:
flag
Returns:
IsWidthFixed
()
Returns:
Flag indicating whether the TextArea should increase its width to accomodate its contents (xfalse) or whether it should maintain its width as the contents grow (xtrue).
void
SetWidthFixed
(xbool flag)
Sets flag indicating whether the TextArea should increase its width to accomodate its contents (xfalse) or whether it should maintain its width as the contents grow (xtrue).
Parameters:
flag
Returns:
CanWrap
()
Returns:
Flag indicating whether the TextArea should automatically wrap its contents to the available width.
void
SetCanWrap
(xbool flag)
Sets flag indicating whether the TextArea should automatically wrap its contents to the available width.
Parameters:
flag
Returns:
DoesHighlightOnFocus
()
Returns:
Flag indicating whether the entire contents of the TextArea should be selected whenever the TextArea receives the keyboard input focus.
void
SetHighlightOnFocus
(xbool flag)
Sets flag indicating whether the entire contents of the TextArea should be selected whenever the TextArea receives the keyboard input focus.
Parameters:
flag
Returns:
IsPassword
()
Returns:
Flag indicating whether the component is used for password entry.
void
SetPassword
(xbool flag)
Sets flag indicating whether the component is used for password entry.
Parameters:
flag
Returns:
GetReadingOrder
()
Returns:
If the current locale supports multi-directional text (e.g. Hebrew) then this flag indicates the reading order of the text contents of the TextArea, otherwise the attribute value is ignored.
READING_ORDER_LEFT_TO_RIGHT
The text is displayed left-to-right
READING_ORDER_RIGHT_TO_LEFT
The text is displayed right-to-left and the position of any vertical scrollbars is reversed
void
SetReadingOrder
Sets if the current locale supports multi-directional text (e.g. Hebrew) then this flag indicates the reading order of the text contents of the TextArea, otherwise the attribute value is ignored.
READING_ORDER_LEFT_TO_RIGHT
The text is displayed left-to-right
READING_ORDER_RIGHT_TO_LEFT
The text is displayed right-to-left and the position of any vertical scrollbars is reversed
Parameters:
value
Returns:
GetUndoBufferSize
()
Returns:
The size in bytes of the undo buffer of the TextArea.
void
SetUndoBufferSize
(xint value)
Sets the size in bytes of the undo buffer of the TextArea.
Parameters:
value
Returns:
GetAutoCompleteLength
()
Returns:
The minimum number of characters which must match before any text matching is carried out.
void
SetAutoCompleteLength
(xint value)
Sets the minimum number of characters which must match before any text matching is carried out.
Parameters:
value
Returns:
IsCaretVisible
()
Returns:
Flag indicating whether the input caret should be displayed when the TextArea has the keyboard input focus.
void
SetCaretVisible
(xbool flag)
Sets flag indicating whether the input caret should be displayed when the TextArea has the keyboard input focus.
Parameters:
flag
Returns:
GetScrollBarPosition
()
Returns:
The position of the scrollbars of the component.
SCROLLBAR_POSITION_CENTER
No scrollbars
SCROLLBAR_POSITION_TOP
A horizontal scrollbar at the top
SCROLLBAR_POSITION_BOTTOM
A horizontal scrollbar at the bottom
SCROLLBAR_POSITION_LEFT
A vertical scrollbar at the left
SCROLLBAR_POSITION_RIGHT
A vertical scrollbar at the right
SCROLLBAR_POSITION_TOP_LEFT
A horizontal scrollbar at the top and a vertical scrollbar at the left
SCROLLBAR_POSITION_TOP_RIGHT
A horizontal scrollbar at the top and a vertical scrollbar at the right
SCROLLBAR_POSITION_BOTTOM_LEFT
A horizontal scrollbar at the bottom and a vertical scrollbar at the left
SCROLLBAR_POSITION_BOTTOM_RIGHT
A horizontal scrollbar at the bottom and a vertical scrollbar at the right
void
SetScrollBarPosition
Sets the position of the scrollbars of the component.
SCROLLBAR_POSITION_CENTER
No scrollbars
SCROLLBAR_POSITION_TOP
A horizontal scrollbar at the top
SCROLLBAR_POSITION_BOTTOM
A horizontal scrollbar at the bottom
SCROLLBAR_POSITION_LEFT
A vertical scrollbar at the left
SCROLLBAR_POSITION_RIGHT
A vertical scrollbar at the right
SCROLLBAR_POSITION_TOP_LEFT
A horizontal scrollbar at the top and a vertical scrollbar at the left
SCROLLBAR_POSITION_TOP_RIGHT
A horizontal scrollbar at the top and a vertical scrollbar at the right
SCROLLBAR_POSITION_BOTTOM_LEFT
A horizontal scrollbar at the bottom and a vertical scrollbar at the left
SCROLLBAR_POSITION_BOTTOM_RIGHT
A horizontal scrollbar at the bottom and a vertical scrollbar at the right
Parameters:
value
Returns:
GetMaximumWidth
()
Returns:
The maximum width of the TextArea, in character widths.
When SizeByContents attribute is xtrue, this value limits the width of the TextArea, with a value of 0 indicating that the TextArea should indeed size itself based upon its contents.
void
SetMaximumWidth
(xint value)
Sets the maximum width of the TextArea, in character widths.
When SizeByContents attribute is xtrue, this value limits the width of the TextArea, with a value of 0 indicating that the TextArea should indeed size itself based upon its contents.
Parameters:
value
Returns:
GetTextValueMaximumLength
()
Returns:
The maximum length of the text contents of the TextArea.
void
SetTextValueMaximumLength
(xint value)
Sets the maximum length of the text contents of the TextArea.
Parameters:
value
Returns:
IsSelectionVisible
()
Returns:
Flag indicating whether the selected text should be drawn highlighted when the TextArea does not have the keyboard input focus.
void
SetSelectionVisible
(xbool flag)
Sets flag indicating whether the selected text should be drawn highlighted when the TextArea does not have the keyboard input focus.
Parameters:
flag
Returns:
CanRedraw
()
Returns:
Flag indicating whether redraws are permitted in the TextArea.
void
SetCanRedraw
(xbool flag)
Sets flag indicating whether redraws are permitted in the TextArea.
Parameters:
flag
Returns:
GetAutoCompleteTextArray
()
Returns:
The array of values to use for text matching in the TextArea.
void
SetAutoCompleteTextArray
Sets the array of values to use for text matching in the TextArea.
Parameters:
values
Returns:
GetHeight
()
Returns:
The number of rows of the TextArea.
void
SetHeight
(xint value)
Sets the number of rows of the TextArea.
Parameters:
value
Returns:
GetPasswordCharacter
()
Returns:
The ASCII value of the character used for display when the TextArea is being used for password entry.
void
SetPasswordCharacter
(xint value)
Sets the ASCII value of the character used for display when the TextArea is being used for password entry.
Parameters:
value
Returns:
IsAutoCompleteCaseSensitive
()
Returns:
Flag indicating whether text matching is case-sensitive (xtrue) or whether it is irrespective of case (xfalse).
void
SetAutoCompleteCaseSensitive
(xbool flag)
Sets flag indicating whether text matching is case-sensitive (xtrue) or whether it is irrespective of case (xfalse).
Parameters:
flag
Returns:
GetTextGravity
()
Returns:
The gravity of the TextArea, which is used to determine where the caret should be placed after the contents are modified.
TEXT_GRAVITY_START
The caret is placed at the start of the first line of text
TOP_RIGHT
The caret is placed at the end of the first line of text
BOTTOM_LEFT
The caret is placed at the start of the last line of text
TEXT_GRAVITY_END
The caret is placed at the end of the last line of text
void
SetTextGravity
(uifcTextGravity value)
Sets the gravity of the TextArea, which is used to determine where the caret should be placed after the contents are modified.
TEXT_GRAVITY_START
The caret is placed at the start of the first line of text
TOP_RIGHT
The caret is placed at the end of the first line of text
BOTTOM_LEFT
The caret is placed at the start of the last line of text
TEXT_GRAVITY_END
The caret is placed at the end of the last line of text
Parameters:
value
Returns:
DoesAllowTabInput
()
Returns:
Flag indicating whether to allow TAB key presses to be ignored by the TextArea itself and used for focus traversal (xfalse) or whether they should be inserted into the text as a tab character (xtrue).
void
SetAllowTabInput
(xbool flag)
Sets flag indicating whether to allow TAB key presses to be ignored by the TextArea itself and used for focus traversal (xfalse) or whether they should be inserted into the text as a tab character (xtrue).
Parameters:
flag
Returns:
GetWideStringValue
()
Returns:
The text contents of the TextArea as a wide-string.
void
SetWideStringValue
(xrstring value)
Sets the text contents of the TextArea as a wide-string.
Parameters:
value
Returns:
DoesAutoCompleteReplace
()
Returns:
Flag indicating whether any matched text should be completely selected when a match occurs (xtrue) or whether only the appended text should be selected (xfalse).
void
SetAutoCompleteReplace
(xbool flag)
Sets flag indicating whether any matched text should be completely selected when a match occurs (xtrue) or whether only the appended text should be selected (xfalse).
Parameters:
flag
Returns:
GetTextValue
()
Returns:
The text contents of the TextArea.
void
SetTextValue
(xrstring value)
Sets the text contents of the TextArea.
Parameters:
value
Returns:
IsReadOnly
()
Returns:
void
SetReadOnly
(xbool flag)
Parameters:
flag
Returns:
void
AddActionListener
Parameters:
listener
Returns:
void
PushAction
Parameters:
action
Returns:
void
CreateTimer
(uifcTextAreaTimer_ptr timer, xrstring timerName, xbool writeInTrail)
Parameters:
timer
timerName
writeInTrail
Returns:
void
StartTimer
(xrstring timerName, xint duration)
Parameters:
timerName
duration
Returns:
void
StopTimer
(xrstring timerName)
Parameters:
timerName
Returns:
Was this helpful?