xref: /aoo4110/main/svtools/inc/svtools/imagemgr.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #ifndef _SVTOOLS_IMAGEMGR_HXX
25 #define _SVTOOLS_IMAGEMGR_HXX
26 
27 // includes ******************************************************************
28 
29 #include "svtools/svtdllapi.h"
30 #include "sal/types.h"
31 
32 class Image;
33 class String;
34 class INetURLObject;
35 
36 namespace svtools {
37 
38 struct VolumeInfo
39 {
40 	sal_Bool	m_bIsVolume;
41 	sal_Bool	m_bIsRemote;
42 	sal_Bool	m_bIsRemoveable;
43 	sal_Bool	m_bIsFloppy;
44 	sal_Bool	m_bIsCompactDisc;
45 
VolumeInfosvtools::VolumeInfo46 	VolumeInfo() :
47 		m_bIsVolume		( sal_False ),
48 		m_bIsRemote		( sal_False ),
49 		m_bIsRemoveable	( sal_False ),
50 		m_bIsFloppy		( sal_False ),
51 		m_bIsCompactDisc( sal_False ) {}
52 
VolumeInfosvtools::VolumeInfo53 	VolumeInfo( sal_Bool _bIsVolume,
54 				sal_Bool _bIsRemote,
55 				sal_Bool _bIsRemoveable,
56 				sal_Bool _bIsFloppy,
57 				sal_Bool _bIsCompactDisc ) :
58 		m_bIsVolume		( _bIsVolume ),
59 		m_bIsRemote		( _bIsRemote ),
60 		m_bIsRemoveable	( _bIsRemoveable ),
61 		m_bIsFloppy		( _bIsFloppy ),
62 		m_bIsCompactDisc( _bIsCompactDisc ) {}
63 };
64 
65 }
66 
67 class SvFileInformationManager
68 {
69 private:
70 	SVT_DLLPRIVATE static String	GetDescription_Impl( const INetURLObject& rObject, sal_Bool bDetectFolder );
71 
72 public:
73 	// depricated, because no high contrast mode
74     SVT_DLLPUBLIC static Image	GetImage( const INetURLObject& rURL, sal_Bool bBig = sal_False );
75     static Image	GetFileImage( const INetURLObject& rURL, sal_Bool bBig = sal_False );
76     static Image	GetImageNoDefault( const INetURLObject& rURL, sal_Bool bBig = sal_False );
77     SVT_DLLPUBLIC static Image	GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig = sal_False );
78 
79 	// now with high contrast mode
80     SVT_DLLPUBLIC static Image	GetImage( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
81     SVT_DLLPUBLIC static Image	GetFileImage( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
82     SVT_DLLPUBLIC static Image	GetImageNoDefault( const INetURLObject& rURL, sal_Bool bBig, sal_Bool bHighContrast );
83     SVT_DLLPUBLIC static Image	GetFolderImage( const svtools::VolumeInfo& rInfo, sal_Bool bBig, sal_Bool bHighContrast );
84 
85 	SVT_DLLPUBLIC static String	GetDescription( const INetURLObject& rObject );
86 	SVT_DLLPUBLIC static String	GetFileDescription( const INetURLObject& rObject );
87 	SVT_DLLPUBLIC static String	GetFolderDescription( const svtools::VolumeInfo& rInfo );
88 };
89 
90 #endif
91 
92