r125: This commit was manufactured by cvs2svn to create tag 'r1_1_7-last'.
[cinelerra_cv/mob.git] / hvirtual / guicast / bctoggle.h
blob7661ef682e2f6e74ecc097270f2ba347ae7793d9
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"
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
16 class BC_Toggle : public BC_SubWindow
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();
28 virtual int handle_event() { return 0; };
29 int get_value();
30 int set_value(int value, int draw = 1);
31 void set_select_drag(int value);
32 int update(int value, int draw = 1);
33 void reposition_window(int x, int y);
35 int initialize();
36 int set_images(VFrame **data);
37 int cursor_enter_event();
38 int cursor_leave_event();
39 // In select drag mode these 3 need to be overridden and called back to.
40 virtual int button_press_event();
41 virtual int button_release_event();
42 int cursor_motion_event();
43 int repeat_event(int64_t repeat_id);
44 int draw_face();
46 private:
47 int has_caption();
49 BC_Pixmap *images[5];
50 VFrame **data;
51 char *caption;
52 int status;
53 int value;
54 int toggle_x, toggle_y, text_x, text_y, text_w, text_h, text_line;
55 int bottom_justify;
56 int font;
57 int color;
58 int select_drag;
61 class BC_Radial : public BC_Toggle
63 public:
64 BC_Radial(int x,
65 int y,
66 int value,
67 char *caption = "",
68 int font = MEDIUMFONT,
69 int color = BLACK);
72 class BC_CheckBox : public BC_Toggle
74 public:
75 BC_CheckBox(int x,
76 int y,
77 int value,
78 char *caption = "",
79 int font = MEDIUMFONT,
80 int color = BLACK);
81 BC_CheckBox(int x,
82 int y,
83 int *value,
84 char *caption = "",
85 int font = MEDIUMFONT,
86 int color = BLACK);
87 virtual int handle_event();
88 int *value;
91 class BC_Label : public BC_Toggle
93 public:
94 BC_Label(int x,
95 int y,
96 int value,
97 int font = MEDIUMFONT,
98 int color = BLACK);
101 #endif