// bracket.h -- subclass of Drawable for brackets

#ifndef BRACKET_H
#define BRACKET_H

#include <qobject.h>
#include "render2d.h"
#include "drawable.h"
#include "dpoint.h"

class Bracket : public Drawable {
  Q_OBJECT
    public:
  Bracket(Render2D *, QObject *parent = 0, const char *name = 0);
  void Render();  // draw this object
  void Edit();
  int Type();  // return type of object
  bool Find(DPoint *); // does this Bracket contain this DPoint?
  DPoint * FindNearestPoint(DPoint *, double &);
  Drawable * FindNearestObject(DPoint *, double &);
  Drawable * DeepCopy();
  void setPoints(DPoint *, DPoint *);
  bool WithinRect(QRect, bool);
  QRect BoundingBox();
  QString ToXML(QString);
  QString ToCDXML(QString);
  void FromXML(QString);
  int Style() { return style; }
  void SetStyle(int s1) { style = s1; }
 private:
  // Renderer
  Render2D *r;
};

#endif
