Rev 1858 | Rev 2097 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1528 | jag | 1 | /* |
2 | * ui_sin_cos_radius.h |
||
2009 | jag | 3 | * DIN Is Noise is copyright (c) 2006-2023 Jagannathan Sampath |
1528 | jag | 4 | * For more information, please visit http://dinisnoise.org/ |
5 | */ |
||
6 | |||
7 | #ifndef __UI_SIN_COS_RADIUS |
||
8 | #define __UI_SIN_COS_RADIUS |
||
1559 | jag | 9 | |
1528 | jag | 10 | #include "options_list.h" |
11 | #include "button.h" |
||
12 | #include "sine.h" |
||
13 | #include "cosine.h" |
||
14 | #include "constant_radius.h" |
||
15 | #include "custom_periodic.h" |
||
16 | #include "curve_editor.h" |
||
17 | |||
18 | struct ui_sin_cos_radius_listener { |
||
19 | virtual void sin_cos_radius_optioned () {} |
||
20 | virtual void sin_cos_radius_edited () {} |
||
21 | }; |
||
22 | |||
23 | struct ui_sin_cos_radius : widget, option_listener, click_listener, curve_listener { |
||
24 | |||
25 | // functions sin, cos and radius |
||
26 | funktion *pf_sin, *pf_cos, *pf_radius; |
||
27 | |||
28 | // standard functions for sin, cos and radius |
||
29 | sine st_sin; |
||
30 | cosine st_cos; |
||
31 | constant_radius st_radius; |
||
32 | |||
33 | // custom functions for sin cos and radius |
||
34 | custom_periodic cp_sin, cp_cos, cp_rad; |
||
35 | |||
36 | curve_editor sin_ed, cos_ed, rad_ed; // sin cos and radius editor |
||
37 | |||
38 | options_list ol_sin, ol_cos, ol_radius; |
||
39 | button b_sin, b_cos, b_radius; |
||
1559 | jag | 40 | |
1528 | jag | 41 | std::string fname; |
42 | |||
43 | ui_sin_cos_radius ( |
||
44 | ui_sin_cos_radius_listener* _lis, |
||
45 | const std::string& scr_fname, |
||
46 | const std::string& cp_sin_fname, |
||
47 | const std::string& cp_cos_fname, |
||
48 | const std::string& cp_rad_fname, |
||
49 | const std::string& sin_ed_fname, |
||
50 | const std::string& cos_ed_fname, |
||
51 | const std::string& rad_ed_fname, |
||
52 | int _inc_radius = 1); |
||
53 | ~ui_sin_cos_radius (); |
||
54 | |||
55 | void load (); |
||
56 | void save (); |
||
57 | void setup (); |
||
58 | int handle_input (); |
||
59 | void draw (); |
||
60 | void set_pos (int x, int y); |
||
61 | |||
62 | ui_sin_cos_radius_listener* lis; |
||
63 | void picked (label& l, int dir); |
||
64 | void clicked (button& b); |
||
65 | |||
66 | int sin, cos, radius; |
||
67 | int inc_radius; |
||
68 | |||
69 | void edit_sin (); |
||
70 | void edit_cos (); |
||
71 | void edit_radius (); |
||
72 | void edited (curve_editor* e, int i); |
||
73 | |||
74 | void set_option (label& lbl, const std::string& text, funktion** pf, funktion* pfv, button& bt, int vis); |
||
75 | |||
76 | }; |
||
77 | |||
78 | #endif |
||
79 | |||
80 | |||
81 |