4 * Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
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.
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.
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
25 #include "bcsubwindow.h"
27 class BC_Tumbler : public BC_SubWindow
30 BC_Tumbler(int x, int y, VFrame **data = 0);
31 virtual ~BC_Tumbler();
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();
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) {};
54 int draw_face(int flush = 1);
62 class BC_ITumbler : public BC_Tumbler
65 BC_ITumbler(BC_TextBox *textbox, int64_t min, int64_t max, int x, int y);
66 virtual ~BC_ITumbler();
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);
78 class BC_FTumbler : public BC_Tumbler
81 BC_FTumbler(BC_TextBox *textbox, float min, float max, int x, int y);
82 virtual ~BC_FTumbler();
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);
92 int log_floatincrement;