blob: 423b1fab8eb16d2aa22c196fc84306394a767c74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
#ifndef __DW_SIMPLE_CONTAINER_HH__
#define __DW_SIMPLE_CONTAINER_HH__
#include "dw/core.hh"
namespace dw {
/**
* Simple widget used for testing concepts.
*/
class SimpleContainer: public core::Widget
{
private:
class SimpleContainerIterator: public core::Iterator
{
private:
int index ();
public:
SimpleContainerIterator (SimpleContainer *simpleContainer,
core::Content::Type mask,
bool atEnd);
lout::object::Object *clone ();
int compareTo (lout::object::Comparable *other);
bool next ();
bool prev ();
void highlight (int start, int end, core::HighlightLayer layer);
void unhighlight (int direction, core::HighlightLayer layer);
void getAllocation (int start, int end, core::Allocation *allocation);
};
Widget *child;
protected:
void sizeRequestImpl (core::Requisition *requisition);
void getExtremesImpl (core::Extremes *extremes);
void sizeAllocateImpl (core::Allocation *allocation);
public:
static int CLASS_ID;
SimpleContainer ();
~SimpleContainer ();
void draw (core::View *view, core::Rectangle *area,
core::StackingIteratorStack *iteratorStack,
Widget **interruptedWidget);
core::Iterator *iterator (core::Content::Type mask, bool atEnd);
void removeChild (Widget *child);
void setChild (core::Widget *child);
};
} // namespace dw
#endif // __DW_SIMPLE_CONTAINER_HH__
|