// ------------------------------------------------------------------------
/*
	\author: Jaap Suter

	Copyright (C) Electronic Arts Canada Inc. 2002.  All rights reserved.	
*/
// ------------------------------------------------------------------------

/*! \file */

#ifndef REVEAL_GUI_METRICS_H
#define REVEAL_GUI_METRICS_H

#include <stddef.h>
#include "reveal/stdint.h"

namespace Reveal {
	namespace Impl {

// ------------------------------------------------------------------------------
/*!
	\class GuiMetrics
	\brief Encapsulates a bunch of hardcoded GUI constants;

	This class encapsulates all hardcoded GUI metrics like screensize,
	caption-bar size, etc. etc.

	Contains the hardcoded GUI tweak values. Ugly but it does the job;
*/
// ------------------------------------------------------------------------------
class GuiMetrics
{	
public:
	
	struct MetricVariables {
		int mCharWidth;
		int mTextHeight;
	};
	static MetricVariables * GetMetricVariables( MetricVariables * v );
	static void SetMetricVariables( MetricVariables const& v );

	enum
	{
		NUM_MRUS			  = 4, //!< Number of most-recently-used menus at the top of the screen; including the start button (which is just a special version of an MRU-menu);
		NUM_AUXILLARY_BUTTONS = 4  //!< Number of auxillary buttons at the bottom of the screen;
	};
	static const int SCREEN_WIDTH = 1280;	//!< Total width of the screen in GUI space;
	static const int SCREEN_HEIGHT = 720;	//!< Total height of the screen in GUI space;
	static const int BORDER_WIDTH = 3;	 //!< Horizontal spacing between the border of anything and where any font drawing starts;
	static const int BORDER_HEIGHT = 2; //!< Vertical spacing between the border of anything and where any font drawing starts;
	static const int TEXT_BORDER_WIDTH = BORDER_WIDTH;
	static const int TEXT_BORDER_HEIGHT = 0;
	static const int MENU_INDENT = 3;		//!< Possible indentation of a menu compared to its parent, both horizontally and vertically;
		

	static int  BAR_HEIGHT;	 //!< Height of an most-recently menu;
	static int  WIDGET_WIDTH_;	 //!< Width of widgets;


	static int  ROW_HEIGHT_;		//!< Height of a menu;

	static int  ITEM_SIZE_;		//!< Width and height of a

	static int  ARROW_BOX_SIZE_;	//!< Size of the area an arrow is drawn in;
	static int  SLIDER_SIZE_;		//!< Size of the draggable slider on a range control;

	static int  COLOR_NUMBER_WIDTH; //!< Width needed to draw a number representing an R; G; B or A value (0-255).
	
    static int  PAUSE_ITEM_SIZE;	//!< Width and height of the pause button;
    static int  PAUSE_BUTTON_X;	//!< X of the top left corner of the pause button;
    static int  PAUSE_BUTTON_Y;	//!< Y of the top left corner of the pause button;

    static int  AUX_BUTTON_HEIGHT;		//!< Height of an auxillary button;
    static int  AUX_BUTTON_WIDTH;			//!< Width of an auxillary button;
    static int  AUX_BUTTON_SPACING;		//!< Horizontal spacing between auxillary buttons;
    static int  AUX_BUTTON_RIGHT_MOST_X;	//!< X of the top left corner of the right most auxillary button;
    static int  AUX_BUTTON_Y;				//!< Y of the top left corner of an auxillary button;
	
    static int  MRU_FORWARD_LOCK_X;		//!< X of the top left corner of the lock-icon on an MRU forward; relative to the top left corner of the MRU itself;
    static int  MRU_FORWARD_LOCK_Y;		//!< Y of the top left corner of the lock-icon on an MRU forward; relative to the top left corner of the MRU itself;

	static int TEXT_HEIGHT;						//!< Approximate height of a text character, not const because it is dependent on the font used by the renderer
	static int CHAR_WIDTH_;						//!< Approximate width of a text character, not cont because it is dependent on the font used by the renderer
	
	// Accessors adding for stubification
	static int& GetItemSize();
	static int& GetArrowBoxSize();
	static int& GetCharacterWidth();
	static int& GetRowHeight();
	static int& GetSliderSize();
	static int& GetWidgetWidth();
};

	} // Namespace Impl;
} // Namespace Reveal;

#endif
