rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvText Class Reference

Gadget class. More...

#include <ilviews/gadgets/text.h>

Inheritance diagram for IlvText:
IlvScrolledGadget IlvGadget IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IlvText (IlvDisplay *display, const IlvRect &rect, const char *text, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
 IlvText (IlvDisplay *display, const IlvPoint &point, const char *text, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
 IlvText (IlvDisplay *display, const IlvRect &rect, const char *const *labels=0, IlUShort count=0, IlBoolean copy=IlTrue, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
 IlvText (IlvDisplay *display, const IlvPoint &point, const char *const *labels=0, IlUShort count=0, IlBoolean copy=IlTrue, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
void addLine (const char *text, IlShort line=-1)
 Inserts a new text line at the specified location.
virtual void addLines (const char *const *labels, IlUShort count, IlShort line=-1, IlBoolean redraw=IlFalse)
 Adds the specified text lines to the text gadget.
void addText (const char *text, IlShort line=-1, IlBoolean redraw=IlFalse)
 Adds the specified text to the text gadget.
virtual void adjustScrollBars (IlBoolean redraw=IlFalse)
 Recomputes the scroll bars.
virtual IlBoolean check (IlUShort character)
 Is called by the interactor for each key down event that corresponds to a regular character.
virtual void cursorMoved ()
 Is called from the interactor when the cursor is moved.
void cutLine (const IlvTextLocation &location)
 Removes the end of the specified line.
virtual void drawBackground (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget background.
virtual void drawFrame (IlvPort *, const IlvTransformer *, const IlvRegion *) const
 Draws the gadget frame.
virtual void drawGadgetContents (IlvPort *dst, const IlvTransformer *t=0, const IlvRegion *clip=0) const
 Draws the gadget contents.
void ensureVisible (const IlvTextLocation &location, const IlvTransformer *t=0)
 Changes the first line and the offset of the text gadget to ensure that the specified text location is visible.
IlvTextLocation getCursorLocation () const
 Returns the current location of the cursor.
IlvTextLocation getEndLocation () const
 Returns the last location of the text.
IlUShort getFirstLine () const
 Returns the index of the first text line displayed.
IlUShort getLastFullVisibleLine (const IlvTransformer *t=0) const
 Returns the index of the last visible line that can be seen without scrolling.
IlUShort getLastLine (const IlvTransformer *t=0) const
 Returns the index of the last text line displayed.
const char * getLine (IlUShort index) const
 Returns the specified text line.
IlUShort getLineLength (IlUShort index) const
 Returns the number of characters in the specified text line.
const char *const * getLines (IlUShort &count) const
 Returns an array of strings representing the text stored in the gadget.
IlvDim getMaxWidth () const
 Returns the width of the largest visible line.
IlUShort getNumberOfLines () const
 Returns the number of text lines stored in the object.
IlUShort getNumberOfVisibleLines (const IlvTransformer *t=0) const
 Returns the number of visible text lines.
IlvDim getOffset () const
 Returns the text gadget offset.
const char * getSelectedText () const
 Returns the selected text.
void getSelection (IlvTextLocation &from, IlvTextLocation &to) const
 Returns the location of the current selection.
const char * getText () const
 Returns the text stored in the text gadget.
virtual IlBoolean handleAltKey (IlUShort character)
 Is called by the interactor to handle keys pressed with the IlvMetaModifier.
virtual IlBoolean handleControl (IlUShort character)
 Is called by the interactor to handle the control keys.
virtual IlBoolean handleGadgetEvent (IlvEvent &)
 Handles the gadget events.
void insertChar (const IlvTextLocation &location, IlUShort character)
 Inserts a character at the specified location.
void insertText (const char *text, IlvTextLocation &location, IlBoolean redraw=IlFalse)
 Inserts text into the text gadget at the specified location.
IlBoolean isCursorShown () const
 Indicates whether the cursor is visible.
IlBoolean isEditable () const
 Indicates whether the text gadget can be edited.
void locateWord (const IlvTextLocation &location, IlvTextLocation &start, IlvTextLocation &end) const
 Finds the word at the specified location.
IlvTextLocation pointToPosition (const IlvPoint &point, const IlvTransformer *t=0) const
 Returns the location of the specified point in the text.
void readText (istream &istream, const IlvTransformer *t=0)
 Inserts the contents of the specified stream into the text gadget.
IlBoolean readText (const char *filename=0, const IlvTransformer *t=0)
 Inserts the contents of the specified file into the text gadget.
void removeChar (const IlvTextLocation &location)
 Removes a character from a specified location.
void removeLine (IlUShort line)
 Removes and deletes the specified text line.
void removeLines (IlUShort line, IlUShort count)
 Removes and deletes several text lines.
virtual void scrollBarVisibilityChanged (IlvDirection)
 Is called when an internal scroll bar is shown or hidden.
virtual void selectionChanged ()
 Is called from the interactor when the selection is modified.
void setCursorLocation (const IlvTextLocation &location)
 Sets the cursor location to a new location.
void setEditable (IlBoolean value)
 Specifies whether editing is allowed for the text gadget.
void setFirstLine (IlUShort line)
 Sets the first text line to be displayed.
void setLine (IlUShort line, const char *text, IlBoolean copy=IlTrue)
 Replaces the text line specified by line with text.
virtual void setLines (const char *const *labels, IlUShort count, IlBoolean copy=IlTrue)
 Replaces all the text in the text gadget.
void setOffset (IlvDim offset)
 Sets the text gadget offset.
void setSelection (const IlvTextLocation &from, const IlvTextLocation &to)
 Sets the location of the current selection.
virtual void setText (const char *text)
 Sets the text to be stored in the text gadget.
void showCursor (IlBoolean value)
 Specifies whether the cursor should be visible.
virtual void valueChanged ()
 Is called from the interactor when the value is modified.

Static Public Member Functions

static IlSymbolCursorMovedSymbol ()
 Returns the callback type of the Cursor Moved callback.
static IlSymbolSelectionChangedSymbol ()
 Returns the callback type of the Selection Changed callback.
static IlSymbolValueChangedSymbol ()
 Returns the callback type of the Value Changed callback.

Protected Member Functions

virtual void adjustFromScrollBar (const IlvScrollBar *sb, IlvDirection dir)
 Is called to adjust the gadget to the scroll bars values.
void adjustScrollBarValue (IlvScrollBar *sb, IlvDirection dir)
 Is called to adjust the scroll bar values.
virtual void scrollBarHasMoved (IlvDirection dir)
 Is called when an internal scroll bar has moved.

Friends

class IlvDefaultTextLFHandler

Detailed Description

Gadget class.

Library: ilvadvgdt

The IlvText class defines a multiline text editor that can contain up to 65535 lines of text. The contents of a text gadget can be edited.

IlvTexta.gif

A Multiline Text Gadget

See also:
IlvTextLocation, IlvTextField

Constructor & Destructor Documentation

IlvText::IlvText ( IlvDisplay display,
const IlvPoint point,
const char *const *  labels = 0,
IlUShort  count = 0,
IlBoolean  copy = IlTrue,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the class IlvText. The size of the object is computed by calling the method IlvGadget::fitToContents. If you want to specify its size, use a constructor that takes an IlvRect reference instead of an IlvPoint object as parameter.

Parameters:
display The connection to the display.
point The position of the text gadget.
labels An array of strings representing the lines of the text gadget.
count The number of elements in the labels array.
copy A Boolean value indicating whether the labels array should be copied.
thickness The thickness of the text gadget.
palette The palette used by the text gadget.
IlvText::IlvText ( IlvDisplay display,
const IlvRect rect,
const char *const *  labels = 0,
IlUShort  count = 0,
IlBoolean  copy = IlTrue,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the class IlvText.

Parameters:
display The connection to the display.
rect The size and position of the text gadget.
labels An array of strings representing the lines of the text gadget.
count The number of elements in the labels array.
copy A Boolean value indicating whether the labels array should be copied.
thickness The thickness of the text gadget.
palette The palette used by the text gadget.
IlvText::IlvText ( IlvDisplay display,
const IlvPoint point,
const char *  text,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the class IlvText. The size of the object is computed by calling the IlvGadget::fitToContents method. If you want to specify its size, use a constructor that takes an IlvRect reference instead of an IlvPoint object as parameter.

Parameters:
display The connection to the display.
point The position of the text gadget.
text The text of the text gadget. The '
' character identifies a new line. The text is copied.
thickness The thickness of the text gadget.
palette The palette used by the text gadget.
IlvText::IlvText ( IlvDisplay display,
const IlvRect rect,
const char *  text,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the class IlvText.

Parameters:
display The connection to the display.
rect The size and position of the text gadget.
text The text of the text gadget. The '
' character identifies a new line. The text is copied.
thickness The thickness of the text gadget.
palette The palette used by the text gadget.

Member Function Documentation

void IlvText::addLine ( const char *  text,
IlShort  line = -1 
)

Inserts a new text line at the specified location.

Parameters:
text The new text line. This string is copied.
line The index where text should be inserted.
See also:
setLine, removeLine, setLines
virtual void IlvText::addLines ( const char *const *  labels,
IlUShort  count,
IlShort  line = -1,
IlBoolean  redraw = IlFalse 
) [virtual]

Adds the specified text lines to the text gadget.

The labels are copied.

Parameters:
labels The array of strings to be added.
count The number of elements in the labels array.
line The index of the line where the labels array will be inserted.
redraw A Boolean value specifying whether the text gadget should be redrawn.
void IlvText::addText ( const char *  text,
IlShort  line = -1,
IlBoolean  redraw = IlFalse 
)

Adds the specified text to the text gadget.

Parameters:
text The text to be added. The '
' character identifies a new line. The text is copied.
line The index of the line where the text will be inserted.
redraw A Boolean value specifying whether the text gadget should be redrawn.
See also:
addLines, insertText
virtual void IlvText::adjustFromScrollBar ( const IlvScrollBar scrollbar,
IlvDirection  direction 
) [protected, virtual]

Is called to adjust the gadget to the scroll bars values.

Is called each time the scroll bar scrollbar of direction direction moves. If you want to detect these events, you must redefine this member function in a subclass. The default implementation does nothing.

Parameters:
scrollbar The scroll bar object.
direction The direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also:
adjustScrollBarValue

Reimplemented from IlvScrolledGadget.

virtual void IlvText::adjustScrollBars ( IlBoolean  redraw = IlFalse  )  [virtual]

Recomputes the scroll bars.

Sets the right values to the scroll bars.

Parameters:
redraw A Boolean value specifying whether the gadget should be redrawn.

Reimplemented from IlvScrolledGadget.

void IlvText::adjustScrollBarValue ( IlvScrollBar scrollbar,
IlvDirection  direction 
) [protected, virtual]

Is called to adjust the scroll bar values.

Is called by the member function IlvScrolledGadget::adjustScrollBars to adjust the values of the scroll bar scrollbar of direction direction. This member function must modify the scrollbar values to match the gadget scrolling mode. If you want to detect these events, you must redefine this member function in a subclass. The default implementation does nothing.

Parameters:
scrollbar The scroll bar object.
direction The direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also:
adjustFromScrollBar

Reimplemented from IlvScrolledGadget.

virtual IlBoolean IlvText::check ( IlUShort  character  )  [virtual]

Is called by the interactor for each key down event that corresponds to a regular character.

Its default implementation inserts the character (erasing the selection if there is one) and updates the display accordingly.

Parameters:
character The ASCII code of the character.
virtual void IlvText::cursorMoved (  )  [virtual]

Is called from the interactor when the cursor is moved.

The default implementation calls the Cursor Moved callback.

See also:
CursorMovedSymbol
static IlSymbol* IlvText::CursorMovedSymbol (  )  [static]

Returns the callback type of the Cursor Moved callback.

The Cursor Moved callback is invoked after the cursor of the text gadget is moved through the interactor.

Returns:
The callback type of the Cursor Moved callback.
See also:
SelectionChangedSymbol, ValueChangedSymbol, IlvGraphic::setCallback
void IlvText::cutLine ( const IlvTextLocation location  ) 

Removes the end of the specified line.

Parameters:
location The location from which the line will be removed.
See also:
removeChar, removeLine
virtual void IlvText::drawBackground ( IlvPort dst,
const IlvTransformer t,
const IlvRegion clip 
) const [virtual]

Draws the gadget background.

Is called from the draw method. This method is not called if the gadget is transparent.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawFrame, drawScrollBar, drawGadgetContents, IlvGadget::isTransparent

Reimplemented from IlvScrolledGadget.

virtual void IlvText::drawFrame ( IlvPort dst,
const IlvTransformer t,
const IlvRegion clip 
) const [virtual]

Draws the gadget frame.

Is called from the draw method. This method is not called if the method IlvScrolledGadget::isShowingFrame returns IlFalse.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawBackground, drawScrollBar, drawGadgetContents

Reimplemented from IlvScrolledGadget.

virtual void IlvText::drawGadgetContents ( IlvPort dst,
const IlvTransformer t = 0,
const IlvRegion clip = 0 
) const [virtual]

Draws the gadget contents.

Is called from the draw method. The default implementation does nothing.

Parameters:
dst The destination drawing port.
t The transformer applied to the gadget.
clip The clipping area.
See also:
drawBackground, drawScrollBar, drawFrame

Reimplemented from IlvScrolledGadget.

void IlvText::ensureVisible ( const IlvTextLocation location,
const IlvTransformer t = 0 
)

Changes the first line and the offset of the text gadget to ensure that the specified text location is visible.

Parameters:
location The text location.
t The transformer applied to the text gadget.
See also:
setOffset, setFirstLine
IlvTextLocation IlvText::getCursorLocation (  )  const

Returns the current location of the cursor.

Returns:
The current location of the cursor.
See also:
setCursorLocation, getEndLocation
IlvTextLocation IlvText::getEndLocation (  )  const

Returns the last location of the text.

Returns:
The last location of the text.
See also:
IlvText::getCursorLocation, IlvText::pointToPosition
IlUShort IlvText::getFirstLine (  )  const

Returns the index of the first text line displayed.

Returns:
The index of the first line of text displayed.
See also:
setFirstLine, ensureVisible
IlUShort IlvText::getLastFullVisibleLine ( const IlvTransformer t = 0  )  const

Returns the index of the last visible line that can be seen without scrolling.

Parameters:
t The transformer applied to the text gadget.
Returns:
The index of the last visible line that can be seen without scrolling when the text is displayed with the transformer t.
See also:
getLastLine, getNumberOfVisibleLines
IlUShort IlvText::getLastLine ( const IlvTransformer t = 0  )  const

Returns the index of the last text line displayed.

Parameters:
t The transformer applied to the text gadget.
Returns:
The index of the last text line displayed when the text is displayed with the transformer t.
See also:
getLastFullVisibleLine, getNumberOfVisibleLines
const char* IlvText::getLine ( IlUShort  index  )  const

Returns the specified text line.

Parameters:
index The index of the text line.
Returns:
The text line specified by index. The returned value should not be modified or deleted.
See also:
getLines, setLine
IlUShort IlvText::getLineLength ( IlUShort  index  )  const

Returns the number of characters in the specified text line.

Parameters:
index The index of the line.
Returns:
The number of characters in the text line specified by index. In a mutibyte environment, this might be different from the number of bytes, as a character may be stored on several bytes.
const char* const* IlvText::getLines ( IlUShort count  )  const

Returns an array of strings representing the text stored in the gadget.

Parameters:
count The number of elements in the returned array.
Returns:
An array of count strings representing the text stored in the gadget. This array should not be modified or deleted.
See also:
getLine, setLines
IlvDim IlvText::getMaxWidth (  )  const

Returns the width of the largest visible line.

Returns:
The width of the largest visible line.
IlUShort IlvText::getNumberOfLines (  )  const

Returns the number of text lines stored in the object.

Returns:
The number of lines stored in the object.
See also:
IlvText::addLine
IlUShort IlvText::getNumberOfVisibleLines ( const IlvTransformer t = 0  )  const

Returns the number of visible text lines.

The last line is not taken into account if it is not entirely visible.

Parameters:
t The transformer applied to the text gadget.
Returns:
The number of visible text lines when the text gadget is displayed with the transformer t.
See also:
IlvText::getNumberOfLines
IlvDim IlvText::getOffset (  )  const

Returns the text gadget offset.

This offset value is the distance between the left side of the text gadget bounding box and the starting point of the text.

Returns:
The text gadget offset.
See also:
setOffset
const char* IlvText::getSelectedText (  )  const

Returns the selected text.

Returns:
The selected text. The returned string should not be deleted.
See also:
getSelection, setSelection
void IlvText::getSelection ( IlvTextLocation from,
IlvTextLocation to 
) const

Returns the location of the current selection.

Parameters:
from The returned starting location of the current selection.
to The returned ending location of the current selection.
See also:
setSelection
const char* IlvText::getText (  )  const

Returns the text stored in the text gadget.

Returns:
The text stored in the text gadget. The returned string must not be modified or deleted.
See also:
getLines
virtual IlBoolean IlvText::handleAltKey ( IlUShort  character  )  [virtual]

Is called by the interactor to handle keys pressed with the IlvMetaModifier.

Parameters:
character The ASCII code of the character.
See also:
handleControl
virtual IlBoolean IlvText::handleControl ( IlUShort  character  )  [virtual]

Is called by the interactor to handle the control keys.

Should only handle control characters, that is, characters for which a call to iscntrl returns a value different from 0.

Parameters:
character The ASCII code of the control character.
See also:
handleAltKey
virtual IlBoolean IlvText::handleGadgetEvent ( IlvEvent event  )  [virtual]

Handles the gadget events.

Is called by IlvScrolledGadget::handleEvent when the member function handleScrollBarsEvent returns IlFalse. Its default implementation does nothing. You can override this member function to implement your own gadget behavior.

Parameters:
event The event.
See also:
handleScrollBarsEvent

Reimplemented from IlvScrolledGadget.

void IlvText::insertChar ( const IlvTextLocation location,
IlUShort  character 
)

Inserts a character at the specified location.

Parameters:
location The location where the character is inserted.
character The character to be inserted.
See also:
removeChar, pointToPosition
void IlvText::insertText ( const char *  text,
IlvTextLocation location,
IlBoolean  redraw = IlFalse 
)

Inserts text into the text gadget at the specified location.

Parameters:
text The text to be inserted. The "\n" character identifies a new line. The text is copied.
location The location where text will be inserted. If this location is not valid, the new text is inserted at the end of the existing text.
redraw A Boolean value specifying whether the text gadget should be redrawn.
See also:
insertLabels, addText
IlBoolean IlvText::isCursorShown (  )  const

Indicates whether the cursor is visible.

Returns:
IlTrue if the cursor is visible. Otherwise, returns IlFalse.
See also:
showCursor
IlBoolean IlvText::isEditable (  )  const

Indicates whether the text gadget can be edited.

The user cannot type in a text gadget for which editing is not allowed. However, the text can still be selected and copied.

Returns:
IlTrue if the text gadget is editable. Otherwise, returns IlFalse.
See also:
setEditable
void IlvText::locateWord ( const IlvTextLocation location,
IlvTextLocation start,
IlvTextLocation end 
) const

Finds the word at the specified location.

Uses start and end to return the locators of the word at the specified location. A word is composed of successive characters that are not in the set: _.,;:-=+/()[]{}*&!|'

Parameters:
location The initial location.
start The returned starting location of the word found.
end The returned ending location of the word found.
IlvTextLocation IlvText::pointToPosition ( const IlvPoint point,
const IlvTransformer t = 0 
) const

Returns the location of the specified point in the text.

Parameters:
point The point to be located.
t The transformer applied to the text gadget.
Returns:
The location in the text of point, when the text object is displayed with the transformer t.
void IlvText::readText ( istream &  istream,
const IlvTransformer t = 0 
)

Inserts the contents of the specified stream into the text gadget.

Removes the existing text and inserts the contents of istream.

Parameters:
istream The input stream.
t Not used.
IlBoolean IlvText::readText ( const char *  filename = 0,
const IlvTransformer t = 0 
)

Inserts the contents of the specified file into the text gadget.

Removes the existing text and inserts the contents of filename.

Parameters:
filename The name of the file to be inserted.
t Not used.
void IlvText::removeChar ( const IlvTextLocation location  ) 

Removes a character from a specified location.

Parameters:
location The location of the character to be removed.
character The character to be removed.
See also:
insertChar, pointToPosition
void IlvText::removeLine ( IlUShort  line  ) 

Removes and deletes the specified text line.

Parameters:
line The index of the text line to be removed.
See also:
addLine, setLine, getLine
void IlvText::removeLines ( IlUShort  line,
IlUShort  count 
)

Removes and deletes several text lines.

Parameters:
line The index of the first text line to be removed.
count The number of lines to delete.
See also:
addLine, setLine, getLine, removeLine
virtual void IlvText::scrollBarHasMoved ( IlvDirection  direction  )  [protected, virtual]

Is called when an internal scroll bar has moved.

Is called by handleEvent each time the value of the internal scroll bar specified by direction changes. The default implementation invokes the Scroll Bar Moved callback.

Parameters:
direction The direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also:
ScrollBarMovedSymbol

Reimplemented from IlvScrolledGadget.

virtual void IlvText::scrollBarVisibilityChanged ( IlvDirection  direction  )  [virtual]

Is called when an internal scroll bar is shown or hidden.

Is called by handleEvent each time the internal scroll bar specified by direction is shown or hidden. The default implementation invokes the Scroll Bar Visibility Changed callback.

Parameters:
direction The direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical.
See also:
ScrollBarVisibilitySymbol

Reimplemented from IlvScrolledGadget.

virtual void IlvText::selectionChanged (  )  [virtual]

Is called from the interactor when the selection is modified.

The default implementation calls the Selection Changed callback.

See also:
SelectionChangedSymbol
static IlSymbol* IlvText::SelectionChangedSymbol (  )  [static]

Returns the callback type of the Selection Changed callback.

The Selection Changed callback is invoked after the selection of the text gadget has changed through the interactor.

Returns:
The callback type of the Selection Changed callback.
See also:
CursorMovedSymbol, ValueChangedSymbol, IlvGraphic::setCallback
void IlvText::setCursorLocation ( const IlvTextLocation location  ) 

Sets the cursor location to a new location.

If location is not a valid value, it is converted to the nearest valid location.

Parameters:
location The new cursor location.
See also:
getCursorLocation
void IlvText::setEditable ( IlBoolean  value  ) 

Specifies whether editing is allowed for the text gadget.

The user cannot type in a text gadget for which editing is not allowed. However, the text can still be selected and copied.

See also:
value A Boolean value specifying whether the text gadget can be edited (IlTrue) or not (IlFalse).
void IlvText::setFirstLine ( IlUShort  line  ) 

Sets the first text line to be displayed.

Parameters:
line The index of the new first line of text.
See also:
IlvText::getFirstLine
void IlvText::setLine ( IlUShort  line,
const char *  text,
IlBoolean  copy = IlTrue 
)

Replaces the text line specified by line with text.

Parameters:
line The index of the text line to be replaced.
text The new text line.
copy A Boolean value specifying whether the text should be copied.
See also:
addLine, removeLine, setLines
virtual void IlvText::setLines ( const char *const *  labels,
IlUShort  count,
IlBoolean  copy = IlTrue 
) [virtual]

Replaces all the text in the text gadget.

Sets the contents of this object to the labels array of count text lines.

Parameters:
labels The array of new strings.
count The number of elements in the labels array.
copy A Boolean value specifying whether the array and each label are copied.
void IlvText::setOffset ( IlvDim  offset  ) 

Sets the text gadget offset.

Parameters:
offset The new text gadget offset.
See also:
getOffset, ensureVisible
void IlvText::setSelection ( const IlvTextLocation from,
const IlvTextLocation to 
)

Sets the location of the current selection.

Parameters:
from The location where the new selection starts.
to The location where the new selection ends.
See also:
getSelection
virtual void IlvText::setText ( const char *  text  )  [virtual]

Sets the text to be stored in the text gadget.

Parameters:
text The text to be stored in the text gadget. The '
' character identifies a new line. The text is copied.
See also:
getText
void IlvText::showCursor ( IlBoolean  value  ) 

Specifies whether the cursor should be visible.

Parameters:
value A Boolean value specifying whether the cursor should be visible (IlTrue) or not (IlFalse).
See also:
isCursorShown
virtual void IlvText::valueChanged (  )  [virtual]

Is called from the interactor when the value is modified.

The default implementation calls the Value Changed callback.

See also:
ValueChangedSymbol
static IlSymbol* IlvText::ValueChangedSymbol (  )  [static]

Returns the callback type of the Value Changed callback.

The Value Changed callback is invoked after the text gadget has been modified through the interactor.

Returns:
The callback type of the Value Changed callback.
See also:
CursorMovedSymbol, SelectionChangedSymbol, IlvGraphic::setCallback
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.