Safe Haskell | Safe-Inferred |
---|
Cmds related to view level state.
Synopsis
- cmd_zoom_around_insert :: Cmd.M m => (Double -> Double) -> m ()
- cmd_zoom_around :: Cmd.M m => ViewId -> ScoreTime.ScoreTime -> (Double -> Double) -> m ()
- zoom_around :: Zoom.Zoom -> ScoreTime.ScoreTime -> (Double -> Double) -> Zoom.Zoom
- zoom_pos :: ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime
- modify_factor :: Cmd.M m => ViewId -> (Double -> Double) -> m ()
- zoom_to_ruler_or_selection :: Cmd.M m => m ()
- zoom_to :: Cmd.M m => ViewId -> ScoreTime.TrackTime -> ScoreTime.TrackTime -> m ()
- zoom_by_rank :: Cmd.M m => TimeStep.Direction -> m ()
- zoom_to_rank :: Cmd.M m => Meter.Rank -> m ()
- time_to_zoom :: ScoreTime.TrackTime -> Double
- scroll_pages :: Cmd.M m => ScoreTime.TrackTime -> m ()
- scroll_to_end :: Cmd.M m => m ()
- scroll_to_home :: Cmd.M m => m ()
- resize_all :: Cmd.M m => m ()
- set_suggested_track_widths :: Cmd.M m => ViewId -> m ()
- fit_rects :: Rect.Rect -> [(ViewId, Rect.Rect)] -> [(ViewId, Rect.Rect)]
- corners_of :: Rect.Rect -> [Rect.Rect] -> [(Int, Int)]
- would_overlap :: [Rect.Rect] -> Rect.Rect -> (Int, Int) -> Bool
- horizontal_tile :: Cmd.M m => m ()
- windows_by_screen :: Cmd.M m => m [(Rect.Rect, [(ViewId, Rect.Rect)])]
- horizontal_tile_rects :: Rect.Rect -> [Rect.Rect] -> [Rect.Rect]
- group_with :: (key -> val -> Bool) -> [key] -> [val] -> ([(key, [val])], [val])
- cycle_focus :: Cmd.M m => Bool -> m ()
- data Direction
- move_focus :: Cmd.M m => Direction -> m ()
- views_covering :: Cmd.M m => ViewId -> m [ViewId]
- views_covering_starts :: ScoreTime.TrackTime -> Block.View -> [ScoreTime.TrackTime]
- save_views :: Cmd.M m => Text -> m ()
- restore_views :: Cmd.M m => Text -> m ()
- remove_views :: Ui.M m => Text -> m ()
zoom
cmd_zoom_around :: Cmd.M m => ViewId -> ScoreTime.ScoreTime -> (Double -> Double) -> m () Source #
zoom_around :: Zoom.Zoom -> ScoreTime.ScoreTime -> (Double -> Double) -> Zoom.Zoom Source #
zoom_pos :: ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime -> ScoreTime.ScoreTime 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_to :: Cmd.M m => ViewId -> ScoreTime.TrackTime -> ScoreTime.TrackTime -> m () Source #
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
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.
scroll_to_end :: Cmd.M m => m () Source #
scroll_to_home :: Cmd.M m => m () Source #
resize
resize_all :: Cmd.M m => m () Source #
set_suggested_track_widths :: Cmd.M m => ViewId -> 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 #
Right and Left would clash with Either.
move_focus :: Cmd.M m => Direction -> m () Source #
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 #