///////////////////////////////////////////////////////////////////////////////
/// @file deFont.hpp
///
/// @brief class for text display
///
/// @author Lightning, Assassin
///
/// 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 Jan 2002
/// @author Lightning
/// @remarks Creation
///
/// @date Feb 2002
/// @author Assassin
/// @remarks Cleanup and modifications
///
///////////////////////////////////////////////////////////////////////////////

#ifndef DEFONT_HPP
#define DEFONT_HPP

#include "de2D.hpp"
#include "deGlobalTypes.hpp"

#define DEFONT_API DE2D_API

class IdeFont;

// factory functions
/// create an instance of IdeFont
DEFONT_API IdeFont* IdeFont_CreateFont();

/// Used to create and render text onto a graphics device, in 2D or 3D.
/// Related functions: IdeFont_CreateFont.
/// Related classes: Ide2DObject.
//class IdeFont
DE3D_INTERFACE_(IdeFont)
{
public:
	/// values for use in SetFont method
	enum FontStyleFlag_t
	{
		STYLE_DEFAULT		=0,				///< default (plain) font
		STYLE_BOLD			=(0x00000001),	///< bold font
		STYLE_ITALIC		=(0x00000002),	///< italic font
		STYLE_UNDERLINE		=(0x00000004),	///< underlined font
		STYLE_STRIKEOUT		=(0x00000008),	///< strikeout font
		STYLE_FORCE32BIT	=(0x7fffffff)
	};
	/// values for use in Print2D, Print3D methods
	enum FontPosFlag_t
	{
		POSITION_TOP		=(0x00000002),	///< text has its highest point at specified coordinate
		POSITION_LEFT		=(0x00000004),	///< text is left-justified to specified coordinate
		POSITION_BOTTOM		=(0x00000008),	///< text has its lowest point at specified coordinate
		POSITION_RIGHT		=(0x00000010),	///< text is right-justified to specified coordinate
		POSITION_HCENTER	=(0x00000020),	///< text is center-justified to specified coordinate
		POSITION_VCENTER	=(0x00000040),	///< text is vertically centered around specified coordinate
		POSITION_DEFAULT	=(POSITION_TOP | POSITION_LEFT),
		POSITION_PERCENT	=(0x00000080),	///< position is specified in percentage of screen, not pixel coordinate
		POSITION_FORCE32BIT	=(0x7fffffff)
	};
protected:
	//constructors/destructor
	virtual ~IdeFont() {}
public:
	/// instant destruction of this object
	virtual int Release() = 0;
	
	//functions to modify the font
	/// Set the current font settings
	/// @param Font A character string specifying a system-font name (ie "Arial")
	/// @param Height The point height of the font
	/// @param FontFlags A combination of flags specified for font style
	virtual deBoolean SetFont(const char *Font, long Height, long StyleFlags) = 0;
	/// currently not implemented
	virtual deBoolean SetFont(IdeBitmapProxy *Font, long Height, long *Widths) = 0;
	
	//functions to change 1 font setting at a time
	/// Set the color of the font.
	/// Specify a color with alpha < 255 to have a translucency in the opaque sections of text.
	virtual deBoolean SetColor(deARGB Color) = 0;
	
	//allow scaling of a font so 1 font can be set but used for multiple sizes
	virtual deBoolean SetScale(deDouble Scale) = 0;
	
	//print 2d text
	virtual deFloat GetStringWidth(char * String) = 0;
	virtual deFloat GetStringHeight(char * String) = 0;
	/// Print text into a 2D object, which can be rendered through Ide2DCollection.
	/// You can obtain the top-level Ide2DCollection from IdeRender::Get2DCollection
	virtual Ide2DObject * Print2D(IdeDriver * Driver, deRect *ClipRect, deDouble X, deDouble Y, deDouble Depth, int *StringWidth, int *StringHeight, int DisplayFlags, const char *Format, ...) = 0;
	
	//print 3d text
	/// currently not implemented
	virtual deBoolean Print3D(deVertex *Position, deVertex *Rotation, deDouble Depth, int DisplayFlags, const char *Format, ...) = 0;
	
};

#endif
