libyui
2.42.5
|
#include <YItem.h>
Public Member Functions | |
YItem (const std::string &label, bool selected=false) | |
YItem (const std::string &label, const std::string &iconName, bool selected=false) | |
virtual | ~YItem () |
std::string | label () const |
void | setLabel (const std::string &newLabel) |
std::string | iconName () const |
bool | hasIconName () const |
void | setIconName (const std::string &newIconName) |
bool | selected () const |
void | setSelected (bool sel=true) |
void | setIndex (int index) |
int | index () const |
void | setData (void *newData) |
void * | data () const |
virtual bool | hasChildren () const |
virtual YItemIterator | childrenBegin () |
virtual YItemConstIterator | childrenBegin () const |
virtual YItemIterator | childrenEnd () |
virtual YItemConstIterator | childrenEnd () const |
virtual YItem * | parent () const |
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc. items. This class provides stubs for children management.
|
inline |
|
inline |
|
inlinevirtual |
Return an iterator that points to the first child item of this item.
This default implementation returns the 'end' iterator of the class-static always empty _noChildren YItemCollection. It is safe to use this iterator in classic iterator loops:
for ( YItemIterator it = myItem->childrenBegin(); it != myItem->childrenEnd(); ++it ) { ... }
The loop body will only ever be executed if this item is a derived class that actually manages child items.
Reimplemented in YTreeItem.
|
inlinevirtual |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
Return the index of this item (as set with setIndex() ).
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
Set the opaque data pointer for application use.
Applications can use this to store the pointer to a counterpart of this tree item. It is the application's responsibility to watch for dangling pointers and possibliy deleting the data. All this class ever does with this pointer is to store it.
|
inline |
|
inline |
|
inline |
|
inline |