mask xy scale, mask boundary only overlay, fix 8 char mask nm bug, rework maskgui...
[goodguy/cinelerra.git] / cinelerra-5.1 / guicast / bctumble.h
1
2 /*
3  * CINELERRA
4  * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 of the License, or
9  * (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
19  *
20  */
21
22 #ifndef BCTUMBLE_H
23 #define BCTUMBLE_H
24
25 #include "bcsubwindow.h"
26
27 class BC_Tumbler : public BC_SubWindow
28 {
29 public:
30         BC_Tumbler(int x, int y, VFrame **data = 0);
31         virtual ~BC_Tumbler();
32
33         virtual int handle_up_event() { return 0; };
34         virtual int handle_down_event() { return 0; };
35         int repeat_event(int64_t repeat_id);
36         static int calculate_w();
37         static int calculate_h();
38
39         int initialize();
40         int set_images(VFrame **data);
41         int cursor_enter_event();
42         int cursor_leave_event();
43         int button_press_event();
44         int button_release_event();
45         int cursor_motion_event();
46         int update_bitmaps(VFrame **data);
47         int reposition_window(int x, int y, int w=-1, int h=-1); // w & h don't do anything, except to inherit BC_Subwindow::(reposition_window)
48         virtual void set_boundaries(int64_t min, int64_t max) {};
49         virtual void set_boundaries(float min, float max) {};
50         virtual void set_increment(float value) {};
51         virtual void set_log_floatincrement(int value) {};
52
53 private:
54         int draw_face(int flush = 1);
55
56         BC_Pixmap *images[4];
57         int status;
58         int64_t repeat_count;
59         VFrame **data;
60 };
61
62 class BC_ITumbler : public BC_Tumbler
63 {
64 public:
65         BC_ITumbler(BC_TextBox *textbox, int64_t min, int64_t max, int x, int y);
66         virtual ~BC_ITumbler();
67
68         int handle_up_event();
69         int handle_down_event();
70         void set_increment(float value);
71         void set_boundaries(int64_t min, int64_t max);
72
73         int64_t min, max;
74         int64_t increment;
75         BC_TextBox *textbox;
76 };
77
78 class BC_FTumbler : public BC_Tumbler
79 {
80 public:
81         BC_FTumbler(BC_TextBox *textbox, float min, float max, int x, int y);
82         virtual ~BC_FTumbler();
83
84         int handle_up_event();
85         int handle_down_event();
86         void set_boundaries(float min, float max);
87         void set_increment(float value);
88         void set_log_floatincrement(int value);
89
90         float min, max;
91         float increment;
92         int log_floatincrement;
93         BC_TextBox *textbox;
94 };
95
96 #endif