Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

cmd_dialogs.hpp

00001 /*****************************************************************************
00002  * cmd_dialogs.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: cmd_dialogs.hpp 12281 2005-08-20 00:31:27Z dionoea $
00006  *
00007  * Authors: Cyril Deguet     <[email protected]>
00008  *          Olivier Teulière <[email protected]>
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., 59 Temple Place - Suite 330, Boston, MA  02111, 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 
00033 template<int TYPE = 0> class CmdDialogs;
00034 
00035 // XXX use an enum instead
00036 typedef CmdDialogs<1> CmdDlgChangeSkin;
00037 typedef CmdDialogs<2> CmdDlgFileSimple;
00038 typedef CmdDialogs<3> CmdDlgFile;
00039 typedef CmdDialogs<4> CmdDlgDisc;
00040 typedef CmdDialogs<5> CmdDlgNet;
00041 typedef CmdDialogs<6> CmdDlgMessages;
00042 typedef CmdDialogs<7> CmdDlgPrefs;
00043 typedef CmdDialogs<8> CmdDlgFileInfo;
00044 typedef CmdDialogs<9> CmdDlgShowPopupMenu;
00045 typedef CmdDialogs<10> CmdDlgHidePopupMenu;
00046 typedef CmdDialogs<11> CmdDlgAdd;
00047 typedef CmdDialogs<12> CmdDlgPlaylistLoad;
00048 typedef CmdDialogs<13> CmdDlgPlaylistSave;
00049 typedef CmdDialogs<14> CmdDlgDirectory;
00050 typedef CmdDialogs<15> CmdDlgStreamingWizard;
00051 typedef CmdDialogs<16> CmdDlgPlaytreeLoad;
00052 typedef CmdDialogs<17> CmdDlgPlaytreeSave;
00053 
00054 
00056 template<int TYPE>
00057 class CmdDialogs: public CmdGeneric
00058 {
00059     public:
00060         CmdDialogs( intf_thread_t *pIntf ): CmdGeneric( pIntf ) {}
00061         virtual ~CmdDialogs() {}
00062 
00064         virtual void execute()
00065         {
00067             Dialogs *pDialogs = Dialogs::instance( getIntf() );
00068             if( pDialogs == NULL )
00069             {
00070                 return;
00071             }
00072 
00073             switch( TYPE )
00074             {
00075                 case 1:
00076                     pDialogs->showChangeSkin();
00077                     break;
00078                 case 2:
00079                     pDialogs->showFileSimple( true );
00080                     break;
00081                 case 3:
00082                     pDialogs->showFile( true );
00083                     break;
00084                 case 4:
00085                     pDialogs->showDisc( true );
00086                     break;
00087                 case 5:
00088                     pDialogs->showNet( true );
00089                     break;
00090                 case 6:
00091                     pDialogs->showMessages();
00092                     break;
00093                 case 7:
00094                     pDialogs->showPrefs();
00095                     break;
00096                 case 8:
00097                     pDialogs->showFileInfo();
00098                     break;
00099                 case 9:
00100                     pDialogs->showPopupMenu( true );
00101                     break;
00102                 case 10:
00103                     pDialogs->showPopupMenu( false );
00104                     break;
00105                 case 11:
00106                     pDialogs->showFile( false );
00107                     break;
00108                 case 12:
00109                     pDialogs->showPlaylistLoad();
00110                     break;
00111                 case 13:
00112                     pDialogs->showPlaylistSave();
00113                     break;
00114                 case 14:
00115                     pDialogs->showDirectory( true );
00116                     break;
00117                 case 15:
00118                     pDialogs->showStreamingWizard();
00119                     break;
00120                 default:
00121                     msg_Warn( getIntf(), "Unknown dialog type" );
00122                     break;
00123             }
00124         }
00125 
00127         virtual string getType() const { return "dialog"; }
00128 };
00129 
00130 
00131 #endif

Generated on Tue Dec 20 10:14:41 2005 for vlc-0.8.4a by  doxygen 1.4.2