Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

channelpicker.h

Go to the documentation of this file.
00001 #ifndef CHANNELPICKER_H
00002 #define CHANNELPICKER_H
00003 
00004 #include "guicast.h"
00005 #include "channel.inc"
00006 #include "channeldb.inc"
00007 #include "channeledit.inc"
00008 #include "mwindow.inc"
00009 #include "picture.inc"
00010 #include "record.inc"
00011 #include "recordmonitor.inc"
00012 #include "vdeviceprefs.inc"
00013 
00014 class ChannelList;
00015 class ChannelText;
00016 class ChannelTumbler;
00017 class ChannelButton;
00018 class UpChannel;
00019 class DnChannel;
00020 
00021 
00022 
00023 class ChannelPicker
00024 {
00025 public:
00026         ChannelPicker(MWindow *mwindow, 
00027                 Record *record, 
00028                 RecordMonitor *record_monitor,
00029                 ChannelDB *channeldb, 
00030                 int x,
00031                 int y);
00032         virtual ~ChannelPicker();
00033 
00034         virtual BC_WindowBase* get_subwindow();
00035 
00036 
00037 // Get the current state of the channel
00038         virtual Channel* get_current_channel_struct();
00039         virtual int get_current_channel_number();
00040 // Set the current state of the channel
00041         virtual void set_channel_number(int number);
00042         virtual void set_channel(Channel *channel);
00043         virtual int has_signal();
00044 // Get what inputs the device supports, one Channel structure for every input.
00045         virtual ArrayList<Channel*>* get_video_inputs();
00046 // Get a structure containing what parameters the device supports
00047         Channel* get_channel_usage();
00048 
00049 // Set current picture state
00050         virtual int set_brightness(int value);
00051         virtual int set_hue(int value);
00052         virtual int set_color(int value);
00053         virtual int set_contrast(int value);
00054         virtual int set_whiteness(int value);
00055         virtual int set_picture(int device_id, int value);
00056 
00057 // Get the current state of the picture
00058         virtual int get_brightness();
00059         virtual int get_hue();
00060         virtual int get_color();
00061         virtual int get_contrast();
00062         virtual int get_whiteness();
00063         virtual int get_controls();
00064         virtual PictureItem* get_control(int i);
00065 // Get a structure containing what parameters the device supports
00066         virtual PictureConfig* get_picture_usage();
00067 
00068         
00069 
00070         void update_channel_list();
00071         int create_objects();
00072         int reposition();
00073         int close_threads();
00074         char *get_source_name(Channel *channel);  // Get the name of the source for a channel
00075         char *current_channel_name();    // Get the name of the current channel of the device
00076         int channel_up();
00077         int channel_down();
00078 
00079         int x, y;
00080         Channel *current_channel;
00081         MWindow *mwindow;
00082         Record *record;
00083         RecordMonitor *record_monitor;
00084         ChannelDB *channeldb;
00085 
00086 
00087 
00088 
00089 
00090 
00091         BC_WindowBase *parent_window;
00092         ChannelText *channel_text;
00093         ChannelList *channel_list;
00094         ChannelButton *channel_button;
00095         ChannelTumbler *channel_select;
00096         ArrayList <BC_ListBoxItem*> channel_listitems;
00097         BC_Title *channel_title;
00098 };
00099 
00100 class PrefsChannelPicker : public ChannelPicker
00101 {
00102 public:
00103         PrefsChannelPicker(MWindow *mwindow, 
00104                 VDevicePrefs *prefs, 
00105                 ChannelDB *channeldb, 
00106                 int x,
00107                 int y);
00108         ~PrefsChannelPicker();
00109         
00110         BC_WindowBase* get_subwindow();
00111 
00112 // Get the current state of the channel
00113         Channel* get_current_channel_struct();
00114         int get_current_channel_number();
00115 // Set the current state of the channel
00116         void set_channel(Channel *channel);
00117         void set_channel_number(int number);
00118         int has_signal();
00119 // Get what inputs the device supports, one Channel structure for every input.
00120         ArrayList<Channel*>* get_video_inputs();
00121 // Get a structure containing what parameters the device supports
00122         Channel* get_channel_usage();
00123 
00124 
00125 
00126 // Set current picture state
00127         int set_brightness(int value);
00128         int set_hue(int value);
00129         int set_color(int value);
00130         int set_contrast(int value);
00131         int set_whiteness(int value);
00132         int set_picture(int device_id, int value);
00133 
00134 // Get the current state of the picture
00135         int get_brightness();
00136         int get_hue();
00137         int get_color();
00138         int get_contrast();
00139         int get_whiteness();
00140         int get_controls();
00141         PictureItem* get_control(int i);
00142 // Get a structure containing what parameters the device supports
00143         virtual PictureConfig* get_picture_usage();
00144 
00145         ArrayList<Channel*> input_sources;      
00146         VDevicePrefs *prefs;
00147 };
00148 
00149 class ChannelText : public BC_PopupTextBox
00150 {
00151 public:
00152         ChannelText(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
00153         ~ChannelText();
00154         
00155         int handle_event();
00156 
00157         MWindow *mwindow;
00158         ChannelPicker *channel_picker;
00159 };
00160 
00161 class ChannelList : public BC_ListBox
00162 {
00163 public:
00164         ChannelList(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
00165         ~ChannelList();
00166         
00167         int handle_event();
00168         MWindow *mwindow;
00169         ChannelPicker *channel_picker;
00170 };
00171 
00172 class ChannelTumbler : public BC_Tumbler
00173 {
00174 public:
00175         ChannelTumbler(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
00176         ~ChannelTumbler();
00177         int handle_up_event();
00178         int handle_down_event();
00179         int keypress_event();
00180         ChannelPicker *channel_picker;
00181         MWindow *mwindow;
00182 };
00183 
00184 class ChannelButton : public BC_Button
00185 {
00186 public:
00187         ChannelButton(MWindow *mwindow, ChannelPicker *channel_picker, int x, int y);
00188         ~ChannelButton();
00189         int handle_event();
00190         MWindow *mwindow;
00191         ChannelPicker *channel_picker;
00192         ChannelEditThread *thread;
00193 };
00194 
00195 #endif

Generated on Sun Jan 8 13:38:51 2006 for Cinelerra-svn by  doxygen 1.4.4