#include "mapdisplay.h"
#include "citydisplay.h"
#include "textDisplay.h"
#include "X11Displays.h"
#include <xview/panel.h>

class XvDisplayData : public X11DisplayData {
public:
  XvDisplayData(X11Screen *screen, Display *display, char *name); // creates window
  void ExposeNotify(int x, int y, int width, int height);
  void Map();

  void CreateDrawingArea(int width, int height, WDisplay *window);
  void AddButton(char *name, void (*callback)(void *), void *call_data);
  void AddMenu(char *name, MenuItem *list, void (*callback)(void *, void *), void *call_data);

  Frame XvFrame;
  Canvas canvas;
  Panel topPanel;
};

class XvMapDisplay : public MapDisplay
{
public:
  XvMapDisplay();
  XvMapDisplay(World *w, Player *p);
  virtual ~XvMapDisplay();

  void DisplayMessage(char *mesg, int color);
  void BlitMap(int x1, int y1, int w, int h, int x2, int y2);

private:
  void CreateWindow();
  Panel_item mesg;
};

class XvCityDisplay : public CityDisplay
{
public:
  XvCityDisplay(City *cityp, Player *owner);
  virtual ~XvCityDisplay();

  void ShowBuildings(List<charp> buildings);
  void ShowBuildingProgress(char *text);
  void ShowWorkInProgress(char *text);

private:
  Panel_item buildingList;
  Panel_item currentBuild;
  Panel_item buildingProgress;
};

class XvTextDisplay : public TextDisplay
{
public:
  XvTextDisplay(int x, int y);
  virtual ~XvTextDisplay();
};
