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