38 int numContentsInFlow) :
58 this->sectionIndex = sectionIndex;
61 if (sectionIndex < 0 || index < 0)
63 else if (sectionIndex >= NUM_SECTIONS || index >= numParts (sectionIndex))
66 getPart (sectionIndex, index, &content);
70 int numContentsInFlow)
73 sectionIndex, numContentsInFlow);
78 if (sectionIndex < 0 || sectionIndex > NUM_SECTIONS) {
82 }
else if (sectionIndex == 0)
83 result = numContentsInFlow == -1 ?
84 this->numContentsInFlow () : numContentsInFlow;
100 if (sectionIndex == 0)
101 getContentInFlow (index, content);
112 sb->
append (
", sectionIndex = ");
114 sb->
append (
", index = ");
125 return index - otherTI->
index;
131 "OOFAwareWidgetIterator/next");
137 "initial value: %s; sectionIndex = %d, index = %d",
138 sb.
getChars (), sectionIndex, index);
147 if (sectionIndex >= 0 && sectionIndex < NUM_SECTIONS &&
148 index >= 0 && index < numParts (sectionIndex)) {
149 getPart (sectionIndex, index, &content);
151 while (++sectionIndex < NUM_SECTIONS &&
152 numParts (sectionIndex) == 0) ;
154 if (sectionIndex >= NUM_SECTIONS) {
162 found = (content.type & getMask());
180 "OOFAwareWidgetIterator/prev");
186 "initial value: %s; sectionIndex = %d, index = %d",
187 sb.
getChars (), sectionIndex, index);
196 if (sectionIndex >= 0 && sectionIndex < NUM_SECTIONS &&
197 index >= 0 && index < numParts (sectionIndex)) {
198 getPart (sectionIndex, index, &content);
200 while (--sectionIndex >= 0 && numParts (sectionIndex) == 0) ;
202 if (sectionIndex < 0) {
206 index = numParts (sectionIndex);
210 found = (content.type & getMask());
Iterators are used to iterate through the contents of a widget.
void intoStringBuffer(lout::misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
virtual int getNumWidgets()=0
virtual core::Widget * getWidget(int i)=0
void intoStringBuffer(misc::StringBuffer *sb)
Store a textual representation of the object in a misc::StringBuffer.
A class for fast concatenation of a large number of strings.
void append(const char *str)
Append a NUL-terminated string to the buffer, with copying.
const char * getChars()
Return a NUL-terminated strings containing all appended strings.
Instances of a sub class of may be compared (less, greater).
#define DBG_OBJ_LEAVE_O(obj)
#define DBG_OBJ_ENTER0_O(aspect, prio, obj, funname)
#define DBG_OBJ_LEAVE_VAL_O(obj, fmt,...)
#define DBG_OBJ_MSGF_O(aspect, prio, obj, fmt,...)
#define DBG_OBJ_MARKF_O(aspect, prio, obj, fmt,...)
#define DBG_OBJ_ENTER_O(aspect, prio, obj, funname, fmt,...)
The core of Dw is defined in this namespace.
Dw is in this namespace, or sub namespaces of this one.
Miscellaneous stuff, which does not fit anywhere else.
const char * boolToStr(bool b)
Here, some common classes (or interfaces) are defined, to standardize the access to other classes.
Represents the allocation, i.e.
@ WIDGET_OOF_CONT
widget out of flow (OOF); this widget (containing this content) is only the container (parent),...