#include "abbreviation-beam.hh"
#include "misc.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "molecule.hh"
#include "leastsquares.hh"
#include "stem.hh"
Bar::brew_molecule_p() const
{
Paper_def *p = paper();
- Symbol s = p->lookup_l()->bar (type_str_,
+ Atom s = p->lookup_l()->bar (type_str_,
p->get_var ("bar_size"));
Molecule*output = new Molecule (Atom (s));
return output;
#include "abbreviation-beam.hh"
#include "misc.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "molecule.hh"
#include "leastsquares.hh"
#include "stem.hh"
int lhalfs= lhalfs = here->beams_left_i_ - prev->beams_right_i_ ;
int lwholebeams= here->beams_left_i_ <? prev->beams_right_i_ ;
Real w = (here->hpos_f () - prev->hpos_f ())/4;
- Symbol dummy;
- Atom a (dummy);
+ Atom a;
if (lhalfs) // generates warnings if not
a = paper()->lookup_l ()->beam (sl, w);
a.translate (Offset (-w, -w * sl));
w+= (dx_f_drul_[RIGHT] - dx_f_drul_[LEFT]) * nw_f ;
Real round_w = w; // slur lookup rounds the slurwidth .
- Symbol sl = paper()->lookup_l ()->slur (dy , round_w, dir_);
+ Atom a = paper()->lookup_l ()->slur (dy , round_w, dir_);
Real error = w-round_w;
-
- Atom a (sl);
- a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
+ a.translate (Offset ((dx_f_drul_[LEFT] + 0.5)*nw_f + error/2,
pos_i_drul_[LEFT] * nh_f));
output->add (a);
return output;
String t = type_;
if (change_b_)
t += "_change";
- Symbol s = paper()->lookup_l ()->clef (t);
+ Atom s = paper()->lookup_l ()->clef (t);
Molecule*output = new Molecule (Atom (s));
output->translate (paper()->internote_f () * y_off, Y_AXIS);
return output;
Molecule*
Dots::brew_molecule_p () const
{
- Symbol d = paper ()->lookup_l ()->dots (no_dots_i_);
+ Atom d = paper ()->lookup_l ()->dots (no_dots_i_);
Molecule *out = new Molecule (Atom (d));
Real inter_f = paper ()->internote_f ();
out->translate (inter_f * position_i_, Y_AXIS);
#include "general-script-def.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
Direction
General_script_def::staff_dir() const
{
Atom
General_script_def::get_atom (Paper_def*, Direction) const
{
- Symbol s;
+ Atom s;
return Atom (s);
}
DECLARE_MY_RUNTIME_TYPEINFO;
private:
- Symbol get_symbol() const;
+ Atom get_symbol() const;
};
#endif // CRESCENDO_HH
struct Stem_req;
struct String;
struct Subtle_req;
-struct Symbol;
+struct Atom;
struct Symtable;
struct Symtables;
struct Super_elem;
virtual void do_substitute_dependency (Score_elem*,Score_elem*);
virtual Molecule * brew_molecule_p() const;
- virtual Symbol get_bar_sym (Real dy) const;
+ virtual Atom get_bar_sym (Real dy) const;
};
#endif // SPAN_BAR_HH
SCORE_ELEM_CLONE(Piano_brace);
protected:
virtual Interval do_width() const;
- virtual Symbol get_bar_sym (Real) const;
+ virtual Atom get_bar_sym (Real) const;
};
#endif // SPAN_SCORE_BAR_HH
-/*
- symbol.hh -- declare Symbol, Atom
- source file of the GNU LilyPond music typesetter
-
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
-*/
-
-#ifndef SYMBOL_HH
-#define SYMBOL_HH
-
-#include "string.hh"
-#include "boxes.hh"
-#include "lily-proto.hh"
-
-struct Symbol {
- String tex;
- Box dim;
-
- Symbol (String, Box);
- Symbol();
- String str() const; // for printing.
-};
-
-
-/// a symbol which can be translated, and freely copied
-struct Atom {
- Offset off_;
- Symbol sym_;
-
- /* *************** */
-
- void translate (Offset o) {
- off_ += o;
- }
- void translate (Real r,Axis a){
- off_[a] += r;
- }
- /// how big is #this#?
- Box extent() const;
- Atom (Symbol s);
-
- void print() const;
-
- String TeX_string() const;
-};
-#endif
+#error
/*
- lilypond, (c) 1996,97 Han-Wen Nienhuys
+ symtable.hh -- declare
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
+
+
#ifndef SYMTABLE_HH
#define SYMTABLE_HH
+
#include "dictionary.hh"
#include "string.hh"
-#include "symbol.hh"
+#include "atom.hh"
-struct Symtable : public Dictionary<Symbol> {
+struct Symtable : public Dictionary<Atom> {
String id_str;
- Symbol lookup (String) const;
+ Atom lookup (String) const;
void print() const;
};
const Array<int> &idx_arr =key_grav_r.accidental_idx_arr_;
for (int i = 0 ; i< idx_arr.size(); i++)
{
- int note = idx_arr[i];
- int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
+ int note = idx_arr[i];
+ int acc = ((Key &) key_grav_r.key_).oct (0).acc (note);
- add (note, acc);
+ add (note, acc);
}
}
{
if ((a<0 && p>FLAT_TOP_PITCH) ||
(a>0 && p>SHARP_TOP_PITCH))
- {
- p -= 7; /* Typeset below c_position */
+ {
+ p -= 7; /* Typeset below c_position */
}
pitch.push (p);
acc.push (a);
for (int i =0; i < pitch.size(); i++)
{
- Symbol s= paper()->lookup_l ()->accidental (acc[i]);
- Atom a (s);
- a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
- Molecule m (a);
- output->add_at_edge (X_AXIS, RIGHT, m);
+ Atom a =paper()->lookup_l ()->accidental (acc[i]);
+ a.translate ((c_position + pitch[i]) * inter, Y_AXIS);
+ Molecule m (a);
+ output->add_at_edge (X_AXIS, RIGHT, m);
}
if (pitch.size())
{
- Molecule m (paper()->lookup_l ()->fill (Box (
- Interval (0, paper()->note_width ()),
- Interval (0,0))));
+ Molecule m (paper()->lookup_l ()->fill (Box (
+ Interval (0, paper()->note_width ()),
+ Interval (0,0))));
- output->add_at_edge (X_AXIS, RIGHT, m);
+ output->add_at_edge (X_AXIS, RIGHT, m);
}
return output;
}
{
if (default_b_)
{
- transparent_b_ = (break_status_i() != 1);
- set_empty (transparent_b_);
+ transparent_b_ = (break_status_i() != 1);
+ set_empty (transparent_b_);
}
}
Molecule*
Meter::brew_molecule_p() const
{
- Symbol s = paper()->lookup_l ()->meter (args);
+ Atom s = paper()->lookup_l ()->meter (args);
return new Molecule (Atom (s));
}
#include "dimen.hh"
#include "string.hh"
#include "molecule.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "debug.hh"
#include "tex.hh"
int staff_size_i_ =8;
bool streepjes_b = (position_i_<-1) || (position_i_ > staff_size_i_+1);
- Symbol s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
+ Atom s(paper ()->lookup_l()->rest (balltype_i_, streepjes_b));
Molecule * m = new Molecule ( Atom (s));
m->translate (position_i_ * paper ()->internote_f (), Y_AXIS);
return m;
#include "scoreline.hh"
#include "dimen.hh"
#include "spanner.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "paper-def.hh"
#include "p-col.hh"
#include "p-score.hh"
#include "debug.hh"
#include "script-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "paper-def.hh"
#include "lookup.hh"
*/
#include "span-score-bar.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "paper-def.hh"
#include "lookup.hh"
}
-Symbol
+Atom
Piano_brace::get_bar_sym (Real dy) const
{
return paper()->lookup_l ()->vbrace (dy);
#include "dimen.hh"
#include "misc.hh"
#include "debug.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "stem.hh"
#include "paper-def.hh"
#include "lookup.hh"
#include "dimen.hh"
#include "debug.hh"
#include "real.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "assoc.hh"
#include "assoc-iter.hh"
#include "symtable.hh"
}
}
-Symbol
+Atom
Symtable::lookup (String s) const
{
if (elt_b (s))
else
{
warning ("Symtable `" + id_str+ "\': unknown symbol `" +s+"'\n");
- Symbol sy;
+ Atom sy;
return sy;
}
}
void
Symtable::print() const
{
- for (Assoc_iter<String, Symbol> i (*this); i.ok(); i++)
+ for (Assoc_iter<String, Atom> i (*this); i.ok(); i++)
{
DOUT << "\'" << i.key() << "\'->" << i.val ().str () << "\n";
}
(c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
*/
-#include "symbol.hh"
+#include "atom.hh"
#include "molecule.hh"
#include "plist.tcc"
#include "pcursor.tcc"
#include "dimen.hh"
#include "tex.hh"
-#include "symbol.hh"
+#include "atom.hh"
#include "varray.hh"
String
#include "text-def.hh"
#include "debug.hh"
#include "paper-def.hh"
-#include "symbol.hh"
+#include "atom.hh"
void