Dillo
dw_simple_container.hh
Go to the documentation of this file.
1 #ifndef __DW_SIMPLE_CONTAINER_HH__
2 #define __DW_SIMPLE_CONTAINER_HH__
3 
4 #include "dw/core.hh"
5 
6 namespace dw {
7 
12 {
13 private:
15  {
16  private:
17  int index ();
18 
19  public:
20  SimpleContainerIterator (SimpleContainer *simpleContainer,
22  bool atEnd);
23 
26 
27  bool next ();
28  bool prev ();
29  void highlight (int start, int end, core::HighlightLayer layer);
30  void unhighlight (int direction, core::HighlightLayer layer);
31  void getAllocation (int start, int end, core::Allocation *allocation);
32  };
33 
35 
36 protected:
40 
41 public:
42  static int CLASS_ID;
43 
44  SimpleContainer ();
46 
47  void draw (core::View *view, core::Rectangle *area,
48  core::DrawingContext *context);
49  core::Iterator *iterator (core::Content::Type mask, bool atEnd);
50  void removeChild (Widget *child);
51 
52  void setChild (core::Widget *child);
53 };
54 
55 } // namespace dw
56 
57 #endif // __DW_SIMPLE_CONTAINER_HH__
Extremes extremes
Analogue to dw::core::Widget::requisition.
Definition: widget.hh:146
void setChild(core::Widget *child)
Definition: dw_simple_container.cc:233
bool next()
Move iterator forward and store content it.
Definition: dw_simple_container.cc:71
Requisition requisition
Size_request() stores the result of the last call of size_request_impl().
Definition: widget.hh:140
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
core::Iterator * iterator(core::Content::Type mask, bool atEnd)
Return an iterator for this widget.
Definition: dw_simple_container.cc:220
Type
Definition: types.hh:199
~SimpleContainer()
Definition: dw_simple_container.cc:157
This is the base class for many other classes, which defines very common virtual methods.
Definition: object.hh:24
Definition: dw_simple_container.hh:14
void getAllocation(int start, int end, core::Allocation *allocation)
Return the shape, which a part of the item, the iterator points on, allocates.
Definition: dw_simple_container.cc:141
lout::object::Object * clone()
Return an exact copy of the object.
Definition: dw_simple_container.cc:41
Instances of a sub class of may be compared (less, greater).
Definition: object.hh:41
void sizeAllocateImpl(core::Allocation *allocation)
See Sizes of Dillo Widgets.
Definition: dw_simple_container.cc:197
Iterators are used to iterate through the contents of a widget.
Definition: iterator.hh:19
void removeChild(Widget *child)
Definition: dw_simple_container.cc:225
bool prev()
Move iterator backward and store content it.
Definition: dw_simple_container.cc:99
Definition: types.hh:172
Represents the allocation, i.e. actual position and size of a dw::core::Widget.
Definition: types.hh:163
SimpleContainer()
Definition: dw_simple_container.cc:151
int index()
Definition: dw_simple_container.cc:50
The base class of all dillo widgets.
Definition: widget.hh:23
void unhighlight(int direction, core::HighlightLayer layer)
Shrink highlighted region to no longer contain the current content.
Definition: dw_simple_container.cc:134
Set at the top when drawing.
Definition: types.hh:294
void highlight(int start, int end, core::HighlightLayer layer)
Extend highlighted region to contain part of the current content.
Definition: dw_simple_container.cc:127
Definition: types.hh:179
Allocation allocation
The current allocation: size and position, always relative to the canvas.
Definition: widget.hh:183
Definition: dw_simple_container.hh:11
HighlightLayer
Definition: types.hh:42
void draw(core::View *view, core::Rectangle *area, core::DrawingContext *context)
Definition: dw_simple_container.cc:211
static int CLASS_ID
Definition: dw_simple_container.hh:42
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtablecell.cc:28
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
Widget()
Definition: widget.cc:67
Widget * child
Definition: dw_simple_container.hh:34
SimpleContainerIterator(SimpleContainer *simpleContainer, core::Content::Type mask, bool atEnd)
Definition: dw_simple_container.cc:35
void getExtremesSimpl(core::Extremes *extremes)
Simple variant, to be implemented by widgets with extremes not depending on positions.
Definition: dw_simple_container.cc:179
int compareTo(lout::object::Comparable *other)
Compare two objects, this and other.
Definition: dw_simple_container.cc:66
Content::Type mask
Definition: iterator.hh:30
void sizeRequestSimpl(core::Requisition *requisition)
Simple variant, to be implemented by widgets with sizes not depending on positions.
Definition: dw_simple_container.cc:163