diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/fl_boxtype.cxx | 70 |
1 files changed, 35 insertions, 35 deletions
diff --git a/src/fl_boxtype.cxx b/src/fl_boxtype.cxx index 671e24f7d..827964aa1 100644 --- a/src/fl_boxtype.cxx +++ b/src/fl_boxtype.cxx @@ -49,7 +49,7 @@ static const uchar inactive_ramp[24] = { static int draw_it_active = 1; /** - Determines if the current draw box is active or inactive. + Determines if the current draw box is active or inactive. If inactive, the box color is changed by the inactive color. */ int Fl::draw_box_active() { return draw_it_active; } @@ -245,7 +245,7 @@ static struct { int set; } fl_box_table[256] = { // must match list in Enumerations.H!!! - {fl_no_box, 0,0,0,0,1}, + {fl_no_box, 0,0,0,0,1}, {fl_rectf, 0,0,0,0,1}, // FL_FLAT_BOX {fl_up_box, D1,D1,D2,D2,1}, {fl_down_box, D1,D1,D2,D2,1}, @@ -260,39 +260,39 @@ static struct { {fl_engraved_frame, 2,2,4,4,1}, {fl_embossed_frame, 2,2,4,4,1}, {fl_border_box, 1,1,2,2,1}, - {fl_border_box, 1,1,5,5,0}, // _FL_SHADOW_BOX, + {fl_border_box, 1,1,5,5,0}, // _FL_SHADOW_BOX {fl_border_frame, 1,1,2,2,1}, - {fl_border_frame, 1,1,5,5,0}, // _FL_SHADOW_FRAME, - {fl_border_box, 1,1,2,2,0}, // _FL_ROUNDED_BOX, - {fl_border_box, 1,1,2,2,0}, // _FL_RSHADOW_BOX, + {fl_border_frame, 1,1,5,5,0}, // _FL_SHADOW_FRAME + {fl_border_box, 1,1,2,2,0}, // _FL_ROUNDED_BOX + {fl_border_box, 1,1,2,2,0}, // _FL_RSHADOW_BOX {fl_border_frame, 1,1,2,2,0}, // _FL_ROUNDED_FRAME - {fl_rectf, 0,0,0,0,0}, // _FL_RFLAT_BOX, + {fl_rectf, 0,0,0,0,0}, // _FL_RFLAT_BOX {fl_up_box, 3,3,6,6,0}, // _FL_ROUND_UP_BOX - {fl_down_box, 3,3,6,6,0}, // _FL_ROUND_DOWN_BOX, + {fl_down_box, 3,3,6,6,0}, // _FL_ROUND_DOWN_BOX {fl_up_box, 0,0,0,0,0}, // _FL_DIAMOND_UP_BOX {fl_down_box, 0,0,0,0,0}, // _FL_DIAMOND_DOWN_BOX - {fl_border_box, 1,1,2,2,0}, // _FL_OVAL_BOX, - {fl_border_box, 1,1,2,2,0}, // _FL_OVAL_SHADOW_BOX, + {fl_border_box, 1,1,2,2,0}, // _FL_OVAL_BOX + {fl_border_box, 1,1,2,2,0}, // _FL_OVAL_SHADOW_BOX {fl_border_frame, 1,1,2,2,0}, // _FL_OVAL_FRAME - {fl_rectf, 0,0,0,0,0}, // _FL_OVAL_FLAT_BOX, - {fl_up_box, 4,4,8,8,0}, // _FL_PLASTIC_UP_BOX, - {fl_down_box, 2,2,4,4,0}, // _FL_PLASTIC_DOWN_BOX, - {fl_up_frame, 2,2,4,4,0}, // _FL_PLASTIC_UP_FRAME, - {fl_down_frame, 2,2,4,4,0}, // _FL_PLASTIC_DOWN_FRAME, - {fl_up_box, 2,2,4,4,0}, // _FL_PLASTIC_THIN_UP_BOX, - {fl_down_box, 2,2,4,4,0}, // _FL_PLASTIC_THIN_DOWN_BOX, - {fl_up_box, 2,2,4,4,0}, // _FL_PLASTIC_ROUND_UP_BOX, - {fl_down_box, 2,2,4,4,0}, // _FL_PLASTIC_ROUND_DOWN_BOX, - {fl_up_box, 2,2,4,4,0}, // _FL_GTK_UP_BOX, - {fl_down_box, 2,2,4,4,0}, // _FL_GTK_DOWN_BOX, - {fl_up_frame, 2,2,4,4,0}, // _FL_GTK_UP_FRAME, - {fl_down_frame, 2,2,4,4,0}, // _FL_GTK_DOWN_FRAME, - {fl_up_frame, 1,1,2,2,0}, // _FL_GTK_THIN_UP_FRAME, - {fl_down_frame, 1,1,2,2,0}, // _FL_GTK_THIN_DOWN_FRAME, - {fl_up_box, 1,1,2,2,0}, // _FL_GTK_THIN_ROUND_UP_BOX, - {fl_down_box, 1,1,2,2,0}, // _FL_GTK_THIN_ROUND_DOWN_BOX, - {fl_up_box, 2,2,4,4,0}, // _FL_GTK_ROUND_UP_BOX, - {fl_down_box, 2,2,4,4,0}, // _FL_GTK_ROUND_DOWN_BOX, + {fl_rectf, 0,0,0,0,0}, // _FL_OVAL_FLAT_BOX + {fl_up_box, 4,4,8,8,0}, // _FL_PLASTIC_UP_BOX + {fl_down_box, 2,2,4,4,0}, // _FL_PLASTIC_DOWN_BOX + {fl_up_frame, 2,2,4,4,0}, // _FL_PLASTIC_UP_FRAME + {fl_down_frame, 2,2,4,4,0}, // _FL_PLASTIC_DOWN_FRAME + {fl_up_box, 2,2,4,4,0}, // _FL_PLASTIC_THIN_UP_BOX + {fl_down_box, 2,2,4,4,0}, // _FL_PLASTIC_THIN_DOWN_BOX + {fl_up_box, 2,2,4,4,0}, // _FL_PLASTIC_ROUND_UP_BOX + {fl_down_box, 2,2,4,4,0}, // _FL_PLASTIC_ROUND_DOWN_BOX + {fl_up_box, 2,2,4,4,0}, // _FL_GTK_UP_BOX + {fl_down_box, 2,2,4,4,0}, // _FL_GTK_DOWN_BOX + {fl_up_frame, 2,2,4,4,0}, // _FL_GTK_UP_FRAME + {fl_down_frame, 2,2,4,4,0}, // _FL_GTK_DOWN_FRAME + {fl_up_frame, 1,1,2,2,0}, // _FL_GTK_THIN_UP_FRAME + {fl_down_frame, 1,1,2,2,0}, // _FL_GTK_THIN_DOWN_FRAME + {fl_up_box, 1,1,2,2,0}, // _FL_GTK_THIN_ROUND_UP_BOX + {fl_down_box, 1,1,2,2,0}, // _FL_GTK_THIN_ROUND_DOWN_BOX + {fl_up_box, 2,2,4,4,0}, // _FL_GTK_ROUND_UP_BOX + {fl_down_box, 2,2,4,4,0}, // _FL_GTK_ROUND_DOWN_BOX {fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+0 {fl_down_box, 3,3,6,6,0}, // FL_FREE_BOX+1 {fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+2 @@ -300,7 +300,7 @@ static struct { {fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+4 {fl_down_box, 3,3,6,6,0}, // FL_FREE_BOX+5 {fl_up_box, 3,3,6,6,0}, // FL_FREE_BOX+6 - {fl_down_box, 3,3,6,6,0}, // FL_FREE_BOX+7 + {fl_down_box, 3,3,6,6,0} // FL_FREE_BOX+7 }; /** @@ -317,8 +317,8 @@ int Fl::box_dx(Fl_Boxtype t) {return fl_box_table[t].dx;} prevent overdrawing the borders. For instance, in the case of a boxtype like FL_DOWN_BOX - where the border width might be 2 pixels all around, the above - functions would return 2, 2, 4, and 4 for box_dx, + where the border width might be 2 pixels all around, the above + functions would return 2, 2, 4, and 4 for box_dx, box_dy, box_dw, and box_dh respectively. An example to compute the area inside a widget's box(): @@ -328,8 +328,8 @@ int Fl::box_dx(Fl_Boxtype t) {return fl_box_table[t].dx;} int W = yourwidget->w() - Fl::box_dw(yourwidget->box()); int H = yourwidget->h() - Fl::box_dh(yourwidget->box()); \endcode - These functions are mainly useful in the draw() code - for deriving custom widgets, where one wants to avoid drawing + These functions are mainly useful in the draw() code + for deriving custom widgets, where one wants to avoid drawing over the widget's own border box(). */ int Fl::box_dy(Fl_Boxtype t) {return fl_box_table[t].dy;} @@ -400,7 +400,7 @@ void Fl_Widget::draw_backdrop() const { // if there is no image, we will not draw the deimage either if (img && deimage() && !active_r()) img = deimage(); - if (img) + if (img) ((Fl_Image*)img)->draw(x_+(w_-img->w())/2, y_+(h_-img->h())/2); } } |
