input_manager.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * input_manager.hpp: Header for input_manager
00003  *****************************************************************************
00004  * Copyright (C) 1999-2005 the VideoLAN team
00005  * $Id$
00006  *
00007  * Authors: Gildas Bazin <gbazin@videolan.org>
00008  *          Clément Stenac <zorglub@videolan.org>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  *
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef _INPUT_MANAGER_H_
00026 #define _INPUT_MANAGER_H_
00027 
00028 #include "wxwidgets.hpp"
00029 
00030 namespace wxvlc
00031 {
00032     class Interface;
00033 
00034     /**
00035      * This class manages all the controls related to the input
00036      */
00037     class InputManager : public wxPanel
00038     {
00039     public:
00040         InputManager( intf_thread_t *, Interface *, wxWindow * );
00041         virtual ~InputManager();
00042 
00043         void Update();
00044         bool IsPlaying();
00045 
00046     protected:
00047         void UpdateInput();
00048         void UpdateNowPlaying();
00049         void UpdateButtons( bool );
00050         void UpdateDiscButtons();
00051         void UpdateTime();
00052 
00053         void HideSlider();
00054         void ShowSlider( bool show = true );
00055 
00056         void OnSliderUpdate( wxScrollEvent& event );
00057 
00058         void OnDiscMenu( wxCommandEvent& event );
00059         void OnDiscPrev( wxCommandEvent& event );
00060         void OnDiscNext( wxCommandEvent& event );
00061 
00062         void HideDiscFrame();
00063         void ShowDiscFrame( bool show = true );
00064 
00065         wxPanel         *disc_frame;
00066         wxBoxSizer      *disc_sizer;
00067         wxBitmapButton  *disc_menu_button;
00068         wxBitmapButton  *disc_prev_button;
00069         wxBitmapButton  *disc_next_button;
00070 
00071         intf_thread_t * p_intf;
00072         input_thread_t *p_input;
00073         Interface * p_main_intf;
00074 
00075         wxSlider *slider;            ///< Slider for this input
00076         int i_slider_pos;            ///< Current slider position
00077         bool b_slider_free;    ///< Slider status
00078 
00079         wxBoxSizer *sizer;
00080 
00081     private:
00082         DECLARE_EVENT_TABLE();
00083 
00084         int i_old_playing_status;    ///< Previous playing status
00085         int i_old_rate;              ///< Previous playing rate
00086 
00087         mtime_t i_input_hide_delay;  ///< Allows delaying slider hidding
00088     };
00089 };
00090 
00091 #endif

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