cmd_dialogs.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * cmd_dialogs.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: aa38e3125d3e48b2dd23ebf92c1d7f0c441ed10b $
00006  *
00007  * Authors: Cyril Deguet     <asmax@via.ecp.fr>
00008  *          Olivier Teulière <ipkiss@via.ecp.fr>
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 along
00021  * with this program; if not, write to the Free Software Foundation, Inc.,
00022  * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef CMD_DIALOGS_HPP
00026 #define CMD_DIALOGS_HPP
00027 
00028 #include "cmd_generic.hpp"
00029 #include "../src/dialogs.hpp"
00030 #include "cmd_change_skin.hpp"
00031 
00032 #include <vlc_interface.h>
00033 
00034 
00035 #define DEFC( a, c ) \
00036 class CmdDlg##a: public CmdGeneric                              \
00037 {   public:                                                     \
00038     CmdDlg##a( intf_thread_t *pIntf ): CmdGeneric( pIntf ) { }  \
00039     virtual ~CmdDlg##a() { }                                    \
00040     virtual void execute()                                      \
00041     {                                                           \
00042         Dialogs *dlg = Dialogs::instance( getIntf() );          \
00043         if( dlg ) dlg->c;                                       \
00044     }                                                           \
00045     virtual string getType() const { return #a" dialog"; }      \
00046 };
00047 
00048 DEFC( ChangeSkin,         showChangeSkin() )
00049 DEFC( FileSimple,         showFileSimple( true ) )
00050 DEFC( File,               showFile( true ) )
00051 DEFC( Disc,               showDisc( true ) )
00052 DEFC( Net,                showNet( true ) )
00053 DEFC( Messages,           showMessages() )
00054 DEFC( Prefs,              showPrefs() )
00055 DEFC( FileInfo,           showFileInfo() )
00056 
00057 DEFC( Add,                showFile( false ) )
00058 DEFC( PlaylistLoad,       showPlaylistLoad() )
00059 DEFC( PlaylistSave,       showPlaylistSave() )
00060 DEFC( Directory,          showDirectory( true ) )
00061 DEFC( StreamingWizard,    showStreamingWizard() )
00062 DEFC( Playlist,           showPlaylist() )
00063 
00064 DEFC( ShowPopupMenu,      showPopupMenu(true,INTF_DIALOG_POPUPMENU) )
00065 DEFC( HidePopupMenu,      showPopupMenu(false,INTF_DIALOG_POPUPMENU) )
00066 DEFC( ShowAudioPopupMenu, showPopupMenu(true,INTF_DIALOG_AUDIOPOPUPMENU) )
00067 DEFC( HideAudioPopupMenu, showPopupMenu(false,INTF_DIALOG_AUDIOPOPUPMENU) )
00068 DEFC( ShowVideoPopupMenu, showPopupMenu(true,INTF_DIALOG_VIDEOPOPUPMENU) )
00069 DEFC( HideVideoPopupMenu, showPopupMenu(false,INTF_DIALOG_VIDEOPOPUPMENU) )
00070 DEFC( ShowMiscPopupMenu,  showPopupMenu(true,INTF_DIALOG_MISCPOPUPMENU) )
00071 DEFC( HideMiscPopupMenu,  showPopupMenu(false,INTF_DIALOG_MISCPOPUPMENU) )
00072 
00073 #undef DEFC
00074 
00075 class CmdInteraction: public CmdGeneric
00076 {
00077 public:
00078     CmdInteraction( intf_thread_t *pIntf, interaction_dialog_t * p_dialog )
00079                   : CmdGeneric( pIntf ), m_pDialog( p_dialog ) { }
00080     virtual ~CmdInteraction() { }
00081 
00082     virtual void execute()
00083     {
00084         Dialogs *pDialogs = Dialogs::instance( getIntf() );
00085         if( pDialogs != NULL )
00086             pDialogs->showInteraction( m_pDialog );
00087     }
00088     virtual string getType() const { return "interaction"; }
00089 private:
00090     interaction_dialog_t *m_pDialog;
00091 };
00092 
00093 #endif

Generated on Tue May 25 08:04:58 2010 for VLC by  doxygen 1.5.6