summaryrefslogtreecommitdiff
path: root/src/c_fl_scroll.cpp
diff options
context:
space:
mode:
authorJed Barber <jjbarber@y7mail.com>2017-06-17 11:28:39 +1000
committerJed Barber <jjbarber@y7mail.com>2017-06-17 11:28:39 +1000
commitfb37523537cdb69a31dede401a604981ce8b7b9d (patch)
tree9d8f8dc3a00ce27b69aa4b7d7696b49d659fcbe1 /src/c_fl_scroll.cpp
parent33c3691b571ce4b6a2aa6997b70c3bc5d991ca9d (diff)
Updated coding style, added progress log
Diffstat (limited to 'src/c_fl_scroll.cpp')
-rw-r--r--src/c_fl_scroll.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/src/c_fl_scroll.cpp b/src/c_fl_scroll.cpp
index 999c3a4..659b042 100644
--- a/src/c_fl_scroll.cpp
+++ b/src/c_fl_scroll.cpp
@@ -23,42 +23,34 @@ class My_Scroll : public Fl_Scroll {
h_hook_p handle_hook;
};
-
void My_Scroll::draw() {
(*draw_hook)(this->user_data());
}
-
void My_Scroll::real_draw() {
Fl_Scroll::draw();
}
-
int My_Scroll::handle(int e) {
return (*handle_hook)(this->user_data(), e);
}
-
int My_Scroll::real_handle(int e) {
return Fl_Scroll::handle(e);
}
-
void scroll_set_draw_hook(SCROLL s, void * d) {
reinterpret_cast<My_Scroll*>(s)->draw_hook = reinterpret_cast<d_hook_p>(d);
}
-
void fl_scroll_draw(SCROLL s) {
reinterpret_cast<My_Scroll*>(s)->real_draw();
}
-
void scroll_set_handle_hook(SCROLL s, void * h) {
reinterpret_cast<My_Scroll*>(s)->handle_hook = reinterpret_cast<h_hook_p>(h);
}
-
int fl_scroll_handle(SCROLL s, int e) {
return reinterpret_cast<My_Scroll*>(s)->real_handle(e);
}
@@ -71,7 +63,6 @@ SCROLL new_fl_scroll(int x, int y, int w, int h, char* label) {
return s;
}
-
void free_fl_scroll(SCROLL s) {
delete reinterpret_cast<My_Scroll*>(s);
}
@@ -83,28 +74,26 @@ void fl_scroll_to(SCROLL s, int x, int y) {
reinterpret_cast<Fl_Scroll*>(s)->scroll_to(x, y);
}
+void fl_scroll_set_type(SCROLL s, int t) {
+ reinterpret_cast<Fl_Scroll*>(s)->type(t);
+}
+
+
+
int fl_scroll_get_size(SCROLL s) {
return reinterpret_cast<Fl_Scroll*>(s)->scrollbar_size();
}
-
void fl_scroll_set_size(SCROLL s, int t) {
reinterpret_cast<Fl_Scroll*>(s)->scrollbar_size(t);
}
-
int fl_scroll_xposition(SCROLL s) {
return reinterpret_cast<Fl_Scroll*>(s)->xposition();
}
-
int fl_scroll_yposition(SCROLL s) {
return reinterpret_cast<Fl_Scroll*>(s)->yposition();
}
-
-void fl_scroll_set_type(SCROLL s, int t) {
- reinterpret_cast<Fl_Scroll*>(s)->type(t);
-}
-