BC_Pot Class Reference

#include <bcpot.h>

Inherits BC_SubWindow.

Inherited by BC_FPot, BC_IPot, BC_PercentagePot, and BC_QPot.

Collaboration diagram for BC_Pot:

Collaboration graph
[legend]

Public Member Functions

 BC_Pot (int x, int y, VFrame **data)
virtual ~BC_Pot ()
int initialize ()
virtual float get_percentage ()
virtual int percentage_to_value (float percentage)
virtual int handle_event ()
virtual char * get_caption ()
virtual int increase_value ()
virtual int decrease_value ()
void set_use_caption (int value)
int reposition_window (int x, int y)
int repeat_event (int64_t repeat_id)
int cursor_enter_event ()
int cursor_leave_event ()
int button_press_event ()
virtual int button_release_event ()
int cursor_motion_event ()
int keypress_event ()

Static Public Member Functions

static int calculate_h ()

Private Member Functions

int set_data (VFrame **data)
int draw ()
float percentage_to_angle (float percentage)
float angle_to_percentage (float angle)
int angle_to_coords (int &x1, int &y1, int &x2, int &y2, float angle)
float coords_to_angle (int x2, int y2)
void show_value_tooltip ()

Private Attributes

VFrame ** data
BC_Pixmapimages [POT_STATES]
char caption [BCTEXTLEN]
char temp_tooltip_text [BCTEXTLEN]
int status
int64_t keypress_tooltip_timer
float angle_offset
float start_cursor_angle
float start_needle_angle
float prev_angle
float angle_correction
int use_caption

Friends

class BC_FPot
class BC_IPot
class BC_QPot
class BC_PercentagePot

Detailed Description

Definition at line 18 of file bcpot.h.


Constructor & Destructor Documentation

BC_Pot::BC_Pot ( int  x,
int  y,
VFrame **  data 
)

Definition at line 14 of file bcpot.C.

References images, POT_STATES, and use_caption.

BC_Pot::~BC_Pot (  )  [virtual]

Definition at line 23 of file bcpot.C.


Member Function Documentation

int BC_Pot::calculate_h (  )  [static]

Definition at line 27 of file bcpot.C.

References VFrame::get_h(), BC_WindowBase::get_resources(), and BC_Resources::pot_images.

Referenced by ChannelEditPictureWindow::calculate_h(), and ChannelEditPictureWindow::create_objects().

Here is the call graph for this function:

int BC_Pot::initialize (  )  [virtual]

Reimplemented from BC_SubWindow.

Definition at line 32 of file bcpot.C.

References data, draw(), VFrame::get_h(), BC_WindowBase::get_resources(), VFrame::get_w(), BC_WindowBase::h, BC_SubWindow::initialize(), BC_Resources::pot_images, POT_UP, set_data(), status, and BC_WindowBase::w.

Here is the call graph for this function:

virtual float BC_Pot::get_percentage (  )  [inline, virtual]

Reimplemented in BC_FPot, BC_IPot, BC_QPot, and BC_PercentagePot.

Definition at line 32 of file bcpot.h.

Referenced by button_press_event(), and draw().

virtual int BC_Pot::percentage_to_value ( float  percentage  )  [inline, virtual]

Reimplemented in BC_FPot, BC_IPot, BC_QPot, and BC_PercentagePot.

Definition at line 33 of file bcpot.h.

Referenced by cursor_motion_event().

virtual int BC_Pot::handle_event (  )  [inline, virtual]

virtual char* BC_Pot::get_caption (  )  [inline, virtual]

Reimplemented in BC_FPot, BC_IPot, BC_QPot, and BC_PercentagePot.

Definition at line 35 of file bcpot.h.

Referenced by cursor_motion_event(), repeat_event(), and show_value_tooltip().

virtual int BC_Pot::increase_value (  )  [inline, virtual]

Reimplemented in BC_FPot, BC_IPot, BC_QPot, and BC_PercentagePot.

Definition at line 36 of file bcpot.h.

Referenced by button_press_event(), and keypress_event().

virtual int BC_Pot::decrease_value (  )  [inline, virtual]

Reimplemented in BC_FPot, BC_IPot, BC_QPot, and BC_PercentagePot.

Definition at line 37 of file bcpot.h.

Referenced by button_press_event(), and keypress_event().

void BC_Pot::set_use_caption ( int  value  ) 

Definition at line 66 of file bcpot.C.

References use_caption.

Referenced by RotateFine::RotateFine(), RotateX::RotateX(), and RotateY::RotateY().

int BC_Pot::reposition_window ( int  x,
int  y 
)

Definition at line 48 of file bcpot.C.

References draw(), and BC_WindowBase::reposition_window().

Referenced by SynthWindow::update_oscillators().

Here is the call graph for this function:

int BC_Pot::repeat_event ( int64_t  repeat_id  )  [virtual]

int BC_Pot::cursor_enter_event (  )  [virtual]

Reimplemented from BC_WindowBase.

Definition at line 249 of file bcpot.C.

