summaryrefslogtreecommitdiff
path: root/src/Fl_Value_Slider.cxx
diff options
context:
space:
mode:
authorMatthias Melcher <github@matthiasm.com>2026-01-04 15:50:49 +0100
committerMatthias Melcher <github@matthiasm.com>2026-01-04 15:50:56 +0100
commit0e570fb6729ff6b97249256c2c9d5f3aa58c7bb4 (patch)
tree7140e3b2d97c6f7852e915759918d14bf6b35b00 /src/Fl_Value_Slider.cxx
parent357336bd40d868fd65e95c61d1adaf9de0fb7811 (diff)
Add C++11 Fl_Valuator::format API.
This is helpful for writing language wrapper, in this particular case for PyFLTK.
Diffstat (limited to 'src/Fl_Value_Slider.cxx')
-rw-r--r--src/Fl_Value_Slider.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Fl_Value_Slider.cxx b/src/Fl_Value_Slider.cxx
index 918d07742..776632751 100644
--- a/src/Fl_Value_Slider.cxx
+++ b/src/Fl_Value_Slider.cxx
@@ -1,7 +1,7 @@
//
// Value Slider widget for the Fast Light Tool Kit (FLTK).
//
-// Copyright 1998-2022 by Bill Spitzak and others.
+// Copyright 1998-2026 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
@@ -53,11 +53,10 @@ void Fl_Value_Slider::draw() {
sww-Fl::box_dw(box()),
shh-Fl::box_dh(box()));
draw_box(box(),bxx,byy,bww,bhh,color());
- char buf[128];
- format(buf);
+ std::string buf = format_str();
fl_font(textfont(), textsize());
fl_color(active_r() ? textcolor() : fl_inactive(textcolor()));
- fl_draw(buf, bxx, byy, bww, bhh, FL_ALIGN_CLIP);
+ fl_draw(buf.c_str(), bxx, byy, bww, bhh, FL_ALIGN_CLIP);
}
int Fl_Value_Slider::handle(int event) {