OK, I've made the most basic change to place the fretboard above the 
staff instead of below.  This just consists of assigning a y coordinate 
in NotationVLayout::scanStaff (search for "Fingering" -- the model is 
much as you already applied in NotationStaff).

A few notes:

 * The fretboard will have to be rather smaller relative to the staff 
size for this to work!  At the moment it only just fits between the top 
of the window and the top staff line.  Or the amount of space above the 
staff could be increased... the fretboard probably should be a bit 
smaller and squarer anyway though.

 * The x-coord for the fretboard is currently assigned using the default 
logic in NotationHLayout according to where it sits in the event list. 
If this isn't what you want, NotationHLayout is similar (but a bit more 
complicated) to tweak.  It may be a good idea for Fingering::getAsEvent 
to assign a negative SubOrdering value to the event it returns so as to 
place it slightly before the default positioning for other events at 
the same time (see e.g. Text::EventSubOrdering in base/NotationTypes.C, 
where Text events are given a subordering of -70 compared to e.g. -250 
for clefs and +10 for rests -- this defines the relative ordering of 
these events where they appear at the same time).

 * PropertyName values should usually be persistent (i.e. usually 
static) constants where possible.  (We do sometimes break this rule 
elsewhere, but it's still a decent rule.)  If you look at the 
PropertyName constructor implementations you'll see that they do a 
certain amount of work to intern the string values on construction so 
as to enable fast comparison from integers afterwards.  This 
optimisation is undermined (to some extent) if they are always 
constructed as temporaries from strings when used.


Chris


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to