r136: This commit was manufactured by cvs2svn to create tag 'hv_1_1_8'.
[cinelerra_cv/ct.git] / hvirtual / guicast / bctoggle.h
blob9747a228aa1183981a2fdba4003f89f8ac109ae2
1 #ifndef BCTOGGLE_H
2 #define BCTOGGLE_H
4 #include "bcbitmap.inc"
5 #include "bcsubwindow.h"
6 #include "colors.h"
7 #include "fonts.h"
8 #include "vframe.inc"
11 class BC_Toggle : public BC_SubWindow
13 public:
14 BC_Toggle(int x, int y,
15 VFrame **data,
16 int value,
17 char *caption = "",
18 int bottom_justify = 0,
19 int font = MEDIUMFONT,
20 int color = BLACK);
21 virtual ~BC_Toggle();
23 virtual int handle_event() { return 0; };
24 int get_value();
25 int set_value(int value, int draw = 1);
26 void set_select_drag(int value);
27 int update(int value, int draw = 1);
28 void reposition_window(int x, int y);
29 void enable();
30 void disable();
31 void set_status(int value);
33 int initialize();
34 int set_images(VFrame **data);
35 int cursor_enter_event();
36 int cursor_leave_event();
37 // In select drag mode these 3 need to be overridden and called back to.
38 virtual int button_press_event();
39 virtual int button_release_event();
40 int cursor_motion_event();
41 int repeat_event(int64_t repeat_id);
42 int draw_face();
44 enum
46 TOGGLE_UP,
47 TOGGLE_UPHI,
48 TOGGLE_CHECKED,
49 TOGGLE_DOWN,
50 TOGGLE_CHECKEDHI
53 private:
54 int has_caption();
56 BC_Pixmap *images[5];
57 VFrame **data;
58 char *caption;
59 int status;
60 int value;
61 int toggle_x, toggle_y, text_x, text_y, text_w, text_h, text_line;
62 int bottom_justify;
63 int font;
64 int color;
65 int select_drag;
66 int enabled;
69 class BC_Radial : public BC_Toggle
71 public:
72 BC_Radial(int x,
73 int y,
74 int value,
75 char *caption = "",
76 int font = MEDIUMFONT,
77 int color = BLACK);
80 class BC_CheckBox : public BC_Toggle
82 public:
83 BC_CheckBox(int x,
84 int y,
85 int value,
86 char *caption = "",
87 int font = MEDIUMFONT,
88 int color = BLACK);
89 BC_CheckBox(int x,
90 int y,
91 int *value,
92 char *caption = "",
93 int font = MEDIUMFONT,
94 int color = BLACK);
95 virtual int handle_event();
96 int *value;
99 class BC_Label : public BC_Toggle
101 public:
102 BC_Label(int x,
103 int y,
104 int value,
105 int font = MEDIUMFONT,
106 int color = BLACK);
109 #endif