Karya, built on Mon Jul 24 11:39:07 PDT 2017 (patch 33511aca01257b76b88de7c7a2763b7a965c084e)

Safe HaskellNone

Ui.Sel

Description

The selection type.

Synopsis

Documentation

type Num = Int Source #

Index into the the selection list.

data Selection Source #

Constructors

Selection 

Fields

  • start_track :: !TrackNum

    The position the selection was established at. Since a selection can logically go off the edge of a block, this is not necessarily a valid TrackNum!

  • start_pos :: !TrackTime
     
  • cur_track :: !TrackNum

    The position the selection is now at. The tracks are an inclusive range, the pos are half-open. This is because these pairs are meant to be symmetrical, but the c++ layer only supports half-open pos ranges. I don't think there's much I can do about this.

    Unlike start_track, this should be a valid TrackNum, because cmds want to use it as the focused track.

  • cur_pos :: !TrackTime
     
  • orientation :: !Orientation
     

point :: TrackNum -> TrackTime -> Orientation -> Selection Source #

A point is a selection with no duration.

track_range :: Selection -> (TrackNum, TrackNum) Source #

Start and end tracks, from small to large.

tracknums :: TrackNum -> Selection -> [TrackNum] Source #

TrackNums covered by the selection. Since Selections may have out of range tracks, I need the number of tracks to generate a list of valid TrackNums.

range :: Selection -> (TrackTime, TrackTime) Source #

Start and end points, from small to large.

merge :: Selection -> Selection -> Selection Source #

Extend the current track and pos, but keep the start track and pos the same.

union :: Selection -> Selection -> Selection Source #

Make a selection that covers both the given selections. It tries to set start and cur values based on the direction of the merge, assuming you are starting with the first selection and adding the second.