From 096ec211833d663b3e8976452c3293756a7ededf Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Mon, 20 Jan 2025 16:02:12 +1300 Subject: format / Format method for Fl_Valuator --- src/c_fl_hor_value_slider.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/c_fl_hor_value_slider.cpp') diff --git a/src/c_fl_hor_value_slider.cpp b/src/c_fl_hor_value_slider.cpp index 7f5bc87..cff16f6 100644 --- a/src/c_fl_hor_value_slider.cpp +++ b/src/c_fl_hor_value_slider.cpp @@ -15,6 +15,8 @@ extern "C" void widget_draw_hook(void * ud); extern "C" int widget_handle_hook(void * ud, int e); +extern "C" int valuator_format_hook(void * ud, char * buf); + @@ -27,10 +29,15 @@ public: friend void fl_hor_value_slider_draw(HORVALUESLIDER s); friend int fl_hor_value_slider_handle(HORVALUESLIDER s, int e); + int format(char * buf); void draw(); int handle(int e); }; +int My_Hor_Value_Slider::format(char * buf) { + return valuator_format_hook(this->user_data(), buf); +} + void My_Hor_Value_Slider::draw() { widget_draw_hook(this->user_data()); } -- cgit