]> git.sesse.net Git - vlc/blob - modules/gui/wxwidgets/dialogs/vlm/vlm_streampanel.hpp
Merge branch 'master' of git@git.videolan.org:vlc
[vlc] / modules / gui / wxwidgets / dialogs / vlm / vlm_streampanel.hpp
1 /*****************************************************************************
2  * vlm_streampanel.hpp: Panel for a VLM stream
3  *****************************************************************************
4  * Copyright (C) 1999-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #ifndef _VLM_STREAMPANEL_H_
25 #define _VLM_STREAMPANEL_H_
26
27 #include "wxwidgets.hpp"
28
29 class VLMStream;
30 class VLMBroadcastStream;
31 class VLMVODStream;
32
33 namespace wxvlc
34 {
35     class VLMSliderManager;
36
37     /**
38      * This class represents the panel for a VLM Stream
39      * This class is abstract, it needs to be subclassed
40      */
41     class VLMStreamPanel : public wxPanel
42     {
43     public:
44         VLMStreamPanel( intf_thread_t *, wxWindow * );
45         virtual ~VLMStreamPanel();
46
47         virtual void TogglePlayButton( int ) {};
48         wxSlider  *p_slider;
49
50         virtual void Update() = 0;
51     protected:
52         intf_thread_t *p_intf;
53         bool b_free;
54         bool b_new;               ///< Is it a new stream ?
55         bool b_found;             ///< Have we found the stream here ?
56         friend class VLMPanel;
57
58
59     private:
60     };
61
62     /**
63      * This class represents the panel for a Broadcast VLM Stream
64      */
65     class VLMBroadcastStreamPanel : public VLMStreamPanel
66     {
67     public:
68         VLMBroadcastStreamPanel( intf_thread_t *, wxWindow *,
69                                  VLMBroadcastStream * );
70         virtual ~VLMBroadcastStreamPanel();
71         VLMBroadcastStream *GetStream() { return p_stream; }
72
73         bool b_slider_free;
74
75         VLMSliderManager *p_sm;
76
77         virtual void Update();
78
79         virtual void TogglePlayButton( int );
80     protected:
81
82     private:
83         VLMBroadcastStream *p_stream;
84         DECLARE_EVENT_TABLE();
85
86         void OnPlay( wxCommandEvent &);
87         void OnStop( wxCommandEvent &);
88         void OnEdit( wxCommandEvent &);
89         void OnTrash( wxCommandEvent &);
90         void OnSliderUpdate( wxScrollEvent &);
91
92
93         wxBitmapButton *play_button;
94
95         wxStaticText *p_time;
96     };
97
98     /**
99      * This class represents the panel for a VOD VLM Stream
100      */
101     class VLMVODStreamPanel : public VLMStreamPanel
102     {
103     public:
104         VLMVODStreamPanel( intf_thread_t *, wxWindow *,
105                                  VLMVODStream * );
106         virtual ~VLMVODStreamPanel();
107
108         VLMVODStream *GetStream() { return p_stream; }
109
110         virtual void Update() {}
111     protected:
112
113     private:
114         VLMVODStream *p_stream;
115     };
116 };
117
118 #endif