xref: /haiku/src/apps/haikudepot/ui/SharedIcons.h (revision 6afa94a0896259ded7b5b5fc27180f44196c2eca)
166ee6532SAndrew Lindesay /*
266ee6532SAndrew Lindesay  * Copyright 2024, Andrew Lindesay <apl@lindesay.co.nz>.
366ee6532SAndrew Lindesay  * All rights reserved. Distributed under the terms of the MIT License.
466ee6532SAndrew Lindesay  */
566ee6532SAndrew Lindesay #ifndef SHARED_ICONS_H
666ee6532SAndrew Lindesay #define SHARED_ICONS_H
766ee6532SAndrew Lindesay 
866ee6532SAndrew Lindesay 
966ee6532SAndrew Lindesay #include "BitmapHolder.h"
1066ee6532SAndrew Lindesay 
1166ee6532SAndrew Lindesay 
1266ee6532SAndrew Lindesay class SharedIcons
1366ee6532SAndrew Lindesay {
1466ee6532SAndrew Lindesay 
1566ee6532SAndrew Lindesay public:
1666ee6532SAndrew Lindesay 	static	void			UnsetAllIcons();
1766ee6532SAndrew Lindesay 
1866ee6532SAndrew Lindesay 	// icons from application resources
193dbcc100SAndrew Lindesay 	static	BitmapHolderRef	IconStarBlue12Scaled();
2066ee6532SAndrew Lindesay 	static	BitmapHolderRef	IconStarBlue16Scaled();
2166ee6532SAndrew Lindesay 	static	BitmapHolderRef	IconStarGrey16Scaled();
2266ee6532SAndrew Lindesay 	static	BitmapHolderRef	IconInstalled16Scaled();
2366ee6532SAndrew Lindesay 	static	BitmapHolderRef	IconArrowLeft22Scaled();
2466ee6532SAndrew Lindesay 	static	BitmapHolderRef	IconArrowRight22Scaled();
25*6afa94a0SAndrew Lindesay 	static	BitmapHolderRef	IconNative16Scaled();
2666ee6532SAndrew Lindesay 
2766ee6532SAndrew Lindesay 	// icons from mime types
2866ee6532SAndrew Lindesay 	static	BitmapHolderRef	IconHTMLPackage16Scaled();
2966ee6532SAndrew Lindesay 
3066ee6532SAndrew Lindesay private:
3166ee6532SAndrew Lindesay 	static	BitmapHolderRef	_CreateIconForResource(int32 resourceID, uint32 size);
3266ee6532SAndrew Lindesay 	static	BitmapHolderRef _CreateIconForMimeType(const char* mimeType, uint32 size);
3366ee6532SAndrew Lindesay 
3466ee6532SAndrew Lindesay 	static	status_t		_CreateIconForResourceChecked(int32 resourceID, uint32 size,
3566ee6532SAndrew Lindesay     								BitmapHolderRef* bitmapHolderRef);
3666ee6532SAndrew Lindesay    	static	status_t		_CreateIconForMimeTypeChecked(const char* mimeTypeStr, uint32 size,
3766ee6532SAndrew Lindesay        								BitmapHolderRef* bitmapHolderRef);
3866ee6532SAndrew Lindesay 
3966ee6532SAndrew Lindesay private:
403dbcc100SAndrew Lindesay 	static	BitmapHolderRef	sIconStarBlue12Scaled;
4166ee6532SAndrew Lindesay 	static	BitmapHolderRef	sIconStarBlue16Scaled;
4266ee6532SAndrew Lindesay 	static	BitmapHolderRef	sIconStarGrey16Scaled;
4366ee6532SAndrew Lindesay 	static	BitmapHolderRef	sIconInstalled16Scaled;
4466ee6532SAndrew Lindesay 	static	BitmapHolderRef	sIconArrowLeft22Scaled;
4566ee6532SAndrew Lindesay 	static	BitmapHolderRef	sIconArrowRight22Scaled;
4666ee6532SAndrew Lindesay 	static	BitmapHolderRef	sIconHTMLPackage16Scaled;
47*6afa94a0SAndrew Lindesay 	static	BitmapHolderRef	sNative16Scaled;
4866ee6532SAndrew Lindesay 
4966ee6532SAndrew Lindesay };
5066ee6532SAndrew Lindesay 
5166ee6532SAndrew Lindesay 
5266ee6532SAndrew Lindesay #endif // SHARED_ICONS_H
53