]> git.sesse.net Git - vlc/blob - modules/gui/wxwidgets/input_manager.hpp
update module LIST file.
[vlc] / modules / gui / wxwidgets / input_manager.hpp
1 /*****************************************************************************
2  * input_manager.hpp: Header for input_manager
3  *****************************************************************************
4  * Copyright (C) 1999-2005 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Gildas Bazin <gbazin@videolan.org>
8  *          ClĂ©ment Stenac <zorglub@videolan.org>
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version.
14  *
15  * This program is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU General Public License for more details.
19  *
20  * You should have received a copy of the GNU General Public License
21  * along with this program; if not, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23  *****************************************************************************/
24
25 #ifndef _INPUT_MANAGER_H_
26 #define _INPUT_MANAGER_H_
27
28 #include "wxwidgets.hpp"
29
30 namespace wxvlc
31 {
32     class Interface;
33
34     /**
35      * This class manages all the controls related to the input
36      */
37     class InputManager : public wxPanel
38     {
39     public:
40         InputManager( intf_thread_t *, Interface *, wxWindow * );
41         virtual ~InputManager();
42
43         void Update();
44         vlc_bool_t IsPlaying();
45
46     protected:
47         void UpdateInput();
48         void UpdateNowPlaying();
49         void UpdateButtons( vlc_bool_t );
50         void UpdateDiscButtons();
51         void UpdateTime();
52
53         void HideSlider();
54         void ShowSlider( bool show = true );
55
56         void OnSliderUpdate( wxScrollEvent& event );
57
58         void OnDiscMenu( wxCommandEvent& event );
59         void OnDiscPrev( wxCommandEvent& event );
60         void OnDiscNext( wxCommandEvent& event );
61
62         void HideDiscFrame();
63         void ShowDiscFrame( bool show = true );
64
65         wxPanel         *disc_frame;
66         wxBoxSizer      *disc_sizer;
67         wxBitmapButton  *disc_menu_button;
68         wxBitmapButton  *disc_prev_button;
69         wxBitmapButton  *disc_next_button;
70
71         intf_thread_t * p_intf;
72         input_thread_t *p_input;
73         Interface * p_main_intf;
74
75         wxSlider *slider;            ///< Slider for this input
76         int i_slider_pos;            ///< Current slider position
77         vlc_bool_t b_slider_free;    ///< Slider status
78
79         wxBoxSizer *sizer;
80
81     private:
82         DECLARE_EVENT_TABLE();
83
84         int i_old_playing_status;    ///< Previous playing status
85         int i_old_rate;              ///< Previous playing rate
86
87         mtime_t i_input_hide_delay;  ///< Allows delaying slider hidding
88     };
89 };
90
91 #endif