Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Ui.Event

Description

The main attributes of an event are its duration and text. The starting time is actually in the Track.

Events can display a signal, which will be rendered in the background in one of a few ways: a color, or a graph.

The text in events never changes size, even when you zoom in or out. If an Event gets too small for its text, it collapses into a blue chunk, which is the standard color for some data that didn't fit.

The beginning of the Event is marked with a red line. The text will begin slightly below the line, but still try to fit within the event. If the Event end doesn't give room for the text, the text will overlap the line so that its bottom touches the bottom of the Event. If there is no room for the text at all, because of other text or the top of the Event, the text will disappear and the line will be blue, to mark hidden text.

No Event may overlap another Event on the same Track.

Synopsis

types

data Event Source #

Instances

Instances details
Show Event Source # 
Instance details

Defined in Ui.Event

Methods

showsPrec :: Int -> Event -> ShowS #

show :: Event -> String #

showList :: [Event] -> ShowS #

CStorable Event Source # 
Instance details

Defined in Ui.Event

Methods

sizeOf :: Event -> Int #

alignment :: Event -> Int #

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

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

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

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

peek :: Ptr Event -> IO Event #

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

DeepSeq.NFData Event Source # 
Instance details

Defined in Ui.Event

Methods

rnf :: Event -> () #

Eq Event Source # 
Instance details

Defined in Ui.Event

Methods

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

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

Pretty.Pretty Event Source # 
Instance details

Defined in Ui.Event

Serialize.Serialize Event Source # 
Instance details

Defined in Ui.Event

data Stack Source #

Constructors

Stack 

Fields

Instances

Instances details
Show Stack Source # 
Instance details

Defined in Ui.Event

Methods

showsPrec :: Int -> Stack -> ShowS #

show :: Stack -> String #

showList :: [Stack] -> ShowS #

DeepSeq.NFData Stack Source # 
Instance details

Defined in Ui.Event

Methods

rnf :: Stack -> () #

Eq Stack Source # 
Instance details

Defined in Ui.Event

Methods

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

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

Ord Stack Source # 
Instance details

Defined in Ui.Event

Methods

compare :: Stack -> Stack -> Ordering #

(<) :: Stack -> Stack -> Bool #

(<=) :: Stack -> Stack -> Bool #

(>) :: Stack -> Stack -> Bool #

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

max :: Stack -> Stack -> Stack #

min :: Stack -> Stack -> Stack #

Pretty.Pretty Stack Source # 
Instance details

Defined in Ui.Event

Serialize.Serialize Stack Source # 
Instance details

Defined in Ui.Event

type IndexKey = ScoreTime.TrackTime Source #

This is the original position of the event on its integrated track. I can use this to find the (hopefully) equivalent event from the next integration to apply it even if the event has been moved or altered.

Keying on just the position has the effect that moving an event means to move any event that is generated at that position. This might be perfectly reasonable or even desirable since it's easier to understand. I'll have to see what kinds of edits and what kinds of reintegrations are likely in practice.

clear_integration :: Event -> Event Source #

Recreate the event without the integrated-from metadata.

access

end :: Event -> ScoreTime.ScoreTime Source #

Return the position at the end of the event. If it has a negative duration, this will be before the start.

Orientation

modify

unmodified :: Event -> Event Source #

Mark this is a generated event, which has not yet been modified.

set_start :: ScoreTime.ScoreTime -> Event -> Event Source #

Move the start only. This could invert the duration if the start moves past the end.

set_end :: ScoreTime.ScoreTime -> Event -> Event Source #

Redundant with the end_ lens, but here for symmetry with set_start.

round :: Event -> Event Source #

Round event times as described in ScoreTime.round.

TODO used by Events, do I really need this?

misc

style

type EventStyle Source #

Arguments

 = Text

track title

-> Event 
-> Style.StyleId 

This is called on events before they go to the UI, to be used for "syntax highlighting", i.e. it can set the style depending on the event, but the change in style won't be saved in the event itself.