add Rectangle::vertical_fraction() as a convenience method
[ardour.git] / libs / canvas / canvas / arrow.h
index ed3a5bb384d93a3fcefdfdea0949fd32ccb95981..6617e13bd281686f5e21ed477f934d745b568fd1 100644 (file)
 #ifndef __CANVAS_ARROW_H__
 #define __CANVAS_ARROW_H__
 
-#include "canvas/group.h"
+#include "canvas/visibility.h"
+#include "canvas/container.h"
 
 namespace ArdourCanvas {
 
+class Canvas;
 class Line;
 class Polygon;
 
@@ -43,10 +45,13 @@ class Polygon;
  *  to draw lines at any angle.
  */
        
-class Arrow : public Group
+class LIBCANVAS_API Arrow : public Container
 {
 public:
-       Arrow (Group *);
+       Arrow (Canvas*);
+       Arrow (Item*);
+
+       void compute_bounding_box () const;
 
        void set_show_head (int, bool);
        void set_head_outward (int, bool);
@@ -66,11 +71,11 @@ public:
 
 private:
        void setup_polygon (int);
+       void setup ();
 
        /** Representation of a single arrow head */
        struct Head {
                Polygon* polygon; ///< the polygon which represents its shape
-               bool show;        ///< true if this head should be visible
                bool outward;     ///< true if this head points out from the line
                Distance height;  ///< the height of the head
                Distance width;   ///< the maximum width of the head