Karya, built on 2020-11-26T21:03:17 (patch 23b5be2d53a9e8e7d6136cda5aae2849abe5cded)
Safe HaskellNone

Cmd.ViewConfig

Description

Cmds related to view level state.

Synopsis

zoom

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.

scroll

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

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 #

focus

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

data Direction Source #

Right and Left would clash with Either.

Constructors

North 
South 
East 
West 

Instances

Instances details
Show Direction # 
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 #