diff options
Diffstat (limited to 'body/c_fl_scrollbar.cpp')
-rw-r--r-- | body/c_fl_scrollbar.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/body/c_fl_scrollbar.cpp b/body/c_fl_scrollbar.cpp index 2ebdb27..bf5ceaa 100644 --- a/body/c_fl_scrollbar.cpp +++ b/body/c_fl_scrollbar.cpp @@ -6,22 +6,18 @@ #include <FL/Fl_Scrollbar.H> #include "c_fl_scrollbar.h" +#include "c_fl.h" -// Telprot stopovers +// Telprot stopover extern "C" void scrollbar_extra_init_hook(void * aobj, int x, int y, int w, int h, const char * l); void fl_scrollbar_extra_init (void * adaobj, int x, int y, int w, int h, const char * label) { scrollbar_extra_init_hook(adaobj, x, y, w, h, label); } -extern "C" void scrollbar_extra_final_hook(void * aobj); -void fl_scrollbar_extra_final(void * adaobj) { - scrollbar_extra_final_hook(adaobj); -} - @@ -72,7 +68,11 @@ SCROLLBAR new_fl_scrollbar(int x, int y, int w, int h, char* label) { } void free_fl_scrollbar(SCROLLBAR s) { - delete static_cast<My_Scrollbar*>(s); + if (fl_inside_callback) { + fl_delete_widget(s); + } else { + delete static_cast<My_Scrollbar*>(s); + } } |