#include <stdio.h>
#include <stdlib.h>
#include <Xm/Label.h>
#include <Xm/Form.h>
#include <Xm/RowColumn.h>
#include <Xm/ScrollBar.h>
#include <Xm/PushB.h>
#include <Vk/VkApp.h>
#include <Vk/VkSimpleWindow.h>
#include <Vk/VkOptionMenu.h>
#include "TiburonApp.h"
#include "Compass.h"

#define dprintf if (debug) fprintf

class TestWindow: public VkSimpleWindow 
{
  public:

  TestWindow ( const char *name );
  
  ~TestWindow ();
  
  virtual const char* className()
  {
    return "TestWindow";
  }

};


TestWindow::~TestWindow ()
{
  // Empty
}


TestWindow::TestWindow(const char *name) :
  VkSimpleWindow(name)
{

  Compass *compass = 
    new Compass("compass", mainWindowWidget(), 100, 
		"WESTERN_FLYER.GYRO.DEGREES", True,
		120);
  
  compass->show();
  addView(compass->baseWidget());
}



void main ( int argc, char **argv )
{
  TiburonApp *app = new TiburonApp("CompassTest", &argc, argv);
	  
  TestWindow *window = new TestWindow("Ship Heading");
	  
  window->show();
	  
  app->startTelemetryHandlers();
  
  app->run();
	  
}






