6 #include "bcsubwindow.h"
16 class BC_PercentagePot
;
18 class BC_Pot
: public BC_SubWindow
21 BC_Pot(int x
, int y
, VFrame
**data
);
27 friend class BC_PercentagePot
;
30 static int calculate_h();
32 virtual float get_percentage() { return 0; };
33 virtual int percentage_to_value(float percentage
) { return 0; };
34 virtual int handle_event() { return 0; };
35 virtual char* get_caption() { return ""; };
36 virtual int increase_value() { return 0; };
37 virtual int decrease_value() { return 0; };
38 void set_use_caption(int value
);
40 int reposition_window(int x
, int y
);
41 int repeat_event(int64_t repeat_id
);
42 int cursor_enter_event();
43 int cursor_leave_event();
44 int button_press_event();
45 virtual int button_release_event();
46 int cursor_motion_event();
50 int set_data(VFrame
**data
);
52 float percentage_to_angle(float percentage
);
53 float angle_to_percentage(float angle
);
54 int angle_to_coords(int &x1
, int &y1
, int &x2
, int &y2
, float angle
);
55 float coords_to_angle(int x2
, int y2
);
56 void show_value_tooltip();
59 BC_Pixmap
*images
[POT_STATES
];
60 char caption
[BCTEXTLEN
], temp_tooltip_text
[BCTEXTLEN
];
62 int64_t keypress_tooltip_timer
;
64 float start_cursor_angle
;
65 float start_needle_angle
;
66 float prev_angle
, angle_correction
;
70 class BC_FPot
: public BC_Pot
84 float get_percentage();
86 int percentage_to_value(float percentage
);
87 void update(float value
);
88 void update(float value
, float minvalue
, float maxvalue
);
89 void set_precision(float value
);
92 float value
, minvalue
, maxvalue
;
96 class BC_IPot
: public BC_Pot
108 int increase_value();
109 int decrease_value();
110 float get_percentage();
111 int percentage_to_value(float percentage
);
113 void update(int64_t value
);
114 void update(int64_t value
, int64_t minvalue
, int64_t maxvalue
);
117 int64_t value
, minvalue
, maxvalue
;
120 class BC_QPot
: public BC_Pot
125 int64_t value
, // Units of frequencies
130 int increase_value();
131 int decrease_value();
132 float get_percentage();
133 int percentage_to_value(float percentage
);
134 // Units of frequencies
136 // Units of frequencies
137 void update(int64_t value
);
140 // Units of frequency index
141 int64_t value
, minvalue
, maxvalue
;
144 class BC_PercentagePot
: public BC_Pot
147 BC_PercentagePot(int x
,
156 int increase_value();
157 int decrease_value();
158 float get_percentage();
160 int percentage_to_value(float percentage
);
161 void update(float value
);
164 float value
, minvalue
, maxvalue
;
171 // c-file-style: "linux"