xref: /aoo41x/main/svtools/inc/svtools/imagemgr.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org 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 Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 
28 #ifndef _SVTOOLS_IMAGEMGR_HXX
29 #define _SVTOOLS_IMAGEMGR_HXX
30 
31 // includes ******************************************************************
32 
33 #include "svtools/svtdllapi.h"
34 #include "sal/types.h"
35 
36 class Image;
37 class String;
38 class INetURLObject;
39 
40 namespace svtools {
41 
42 struct VolumeInfo
43 {
44 	sal_Bool	m_bIsVolume;
45 	sal_Bool	m_bIsRemote;
46 	sal_Bool	m_bIsRemoveable;
47 	sal_Bool	m_bIsFloppy;
48 	sal_Bool	m_bIsCompactDisc;
49 
50 	VolumeInfo() :
51 		m_bIsVolume		( sal_False ),
52 		m_bIsRemote		( sal_False ),
53 		m_bIsRemoveable	( sal_False ),
54 		m_bIsFloppy		( sal_False ),
55 		m_bIsCompactDisc( sal_False ) {}
56 
57 	VolumeInfo( sal_Bool _bIsVolume,
58 				sal_Bool _bIsRemote,
59 				sal_Bool _bIsRemoveable,
60 				sal_Bool _bIsFloppy,
61 				sal_Bool _bIsCompactDisc ) :
62 		m_bIsVolume		( _bIsVolume ),
63 		m_bIsRemote		( _bIsRemote ),
64 		m_bIsRemoveable	( _bIsRemoveable ),
65 		m_bIsFloppy		( _bIsFloppy ),
66 		m_bIsCompactDisc( _bIsCompactDisc ) {}
67 };
68 
69 }
70 
71 class SvFileInformationManager
72 {
73 private:
74 	SVT_DLLPRIVATE static String	GetDescription_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder );
75 
76 public:
77 	// depricated, because no high contrast mode
78     SVT_DLLPUBLIC static Image	GetImage( const INetURLObject& rURL, sal_Bool bBig = sal_False );
79     static Image	GetFileImage( const INetURLObject& rURL, sal_Bool bBig = sal_False );
80     static Image	GetImageNoDefault( const INetURLObject& rURL, sal_Bool bBig = sal_False );
81     SVT_DLLPUBLIC static Image	GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig = sal_False );
82 
83 	// now with high contrast mode
84     SVT_DLLPUBLIC static Image	GetImage( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
85     SVT_DLLPUBLIC static Image	GetFileImage( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
86     SVT_DLLPUBLIC static Image	GetImageNoDefault( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
87     SVT_DLLPUBLIC static Image	GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig, sal_Bool bHighContrast );
88 
89 	SVT_DLLPUBLIC static String	GetDescription( const INetURLObject& rObject );
90 	SVT_DLLPUBLIC static String	GetFileDescription( const INetURLObject& rObject );
91 	SVT_DLLPUBLIC static String	GetFolderDescription( const svtools::VolumeInfo& rInfo );
92 };
93 
94 #endif
95 
96