refactor(tracker, gioui): get rid of EditMode, use gio focus instead

This commit is contained in:
vsariola
2021-04-24 22:07:56 +03:00
parent e544e955cb
commit b2b15f825d
16 changed files with 1325 additions and 1086 deletions

View File

@ -18,7 +18,6 @@ import (
// protected.
type Model struct {
song sointu.Song
editMode EditMode
selectionCorner SongPoint
cursor SongPoint
lowNibble bool
@ -54,17 +53,8 @@ type Parameter struct {
LargeStep int
}
type EditMode int
type ParameterType int
const (
EditPatterns EditMode = iota
EditTracks
EditUnits
EditParameters
)
const (
IntegerParameter ParameterType = iota
BoolParameter
@ -697,10 +687,6 @@ func (m *Model) DeletePatternSelection() {
m.notifyScoreChange()
}
func (m *Model) SetEditMode(value EditMode) {
m.editMode = value
}
func (m *Model) Undo() {
if !m.CanUndo() {
return
@ -758,10 +744,6 @@ func (m *Model) Song() sointu.Song {
return m.song
}
func (m *Model) EditMode() EditMode {
return m.editMode
}
func (m *Model) SelectionCorner() SongPoint {
return m.selectionCorner
}