diff options
Diffstat (limited to 'src/c_fl_valuator.cpp')
-rw-r--r-- | src/c_fl_valuator.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/c_fl_valuator.cpp b/src/c_fl_valuator.cpp index b878077..3b4ebba 100644 --- a/src/c_fl_valuator.cpp +++ b/src/c_fl_valuator.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); + @@ -38,10 +40,15 @@ public: friend void fl_valuator_draw(VALUATOR v); friend int fl_valuator_handle(VALUATOR v, int e); + int format(char * buf); void draw(); int handle(int e); }; +int My_Valuator::format(char * buf) { + return valuator_format_hook(this->user_data(), buf); +} + void My_Valuator::draw() { widget_draw_hook(this->user_data()); } @@ -67,6 +74,13 @@ void free_fl_valuator(VALUATOR v) { +int fl_valuator_format(VALUATOR v, char * buf) { + return static_cast<Fl_Valuator*>(v)->Fl_Valuator::format(buf); +} + + + + double fl_valuator_clamp(VALUATOR v, double a) { return static_cast<Fl_Valuator*>(v)->clamp(a); } |