]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/box.hh
Run `make grand-replace'.
[lilypond.git] / lily / include / box.hh
index 901987f1ad381d8ff83ec97fb9a5e5b3270ab77c..baa4ce0b7645791bd993f0a3b204d3f0a9c8f8e1 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    some 2D geometrical concepts
+  some 2D geometrical concepts
 */
 
 #ifndef BOXES_HH
@@ -7,21 +7,24 @@
 
 #include "interval.hh"
 #include "offset.hh"
+#include "smobs.hh"
 
-struct Box
+class Box
 {
   Interval interval_a_[NO_AXES];
-    
+  DECLARE_SIMPLE_SMOBS (Box);
+public:
   Interval &x () {return interval_a_[X_AXIS]; }
   Interval &y (){ return interval_a_[Y_AXIS]; }
   Interval x () const{ return interval_a_[X_AXIS]; }
   Interval y () const{return interval_a_[Y_AXIS]; }
-  Interval operator[] (Axis a) const;
-  Interval &operator[] (Axis a);
+  Interval operator [] (Axis a) const;
+  Interval &operator [] (Axis a);
 
   Offset center () const;
-    
+
   void translate (Offset o);
+
   /// smallest box enclosing #b#
   void set_empty ();
   void add_point (Offset);
@@ -32,5 +35,4 @@ struct Box
   Box (Interval ix, Interval iy);
 };
 
-
 #endif