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>
34 #define DEFINE_DIALOGS \
35 DEF( ChangeSkin, showChangeSkin() ) \
36 DEF( FileSimple, showFileSimple( true ) ) \
37 DEF( File, showFile( true ) ) \
38 DEF( Disc, showDisc( true ) ) \
39 DEF( Net, showNet( true ) ) \
40 DEF( Messages, showMessages() ) \
41 DEF( Prefs, showPrefs() ) \
42 DEF( FileInfo, showFileInfo() ) \
44 DEF( Add, showFile( false ) ) \
45 DEF( PlaylistLoad, showPlaylistLoad() ) \
46 DEF( PlaylistSave, showPlaylistSave() ) \
47 DEF( Directory, showDirectory( true ) ) \
48 DEF( StreamingWizard, showStreamingWizard() ) \
49 DEF( Playlist, showPlaylist() ) \
51 DEF( ShowPopupMenu, showPopupMenu(true,INTF_DIALOG_POPUPMENU) ) \
52 DEF( HidePopupMenu, showPopupMenu(false,INTF_DIALOG_POPUPMENU) ) \
53 DEF( ShowAudioPopupMenu, showPopupMenu(true,INTF_DIALOG_AUDIOPOPUPMENU) ) \
54 DEF( HideAudioPopupMenu, showPopupMenu(false,INTF_DIALOG_AUDIOPOPUPMENU) ) \
55 DEF( ShowVideoPopupMenu, showPopupMenu(true,INTF_DIALOG_VIDEOPOPUPMENU) ) \
56 DEF( HideVideoPopupMenu, showPopupMenu(false,INTF_DIALOG_VIDEOPOPUPMENU) ) \
57 DEF( ShowMiscPopupMenu, showPopupMenu(true,INTF_DIALOG_MISCPOPUPMENU) ) \
58 DEF( HideMiscPopupMenu, showPopupMenu(false,INTF_DIALOG_MISCPOPUPMENU) )
61 class CmdDlg##a: public CmdGeneric \
63 CmdDlg##a( intf_thread_t *pIntf ): CmdGeneric( pIntf ) { } \
64 virtual ~CmdDlg##a() { } \
65 virtual void execute() \
67 Dialogs *dlg = Dialogs::instance( getIntf() ); \
70 virtual string getType() const { return #a" dialog"; } \
75 class CmdInteraction: public CmdGeneric
78 CmdInteraction( intf_thread_t *pIntf, interaction_dialog_t * p_dialog )
79 : CmdGeneric( pIntf ), m_pDialog( p_dialog ) { }
80 virtual ~CmdInteraction() { }
82 virtual void execute()
84 Dialogs *pDialogs = Dialogs::instance( getIntf() );
85 if( pDialogs != NULL )
86 pDialogs->showInteraction( m_pDialog );
88 virtual string getType() const { return "interaction"; }
90 interaction_dialog_t *m_pDialog;