From c975ec6dca1f1f48404d82643f2f250faee6c1bd Mon Sep 17 00:00:00 2001
From: Albrecht Schlosser Draws a focus box inside the widgets bounding box. The second
form allows you to specify a different bounding box.
-Protected Methods of Fl_Widget
The following methods are provided for subclasses to use:
-
-void Fl_Widget::damage(uchar mask)
+
void Fl_Widget::damage(uchar mask)
The first form indicates that a partial update of the object is
@@ -108,7 +108,7 @@ MyClass::draw() {
if (damage() & (FL_DAMAGE_ALL | 4)) draw_part3();
}
-
void Fl_Widget::damage(uchar mask, int x, int y, int w, int h)
uchar Fl_Widget::damage()void Fl_Widget::draw_box() const
+
void Fl_Widget::draw_box() const
The first form draws this widget's box(), using the
dimensions of the widget. The second form uses b as the box
@@ -120,7 +120,7 @@ type and c as the color for the box.
void Fl_Widget::draw_box(Fl_Boxtype b, ulong c) constvoid Fl_Widget::draw_label() const
+
void Fl_Widget::draw_label() const
@@ -135,15 +135,15 @@ feature, like a moving slider.
void Fl_Widget::draw_label(int x, int y, int w, int h) const
void Fl_Widget::draw_label(int x, int y, int w, int h, Fl_Align
align) const
The second version lets you do this test against an arbitrary string.
-Here is a sample handle() method for a widget that acts as @@ -249,12 +249,12 @@ the parts whose bits are set. FLTK will turn on the be redrawn, e.g. for an expose event.
Expose events (and the above damage(b,x,y,w,h)) will cause -draw() to be called with FLTK's +draw() to be called with FLTK's clipping turned on. You can greatly speed up redrawing in some cases by testing fl_not_clipped(x,y,w,h) or fl_clip_box(...) and skipping invisible parts.
Besides the protected methods described above, FLTK provides a large -number of basic drawing functions, which are described +number of basic drawing functions, which are described below.
This should not call redraw(), at least if only the -x() and y() change. This is because composite widgets like +x() and y() change. This is because composite widgets like Fl_Scroll may have a more efficient way of drawing the new position.
MyClass::MyClass(int x, int y, int w, int h) :
Fl_Group(x, y, w, h),
@@ -343,23 +343,23 @@ int MyClass::draw() {
Fl_Group provides some protected methods to make drawing
easier:
-