/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2013 Raytrix GmbH. All rights reserved.
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#pragma once

#ifdef CVCLUVIZTOOL_EXPORTS
	#define CLUVIZTOOL_API __declspec(dllexport)
#else
	#define CLUVIZTOOL_API __declspec(dllimport)
#endif

#include "Rx.Interop.Runtime28\RxIfcImage.h"

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// namespace: CLUViz.Tool
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
namespace CLUViz
{
	namespace Tool
	{
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// 	Initializes the CluViz Tool with a custom script path.
		/// </summary>
		///
		/// <param name="pcScriptPath"> (Optional) The custom script path. </param>
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		CLUVIZTOOL_API void Init(const char* pcScriptPath = 0);

		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// 	Finalizes this CluViz Tool. Destroys all open views.
		/// </summary>
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		CLUVIZTOOL_API void Finalize(void);

		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// 	Creates a new view window.
		/// </summary>
		///
		/// <param name="iHandle"> [out] The created handle. </param>
		/// <param name="iX">	   The X position of the window. </param>
		/// <param name="iY">	   The Y position of the window. </param>
		/// <param name="iWidth">  The width of the window. </param>
		/// <param name="iHeight"> The height of the window. </param>
		/// <param name="pcTitle"> [in] The window title. </param>
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		CLUVIZTOOL_API void CreateViewImage(int& iHandle, int iX, int iY, int iWidth, int iHeight, const char* pcTitle);

		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// 	Destroys the view described by iHandle.
		/// </summary>
		///
		/// <param name="iHandle"> The window handled returned by CreateViewImage. </param>
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		CLUVIZTOOL_API void DestroyView(int iHandle);

		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// 	Destroys all views.
		/// </summary>
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		CLUVIZTOOL_API void DestroyAllViews();

		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		/// <summary>
		/// 	Sets the given image into the given view.
		/// </summary>
		///
		/// <param name="iHandle"> The handle of the view. </param>
		/// <param name="pImage">  [in] The image. </param>
		/// <param name="bUpdate"> (Optional) True to update the image content. False to set a new image with a new image format. </param>
		/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
		CLUVIZTOOL_API void ViewSetImage(int iHandle, const Rx::Interop::Runtime28::IImage* pImage, bool bUpdate = false);
	}
}
