dillo  3.0.5
About: dillo is a small, fast, extensible Web browser particularly suitable for older or smaller computers and embedded systems (but only limited or no support for frames, CSS, JavaScript, Java).
  Fossies Dox: dillo-3.0.5.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

widget.cc
Go to the documentation of this file.
1 /*
2  * Dillo Widget
3  *
4  * Copyright 2005-2007 Sebastian Geerken <sgeerken@dillo.org>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 
21 
22 #include "core.hh"
23 
24 #include "../lout/msg.h"
25 #include "../lout/debug.hh"
26 
27 using namespace lout;
28 using namespace lout::object;
29 
30 namespace dw {
31 namespace core {
32 
33 // ----------------------------------------------------------------------
34 
35 bool Widget::WidgetImgRenderer::readyToDraw ()
36 {
37  return widget->wasAllocated ();
38 }
39 
40 void Widget::WidgetImgRenderer::getBgArea (int *x, int *y, int *width,
41  int *height)
42 {
43  widget->getPaddingArea (x, y, width, height);
44 }
45 
46 void Widget::WidgetImgRenderer::getRefArea (int *xRef, int *yRef, int *widthRef,
47  int *heightRef)
48 {
49  widget->getPaddingArea (xRef, yRef, widthRef, heightRef);
50 }
51 
52 style::Style *Widget::WidgetImgRenderer::getStyle ()
53 {
54  return widget->getStyle ();
55 }
56 
57 void Widget::WidgetImgRenderer::draw (int x, int y, int width, int height)
58 {
59  widget->queueDrawArea (x - widget->allocation.x, y - widget->allocation.y,
60  width, height);
61 }
62 
63 // ----------------------------------------------------------------------
64 
65 int Widget::CLASS_ID = -1;
66 
67 Widget::Widget ()
68 {
69  DBG_OBJ_CREATE ("dw::core::Widget");
70  registerName ("dw::core::Widget", &CLASS_ID);
71 
72  flags = (Flags)(NEEDS_RESIZE | EXTREMES_CHANGED | HAS_CONTENTS);
73  parent = NULL;
74  layout = NULL;
75 
76  allocation.x = -1;
77  allocation.y = -1;
78  allocation.width = 1;
79  allocation.ascent = 1;
80  allocation.descent = 0;
81 
82  style = NULL;
83  bgColor = NULL;
84  buttonSensitive = true;
85  buttonSensitiveSet = false;
86 
87  deleteCallbackData = NULL;
88  deleteCallbackFunc = NULL;
89 
90  widgetImgRenderer = NULL;
91 }
92 
93 Widget::~Widget ()
94 {
95  if (deleteCallbackFunc)
96  deleteCallbackFunc (deleteCallbackData);
97 
98  if (widgetImgRenderer) {
99  if (style && style->backgroundImage)
100  style->backgroundImage->removeExternalImgRenderer (widgetImgRenderer);
101  delete widgetImgRenderer;
102  }
103 
104  if (style)
105  style->unref ();
106 
107  if (parent)
108  parent->removeChild (this);
109  else
110  layout->removeWidget ();
111 
112  DBG_OBJ_DELETE ();
113 }
114 
115 
123 bool Widget::intersects (Rectangle *area, Rectangle *intersection)
124 {
125  Rectangle parentArea, childArea;
126 
127  parentArea = *area;
128  parentArea.x += parent->allocation.x;
129  parentArea.y += parent->allocation.y;
130 
131  childArea.x = allocation.x;
132  childArea.y = allocation.y;
133  childArea.width = allocation.width;
134  childArea.height = getHeight ();
135 
136  if (parentArea.intersectsWith (&childArea, intersection)) {
137  intersection->x -= allocation.x;
138  intersection->y -= allocation.y;
139  return true;
140  } else
141  return false;
142 }
143 
144 void Widget::setParent (Widget *parent)
145 {
146  this->parent = parent;
147  layout = parent->layout;
148 
149  if (!buttonSensitiveSet)
150  buttonSensitive = parent->buttonSensitive;
151 
152  DBG_OBJ_ASSOC_PARENT (parent);
153 
154  //printf ("The %s %p becomes a child of the %s %p\n",
155  // getClassName(), this, parent->getClassName(), parent);
156 }
157 
158 void Widget::queueDrawArea (int x, int y, int width, int height)
159 {
161  layout->queueDraw (x + allocation.x, y + allocation.y, width, height);
162  _MSG("Widget::queueDrawArea alloc(%d %d %d %d) wid(%d %d %d %d)\n",
163  allocation.x, allocation.y,
164  allocation.width, allocation.ascent + allocation.descent,
165  x, y, width, height);
166 }
167 
171 void Widget::queueResize (int ref, bool extremesChanged)
172 {
173  Widget *widget2, *child;
174 
175  //printf("The %stop-level %s %p with parentRef = %d has changed its size.\n",
176  // parent ? "non-" : "", getClassName(), this, parentRef);
177 
178  setFlags (NEEDS_RESIZE);
179  setFlags (NEEDS_ALLOCATE);
180  markSizeChange (ref);
181 
182  if (extremesChanged) {
183  setFlags (EXTREMES_CHANGED);
184  markExtremesChange (ref);
185  }
186 
187  for (widget2 = parent, child = this;
188  widget2;
189  child = widget2, widget2 = widget2->parent) {
190  widget2->setFlags (NEEDS_RESIZE);
191  widget2->markSizeChange (child->parentRef);
192  widget2->setFlags (NEEDS_ALLOCATE);
193 
194  //printf (" Setting DW_NEEDS_RESIZE and NEEDS_ALLOCATE for the "
195  // "%stop-level %s %p with parentRef = %d\n",
196  // widget2->parent ? "non-" : "", widget2->getClassName(), widget2,
197  // widget2->parentRef);
198 
199  if (extremesChanged) {
200  widget2->setFlags (EXTREMES_CHANGED);
201  widget2->markExtremesChange (child->parentRef);
202  }
203  }
204 
205  if (layout)
206  layout->queueResize ();
207 }
208 
209 
214 void Widget::sizeRequest (Requisition *requisition)
215 {
216  if (needsResize ()) {
218  sizeRequestImpl (requisition);
219  this->requisition = *requisition;
220  unsetFlags (NEEDS_RESIZE);
221 
222  DBG_OBJ_SET_NUM ("requisition.width", requisition->width);
223  DBG_OBJ_SET_NUM ("requisition.ascent", requisition->ascent);
224  DBG_OBJ_SET_NUM ("requisition.descent", requisition->descent);
225  } else
226  *requisition = this->requisition;
227 }
228 
232 void Widget::getExtremes (Extremes *extremes)
233 {
234  if (extremesChanged ()) {
235  getExtremesImpl (extremes);
236  this->extremes = *extremes;
237  unsetFlags (EXTREMES_CHANGED);
238 
239  DBG_OBJ_SET_NUM ("extremes.minWidth", extremes->minWidth);
240  DBG_OBJ_SET_NUM ("extremes.maxWidth", extremes->maxWidth);
241  } else
242  *extremes = this->extremes;
243 }
244 
249 void Widget::sizeAllocate (Allocation *allocation)
250 {
251  if (needsAllocate () ||
252  allocation->x != this->allocation.x ||
253  allocation->y != this->allocation.y ||
254  allocation->width != this->allocation.width ||
255  allocation->ascent != this->allocation.ascent ||
256  allocation->descent != this->allocation.descent) {
257 
258  if (wasAllocated ()) {
259  layout->queueDrawExcept (
260  this->allocation.x,
261  this->allocation.y,
262  this->allocation.width,
263  this->allocation.ascent + this->allocation.descent,
264  allocation->x,
265  allocation->y,
266  allocation->width,
267  allocation->ascent + allocation->descent);
268  }
269 
270  sizeAllocateImpl (allocation);
271 
272  //DEBUG_MSG (DEBUG_ALLOC, "... to %d, %d, %d x %d x %d\n",
273  // widget->allocation.x, widget->allocation.y,
274  // widget->allocation.width, widget->allocation.ascent,
275  // widget->allocation.descent);
276 
277  this->allocation = *allocation;
278  unsetFlags (NEEDS_ALLOCATE);
279  setFlags (WAS_ALLOCATED);
280 
281  resizeDrawImpl ();
282 
283  DBG_OBJ_SET_NUM ("allocation.x", this->allocation.x);
284  DBG_OBJ_SET_NUM ("allocation.y", this->allocation.y);
285  DBG_OBJ_SET_NUM ("allocation.width", this->allocation.width);
286  DBG_OBJ_SET_NUM ("allocation.ascent", this->allocation.ascent);
287  DBG_OBJ_SET_NUM ("allocation.descent", this->allocation.descent);
288  }
289 
290  /*unsetFlags (NEEDS_RESIZE);*/
291 }
292 
293 bool Widget::buttonPress (EventButton *event)
294 {
295  return buttonPressImpl (event);
296 }
297 
298 bool Widget::buttonRelease (EventButton *event)
299 {
300  return buttonReleaseImpl (event);
301 }
302 
303 bool Widget::motionNotify (EventMotion *event)
304 {
305  return motionNotifyImpl (event);
306 }
307 
308 void Widget::enterNotify (EventCrossing *event)
309 {
310  enterNotifyImpl (event);
311 }
312 
313 void Widget::leaveNotify (EventCrossing *event)
314 {
315  leaveNotifyImpl (event);
316 }
317 
325 void Widget::setStyle (style::Style *style)
326 {
327  bool sizeChanged;
328 
329  if (widgetImgRenderer && this->style && this->style->backgroundImage)
331  (widgetImgRenderer);
332 
333  style->ref ();
334 
335  if (this->style) {
336  sizeChanged = this->style->sizeDiffs (style);
337  this->style->unref ();
338  } else
339  sizeChanged = true;
340 
341  this->style = style;
342 
343  DBG_OBJ_ASSOC_CHILD (style);
344 
345  if (style && style->backgroundImage) {
346  // Create instance of WidgetImgRenderer when needed. Until this
347  // widget is deleted, "widgetImgRenderer" will be kept, since it
348  // is not specific to the style, but only to this widget.
349  if (widgetImgRenderer == NULL)
350  widgetImgRenderer = new WidgetImgRenderer (this);
351  style->backgroundImage->putExternalImgRenderer (widgetImgRenderer);
352  }
353 
354  if (layout != NULL) {
355  layout->updateCursor ();
356  }
357 
358  if (sizeChanged)
359  queueResize (0, true);
360  else
361  queueDraw ();
362 }
363 
369 void Widget::setBgColor (style::Color *bgColor)
370 {
371  this->bgColor = bgColor;
372 }
373 
377 style::Color *Widget::getBgColor ()
378 {
379  Widget *widget = this;
380 
381  while (widget != NULL) {
382  if (widget->style->backgroundColor)
383  return widget->style->backgroundColor;
384  if (widget->bgColor)
385  return widget->bgColor;
386 
387  widget = widget->parent;
388  }
389 
390  return layout->getBgColor ();
391 }
392 
393 
400 void Widget::drawBox (View *view, style::Style *style, Rectangle *area,
401  int x, int y, int width, int height, bool inverse)
402 {
403  Rectangle canvasArea;
404  canvasArea.x = area->x + allocation.x;
405  canvasArea.y = area->y + allocation.y;
406  canvasArea.width = area->width;
407  canvasArea.height = area->height;
408 
409  style::drawBorder (view, layout, &canvasArea,
410  allocation.x + x, allocation.y + y,
411  width, height, style, inverse);
412 
413  // This method is used for inline elements, where the CSS 2 specification
414  // does not define what here is called "reference area". To make it look
415  // smoothly, the widget padding box is used.
416 
417  int xPad, yPad, widthPad, heightPad;
418  getPaddingArea (&xPad, &yPad, &widthPad, &heightPad);
420  (view, layout, &canvasArea,
421  allocation.x + x + style->margin.left + style->borderWidth.left,
422  allocation.y + y + style->margin.top + style->borderWidth.top,
423  width - style->margin.left - style->borderWidth.left
424  - style->margin.right - style->borderWidth.right,
425  height - style->margin.top - style->borderWidth.top
426  - style->margin.bottom - style->borderWidth.bottom,
427  xPad, yPad, widthPad, heightPad, style, inverse, false);
428 }
429 
436 void Widget::drawWidgetBox (View *view, Rectangle *area, bool inverse)
437 {
438  Rectangle canvasArea;
439  canvasArea.x = area->x + allocation.x;
440  canvasArea.y = area->y + allocation.y;
441  canvasArea.width = area->width;
442  canvasArea.height = area->height;
443 
444  style::drawBorder (view, layout, &canvasArea, allocation.x, allocation.y,
445  allocation.width, getHeight (), style, inverse);
446 
447  int xPad, yPad, widthPad, heightPad;
448  getPaddingArea (&xPad, &yPad, &widthPad, &heightPad);
449  style::drawBackground (view, layout, &canvasArea,
450  xPad, yPad, widthPad, heightPad,
451  xPad, yPad, widthPad, heightPad,
452  style, inverse, parent == NULL);
453 }
454 
455 /*
456  * This function is used by some widgets, when they are selected (as a whole).
457  *
458  * \todo This could be accelerated by using clipping bitmaps. Two important
459  * issues:
460  *
461  * (i) There should always been a pixel in the upper-left corner of the
462  * *widget*, so probably two different clipping bitmaps have to be
463  * used (10/01 and 01/10).
464  *
465  * (ii) Should a new GC always be created?
466  *
467  * \bug Not implemented.
468  */
469 void Widget::drawSelected (View *view, Rectangle *area)
470 {
471 }
472 
473 
474 void Widget::setButtonSensitive (bool buttonSensitive)
475 {
476  this->buttonSensitive = buttonSensitive;
477  buttonSensitiveSet = true;
478 }
479 
480 
484 Widget *Widget::getTopLevel ()
485 {
486  Widget *widget = this;
487 
488  while (widget->parent)
489  widget = widget->parent;
490 
491  return widget;
492 }
493 
499 int Widget::getLevel ()
500 {
501  Widget *widget = this;
502  int level = 0;
503 
504  while (widget->parent) {
505  level++;
506  widget = widget->parent;
507  }
508 
509  return level;
510 }
511 
516 Widget *Widget::getNearestCommonAncestor (Widget *otherWidget)
517 {
518  Widget *widget1 = this, *widget2 = otherWidget;
519  int level1 = widget1->getLevel (), level2 = widget2->getLevel();
520 
521  /* Get both widgets onto the same level.*/
522  while (level1 > level2) {
523  widget1 = widget1->parent;
524  level1--;
525  }
526 
527  while (level2 > level1) {
528  widget2 = widget2->parent;
529  level2--;
530  }
531 
532  /* Search upwards. */
533  while (widget1 != widget2) {
534  if (widget1->parent == NULL) {
535  MSG_WARN("widgets in different trees\n");
536  return NULL;
537  }
538 
539  widget1 = widget1->parent;
540  widget2 = widget2->parent;
541  }
542 
543  return widget1;
544 }
545 
546 
552 Widget *Widget::getWidgetAtPoint (int x, int y, int level)
553 {
554  Iterator *it;
555  Widget *childAtPoint;
556 
557  //printf ("%*s-> examining the %s %p (%d, %d, %d x (%d + %d))\n",
558  // 3 * level, "", getClassName (), this, allocation.x, allocation.y,
559  // allocation.width, allocation.ascent, allocation.descent);
560 
561  if (x >= allocation.x &&
562  y >= allocation.y &&
563  x <= allocation.x + allocation.width &&
564  y <= allocation.y + getHeight ()) {
565  //_MSG ("%*s -> inside\n", 3 * level, "");
566  /*
567  * Iterate over the children of this widget. Test recursively, whether
568  * the point is within the child (or one of its children...). If there
569  * is such a child, it is returned. Otherwise, this widget is returned.
570  */
571  childAtPoint = NULL;
572  it = iterator (Content::WIDGET, false);
573 
574  while (childAtPoint == NULL && it->next ())
575  childAtPoint = it->getContent()->widget->getWidgetAtPoint (x, y,
576  level + 1);
577 
578  it->unref ();
579 
580  if (childAtPoint)
581  return childAtPoint;
582  else
583  return this;
584  } else
585  return NULL;
586 }
587 
588 
589 void Widget::scrollTo (HPosition hpos, VPosition vpos,
590  int x, int y, int width, int height)
591 {
592  layout->scrollTo (hpos, vpos,
593  x + allocation.x, y + allocation.y, width, height);
594 }
595 
602 void Widget::getPaddingArea (int *xPad, int *yPad, int *widthPad,
603  int *heightPad)
604 {
605  *xPad = allocation.x + style->margin.left + style->borderWidth.left;
606  *yPad = allocation.y + style->margin.top + style->borderWidth.top;
607  *widthPad = allocation.width - style->margin.left - style->borderWidth.left
608  - style->margin.right - style->borderWidth.right;
609  *heightPad = getHeight () - style->margin.top - style->borderWidth.top
610  - style->margin.bottom - style->borderWidth.bottom;
611 }
612 
613 void Widget::getExtremesImpl (Extremes *extremes)
614 {
615  /* Simply return the requisition width */
616  Requisition requisition;
617  sizeRequest (&requisition);
618  extremes->minWidth = extremes->maxWidth = requisition.width;
619 }
620 
621 void Widget::sizeAllocateImpl (Allocation *allocation)
622 {
623 }
624 
625 void Widget::markSizeChange (int ref)
626 {
627 }
628 
629 void Widget::markExtremesChange (int ref)
630 {
631 }
632 
633 void Widget::setWidth (int width)
634 {
635 }
636 
637 void Widget::setAscent (int ascent)
638 {
639 }
640 
641 void Widget::setDescent (int descent)
642 {
643 }
644 
645 bool Widget::buttonPressImpl (EventButton *event)
646 {
647  return false;
648 }
649 
650 bool Widget::buttonReleaseImpl (EventButton *event)
651 {
652  return false;
653 }
654 
655 bool Widget::motionNotifyImpl (EventMotion *event)
656 {
657  return false;
658 }
659 
660 void Widget::enterNotifyImpl (EventCrossing *)
661 {
662  core::style::Tooltip *tooltip = getStyle()->x_tooltip;
663 
664  if (tooltip)
665  tooltip->onEnter();
666 }
667 
668 void Widget::leaveNotifyImpl (EventCrossing *)
669 {
670  core::style::Tooltip *tooltip = getStyle()->x_tooltip;
671 
672  if (tooltip)
673  tooltip->onLeave();
674 }
675 
676 void Widget::removeChild (Widget *child)
677 {
678  // Should be implemented.
680 }
681 
682 } // namespace core
683 } // namespace dw
dw::core::style::Tooltip
Definition: style.hh:615
DBG_OBJ_DELETE
#define DBG_OBJ_DELETE()
Definition: debug.hh:176
dw::core::style::StyleImage::putExternalImgRenderer
void putExternalImgRenderer(ImgRenderer *ir)
Add an additional ImgRenderer, especially used for drawing.
Definition: style.hh:848
dw::core::HPosition
HPosition
Definition: types.hh:15
dw::core::Iterator::next
virtual bool next()=0
Move iterator forward and store content it.
dw::core::Allocation::y
int y
Definition: types.hh:166
dw::core::Allocation::x
int x
Definition: types.hh:165
dw::core::Extremes::maxWidth
int maxWidth
Definition: types.hh:182
dw::core::style::Style::ref
void ref()
Definition: style.hh:598
DBG_OBJ_CREATE
#define DBG_OBJ_CREATE(klass)
Definition: debug.hh:175
dw::core::Requisition
Definition: types.hh:172
lout::object
Here, some common classes (or interfaces) are defined, to standardize the access to other classes.
Definition: object.cc:29
dw::core::EventCrossing
Represents a enter or leave notify event.
Definition: events.hh:74
dw::core::EventButton
Represents a button press or release event.
Definition: events.hh:57
dw::core::Requisition::descent
int descent
Definition: types.hh:176
dw::core::Widget::layout
Layout * layout
Definition: widget.hh:159
dw::core::style::StyleAttrs::margin
Box margin
Definition: style.hh:510
dw::core::style::Color
Definition: style.hh:709
dw::core::Extremes::minWidth
int minWidth
Definition: types.hh:181
dw::core::Widget::scrollTo
void scrollTo(HPosition hpos, VPosition vpos, int x, int y, int width, int height)
Definition: widget.cc:589
dw::core::style::StyleAttrs::backgroundColor
Color * backgroundColor
Definition: style.hh:495
dw::core::Widget::getLevel
int getLevel()
Get the level of the widget within the tree.
Definition: widget.cc:499
dw::core::Iterator
Iterators are used to iterate through the contents of a widget.
Definition: iterator.hh:19
lout::misc::assertNotReached
void assertNotReached()
Definition: misc.hh:35
dw::core::style::drawBorder
void drawBorder(View *view, Layout *layout, Rectangle *area, int x, int y, int width, int height, Style *style, bool inverse)
Draw the border of a region in window, according to style.
Definition: style.cc:1104
dw::core::Rectangle::intersectsWith
bool intersectsWith(Rectangle *otherRect, Rectangle *dest)
Definition: types.cc:53
dw::core::Widget::getBgColor
style::Color * getBgColor()
Get the actual background of a widget.
Definition: widget.cc:377
dw::core::Rectangle::x
int x
Definition: types.hh:72
dw::core::Widget::parentRef
int parentRef
This value is defined by the parent widget, and used for incremential resizing.
Definition: widget.hh:143
dw::core::style::Box::right
int right
Definition: style.hh:467
dw::core::Widget::buttonSensitive
bool buttonSensitive
See dw::core::Widget::setButtonSensitive().
Definition: widget.hh:129
dw::core::Allocation
Represents the allocation, i.e. actual position and size of a dw::core::Widget.
Definition: types.hh:163
dw::core::Widget::style
style::Style * style
Definition: widget.hh:104
DBG_OBJ_ASSOC_CHILD
#define DBG_OBJ_ASSOC_CHILD(child)
Definition: debug.hh:179
dw::core::Allocation::descent
int descent
Definition: types.hh:169
dw::core::Rectangle::height
int height
Definition: types.hh:75
dw::core::EventMotion
Represents a mouse motion event.
Definition: events.hh:67
dw::core::Widget::WidgetImgRenderer
Implementation which represents the whole widget.
Definition: widget.hh:82
dw::core::Iterator::getContent
Content * getContent()
Definition: iterator.hh:36
dw::core::Requisition::ascent
int ascent
Definition: types.hh:175
lout
Definition: container.cc:26
dw::core::style::StyleAttrs::sizeDiffs
bool sizeDiffs(StyleAttrs *otherStyleAttrs)
This method returns whether something may change its size, when its style changes from this style to ...
Definition: style.cc:137
dw::core::Widget::bgColor
style::Color * bgColor
See dw::core::Widget::setBgColor().
Definition: widget.hh:124
dw::core::Requisition::width
int width
Definition: types.hh:174
dw::core::Widget::getWidgetAtPoint
virtual Widget * getWidgetAtPoint(int x, int y, int level)
Search recursively through widget.
Definition: widget.cc:552
dw::core::Widget::parent
Widget * parent
The parent widget, NULL for top-level widgets.
Definition: widget.hh:103
dw::core::style::Style::unref
void unref()
Definition: style.hh:599
dw::core::Rectangle
dw::core::Shape implemtation for simple rectangles.
Definition: types.hh:69
dw::core::Extremes
Definition: types.hh:179
dw::core::View
An interface to encapsulate platform dependent drawing.
Definition: view.hh:16
dw::core::style::Tooltip::onLeave
virtual void onLeave()
Definition: style.hh:630
dw::core::style::Box::top
int top
Definition: style.hh:467
dw::core::Content::widget
Widget * widget
Definition: types.hh:205
dw::core::style::StyleAttrs::borderWidth
Box borderWidth
Definition: style.hh:510
dw::core::Widget::Flags
Flags
Definition: widget.hh:28
dw::core::Allocation::ascent
int ascent
Definition: types.hh:168
dw::core::style::StyleAttrs::backgroundImage
StyleImage * backgroundImage
Definition: style.hh:496
_MSG
#define _MSG(...)
Definition: bookmarks.c:44
core.hh
dw::core::style::Tooltip::onEnter
virtual void onEnter()
Definition: style.hh:629
dw::core::VPosition
VPosition
Definition: types.hh:25
dw::core::style::Box::bottom
int bottom
Definition: style.hh:467
dw::core::Iterator::unref
virtual void unref()
Delete the iterator.
Definition: iterator.cc:64
dw::core::Widget
The base class of all dillo widgets.
Definition: widget.hh:23
DBG_OBJ_ASSOC_PARENT
#define DBG_OBJ_ASSOC_PARENT(parent)
Definition: debug.hh:178
MSG_WARN
#define MSG_WARN(...)
Definition: msg.h:27
dw
Dw is in this namespace, or sub namespaces of this one.
Definition: alignedtextblock.cc:26
dw::core::style::StyleImage::removeExternalImgRenderer
void removeExternalImgRenderer(ImgRenderer *ir)
Remove a previously added additional ImgRenderer.
Definition: style.hh:854
DBG_OBJ_SET_NUM
#define DBG_OBJ_SET_NUM(var, val)
Definition: debug.hh:181
dw::core::style::Box::left
int left
Definition: style.hh:467
dw::core::Rectangle::width
int width
Definition: types.hh:74
dw::core::style::Style
Definition: style.hh:571
dw::core::Rectangle::y
int y
Definition: types.hh:73
dw::core::style::drawBackground
void drawBackground(View *view, Layout *layout, Rectangle *area, int x, int y, int width, int height, int xRef, int yRef, int widthRef, int heightRef, Style *style, bool inverse, bool atTop)
Draw the background (content plus padding) of a region in window, according to style.
Definition: style.cc:1161
dw::core::Allocation::width
int width
Definition: types.hh:167