BC_Pan Class Reference

#include <bcpan.h>

Inherits BC_SubWindow.

Inherited by APanPatch.

Collaboration diagram for BC_Pan:

Collaboration graph
[legend]

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_Pixmapimages [PAN_IMAGES]
VFrametemp_channel
RotateFramerotater
BC_Popuppopup

Detailed Description

Definition at line 27 of file bcpan.h.


Constructor & Destructor Documentation

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.

Here is the call graph for this function:

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.


Member Function Documentation

int BC_Pan::initialize (  )  [virtual]

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().

Here is the call graph for this function:

int BC_Pan::button_press_event (  )  [virtual]

int BC_Pan::cursor_motion_event (  )  [virtual]

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

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.

Here is the call graph for this function:

int BC_Pan::repeat_event ( int64_t  duration  )  [virtual]

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().

Here is the call graph for this function:

int BC_Pan::stick_to_values (  ) 

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.

Here is the call graph for this function:

int BC_Pan::get_total_values (  ) 

Definition at line 484 of file bcpan.C.

References total_values.

Referenced by APatchGUI::update().

float BC_Pan::get_value ( int  channel  ) 

Definition at line 489 of file bcpan.C.

References 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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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 
)

int BC_Pan::deactivate (  )  [virtual]

Reimplemented from BC_WindowBase.

Definition at line 204 of file bcpan.C.

References active, and popup.

Referenced by button_press_event(), and button_release_event().

float * BC_Pan::get_values (  ) 

Definition at line 504 of file bcpan.C.

References values.

Referenced by APanPatch::handle_event().

void BC_Pan::draw (  )  [private]

void BC_Pan::draw_popup (  )  [private]