#ifndef _DISPLAYS_H
#define _DISPLAYS_H

#include "defs.h"

struct MenuItem {
  char *line;
  void *return_data;
};

extern MenuItem *OrderMenu;
extern MenuItem *GameControlMenu;
extern MenuItem *ReportMenu;
extern MenuItem *HelpMenu;

extern int SquareWidth;
extern int SquareHeight;
extern char *fontName;
extern int FontHeight;
extern int FontWidth;

extern int ResourceIconWidth;
extern int ResourceIconHeight;

extern int PeopleWidth;
extern int PeopleHeight;

extern int SmokeStackWidth;
extern int SmokeStackHeight;

#define LongestScienceName (19) // fits "Genetic Engineering"
#define HorizSpace (FontWidth*LongestScienceName)
extern int VertSpace;

#define ScreenWidth (SquaresWide*SquareWidth+HorizSpace)
#define ScreenHeight (SquaresHigh*SquareHeight+VertSpace)

#define FontGap (2)
#define LineHeight (FontHeight+FontGap)
 
extern int MainMapWidth;
extern int MainMapHeight;

#define PlayerInfoY (MainMapHeight+VertSpace+10)
#define UnitInfoY (PlayerInfoY+4*LineHeight+10)

#define PeopleOffsetX (2)
#define PeopleOffsetY (10)
#define PeopleGap (4)

#define CityEconOffsetX (2)
#define CityEconOffsetY (PeopleOffsetY+PeopleHeight+2)

#define OwnUnitsX (0)
#define OwnUnitsY (CityEconOffsetY+4*LineHeight+10)
extern int OwnUnitsPerRow;
extern int MaxOwnUnitsRows;

#define CityMapOffsetX (OwnUnitsX+OwnUnitsPerRow*SquareWidth+5)
#define CityMapOffsetY (CityEconOffsetY)

#define StationedUnitsX (CityMapOffsetX)
#define StationedUnitsY (CityMapOffsetY+5*SquareHeight+20)
extern int StationedUnitsPerRow;
extern int MaxStationedUnitsRows;

#define SmokeStacksX (StationedUnitsX)
#define SmokeStacksY (StationedUnitsY+MaxStationedUnitsRows*SquareHeight+5)

#define CityFoodOffsetX (2)
#define CityFoodOffsetY (OwnUnitsY+MaxOwnUnitsRows*SquareHeight+10)

#define CityScreenHeight (SmokeStacksY + SmokeStackHeight+20)

#define BuildingListX (CityMapOffsetX + 5*SquareWidth+20)
#define BuildingListY (CityMapOffsetY)
extern int BuildingsInList;
#define LongestBuildingName (22) // Copernicus Observatory

#define CurrentProjectX (BuildingListX)
#define CurrentProjectY (BuildingListY+LineHeight*BuildingsInList+10)

#ifdef USE_XVIEW
#define CityScreenWidth (CityMapOffsetX + 5*SquareWidth+20)
#else
#define CityScreenWidth (BuildingListX + LongestBuildingName*FontWidth+10)
#endif

extern char* backGroundColor;
extern char* whiteColor;
extern char* blackColor;
extern char* grayColor;
extern char* redColor;

#endif
