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 virtual float get_percentage() { return 0; };
31 virtual int percentage_to_value(float percentage
) { return 0; };
32 virtual int handle_event() { return 0; };
33 virtual char* get_caption() { return ""; };
34 virtual int increase_value() { return 0; };
35 virtual int decrease_value() { return 0; };
36 void set_use_caption(int value
);
38 int reposition_window(int x
, int y
);
39 int repeat_event(int64_t repeat_id
);
40 int cursor_enter_event();
41 int cursor_leave_event();
42 int button_press_event();
43 virtual int button_release_event();
44 int cursor_motion_event();
48 int set_data(VFrame
**data
);
50 float percentage_to_angle(float percentage
);
51 float angle_to_percentage(float angle
);
52 int angle_to_coords(int &x1
, int &y1
, int &x2
, int &y2
, float angle
);
53 float coords_to_angle(int x2
, int y2
);
54 void show_value_tooltip();
57 BC_Pixmap
*images
[POT_STATES
];
58 char caption
[BCTEXTLEN
], temp_tooltip_text
[BCTEXTLEN
];
60 int64_t keypress_tooltip_timer
;
62 float start_cursor_angle
;
63 float start_needle_angle
;
64 float prev_angle
, angle_correction
;
68 class BC_FPot
: public BC_Pot
82 float get_percentage();
84 int percentage_to_value(float percentage
);
85 void update(float value
);
86 void set_precision(float value
);
89 float value
, minvalue
, maxvalue
;
93 class BC_IPot
: public BC_Pot
105 int increase_value();
106 int decrease_value();
107 float get_percentage();
108 int percentage_to_value(float percentage
);
110 void update(int64_t value
);
113 int64_t value
, minvalue
, maxvalue
;
116 class BC_QPot
: public BC_Pot
121 int64_t value
, // Units of frequencies
126 int increase_value();
127 int decrease_value();
128 float get_percentage();
129 int percentage_to_value(float percentage
);
130 // Units of frequencies
132 // Units of frequencies
133 void update(int64_t value
);
136 // Units of frequency index
137 int64_t value
, minvalue
, maxvalue
;
140 class BC_PercentagePot
: public BC_Pot
143 BC_PercentagePot(int x
,
152 int increase_value();
153 int decrease_value();
154 float get_percentage();
156 int percentage_to_value(float percentage
);
157 void update(float value
);
160 float value
, minvalue
, maxvalue
;