//
// Copyright © Vector Works, Inc. 2006.
// All Rights Reserved.
// 

#pragma once

// This is only intended to be made available to the WorkspaceEditor
namespace VectorWorks
{
	namespace UI
	{
		// ----------------------------------------------------------------------------------------------------
		// {7E8C933D-CC09-4202-B14F-EFFB04FA4423}
		static const VWIID IID_Icon = { 0x7E8C933D, 0xCC09, 0x4202, { 0xB1, 0x4F, 0xEF, 0xFB, 0x04, 0xFA, 0x44, 0x23 } };

		class DYNAMIC_ATTRIBUTE IIcon : public IVWUnknown
		{
		public:
			virtual VCOMError VCOM_CALLTYPE IsSet(bool& outResult)												= 0;
			virtual VCOMError VCOM_CALLTYPE GetDimensions(Sint16& outWidth, Sint16& outHeight)					= 0;

			virtual VCOMError VCOM_CALLTYPE SetFromResourceId(Sint16 inResId, Sint16 inWidth, Sint16 inHeight)	= 0;
			virtual VCOMError VCOM_CALLTYPE SetFromPngData(const void* inPngData, size_t inPngDataSize)			= 0;
			virtual VCOMError VCOM_CALLTYPE GetPngData(void* outPngData, size_t& inOutPngDataSize)				= 0;

			virtual VCOMError VCOM_CALLTYPE GetNativeIcon(void*& handle)										= 0;
		};

		// ----------------------------------------------------------------------------------------------------
		typedef VCOMPtr<IIcon>		IIconPtr;
	}
}
