12 #include "bcsubwindow.h"
13 #include "rotateframe.inc"
21 #define PAN_CHANNEL_SMALL 5
22 #define PAN_STICK_SMALL 6
27 class BC_Pan
: public BC_SubWindow
42 int update(int x
, int y
);
43 int button_press_event();
44 int cursor_motion_event();
45 int button_release_event();
46 int cursor_enter_event();
47 int cursor_leave_event();
48 int repeat_event(int64_t duration
);
49 virtual int handle_event() { return 0; };
50 // change radial positions of channels
51 int change_channels(int new_channels
, int *value_positions
);
52 // update values from stick position
53 int stick_to_values();
54 // Generic conversion from stick to values for channel changes with no GUI
55 static int stick_to_values(float *values
,
62 int get_total_values();
63 float get_value(int channel
);
66 void set_images(VFrame
**data
);
67 static void calculate_stick_position(int total_values
,
74 static int rdtoxy(int &x
, int &y
, int a
, int virtual_r
);
75 int activate(int popup_x
= -1, int popup_y
= -1);
82 // update values from stick position
83 static float distance(int x1
, int x2
, int y1
, int y2
);
84 // get x and y positions of channels
85 static int get_channel_positions(int *value_x
,
97 // Cursor origin on button press
98 int x_origin
, y_origin
;
99 // Stick origin on button press
100 int stick_x_origin
, stick_y_origin
;
103 // virtual x and y positions
104 int *value_x
, *value_y
;
108 BC_Pixmap
*images
[PAN_IMAGES
];
109 VFrame
*temp_channel
;
110 RotateFrame
*rotater
;