25 #include "YTableItem.h"
26 #include "YUIException.h"
37 const std::string & label_1,
38 const std::string & label_2,
39 const std::string & label_3,
40 const std::string & label_4,
41 const std::string & label_5,
42 const std::string & label_6,
43 const std::string & label_7,
44 const std::string & label_8,
45 const std::string & label_9 )
48 std::vector<std::string> labels;
50 labels.push_back( label_0 );
51 labels.push_back( label_1 );
52 labels.push_back( label_2 );
53 labels.push_back( label_3 );
54 labels.push_back( label_4 );
55 labels.push_back( label_5 );
56 labels.push_back( label_6 );
57 labels.push_back( label_7 );
58 labels.push_back( label_8 );
59 labels.push_back( label_9 );
65 unsigned lastLabel = labels.size() - 1;
67 while ( labels[ lastLabel ].empty() && --lastLabel > 0 )
74 for (
unsigned i = 0; i <= lastLabel; ++i )
107 YUI_CHECK_PTR( cell );
108 _cells.push_back( cell );
110 cell->
reparent(
this, _cells.size() - 1 );
118 YUI_CHECK_NEW( cell );
127 return index >= 0 && (unsigned) index < _cells.size();
150 return hasCell( index ) ? _cells[
index ]->label() :
"";
157 return hasCell( index ) ? _cells[
index ]->iconName() :
"";
164 return hasCell( index ) ? _cells[
index ]->hasIconName() :
false;
173 YUI_CHECK_PTR( parent );
175 if ( _parent && _parent != parent && column != column )
176 YUI_THROW(
YUIException( std::string(
"Cannot reparent YTableCell \"" )
178 +
"to different parent." ) );
void addCell(YTableCell *cell_disown)
std::string label() const
const YTableCell * cell(int index) const
bool hasIconName(int index) const
std::string iconName(int index) const
bool hasCell(int index) const
YTableItem * parent() const
YTableCellIterator cellsEnd()
void reparent(YTableItem *parent, int column)
YTableCellIterator cellsBegin()