dialogs.hpp

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * dialogs.hpp
00003  *****************************************************************************
00004  * Copyright (C) 2003 the VideoLAN team
00005  * $Id: 0e3cebfa12670e3181456d490873279f6c14a1e6 $
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 DIALOGS_HPP
00026 #define DIALOGS_HPP
00027 
00028 #include "skin_common.hpp"
00029 #include <string>
00030 
00031 struct interaction_dialog_t ;
00032 
00033 // Dialogs provider
00034 class Dialogs: public SkinObject
00035 {
00036 public:
00037     /// Get the instance of Dialogs (or NULL if initialization failed)
00038     static Dialogs *instance( intf_thread_t *pIntf );
00039 
00040     /// Delete the instance of Dialogs
00041     static void destroy( intf_thread_t *pIntf );
00042 
00043     /// Show the Change Skin dialog
00044     void showChangeSkin();
00045 
00046     /// Show the Load Playlist dialog
00047     void showPlaylistLoad();
00048 
00049     /// Show the Save Playlist dialog
00050     void showPlaylistSave();
00051 
00052     /** Show the Quick Open File dialog.
00053      *  If play is false, just add the item in the playlist
00054      */
00055     void showFileSimple( bool play );
00056 
00057     /** Show the Open File dialog
00058      *  If play is false, just add the item in the playlist
00059      */
00060     void showFile( bool play );
00061 
00062     /** Show the Open Directory dialog
00063      *  If play is false, just add the item in the playlist
00064      */
00065     void showDirectory( bool play );
00066 
00067     /** Show the Open Disc dialog
00068      *  If play is false, just add the item in the playlist
00069      */
00070     void showDisc( bool play );
00071 
00072     /** Show the Open Network Stream dialog
00073      *  If play is false, just add the item in the playlist
00074      */
00075     void showNet( bool play );
00076 
00077     /// Show the Messages dialog
00078     void showMessages();
00079 
00080     /// Show the Preferences dialog
00081     void showPrefs();
00082 
00083     /// Show the FileInfo dialog
00084     void showFileInfo();
00085 
00086     /// Show the Streaming Wizard dialog
00087     void showStreamingWizard();
00088 
00089     /// Show the Playlist
00090     void showPlaylist();
00091 
00092     /// Show a popup menu
00093     void showPopupMenu( bool bShow, int popupType );
00094 
00095     /// Show an interaction dialog
00096     void showInteraction( interaction_dialog_t * );
00097 
00098 private:
00099     // Private because it's a singleton
00100     Dialogs( intf_thread_t *pIntf );
00101     ~Dialogs();
00102 
00103     /// DlgCallback is the type of the callbacks of the open/save dialog
00104     typedef void DlgCallback( intf_dialog_args_t *pArg );
00105 
00106     /// Possible flags for the open/save dialog
00107     enum flags_t
00108     {
00109         kOPEN     = 0x01,
00110         kSAVE     = 0x02,
00111         kMULTIPLE = 0x04
00112     };
00113 
00114     /// Initialization method
00115     bool init();
00116 
00117     /** Show a generic open/save dialog, initialized with the given
00118      *  parameters
00119      *  The 'flags' parameter is a logical or of the flags_t values
00120      */
00121     void showFileGeneric( const string &rTitle, const string &rExtensions,
00122                           DlgCallback callback, int flags );
00123 
00124     /// Callback for the Change Skin dialog
00125     static void showChangeSkinCB( intf_dialog_args_t *pArg );
00126 
00127     /// Callback for the Load Playlist dialog
00128     static void showPlaylistLoadCB( intf_dialog_args_t *pArg );
00129 
00130     /// Callback for the Save Playlist dialog
00131     static void showPlaylistSaveCB( intf_dialog_args_t *pArg );
00132 
00133     /// Dialogs provider module
00134     intf_thread_t *m_pProvider;
00135     module_t *m_pModule;
00136 };
00137 
00138 
00139 #endif

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