Rogue Wave Views 5.6 |
Rogue Wave Views |
Rogue Wave Views Documentation Home |
Gadget class. More...
#include <ilviews/gadgets/slist.h>
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 IlvPalette * | getNormalTextPalette () const |
Returns the default palette used to draw an item. | |
IlvDim | getOffset () const |
Returns the horizontal offset set for the string list. | |
virtual IlvPalette * | getOpaquePalette () 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. | |
IlSymbol * | getSelectCallbackName () 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 IlSymbol * | SelectSymbol () |
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 |
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.
A String List
The main callback manages double-click events. Use the IlvStringList::setSelectCallback
method to track the selection.
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.
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.
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.
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.
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. |
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.
callbackName | The name of the new callback. | |
arg | The callback argument. |
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.
callback | A pointer to the new callback. | |
arg | The callback argument. |
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.
callbackName | The name of the new callback. |
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.
callback | A pointer to the new callback. |
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.
scrollbar | The scroll bar object. | |
direction | The direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical . |
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.
scrollbar | The scroll bar object. | |
direction | The direction of the scroll bar. Valid values are: IlvHorizontal and IlvVertical . |
Reimplemented from IlvScrolledGadget.
void IlvStringList::allowDragDrop | ( | IlBoolean | allow | ) |
Specifies whether drag-and-drop operations should be allowed for the string list.
value | A Boolean value specifying whether drag-and-drop operations should be allowed (IlTrue ). |
virtual IlBoolean IlvStringList::allowDragDrop | ( | ) | const [virtual] |
Indicates whether drag-and-drop operations are allowed for the string list.
IlTrue
if drag-and-drop operations are allowed and IlFalse
otherwise. Reimplemented from IlvGadgetItemHolder.
IlBoolean IlvStringList::autoLabelAlignment | ( | ) | const |
Indicates whether the automatic label alignment mode is on.
IlTrue
if the automatic label alignment mode is on and IlFalse
otherwise. 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.
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. |
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.
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.
dst | The destination drawing port. | |
t | The transformer applied to the gadget. | |
clip | The clipping area. |
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
.
dst | The destination drawing port. | |
t | The transformer applied to the gadget. | |
clip | The clipping area. |
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.
dst | The destination drawing port. | |
t | The transformer applied to the gadget. | |
clip | The clipping area. |
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.
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. |
IlvGadgetItem::draw
. Reimplemented from IlvGadgetItemHolder.
virtual void IlvStringList::empty | ( | ) | [virtual] |
void IlvStringList::ensureVisible | ( | IlUShort | index, | |
IlBoolean | redraw = IlFalse , |
|||
IlBoolean | horizontal = IlFalse | |||
) |
Changes the first visible item so that the specified item remains visible.
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 . |
IlvDim IlvStringList::getDefaultItemHeight | ( | ) | const |
Returns the height of the items when all items are the same height.
IlUShort IlvStringList::getFirstItem | ( | ) | const |
Returns the index of the first visible item in the string list.
virtual IlvDim IlvStringList::getLabelOffset | ( | ) | const [virtual] |
Returns the offset used to display each item label.
0
if no offset has been defined. 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.
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. |
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.
Reimplemented from IlvGadgetItemHolder.
const char* const* IlvStringList::getLabels | ( | IlUShort & | count | ) | const |
Returns an array of all the items labels.
count | The number of elements of the returned array. |
Reimplemented from IlvListGadgetItemHolder.
IlUShort IlvStringList::getLastFullVisibleItem | ( | ) | const |
Returns the index of the last visible item that can be seen without scrolling the list.
IlUShort IlvStringList::getLastVisibleItem | ( | const IlvTransformer * | t = 0 |
) | const |
Returns the index of the last visible item of the string list.
t | The transformer applied to the string list. |
virtual IlvPalette* IlvStringList::getNormalTextPalette | ( | ) | const [virtual] |
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.
virtual IlvPalette* IlvStringList::getOpaquePalette | ( | ) | const [virtual] |
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.
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.
IlShort IlvStringList::getSelectionLimit | ( | ) | const |
Returns the maximum number of items that can be selected at the same time.
IlvStringListSelectionMode IlvStringList::getSelectionMode | ( | ) | const |
Returns the current selection mode of the string list.
IlvDim IlvStringList::getSpacing | ( | ) | const |
Returns the spacing between two items in the string list.
The default value is 0
.
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.
event | The event. |
Reimplemented from IlvScrolledGadget.
IlBoolean IlvStringList::hasFullSelection | ( | ) | const |
Indicates whether the selection extends over the whole width of the string list.
IlTrue
if the string list is in full selection mode and IlFalse
otherwise. virtual IlBoolean IlvStringList::hasToolTips | ( | ) | const [virtual] |
Indicates whether the string list displays tooltips.
IlTrue
if the string list displays tooltips and is not in full selection mode. It returns IlFalse
if it does not display tooltips. Reimplemented from IlvGadgetItemHolder.
virtual IlBoolean IlvStringList::isEditable | ( | ) | const [virtual] |
Indicates whether the string list can be edited.
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.
IlTrue
if the exclusive selection mode is set and IlFalse
otherwise. virtual IlBoolean IlvStringList::isShowingLabel | ( | ) | const [virtual] |
Indicates whether the labels associated with the string list items are displayed.
IlTrue
if the labels associated with the string list items are displayed and IlFalse
otherwise. Reimplemented from IlvGadgetItemHolder.
virtual IlBoolean IlvStringList::isShowingPicture | ( | ) | const [virtual] |
Indicates whether the pictures associated with the string list items are displayed.
IlTrue
if the pictures associated with the string list items are displayed and IlFalse
otherwise. Reimplemented from IlvGadgetItemHolder.
IlBoolean IlvStringList::itemBBox | ( | IlUShort | index, | |
IlvRect & | bbox, | |||
const IlvTransformer * | t = 0 | |||
) | const |
Returns the bounding box of the specified item.
index | The index of the item. | |
bbox | The returned bounding box of the specified item. | |
t | The transformer applied to the string list. |
IlShort IlvStringList::pointToPosition | ( | const IlvPoint & | point, | |
const IlvTransformer * | t = 0 | |||
) | const |
Returns the index of the item located at the specified position.
point | The position in view coordinates. | |
t | The transformer applied to the string list. |
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.
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.
scrollbar | A pointer to the instance of the scroll bar that was changed. | |
direction | The direction of the scroll bar that was changed. |
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.
direction | The direction of the internal scroll bar. Valid values are: IlvHorizontal and IlvVertical . |
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.
index | The index of the selected item. |
IlBoolean IlvStringList::selectionLimitReached | ( | ) | const |
Indicates whether the maximum number of items that can be selected at the same time has been reached.
IlTrue
if the maximum number of items that can be selected at the same time has been reached and IlFalse
otherwise. static IlSymbol* IlvStringList::SelectSymbol | ( | ) | [static] |
Returns the symbol of the Select callback list.
Sets the height of all the items in the string list.
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. |
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.
value | A Boolean value specifying whether the string list should be editable (IlTrue ) or not (IlFalse ). |
void IlvStringList::setExclusive | ( | IlBoolean | value = IlTrue |
) |
Sets the selection mode for the string list.
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. |
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.
items | The new items. | |
count | The number of items in items. |
Reimplemented from IlvListGadgetItemHolder.
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.
offset | The new label offset. | |
redraw | A Boolean value specifying whether the string list should be redrawn. |
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
.
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. |
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
.
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.
offset | The new horizontal offset. |
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.
callbackName | The name of the new callback. | |
arg | The callback argument. |
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.
callback | A pointer to the new callback. | |
arg | The callback argument. |
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.
callbackName | The name of the new callback. |
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.
callback | A pointer to the new callback. |
virtual void IlvStringList::setSelected | ( | IlUShort | index, | |
IlBoolean | value = IlTrue , |
|||
IlBoolean | redraw = IlFalse | |||
) | [virtual] |
Selects or deselects an item.
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.
limit | The maximum number of items that can be selected simultaneously. |
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.
mode | The new selection mode. |
Sets the spacing between two items in the string list.
spacing | The new spacing value. | |
redraw | A Boolean value specifying whether the string list should be redrawn. |
Indicates whether the labels associated with the string list items should be shown or hidden.
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. |
Indicates whether the pictures associated with the string list items are displayed.
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. |
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.
func | A sorting function. |
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.
index | The index of the deselected item. |
Specifies whether the full selection mode should be used.
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. |
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.
value | A Boolean value specifying whether the string list should display tooltips (IlTrue ) or not IlFalse ). |
© 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.