#include "molecule.hh"
#include "text-item.hh"
+Clef_item::Clef_item (SCM s)
+ : Item (s)
+{}
+
void
Clef_item::before_line_breaking ()
{
style = ly_scm2string (style_sym);
SCM glyph = get_elt_property ("glyph");
+
+ /*
+ FIXME: should use symbol.
+ */
if (gh_string_p (glyph))
{
String s = ly_scm2string (glyph);
-
+
+ /*
+ FIXME: should use fontsize property to set clef changes.
+ */
if (break_status_dir() != RIGHT && style != "fullSizeChanges")
{
s += "_change";
Universal key definition (Should rename class Key to 'Accidentals'?)
FIXME: merge key.hh and key-def.hh classes.
+
+ FIXME: use Scheme data structs for this.
*/
class Key_def
{
#include "array.hh"
#include "lily-proto.hh"
+/*
+ JUNKME JUNKME JUNKME
+ */
+
/// administration of current key in one octave.
class Octave_key {
Scope *scope_p_;
Array<String> filename_str_arr_;
- Scheme_hash_table default_properties_;
Music_output_def (Music_output_def const&);
Music_output_def ();
(c) 1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
-// clean me up
+
#include "key-engraver.hh"
#include "key-item.hh"
#include "command-request.hh"
#include "timing-translator.hh"
#include "staff-symbol-referencer.hh"
+/*
+ this is a large mess. Please clean this to use Basic properties and
+ Scheme data structs.
+ */
+
Key_engraver::Key_engraver ()
{
item_p_ = 0;
{
if (!item_p_)
{
- item_p_ = new Key_item;
+ item_p_ = new Key_item ( get_property ("basicKeyProperties"));
+
+ item_p_->set_elt_property ("c0-position", gh_int2scm (0));
+
+ // todo: put this in basic props.
+ item_p_->set_elt_property ("old-accidentals", SCM_EOL);
+ item_p_->set_elt_property ("new-accidentals", SCM_EOL);
+
Staff_symbol_referencer_interface st (item_p_);
st.set_interface ();
-
- item_p_->set_elt_property ("break-align-symbol", ly_symbol2scm ("Key_item"));
- item_p_->set_elt_property ("multi-octave",
- gh_bool2scm (key_.multi_octave_b_));
+ if (key_.multi_octave_b_)
+ item_p_->set_elt_property ("multi-octave", gh_bool2scm (key_.multi_octave_b_));
announce_element (Score_element_info (item_p_,keyreq_l_));
if (!def)
- item_p_->set_elt_property ("visibility-lambda",
- scm_eval (ly_symbol2scm ("all-visible")));
+ item_p_->set_elt_property ("visibility-lambda",
+ scm_eval (ly_symbol2scm ("all-visible")));
}
}
| paper_def_body assignment semicolon {
- }
- | paper_def_body SCM_T '=' SCM_T {
- if (!gh_symbol_p ($2))
- THIS->parser_error ("expect a symbol as lvalue");
- else
- $$->default_properties_.set ($2, $4);
- }
- | paper_def_body SCM_T '=' real semicolon {
- if (!gh_symbol_p ($2))
- THIS->parser_error ("expect a symbol as lvalue");
- else
- $$->default_properties_.set ($2, gh_double2scm ($4));
}
| paper_def_body translator_spec_block {
$$->assign_translator ($2);
textScriptPadding = #3.0
\consists "Text_engraver";
+
startSustain = #"Ped."
stopSustain = #"*"
stopStartSustain = #"*Ped."
defaultBarType = #"|"
systemStartDelimiterGlyph = #'bar-line
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ % default settings, mainly for breakable items
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+ basicBarNumberProperties = #`(
+ (breakable . #t)
+ (visibility-lambda . ,begin-of-line-visible)
+ )
+ basicMarkProperties = #'(
+ (breakable . #t)
+ (visibility-lambda . end-of-line-invisible)
+ )
+ leftEdgeBasicProperties = #'(
+ (break-align-symbol . Left_edge_item)
+ (breakable . #t)
+ )
+
+ staffSymbolBasicProperties = #'(
+ (staff-space . 1.0 )
+ (line-count . 5 )
+ )
+ basicTimeSignatureProperties = #`(
+ (break-align-symbol . Time_signature)
+ (visibility-lambda . ,all-visible)
+ (breakable . #t)
+ )
+ basicBarlineProperties = #`(
+ (break-align-symbol . Staff_bar)
+ (visibility-lambda . ,begin-of-line-invisible)
+ (breakable . #t)
+ )
+ basicSystemStartDelimiterProperties = #'(
+ (collapse-height . 1.0)
+ )
+ basicKeyProperties = #`(
+ (break-align-symbol . Key_item)
+ (visibility-lambda . ,begin-of-line-visible)
+ (breakable . #t)
+ )
+ basicClefItemProperties = #`(
+ (breakable . #t)
+ (break-align-symbol . Clef_item)
+ (visibility-lambda . ,begin-of-line-visible)
+ )
+
+ basicBeamProperties = #`(
+ (beam-thickness . 0.42) ; interline!
+ )
+ basicStemTremoloProperties = #'(
+ (beam-width . 4.0) ; interline!
+ )
+
+ basicBreathingSignProperties = #'(
+ (break-align-symbol . Breathing_sign)
+ (breakable . #t )
+ (visibility-lambda . ,begin-of-line-invisible)
+ )
+ basicOctavateEightProperties = #'(
+ (self-alignment-X . 0)
+ (text . "8")
+ (style . "italic")
+ )
+ basicDynamicLineSpannerProperties = #`(
+ (transparent . #t)
+ )
+ basicDynamicTextProperties = # `(
+ (style . "dynamic")
+ (script-priority . 100)
+ (self-alignment-Y . 0)
+ )
+ basicLyricTextProperties = #`(
+ (non-rhythmic . #t)
+ )
+ basicRestCollisionProperties = #`(
+ (transparent . #t)
+ )
+ basicCollisionProperties = #`(
+ (transparent . #t)
+ (axes 0 1)
+ )
+ basicSingleMaltGroupingItemProperties = #'(
+ (transparent . #t)
+ )
+ basicBreakAlignProperties = #'(
+ (breakable . #t)
+ )
+ basicInstrumentNameProperties = #`(
+ (breakable . #t)
+ (break-align-symbol . Instrument_name)
+ (visibility-lambda . ,begin-of-line-visible)
+ )
+ basicLocalKeyProperties = #`(
+ (left-padding . 0.2)
+ (right-padding . 0.4)
+ )
+
\accepts "Staff";
\accepts "StaffGroup";
\accepts "RhythmicStaff";
markVisibilityFunction = #end-of-line-invisible
- barNumberVisibilityFunction = #begin-of-line-visible
};
\translator { \ScoreContext }
% params.ly
% generic paper parameters
-#'staff-height = \staffheight;
paperfile = \papersize + ".ly";
% paperfile = "a4.ly";
% urg, need grace_ versions of these too?
beam_thickness = 0.52 * (\staffspace - \stafflinethickness);
-#'beam-thickness = \beam_thickness; %% UGR
interbeam = (2.0 * \staffspace + \stafflinethickness - \beam_thickness) / 2.0;
arithmetic_basicspace = 2.0;
-
-
-#'Stem_tremolo::beam-width = 1.5 * \quartwidth ;
-
-#'Left_edge_item::visibility-lambda = #begin-of-line-visible
-
%
% UGH; junk these!
%
-#'Key_item::visibility-lambda = #begin-of-line-visible
-#'Breathing_sign::visibility-lambda = #begin-of-line-invisible
-
% catch suspect beam slopes, set slope to zero if
% outer stem is lengthened more than
beam_lengthened = 0.2 * \staffspace;
\include "engraver.ly";
-#'margin-shape = #'()
-
-%
-#'Local_key_item::left-padding = #'0.2
-#'Local_key_item::right-padding = #'0.4
-#'Staff_symbol::staff-space = \staffspace ;
-#'Staff_symbol::line-count = #5