| 93 | } |
| 94 | |
| 95 | void FltkViewBase::draw () |
| 96 | { |
| 97 | int d = damage (); |
| 98 | |
| 99 | if ((d & FL_DAMAGE_USER1) && !(d & FL_DAMAGE_EXPOSE)) { |
| 100 | lout::container::typed::Iterator <core::Rectangle> it; |
| 101 | |
| 102 | for (it = drawRegion.rectangles (); it.hasNext (); ) { |
| 103 | draw (it.getNext (), DRAW_BUFFERED); |
| 104 | } |
| 105 | |
| 106 | drawRegion.clear (); |
| 107 | d &= ~FL_DAMAGE_USER1; |
| 108 | } |
| 109 | |
| 110 | if (d & FL_DAMAGE_CHILD) { |
| 111 | drawChildWidgets (); |
| 112 | d &= ~FL_DAMAGE_CHILD; |
| 113 | } |
| 114 | |
| 115 | if (d) { |
| 116 | dw::core::Rectangle rect ( |
| 117 | translateViewXToCanvasX (x ()), |
| 118 | translateViewYToCanvasY (y ()), |
| 119 | w (), |
| 120 | h ()); |
| 121 | |
| 122 | if (d == FL_DAMAGE_SCROLL) { |
| 123 | // a clipping rectangle has already been set by fltk::scrollrect () |
| 124 | draw (&rect, DRAW_PLAIN); |
| 125 | } else { |
| 126 | draw (&rect, DRAW_CLIPPED); |
| 127 | drawRegion.clear (); |
| 128 | } |
| 129 | } |
| 130 | } |
| 131 | |
| 132 | void FltkViewBase::draw (const core::Rectangle *rect, |
| 133 | DrawType type) |