References BC_WindowBase::button_down, draw(), BC_WindowBase::event_win, POT_HIGH, POT_UP, status, BC_WindowBase::tooltip_done, BC_WindowBase::top_level, and BC_WindowBase::win.

Here is the call graph for this function:

int BC_Pot::cursor_leave_event (  )  [virtual]

Reimplemented from BC_WindowBase.

Definition at line 263 of file bcpot.C.

References draw(), BC_WindowBase::hide_tooltip(), POT_HIGH, POT_UP, and status.

Here is the call graph for this function:

int BC_Pot::button_press_event (  )  [virtual]

int BC_Pot::button_release_event (  )  [virtual]

int BC_Pot::cursor_motion_event (  )  [virtual]

int BC_Pot::keypress_event (  )  [virtual]

Reimplemented from BC_WindowBase.

Definition at line 217 of file bcpot.C.

References decrease_value(), DOWN, draw(), BC_WindowBase::get_keypress(), handle_event(), increase_value(), LEFT, RIGHT, show_value_tooltip(), and UP.

Here is the call graph for this function:

int BC_Pot::set_data ( VFrame **  data  )  [private]

Definition at line 55 of file bcpot.C.

References BC_WindowBase::BC_Pixmap, images, BC_WindowBase::parent_window, and POT_STATES.

Referenced by initialize().

int BC_Pot::draw (  )  [private]

float BC_Pot::percentage_to_angle ( float  percentage  )  [private]

Definition at line 85 of file bcpot.C.

References MAX_ANGLE, and MIN_ANGLE.

Referenced by button_press_event(), and draw().

float BC_Pot::angle_to_percentage ( float  angle  )  [private]

Definition at line 90 of file bcpot.C.

References MAX_ANGLE, and MIN_ANGLE.

Referenced by cursor_motion_event().

int BC_Pot::angle_to_coords ( int &  x1,
int &  y1,
int &  x2,
int &  y2,
float  angle 
) [private]

Definition at line 96 of file bcpot.C.

References BC_WindowBase::get_resources(), M_PI, POT_DN, BC_Resources::pot_offset, BC_Resources::pot_r, BC_Resources::pot_x1, BC_Resources::pot_y1, BC_WindowBase::resources, and status.

Referenced by draw().

Here is the call graph for this function:

float BC_Pot::coords_to_angle ( int  x2,
int  y2 
) [private]

Definition at line 114 of file bcpot.C.

References BC_WindowBase::get_resources(), M_PI, POT_DN, BC_Resources::pot_x1, BC_Resources::pot_y1, status, BC_WindowBase::x, and BC_WindowBase::y.

Referenced by button_press_event(), and cursor_motion_event().

Here is the call graph for this function:

void BC_Pot::show_value_tooltip (  )  [private]

Definition at line 171 of file bcpot.C.

References get_caption(), keypress_tooltip_timer, BC_WindowBase::set_tooltip(), BC_WindowBase::show_tooltip(), and use_caption.

Referenced by button_press_event(), and keypress_event().

Here is the call graph for this function:


Friends And Related Function Documentation

friend class BC_FPot [friend]

Definition at line 24 of file bcpot.h.

friend class BC_IPot [friend]

Definition at line 25 of file bcpot.h.

friend class BC_QPot [friend]

Definition at line 26 of file bcpot.h.

friend class BC_PercentagePot [friend]

Definition at line 27 of file bcpot.h.


Field Documentation

VFrame** BC_Pot::data [private]

Definition at line 58 of file bcpot.h.

Referenced by initialize().

BC_Pixmap* BC_Pot::images[POT_STATES] [private]

Definition at line 59 of file bcpot.h.

Referenced by BC_Pot(), draw(), and set_data().

char BC_Pot::caption[BCTEXTLEN] [private]

char BC_Pot::temp_tooltip_text[BCTEXTLEN] [private]

Definition at line 60 of file bcpot.h.

int BC_Pot::status [private]

int64_t BC_Pot::keypress_tooltip_timer [private]

Definition at line 62 of file bcpot.h.

Referenced by repeat_event(), and show_value_tooltip().

float BC_Pot::angle_offset [private]

Definition at line 63 of file bcpot.h.

Referenced by button_press_event(), and cursor_motion_event().

float BC_Pot::start_cursor_angle [private]

Definition at line 64 of file bcpot.h.

Referenced by button_press_event().

float BC_Pot::start_needle_angle [private]

Definition at line 65 of file bcpot.h.

Referenced by button_press_event().

float BC_Pot::prev_angle [private]

Definition at line 66 of file bcpot.h.

Referenced by button_press_event(), and cursor_motion_event().

float BC_Pot::angle_correction [private]

Definition at line 66 of file bcpot.h.

Referenced by button_press_event(), and cursor_motion_event().

int BC_Pot::use_caption [private]

Definition at line 67 of file bcpot.h.

Referenced by BC_Pot(), repeat_event(), set_use_caption(), and show_value_tooltip().


The documentation for this class was generated from the following files:

Generated on Mon Apr 28 14:15:05 2008 for Cinelerra by  doxygen 1.5.5