home *** CD-ROM | disk | FTP | other *** search
/ Geek 6 / Geek-006.iso / linux / video / xmovie-1.5.3.tar.gz / xmovie-1.5.3.tar / xmovie-1.5.3 / guicast / bcpan.h < prev    next >
C/C++ Source or Header  |  2000-11-29  |  1KB  |  62 lines

  1. #ifndef BCPAN_H
  2. #define BCPAN_H
  3.  
  4. // pan  angles
  5. //
  6. //        360/0
  7. //
  8. //     270      90
  9. //
  10. //         180
  11.  
  12. #include "bcsubwindow.h"
  13.  
  14. class BC_Pan : public BC_SubWindow
  15. {
  16. public:
  17.     BC_Pan(int x, 
  18.         int y, 
  19.         int virtual_r, 
  20.         float maxvalue, 
  21.         int total_values, 
  22.         int *value_positions, 
  23.         int stick_x, 
  24.         int stick_y, 
  25.         float *values);
  26.     ~BC_Pan();
  27.  
  28.     int initialize();
  29.     int update(int x, int y);
  30. // change radial positions of channels
  31.     int change_channels(int new_channels, int *value_positions);
  32. // update values from stick position
  33.     int stick_to_values();
  34.     int get_total_values();
  35.     float get_value(int channel);
  36.     int get_stick_x();
  37.     int get_stick_y();
  38.  
  39. private:
  40.     int draw();
  41. // update values from stick position
  42.     float distance(int x1, int x2, int y1, int y2);
  43. // get x and y positions of channels
  44.     int get_channel_positions();
  45.     int rdtoxy(int &x, int &y, int r, int a, int virtual_r);
  46.  
  47.     int virtual_r;
  48.     float maxvalue;
  49.     int total_values;
  50.     int *value_positions;
  51.     int stick_x;
  52.     int stick_y;
  53.     float *values;
  54.     int highlighted;
  55.     int *value_x, *value_y;     // virtual x and y positions
  56.     BC_Pixmap *bg_pixmap;
  57.     BC_Pixmap *bg_pixmap_hi;
  58.     BC_Pixmap *handle_pixmap, *channel_pixmap;
  59. };
  60.  
  61. #endif
  62.