Karya, built on 2022-03-21T01:30:44 (patch 89d1651424c35e564138d93424a157ff87457245)
Safe HaskellSafe-Inferred

Ui.Ruler

Contents

Synopsis

Ruler

data Ruler Source #

A Ruler contains all the data to display a ruler.

Constructors

Ruler 

Fields

Instances

Instances details
Show Ruler Source # 
Instance details

Defined in Ui.Ruler

Methods

showsPrec :: Int -> Ruler -> ShowS #

show :: Ruler -> String #

showList :: [Ruler] -> ShowS #

CStorable Ruler Source # 
Instance details

Defined in Ui.RulerC

Methods

sizeOf :: Ruler -> Int #

alignment :: Ruler -> Int #

peekElemOff :: Ptr Ruler -> Int -> IO Ruler #

pokeElemOff :: Ptr Ruler -> Int -> Ruler -> IO () #

peekByteOff :: Ptr b -> Int -> IO Ruler #

pokeByteOff :: Ptr b -> Int -> Ruler -> IO () #

peek :: Ptr Ruler -> IO Ruler #

poke :: Ptr Ruler -> Ruler -> IO () #

DeepSeq.NFData Ruler Source # 
Instance details

Defined in Ui.Ruler

Methods

rnf :: Ruler -> () #

Eq Ruler Source # 
Instance details

Defined in Ui.Ruler

Methods

(==) :: Ruler -> Ruler -> Bool #

(/=) :: Ruler -> Ruler -> Bool #

Pretty.Pretty Ruler Source # 
Instance details

Defined in Ui.Ruler

Serialize Ruler Source # 
Instance details

Defined in Cmd.Serialize

type Marklists = Map Name (Maybe Meter.Meter, Mark.Marklist) Source #

Each ruler can have multiple named marklists. This means a ruler can have multiple simultaneous meters, or a separate list of ad-hoc cue points. All marks are flattened before display, and are drawn in the sort order of their Names.

However, multiple meters are liable to be cluttered, and multiple cue lists also seem gratuitous.

type Name = Text Source #

meter_ruler :: Meter.Meter -> Ruler Source #

Create a ruler with just a meter marklist.

meter_name :: Name Source #

The meter marklist by convention has marks corresponding to the meter of the piece. Other commands may use this to find out where beats are.

modify_marklist :: Name -> (Mark.Marklist -> Mark.Marklist) -> Ruler -> Ruler Source #

If the marklist isn't set, modify will be given an empty one.

time_end :: Ruler -> ScoreTime Source #

Get the position of the last mark of the ruler.

bounds

bounds_name :: Name Source #

Marks on this marklist given the logical block bounds. If there is one mark, it denotes the logical block end. Two morks mean the first one is the logical block start. The mark text doesn't matter, but s and e are customary.

bounds_of :: Ruler -> (ScoreTime, Maybe ScoreTime) Source #

Get block bounds as defined by the ruler. This uses explicit bounds_name if there are any, otherwise it uses the meter. Otherwise, the start time can default to 0, but the end time defaults to Nothing so the caller can use the end of the last event.