]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.11
authorfred <fred>
Sun, 24 Mar 2002 19:55:41 +0000 (19:55 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:55:41 +0000 (19:55 +0000)
lily/include/offset.hh
lily/include/score-elem.hh
lily/include/staff-sym.hh

index b4ed5478aca191551e681eacec20046790d8edc9..ea22500fd7b68fe5ba706be21dfe4ff1b98968ac 100644 (file)
 
 /// 2d vector 
 struct Offset {
-    Real coordinate_a_[NO_AXES];
+  Real coordinate_a_[NO_AXES];
     
-    Real &y() { return coordinate_a_[Y_AXIS]; }
-    Real &x() { return coordinate_a_[X_AXIS]; }
-    Real y()const { return coordinate_a_[Y_AXIS]; }
-    Real x()const { return coordinate_a_[X_AXIS]; }
+  Real &y() { return coordinate_a_[Y_AXIS]; }
+  Real &x() { return coordinate_a_[X_AXIS]; }
+  Real y() const { return coordinate_a_[Y_AXIS]; }
+  Real x() const { return coordinate_a_[X_AXIS]; }
     
-    Real &operator[](Axis i) {
-       return coordinate_a_[i];
-    }
-    Real operator[](Axis i) const{
-       return coordinate_a_[i];
-    }
+  Real &operator[](Axis i) {
+    return coordinate_a_[i];
+  }
+  Real operator[](Axis i) const{
+    return coordinate_a_[i];
+  }
     
-    Offset operator+=(Offset o) {
-       x()+=o.x ();
-       y()+=o.y ();
-       return *this;
-    }
-    Offset (Real ix , Real iy) {
-       x()=ix;
-       y()=iy;
-    }
-    Offset() {
-       x()=0.0;
-       y()=0.0;
-    }
+  Offset operator+=(Offset o) {
+    x()+=o.x ();
+    y()+=o.y ();
+    return *this;
+  }
+  Offset (Real ix , Real iy) {
+    x()=ix;
+    y()=iy;
+  }
+  Offset() {
+    x()=0.0;
+    y()=0.0;
+  }
 };
 
 inline Offset
-operator+(Offset o1, Offset const& o2)
+operator+ (Offset o1, Offset const& o2)
 {
-    o1 += o2;
-    return o1;
+  o1 += o2;
+  return o1;
 }
     
 #endif // OFFSET_HH
index 7e7259f6a25320b1fb9549e0c6b4232b56852c9b..c67510040a249734fbff950c30693712acedbf83 100644 (file)
   (elem) */
 class Score_elem : private Directed_graph_node {
 
-    /// member: the symbols
-    Molecule *output;          // should scrap, and use temp var?
-
-
-
-    /**
-      for administration of what was done already
-     */
-    enum Status {
-       ORPHAN,                 // not yet added to pstaff
-       VIRGIN,                 // added to pstaff
-       PREBREAKING,
-       PREBROKEN,
-       PRECALCING,
-       PRECALCED,              // calcs before spacing done
-       BREAKING,
-       BROKEN,
-       POSTCALCING,            // busy calculating. This is used to trap cyclic deps.
-       POSTCALCED,             // after spacing calcs done
-       OUTPUT,                 // molecule has been output
-       DELMARKED,              // mark for 'unclean' deletion
-       DELETED,                // to catch malloc mistakes.
-    };
+  /// member: the symbols
+  Molecule *output;            // should scrap, and use temp var?
+
+
+
+  /**
+    for administration of what was done already
+    */
+  enum Status {
+    ORPHAN,                    // not yet added to pstaff
+    VIRGIN,                    // added to pstaff
+    PREBREAKING,
+    PREBROKEN,
+    PRECALCING,
+    PRECALCED,         // calcs before spacing done
+    BREAKING,
+    BROKEN,
+    POSTCALCING,               // busy calculating. This is used to trap cyclic deps.
+    POSTCALCED,                // after spacing calcs done
+    BREWED,
+    TEXOUTPUT,                 // molecule has been output
+    DELETED,           // to catch malloc mistakes.
+  };
     
-    Status status_;
+  Status status_;
 
-    Score_elem* dependency (int) const;
-    Score_elem* dependent (int) const;
-    int dependent_size() const;
-    int dependency_size() const;
+  Score_elem* dependency (int) const;
+  Score_elem* dependent (int) const;
+  int dependent_size() const;
+  int dependency_size() const;
 public:
-    /**
-      This is  needed, because #output# may still be
-      NULL.
-      */
-    Offset offset_;
+  /**
+    This is  needed, because #output# may still be
+    NULL.
+    */
+  Offset offset_;
 
 
 
 
-    Paper_score *pscore_l_;    
-    Axis_group_element * axis_group_l_a_[2];
+  Paper_score *pscore_l_;    
+  Axis_group_element * axis_group_l_a_[NO_AXES];
 
-    Score_elem (Score_elem const&);
-    virtual String TeX_string() const ;
-    String TeX_string_without_offset (Offset)const;
+  Score_elem (Score_elem const&);
+  virtual String TeX_output_str () const ;
     virtual void print() const;
     
-    Paper_def *paper() const;
+  Paper_def *paper() const;
 
-    virtual ~Score_elem();
-    Score_elem();
-    DECLARE_MY_RUNTIME_TYPEINFO;    
+  virtual ~Score_elem();
+  Score_elem();
+  DECLARE_MY_RUNTIME_TYPEINFO;    
     
-    Interval extent (Axis)const;
-    Interval width() const;
-    Interval height() const;
-    Status status() const;
+  Interval extent (Axis) const;
+  Interval width() const;
+  Interval height() const;
+  Status status() const;
     
-     /**
-      translate the symbol. The symbol does not have to be created yet. 
-      */
-    void translate (Offset);
-    /**
-      translate in one direction
-     */
+  /**
+    translate the symbol. The symbol does not have to be created yet. 
+    */
+  void translate (Offset);
+  /**
+    translate in one direction
+    */
     
-    void translate (Real, Axis);
-    Real relative_coordinate (Axis_group_element*, Axis)const;
-    Offset absolute_offset()const;
-    Real absolute_coordinate (Axis)const;
-    Axis_group_element*common_group (Score_elem const* s, Axis a)const;
-
-    void add_processing();
-    void OK() const;
-    void pre_processing();
-    void breakable_col_processing();
-    void break_processing();
+  void translate (Real, Axis);
+  Real relative_coordinate (Axis_group_element*, Axis) const;
+  Offset absolute_offset() const;
+  Real absolute_coordinate (Axis) const;
+  Axis_group_element*common_group (Score_elem const* s, Axis a) const;
+
+  void add_processing();
+  void OK() const;
+  void pre_processing();
+  void breakable_col_processing();
+  void break_processing();
     
-    void post_processing();
-    void molecule_processing();
-
-    /**
-      Remove all  links (dependencies, dependents, Axis_group_elements.
-     */
-    void unlink();
-    void unlink_all();
-    void substitute_dependency (Score_elem*,Score_elem*);
-    void remove_dependency (Score_elem*);
-    /**
-      add a dependency. It may be the 0 pointer, in which case, it is ignored.
-     */
-    void add_dependency (Score_elem*);    
-    void copy_dependencies (Score_elem const&);
-    /**
-      junk the dependency array. Don't do derived stuff.
-     */
-    void junk_dependencies();
-    
-
-    /*
-      virtual accessors
-     */
-
-    virtual Spanner* spanner()  { return 0; }
-    virtual Item * item() { return 0; }
-    virtual Line_of_score * line_l() const;
-    SCORE_ELEM_CLONE(Score_elem);
+  void post_processing();
+  void molecule_processing();
+
+  /**
+    Remove all  links (dependencies, dependents, Axis_group_elements.
+    */
+  void unlink();
+  void unlink_all();
+  void substitute_dependency (Score_elem*,Score_elem*);
+  void remove_dependency (Score_elem*);
+  /**
+    add a dependency. It may be the 0 pointer, in which case, it is ignored.
+    */
+  void add_dependency (Score_elem*);    
+
+  /*
+    virtual accessors
+    */
+
+  virtual Spanner* spanner()  { return 0; }
+  virtual Item * item() { return 0; }
+  virtual Line_of_score * line_l() const;
+  virtual bool linked_b() const;
+  SCORE_ELEM_CLONE(Score_elem);
  
-    /// no dimension, translation is noop
-    bool empty_b_;
-    /// do not print anything black
-    bool transparent_b_;
+  /// no dimension, translation is noop
+  bool empty_b_;
+  /// do not print anything black
+  bool transparent_b_;
 protected:
 
-    virtual  Interval do_height()const;
-    virtual Interval do_width()const;
+  virtual Interval do_height() const;
+  virtual Interval do_width() const;
     
-    /// do printing of derived info.
-    virtual void do_print() const {}
-    /// generate the molecule    
-    virtual Molecule* brew_molecule_p()const;
-    ///executed directly after the item is added to the Paper_score
-    virtual void do_add_processing();
-    /// 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();
+  /// do printing of derived info.
+  virtual void do_print() const {}
+  /// generate the molecule    
+  virtual Molecule* brew_molecule_p() const;
+  ///executed directly after the item is added to the Paper_score
+  virtual void do_add_processing();
+  /// 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 String do_TeX_output_str () const;
     
-    virtual void do_substitute_dependency (Score_elem * , Score_elem *);
-    virtual void do_substitute_dependent (Score_elem *, Score_elem *);
-    virtual void do_break_processing();
-    virtual void handle_broken_dependencies();
-    virtual void handle_prebroken_dependencies();
-    virtual Link_array<Score_elem> get_extra_dependencies()const;
-    virtual void do_unlink();
+  virtual void do_substitute_dependency (Score_elem * , Score_elem *);
+  virtual void do_substitute_dependent (Score_elem *, Score_elem *);
+  virtual void do_break_processing();
+  virtual void handle_broken_dependencies();
+  virtual void handle_prebroken_dependencies();
+  virtual Link_array<Score_elem> get_extra_dependencies() const;
+  virtual void do_unlink();
+  virtual void do_junk_links();
+  String make_TeX_string (Offset) const;
 };
 
 
index 705d92b0e5d57caf41318b0e02ffb03eb6251426..31b69273cc96d65cac23e404a804f62646f4a4d7 100644 (file)
   */
 class Staff_symbol : public Spanner
 {
-    /// this many lines.
-    int no_lines_i_;
+  /// this many lines.
+  int no_lines_i_;
 public:
-
-
-    void set_extent (PCol* p1, PCol* p2);
-    DECLARE_MY_RUNTIME_TYPEINFO;
-    Staff_symbol (int lines);
-    Real inter_note_f()const;
-    int steps_i()const;
+  DECLARE_MY_RUNTIME_TYPEINFO;
+  Staff_symbol (int lines);
+  Real inter_note_f() const;
+  int steps_i() const;
 protected:
-    SCORE_ELEM_CLONE(Staff_symbol);
-    virtual Molecule* brew_molecule_p() const;
-    virtual void do_print()const;
+  SCORE_ELEM_CLONE(Staff_symbol);
+  virtual Molecule* brew_molecule_p() const;
+  virtual void do_print() const;
 };
 #endif // STAFFSYM_HH