cmd_dialogs.hpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
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