fltk
1.3.5-source
About: FLTK (Fast Light Tool Kit) is a cross-platform C++ GUI toolkit for UNIX/Linux (X11), Microsoft Windows, and MacOS X.
![]() ![]() |
drawing code for common box types. More...
Go to the source code of this file.
Macros | |
#define | D1 BORDER_WIDTH |
#define | D2 (BORDER_WIDTH+BORDER_WIDTH) |
#define | fl_border_box fl_rectbound |
Functions | |
const uchar * | fl_gray_ramp () |
void | fl_frame (const char *s, int x, int y, int w, int h) |
void | fl_frame2 (const char *s, int x, int y, int w, int h) |
void | fl_no_box (int, int, int, int, Fl_Color) |
void | fl_flat_box (int x, int y, int w, int h, Fl_Color c) |
void | fl_thin_down_frame (int x, int y, int w, int h, Fl_Color) |
void | fl_thin_down_box (int x, int y, int w, int h, Fl_Color c) |
void | fl_thin_up_frame (int x, int y, int w, int h, Fl_Color) |
void | fl_thin_up_box (int x, int y, int w, int h, Fl_Color c) |
void | fl_up_frame (int x, int y, int w, int h, Fl_Color) |
void | fl_up_box (int x, int y, int w, int h, Fl_Color c) |
void | fl_down_frame (int x, int y, int w, int h, Fl_Color) |
void | fl_down_box (int x, int y, int w, int h, Fl_Color c) |
void | fl_engraved_frame (int x, int y, int w, int h, Fl_Color) |
void | fl_engraved_box (int x, int y, int w, int h, Fl_Color c) |
void | fl_embossed_frame (int x, int y, int w, int h, Fl_Color) |
void | fl_embossed_box (int x, int y, int w, int h, Fl_Color c) |
void | fl_rectbound (int x, int y, int w, int h, Fl_Color bgcolor) |
void | fl_border_frame (int x, int y, int w, int h, Fl_Color c) |
void | fl_internal_boxtype (Fl_Boxtype t, Fl_Box_Draw_F *f) |
void | fl_draw_box (Fl_Boxtype t, int x, int y, int w, int h, Fl_Color c) |
Variables | |
static const uchar | active_ramp [24] |
static const uchar | inactive_ramp [24] |
static int | draw_it_active = 1 |
struct { | |
Fl_Box_Draw_F * f | |
uchar dx | |
uchar dy | |
uchar dw | |
uchar dh | |
int set | |
} | fl_box_table [256] |
drawing code for common box types.
Definition in file fl_boxtype.cxx.
#define D1 BORDER_WIDTH |
Definition at line 208 of file fl_boxtype.cxx.
#define D2 (BORDER_WIDTH+BORDER_WIDTH) |
Definition at line 209 of file fl_boxtype.cxx.
#define fl_border_box fl_rectbound |
allow consistent naming
Definition at line 272 of file fl_boxtype.cxx.
void fl_border_frame | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a frame of type FL_BORDER_FRAME.
Definition at line 277 of file fl_boxtype.cxx.
void fl_down_box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a box of type FL_DOWN_BOX
Definition at line 232 of file fl_boxtype.cxx.
References D1, D2, fl_down_frame(), fl_rectf(), Fl::set_box_color(), x, and y.
Referenced by Fl::reload_scheme().
void fl_down_frame | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | |||
) |
Draws a frame of type FL_DOWN_FRAME
Definition at line 219 of file fl_boxtype.cxx.
References fl_frame(), fl_frame2(), x, and y.
Referenced by fl_down_box(), and Fl::reload_scheme().
void fl_embossed_box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a box of type FL_EMBOSSED_BOX
Definition at line 256 of file fl_boxtype.cxx.
References fl_embossed_frame(), fl_rectf(), Fl::set_box_color(), x, and y.
void fl_embossed_frame | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | |||
) |
Draws a frame of type FL_EMBOSSED_FRAME
Definition at line 251 of file fl_boxtype.cxx.
References fl_frame(), x, and y.
Referenced by fl_embossed_box().
void fl_engraved_box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a box of type FL_ENGRAVED_BOX
Definition at line 244 of file fl_boxtype.cxx.
References fl_engraved_frame(), fl_rectf(), Fl::set_box_color(), x, and y.
void fl_engraved_frame | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | |||
) |
Draws a frame of type FL_ENGRAVED_FRAME
Definition at line 239 of file fl_boxtype.cxx.
References fl_frame(), x, and y.
Referenced by fl_engraved_box().
void fl_flat_box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a box of type FL_FLAT_BOX
Definition at line 167 of file fl_boxtype.cxx.
References Fl::box_color(), fl_rectf(), x, and y.
Definition at line 60 of file fl_boxtype.cxx.
References active_ramp, draw_it_active, and inactive_ramp.
Referenced by fl_diamond_down_box(), fl_diamond_up_box(), fl_frame(), fl_frame2(), fl_round_down_box(), fl_round_up_box(), frame_rect(), frame_round(), narrow_thin_box(), shade_rect(), and shade_round().
void fl_internal_boxtype | ( | Fl_Boxtype | t, |
Fl_Box_Draw_F * | f | ||
) |
Sets the drawing function for a given box type.
[in] | t | box type |
[in] | f | box drawing function |
Definition at line 404 of file fl_boxtype.cxx.
References f, fl_box_table, and set.
Referenced by fl_define_FL_DIAMOND_BOX(), fl_define_FL_GLEAM_UP_BOX(), fl_define_FL_GTK_UP_BOX(), fl_define_FL_OVAL_BOX(), fl_define_FL_PLASTIC_UP_BOX(), fl_define_FL_RFLAT_BOX(), fl_define_FL_ROUND_UP_BOX(), fl_define_FL_ROUNDED_BOX(), fl_define_FL_RSHADOW_BOX(), and fl_define_FL_SHADOW_BOX().
void fl_no_box | ( | int | , |
int | , | ||
int | , | ||
int | , | ||
Fl_Color | |||
) |
Draws a box of type FL_NO_BOX
Definition at line 164 of file fl_boxtype.cxx.
void fl_rectbound | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | bgcolor | ||
) |
Draws a bounded rectangle with a given position, size and color. Equivalent to drawing a box of type FL_BORDER_BOX.
Definition at line 266 of file fl_boxtype.cxx.
References FL_BLACK, fl_rect(), fl_rectf(), Fl::set_box_color(), x, and y.
Referenced by draw_barchart(), and draw_horbarchart().
void fl_thin_down_box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a box of type FL_THIN_DOWN_BOX
Definition at line 177 of file fl_boxtype.cxx.
References fl_rectf(), fl_thin_down_frame(), Fl::set_box_color(), x, and y.
Referenced by Fl::reload_scheme().
void fl_thin_down_frame | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | |||
) |
Draws a frame of type FL_THIN_DOWN_FRAME
Definition at line 172 of file fl_boxtype.cxx.
References fl_frame2(), x, and y.
Referenced by fl_thin_down_box(), and Fl::reload_scheme().
void fl_thin_up_box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a box of type FL_THIN_UP_BOX
Definition at line 189 of file fl_boxtype.cxx.
References fl_rectf(), fl_thin_up_frame(), Fl::set_box_color(), x, and y.
Referenced by Fl::reload_scheme().
void fl_thin_up_frame | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | |||
) |
Draws a frame of type FL_THIN_UP_FRAME
Definition at line 184 of file fl_boxtype.cxx.
References fl_frame2(), x, and y.
Referenced by fl_thin_up_box(), and Fl::reload_scheme().
void fl_up_box | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | c | ||
) |
Draws a box of type FL_UP_BOX
Definition at line 212 of file fl_boxtype.cxx.
References D1, D2, fl_rectf(), fl_up_frame(), Fl::set_box_color(), x, and y.
Referenced by Fl::reload_scheme().
void fl_up_frame | ( | int | x, |
int | y, | ||
int | w, | ||
int | h, | ||
Fl_Color | |||
) |
Draws a frame of type FL_UP_FRAME
Definition at line 196 of file fl_boxtype.cxx.
References fl_frame(), fl_frame2(), x, and y.
Referenced by fl_up_box(), and Fl::reload_scheme().
uchar dh |
Definition at line 286 of file fl_boxtype.cxx.
Referenced by Fl_RGB_Image::copy(), Fl_Tabs::draw_tab(), Fl_Help_View::format(), Fl_Browser::icon(), Fl_Tile::resize(), Fl_Group::resize(), Fl_Scroll::resize(), and Fl_Window::size_range().
|
static |
Definition at line 49 of file fl_boxtype.cxx.
Referenced by Fl::box_color(), Fl_Widget::draw_box(), Fl::draw_box_active(), and fl_gray_ramp().
uchar dw |
Definition at line 286 of file fl_boxtype.cxx.
Referenced by Fl_Help_View::format(), Fl_Tile::resize(), Fl_Group::resize(), Fl_Scroll::resize(), and Fl_Window::size_range().
uchar dx |
Definition at line 286 of file fl_boxtype.cxx.
Referenced by Fl_Bitmap::copy(), Fl_Pixmap::copy(), Fl_RGB_Image::copy(), Fl_Return_Button::draw(), Fl_Light_Button::draw(), Fl_Adjuster::draw(), Fl_Choice::draw(), Fl_Window::draw(), draw_h_arrow(), fake_X_wm_style(), fl_scroll(), fl_text_extents(), Fl_Help_View::format(), innards(), on_printer_extents_update(), Fl_Menu_Item::pulldown(), read_win_rectangle(), Fl_Tile::resize(), Fl_Group::resize(), Fl_Scroll::resize(), Fl_Scroll::scroll_to(), send_event(), Fl_PostScript_Graphics_Driver::text_extents(), Fl_Graphics_Driver::text_extents(), Fl_Xlib_Graphics_Driver::text_extents(), and Fl_translated_Xlib_Graphics_Driver_::translate_all().
uchar dy |
Definition at line 286 of file fl_boxtype.cxx.
Referenced by Fl_Bitmap::copy(), Fl_Pixmap::copy(), Fl_RGB_Image::copy(), Fl_Light_Button::draw(), Fl_Adjuster::draw(), Fl_Choice::draw(), Fl_Window::draw(), Fl_Browser_::draw(), Fl_Tabs::draw_tab(), draw_v_arrow(), fake_X_wm_style(), fl_scroll(), fl_text_extents(), Fl_Help_View::format(), innards(), menuwindow::menuwindow(), on_printer_extents_update(), Fl_Menu_Item::pulldown(), read_win_rectangle(), Fl_Tile::resize(), Fl_Group::resize(), Fl_Scroll::resize(), Fl_Scroll::scroll_to(), send_event(), Fl_PostScript_Graphics_Driver::text_extents(), Fl_Graphics_Driver::text_extents(), Fl_Xlib_Graphics_Driver::text_extents(), and Fl_translated_Xlib_Graphics_Driver_::translate_all().
Definition at line 285 of file fl_boxtype.cxx.
Referenced by Fl_Shared_Image::add_handler(), Fl_Text_Editor::add_key_binding(), Fl_Graphics_Driver::arc(), cb(), Fl_Graphics_Driver::circle(), Fl_Text_Display::clear_rect(), Fl_Pixmap::color_average(), Fl_RGB_Image::color_average(), Fl_RGB_Image::copy(), Fl_Text_Editor::default_key_function(), Fl_Tooltip::delay(), delete_all(), delete_children(), down_box(), down_frame(), Fl_Light_Button::draw(), CodeViewer::draw(), draw(), Fl_Window::draw(), Fl_Menu_Item::draw(), draw_fileprint(), draw_filesaveas(), Fl_Text_Display::draw_string(), menuwindow::drawentry(), Fl_Input_::drawtext(), earlier_cb(), Fl_Graphics_Driver::end_points(), Fl_Native_File_Chooser::filter(), Fl_File_Chooser::filter_value(), Fluid_Image::find(), find(), fl_access(), fl_add_object(), fl_addto_form(), fl_chmod(), fl_darker(), fl_draw_box(), Fl_Font_Descriptor::Fl_Font_Descriptor(), fl_fopen(), fl_form_is_visible(), fl_free_fonts(), fl_hide_form(), fl_inactive(), fl_internal_boxtype(), fl_lighter(), fl_load_browser(), fl_message_font(), fl_mkdir(), fl_open(), fl_pop_form(), Fl_Progress::Fl_Progress(), fl_raise_form(), fl_redraw_form(), fl_rename(), fl_rmdir(), fl_scale_form(), fl_set_form_callback(), fl_set_form_geometry(), fl_set_form_position(), fl_set_form_size(), fl_set_form_title(), fl_show_form(), fl_stat(), fl_title_form(), fl_unlink(), fl_wait(), Fl_XBM_Image::Fl_XBM_Image(), fl_xft_font(), Fl_XPM_Image::Fl_XPM_Image(), Fl_PostScript_Graphics_Driver::font(), Fl_Xlib_Graphics_Driver::font(), Fl_Spinner::format(), gen_bitlen(), Fl_Help_Font_Style::get(), Fl::get_font_name(), glutDisplayFunc(), glutEntryFunc(), glutKeyboardFunc(), glutMenuStateFunc(), glutMenuStatusFunc(), glutMotionFunc(), glutMouseFunc(), glutOverlayDisplayFunc(), glutPassiveMotionFunc(), glutReshapeFunc(), glutSpecialFunc(), glutTimerFunc(), glutVisibilityFunc(), gtk_down_frame(), gtk_round_down_box(), gtk_round_up_box(), gtk_thin_down_frame(), gtk_thin_up_box(), gtk_thin_up_frame(), gtk_up_box(), Fl_Text_Editor::handle_key(), Fl_Input_::handle_mouse(), Fl_Tooltip::hoverdelay(), Fl_Color_Chooser::hsv2rgb(), Fl_Help_View::hv_draw(), Fl_Image::inactive(), Fl_Help_Font_Stack::init(), Fl_Help_View::initfont(), Fl_Widget::labelfont(), later_cb(), Fl_Graphics_Driver::line(), Fl_Browser::lineno(), Fl_Help_Dialog::load(), Fl_File_Icon::load(), Fl_Help_View::load(), Fl_File_Icon::load_fti(), main(), Fl_Label::measure(), open_read(), open_write(), Fl_GTK_File_Chooser::pair::pair(), Fl_Graphics_Driver::pie(), png_colormap_compose(), Fl_Help_Font_Stack::pop(), Fl_Help_View::popfont(), Fl_Image_Surface::prepare_(), Fl_Native_File_Chooser::preset_file(), Fl_Help_Font_Stack::push(), Fl_Help_View::pushfont(), put_font_size(), Fl_Preferences::RootNode::read(), Fl_Widget_Type::read_property(), Fl_Graphics_Driver::rect(), Fl_Shared_Image::remove_handler(), Fl_Help_Font_Style::set(), Fl::set_abort(), Fl::set_atclose(), Fl::set_boxtype(), Fl::set_font(), Fl::set_labeltype(), shade_color(), show_help(), sort(), Fl_Free::step(), Fl_File_Chooser::textfont(), Fl_Spinner::textfont(), Fl_Input_Choice::textfont(), Fl_Help_View::textfont(), Fl_Browser_Type::textstuff(), Fl_Check_Browser_Type::textstuff(), Fl_File_Browser_Type::textstuff(), Fl_Counter_Type::textstuff(), Fl_Spinner_Type::textstuff(), Fl_Input_Type::textstuff(), Fl_File_Input_Type::textstuff(), Fl_Text_Display_Type::textstuff(), Fl_Text_Editor_Type::textstuff(), Fl_Menu_Type::textstuff(), Fl_Input_Choice_Type::textstuff(), Fl_Value_Input_Type::textstuff(), Fl_Value_Output_Type::textstuff(), Fl_Value_Slider_Type::textstuff(), thin_down_box(), thin_up_box(), Fl_Help_Font_Stack::top(), up_box(), Fl_Input_::up_down_position(), up_frame(), Fl_Help_Dialog::value(), Fl_File_Chooser::value(), widget_size_cb(), Fl_Preferences::Node::write(), Fl_Preferences::RootNode::write(), write_code(), Fl_Data_Type::write_code1(), Fl_Widget_Type::write_properties(), Fluid_Image::write_static(), Fl_Widget_Type::write_widget_code(), Fl_Graphics_Driver::xyline(), and Fl_Graphics_Driver::yxline().
struct { ... } fl_box_table[256] |
Referenced by Fl::box_dh(), Fl::box_dw(), Fl::box_dx(), Fl::box_dy(), Fl_Widget::draw_box(), fl_draw_box(), fl_internal_boxtype(), Fl::get_boxtype(), and Fl::set_boxtype().
Definition at line 42 of file fl_boxtype.cxx.
Referenced by fl_gray_ramp().
int set |
Definition at line 287 of file fl_boxtype.cxx.
Referenced by Fl_Help_Font_Style::Fl_Help_Font_Style(), fl_internal_boxtype(), run_program(), and Fl_File_Chooser::update_preview().