diff options
| -rw-r--r-- | FL/Enumerations.H | 34 | ||||
| -rw-r--r-- | src/fl_boxtype.cxx | 70 |
2 files changed, 52 insertions, 52 deletions
diff --git a/FL/Enumerations.H b/FL/Enumerations.H index 6761dadf4..28f8d36d8 100644 --- a/FL/Enumerations.H +++ b/FL/Enumerations.H @@ -474,7 +474,7 @@ enum Fl_When { // Fl_Widget::when(): \see src/Fl_get_system_colors.cxx */ /*@{*/ -enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C): +enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.cxx): FL_NO_BOX = 0, ///< nothing is drawn at all, this box is invisible FL_FLAT_BOX, ///< a flat box @@ -517,21 +517,21 @@ enum Fl_Boxtype { // boxtypes (if you change these you must fix fl_boxtype.C): _FL_GTK_UP_BOX, ///< gtk+ version of FL_UP_BOX _FL_GTK_DOWN_BOX, ///< gtk+ version of FL_DOWN_BOX _FL_GTK_UP_FRAME, ///< gtk+ version of FL_UP_FRAME - _FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_RAME + _FL_GTK_DOWN_FRAME, ///< gtk+ version of FL_DOWN_FRAME _FL_GTK_THIN_UP_BOX, ///< gtk+ version of FL_THIN_UP_BOX _FL_GTK_THIN_DOWN_BOX, ///< gtk+ version of FL_THIN_DOWN_BOX - _FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_UP_FRAME + _FL_GTK_THIN_UP_FRAME, ///< gtk+ version of FL_THIN_UP_FRAME _FL_GTK_THIN_DOWN_FRAME, ///< gtk+ version of FL_THIN_DOWN_FRAME _FL_GTK_ROUND_UP_BOX, ///< gtk+ version of FL_ROUND_UP_BOX _FL_GTK_ROUND_DOWN_BOX, ///< gtk+ version of FL_ROUND_DOWN_BOX - _FL_GLEAM_UP_BOX, ///< gleam version of FL_GLEAM_UP_BOX - _FL_GLEAM_DOWN_BOX, ///< gleam version of FL_GLEAM_DOWN_BOX - _FL_GLEAM_UP_FRAME, ///< gleam version of FL_GLEAM_UP_FRAME - _FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_GLEAM_DOWN_FRAME - _FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_GLEAM_THIN_UP_BOX - _FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_GLEAM_THIN_DOWN_BOX - _FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_GLEAM_ROUND_UP_BOX - _FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_GLEAM_ROUND_DOWN_BOX + _FL_GLEAM_UP_BOX, ///< gleam version of FL_UP_BOX + _FL_GLEAM_DOWN_BOX, ///< gleam version of FL_DOWN_BOX + _FL_GLEAM_UP_FRAME, ///< gleam version of FL_UP_FRAME + _FL_GLEAM_DOWN_FRAME, ///< gleam version of FL_DOWN_FRAME + _FL_GLEAM_THIN_UP_BOX, ///< gleam version of FL_THIN_UP_BOX + _FL_GLEAM_THIN_DOWN_BOX, ///< gleam version of FL_THIN_DOWN_BOX + _FL_GLEAM_ROUND_UP_BOX, ///< gleam version of FL_ROUND_UP_BOX + _FL_GLEAM_ROUND_DOWN_BOX, ///< gleam version of FL_ROUND_DOWN_BOX FL_FREE_BOXTYPE ///< the first free box type for creation of new box types }; extern FL_EXPORT Fl_Boxtype fl_define_FL_ROUND_UP_BOX(); @@ -871,19 +871,19 @@ inline Fl_Color fl_rgb_color(uchar g) { else return (Fl_Color)(((((g << 8) | g) << 8) | g) << 8); } -/** Returns a gray color value from black (i == 0) to white (i == FL_NUM_GRAY - 1). - FL_NUM_GRAY is defined to be 24 in the current FLTK release. +/** Returns a gray color value from black (i == 0) to white (i == FL_NUM_GRAY - 1). + FL_NUM_GRAY is defined to be 24 in the current FLTK release. To get the closest FLTK gray value to an 8-bit grayscale color 'I' use: - \code + \code fl_gray_ramp(I * (FL_NUM_GRAY - 1) / 255) \endcode -*/ +*/ inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);} /** Returns a color out of the color cube. - \p r must be in the range 0 to FL_NUM_RED (5) minus 1, + \p r must be in the range 0 to FL_NUM_RED (5) minus 1, \p g must be in the range 0 to FL_NUM_GREEN (8) minus 1, \p b must be in the range 0 to FL_NUM_BLUE (5) minus 1. @@ -898,7 +898,7 @@ inline Fl_Color fl_gray_ramp(int i) {return (Fl_Color)(i+FL_GRAY_RAMP);} inline Fl_Color fl_color_cube(int r, int g, int b) { return (Fl_Color)((b*FL_NUM_RED + r) * FL_NUM_GREEN + g + FL_COLOR_CUBE);} -/*@}*/ // group: Colors +/*@}*/ // group: Colors /** \name Cursors */ /*@{*/ 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); } } |
