Public Member Functions | |
| TableIterator (Table *table, core::Content::Type mask, bool atEnd) | |
| TableIterator (Table *table, core::Content::Type mask, int index) | |
| lout::object::Object * | clone () |
| Return an exact copy of the object. | |
| int | compareTo (lout::misc::Comparable *other) |
| Compare two objects c1 and c2. | |
| bool | next () |
| Move iterator forward and store content it. | |
| bool | prev () |
| Move iterator backward and store content it. | |
| void | highlight (int start, int end, core::HighlightLayer layer) |
| Extend highlighted region to contain part of the current content. | |
| void | unhighlight (int direction, core::HighlightLayer layer) |
| Shrink highlighted region to no longer contain the current content. | |
| void | getAllocation (int start, int end, core::Allocation *allocation) |
| Return the shape, which a part of the item, the iterator points on, allocates. | |
Private Attributes | |
| int | index |
| dw::Table::TableIterator::TableIterator | ( | Table * | table, | |
| core::Content::Type | mask, | |||
| bool | atEnd | |||
| ) |
References dw::Table::children, dw::core::Iterator::content, dw::core::Content::END, index, lout::misc::SimpleVector< T >::size(), and dw::core::Content::START.
Referenced by clone().
| dw::Table::TableIterator::TableIterator | ( | Table * | table, | |
| core::Content::Type | mask, | |||
| int | index | |||
| ) |
| object::Object * dw::Table::TableIterator::clone | ( | ) | [virtual] |
Return an exact copy of the object.
Reimplemented from lout::object::Object.
References dw::core::Iterator::getMask(), dw::core::Iterator::getWidget(), index, and TableIterator().
| int dw::Table::TableIterator::compareTo | ( | lout::misc::Comparable * | other | ) | [virtual] |
Compare two objects c1 and c2.
return a value < 0, when c1 is less than c2, a value > 0, when c1 is greater than c2, or 0, when c1 and c2 are equal.
If also object::Object is implemented, and if c1.equals(c2), c1.compareTo(c2) must be 0, but, unlike you may expect, the reversed is not necessarily true. This method returns 0, if, according to the rules for sorting, there is no difference, but there may still be differences (not relevant for sorting), which "equals" will care about.
Implements lout::misc::Comparable.
References index.
| void dw::Table::TableIterator::getAllocation | ( | int | start, | |
| int | end, | |||
| core::Allocation * | allocation | |||
| ) | [virtual] |
Return the shape, which a part of the item, the iterator points on, allocates.
The parameters start and end have the same meaning as in DwIterator::highlight().
Implements dw::core::Iterator.
| void dw::Table::TableIterator::highlight | ( | int | start, | |
| int | end, | |||
| core::HighlightLayer | layer | |||
| ) | [virtual] |
Extend highlighted region to contain part of the current content.
For text, start and end define the characters, otherwise, the shape is defined as [0, 1], i.e. for highlighting a whole dw::core::Content, pass 0 and >= 1. To unhighlight see also dw::core::Iterator::unhighlight.
todo Needs this an implementation?
Implements dw::core::Iterator.
| bool dw::Table::TableIterator::next | ( | ) | [virtual] |
Move iterator forward and store content it.
Returns true on success.
Implements dw::core::Iterator.
References dw::Table::Child::cell, dw::Table::Child::CELL, dw::Table::children, dw::core::Iterator::content, dw::core::Content::END, lout::misc::SimpleVector< T >::get(), dw::core::Iterator::getMask(), dw::core::Iterator::getWidget(), index, lout::misc::SimpleVector< T >::size(), dw::Table::Child::type, and dw::core::Content::WIDGET.
| bool dw::Table::TableIterator::prev | ( | ) | [virtual] |
Move iterator backward and store content it.
Returns true on success.
Implements dw::core::Iterator.
References dw::Table::Child::cell, dw::Table::Child::CELL, dw::Table::children, dw::core::Iterator::content, lout::misc::SimpleVector< T >::get(), dw::core::Iterator::getMask(), dw::core::Iterator::getWidget(), index, dw::core::Content::START, dw::Table::Child::type, and dw::core::Content::WIDGET.
| void dw::Table::TableIterator::unhighlight | ( | int | direction, | |
| core::HighlightLayer | layer | |||
| ) | [virtual] |
Shrink highlighted region to no longer contain the current content.
The direction parameter indicates whether the highlighted region should be reduced from the start (direction > 0) or from the end (direction < 0). If direction is 0 all content is unhighlighted.
Implements dw::core::Iterator.
int dw::Table::TableIterator::index [private] |
Referenced by clone(), compareTo(), next(), prev(), and TableIterator().
1.5.9