vlm_panel.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlm_panel.hpp: Header for the VLM panel
00003  *****************************************************************************
00004  * Copyright (C) 1999-2005 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Clément Stenac <zorglub@videolan.org>
00008  *
00009  * This program is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2 of the License, or
00012  * (at your option) any later version.
00013  *
00014  * This program is distributed in the hope that it will be useful,
00015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  * GNU General Public License for more details.
00018  *
00019  * You should have received a copy of the GNU General Public License
00020  * along with this program; if not, write to the Free Software
00021  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00022  *****************************************************************************/
00023 
00024 #ifndef _WXVLC_VLMPANEL_H_
00025 #define _WXVLC_VLMPANEL_H_
00026 
00027 #include "wxwidgets.hpp"
00028 #include "dialogs/open.hpp"
00029 #include "dialogs/streamout.hpp"
00030 #include <wx/notebook.h>
00031 
00032 #include <vector>
00033 using namespace std;
00034 
00035 
00036 class VLMWrapper;
00037 class VLMStream;
00038 class VLMBroadcastStream;
00039 class VLMVODStream;
00040 
00041 namespace wxvlc
00042 {
00043     class VLMStreamPanel;
00044     class VLMBroadcastStreamPanel;
00045     class VLMVODStreamPanel;
00046 
00047     /** This class is the panel to add or edit a VLM stream
00048      * It can be embedded in the main VLM panel or on a separate frame
00049      */
00050     class VLMAddStreamPanel : public wxPanel
00051     {
00052     public:
00053         VLMAddStreamPanel( intf_thread_t *, wxWindow *, VLMWrapper *,
00054                            bool, bool );
00055         virtual ~VLMAddStreamPanel();
00056         void Load( VLMStream *);
00057     private:
00058         void OnCreate( wxCommandEvent& );
00059         void OnClear( wxCommandEvent& );
00060         void OnChooseInput( wxCommandEvent& );
00061         void OnChooseOutput( wxCommandEvent& );
00062 
00063         wxTextCtrl *name_text;
00064         wxTextCtrl *input_text;
00065         wxTextCtrl *output_text;
00066 
00067         wxCheckBox *enabled_checkbox;
00068         wxCheckBox *loop_checkbox;
00069 
00070         intf_thread_t *p_intf;
00071         VLMWrapper *p_vlm;
00072 
00073         wxWindow *p_parent;
00074 
00075         bool b_edit, b_broadcast;
00076 
00077         OpenDialog *p_open_dialog;
00078         SoutDialog *p_sout_dialog;
00079 
00080         DECLARE_EVENT_TABLE();
00081     };
00082 
00083     /**
00084      * This class is the main VLM Manager panel
00085      */
00086     class VLMPanel : public wxPanel
00087     {
00088     public:
00089         VLMPanel( intf_thread_t *p_intf, wxWindow * );
00090         virtual ~VLMPanel();
00091 
00092         void Update();
00093 
00094     protected:
00095 
00096     private:
00097         VLMWrapper *p_vlm;
00098         intf_thread_t *p_intf;
00099         wxWindow *p_parent;
00100 
00101         wxFileDialog *p_file_dialog;
00102         wxTimer timer;
00103         void OnTimer( wxTimerEvent &);
00104         void OnClose( wxCommandEvent& );
00105         void OnLoad( wxCommandEvent& );
00106         void OnSave( wxCommandEvent& );
00107 
00108         /** Notebook */
00109         wxNotebook *p_notebook;
00110         DECLARE_EVENT_TABLE();
00111 
00112         /* Broadcast stuff */
00113         vector<VLMBroadcastStreamPanel *> broadcasts;
00114         wxPanel *broadcasts_panel;
00115         wxBoxSizer *broadcasts_sizer;
00116         wxScrolledWindow *scrolled_broadcasts;
00117         wxBoxSizer *scrolled_broadcasts_sizer;
00118         wxPanel *BroadcastPanel( wxWindow *);
00119         wxPanel *AddBroadcastPanel( wxPanel *);
00120         void AppendBroadcast( VLMBroadcastStream *);
00121         void RemoveBroadcast( VLMBroadcastStreamPanel *);
00122 
00123         /* VOD stuff */
00124         vector<VLMVODStreamPanel *> vods;
00125         wxPanel *vods_panel;
00126         wxBoxSizer *vods_sizer;
00127         wxScrolledWindow *scrolled_vods;
00128         wxBoxSizer *scrolled_vods_sizer;
00129         wxPanel *VODPanel( wxWindow *);
00130         wxPanel *AddVODPanel( wxPanel *);
00131         void AppendVOD( VLMVODStream *);
00132         void RemoveVOD( VLMVODStreamPanel *);
00133 
00134     };
00135 
00136     /** This class is the standard VLM frame
00137      * It only consists of the VLM panel
00138      */
00139     class VLMFrame: public wxFrame
00140     {
00141     public:
00142         VLMFrame( intf_thread_t *p_intf, wxWindow * );
00143         virtual ~VLMFrame();
00144 
00145         void Update();
00146         void OnClose( wxCloseEvent& );
00147     private:
00148         VLMPanel *vlm_panel;
00149         DECLARE_EVENT_TABLE();
00150     };
00151 
00152     /** This class is the edit dialog for a stream
00153      * It only consists of the VLM edit panel
00154      */
00155     class VLMEditStreamFrame: public wxFrame
00156     {
00157     public:
00158         VLMEditStreamFrame( intf_thread_t *p_intf, wxWindow *,
00159                             VLMWrapper * , bool, VLMStream * );
00160         virtual ~VLMEditStreamFrame();
00161 
00162     private:
00163         VLMAddStreamPanel *vlm_panel;
00164     };
00165 };
00166 
00167 #endif

Generated on Wed Aug 13 08:02:38 2008 for VLC by  doxygen 1.5.1