Represents a virtual item within a ListBox. More...
#include <kanzi/ui/node/concept/list_box/list_box_trajectory_presenter.hpp>
Public Member Functions | |
| float | getCenter () const |
| Returns the offset of the center point of an item. | |
| int | getIndex () const |
| Returns the virtual index of the item. | |
| float | getLeftEdge () const |
| Returns the offset of the left edge of an item. | |
| unsigned int | getNormalizedIndex () const |
| Returns the normalized index of the item, representing its actual position in the ListBox even when looping is enabled and the virtual index exceeds the item range. | |
| float | getOffset () const |
| Returns the offset of the virtual item. | |
| float | getRightEdge () const |
| Returns the offset of the right edge of an item. | |
| bool | hasNext () const |
| Whether this virtual item has a next neighbor in the ListBox, taking possible item looping into account. | |
| bool | hasPrevious () const |
| Whether this virtual item has a previous neighbor in the ListBox, taking possible item looping into account. | |
| void | invalidate () |
| Invalidates this virtual item. | |
| bool | isValid () const |
| Whether this virtual item is valid. | |
| void | next () |
| Iterates to the next neighbor item in the ListBox. | |
| void | previous () |
| Iterates to the previous neighbor item in the ListBox. | |
| void | update (int index, float offset) |
| Updates the virtual item with the given index. | |
| VirtualListBoxItem (ListBoxTrajectoryPresenterType *presenter) | |
| Constructor. | |
Represents a virtual item within a ListBox.
Does not store or manage any real underlying data; instead, it provides the dimensional and positional information required by the presenter. Supports looping in the ListBox, allowing it to represent an effectively infinite sequence of items. Supports bidirectional iteration over virtual items in the ListBox.
|
inlineexplicit |
Constructor.
By default creates an invalid virtual item.
| presenter | Presenter for a List Box, which items this VirtualListBoxItem represent. |
|
inline |
Updates the virtual item with the given index.
Sets the offset for this item and retrieves the actual item width.
| index | Virtual index of an item. If looping is enabled index can be beyond an actual List Box items range. |
| offset | Offset of the virtual item. |
|
inline |
Returns the virtual index of the item.
If looping is enabled index can be beyond an actual List Box items range.
|
inline |
Returns the offset of the virtual item.
|
inline |
Whether this virtual item is valid.
|
inline |
Invalidates this virtual item.
|
inline |
Whether this virtual item has a next neighbor in the ListBox, taking possible item looping into account.
|
inline |
Whether this virtual item has a previous neighbor in the ListBox, taking possible item looping into account.
|
inline |
Iterates to the next neighbor item in the ListBox.
Updates the item index, width and offset to represent the next neighbor item.
|
inline |
Iterates to the previous neighbor item in the ListBox.
Updates the item index, width and offset to represent the previous neighbor item.
|
inline |
Returns the offset of the left edge of an item.
|
inline |
Returns the offset of the right edge of an item.
|
inline |
Returns the offset of the center point of an item.
|
inline |
Returns the normalized index of the item, representing its actual position in the ListBox even when looping is enabled and the virtual index exceeds the item range.