#ifndef _DrawObjectWidget_H_
#define _DrawObjectWidget_H_

#include <list>
using namespace std;

#include "DrawWidget.h"
#include "DrawObject.h"

/** 
    A class which contains a vector of pointers to DrawObjects and 
    simply invokes their draw methods.  
 */
class DrawObjectWidget : public DrawWidget {

protected:
  /// Vector of pointers to objects
  list<DrawObject*> objects;

  /// Draw the objects
  virtual void draw();

public:
  
  /** Constructor.
      @par x The upper left corner of the widget
      @par y The upper left corner of the widget
      @par w The width of the widget
      @par h The height of the widget
      @par min_x The minimum x coordinate of the drawing area
      @par min_y The minimum y coordinate of the drawing area
      @par max_x The maximum x coordinate of the drawing area
      @par max_y The maximum y coordinate of the drawing area
      @par s A string constant specifying the FLTK widget name
   */
  DrawObjectWidget(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.
      @par x The upper left corner of the widget
      @par y The upper left corner of the widget
      @par w The width of the widget
      @par h The height of the widget
      @par s A string constant specifying the FLTK widget name
   */
  DrawObjectWidget(int x, 
		   int y, 
		   int w, 
		   int h,
		   const char * s=0);

  /// Destructor
  virtual ~DrawObjectWidget();

  /// Add a pointer to a DrawObject to the list
  void addDrawObject(DrawObject * o);

  /// Clear all objects from the list
  void clear();
};

#endif
