1 #ifndef __ITERATOR_HH__
2 #define __ITERATOR_HH__
4 #ifndef __INCLUDED_FROM_DW_CORE_HH__
5 # error Do not include this file directly, use "core.hh" instead.
40 virtual void unref ();
47 virtual bool next () = 0;
54 virtual bool prev () = 0;
227 start, end, hpos, vpos); }
269 #endif // __ITERATOR_HH__
Content content
Definition: iterator.hh:26
~DeepIterator()
Definition: iterator.cc:591
virtual void unhighlight(int direction, HighlightLayer layer)=0
Shrink highlighted region to no longer contain the current content.
static void highlight(CharIterator *it1, CharIterator *it2, HighlightLayer layer)
Definition: iterator.cc:857
const char * text
Definition: iterator.hh:122
Typed version of container::untyped::Vector.
Definition: container.hh:425
int getChar()
Definition: iterator.hh:252
void push(Iterator *it)
Definition: iterator.hh:155
EmptyIterator(EmptyIterator &it)
Definition: iterator.cc:217
Content::Type mask
Definition: iterator.hh:166
Definition: iterator.hh:149
This implementation of dw::core::Iterator can be used by widgets with no contents.
Definition: iterator.hh:96
CharIterator * cloneCharIterator()
Definition: iterator.hh:253
A class for fast concatenation of a large number of strings.
Definition: misc.hh:565
bool equals(Object *other)
Returns, whether two objects are equal.
Definition: iterator.cc:50
Iterator * getTopIterator()
Definition: iterator.hh:189
lout::object::Object * clone()
Return an exact copy of the object.
Definition: iterator.cc:221
Stack()
Definition: iterator.hh:152
bool prev()
Definition: iterator.cc:821
Type
Definition: types.hh:199
virtual bool prev()=0
Move iterator backward and store content it.
DeepIterator * cloneDeepIterator()
Definition: iterator.hh:196
lout::object::Object * clone()
Return an exact copy of the object.
Definition: iterator.cc:763
~Iterator()
Definition: iterator.cc:46
Iterator * cloneIterator()
Definition: iterator.hh:85
Content::Type getMask()
Definition: iterator.hh:38
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
static int getRespectiveLevel(Widget *widget, Content::Type mask)
Definition: iterator.cc:475
bool hasContents
Definition: iterator.hh:168
~Stack()
Definition: iterator.cc:338
int size()
Definition: container.hh:418
static Widget * getRespectiveParent(Widget *widget, Content::Type mask)
Definition: iterator.cc:462
int getRespectiveLevel(Widget *widget)
Definition: iterator.hh:178
void put(Iterator *newElement, int newPos=-1)
Definition: container.hh:431
int compareTo(lout::object::Comparable *other)
Compare two objects, this and other.
Definition: iterator.cc:226
bool isEmpty()
Definition: iterator.cc:662
Instances of a sub class of may be compared (less, greater).
Definition: object.hh:41
static void scrollTo(DeepIterator *it1, DeepIterator *it2, int start, int end, HPosition hpos, VPosition vpos)
Definition: iterator.hh:223
~CharIterator()
Definition: iterator.cc:757
bool prev()
Move iterator backward and store content it.
Definition: iterator.cc:704
Iterators are used to iterate through the contents of a widget.
Definition: iterator.hh:19
static Iterator * searchDownward(Iterator *it, Content::Type mask, bool fromEnd)
Definition: iterator.cc:356
void unhighlight(int direction, HighlightLayer layer)
Shrink highlighted region to no longer contain the current content.
Definition: iterator.cc:254
Iterator(Widget *widget, Content::Type mask, bool atEnd)
Definition: iterator.cc:34
Definition: iterator.hh:235
CharIterator()
Definition: iterator.cc:736
static Iterator * searchSideward(Iterator *it, Content::Type mask, bool fromEnd)
Definition: iterator.cc:403
lout::object::Object * clone()
Return an exact copy of the object.
Definition: iterator.cc:596
Widget * getRespectiveParent(Widget *widget)
Definition: iterator.hh:173
virtual void unref()
Delete the iterator.
Definition: iterator.cc:82
void intoStringBuffer(lout::misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
Definition: iterator.cc:58
bool next()
Move iterator forward and store content it.
Definition: iterator.cc:238
TextIterator(TextIterator &it)
Definition: iterator.cc:273
Represents the allocation, i.e. actual position and size of a dw::core::Widget.
Definition: types.hh:163
DeepIterator()
Definition: iterator.hh:170
HPosition
Definition: types.hh:15
int compareTo(lout::object::Comparable *other)
Compare two objects, this and other.
Definition: iterator.cc:278
VPosition
Definition: types.hh:25
void pop()
Definition: iterator.hh:156
Vector(int initSize, bool ownerOfObjects)
Definition: container.hh:428
bool next()
Move iterator forward and store content it.
Definition: iterator.cc:671
Stack stack
Definition: iterator.hh:159
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...
Definition: iterator.cc:98
Definition: container.cc:27
int compareTo(lout::object::Comparable *other)
Compare two objects, this and other.
Definition: iterator.cc:610
DeepIterator * createVariant(Iterator *it)
Definition: iterator.cc:656
int pos
Definition: iterator.hh:239
void highlight(int start, int end, HighlightLayer layer)
Extend highlighted region to contain part of the current content.
Definition: iterator.cc:250
virtual void getAllocation(int start, int end, Allocation *allocation)=0
Return the shape, which a part of the item, the iterator points on, allocates.
HighlightLayer
Definition: types.hh:42
A stack of iterators, to iterate recursively through a widget tree.
Definition: iterator.hh:146
virtual bool next()=0
Move iterator forward and store content it.
void unhighlight(int direction, HighlightLayer layer)
Definition: iterator.hh:220
virtual void highlight(int start, int end, HighlightLayer layer)=0
Extend highlighted region to contain part of the current content.
Definition: iterator.hh:235
void getAllocation(int start, int end, Allocation *allocation)
Return the shape, which a part of the item, the iterator points on, allocates.
Definition: iterator.hh:217
void highlight(int start, int end, HighlightLayer layer)
Highlight a part of the current content.
Definition: iterator.hh:207
bool next()
Definition: iterator.cc:782
This implementation of dw::core::Iterator can be used by widgets having one text word as contents...
Definition: iterator.hh:118
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
Widget * widget
Definition: iterator.hh:29
void getAllocation(int start, int end, Allocation *allocation)
Return the shape, which a part of the item, the iterator points on, allocates.
Definition: iterator.cc:258
Content * getContent()
Definition: iterator.hh:190
Content content
Definition: iterator.hh:167
int compareTo(lout::object::Comparable *other)
Compare two objects, this and other.
Definition: iterator.cc:772
Widget * getWidget()
Definition: iterator.hh:36
static void scrollTo(CharIterator *it1, CharIterator *it2, HPosition hpos, VPosition vpos)
Definition: iterator.hh:260
static void unhighlight(CharIterator *it1, CharIterator *it2, HighlightLayer layer)
Definition: iterator.cc:887
void getAllocation(int start, int end, Allocation *allocation)
Return the shape, which a part of the item, the iterator points on, allocates.
Definition: iterator.cc:328
int ch
Definition: iterator.hh:239
bool next()
Move iterator forward and store content it.
Definition: iterator.cc:304
Content * getContent()
Definition: iterator.hh:37
bool prev()
Move iterator backward and store content it.
Definition: iterator.cc:316
virtual Object * clone()
Return an exact copy of the object.
Definition: object.cc:68
bool prev()
Move iterator backward and store content it.
Definition: iterator.cc:244
DeepIterator * it
Definition: iterator.hh:238
Iterator * getTop()
Definition: iterator.hh:154
Definition: iterator.hh:230
Content::Type mask
Definition: iterator.hh:30