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 #define TUMBLER_VERT 0
28 #define TUMBLER_HORZ 1
30 class BC_Tumbler : public BC_SubWindow
33 BC_Tumbler(int x, int y, VFrame **data = 0, int orient=TUMBLER_VERT);
34 virtual ~BC_Tumbler();
36 virtual int handle_up_event() { return 0; };
37 virtual int handle_down_event() { return 0; };
38 int repeat_event(int64_t repeat_id);
39 static int calculate_w(VFrame **data = 0);
40 static int calculate_h(VFrame **data = 0);
43 int set_images(VFrame **data);
44 int cursor_enter_event();
45 int cursor_leave_event();
46 int button_press_event();
47 int button_release_event();
48 int cursor_motion_event();
49 int update_bitmaps(VFrame **data);
50 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)
51 virtual void set_boundaries(int64_t min, int64_t max) {};
52 virtual void set_boundaries(float min, float max) {};
53 virtual void set_increment(float value) {};
54 virtual void set_log_floatincrement(int value) {};
57 int draw_face(int flush = 1);
66 class BC_ITumbler : public BC_Tumbler
69 BC_ITumbler(BC_TextBox *textbox, int64_t min, int64_t max, int x, int y);
70 virtual ~BC_ITumbler();
72 int handle_up_event();
73 int handle_down_event();
74 void set_increment(float value);
75 void set_boundaries(int64_t min, int64_t max);
82 class BC_FTumbler : public BC_Tumbler
85 BC_FTumbler(BC_TextBox *textbox, float min, float max, int x, int y);
86 virtual ~BC_FTumbler();
88 int handle_up_event();
89 int handle_down_event();
90 void set_boundaries(float min, float max);
91 void set_increment(float value);
92 void set_log_floatincrement(int value);
96 int log_floatincrement;