]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/score-elem.hh
release: 0.0.68pre
[lilypond.git] / lily / include / score-elem.hh
index d567f8ef02d25f1fbc4eeed9ab378f9aabc0f654..95c6b0ba1d52ca24c9d6bc1f5ced3fe2422d1e77 100644 (file)
@@ -13,6 +13,7 @@
 #include "virtual-methods.hh"
 #include "directed-graph.hh"
 
+#define SCORE_ELEM_CLONE(T) VIRTUAL_COPY_CONS(T, Score_elem)
 
 /** Both Spanner and Item are Score_elem's. Most Score_elem's depend
   on other Score_elem's, eg, Beam needs to know and set direction of
@@ -37,6 +38,8 @@ class Score_elem : private Directed_graph_node {
     enum Status {
        ORPHAN,                 // not yet added to pstaff
        VIRGIN,                 // added to pstaff
+       PREBREAKING,
+       PREBROKEN,
        PRECALCING,
        PRECALCED,              // calcs before spacing done
        BREAKING,
@@ -48,15 +51,10 @@ class Score_elem : private Directed_graph_node {
        DELETED,                // to catch malloc mistakes.
     } status;
 
-
-    Score_elem* dependency(int) const;
-    Score_elem* dependent(int) const;
-    int dependent_size() const;
-    int dependency_size() const;
 public:
     PScore *pscore_l_;    
-    int group_element_i_;
-        
+    int x_group_element_i_;
+    int y_group_element_i_;
     Score_elem(Score_elem const&);
     virtual String TeX_string () const ;
     virtual void print() const;
@@ -66,20 +64,22 @@ public:
     virtual ~Score_elem();
     Score_elem();
     NAME_MEMBERS();    
-    virtual bool is_type_b(const char *);
     
     Interval width() const;
     Interval height() const;
+    virtual void translate_x(Real);
+    virtual void translate_y(Real);
      /**
       translate the symbol. The symbol does not have to be created yet. 
       Overridable, since this score-elem might act as a pseudo-list.
      */
-    virtual void translate(Offset);
+    void translate(Offset);
     Offset offset()const;
 
     void add_processing();
     void OK() const;
     void pre_processing();
+    void breakable_col_processing();
     void break_processing();
     
     void post_processing();
@@ -95,9 +95,10 @@ public:
     
     
     virtual Spanner* spanner()  { return 0; }
-    virtual Element_group* elem_group() { return 0; }
+    virtual Horizontal_vertical_group* elem_group() { return 0; }
     virtual Item * item() { return 0; }
     virtual Line_of_score * line_l() const;
+    SCORE_ELEM_CLONE(Score_elem)
 protected:
 
     virtual  Interval do_height()const;
@@ -112,13 +113,25 @@ protected:
     /// do calculations before determining horizontal spacing
     virtual void do_pre_processing();
 
-    
+    virtual void do_breakable_col_processing();
     /// do calculations after determining horizontal spacing
     virtual void do_post_processing();
     
     virtual void do_substitute_dependency(Score_elem * , Score_elem *);
     virtual void do_break_processing();
     virtual void handle_broken_dependencies();
+    virtual void handle_prebroken_dependencies();
+
+    Score_elem* dependency(int) const;
+    Score_elem* dependent(int) const;
+    int dependent_size() const;
+    int dependency_size() const;
+
+
+    /// no dimension, translation is noop
+    bool empty_b_;
+    /// do not print anything black
+    bool transparent_b_;
 };