My attempt to condense a few related discussions and provide a solution.

First, automatically calculated notation properties must be local to a 
particular type of staff (more specific than just TabStaff, since we need the 
number of lines and tuning to determine HEIGHT_ON_STAFF.)

There also need to be  properties that the user can set (e.g. STEM_UP) for a 
particular staff type. If present, these override the corresponding local 
properties. These properties outlast a particular view, so they are "global", 
but there needs to be a way to tag them as applying only to a particular 
staff type. Use a prefix to indicate staff type?


Second, is Segment selection/viewing when the Segments overlap. It seems 
what's desired is Heikki Junes suggestion that we have Track x, Segment y, 
where x and y are numbers. This corresponds to my want of: given a track, 
what segments does it have?

A way to achieve this would be to give Track a list of Segments. This doesn't 
seem like an overly difficult thing to achieve.


For dealing with multiple staff types in the tablature implementation, I've 
put a StaffType member in Track. I can't think of a reason not to.


Now for notation layout. To deal with multiple staff types, there needs to be 
another layer. Things like NotePixmapFactory, and some of the layout code are 
dependent upon staff type. (My naming scheme here gets yucky because of RG's 
way of defining a "staff" as corresponding to a segment rather than to a 
track.) I've listed some (highly abbreviated) classes:

class NotationTrack
{
        // I own these
        vector<NotationStaff*> m_staffs; // all belong to same Track
        NotePixmapFactory *m_npf;
        NotationTrackHLayout *m_hlayout;
        NotationTrackVLayout *m_vlayout;
};

class NotationView
{
        // I own these
        vector<NotationTrack*> m_notationTracks;
        NotationViewHLayout *m_hlayout;
        NotationViewVLayout *m_vlayout;
};

When NotationView creates the staffs, it also creates the NotationTracks and 
puts the appropriate staffs in them. The NotationTrack ctor is passed font 
name and size so it can create a NotePixmapFactory.

class NotationTrackHLayout
{
        scan();
        scanChord();
        positionChord();

        NotationStaff *m_staff;
        BarDataList m_bdl;
};

class NotationViewHLayout
{
        scanTrack(NotationTrack *ntrk);
        scanStaff(NotationStaff *staff);
        reconcileLayout();

        NotationView *m_view;
};

>From m_view, NotationViewHLayout can get the appropriate NotationTrack for 
scanTrack() and scanStaff(), as well as for reconciling the layout.

This doesn't solve everything, but it allows different staff types in the same 
view.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to