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 / bctoggle.h < prev    next >
C/C++ Source or Header  |  2000-11-29  |  2KB  |  99 lines

  1. #ifndef BCTOGGLE_H
  2. #define BCTOGGLE_H
  3.  
  4. #include "bcbitmap.inc"
  5. #include "bcsubwindow.h"
  6. #include "colors.h"
  7. #include "fonts.h"
  8. #include "vframe.inc"
  9.  
  10. #define TOGGLE_UP 0
  11. #define TOGGLE_UPHI 1
  12. #define TOGGLE_CHECKED 2
  13. #define TOGGLE_DOWN 3
  14. #define TOGGLE_CHECKEDHI 4
  15.  
  16. class BC_Toggle : public BC_SubWindow
  17. {
  18. public:
  19.     BC_Toggle(int x, int y, 
  20.         VFrame **data,
  21.         int value, 
  22.         char *caption = "",
  23.         int bottom_justify = 0,
  24.         int font = MEDIUMFONT,
  25.         int color = BLACK);
  26.     virtual ~BC_Toggle();
  27.  
  28.     virtual int handle_event() { return 0; };
  29.     int get_value();
  30.     int set_value(int value);
  31.     int update(int value);
  32.     void reposition_window(int x, int y);
  33.  
  34.     int initialize();
  35.     int set_images(VFrame **data);
  36.     int cursor_enter_event();
  37.     int cursor_leave_event();
  38.     int button_press_event();
  39.     int button_release_event();
  40.     int cursor_motion_event();
  41.     int repeat_event(long repeat_id);
  42.     int draw_face();
  43.  
  44. private:
  45.     int has_caption();
  46.  
  47.     BC_Pixmap *images[5];
  48.     VFrame **data;
  49.     char *caption;
  50.     int status;
  51.     int value;
  52.     int toggle_x, toggle_y, text_x, text_y, text_w, text_h, text_line;
  53.     int bottom_justify;
  54.     int font;
  55.     int color;
  56. };
  57.  
  58. class BC_Radial : public BC_Toggle
  59. {
  60. public:
  61.     BC_Radial(int x, 
  62.         int y, 
  63.         int value, 
  64.         char *caption = "", 
  65.         int font = MEDIUMFONT,
  66.         int color = BLACK);
  67. };
  68.  
  69. class BC_CheckBox : public BC_Toggle
  70. {
  71. public:
  72.     BC_CheckBox(int x, 
  73.         int y, 
  74.         int value, 
  75.         char *caption = "", 
  76.         int font = MEDIUMFONT,
  77.         int color = BLACK);
  78.     BC_CheckBox(int x, 
  79.         int y, 
  80.         int *value, 
  81.         char *caption = "", 
  82.         int font = MEDIUMFONT,
  83.         int color = BLACK);
  84.     virtual int handle_event();
  85.     int *value;
  86. };
  87.  
  88. class BC_Label : public BC_Toggle
  89. {
  90. public:
  91.     BC_Label(int x, 
  92.         int y, 
  93.         int value, 
  94.         int font = MEDIUMFONT,
  95.         int color = BLACK);
  96. };
  97.  
  98. #endif
  99.