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
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
28 #include "skin_common.hpp"
33 class Dialogs: public SkinObject
36 /// Get the instance of Dialogs (or NULL if initialization failed)
37 static Dialogs *instance( intf_thread_t *pIntf );
39 /// Delete the instance of Dialogs
40 static void destroy( intf_thread_t *pIntf );
42 /// Show the Change Skin dialog
43 void showChangeSkin();
45 /// Show the Load Playlist dialog
46 void showPlaylistLoad();
48 /// Show the Save Playlist dialog
49 void showPlaylistSave();
51 /** Show the Quick Open File dialog.
52 * If play is false, just add the item in the playlist
54 void showFileSimple( bool play );
56 /** Show the Open File dialog
57 * If play is false, just add the item in the playlist
59 void showFile( bool play );
61 /** Show the Open Directory dialog
62 * If play is false, just add the item in the playlist
64 void showDirectory( bool play );
66 /** Show the Open Disc dialog
67 * If play is false, just add the item in the playlist
69 void showDisc( bool play );
71 /** Show the Open Network Stream dialog
72 * If play is false, just add the item in the playlist
74 void showNet( bool play );
76 /// Show the Messages dialog
79 /// Show the Preferences dialog
82 /// Show the FileInfo dialog
85 /// Show the Streaming Wizard dialog
86 void showStreamingWizard();
88 /// Show the popup menu
89 void showPopupMenu( bool bShow );
92 // Private because it's a singleton
93 Dialogs( intf_thread_t *pIntf );
96 /// DlgCallback is the type of the callbacks of the open/save dialog
97 typedef void DlgCallback( intf_dialog_args_t *pArg );
99 /// Possible flags for the open/save dialog
107 /// Initialization method
110 /** Show a generic open/save dialog, initialized with the given
112 * The 'flags' parameter is a logical or of the flags_t values
114 void showFileGeneric( const string &rTitle, const string &rExtensions,
115 DlgCallback callback, int flags );
117 /// Callback for the Change Skin dialog
118 static void showChangeSkinCB( intf_dialog_args_t *pArg );
120 /// Callback for the Load Playlist dialog
121 static void showPlaylistLoadCB( intf_dialog_args_t *pArg );
123 /// Callback for the Save Playlist dialog
124 static void showPlaylistSaveCB( intf_dialog_args_t *pArg );
126 /// Dialogs provider module
127 intf_thread_t *m_pProvider;