r663: This commit was generated by cvs2svn to compensate for changes in r662,
[cinelerra_cv.git] / cinelerra / channelpicker.h
blob5f359cc8688e9a7090ae05260954f7637733f77d
1 #ifndef CHANNELPICKER_H
2 #define CHANNELPICKER_H
4 #include "guicast.h"
5 #include "channel.inc"
6 #include "channeldb.inc"
7 #include "channeledit.inc"
8 #include "mwindow.inc"
9 #include "picture.inc"
10 #include "record.inc"
11 #include "recordmonitor.inc"
12 #include "vdeviceprefs.inc"
14 class ChannelList;
15 class ChannelText;
16 class ChannelTumbler;
17 class ChannelButton;
18 class UpChannel;
19 class DnChannel;
23 class ChannelPicker
25 public:
26 ChannelPicker(MWindow *mwindow,
27 Record *record,
28 RecordMonitor *record_monitor,
29 ChannelDB *channeldb,
30 int x,
31 int y);
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();
71 int create_objects();
72 int reposition();
73 int close_threads();
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
76 int channel_up();
77 int channel_down();
79 int x, y;
80 Channel *current_channel;
81 MWindow *mwindow;
82 Record *record;
83 RecordMonitor *record_monitor;
84 ChannelDB *channeldb;
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
102 public:
103 PrefsChannelPicker(MWindow *mwindow,
104 VDevicePrefs *prefs,
105 ChannelDB *channeldb,
106 int x,
107 int y);
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);
118 int has_signal();
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();
136 int get_hue();
137 int get_color();
138 int get_contrast();
139 int get_whiteness();
140 int get_controls();
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;
146 VDevicePrefs *prefs;
149 class ChannelText : public BC_PopupTextBox
151 public:
152 ChannelText(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
153 ~ChannelText();
155 int handle_event();
157 MWindow *mwindow;
158 ChannelPicker *channel_picker;
161 class ChannelList : public BC_ListBox
163 public:
164 ChannelList(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
165 ~ChannelList();
167 int handle_event();
168 MWindow *mwindow;
169 ChannelPicker *channel_picker;
172 class ChannelTumbler : public BC_Tumbler
174 public:
175 ChannelTumbler(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
176 ~ChannelTumbler();
177 int handle_up_event();
178 int handle_down_event();
179 int keypress_event();
180 ChannelPicker *channel_picker;
181 MWindow *mwindow;
184 class ChannelButton : public BC_Button
186 public:
187 ChannelButton(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
188 ~ChannelButton();
189 int handle_event();
190 MWindow *mwindow;
191 ChannelPicker *channel_picker;
192 ChannelEditThread *thread;
195 #endif