1 #ifndef CHANNELPICKER_H
2 #define CHANNELPICKER_H
6 #include "channeldb.inc"
7 #include "channeledit.inc"
11 #include "recordmonitor.inc"
12 #include "vdeviceprefs.inc"
26 ChannelPicker(MWindow
*mwindow
,
28 RecordMonitor
*record_monitor
,
32 virtual ~ChannelPicker();
34 virtual BC_WindowBase
* get_subwindow();
37 // Get the current state of the channel
38 virtual Channel
* get_current_channel_struct();
39 virtual int get_current_channel_number();
40 // Set the current state of the channel
41 virtual void set_channel_number(int number
);
42 virtual void set_channel(Channel
*channel
);
43 // Get what inputs the device supports, one Channel structure for every input.
44 virtual ArrayList
<Channel
*>* get_video_inputs();
45 // Get a structure containing what parameters the device supports
46 Channel
* get_channel_usage();
48 // Set current picture state
49 virtual int set_brightness(int value
);
50 virtual int set_hue(int value
);
51 virtual int set_color(int value
);
52 virtual int set_contrast(int value
);
53 virtual int set_whiteness(int value
);
54 virtual int set_picture(int device_id
, int value
);
56 // Get the current state of the picture
57 virtual int get_brightness();
58 virtual int get_hue();
59 virtual int get_color();
60 virtual int get_contrast();
61 virtual int get_whiteness();
62 virtual int get_controls();
63 virtual PictureItem
* get_control(int i
);
64 // Get a structure containing what parameters the device supports
65 virtual Picture
* get_picture_usage();
69 void update_channel_list();
73 char *get_source_name(Channel
*channel
); // Get the name of the source for a channel
74 char *current_channel_name(); // Get the name of the current channel of the device
79 Channel
*current_channel
;
82 RecordMonitor
*record_monitor
;
90 BC_WindowBase
*parent_window
;
91 ChannelText
*channel_text
;
92 ChannelList
*channel_list
;
93 ChannelButton
*channel_button
;
94 ChannelTumbler
*channel_select
;
95 ArrayList
<BC_ListBoxItem
*> channel_listitems
;
96 BC_Title
*channel_title
;
99 class PrefsChannelPicker
: public ChannelPicker
102 PrefsChannelPicker(MWindow
*mwindow
,
104 ChannelDB
*channeldb
,
107 ~PrefsChannelPicker();
109 BC_WindowBase
* get_subwindow();
111 // Get the current state of the channel
112 Channel
* get_current_channel_struct();
113 int get_current_channel_number();
114 // Set the current state of the channel
115 void set_channel(Channel
*channel
);
116 void set_channel_number(int number
);
117 // Get what inputs the device supports, one Channel structure for every input.
118 ArrayList
<Channel
*>* get_video_inputs();
119 // Get a structure containing what parameters the device supports
120 Channel
* get_channel_usage();
124 // Set current picture state
125 int set_brightness(int value
);
126 int set_hue(int value
);
127 int set_color(int value
);
128 int set_contrast(int value
);
129 int set_whiteness(int value
);
130 int set_picture(int device_id
, int value
);
132 // Get the current state of the picture
133 int get_brightness();
139 PictureItem
* get_control(int i
);
140 // Get a structure containing what parameters the device supports
141 virtual Picture
* get_picture_usage();
143 ArrayList
<Channel
*> input_sources
;
147 class ChannelText
: public BC_PopupTextBox
150 ChannelText(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
156 ChannelPicker
*channel_picker
;
159 class ChannelList
: public BC_ListBox
162 ChannelList(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
167 ChannelPicker
*channel_picker
;
170 class ChannelTumbler
: public BC_Tumbler
173 ChannelTumbler(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
175 int handle_up_event();
176 int handle_down_event();
177 int keypress_event();
178 ChannelPicker
*channel_picker
;
182 class ChannelButton
: public BC_Button
185 ChannelButton(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
189 ChannelPicker
*channel_picker
;
190 ChannelEditThread
*thread
;