Fix PBD::copy_file on windows to work with non-ascii paths
[ardour.git] / libs / canvas / canvas / rectangle.h
index f93324b39e75a8ec330c8af0c9a630736acdf5c6..5df10fbc606c1772b3ce5294a025c4ebc3798fec 100644 (file)
 #ifndef __CANVAS_RECTANGLE_H__
 #define __CANVAS_RECTANGLE_H__
 
+#include "canvas/visibility.h"
 #include "canvas/item.h"
 #include "canvas/types.h"
-#include "canvas/outline.h"
-#include "canvas/fill.h"
 
 namespace ArdourCanvas
 {
 
-class Rectangle : virtual public Item, public Outline, public Fill
+class LIBCANVAS_API Rectangle : public Item
 {
 public:
-       Rectangle (Group *);
-       Rectangle (Group *, Rect const &);
+       Rectangle (Canvas*);
+       Rectangle (Canvas*, Rect const &);
+       Rectangle (Item*);
+       Rectangle (Item*, Rect const &);
        
        void render (Rect const &, Cairo::RefPtr<Cairo::Context>) const;
        void compute_bounding_box () const;
@@ -64,16 +65,22 @@ public:
        void set_y1 (Coord);
 
        enum What {
+               NOTHING = 0x0,
                LEFT = 0x1,
                RIGHT = 0x2,
                TOP = 0x4,
-               BOTTOM = 0x8
+               BOTTOM = 0x8,
+               ALL = LEFT|RIGHT|TOP|BOTTOM,
        };
 
        void set_outline_what (What);
-       void set_outline_what (int);
+       void set_outline_all () { set_outline_what (ArdourCanvas::Rectangle::ALL); }
 
-private:
+  protected:
+       void render_self (Rect const &, Cairo::RefPtr<Cairo::Context>, Rect) const;
+       Rect get_self_for_render () const;
+
+  private:
        /** Our rectangle; note that x0 may not always be less than x1
         *  and likewise with y0 and y1.
         */