#include <bcpan.h>
Inherits BC_SubWindow.
Inherited by APanPatch.

Public Member Functions | |
| BC_Pan (int x, int y, int virtual_r, float maxvalue, int total_values, int *value_positions, int stick_x, int stick_y, float *values) | |
| virtual | ~BC_Pan () |
| int | initialize () |
| int | update (int x, int y) |
| int | button_press_event () |
| int | cursor_motion_event () |
| int | button_release_event () |
| int | cursor_enter_event () |
| int | cursor_leave_event () |
| int | repeat_event (int64_t duration) |
| virtual int | handle_event () |
| int | change_channels (int new_channels, int *value_positions) |
| int | stick_to_values () |
| int | get_total_values () |
| float | get_value (int channel) |
| int | get_stick_x () |
| int | get_stick_y () |
| void | set_images (VFrame **data) |
| int | activate (int popup_x=-1, int popup_y=-1) |
| int | deactivate () |
| float * | get_values () |
Static Public Member Functions | |
| static int | stick_to_values (float *values, int total_values, int *value_positions, int stick_x, int stick_y, int virtual_r, float maxvalue) |
| static void | calculate_stick_position (int total_values, int *value_positions, float *values, float maxvalue, int virtual_r, int &stick_x, int &stick_y) |
| static int | rdtoxy (int &x, int &y, int a, int virtual_r) |
Private Member Functions | |
| void | draw () |
| void | draw_popup () |
Static Private Member Functions | |
| static float | distance (int x1, int x2, int y1, int y2) |
| static int | get_channel_positions (int *value_x, int *value_y, int *value_positions, int virtual_r, int total_values) |
Private Attributes | |
| int | virtual_r |
| float | maxvalue |
| int | total_values |
| int * | value_positions |
| int | stick_x |
| int | stick_y |
| int | x_origin |
| int | y_origin |
| int | stick_x_origin |
| int | stick_y_origin |
| float * | values |
| int | highlighted |
| int * | value_x |
| int * | value_y |
| int | active |
| BC_Pixmap * | images [PAN_IMAGES] |
| VFrame * | temp_channel |
| RotateFrame * | rotater |
| BC_Popup * | popup |
Definition at line 27 of file bcpan.h.
| BC_Pan::BC_Pan | ( | int | x, | |
| int | y, | |||
| int | virtual_r, | |||
| float | maxvalue, | |||
| int | total_values, | |||
| int * | value_positions, | |||
| int | stick_x, | |||
| int | stick_y, | |||
| float * | values | |||
| ) |
Definition at line 15 of file bcpan.C.
References active, calculate_stick_position(), get_channel_positions(), highlighted, images, memcpy, PAN_IMAGES, popup, value_x, and value_y.

| BC_Pan::~BC_Pan | ( | ) | [virtual] |
Definition at line 56 of file bcpan.C.
References images, PAN_IMAGES, popup, rotater, temp_channel, value_positions, value_x, value_y, and values.
| int BC_Pan::initialize | ( | ) | [virtual] |
Reimplemented from BC_SubWindow.
Definition at line 77 of file bcpan.C.
References draw(), BC_WindowBase::get_color_model(), BC_WindowBase::get_h(), BC_WindowBase::get_resources(), BC_WindowBase::get_w(), BC_SubWindow::initialize(), PAN_CHANNEL, rotater, set_images(), and temp_channel.

| int BC_Pan::update | ( | int | x, | |
| int | y | |||
| ) |
Definition at line 262 of file bcpan.C.
References draw(), stick_to_values(), stick_x, and stick_y.
Referenced by APatchGUI::update().

| int BC_Pan::button_press_event | ( | ) | [virtual] |
Reimplemented from BC_WindowBase.
Definition at line 104 of file bcpan.C.
References BC_WindowBase::activate(), active, deactivate(), draw_popup(), BC_WindowBase::get_button_down(), BC_WindowBase::get_buttonpress(), BC_WindowBase::get_cursor_x(), BC_WindowBase::get_cursor_y(), BC_WindowBase::hide_tooltip(), BC_WindowBase::is_event_win(), popup, stick_x, stick_x_origin, stick_y, stick_y_origin, x_origin, and y_origin.

| int BC_Pan::cursor_motion_event | ( | ) | [virtual] |
Reimplemented from BC_WindowBase.
Definition at line 137 of file bcpan.C.
References CLAMP, draw_popup(), BC_WindowBase::get_button_down(), BC_WindowBase::get_buttonpress(), BC_WindowBase::get_cursor_x(), BC_WindowBase::get_cursor_y(), handle_event(), popup, stick_to_values(), stick_x, stick_x_origin, stick_y, stick_y_origin, virtual_r, x_origin, and y_origin.

| int BC_Pan::button_release_event | ( | ) | [virtual] |
Reimplemented from BC_WindowBase.
Definition at line 153 of file bcpan.C.
References deactivate(), draw(), BC_WindowBase::hide_tooltip(), and popup.

| int BC_Pan::cursor_enter_event | ( | ) | [virtual] |
Reimplemented from BC_WindowBase.
Definition at line 180 of file bcpan.C.
References draw(), highlighted, BC_WindowBase::is_event_win(), and BC_WindowBase::tooltip_done.

| int BC_Pan::cursor_leave_event | ( | ) | [virtual] |
Reimplemented from BC_WindowBase.
Definition at line 191 of file bcpan.C.
References draw(), BC_WindowBase::hide_tooltip(), and highlighted.

