rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvStringList Class Reference

Gadget class. More...

#include <ilviews/gadgets/slist.h>

Inheritance diagram for IlvStringList:
IlvScrolledGadget IlvListGadgetItemHolder IlvGadget IlvGadgetItemHolder IlvSimpleGraphic IlvGraphic

List of all members.

Public Member Functions

 IlvStringList (IlvDisplay *display, const IlvRect &rect, const char *const *labels, IlAny const *itemData, IlUShort count, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
 IlvStringList (IlvDisplay *display, const IlvPoint &point, const char *const *labels, IlAny const *itemData, IlUShort count, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
 IlvStringList (IlvDisplay *display, const IlvRect &rect, const char *const *labels=0, IlUShort count=0, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
 IlvStringList (IlvDisplay *display, const IlvPoint &point, const char *const *labels=0, IlUShort count=0, IlUShort thickness=IlvDefaultGadgetThickness, IlvPalette *palette=0)
 Constructor.
void addSelectCallback (IlSymbol *callbackName, IlAny arg)
 Adds a named Select callback.
void addSelectCallback (IlvGraphicCallback callback, IlAny arg)
 Adds a Select callback.
void addSelectCallback (IlSymbol *callbackName)
 Adds a named Select callback.
void addSelectCallback (IlvGraphicCallback callback)
 Adds a Select callback.
void allowDragDrop (IlBoolean allow)
 Specifies whether drag-and-drop operations should be allowed for the string list.
virtual IlBoolean allowDragDrop () const
 Indicates whether drag-and-drop operations are allowed for the string list.
IlBoolean autoLabelAlignment () const
 Indicates whether the automatic label alignment mode is on.
void autoLabelAlignment (IlBoolean align, IlBoolean redraw=IlTrue)
 Specifies whether the automatic alignment mode should be used.
virtual void doIt ()
 Is called when the user double-clicks an item in the list or presses the Enter key.
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.
virtual void drawGadgetItem (const IlvGadgetItem *, IlvPort *port, const IlvRect &rect, const IlvTransformer *t, const IlvRegion *clip) const
 Draws a specific gadget item.
virtual void empty ()
 Empties the list.
void ensureVisible (IlUShort index, IlBoolean redraw=IlFalse, IlBoolean horizontal=IlFalse)
 Changes the first visible item so that the specified item remains visible.
IlvDim getDefaultItemHeight () const
 Returns the height of the items when all items are the same height.
IlUShort getFirstItem () const
 Returns the index of the first visible item in the string list.
virtual IlvDim getLabelOffset () const
 Returns the offset used to display each item label.
virtual void getLabelOrientation (IlvOrientation &orientation, IlBoolean &flip) const
 Returns the default orientation of the labels associated with the string list items.
virtual IlvPosition getLabelPosition () const
 Returns the default position of the labels associated with the string list items, relative to their picture.
const char *const * getLabels (IlUShort &count) const
 Returns an array of all the items labels.
IlUShort getLastFullVisibleItem () const
 Returns the index of the last visible item that can be seen without scrolling the list.
IlUShort getLastVisibleItem (const IlvTransformer *t=0) const
 Returns the index of the last visible item of the string list.
virtual IlvPalettegetNormalTextPalette () const
 Returns the default palette used to draw an item.
IlvDim getOffset () const
 Returns the horizontal offset set for the string list.
virtual IlvPalettegetOpaquePalette () const
 Returns the opaque palette used to draw opaque items.
IlvGraphicCallback getSelectCallback () const
 Returns a pointer to the first unnamed callback in the Select callback list.
IlSymbolgetSelectCallbackName () const
 Returns the name of the first named callback in the Select callback list.
IlShort getSelectionLimit () const
 Returns the maximum number of items that can be selected at the same time.
IlvStringListSelectionMode getSelectionMode () const
 Returns the current selection mode of the string list.
IlvDim getSpacing () const
 Returns the spacing between two items in the string list.
virtual IlBoolean handleGadgetEvent (IlvEvent &event)
 Handles the gadget events.
IlBoolean hasFullSelection () const
 Indicates whether the selection extends over the whole width of the string list.
virtual IlBoolean hasToolTips () const
 Indicates whether the string list displays tooltips.
virtual IlBoolean isEditable () const
 Indicates whether the string list can be edited.
IlBoolean isExclusive () const
 Indicates whether the exclusive selection mode is on.
virtual IlBoolean isShowingLabel () const
 Indicates whether the labels associated with the string list items are displayed.
virtual IlBoolean isShowingPicture () const
 Indicates whether the pictures associated with the string list items are displayed.
IlBoolean itemBBox (IlUShort index, IlvRect &bbox, const IlvTransformer *t=0) const
 Returns the bounding box of the specified item.
IlShort pointToPosition (const IlvPoint &point, const IlvTransformer *t=0) const
 Returns the index of the item located at the specified position.
virtual void recomputeAllItems ()
 Recomputes the size of all the items managed by the holder.
virtual void scrollBarChanged (IlvScrollBar *scrollbar, IlvOrientation direction)
 Is called each time the user manipulates one of the scroll bars.
virtual void select (IlUShort index)
 Is called when the user selects the specified item in the string list.
IlBoolean selectionLimitReached () const
 Indicates whether the maximum number of items that can be selected at the same time has been reached.
void setDefaultItemHeight (IlvDim height, IlBoolean redraw=IlTrue)
 Sets the height of all the items in the string list.
void setEditable (IlBoolean value=IlTrue)
 Specifies whether the string list should be editable.
void setExclusive (IlBoolean value=IlTrue)
 Sets the selection mode for the string list.
virtual void setItems (IlvGadgetItem *const *items, IlUShort count)
 Replaces the entire list of items.
void setLabelOffset (IlvDim offset, IlBoolean redraw=IlTrue)
 Sets the label offset of the string list.
void setLabelOrientation (IlvOrientation orientation, IlBoolean flip=IlFalse, IlBoolean redraw=IlTrue)
 Sets the default orientation of the labels associated with the string list items.
void setLabelPosition (IlvPosition position, IlBoolean redraw=IlTrue)
 Sets the default position of the string list item labels relative to their picture.
void setOffset (IlvDim offset)
 Sets the horizontal offset of the string list.
void setSelectCallback (IlSymbol *callbackName, IlAny arg)
 Sets a named Select callback.
void setSelectCallback (IlvGraphicCallback callback, IlAny arg)
 Sets a Select callback.
void setSelectCallback (IlSymbol *callbackName)
 Sets a named Select callback.
void setSelectCallback (IlvGraphicCallback callback)
 Sets a Select callback.
virtual void setSelected (IlUShort index, IlBoolean value=IlTrue, IlBoolean redraw=IlFalse)
 Selects or deselects an item.
void setSelectionLimit (IlShort limit)
 Sets the maximum number of items that can be selected at the same time.
void setSelectionMode (IlvStringListSelectionMode mode)
 Sets the selection mode of the string list.
virtual void setSpacing (IlvDim spacing, IlBoolean redraw=IlFalse)
 Sets the spacing between two items in the string list.
void showLabel (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Indicates whether the labels associated with the string list items should be shown or hidden.
void showPicture (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Indicates whether the pictures associated with the string list items are displayed.
virtual void sort (IlvListCompareFunction=0)
 Sorts the items.
virtual void unSelect (IlUShort index)
 Is called when the user deselects the specified item in the string list.
void useFullSelection (IlBoolean value=IlTrue, IlBoolean redraw=IlTrue)
 Specifies whether the full selection mode should be used.
void useToolTips (IlBoolean value=IlTrue)
 Specifies whether the string list should display tooltips.

Static Public Member Functions

static IlSymbolSelectSymbol ()
 Returns the symbol of the Select callback list.

Protected Member Functions

virtual void adjustFromScrollBar (const IlvScrollBar *sb, IlvDirection dir)
 Is called to adjust the gadget to the scroll bars values.
virtual 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 IlvDefaultStringListLFHandler

Detailed Description

Gadget class.

Library: ilvadvgdt

The IlvStringList class lets you display and manipulate lists of gadget items. You can store up to 32768 items in a string list.

IlvStringLista.gif

A String List

The main callback manages double-click events. Use the IlvStringList::setSelectCallback method to track the selection.

See also:
IlvGadgetItem

Constructor & Destructor Documentation

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

Constructor.

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

Parameters:
display The connection to the display.
point The position of the string list.
labels An array of predefined labels.
count The number of elements in the labels array.
thickness The thickness of the string list.
palette The palette used to draw the string list.
IlvStringList::IlvStringList ( IlvDisplay display,
const IlvRect rect,
const char *const *  labels = 0,
IlUShort  count = 0,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the IlvStringList class. The labels are copied.

Parameters:
display The connection to the display.
rect The size and position of the string list.
labels An array of predefined labels.
count The number of elements in the labels array.
thickness The thickness of the string list.
palette The palette used to draw the string list.
IlvStringList::IlvStringList ( IlvDisplay display,
const IlvPoint point,
const char *const *  labels,
IlAny const *  itemData,
IlUShort  count,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

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

Parameters:
display The connection to the display.
point The position of the string list.
labels An array of predefined labels.
itemData An array of the predefined data that will be set to each created item. For details, see IlvGadgetItem::setClientData.
count The number of elements in the labels array.
thickness The thickness of the string list.
palette The palette used to draw the string list.
IlvStringList::IlvStringList ( IlvDisplay display,
const IlvRect rect,
const char *const *  labels,
IlAny const *  itemData,
IlUShort  count,
IlUShort  thickness = IlvDefaultGadgetThickness,
IlvPalette palette = 0 
)

Constructor.

Initializes a new instance of the IlvStringList class. The labels are copied.

Parameters:
display The connection to the display.
rect The size and position of the string list.
labels An array of predefined labels.
itemData An array of the predefined data that will be set to each created item. See IlvGadgetItem::setClientData for more details.
count The number of elements in the labels array.
thickness The thickness of the string list.
palette The palette used to draw the string list.

Member Function Documentation

void IlvStringList::addSelectCallback ( IlSymbol callbackName,
IlAny  arg 
)

Adds a named Select callback.

Adds callbackName to the Select callback list. The callback function, when invoked, receives the user parameter arg. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callbackName The name of the new callback.
arg The callback argument.
See also:
focusIn, setSelectCallback, getSelectCallbackName
void IlvStringList::addSelectCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Adds a Select callback.

Adds callback to the Select callback list. The callback function, when invoked, receives the user parameter arg. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callback A pointer to the new callback.
arg The callback argument.
See also:
focusIn, setSelectCallback, getSelectCallback
void IlvStringList::addSelectCallback ( IlSymbol callbackName  ) 

Adds a named Select callback.

Adds callbackName to the Select callback list. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callbackName The name of the new callback.
See also:
focusIn, setSelectCallback, getSelectCallbackName
void IlvStringList::addSelectCallback ( IlvGraphicCallback  callback  ) 

Adds a Select callback.

Adds callback to the Select callback list. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callback A pointer to the new callback.
See also:
focusIn, setSelectCallback, getSelectCallback
virtual void IlvStringList::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 IlvStringList::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.

void IlvStringList::allowDragDrop ( IlBoolean  allow  ) 

Specifies whether drag-and-drop operations should be allowed for the string list.

Parameters:
value A Boolean value specifying whether drag-and-drop operations should be allowed (IlTrue).
See also:
IlvGadgetItemHolder::startDragItem, allowDragDrop
virtual IlBoolean IlvStringList::allowDragDrop (  )  const [virtual]

Indicates whether drag-and-drop operations are allowed for the string list.

Returns:
IlTrue if drag-and-drop operations are allowed and IlFalse otherwise.
See also:
IlvGadgetItemHolder::startDragItem, allowDragDrop(IlBoolean)

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvStringList::autoLabelAlignment (  )  const

Indicates whether the automatic label alignment mode is on.

Returns:
IlTrue if the automatic label alignment mode is on and IlFalse otherwise.
See also:
autoLabelAlignment(IlBoolean, IlBoolean), setLabelOffset
void IlvStringList::autoLabelAlignment ( IlBoolean  align,
IlBoolean  redraw = IlTrue 
)

Specifies whether the automatic alignment mode should be used.

When the automatic label alignment mode is enabled (the default), a label offset is automatically computed to make sure that all the item pictures are visible, and all the item labels are aligned.

Parameters:
value A Boolean value specifying whether the automatic alignment mode should be used.
redraw A Boolean value specifying whether the string list should be redrawn.
See also:
setLabelOffset, autoLabelAlignment()
virtual void IlvStringList::doIt (  )  [virtual]

Is called when the user double-clicks an item in the list or presses the Enter key.

Its default implementation invokes the callback associated with the object.

See also:
IlvGraphic::callCallbacks
virtual void IlvStringList::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 IlvStringList::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 IlvStringList::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.

virtual void IlvStringList::drawGadgetItem ( const IlvGadgetItem item,
IlvPort port,
const IlvRect rect,
const IlvTransformer t,
const IlvRegion clip 
) const [virtual]

Draws a specific gadget item.

Redraws item in port at the location specified by rect using the clipping area clip. This method simply calls IlvGadgetItem::draw using the item instance.

Parameters:
item The item to be redrawn.
port The destination drawing port.
rect The bounding box of the item.
t The transformer used to draw the item. Not used.
clip The clipping area.
See also:
IlvGadgetItem::draw.

Reimplemented from IlvGadgetItemHolder.

virtual void IlvStringList::empty (  )  [virtual]

Empties the list.

See also:
setItems, removeItem

Implements IlvListGadgetItemHolder.

void IlvStringList::ensureVisible ( IlUShort  index,
IlBoolean  redraw = IlFalse,
IlBoolean  horizontal = IlFalse 
)

Changes the first visible item so that the specified item remains visible.

Parameters:
index The index of the string list item.
redraw A Boolean value specifying whether the string list should be redrawn.
horizontal A Boolean value specifying whether the item visibility will be checked in the horizontal direction. In other words, the offset of the string list can be changed by this method if horizontal is set to IlTrue.
See also:
getOffset
IlvDim IlvStringList::getDefaultItemHeight (  )  const

Returns the height of the items when all items are the same height.

Returns:
The height of the items when all items are the same height. It returns 0 when the items are different heights.
See also:
setDefaultItemHeight
IlUShort IlvStringList::getFirstItem (  )  const

Returns the index of the first visible item in the string list.

Returns:
The index of the first visible item in the string list.
See also:
getLastVisibleItem, getLastFullVisibleItem
virtual IlvDim IlvStringList::getLabelOffset (  )  const [virtual]

Returns the offset used to display each item label.

Returns:
The offset used to display each item label or 0 if no offset has been defined.
See also:
setLabelOffset, autoLabelAlignment(IlBoolean, IlBoolean)

Reimplemented from IlvListGadgetItemHolder.

virtual void IlvStringList::getLabelOrientation ( IlvOrientation orientation,
IlBoolean flip 
) const [virtual]

Returns the default orientation of the labels associated with the string list items.

Returns:
The default orientation of the labels associated with the string items.
Parameters:
orientation The default orientation of the labels.
flip A Boolean value specifying whether the labels should be flipped or not. See the IlvStringList::setLabelOrientation method for more details.
See also:
setLabelOrientation

Reimplemented from IlvGadgetItemHolder.

virtual IlvPosition IlvStringList::getLabelPosition (  )  const [virtual]

Returns the default position of the labels associated with the string list items, relative to their picture.

Returns:
The default position of the labels associated with the string list items, relative to their pictures.
See also:
setLabelPosition

Reimplemented from IlvGadgetItemHolder.

const char* const* IlvStringList::getLabels ( IlUShort count  )  const

Returns an array of all the items labels.

Parameters:
count The number of elements of the returned array.
Returns:
An array of count strings that includes all the items stored in the object.
Warning:
[note] The returned array is a static array, managed internally. Other Rogue Wave Views routines may overwrite this buffer so it should be copied in a safe place if it needs to be persistent.
See also:
setLabels, setItems

Reimplemented from IlvListGadgetItemHolder.

IlUShort IlvStringList::getLastFullVisibleItem (  )  const

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

Returns:
The index of the last visible item that can be seen without scrolling the list. If the first visible item is larger than the list height, its index is returned.
See also:
getFirstItem, getLastVisibleItem
IlUShort IlvStringList::getLastVisibleItem ( const IlvTransformer t = 0  )  const

Returns the index of the last visible item of the string list.

Parameters:
t The transformer applied to the string list.
Returns:
The index of the last visible item when this string list is displayed with the transformer t. The item can be visible only partially.
See also:
getLastFullVisibleItem, getFirstItem
virtual IlvPalette* IlvStringList::getNormalTextPalette (  )  const [virtual]

Returns the default palette used to draw an item.

Returns:
The default palette used to draw an item.

Implements IlvGadgetItemHolder.

IlvDim IlvStringList::getOffset (  )  const

Returns the horizontal offset set for the string list.

This offset moves the items horizontally in the list. The bigger the value, the further the items will be displayed to the left. This value is modified when moving the horizontal scroll bar.

See also:
setOffset, getLabelOffset
virtual IlvPalette* IlvStringList::getOpaquePalette (  )  const [virtual]

Returns the opaque palette used to draw opaque items.

Returns:
The opaque palette used to draw opaque items.

Reimplemented from IlvGadgetItemHolder.

IlvGraphicCallback IlvStringList::getSelectCallback (  )  const

Returns a pointer to the first unnamed callback in the Select callback list.

A Select callback is invoked whenever the selection in the string list changes.

Returns:
The function pointer to the first unnamed callback in the Select callback list.
See also:
focusIn, setSelectCallback, addSelectCallback
IlSymbol* IlvStringList::getSelectCallbackName (  )  const

Returns the name of the first named callback in the Select callback list.

A Select callback is invoked whenever the selection in the string list changes.

Returns:
The name of the first named callback in the Select callback list.
See also:
focusIn, setSelectCallback, addSelectCallback
IlShort IlvStringList::getSelectionLimit (  )  const

Returns the maximum number of items that can be selected at the same time.

Returns:
The maximum number of items that can be selected at the same time.
See also:
setSelectionLimit
IlvStringListSelectionMode IlvStringList::getSelectionMode (  )  const

Returns the current selection mode of the string list.

Returns:
The current selection mode of the string list.
See also:
setSelectionMode, IlvStringListSelectionMode
IlvDim IlvStringList::getSpacing (  )  const

Returns the spacing between two items in the string list.

The default value is 0.

Returns:
The spacing between two items in this string list.
See also:
setSpacing
virtual IlBoolean IlvStringList::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.

IlBoolean IlvStringList::hasFullSelection (  )  const

Indicates whether the selection extends over the whole width of the string list.

Returns:
IlTrue if the string list is in full selection mode and IlFalse otherwise.
See also:
useFullSelection
virtual IlBoolean IlvStringList::hasToolTips (  )  const [virtual]

Indicates whether the string list displays tooltips.

Returns:
IlTrue if the string list displays tooltips and is not in full selection mode. It returns IlFalse if it does not display tooltips.
See also:
useToolTips

Reimplemented from IlvGadgetItemHolder.

virtual IlBoolean IlvStringList::isEditable (  )  const [virtual]

Indicates whether the string list can be edited.

Returns:
IlTrue if the list can be edited and IlFalse otherwise.

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvStringList::isExclusive (  )  const

Indicates whether the exclusive selection mode is on.

In exclusive selection mode, only one item can be selected at a time.

Returns:
IlTrue if the exclusive selection mode is set and IlFalse otherwise.
See also:
setExclusive, getSelectionMode
virtual IlBoolean IlvStringList::isShowingLabel (  )  const [virtual]

Indicates whether the labels associated with the string list items are displayed.

Returns:
IlTrue if the labels associated with the string list items are displayed and IlFalse otherwise.
See also:
showLabel, isShowingPicture

Reimplemented from IlvGadgetItemHolder.

virtual IlBoolean IlvStringList::isShowingPicture (  )  const [virtual]

Indicates whether the pictures associated with the string list items are displayed.

Returns:
IlTrue if the pictures associated with the string list items are displayed and IlFalse otherwise.
See also:
showPicture, isShowingLabel

Reimplemented from IlvGadgetItemHolder.

IlBoolean IlvStringList::itemBBox ( IlUShort  index,
IlvRect bbox,
const IlvTransformer t = 0 
) const

Returns the bounding box of the specified item.

Parameters:
index The index of the item.
bbox The returned bounding box of the specified item.
t The transformer applied to the string list.
Returns:
A Boolean value specifying whether the item is visible even partially.
See also:
pointToPosition
IlShort IlvStringList::pointToPosition ( const IlvPoint point,
const IlvTransformer t = 0 
) const

Returns the index of the item located at the specified position.

Parameters:
point The position in view coordinates.
t The transformer applied to the string list.
Returns:
The index of the label located at the position specified by point when this string list is displayed with the transformer t.
See also:
itemBBox
virtual void IlvStringList::recomputeAllItems (  )  [virtual]

Recomputes the size of all the items managed by the holder.

Calls the IlvGadgetItem::recomputeSize member function for all the items managed by this holder.

See also:
IlvGadgetItem::recomputeSize, applyToItems.

Reimplemented from IlvGadgetItemHolder.

virtual void IlvStringList::scrollBarChanged ( IlvScrollBar scrollbar,
IlvOrientation  direction 
) [virtual]

Is called each time the user manipulates one of the scroll bars.

This method is obsolete. Use the IlvScrolledGadget::scrollBarHasMoved method instead. The default implementation does nothing. To detect events relating to scroll bars, you have to override this member function in a subclass.

Parameters:
scrollbar A pointer to the instance of the scroll bar that was changed.
direction The direction of the scroll bar that was changed.
See also:
IlvScrolledGadget::scrollBarHasMoved
virtual void IlvStringList::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 IlvStringList::select ( IlUShort  index  )  [virtual]

Is called when the user selects the specified item in the string list.

The default implementation selects the item by calling the IlvStringList::setSelected method.

Parameters:
index The index of the selected item.
See also:
unSelect
IlBoolean IlvStringList::selectionLimitReached (  )  const

Indicates whether the maximum number of items that can be selected at the same time has been reached.

Returns:
IlTrue if the maximum number of items that can be selected at the same time has been reached and IlFalse otherwise.
See also:
getSelectionLimit, setSelectionLimit
static IlSymbol* IlvStringList::SelectSymbol (  )  [static]

Returns the symbol of the Select callback list.

Returns:
The symbol of the Select callback list.
See also:
setSelectCallback, IlvGraphic::setCallback
void IlvStringList::setDefaultItemHeight ( IlvDim  height,
IlBoolean  redraw = IlTrue 
)

Sets the height of all the items in the string list.

Parameters:
height The new default height. If height is set to 0, each item keeps its own height.
redraw A Boolean value specifying whether the string list should be redrawn.
See also:
getDefaultItemHeight
void IlvStringList::setEditable ( IlBoolean  value = IlTrue  ) 

Specifies whether the string list should be editable.

When the list is editable, you can edit one of its items by clicking on it once selected, or by pressing the F2 key.

Parameters:
value A Boolean value specifying whether the string list should be editable (IlTrue) or not (IlFalse).
See also:
isEditable, IlvGadgetItem::edit
void IlvStringList::setExclusive ( IlBoolean  value = IlTrue  ) 

Sets the selection mode for the string list.

Parameters:
value If value is set to IlTrue, only one item can be selected at a time. If it is set to IlFalse, several items can be selected simultaneously.
See also:
setSelectionMode
virtual void IlvStringList::setItems ( IlvGadgetItem *const *  items,
IlUShort  count 
) [virtual]

Replaces the entire list of items.

Sets the items of the holder to items, which must be an array of count IlvGadgetItem objects. Items are not copied, but the deletion of the array items is the responsibility of the caller.

Parameters:
items The new items.
count The number of items in items.
See also:
getItems, insertItem, removeItem

Reimplemented from IlvListGadgetItemHolder.

void IlvStringList::setLabelOffset ( IlvDim  offset,
IlBoolean  redraw = IlTrue 
)

Sets the label offset of the string list.

When a label offset is defined, all the item labels are aligned using this offset. Calling this method disables the automatic alignment mode.

Parameters:
offset The new label offset.
redraw A Boolean value specifying whether the string list should be redrawn.
See also:
getLabelOffset, autoLabelAlignment(IlBoolean, IlBoolean)
void IlvStringList::setLabelOrientation ( IlvOrientation  orientation,
IlBoolean  flip = IlFalse,
IlBoolean  redraw = IlTrue 
)

Sets the default orientation of the labels associated with the string list items.

If the orientation is IlvHorizontal, labels are drawn from left to right. If the orientation is IlvVertical, labels are drawn vertically from top to bottom if flip is IlFalse, or from bottom to top if flip is IlFalse.

Parameters:
orientation The new orientation of the labels.
flip A Boolean value specifying whether the labels are flipped or not.
redraw A Boolean value specifying whether the string list should be redrawn.
See also:
getLabelOrientation
void IlvStringList::setLabelPosition ( IlvPosition  position,
IlBoolean  redraw = IlTrue 
)

Sets the default position of the string list item labels relative to their picture.

This setting is used to compute the geometry of each string list item. For more information, see the member function IlvGadgetItem::setLabelPosition.

Parameters:
position The new position of the items labels relative to their pictures.
redraw A Boolean value specifying whether the string list should be redrawn.
void IlvStringList::setOffset ( IlvDim  offset  ) 

Sets the horizontal offset of the string list.

This offset lets you move the items horizontally in the list. The bigger the value, the further the items will be displayed to the left. This value is modified when moving the horizontal scroll bar.

Parameters:
offset The new horizontal offset.
See also:
getOffset, setLabelOffset
void IlvStringList::setSelectCallback ( IlSymbol callbackName,
IlAny  arg 
)

Sets a named Select callback.

Removes all the existing Select callbacks before adding callbackName to the Select callback list. The callback function, when invoked, receives the user parameter arg. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callbackName The name of the new callback.
arg The callback argument.
See also:
focusIn, addSelectCallback, getSelectCallbackName
void IlvStringList::setSelectCallback ( IlvGraphicCallback  callback,
IlAny  arg 
)

Sets a Select callback.

Removes all the existing Select callbacks before adding callback to the Select callback list. The callback function, when invoked, receives the user parameter arg. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callback A pointer to the new callback.
arg The callback argument.
See also:
focusIn, addSelectCallback, getSelectCallback
void IlvStringList::setSelectCallback ( IlSymbol callbackName  ) 

Sets a named Select callback.

Removes all the existing Select callbacks before adding callbackName to the Select callback list. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callbackName The name of the new callback.
See also:
focusIn, addSelectCallback, getSelectCallbackName
void IlvStringList::setSelectCallback ( IlvGraphicCallback  callback  ) 

Sets a Select callback.

Removes all the existing Select callbacks before adding callback to the Select callback list. A Select callback is invoked whenever the selection in the string list changes.

Parameters:
callback A pointer to the new callback.
See also:
focusIn, addSelectCallback, getSelectCallback
virtual void IlvStringList::setSelected ( IlUShort  index,
IlBoolean  value = IlTrue,
IlBoolean  redraw = IlFalse 
) [virtual]

Selects or deselects an item.

Parameters:
index The index of the item.
value A Boolean value specifying whether the item specified by index should be selected or deselected.
redraw A Boolean value specifying whether the string list should be redrawn.
void IlvStringList::setSelectionLimit ( IlShort  limit  ) 

Sets the maximum number of items that can be selected at the same time.

Parameters:
limit The maximum number of items that can be selected simultaneously.
See also:
getSelectionLimit
void IlvStringList::setSelectionMode ( IlvStringListSelectionMode  mode  ) 

Sets the selection mode of the string list.

Changes the selection mode only if mode matches the setting defined by IlvStringList::setExclusive. For example, calling this method with IlvStringListSingleSelection as parameter if the exclusive selection mode is not set (that is, IlvStringList::isExclusive returns IlFalse) has no effect.

Parameters:
mode The new selection mode.
See also:
getSelectionMode, IlvStringListSelectionMode
virtual void IlvStringList::setSpacing ( IlvDim  spacing,
IlBoolean  redraw = IlFalse 
) [virtual]

Sets the spacing between two items in the string list.

Parameters:
spacing The new spacing value.
redraw A Boolean value specifying whether the string list should be redrawn.
void IlvStringList::showLabel ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Indicates whether the labels associated with the string list items should be shown or hidden.

Parameters:
value A Boolean value specifying whether the labels of the string list items should be shown (IlTrue) or hidden (IlFalse).
redraw A Boolean value specifying whether the string list should be redrawn.
See also:
isShowingLabel, showPicture
void IlvStringList::showPicture ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Indicates whether the pictures associated with the string list items are displayed.

Parameters:
value A Boolean value specifying whether the pictures of the string list items should be shown or hidden.
redraw A Boolean value specifying whether the string list should be redrawn.
See also:
isShowingPicture, showLabel
virtual void IlvStringList::sort ( IlvListCompareFunction  func = 0  )  [virtual]

Sorts the items.

Runs the sorting algorithm on all the items. If you provide a sorting function in the form of an IlvListCompareFunction, this function is called to compare each item pair. If you do not provide a sorting function, a default comparison function is used.

Parameters:
func A sorting function.
See also:
IlvListCompareFunction, compareItems

Reimplemented from IlvListGadgetItemHolder.

virtual void IlvStringList::unSelect ( IlUShort  index  )  [virtual]

Is called when the user deselects the specified item in the string list.

The default implementation deselects the item by calling the IlvStringList::setSelected method.

Parameters:
index The index of the deselected item.
See also:
select
void IlvStringList::useFullSelection ( IlBoolean  value = IlTrue,
IlBoolean  redraw = IlTrue 
)

Specifies whether the full selection mode should be used.

Parameters:
value If value is IlTrue, the selection extends over the whole width of the string list. If value is IlFalse, only the labels are selected.
redraw A Boolean value specifying whether the string list should be redrawn.
See also:
hasFullSelection
void IlvStringList::useToolTips ( IlBoolean  value = IlTrue  ) 

Specifies whether the string list should display tooltips.

A tooltip is displayed when the cursor is over a partially visible item.

Parameters:
value A Boolean value specifying whether the string list should display tooltips (IlTrue) or not IlFalse).
See also:
hasToolTips
 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.