Dillo v3.1.1-119-g140d9ebd
|
Public Member Functions | |
SimpleContainerIterator (SimpleContainer *simpleContainer, core::Content::Type mask, bool atEnd) | |
lout::object::Object * | clone () |
Return an exact copy of the object. | |
int | compareTo (lout::object::Comparable *other) |
Compare two objects, this and other. | |
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. | |
Public Member Functions inherited from dw::core::Iterator | |
bool | equals (Object *other) |
Returns, whether two objects are equal. | |
void | intoStringBuffer (lout::misc::StringBuffer *sb) |
Store a textual representation of the object in a misc::StringBuffer. | |
Widget * | getWidget () |
Content * | getContent () |
Content::Type | getMask () |
virtual void | unref () |
Delete the iterator. | |
Iterator * | cloneIterator () |
Public Member Functions inherited from lout::object::Object | |
virtual | ~Object () |
The destructor is defined as virtual (but not abstract), so that destruction of Object's works properly. | |
virtual int | hashValue () |
Return a hash value for the object. | |
const char * | toString () |
Use object::Object::intoStringBuffer to return a textual representation of the object. | |
virtual size_t | sizeOf () |
Return the number of bytes, this object totally uses. | |
Private Member Functions | |
int | index () |
Additional Inherited Members | |
Static Public Member Functions inherited from dw::core::Iterator | |
static void | scrollTo (Iterator *it1, Iterator *it2, int start, int end, HPosition hpos, VPosition vpos) |
Scrolls the viewport, so that the region between it1 and it2 is seen, according to hpos and vpos. | |
Protected Member Functions inherited from dw::core::Iterator | |
Iterator (Widget *widget, Content::Type mask, bool atEnd) | |
Iterator (Iterator &it) | |
~Iterator () | |
Protected Attributes inherited from dw::core::Iterator | |
Content | content |
Definition at line 14 of file dw_simple_container.hh.
dw::SimpleContainer::SimpleContainerIterator::SimpleContainerIterator | ( | SimpleContainer * | simpleContainer, |
core::Content::Type | mask, | ||
bool | atEnd | ||
) |
Definition at line 34 of file dw_simple_container.cc.
References dw::core::Iterator::content, dw::core::Content::END, dw::core::Content::START, and dw::core::Content::type.
|
virtual |
Return an exact copy of the object.
Reimplemented from lout::object::Object.
Definition at line 41 of file dw_simple_container.cc.
References dw::core::Iterator::content.
|
virtual |
Compare two objects, this and other.
Return a value < 0, when this is less than other, a value > 0, when this is greater than other, or 0, when this and other are equal.
If c1.equals(c2) (as defined in Object), 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::object::Comparable.
Definition at line 65 of file dw_simple_container.cc.
|
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.
Definition at line 141 of file dw_simple_container.cc.
|
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.
Definition at line 127 of file dw_simple_container.cc.
|
private |
Definition at line 50 of file dw_simple_container.cc.
References lout::misc::assertNotReached(), dw::core::Content::END, dw::core::Content::START, and dw::core::Content::WIDGET_IN_FLOW.
|
virtual |
Move iterator forward and store content it.
Returns true on success.
Implements dw::core::Iterator.
Definition at line 71 of file dw_simple_container.cc.
References dw::SimpleContainer::child, dw::core::Content::END, dw::core::Content::START, and dw::core::Content::WIDGET_IN_FLOW.
|
virtual |
Move iterator backward and store content it.
Returns true on success.
Implements dw::core::Iterator.
Definition at line 99 of file dw_simple_container.cc.
References dw::SimpleContainer::child, dw::core::Content::END, dw::core::Content::START, and dw::core::Content::WIDGET_IN_FLOW.
|
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.
todo Needs this an implementation?
Implements dw::core::Iterator.
Definition at line 134 of file dw_simple_container.cc.