1 /*****************************************************************************
3 *****************************************************************************
4 * Copyright (C) 2003 the VideoLAN team
7 * Authors: Cyril Deguet <asmax@via.ecp.fr>
8 * Olivier Teulière <ipkiss@via.ecp.fr>
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 along
21 * with this program; if not, write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
25 #ifndef CMD_DIALOGS_HPP
26 #define CMD_DIALOGS_HPP
28 #include "cmd_generic.hpp"
29 #include "../src/dialogs.hpp"
30 #include "cmd_change_skin.hpp"
32 #include <vlc_interface.h>
35 #define DEFC( a, c ) \
36 class CmdDlg##a: public CmdGeneric \
38 CmdDlg##a( intf_thread_t *pIntf ): CmdGeneric( pIntf ) { } \
39 virtual ~CmdDlg##a() { } \
40 virtual void execute() \
42 Dialogs *dlg = Dialogs::instance( getIntf() ); \
45 virtual string getType() const { return #a" dialog"; } \
48 DEFC( ChangeSkin, showChangeSkin() )
49 DEFC( FileSimple, showFileSimple( true ) )
50 DEFC( File, showFile( true ) )
51 DEFC( Disc, showDisc( true ) )
52 DEFC( Net, showNet( true ) )
53 DEFC( Messages, showMessages() )
54 DEFC( Prefs, showPrefs() )
55 DEFC( FileInfo, showFileInfo() )
57 DEFC( Add, showFile( false ) )
58 DEFC( PlaylistLoad, showPlaylistLoad() )
59 DEFC( PlaylistSave, showPlaylistSave() )
60 DEFC( Directory, showDirectory( true ) )
61 DEFC( StreamingWizard, showStreamingWizard() )
62 DEFC( Playlist, showPlaylist() )
64 DEFC( ShowPopupMenu, showPopupMenu(true,INTF_DIALOG_POPUPMENU) )
65 DEFC( HidePopupMenu, showPopupMenu(false,INTF_DIALOG_POPUPMENU) )
66 DEFC( ShowAudioPopupMenu, showPopupMenu(true,INTF_DIALOG_AUDIOPOPUPMENU) )
67 DEFC( HideAudioPopupMenu, showPopupMenu(false,INTF_DIALOG_AUDIOPOPUPMENU) )
68 DEFC( ShowVideoPopupMenu, showPopupMenu(true,INTF_DIALOG_VIDEOPOPUPMENU) )
69 DEFC( HideVideoPopupMenu, showPopupMenu(false,INTF_DIALOG_VIDEOPOPUPMENU) )
70 DEFC( ShowMiscPopupMenu, showPopupMenu(true,INTF_DIALOG_MISCPOPUPMENU) )
71 DEFC( HideMiscPopupMenu, showPopupMenu(false,INTF_DIALOG_MISCPOPUPMENU) )
77 class CmdInteraction: public CmdGeneric
80 CmdInteraction( intf_thread_t *pIntf, interaction_dialog_t * p_dialog )
81 : CmdGeneric( pIntf ), m_pDialog( p_dialog ) { }
82 virtual ~CmdInteraction() { }
84 virtual void execute()
86 Dialogs *pDialogs = Dialogs::instance( getIntf() );
87 if( pDialogs != NULL )
88 pDialogs->showInteraction( m_pDialog );
90 virtual string getType() const { return "interaction"; }
92 interaction_dialog_t *m_pDialog;