r602: Fix baver's code... don't insert timecode when show_tc is not set
[cinelerra_cv/mob.git] / cinelerra / channelpicker.h
blobe353c8db32a18a218d24f7811dcd0e962626c79c
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 // 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();
70 int create_objects();
71 int reposition();
72 int close_threads();
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
75 int channel_up();
76 int channel_down();
78 int x, y;
79 Channel *current_channel;
80 MWindow *mwindow;
81 Record *record;
82 RecordMonitor *record_monitor;
83 ChannelDB *channeldb;
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
101 public:
102 PrefsChannelPicker(MWindow *mwindow,
103 VDevicePrefs *prefs,
104 ChannelDB *channeldb,
105 int x,
106 int y);
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();
134 int get_hue();
135 int get_color();
136 int get_contrast();
137 int get_whiteness();
138 int get_controls();
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;
144 VDevicePrefs *prefs;
147 class ChannelText : public BC_PopupTextBox
149 public:
150 ChannelText(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
151 ~ChannelText();
153 int handle_event();
155 MWindow *mwindow;
156 ChannelPicker *channel_picker;
159 class ChannelList : public BC_ListBox
161 public:
162 ChannelList(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
163 ~ChannelList();
165 int handle_event();
166 MWindow *mwindow;
167 ChannelPicker *channel_picker;
170 class ChannelTumbler : public BC_Tumbler
172 public:
173 ChannelTumbler(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
174 ~ChannelTumbler();
175 int handle_up_event();
176 int handle_down_event();
177 int keypress_event();
178 ChannelPicker *channel_picker;
179 MWindow *mwindow;
182 class ChannelButton : public BC_Button
184 public:
185 ChannelButton(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
186 ~ChannelButton();
187 int handle_event();
188 MWindow *mwindow;
189 ChannelPicker *channel_picker;
190 ChannelEditThread *thread;
193 #endif