| int BC_Pan::repeat_event | ( | int64_t | duration | ) | [virtual] |
Reimplemented from BC_WindowBase.
Definition at line 165 of file bcpan.C.
References active, BC_WindowBase::get_resources(), highlighted, BC_WindowBase::show_tooltip(), BC_Resources::tooltip_delay, BC_WindowBase::tooltip_done, BC_WindowBase::tooltip_text, and BC_WindowBase::top_level.

| virtual int BC_Pan::handle_event | ( | ) | [inline, virtual] |
Reimplemented in APanPatch.
Definition at line 49 of file bcpan.h.
Referenced by cursor_motion_event().
| int BC_Pan::change_channels | ( | int | new_channels, | |
| int * | value_positions | |||
| ) |
Definition at line 445 of file bcpan.C.
References draw(), get_channel_positions(), stick_to_values(), total_values, value_x, value_y, values, and virtual_r.
Referenced by APatchGUI::update().

| int BC_Pan::stick_to_values | ( | ) |
Definition at line 369 of file bcpan.C.
References maxvalue, stick_x, stick_y, total_values, value_positions, values, and virtual_r.
Referenced by change_channels(), cursor_motion_event(), PanAuto::rechannel(), and update().
| int BC_Pan::stick_to_values | ( | float * | values, | |
| int | total_values, | |||
| int * | value_positions, | |||
| int | stick_x, | |||
| int | stick_y, | |||
| int | virtual_r, | |||
| float | maxvalue | |||
| ) | [static] |
Definition at line 380 of file bcpan.C.
References distance(), get_channel_positions(), Units::quantize10(), value_x, and value_y.

| int BC_Pan::get_total_values | ( | ) |
| int BC_Pan::get_stick_x | ( | ) |
Definition at line 494 of file bcpan.C.
References stick_x.
Referenced by APanPatch::handle_event().
| int BC_Pan::get_stick_y | ( | ) |
Definition at line 499 of file bcpan.C.
References stick_y.
Referenced by APanPatch::handle_event().
| void BC_Pan::set_images | ( | VFrame ** | data | ) |
Definition at line 93 of file bcpan.C.
References BC_WindowBase::BC_Pixmap, BC_Pixmap::get_h(), BC_Pixmap::get_w(), BC_WindowBase::h, images, PAN_IMAGES, PAN_UP, BC_WindowBase::parent_window, and BC_WindowBase::w.
Referenced by initialize().

| void BC_Pan::calculate_stick_position | ( | int | total_values, | |
| int * | value_positions, | |||
| float * | values, | |||
| float | maxvalue, | |||
| int | virtual_r, | |||
| int & | stick_x, | |||
| int & | stick_y | |||
| ) | [static] |
Definition at line 520 of file bcpan.C.
References rdtoxy().
Referenced by Tracks::add_audio_track(), BC_Pan(), and MWindow::map_audio().

| int BC_Pan::rdtoxy | ( | int & | x, | |
| int & | y, | |||
| int | a, | |||
| int | virtual_r | |||
| ) | [static] |
Definition at line 509 of file bcpan.C.
References M_PI.
Referenced by calculate_stick_position(), and get_channel_positions().
| int BC_Pan::activate | ( | int | popup_x = -1, |
|
| int | popup_y = -1 | |||
| ) |
Definition at line 212 of file bcpan.C.
References active, BC_WindowBase::BC_Popup, BC_WindowBase::display, draw_popup(), BC_WindowBase::flush(), BC_WindowBase::get_h(), BC_Pixmap::get_h(), BC_WindowBase::get_w(), BC_Pixmap::get_w(), images, PAN_POPUP, popup, BC_WindowBase::rootwin, BC_WindowBase::top_level, BC_WindowBase::win, BC_WindowBase::x, and BC_WindowBase::y.

| int BC_Pan::deactivate | ( | ) | [virtual] |
Reimplemented from BC_WindowBase.
Definition at line 204 of file bcpan.C.
Referenced by button_press_event(), and button_release_event().
| float * BC_Pan::get_values | ( | ) |
| void BC_Pan::draw | ( | ) | [private] |
Definition at line 319 of file bcpan.C.
References CLAMP, BC_WindowBase::draw_pixmap(), BC_WindowBase::draw_top_background(), BC_WindowBase::flash(), get_channel_positions(), BC_WindowBase::get_h(), BC_WindowBase::get_w(), GREEN, BC_WindowBase::h, highlighted, images, PAN_CHANNEL_SMALL, PAN_HI, PAN_STICK_SMALL, PAN_UP, BC_WindowBase::parent_window, PICON_H, PICON_W, RED, BC_WindowBase::set_color(), stick_x, stick_y, total_values, value_positions, value_x, value_y, virtual_r, and BC_WindowBase::w.
Referenced by button_release_event(), change_channels(), cursor_enter_event(), cursor_leave_event(), initialize(), and update().

| void BC_Pan::draw_popup | ( | ) | [private] |
Definition at line 275 of file bcpan.C.
References BC_WindowBase::BC_Pixmap, BCTEXTLEN, BC_WindowBase::draw_background(), BC_WindowBase::draw_pixmap(), BC_WindowBase::draw_text(), BC_WindowBase::flash(), BC_WindowBase::get_h(), BC_WindowBase::get_resources(), BC_WindowBase::get_text_height(), VFrame::get_w(), BC_WindowBase::get_w(), images, PAN_CHANNEL, BC_Resources::pan_data, PAN_STICK, popup, RotateFrame::rotate(), rotater, BC_WindowBase::set_color(), BC_WindowBase::set_font(), SMALLFONT, stick_x, stick_y, temp_channel, total_values, value_positions, value_x, value_y, values, and virtual_r.
Referenced by activate(), button_press_event(), and cursor_motion_event().
