vlm_streampanel.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlm_streampanel.hpp: Panel for a VLM stream
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 _VLM_STREAMPANEL_H_
00025 #define _VLM_STREAMPANEL_H_
00026 
00027 #include "wxwidgets.hpp"
00028 
00029 class VLMStream;
00030 class VLMBroadcastStream;
00031 class VLMVODStream;
00032 
00033 namespace wxvlc
00034 {
00035     class VLMSliderManager;
00036 
00037     /**
00038      * This class represents the panel for a VLM Stream
00039      * This class is abstract, it needs to be subclassed
00040      */
00041     class VLMStreamPanel : public wxPanel
00042     {
00043     public:
00044         VLMStreamPanel( intf_thread_t *, wxWindow * );
00045         virtual ~VLMStreamPanel();
00046 
00047         virtual void TogglePlayButton( int ) {};
00048         wxSlider  *p_slider;
00049 
00050         virtual void Update() = 0;
00051     protected:
00052         intf_thread_t *p_intf;
00053         bool b_free;
00054         bool b_new;               ///< Is it a new stream ?
00055         bool b_found;             ///< Have we found the stream here ?
00056         friend class VLMPanel;
00057 
00058 
00059     private:
00060     };
00061 
00062     /**
00063      * This class represents the panel for a Broadcast VLM Stream
00064      */
00065     class VLMBroadcastStreamPanel : public VLMStreamPanel
00066     {
00067     public:
00068         VLMBroadcastStreamPanel( intf_thread_t *, wxWindow *,
00069                                  VLMBroadcastStream * );
00070         virtual ~VLMBroadcastStreamPanel();
00071         VLMBroadcastStream *GetStream() { return p_stream; }
00072 
00073         bool b_slider_free;
00074 
00075         VLMSliderManager *p_sm;
00076 
00077         virtual void Update();
00078 
00079         virtual void TogglePlayButton( int );
00080     protected:
00081 
00082     private:
00083         VLMBroadcastStream *p_stream;
00084         DECLARE_EVENT_TABLE();
00085 
00086         void OnPlay( wxCommandEvent &);
00087         void OnStop( wxCommandEvent &);
00088         void OnEdit( wxCommandEvent &);
00089         void OnTrash( wxCommandEvent &);
00090         void OnSliderUpdate( wxScrollEvent &);
00091 
00092 
00093         wxBitmapButton *play_button;
00094 
00095         wxStaticText *p_time;
00096     };
00097 
00098     /**
00099      * This class represents the panel for a VOD VLM Stream
00100      */
00101     class VLMVODStreamPanel : public VLMStreamPanel
00102     {
00103     public:
00104         VLMVODStreamPanel( intf_thread_t *, wxWindow *,
00105                                  VLMVODStream * );
00106         virtual ~VLMVODStreamPanel();
00107 
00108         VLMVODStream *GetStream() { return p_stream; }
00109 
00110         virtual void Update() {}
00111     protected:
00112 
00113     private:
00114         VLMVODStream *p_stream;
00115     };
00116 };
00117 
00118 #endif

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