#include "objects.h"
#include <gtk.h>
#include <gdk.h>
#include <string>
using namespace std;

main(int argc, char  **argv) {

  gtk_init(&argc, &argv);

  // create a new window and set its size and position
  Window *win = new Window("my window");
  win->setLeft(100);
  win->setTop(100);
  win->setWidth(300);
  win->setHeight(200);

  // create a blue line and add it to win
  Line *myline = new Line("my line");
  myline->setX1(50);
  myline->setY1(20);
  myline->setX2(150);
  myline->setY2(50);
  myline->setColor("Blue");
  win->addObject(myline);

  // create a dotted line
  Line *dotted_line = new Line("dotted line");
  dotted_line->setLineStyle(DASHED);
  dotted_line->setX1(80);
  dotted_line->setX2(20);
  dotted_line->setY1(30);
  dotted_line->setY2(110);
  win->addObject(dotted_line);

  // create a text object that displays the string "Hello World" and
  // add it to win.
  Text *mytext = new Text("my text");
  mytext->setLeft(80);
  mytext->setTop(20);
  mytext->setText("Hello World");
  mytext->setColor("Red");
  win->addObject(mytext);

  win->show();   // no code related to GUI should follow this call

  gtk_main();    // this function never returns
}
    

