]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/stem.hh
release: 1.3.69
[lilypond.git] / lily / include / stem.hh
1 /*
2   stem.hh -- declare Stem
3
4   (c) 1996--2000 Han-Wen Nienhuys
5 */
6
7 #ifndef STEM_HH
8 #define STEM_HH
9
10 #include "item.hh"
11 #include "array.hh"
12 #include "moment.hh"
13 #include "molecule.hh"
14 #include "stem-info.hh"
15
16 /**the rule attached to the ball.
17   takes care of:
18
19   \begin{itemize}
20   \item the rule
21   \item the flag
22   \item up/down position.
23   \end{itemize}
24
25   should move beam_{left, right} into Beam
26
27   TODO.
28   
29   Stem size depends on flag.
30
31   elt properties:
32
33   beam_dir: direction of the beam (int)
34
35   dir_force: is direction explicitely specified? (bool)
36
37   /// how many abbrev beam don't reach stem?
38   int beam_gap_i_;
39
40
41   
42   */
43 class Stem : public Item
44 {
45 public:
46   static SCM brew_molecule (SCM);
47
48   /// log of the duration. Eg. 4 -> 16th note -> 2 flags
49   static  int flag_i (Score_element*) ;
50
51   static int beam_count (Score_element*,Direction) ;
52   static void set_beaming (Score_element*,int,  Direction d);
53   /** 
54       don't print flag when in beam.
55       our beam, for aligning abbrev flags
56   */
57   static Beam * beam_l (Score_element*);
58   static Score_element * first_head (Score_element*) ;
59   static Drul_array<Score_element*> extremal_heads (Score_element*);
60
61   static Score_element * support_head (Score_element*) ;
62   Stem (SCM);
63
64   /// ensure that this Stem also encompasses the Notehead #n#
65   static void add_head (Score_element*me, Score_element*n);
66
67   static Stem_info calc_stem_info (Score_element *) ;
68
69   static Real chord_start_f (Score_element *) ;
70   static Direction get_direction (Score_element*) ;
71   static int type_i (Score_element *) ;
72   static void set_stemend (Score_element *,Real);
73   static Direction get_default_dir(Score_element *) ;
74   static int get_center_distance(Score_element *,Direction) ;
75   static int heads_i (Score_element *) ;
76
77   static bool invisible_b(Score_element *) ;
78  
79   /// heads that the stem encompasses (positions)
80   static Interval head_positions(Score_element *) ;
81
82
83   static Real get_default_stem_end_position (Score_element*me) ;
84   static void position_noteheads(Score_element*);
85   static Real stem_end_position (Score_element*) ;
86   static Real off_callback (Score_element *, Axis);
87   static Molecule flag (Score_element*);
88   static SCM before_line_breaking (SCM);
89   static Interval dim_callback (Score_element *,Axis);
90   static bool has_interface (Score_element*);
91   static void set_interface (Score_element*);
92
93   static void set_spacing_hints (Score_element*me) ;
94 };
95 #endif