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

Cmd.Views

Contents

Description

Lower level Block.View utilities. Specifically, this has support for Cmd.ViewConfig and Cmd.Create, so they don't have to import each other.

Synopsis

Documentation

zoom

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

Set zoom on the given view to make the entire block visible.

zoom_factor :: Ui.M m => ViewId -> ScoreTime.TrackTime -> m Double Source #

Figure out the zoom factor to display the given amount of TrackTime.

set_zoom :: Cmd.M m => ViewId -> Zoom.Zoom -> m () Source #

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

Set time scroll, clipping so it doesn't scroll past block_end.

size

resize_to_fit Source #

Arguments

:: Cmd.M m 
=> Bool

maximize the window vertically

-> ViewId 
-> m () 

Resize a window to fit its tracks.

contents_rect :: Ui.M m => Block.View -> m Rect.Rect Source #

Get the View's Rect, resized to fit its contents at its current zoom. Its position is unchanged.

util