From fb37523537cdb69a31dede401a604981ce8b7b9d Mon Sep 17 00:00:00 2001 From: Jed Barber Date: Sat, 17 Jun 2017 11:28:39 +1000 Subject: Updated coding style, added progress log --- src/c_fl_widget.cpp | 33 ++------------------------------- 1 file changed, 2 insertions(+), 31 deletions(-) (limited to 'src/c_fl_widget.cpp') diff --git a/src/c_fl_widget.cpp b/src/c_fl_widget.cpp index 1f383de..832d7fe 100644 --- a/src/c_fl_widget.cpp +++ b/src/c_fl_widget.cpp @@ -21,22 +21,18 @@ class My_Widget : public Fl_Widget { h_hook_p handle_hook; }; - void My_Widget::draw() { (*draw_hook)(this->user_data()); } - int My_Widget::handle(int e) { return (*handle_hook)(this->user_data(), e); } - void widget_set_draw_hook(WIDGET w, void * d) { reinterpret_cast(w)->draw_hook = reinterpret_cast(d); } - void widget_set_handle_hook(WIDGET w, void * h) { reinterpret_cast(w)->handle_hook = reinterpret_cast(h); } @@ -49,7 +45,6 @@ WIDGET new_fl_widget(int x, int y, int w, int h, char* label) { return wd; } - void free_fl_widget(WIDGET w) { delete reinterpret_cast(w); } @@ -61,7 +56,6 @@ void * fl_widget_get_user_data(WIDGET w) { return reinterpret_cast(w)->user_data(); } - void fl_widget_set_user_data(WIDGET w, void * d) { reinterpret_cast(w)->user_data(d); } @@ -73,32 +67,29 @@ void fl_widget_activate(WIDGET w) { reinterpret_cast(w)->activate(); } - void fl_widget_deactivate(WIDGET w) { reinterpret_cast(w)->deactivate(); } - int fl_widget_active(WIDGET w) { return reinterpret_cast(w)->active(); } - int fl_widget_active_r(WIDGET w) { return reinterpret_cast(w)->active_r(); } - void fl_widget_clear_active(WIDGET w) { reinterpret_cast(w)->clear_active(); } + + unsigned int fl_widget_changed(WIDGET w) { return reinterpret_cast(w)->changed(); } - void fl_widget_clear_changed(WIDGET w) { reinterpret_cast(w)->clear_changed(); } @@ -110,7 +101,6 @@ void * fl_widget_get_parent(WIDGET w) { return reinterpret_cast(w)->parent(); } - int fl_widget_contains(WIDGET w, WIDGET i) { return reinterpret_cast(w)->contains(reinterpret_cast(i)); } @@ -122,64 +112,50 @@ unsigned int fl_widget_get_align(WIDGET w) { return reinterpret_cast(w)->align(); } - void fl_widget_set_align(WIDGET w, unsigned int a) { reinterpret_cast(w)->align(a); } - int fl_widget_get_box(WIDGET w) { return reinterpret_cast(w)->box(); } - void fl_widget_set_box(WIDGET w, int b) { reinterpret_cast(w)->box(static_cast(b)); } - const char* fl_widget_get_label(WIDGET w) { return reinterpret_cast(w)->label(); } - void fl_widget_set_label(WIDGET w, const char* t) { reinterpret_cast(w)->copy_label(t); } - int fl_widget_get_label_font(WIDGET w) { return reinterpret_cast(w)->labelfont(); } - void fl_widget_set_label_font(WIDGET w, int f) { reinterpret_cast(w)->labelfont(static_cast(f)); } - int fl_widget_get_label_size(WIDGET w) { return reinterpret_cast(w)->labelsize(); } - void fl_widget_set_label_size(WIDGET w, int s) { reinterpret_cast(w)->labelsize(static_cast(s)); } - int fl_widget_get_label_type(WIDGET w) { return reinterpret_cast(w)->labeltype(); } - void fl_widget_set_label_type(WIDGET w, int l) { reinterpret_cast(w)->labeltype(static_cast(l)); } - - - void fl_widget_set_callback(WIDGET w, void * cb) { reinterpret_cast(w)->callback(reinterpret_cast(cb)); } @@ -191,27 +167,22 @@ int fl_widget_get_x(WIDGET w) { return reinterpret_cast(w)->x(); } - int fl_widget_get_y(WIDGET w) { return reinterpret_cast(w)->y(); } - int fl_widget_get_w(WIDGET w) { return reinterpret_cast(w)->w(); } - int fl_widget_get_h(WIDGET w) { return reinterpret_cast(w)->h(); } - void fl_widget_size(WIDGET w, int d, int h) { reinterpret_cast(w)->size(d, h); } - void fl_widget_position(WIDGET w, int x, int y) { reinterpret_cast(w)->position(x, y); } -- cgit