4 #include "bcbitmap.inc"
5 #include "bcsubwindow.h"
9 class BC_PercentageSlider
;
11 class BC_Slider
: public BC_SubWindow
17 int pointer_motion_range
,
24 friend class BC_ISlider
;
25 friend class BC_FSlider
;
26 friend class BC_PercentageSlider
;
28 virtual int handle_event() { return 0; };
31 int get_button_pixels();
32 virtual int value_to_pixel() { return 0; };
34 int cursor_enter_event();
35 int cursor_leave_event();
36 int button_press_event();
37 int button_release_event();
38 int get_pointer_motion_range();
39 int cursor_motion_event();
40 int repeat_event(int64_t repeat_id
);
41 int reposition_window(int x
, int y
, int w
= -1, int h
= -1);
44 virtual int increase_value() { return 0; };
45 virtual int decrease_value() { return 0; };
46 virtual char* get_caption() { return caption
; };
53 #define SLIDER_BG_UP 0
54 #define SLIDER_BG_HI 1
55 #define SLIDER_BG_DN 2
56 #define SLIDER_IMAGES 6
58 virtual int init_selection(int cursor_x
, int cursor_y
) { return 0; };
59 virtual int update_selection(int cursor_x
, int cursor_y
) { return 0; };
60 int set_images(VFrame
**images
);
62 void show_value_tooltip();
66 int show_number
, vertical
, pointer_motion_range
, pixels
;
67 int keypress_tooltip_timer
;
71 int min_pixel
, max_pixel
;
72 int text_line
, text_height
;
74 char caption
[BCTEXTLEN
];
75 char temp_tooltip_text
[BCTEXTLEN
];
81 class BC_ISlider
: public BC_Slider
88 int pointer_motion_range
,
96 int update(int64_t value
);
97 int update(int pointer_motion_range
, int64_t value
, int64_t minvalue
, int64_t maxvalue
);
100 int increase_value();
101 int decrease_value();
102 virtual int handle_event();
106 int value_to_pixel();
107 int init_selection(int cursor_x
, int cursor_y
);
108 int update_selection(int cursor_x
, int cursor_y
);
109 int64_t minvalue
, maxvalue
, value
;
113 class BC_FSlider
: public BC_Slider
120 int pointer_motion_range
,
127 friend class BC_PercentageSlider
;
129 int update(float value
);
130 int update(int pointer_motion_range
, float value
, float minvalue
, float maxvalue
);
133 virtual int increase_value();
134 virtual int decrease_value();
135 virtual char* get_caption();
136 void set_precision(float value
);
139 int value_to_pixel();
140 int init_selection(int cursor_x
, int cursor_y
);
141 int update_selection(int cursor_x
, int cursor_y
);
142 float minvalue
, maxvalue
, value
;
146 class BC_PercentageSlider
: public BC_FSlider
149 BC_PercentageSlider(int x
,
153 int pointer_motion_range
,
160 virtual int increase_value();
161 virtual int decrease_value();