1 /*****************************************************************************
2 * input_manager.hpp: Header for input_manager
3 *****************************************************************************
4 * Copyright (C) 1999-2005 the VideoLAN team
7 * Authors: Gildas Bazin <gbazin@videolan.org>
8 * Clément Stenac <zorglub@videolan.org>
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.
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.
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 *****************************************************************************/
25 #ifndef _INPUT_MANAGER_H_
26 #define _INPUT_MANAGER_H_
28 #include "wxwidgets.hpp"
35 * This class manages all the controls related to the input
37 class InputManager : public wxPanel
40 InputManager( intf_thread_t *, Interface *, wxWindow * );
41 virtual ~InputManager();
44 vlc_bool_t IsPlaying();
48 void UpdateNowPlaying();
49 void UpdateButtons( vlc_bool_t );
50 void UpdateDiscButtons();
54 void ShowSlider( bool show = true );
56 void OnSliderUpdate( wxScrollEvent& event );
57 void OnSliderClick( wxMouseEvent& event );
59 void OnDiscMenu( wxCommandEvent& event );
60 void OnDiscPrev( wxCommandEvent& event );
61 void OnDiscNext( wxCommandEvent& event );
64 void ShowDiscFrame( bool show = true );
67 wxBoxSizer *disc_sizer;
68 wxBitmapButton *disc_menu_button;
69 wxBitmapButton *disc_prev_button;
70 wxBitmapButton *disc_next_button;
72 intf_thread_t * p_intf;
73 input_thread_t *p_input;
74 Interface * p_main_intf;
76 wxSlider *slider; ///< Slider for this input
77 int i_slider_pos; ///< Current slider position
78 vlc_bool_t b_slider_free; ///< Slider status
83 DECLARE_EVENT_TABLE();
85 int i_old_playing_status; ///< Previous playing status
86 int i_old_rate; ///< Previous playing rate
88 mtime_t i_input_hide_delay; ///< Allows delaying slider hidding