From e4d8b941025fcdd232e748227634529f752381b7 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Sun, 7 Nov 2021 00:20:44 +0100 Subject: Add fl_draw_check() to draw better check marks (issue #68) This new function can and should be used to draw check marks in widgets that need it, e.g. Fl_Check_Browser (issue #68) and Fl_Check_Button. --- FL/fl_draw.H | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'FL') diff --git a/FL/fl_draw.H b/FL/fl_draw.H index 9e2e4b3dd..3d3a54400 100644 --- a/FL/fl_draw.H +++ b/FL/fl_draw.H @@ -1,7 +1,7 @@ // // Portable drawing function header file for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2020 by Bill Spitzak and others. +// Copyright 1998-2021 by Bill Spitzak and others. // // This library is free software. Distribution and use rights are outlined in // the file "COPYING" which should have been included with this file. If this @@ -22,8 +22,9 @@ #ifndef fl_draw_H #define fl_draw_H -#include // for the color names -#include // for fl_graphics_driver + Fl_Region +#include // color names +#include // fl_graphics_driver + Fl_Region +#include // Image class... class Fl_Image; @@ -749,10 +750,16 @@ FL_EXPORT void fl_draw(const char* str, int x, int y, int w, int h, Fl_Image* img=0, int draw_symbols = 1); // boxtypes: + FL_EXPORT void fl_frame(const char* s, int x, int y, int w, int h); FL_EXPORT void fl_frame2(const char* s, int x, int y, int w, int h); FL_EXPORT void fl_draw_box(Fl_Boxtype, int x, int y, int w, int h, Fl_Color); +// basic GUI objects (check marks, arrows, more to come ...): + +// Draw a check mark in the given color inside the bounding box bb. +void fl_draw_check(Fl_Rect bb, Fl_Color col); + // images: /** -- cgit v1.2.3