diff options
Diffstat (limited to 'dw')
-rw-r--r-- | dw/bullet.cc | 5 | ||||
-rw-r--r-- | dw/bullet.hh | 3 | ||||
-rw-r--r-- | dw/image.cc | 5 | ||||
-rw-r--r-- | dw/image.hh | 5 | ||||
-rw-r--r-- | dw/ruler.cc | 4 | ||||
-rw-r--r-- | dw/ruler.hh | 3 | ||||
-rw-r--r-- | dw/widget.cc | 16 | ||||
-rw-r--r-- | dw/widget.hh | 5 |
8 files changed, 20 insertions, 26 deletions
diff --git a/dw/bullet.cc b/dw/bullet.cc index acaf81cc..579de2c7 100644 --- a/dw/bullet.cc +++ b/dw/bullet.cc @@ -57,7 +57,8 @@ void Bullet::containerSizeChangedForChildren () DBG_OBJ_LEAVE (); } -void Bullet::draw (core::View *view, core::Rectangle *area) +core::Widget *Bullet::draw (core::View *view, core::Rectangle *area, + core::StackingIteratorStack *iteratorStack) { int x, y, l; bool filled = true; @@ -80,6 +81,8 @@ void Bullet::draw (core::View *view, core::Rectangle *area) view->drawArc (getStyle()->color, core::style::Color::SHADING_NORMAL, filled, x + l/2, y + l/2, l, l, 0, 360); } + + return NULL; } core::Iterator *Bullet::iterator (core::Content::Type mask, bool atEnd) diff --git a/dw/bullet.hh b/dw/bullet.hh index 004187cd..aa83ba3a 100644 --- a/dw/bullet.hh +++ b/dw/bullet.hh @@ -17,7 +17,8 @@ protected: void sizeRequestImpl (core::Requisition *requisition); void getExtremesImpl (core::Extremes *extremes); void containerSizeChangedForChildren (); - void draw (core::View *view, core::Rectangle *area); + Widget *draw (core::View *view, core::Rectangle *area, + core::StackingIteratorStack *iteratorStack); core::Iterator *iterator (core::Content::Type mask, bool atEnd); public: diff --git a/dw/image.cc b/dw/image.cc index 8a4be32f..881eb687 100644 --- a/dw/image.cc +++ b/dw/image.cc @@ -404,7 +404,8 @@ bool Image::buttonReleaseImpl (core::EventButton *event) return false; } -void Image::draw (core::View *view, core::Rectangle *area) +core::Widget *Image::draw (core::View *view, core::Rectangle *area, + core::StackingIteratorStack *iteratorStack) { int dx, dy; core::Rectangle content, intersection; @@ -468,6 +469,8 @@ void Image::draw (core::View *view, core::Rectangle *area) } /** TODO: draw selection */ + + return NULL; } core::Iterator *Image::iterator (core::Content::Type mask, bool atEnd) diff --git a/dw/image.hh b/dw/image.hh index 9adf7806..6032a83b 100644 --- a/dw/image.hh +++ b/dw/image.hh @@ -134,8 +134,9 @@ protected: void getExtremesImpl (core::Extremes *extremes); void sizeAllocateImpl (core::Allocation *allocation); void containerSizeChangedForChildren (); - - void draw (core::View *view, core::Rectangle *area); + + Widget *draw (core::View *view, core::Rectangle *area, + core::StackingIteratorStack *iteratorStack); bool buttonPressImpl (core::EventButton *event); bool buttonReleaseImpl (core::EventButton *event); diff --git a/dw/ruler.cc b/dw/ruler.cc index fc2c5bca..b8a7deb5 100644 --- a/dw/ruler.cc +++ b/dw/ruler.cc @@ -62,9 +62,11 @@ bool Ruler::usesAvailWidth () return true; } -void Ruler::draw (core::View *view, core::Rectangle *area) +core::Widget *Ruler::draw (core::View *view, core::Rectangle *area, + core::StackingIteratorStack *iteratorStack) { drawWidgetBox (view, area, false); + return NULL; } core::Iterator *Ruler::iterator (core::Content::Type mask, bool atEnd) diff --git a/dw/ruler.hh b/dw/ruler.hh index 1f3491bc..f0f98465 100644 --- a/dw/ruler.hh +++ b/dw/ruler.hh @@ -20,7 +20,8 @@ protected: void getExtremesImpl (core::Extremes *extremes); void containerSizeChangedForChildren (); bool usesAvailWidth (); - void draw (core::View *view, core::Rectangle *area); + Widget *draw (core::View *view, core::Rectangle *area, + core::StackingIteratorStack *iteratorStack); public: Ruler (); diff --git a/dw/widget.cc b/dw/widget.cc index e312ee6f..607b157d 100644 --- a/dw/widget.cc +++ b/dw/widget.cc @@ -179,22 +179,6 @@ bool Widget::intersects (Rectangle *area, Rectangle *intersection) return r; } -/** Area is given in widget coordinates. */ -void Widget::draw (View *view, Rectangle *area) -{ - DBG_OBJ_MSG ("draw", 0, "<b>Widget::draw not implemented</b>"); - misc::assertNotReached (); -} - -/** Area is given in widget coordinates. */ -Widget *Widget::draw (View *view, Rectangle *area, - StackingIteratorStack *iteratorStack) -{ - // Suitable for widgets without children. - draw (view, area); - return NULL; -} - Widget *Widget::drawTotal (View *view, Rectangle *area, StackingIteratorStack *iteratorStack) { diff --git a/dw/widget.hh b/dw/widget.hh index a4a84cac..8cd05e13 100644 --- a/dw/widget.hh +++ b/dw/widget.hh @@ -277,8 +277,6 @@ protected: inline void queueResize (int ref, bool extremesChanged) { queueResize (ref, extremesChanged, false); } - virtual void draw (View *view, Rectangle *area); - /** * \brief See \ref dw-widget-sizes. */ @@ -470,8 +468,9 @@ public: bool intersects (Rectangle *area, Rectangle *intersection); + /** Area is given in widget coordinates. */ virtual Widget *draw (View *view, Rectangle *area, - StackingIteratorStack *iteratorStack); + StackingIteratorStack *iteratorStack) = 0; Widget *drawTotal (View *view, Rectangle *area, StackingIteratorStack *iteratorStack); void drawToplevel (View *view, Rectangle *area); |