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 virtual int has_signal();
44 // Get what inputs the device supports, one Channel structure for every input.
45 virtual ArrayList
<Channel
*>* get_video_inputs();
46 // Get a structure containing what parameters the device supports
47 Channel
* get_channel_usage();
49 // Set current picture state
50 virtual int set_brightness(int value
);
51 virtual int set_hue(int value
);
52 virtual int set_color(int value
);
53 virtual int set_contrast(int value
);
54 virtual int set_whiteness(int value
);
55 virtual int set_picture(int device_id
, int value
);
57 // Get the current state of the picture
58 virtual int get_brightness();
59 virtual int get_hue();
60 virtual int get_color();
61 virtual int get_contrast();
62 virtual int get_whiteness();
63 virtual int get_controls();
64 virtual PictureItem
* get_control(int i
);
65 // Get a structure containing what parameters the device supports
66 virtual PictureConfig
* get_picture_usage();
70 void update_channel_list();
74 char *get_source_name(Channel
*channel
); // Get the name of the source for a channel
75 char *current_channel_name(); // Get the name of the current channel of the device
80 Channel
*current_channel
;
83 RecordMonitor
*record_monitor
;
91 BC_WindowBase
*parent_window
;
92 ChannelText
*channel_text
;
93 ChannelList
*channel_list
;
94 ChannelButton
*channel_button
;
95 ChannelTumbler
*channel_select
;
96 ArrayList
<BC_ListBoxItem
*> channel_listitems
;
97 BC_Title
*channel_title
;
100 class PrefsChannelPicker
: public ChannelPicker
103 PrefsChannelPicker(MWindow
*mwindow
,
105 ChannelDB
*channeldb
,
108 ~PrefsChannelPicker();
110 BC_WindowBase
* get_subwindow();
112 // Get the current state of the channel
113 Channel
* get_current_channel_struct();
114 int get_current_channel_number();
115 // Set the current state of the channel
116 void set_channel(Channel
*channel
);
117 void set_channel_number(int number
);
119 // Get what inputs the device supports, one Channel structure for every input.
120 ArrayList
<Channel
*>* get_video_inputs();
121 // Get a structure containing what parameters the device supports
122 Channel
* get_channel_usage();
126 // Set current picture state
127 int set_brightness(int value
);
128 int set_hue(int value
);
129 int set_color(int value
);
130 int set_contrast(int value
);
131 int set_whiteness(int value
);
132 int set_picture(int device_id
, int value
);
134 // Get the current state of the picture
135 int get_brightness();
141 PictureItem
* get_control(int i
);
142 // Get a structure containing what parameters the device supports
143 virtual PictureConfig
* get_picture_usage();
145 ArrayList
<Channel
*> input_sources
;
149 class ChannelText
: public BC_PopupTextBox
152 ChannelText(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
158 ChannelPicker
*channel_picker
;
161 class ChannelList
: public BC_ListBox
164 ChannelList(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
169 ChannelPicker
*channel_picker
;
172 class ChannelTumbler
: public BC_Tumbler
175 ChannelTumbler(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
177 int handle_up_event();
178 int handle_down_event();
179 int keypress_event();
180 ChannelPicker
*channel_picker
;
184 class ChannelButton
: public BC_Button
187 ChannelButton(MWindow
*mwindow
, ChannelPicker
*channel_picker
, int x
, int y
);
191 ChannelPicker
*channel_picker
;
192 ChannelEditThread
*thread
;