editor

package
v0.0.0-...-f5beb5c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ACTIONS_MODE int = iota
	ACTIONS_COLORS
	ACTIONS_FADE
	ACTIONS_SIZE
	ACTIONS_SPEED
	ACTIONS_ROTATE
	ACTIONS_ROTATESPEED
	ACTIONS_PROGRAM
	ACTIONS_STROBE
)
View Source
const (
	CHANNEL_NUMBER int = iota
	CHANNEL_NAME
	CHANNEL_DELETE
	CHANNEL_ADD
	CHANNEL_SETTINGS
)
View Source
const (
	FIXTURE_ID int = iota
	FIXTURE_TYPE
	FIXTURE_GROUP
	FIXTURE_NUMBER
	FIXTURE_NAME
	FIXTURE_LABEL
	FIXTURE_ADDRESS
	FIXTURE_DESCRIPTION
	FIXTURE_DELETE
	FIXTURE_ADD
	FIXTURE_CHANNELS
)
View Source
const (
	SETTING_NUMBER int = iota
	SETTING_NAME
	SETTING_CHANNEL
	SETTING_VALUE
	SETTING_DELETE
	SETTING_ADD
)
View Source
const (
	TITLE int = iota
	MESSAGE
	REPORT
)
View Source
const (
	STATE_NUMBER int = iota
	STATE_NAME
	STATE_BUTTONCOLOR
	STATE_DELETE
	STATE_ADD
	STATE_ACTIONS
	STATE_SETTINGS
)
View Source
const LABEL = 0
View Source
const RECTANGLE = 0
View Source
const SELECT = 1
View Source
const TEXT = 1

Variables

This section is empty.

Functions

func CreateActionsList

func CreateActionsList(stateList []fixture.State, selectedState int) fixture.Action

func GetFixtureLabelsForSwitches

func GetFixtureLabelsForSwitches(fixtures *fixture.Fixtures) []string

func NewChannelEditor

func NewChannelEditor(w fyne.Window, id int, channels []fixture.Channel, fp *FixturesPanel, fixtures *fixture.Fixtures) (modal *widget.PopUp, err error)

func NewFixturePanel

func NewFixturePanel(sequences []*common.Sequence, w fyne.Window, group int, number int, fixtures *fixture.Fixtures, commandChannels []chan common.Command) (popupFixturePanel *widget.PopUp, err error)

func NewStateEditor

func NewStateEditor(w fyne.Window, id int, fp *FixturesPanel, fixtures *fixture.Fixtures) (modal *widget.PopUp, err error)

Show a list of States.

func SetFromCheckState

func SetFromCheckState(cp *ColorPanel)

func SetRectangleColorsFromString

func SetRectangleColorsFromString(cp *ColorPanel, colors []string)

func UpdateAction

func UpdateAction(currentStateName string, actions []fixture.Action, id int, newAction fixture.Action) []fixture.Action

UpdateItem replaces the selected item by id with newItem.

func UpdateFixture

func UpdateFixture(fixtures []fixture.Fixture, id int, newItem fixture.Fixture) []fixture.Fixture

Types

type ActionPanel

type ActionPanel struct {
	ActionsPanel         *widget.List
	ActionsList          []fixture.Action
	ActionNameOptions    []string
	ActionColorsOptions  []string
	ActionModeOptions    []string
	ActionFadeOptions    []string
	ActionSizeOptions    []string
	ActionSpeedOptions   []string
	ActionRotateOptions  []string
	ActionRotateSpeed    []string
	ActionMusicOptions   []string
	ActionProgramOptions []string
	ActionStrobeOptions  []string
	UpdateActions        bool
	UpdateThisAction     int
	CurrentState         int
	CurrentStateName     string
}

func NewActionsPanel

func NewActionsPanel(w fyne.Window, actionsList []fixture.Action, fixtureInfo fixture.FixtureInfo) *ActionPanel

type ActiveHeader

type ActiveHeader struct {
	widget.Label
	OnTapped func()
}

func (*ActiveHeader) Tapped

func (h *ActiveHeader) Tapped(_ *fyne.PointEvent)

func (*ActiveHeader) TappedSecondary

func (h *ActiveHeader) TappedSecondary(_ *fyne.PointEvent)

type Button

type Button struct {
	// contains filtered or unexported fields
}

type ChannelPanel

type ChannelPanel struct {
	ChannelPanel   *widget.Table
	ChannelList    []fixture.Channel
	ChannelOptions []string
}

func NewChannelPanel

func NewChannelPanel(thisFixture fixture.Fixture, channels []fixture.Channel, st *SettingsPanel) *ChannelPanel

type ColorPanel

type ColorPanel struct {
	Panel            *fyne.Container
	UpdateThisAction int
	UpdateColors     bool
	ColorSelection   string // Coma seperated string of color names, Upcase first letter.
	Buttons          map[string]Button
	ActionNumber     int
	Rectanges        []*canvas.Rectangle // Display rectangles.
	Modal            *widget.PopUp
}

func NewColorPickerPanel

func NewColorPickerPanel(w fyne.Window) *ColorPanel

type FixturesPanel

type FixturesPanel struct {
	FixturePanel      *widget.Table
	FixtureList       []fixture.Fixture
	UpdateThisFixture int

	UpdateChannels      bool
	UpdateStates        bool
	UpdatedChannelsList []fixture.Channel
	UpdatedStatesList   []fixture.State

	UpdateUseFixture bool
	UseFixture       string

	UpdateDescription bool
	Description       string

	GroupOptions  []string
	NumberOptions []string
	TypeOptions   []string

	DMXAddressEntryError  map[int]bool
	NameEntryError        map[int]bool
	LabelEntryError       map[int]bool
	DescriptionEntryError map[int]bool
}

type SettingsPanel

type SettingsPanel struct {
	SettingsPanel     *widget.Table
	SettingsList      []fixture.Setting
	SettingMaxDegrees *int
	SettingsOptions   []string
	ChannelOptions    []string
	CurrentChannel    int
	UpdateThisChannel int
	UpdateSettings    bool

	NameEntryError     map[int]bool
	DMXValueEntryError map[int]bool
}

func NewSettingsPanel

func NewSettingsPanel(w fyne.Window, SettingsList []fixture.Setting, channelFieldDisabled bool, buttonSave *widget.Button) *SettingsPanel

type StatePanel

type StatePanel struct {
	StatePanel         *widget.Table
	StatesList         []fixture.State
	ButtonColorOptions []string
	StateOptions       []string
}

func NewStatePanel

func NewStatePanel(statesList []fixture.State, ap *ActionPanel, st *SettingsPanel) *StatePanel

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL