r1005: Increase the number of displayed digits for resample audio dialog box
[cinelerra_cv/mob.git] / guicast / bcbutton.h
blob162bbfc33b2f08a81ef6ef4e5d6527066e213e1c
1 #ifndef BCBUTTON_H
2 #define BCBUTTON_H
4 #include "bcbitmap.inc"
5 #include "bcsubwindow.h"
6 #include "vframe.inc"
8 #include <stdint.h>
11 class BC_Button : public BC_SubWindow
13 public:
14 BC_Button(int x, int y, VFrame **data);
15 BC_Button(int x, int y, int w, VFrame **data);
16 virtual ~BC_Button();
18 friend class BC_GenericButton;
20 virtual int handle_event() { return 0; };
21 int repeat_event(int64_t repeat_id);
22 virtual int draw_face();
23 void disable();
24 void enable();
26 int initialize();
27 virtual int set_images(VFrame **data);
28 int cursor_enter_event();
29 int cursor_leave_event();
30 int button_press_event();
31 int button_release_event();
32 int cursor_motion_event();
33 int update_bitmaps(VFrame **data);
34 int reposition_window(int x, int y);
35 void set_underline(int number);
38 private:
40 BC_Pixmap *images[3];
41 VFrame **data;
42 int status;
43 int w_argument;
44 int underline_number;
45 int enabled;
51 class BC_GenericButton : public BC_Button
53 public:
54 BC_GenericButton(int x, int y, char *text, VFrame **data = 0);
55 BC_GenericButton(int x, int y, int w, char *text, VFrame **data = 0);
56 int set_images(VFrame **data);
57 int draw_face();
58 static int calculate_w(BC_WindowBase *gui, char *text);
59 static int calculate_h();
61 private:
62 char text[BCTEXTLEN];
65 class BC_OKTextButton : public BC_GenericButton
67 public:
68 BC_OKTextButton(BC_WindowBase *parent_window);
69 virtual int resize_event(int w, int h);
70 virtual int handle_event();
71 virtual int keypress_event();
72 BC_WindowBase *parent_window;
75 class BC_CancelTextButton : public BC_GenericButton
77 public:
78 BC_CancelTextButton(BC_WindowBase *parent_window);
79 virtual int resize_event(int w, int h);
80 virtual int handle_event();
81 virtual int keypress_event();
82 BC_WindowBase *parent_window;
85 class BC_OKButton : public BC_Button
87 public:
88 BC_OKButton(int x, int y);
89 BC_OKButton(BC_WindowBase *parent_window);
90 BC_OKButton(BC_WindowBase *parent_window, VFrame **images);
91 static int calculate_h();
92 static int calculate_w();
93 virtual int resize_event(int w, int h);
94 virtual int handle_event();
95 virtual int keypress_event();
98 class BC_CancelButton : public BC_Button
100 public:
101 BC_CancelButton(int x, int y);
102 BC_CancelButton(BC_WindowBase *parent_window);
103 BC_CancelButton(BC_WindowBase *parent_window, VFrame **images);
104 static int calculate_h();
105 static int calculate_w();
106 virtual int resize_event(int w, int h);
107 virtual int handle_event();
108 virtual int keypress_event();
111 #endif