xref: /haiku/src/apps/haikudepot/ui/SharedIcons.h (revision caed67a8cba83913b9c21ac2b06ebc6bd1cb3111)
1 /*
2  * Copyright 2024, Andrew Lindesay <apl@lindesay.co.nz>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef SHARED_ICONS_H
6 #define SHARED_ICONS_H
7 
8 
9 #include "BitmapHolder.h"
10 
11 
12 class SharedIcons
13 {
14 
15 public:
16 	static	void			UnsetAllIcons();
17 
18 	// icons from application resources
19 	static	BitmapHolderRef	IconStarBlue12Scaled();
20 	static	BitmapHolderRef	IconStarBlue16Scaled();
21 	static	BitmapHolderRef	IconStarGrey16Scaled();
22 	static	BitmapHolderRef	IconInstalled16Scaled();
23 	static	BitmapHolderRef	IconArrowLeft22Scaled();
24 	static	BitmapHolderRef	IconArrowRight22Scaled();
25 
26 	// icons from mime types
27 	static	BitmapHolderRef	IconHTMLPackage16Scaled();
28 
29 private:
30 	static	BitmapHolderRef	_CreateIconForResource(int32 resourceID, uint32 size);
31 	static	BitmapHolderRef _CreateIconForMimeType(const char* mimeType, uint32 size);
32 
33 	static	status_t		_CreateIconForResourceChecked(int32 resourceID, uint32 size,
34     								BitmapHolderRef* bitmapHolderRef);
35    	static	status_t		_CreateIconForMimeTypeChecked(const char* mimeTypeStr, uint32 size,
36        								BitmapHolderRef* bitmapHolderRef);
37 
38 private:
39 	static	BitmapHolderRef	sIconStarBlue12Scaled;
40 	static	BitmapHolderRef	sIconStarBlue16Scaled;
41 	static	BitmapHolderRef	sIconStarGrey16Scaled;
42 	static	BitmapHolderRef	sIconInstalled16Scaled;
43 	static	BitmapHolderRef	sIconArrowLeft22Scaled;
44 	static	BitmapHolderRef	sIconArrowRight22Scaled;
45 	static	BitmapHolderRef	sIconHTMLPackage16Scaled;
46 
47 };
48 
49 
50 #endif // SHARED_ICONS_H
51