#ifndef _DrawInterfaceWidget_H_
#define _DrawInterfaceWidget_H_

#include "DrawObjectWidget.h"

/** 
    A class which provides a simple set of front-end methods for 
    drawing simple graphics primitives in a widget.  When each of the
    draw... methods are invoked, the widget will continue to draw 
    objects until the clear() method (derived from DrawObjectWidget)
    is invoked.
*/

class DrawInterfaceWidget : public DrawObjectWidget {
  
 public:

  /**
     Constructor.  Specify the window dimension in pixels and then specify
     the world dimensions in whatever units are preferred.

     @params x The upper left corner of the widget
     @params y The upper left corner of the widget
     @params w The width of the widget
     @params h The height of the widget
     @params min_x The minimum x coordinate of the drawing area
     @params min_y The minimum y coordinate of the drawing area
     @params max_x The maximum x coordinate of the drawing area
     @params max_y The maximum y coordinate of the drawing area
     @params s A string constant specifying the FLTK widget name

  */
  DrawInterfaceWidget(int x, 
		      int y, 
		      int w, 
		      int h,
		      float min_x, 
		      float min_y, 
		      float max_x, 
		      float max_y,
		      const char * s=0);
  
  /**
     Constructor.  Specify the widget dimensions in pixels and then derive
     the world dimensions from the widget dimensions.
  */
  DrawInterfaceWidget(int x, 
		      int y, 
		      int w, 
		      int h,
		      const char * s=0);

  /**
     Draw a circle specifying the center and then the width and height
     in world coordinates
  */
  void drawCircle(float x,float y,float w, float h, 
		  uchar red=0, uchar green=0, uchar blue=0, 
		  bool filled=false);

  /**
     Draw a circle specifying the center and the radius in world coordinates
  */
  void drawCircle(float x,float y,float r, 
		  uchar red=0, uchar green=0, uchar blue=0, 
		  bool filled=false);

  /**
     Draw a rectangle specifying the center and the width and height in
     world coordinates.
  */
  void drawRectangle(float x,float y,float w, float h, 
		     uchar red=0, uchar green=0, uchar blue=0, 
		     bool filled=false);

  /**
     Draw a bitmapped image specifying the center and dimensions in world
     coordinates.  This version takes a pointer to a character array
     and copies it into its own local buffer.
  */
  void drawImage(float x, float y, float w, float h,
		 uchar * rgb_image, uint columns, uint rows);

  /** 
      Draw a line specifying the two points in world coordinates.
   */
  void drawLine(float x1, float y1, float x2, float y2,
		uchar red=0, uchar green=0, uchar blue=0, 
		int style=0, int width=1);

  /** 
      Draw some text
  */
  void drawText(const char * _text, float _x, float _y,
		uchar _red=0, uchar _green=0, uchar _blue=0,
		int _font_id=0,int _font_size=14);
};

#endif
