r288: This commit was manufactured by cvs2svn to create tag 'hv_1_2_0'.
[cinelerra_cv/mob.git] / hvirtual / guicast / bctoggle.h
blob0c116a6f5568ab9a98273fc41a43b4e0b1138343
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 int has_caption();
55 BC_Pixmap *images[5];
56 VFrame **data;
57 char caption[BCTEXTLEN];
58 int status;
59 int value;
60 int toggle_x;
61 int toggle_y;
62 int text_x;
63 int text_y;
64 int text_w;
65 int text_h;
66 int text_line;
67 int bottom_justify;
68 int font;
69 int color;
70 int select_drag;
71 int enabled;
74 class BC_Radial : public BC_Toggle
76 public:
77 BC_Radial(int x,
78 int y,
79 int value,
80 char *caption = "",
81 int font = MEDIUMFONT,
82 int color = BLACK);
85 class BC_CheckBox : public BC_Toggle
87 public:
88 BC_CheckBox(int x,
89 int y,
90 int value,
91 char *caption = "",
92 int font = MEDIUMFONT,
93 int color = BLACK);
94 BC_CheckBox(int x,
95 int y,
96 int *value,
97 char *caption = "",
98 int font = MEDIUMFONT,
99 int color = BLACK);
100 virtual int handle_event();
102 int *value;
105 class BC_Label : public BC_Toggle
107 public:
108 BC_Label(int x,
109 int y,
110 int value,
111 int font = MEDIUMFONT,
112 int color = BLACK);
115 #endif