1 #ifndef SCROLLABLE_H 2 #define SCROLLABLE_H 3 4 #include "panel.h" 5 6 #include <stdint.h> 7 8 struct scrollable { 9 PANEL panel; 10 11 uint32_t color; 12 int x; 13 bool small; 14 15 double d; 16 bool left, mousedown, mouseover, mouseover2; 17 int content_height; 18 }; 19 20 void scroll_draw(SCROLLABLE *s, int x, int y, int width, int height); 21 int scroll_gety(SCROLLABLE *s, int height); 22 23 bool scroll_mmove(SCROLLABLE *s, int x, int y, int width, int height, int mx, int my, int dx, int dy); 24 bool scroll_mdown(SCROLLABLE *s); 25 bool scroll_mright(SCROLLABLE *s); 26 bool scroll_mwheel(SCROLLABLE *s, int height, double delta, bool smooth); 27 bool scroll_mup(SCROLLABLE *s); 28 bool scroll_mleave(SCROLLABLE *s); 29 30 #endif 31