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



Cmds related to view level state.



modify_factor :: Cmd.M m => ViewId -> (Double -> Double) -> m () Source #

zoom_to_ruler_or_selection :: Cmd.M m => m () Source #

Zoom to the ruler duration if the selection is a point, or zoom to the selection if it's not.

zoom_by_rank :: Cmd.M m => TimeStep.Direction -> m () Source #

Go through zoom factors for timesteps at the current point, and pick the next larger or smaller one.

zoom_to_rank :: Cmd.M m => Meter.Rank -> m () Source #

Set zoom to where text at the given timestep should be visible. This means the timestep amount of score should get Config.event_text_height pixels.


scroll_pages :: Cmd.M m => ScoreTime.TrackTime -> m () Source #

Scroll by the number of pages, where a page is a fraction of the score visible at the current zoom.


resize_all :: Cmd.M m => m () Source #

window management

fit_rects :: Rect.Rect -> [(ViewId, Rect.Rect)] -> [(ViewId, Rect.Rect)] Source #

Fit rectangles into a tiling pattern. The algorithm is to sort them by X and Y, and place the first rectangle at (0, 0). Then try to fit each rectangle to the below or the right of each already placed rectangle, filtering out the positions that would cause an overlap, and pick the spot closest to the rectangle's original position. The whole process is started again with any rectangles that wind up totally outside the screen.

horizontal_tile :: Cmd.M m => m () Source #

Arrange views horizontally on each screen. They'll overlap if there isn't room for all of them.

group_with :: (key -> val -> Bool) -> [key] -> [val] -> ([(key, [val])], [val]) Source #


cycle_focus :: Cmd.M m => Bool -> m () Source #

data Direction Source #

Right and Left would clash with Either.




Instances details
Show Direction Source # 
Instance details

Defined in Cmd.ViewConfig

create views

views_covering :: Cmd.M m => ViewId -> m [ViewId] Source #

For the current window, open enough views at the current zoom to see the score from the current time until the end of the block.

saved views

save_views :: Cmd.M m => Text -> m () Source #

Save the current views under the given name.

restore_views :: Cmd.M m => Text -> m () Source #

Replace the current views with the saved ones. The current one is first saved as "prev".

remove_views :: Ui.M m => Text -> m () Source #