CL_ListViewItem Class Reference
[clanGUI Components]

ListView item. More...

#include <listview_item.h>

List of all members.

Public Member Functions

Construction

 CL_ListViewItem ()
 Construct a null instance.
 ~CL_ListViewItem ()
Attributes

bool is_null () const
 Returns true if this object is invalid.
void throw_if_null () const
 Throw an exception if this object is invalid.
bool is_item () const
 Is Item.
CL_ListViewColumnData get_column (const CL_StringRef &column_id)
 Get column.
CL_ListViewItem get_parent ()
 Get Parent.
CL_ListViewItem get_next_sibling ()
 Get Next sibling.
CL_ListViewItem get_prev_sibling ()
 Get Prev sibling.
CL_ListViewItem get_first_child ()
 Get First child.
CL_ListViewItem get_last_child ()
 Get Last child.
CL_ListViewItem get_document_item ()
 Get Document item.
int get_parent_count ()
 Get Parent count.
int get_child_count (bool recursive=false, bool recurse_only_into_open_items=false)
 Get child count.
bool has_children () const
 Has children.
bool is_open () const
 Is Open.
bool is_selected () const
 Is Selected.
bool is_editable () const
 Is Editable.
int get_icon () const
 Get the item icon id. Defaults to 0 if unset.
int get_id () const
 Get the item id. Defaults to 0 if unset.
CL_SharedPtr
< CL_ListViewItemUserData
get_userdata () const
 Get Userdata.
bool operator== (CL_ListViewItem &other) const
bool operator!= (CL_ListViewItem &other) const
std::vector< int > get_overlay_icons ()
Operations

CL_ListViewItem append_child (CL_ListViewItem &item)
 Append child.
CL_ListViewItem remove ()
 Removes this item from the item tree.
void remove_children ()
 Remove all children of this item.
void set_column_text (const CL_StringRef &column_id, const CL_StringRef &text)
 Set column text.
void set_open (bool open)
 Set open.
void set_icon (int icon_index)
 Set icon.
void set_id (int id)
 Set the item id. Defaults to 0 if unset.
void add_overlay_icon (int icon_index)
 Add overlay icon.
void remove_overlay_icon (int icon_index)
 Remove overlay icon.
void set_editable (bool editable)
 Set editable.
void set_userdata (CL_SharedPtr< CL_ListViewItemUserData > ptr)
 Set userdata.
Events

CL_Callback_v1< CL_Rect > & func_render_icon ()

Implementation



class CL_ListView
class CL_ListView_Impl
class CL_ListViewSelection
class CL_ListViewLayout

Detailed Description

ListView item.


Constructor & Destructor Documentation

CL_ListViewItem::CL_ListViewItem (  ) 

Construct a null instance.

CL_ListViewItem::~CL_ListViewItem (  ) 

Member Function Documentation

void CL_ListViewItem::add_overlay_icon ( int  icon_index  ) 

Add overlay icon.

Parameters:
icon_index = value
CL_ListViewItem CL_ListViewItem::append_child ( CL_ListViewItem item  ) 

Append child.

Parameters:
item = List View Item
Returns:
List View Item
CL_Callback_v1<CL_Rect>& CL_ListViewItem::func_render_icon (  ) 
int CL_ListViewItem::get_child_count ( bool  recursive = false,
bool  recurse_only_into_open_items = false 
)

Get child count.

Parameters:
recursive = bool
recurse_only_into_open_items = bool
Returns:
int
CL_ListViewColumnData CL_ListViewItem::get_column ( const CL_StringRef column_id  ) 

Get column.

Parameters:
column_id = String Ref
Returns:
List View Column Data
CL_ListViewItem CL_ListViewItem::get_document_item (  ) 

Get Document item.

Returns:
document_item
CL_ListViewItem CL_ListViewItem::get_first_child (  ) 

Get First child.

Returns:
first_child
int CL_ListViewItem::get_icon (  )  const

Get the item icon id. Defaults to 0 if unset.

int CL_ListViewItem::get_id (  )  const

Get the item id. Defaults to 0 if unset.

CL_ListViewItem CL_ListViewItem::get_last_child (  ) 

Get Last child.

Returns:
last_child
CL_ListViewItem CL_ListViewItem::get_next_sibling (  ) 

Get Next sibling.

Returns:
next_sibling
std::vector<int> CL_ListViewItem::get_overlay_icons (  ) 
CL_ListViewItem CL_ListViewItem::get_parent (  ) 

Get Parent.

Returns:
parent
int CL_ListViewItem::get_parent_count (  ) 

Get Parent count.

Returns:
parent_count
CL_ListViewItem CL_ListViewItem::get_prev_sibling (  ) 

Get Prev sibling.

Returns:
prev_sibling
CL_SharedPtr<CL_ListViewItemUserData> CL_ListViewItem::get_userdata (  )  const

Get Userdata.

Returns:
userdata
bool CL_ListViewItem::has_children (  )  const

Has children.

Returns:
bool
bool CL_ListViewItem::is_editable (  )  const

Is Editable.

Returns:
true = editable
bool CL_ListViewItem::is_item (  )  const

Is Item.

Returns:
true = item
bool CL_ListViewItem::is_null (  )  const [inline]

Returns true if this object is invalid.

bool CL_ListViewItem::is_open (  )  const

Is Open.

Returns:
true = open
bool CL_ListViewItem::is_selected (  )  const

Is Selected.

Returns:
true = selected
bool CL_ListViewItem::operator!= ( CL_ListViewItem other  )  const
bool CL_ListViewItem::operator== ( CL_ListViewItem other  )  const
CL_ListViewItem CL_ListViewItem::remove (  ) 

Removes this item from the item tree.

void CL_ListViewItem::remove_children (  ) 

Remove all children of this item.

void CL_ListViewItem::remove_overlay_icon ( int  icon_index  ) 

Remove overlay icon.

Parameters:
icon_index = value
void CL_ListViewItem::set_column_text ( const CL_StringRef column_id,
const CL_StringRef text 
)

Set column text.

Parameters:
column_id = String Ref
text = String Ref
void CL_ListViewItem::set_editable ( bool  editable  ) 

Set editable.

Parameters:
editable = bool
void CL_ListViewItem::set_icon ( int  icon_index  ) 

Set icon.

Parameters:
icon_index = value
void CL_ListViewItem::set_id ( int  id  ) 

Set the item id. Defaults to 0 if unset.

void CL_ListViewItem::set_open ( bool  open  ) 

Set open.

Parameters:
open = bool
void CL_ListViewItem::set_userdata ( CL_SharedPtr< CL_ListViewItemUserData ptr  ) 

Set userdata.

Parameters:
ptr = Unknown Shared Ptr
void CL_ListViewItem::throw_if_null (  )  const

Throw an exception if this object is invalid.


Friends And Related Function Documentation

friend class CL_ListView [friend]
friend class CL_ListView_Impl [friend]
friend class CL_ListViewLayout [friend]
friend class CL_ListViewSelection [friend]

The documentation for this class was generated from the following file: