Rev 2009 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1528 | jag | 1 | /* |
2 | * tap_bpm.h |
||
2097 | jag | 3 | * DIN Is Noise is copyright (c) 2006-2024 Jagannathan Sampath |
1528 | jag | 4 | * For more information, please visit http://dinisnoise.org/ |
5 | */ |
||
6 | |||
7 | |||
8 | #ifndef __tap_bpm |
||
9 | #define __tap_bpm |
||
10 | |||
11 | #include "widget.h" |
||
12 | |||
13 | #include <string> |
||
14 | |||
15 | struct tap_display : widget { |
||
16 | box<int> inner; |
||
17 | float startt, flasht, tapt; |
||
18 | int lmb_clicked; |
||
19 | int flash; |
||
20 | tap_display (int sz); |
||
21 | void set_pos (int x, int y); |
||
22 | int handle_input (); |
||
23 | void draw (); |
||
24 | float bpm; |
||
25 | void calc_bpm (); |
||
26 | void set_bpm (float b, int reset = 0); |
||
27 | change_listener<tap_display>* lis; |
||
28 | void set_listener (change_listener<tap_display>* l); |
||
29 | }; |
||
30 | |||
31 | #endif |
||
32 | |||
33 |