///////////////////////////////////////////////////////////////////////////////
/// @file PluginControlsCommon.hpp
///
/// @brief Extended MFC based interfaces for plugin controls and UI hooks
///
/// @author jwvanderbeck
///
/// This file is the intellectual property of Novus Delta, LLC.. Usage of the
/// contents of this file is subject to the Destiny3D Member License which
/// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
///
/// This file is distributed "AS IS" without warranty of any kind.  Novus
/// Delta, LLC. does not guarantee the fitness of the contents of this file
/// for any particular purpose.
///
/// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
///
/// <hr>
///                                 Change History
/// <hr>
///
/// @date May 2002
/// @author jwvanderbeck
/// @remarks Creation
///
///////////////////////////////////////////////////////////////////////////////

// Define exports or imports
#ifdef PLUGIN_EXPORTS
#define PLUGIN_API __declspec(dllexport)
#else
#define PLUGIN_API __declspec(dllimport)
#endif

// Include Destiny3D master datatypes
#include "deGlobalTypes.hpp"
#include "destring.hpp"

// UI Info Struct
struct UIInfo
{
	// CWnd of the overall parent UI control
	CWnd*		pUIWindow;
	// CWnd of the actual list control.  This should normally be used as the "parent"
	CWnd*		pListWindow;
	CFont*		pRegularFont;
	CFont*		pBoldFont;
};

/*****************
IDPControl interface
*****************/
class IDPControl
{
public:
	virtual ~IDPControl() {};

	// The attribute area needs drawing
	virtual void DrawAttribute(CDC* pDC, deRect* rc) = 0;

	// Return the height of the item
	virtual LONG GetHeight() = 0;

	// Retrieve the item's attribute value
	virtual void GetItemValue(deString *Value) = 0;

	// Set the item's attribute value
	virtual void SetItemValue(deString *Value) = 0;

	// Called when attribute area has changed size
	virtual void OnMove() = 0;

	// Called when the item needs to refresh its data
	virtual void OnRefresh() = 0;

	// Called when the item needs to commit its changes
	virtual void OnCommit() = 0;

	// Called to activate the item
	virtual void OnActivate() = 0;

	// Called to pass in the UIInfo struct 
	virtual void SetUIInfo(UIInfo* pInfo) = 0;

	/// Called to delete the Control instance
	virtual void Release() = 0;
};

/************
IDPMUIHandler
************/
class IDPMUIHandler
{
public:
	virtual ~IDPMUIHandler() {};

	virtual IDPMResult AddSettingsPage(CPropertyPage* pPage) = 0;
	virtual IDPMResult RemoveSettingsPage(CPropertyPage *pPage) = 0;

	virtual IDPMResult AddWorkspaceTab(CWnd* pControl, const char* szLabel) = 0;
	virtual IDPMResult RemoveWorkspaceTab(CWnd* pControl) = 0;

	virtual IDPMResult AddOutputTab(CWnd* pControl, const char* szLabel) = 0;
	virtual IDPMResult RemoveOuputTab(CWnd* pControl) = 0;
};