From 87160b6eb9143e044926827b82a2df021cff9c83 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Wed, 3 Dec 2025 23:33:08 +0100 Subject: Remove boxtype linke trick. By defining boxtypes with underscores, box drawing cod ethat was not used was not linked, but with the introduction of themes, all boxes are available at all times. Reducing complexity. --- src/fl_rounded_box.cxx | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'src/fl_rounded_box.cxx') diff --git a/src/fl_rounded_box.cxx b/src/fl_rounded_box.cxx index 9b64f5265..d442f41f8 100644 --- a/src/fl_rounded_box.cxx +++ b/src/fl_rounded_box.cxx @@ -1,7 +1,7 @@ // // Rounded box drawing routines for the Fast Light Tool Kit (FLTK). // -// Copyright 1998-2020 by Bill Spitzak and others. +// Copyright 1998-2025 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 @@ -37,23 +37,23 @@ static void rbox(int fill, int x, int y, int w, int h) { fl_rounded_rect(x, y, w, h, rs); } -static void fl_rflat_box(int x, int y, int w, int h, Fl_Color c) { +void fl_rflat_box(int x, int y, int w, int h, Fl_Color c) { Fl::set_box_color(c); rbox(1, x, y, w, h); rbox(0, x, y, w, h); } -static void fl_rounded_frame(int x, int y, int w, int h, Fl_Color c) { +void fl_rounded_frame(int x, int y, int w, int h, Fl_Color c) { Fl::set_box_color(c); rbox(0, x, y, w, h); } -static void fl_rounded_box(int x, int y, int w, int h, Fl_Color c) { +void fl_rounded_box(int x, int y, int w, int h, Fl_Color c) { Fl::set_box_color(c); rbox(1, x, y, w, h); fl_color(FL_BLACK); rbox(0, x, y, w, h); } -static void fl_rshadow_box(int x, int y, int w, int h, Fl_Color c) { +void fl_rshadow_box(int x, int y, int w, int h, Fl_Color c) { // draw shadow: fl_color(FL_DARK3); rbox(1, x+BW, y+BW, w, h); @@ -75,20 +75,3 @@ void fl_rounded_focus(Fl_Boxtype bt, int x, int y, int w, int h, Fl_Color fg, Fl fl_color(savecolor); } -extern void fl_internal_boxtype(Fl_Boxtype, Fl_Box_Draw_F*, Fl_Box_Draw_Focus_F* =NULL); - -Fl_Boxtype fl_define_FL_ROUNDED_BOX() { - fl_internal_boxtype(_FL_ROUNDED_FRAME, fl_rounded_frame, fl_rounded_focus); - fl_internal_boxtype(_FL_ROUNDED_BOX, fl_rounded_box, fl_rounded_focus); - return _FL_ROUNDED_BOX; -} - -Fl_Boxtype fl_define_FL_RFLAT_BOX() { - fl_internal_boxtype(_FL_RFLAT_BOX, fl_rflat_box, fl_rounded_focus); - return _FL_RFLAT_BOX; -} - -Fl_Boxtype fl_define_FL_RSHADOW_BOX() { - fl_internal_boxtype(_FL_RSHADOW_BOX, fl_rshadow_box, fl_rounded_focus); - return _FL_RSHADOW_BOX; -} -- cgit v1.2.3