2 align-item.hh -- declare Align_elem
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #ifndef VERTICAL_ALIGN_ITEM_HH
11 #define VERTICAL_ALIGN_ITEM_HH
13 #include "axis-group-element.hh"
14 #include "interval.hh"
15 #include "direction.hh"
17 #include "hash-table.hh"
20 Order elements top to bottom/left to right/right to left etc..
22 TODO: implement padding.
24 document usage of this.
26 class Align_element : public virtual Axis_group_element {
27 Hash_table<Score_element*,int> priority_i_hash_;
28 void sort_elements ();
30 Interval threshold_interval_ ;
33 Should high priorities be first or last?
36 Direction stacking_dir_;
39 Which side to align? -1: left side, 0: centered (around
40 center_l_ if not nil, or around center of width), 1: right side
42 URG. Unintuitive if stacking_dir_ == -1
48 Score_element * center_l_;
52 void add_element (Score_element*);
53 void add_element_priority (Score_element*, int);
54 bool contains_b (Score_element const*) const;
56 Score_element *get_elt_by_priority (int) const;
57 int get_priority (Score_element*) const;
59 virtual void do_print() const;
60 virtual void do_substitute_element_pointer (Score_element*,Score_element*);
61 virtual void do_post_processing() ;
62 virtual void do_pre_processing ();
63 virtual void do_side_processing ();
65 #endif // VERTICAL_ALIGN_ITEM_HH