Documentation
¶
Overview ¶
Copyright 2024-2026 ProntoGUI, LLC Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
ProntoGUI™ is a trademark of ProntoGUI, LLC
Index ¶
- Variables
- func ConvertAnyToInt(value any) (int, error)
- func VAA(rows ...[]Primitive) [][]Primitive
- type Any1DField
- func (f *Any1DField) EgestValue() any
- func (f *Any1DField) Get() []Primitive
- func (f *Any1DField) IngestValue(value any) error
- func (f *Any1DField) Length() int
- func (f *Any1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, ...) (isContainer bool)
- func (f *Any1DField) Set(ary []Primitive)
- func (f *Any1DField) UnprepareForUpdates()
- type Any2DField
- func (f *Any2DField) EgestValue() any
- func (f *Any2DField) Get() [][]Primitive
- func (f *Any2DField) IngestValue(value any) error
- func (f *Any2DField) Length() int
- func (f *Any2DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, ...) (isContainer bool)
- func (f *Any2DField) Set(ary [][]Primitive)
- func (f *Any2DField) UnprepareForUpdates()
- type AnyField
- func (f *AnyField) EgestValue() any
- func (f *AnyField) Get() Primitive
- func (f *AnyField) IngestValue(value any) error
- func (f *AnyField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, ...) (isContainer bool)
- func (f *AnyField) Set(p Primitive)
- func (f *AnyField) UnprepareForUpdates()
- type BlobField
- func (f *BlobField) EgestValue() any
- func (f *BlobField) Get() []byte
- func (f *BlobField) IngestValue(value any) error
- func (f *BlobField) LoadFromFile(filePath string) error
- func (f *BlobField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, ...) (isContainer bool)
- func (f *BlobField) SaveToFile(filePath string) error
- func (f *BlobField) Set(blob []byte)
- type BooleanField
- func (f *BooleanField) EgestValue() any
- func (f *BooleanField) Get() bool
- func (f *BooleanField) IngestValue(value any) error
- func (f *BooleanField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, ...) (isContainer bool)
- func (f *BooleanField) Set(b bool)
- type Card
- func (card *Card) Collapsed() bool
- func (card *Card) Embodiment() string
- func (card *Card) Enabled() bool
- func (card *Card) LeadingItem() Primitive
- func (card *Card) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (card *Card) MainItem() Primitive
- func (card *Card) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (card *Card) SetCollapsed(collapsed bool) *Card
- func (card *Card) SetEmbodiment(s string) *Card
- func (card *Card) SetEnabled(enabled bool) *Card
- func (card *Card) SetLeadingItem(p Primitive) *Card
- func (card *Card) SetMainItem(p Primitive) *Card
- func (card *Card) SetStatus(i int) *Card
- func (card *Card) SetSubItem(p Primitive) *Card
- func (card *Card) SetTag(s string) *Card
- func (card *Card) SetTrailingItem(p Primitive) *Card
- func (card *Card) SetVisible(visible bool) *Card
- func (card *Card) Status() int
- func (card *Card) String() string
- func (card *Card) SubItem() Primitive
- func (card *Card) Tag() string
- func (card *Card) TrailingItem() Primitive
- func (card *Card) Visible() bool
- type CardWith
- type Check
- func (check *Check) Checked() bool
- func (p *Check) Collapsed() bool
- func (check *Check) Embodiment() string
- func (p *Check) Enabled() bool
- func (check *Check) Label() string
- func (check *Check) LabelItem() Primitive
- func (check *Check) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (check *Check) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (check *Check) SetChecked(b bool) *Check
- func (p *Check) SetCollapsed(collapsed bool) *Check
- func (check *Check) SetEmbodiment(s string) *Check
- func (p *Check) SetEnabled(enabled bool) *Check
- func (check *Check) SetLabel(s string) *Check
- func (check *Check) SetLabelItem(item Primitive) *Check
- func (p *Check) SetStatus(i int) *Check
- func (check *Check) SetTag(s string) *Check
- func (p *Check) SetVisible(visible bool) *Check
- func (p *Check) Status() int
- func (check *Check) String() string
- func (check *Check) Tag() string
- func (p *Check) Visible() bool
- type CheckWith
- type Choice
- func (choice *Choice) Choice() string
- func (choice *Choice) ChoiceIndex() int
- func (choice *Choice) ChoiceLabels() []string
- func (choice *Choice) Choices() []string
- func (p *Choice) Collapsed() bool
- func (choice *Choice) Embodiment() string
- func (p *Choice) Enabled() bool
- func (choice *Choice) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (choice *Choice) SetChoice(s string) *Choice
- func (choice *Choice) SetChoiceIndex(index int) *Choice
- func (choice *Choice) SetChoiceLabels(sa []string) *Choice
- func (choice *Choice) SetChoiceLabelsVA(sa ...string) *Choice
- func (choice *Choice) SetChoices(sa []string) *Choice
- func (choice *Choice) SetChoicesVA(sa ...string) *Choice
- func (p *Choice) SetCollapsed(collapsed bool) *Choice
- func (choice *Choice) SetEmbodiment(s string) *Choice
- func (p *Choice) SetEnabled(enabled bool) *Choice
- func (p *Choice) SetStatus(i int) *Choice
- func (choice *Choice) SetTag(s string) *Choice
- func (p *Choice) SetVisible(visible bool) *Choice
- func (p *Choice) Status() int
- func (choice *Choice) String() string
- func (choice *Choice) Tag() string
- func (p *Choice) Visible() bool
- type ChoiceWith
- type Command
- func (p *Command) Collapsed() bool
- func (cmd *Command) Embodiment() string
- func (p *Command) Enabled() bool
- func (cmd *Command) Issued() bool
- func (cmd *Command) Label() string
- func (cmd *Command) LabelItem() Primitive
- func (cmd *Command) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (cmd *Command) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Command) SetCollapsed(collapsed bool) *Command
- func (cmd *Command) SetEmbodiment(s string) *Command
- func (p *Command) SetEnabled(enabled bool) *Command
- func (cmd *Command) SetLabel(s string) *Command
- func (cmd *Command) SetLabelItem(item Primitive) *Command
- func (p *Command) SetStatus(i int) *Command
- func (cmd *Command) SetTag(s string) *Command
- func (p *Command) SetVisible(visible bool) *Command
- func (p *Command) Status() int
- func (cmd *Command) String() string
- func (cmd *Command) Tag() string
- func (p *Command) Visible() bool
- type CommandWith
- type EventField
- type EventTimestampProvider
- type ExportFile
- func (p *ExportFile) Collapsed() bool
- func (ef *ExportFile) Data() []byte
- func (ef *ExportFile) Embodiment() string
- func (p *ExportFile) Enabled() bool
- func (ef *ExportFile) Exported() bool
- func (ef *ExportFile) Name() string
- func (ef *ExportFile) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (ef *ExportFile) Reset()
- func (p *ExportFile) SetCollapsed(collapsed bool) *ExportFile
- func (ef *ExportFile) SetData(d []byte) *ExportFile
- func (ef *ExportFile) SetEmbodiment(s string) *ExportFile
- func (p *ExportFile) SetEnabled(enabled bool) *ExportFile
- func (ef *ExportFile) SetExported(b bool) *ExportFile
- func (ef *ExportFile) SetName(s string) *ExportFile
- func (p *ExportFile) SetStatus(i int) *ExportFile
- func (ef *ExportFile) SetTag(s string) *ExportFile
- func (p *ExportFile) SetVisible(visible bool) *ExportFile
- func (p *ExportFile) Status() int
- func (ef *ExportFile) Tag() string
- func (p *ExportFile) Visible() bool
- type ExportFileWith
- type Field
- type FieldBase
- type FieldRef
- type Folder
- func (p *Folder) Collapsed() bool
- func (folder *Folder) Embodiment() string
- func (p *Folder) Enabled() bool
- func (folder *Folder) Expanded() bool
- func (folder *Folder) LabelItem() Primitive
- func (folder *Folder) Level() int
- func (folder *Folder) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (folder *Folder) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Folder) SetCollapsed(collapsed bool) *Folder
- func (folder *Folder) SetEmbodiment(s string) *Folder
- func (p *Folder) SetEnabled(enabled bool) *Folder
- func (folder *Folder) SetExpanded(b bool) *Folder
- func (folder *Folder) SetLabelItem(p Primitive) *Folder
- func (folder *Folder) SetLevel(level int) *Folder
- func (p *Folder) SetStatus(i int) *Folder
- func (folder *Folder) SetTag(s string) *Folder
- func (p *Folder) SetVisible(visible bool) *Folder
- func (p *Folder) Status() int
- func (folder *Folder) String() string
- func (folder *Folder) Tag() string
- func (p *Folder) Visible() bool
- type FolderItem
- func (p *FolderItem) Collapsed() bool
- func (folderItem *FolderItem) Embodiment() string
- func (p *FolderItem) Enabled() bool
- func (folderItem *FolderItem) Item() Primitive
- func (folderItem *FolderItem) Level() int
- func (folderItem *FolderItem) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (folderItem *FolderItem) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *FolderItem) SetCollapsed(collapsed bool) *FolderItem
- func (folderItem *FolderItem) SetEmbodiment(s string) *FolderItem
- func (p *FolderItem) SetEnabled(enabled bool) *FolderItem
- func (folderItem *FolderItem) SetItem(p Primitive) *FolderItem
- func (folderItem *FolderItem) SetLevel(level int) *FolderItem
- func (p *FolderItem) SetStatus(i int) *FolderItem
- func (folderItem *FolderItem) SetTag(s string) *FolderItem
- func (p *FolderItem) SetVisible(visible bool) *FolderItem
- func (p *FolderItem) Status() int
- func (folderItem *FolderItem) String() string
- func (folderItem *FolderItem) Tag() string
- func (p *FolderItem) Visible() bool
- type FolderItemWith
- type FolderWith
- type Frame
- func (p *Frame) Collapsed() bool
- func (frame *Frame) Embodiment() string
- func (p *Frame) Enabled() bool
- func (frame *Frame) FrameItems() []Primitive
- func (frame *Frame) Icon() Primitive
- func (frame *Frame) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (frame *Frame) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Frame) SetCollapsed(collapsed bool) *Frame
- func (frame *Frame) SetEmbodiment(s string) *Frame
- func (p *Frame) SetEnabled(enabled bool) *Frame
- func (frame *Frame) SetFrameItems(items []Primitive) *Frame
- func (frame *Frame) SetFrameItemsVA(items ...Primitive) *Frame
- func (frame *Frame) SetIcon(p Primitive) *Frame
- func (frame *Frame) SetShowing(showing bool) *Frame
- func (p *Frame) SetStatus(i int) *Frame
- func (frame *Frame) SetTag(s string) *Frame
- func (frame *Frame) SetTitle(s string) *Frame
- func (p *Frame) SetVisible(visible bool) *Frame
- func (frame *Frame) Showing() bool
- func (p *Frame) Status() int
- func (frame *Frame) Tag() string
- func (frame *Frame) Title() string
- func (p *Frame) Visible() bool
- type FrameWith
- type Group
- func (p *Group) Collapsed() bool
- func (grp *Group) Embodiment() string
- func (p *Group) Enabled() bool
- func (grp *Group) GroupItems() []Primitive
- func (grp *Group) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (grp *Group) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Group) SetCollapsed(collapsed bool) *Group
- func (grp *Group) SetEmbodiment(s string) *Group
- func (p *Group) SetEnabled(enabled bool) *Group
- func (grp *Group) SetGroupItems(items []Primitive) *Group
- func (grp *Group) SetGroupItemsVA(items ...Primitive) *Group
- func (p *Group) SetStatus(i int) *Group
- func (grp *Group) SetTag(s string) *Group
- func (p *Group) SetVisible(visible bool) *Group
- func (p *Group) Status() int
- func (grp *Group) Tag() string
- func (p *Group) Visible() bool
- type GroupWith
- type Icon
- func (p *Icon) Collapsed() bool
- func (icon *Icon) Embodiment() string
- func (p *Icon) Enabled() bool
- func (icon *Icon) IconID() string
- func (icon *Icon) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Icon) SetCollapsed(collapsed bool) *Icon
- func (icon *Icon) SetEmbodiment(s string) *Icon
- func (p *Icon) SetEnabled(enabled bool) *Icon
- func (icon *Icon) SetIconID(s string) *Icon
- func (p *Icon) SetStatus(i int) *Icon
- func (icon *Icon) SetTag(s string) *Icon
- func (p *Icon) SetVisible(visible bool) *Icon
- func (p *Icon) Status() int
- func (icon *Icon) String() string
- func (icon *Icon) Tag() string
- func (p *Icon) Visible() bool
- type IconWith
- type Image
- func (p *Image) Collapsed() bool
- func (image *Image) Embodiment() string
- func (p *Image) Enabled() bool
- func (image *Image) ID() string
- func (image *Image) Image() []byte
- func (image *Image) LoadFromFile(filename string) error
- func (image *Image) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (image *Image) Ref() string
- func (image *Image) SaveToFile(filename string) error
- func (p *Image) SetCollapsed(collapsed bool) *Image
- func (image *Image) SetEmbodiment(s string) *Image
- func (p *Image) SetEnabled(enabled bool) *Image
- func (image *Image) SetID(s string) *Image
- func (image *Image) SetImage(data []byte) *Image
- func (image *Image) SetRef(s string) *Image
- func (p *Image) SetStatus(i int) *Image
- func (image *Image) SetTag(s string) *Image
- func (p *Image) SetVisible(visible bool) *Image
- func (p *Image) Status() int
- func (image *Image) Tag() string
- func (p *Image) Visible() bool
- type ImageWith
- type ImportFile
- func (p *ImportFile) Collapsed() bool
- func (ifile *ImportFile) Data() []byte
- func (ifile *ImportFile) Embodiment() string
- func (p *ImportFile) Enabled() bool
- func (ifile *ImportFile) ImportData(d []byte) *ImportFile
- func (ifile *ImportFile) Imported() bool
- func (ifile *ImportFile) Name() string
- func (ifile *ImportFile) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (ifile *ImportFile) Reset()
- func (p *ImportFile) SetCollapsed(collapsed bool) *ImportFile
- func (ifile *ImportFile) SetEmbodiment(s string) *ImportFile
- func (p *ImportFile) SetEnabled(enabled bool) *ImportFile
- func (ifile *ImportFile) SetImported(b bool) *ImportFile
- func (ifile *ImportFile) SetName(s string) *ImportFile
- func (p *ImportFile) SetStatus(i int) *ImportFile
- func (ifile *ImportFile) SetTag(s string) *ImportFile
- func (ifile *ImportFile) SetValidExtensions(sa []string) *ImportFile
- func (p *ImportFile) SetVisible(visible bool) *ImportFile
- func (p *ImportFile) Status() int
- func (ifile *ImportFile) Tag() string
- func (ifile *ImportFile) ValidExtensions() []string
- func (p *ImportFile) Visible() bool
- type ImportFileWith
- type Integer1DField
- func (f *Integer1DField) EgestValue() any
- func (f *Integer1DField) Get() []int
- func (f *Integer1DField) IngestValue(value any) error
- func (f *Integer1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, ...) (isContainer bool)
- func (f *Integer1DField) Set(ia []int)
- type IntegerField
- type List
- func (p *List) Collapsed() bool
- func (list *List) Embodiment() string
- func (p *List) Enabled() bool
- func (list *List) ListItems() []Primitive
- func (list *List) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (list *List) ModelFolder() Primitive
- func (list *List) ModelItem() Primitive
- func (list *List) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (list *List) SelectedItems() []int
- func (list *List) SelectionMode() int
- func (p *List) SetCollapsed(collapsed bool) *List
- func (list *List) SetEmbodiment(s string) *List
- func (p *List) SetEnabled(enabled bool) *List
- func (list *List) SetListItems(items []Primitive) *List
- func (list *List) SetListItemsVA(items ...Primitive) *List
- func (list *List) SetModelFolder(item Primitive) *List
- func (list *List) SetModelItem(item Primitive) *List
- func (list *List) SetSelectedItems(selectedItems []int) *List
- func (list *List) SetSelectionMode(mode int) *List
- func (p *List) SetStatus(i int) *List
- func (list *List) SetTag(s string) *List
- func (p *List) SetVisible(visible bool) *List
- func (p *List) Status() int
- func (list *List) Tag() string
- func (p *List) Visible() bool
- type ListWith
- type Nothing
- type NothingWith
- type NumericField
- func (p *NumericField) Collapsed() bool
- func (nf *NumericField) Embodiment() string
- func (p *NumericField) Enabled() bool
- func (nf *NumericField) NumericEntry() string
- func (nf *NumericField) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *NumericField) SetCollapsed(collapsed bool) *NumericField
- func (nf *NumericField) SetEmbodiment(s string) *NumericField
- func (p *NumericField) SetEnabled(enabled bool) *NumericField
- func (nf *NumericField) SetNumericEntry(s string) *NumericField
- func (p *NumericField) SetStatus(i int) *NumericField
- func (nf *NumericField) SetTag(s string) *NumericField
- func (p *NumericField) SetVisible(visible bool) *NumericField
- func (p *NumericField) Status() int
- func (nf *NumericField) String() string
- func (nf *NumericField) Tag() string
- func (p *NumericField) Visible() bool
- type NumericFieldWith
- type Primitive
- type PrimitiveBase
- func (r *PrimitiveBase) EgestUpdate(fullupdate bool, fkeys []key.FKey) map[any]any
- func (r *PrimitiveBase) IndexOf(parentLevel int) int
- func (r *PrimitiveBase) IngestUpdate(update map[any]any) error
- func (r *PrimitiveBase) InternalPrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider, ...)
- func (r *PrimitiveBase) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (r *PrimitiveBase) String() string
- func (r *PrimitiveBase) UnprepareForUpdates()
- type ProntoGUI
- type Session
- type String1DField
- func (f *String1DField) EgestValue() any
- func (f *String1DField) Get() []string
- func (f *String1DField) IngestValue(value any) error
- func (f *String1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, ...) (isContainer bool)
- func (f *String1DField) Set(sa []string)
- type StringField
- type Synchro
- func (s *Synchro) GetFullUpdate() ([]byte, error)
- func (s *Synchro) GetPartialUpdate() ([]byte, error)
- func (s *Synchro) GetTopPrimitives() []Primitive
- func (s *Synchro) IngestUpdate(updatesCbor []byte) (updatedPrimitive Primitive, updateError error)
- func (s *Synchro) OnSet(pkey key.PKey, fkey key.FKey, structural bool)
- func (s *Synchro) SetTopPrimitives(etsprovider EventTimestampProvider, primitives ...Primitive)
- type Table
- func (p *Table) Collapsed() bool
- func (table *Table) DeleteAllRows()
- func (table *Table) DeleteRow(index int) error
- func (table *Table) Embodiment() string
- func (p *Table) Enabled() bool
- func (table *Table) GetHeadings() []string
- func (table *Table) HeaderRow() []Primitive
- func (table *Table) InsertRow(index int, row []Primitive)
- func (table *Table) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (table *Table) MakeHeadings(headings []string) *Table
- func (table *Table) MakeHeadingsVA(headings ...string) *Table
- func (table *Table) ModelRow() []Primitive
- func (table *Table) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (table *Table) RowCount() int
- func (table *Table) Rows() [][]Primitive
- func (table *Table) SelectedRows() []int
- func (cmd *Table) SelectionChanged() bool
- func (table *Table) SelectionMode() int
- func (p *Table) SetCollapsed(collapsed bool) *Table
- func (table *Table) SetEmbodiment(s string) *Table
- func (p *Table) SetEnabled(enabled bool) *Table
- func (table *Table) SetHeaderRow(items []Primitive) *Table
- func (table *Table) SetHeaderRowVA(items ...Primitive) *Table
- func (table *Table) SetModelRow(items []Primitive) *Table
- func (table *Table) SetRows(items [][]Primitive) *Table
- func (table *Table) SetSelectedRows(selected []int) *Table
- func (table *Table) SetSelectionMode(mode int) *Table
- func (p *Table) SetStatus(i int) *Table
- func (table *Table) SetTag(s string) *Table
- func (p *Table) SetVisible(visible bool) *Table
- func (p *Table) Status() int
- func (table *Table) Tag() string
- func (p *Table) Visible() bool
- type TableWith
- type TestPrimitive
- func (tp *TestPrimitive) EgestUpdate(fullupdate bool, fkeys []key.FKey) map[any]any
- func (tp *TestPrimitive) IngestUpdate(update map[any]any) error
- func (tp *TestPrimitive) IsPrepped() bool
- func (tp *TestPrimitive) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (tp *TestPrimitive) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (tp *TestPrimitive) String() string
- func (tp *TestPrimitive) UnprepareForUpdates()
- type Text
- func (p *Text) Collapsed() bool
- func (txt *Text) Content() string
- func (txt *Text) Embodiment() string
- func (p *Text) Enabled() bool
- func (txt *Text) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Text) SetCollapsed(collapsed bool) *Text
- func (txt *Text) SetContent(s string) *Text
- func (txt *Text) SetEmbodiment(s string) *Text
- func (p *Text) SetEnabled(enabled bool) *Text
- func (p *Text) SetStatus(i int) *Text
- func (txt *Text) SetTag(s string) *Text
- func (p *Text) SetVisible(visible bool) *Text
- func (p *Text) Status() int
- func (txt *Text) String() string
- func (txt *Text) Tag() string
- func (p *Text) Visible() bool
- type TextField
- func (p *TextField) Collapsed() bool
- func (txt *TextField) Embodiment() string
- func (p *TextField) Enabled() bool
- func (txt *TextField) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *TextField) SetCollapsed(collapsed bool) *TextField
- func (txt *TextField) SetEmbodiment(s string) *TextField
- func (p *TextField) SetEnabled(enabled bool) *TextField
- func (p *TextField) SetStatus(i int) *TextField
- func (txt *TextField) SetTag(s string) *TextField
- func (txt *TextField) SetTextEntry(s string) *TextField
- func (p *TextField) SetVisible(visible bool) *TextField
- func (p *TextField) Status() int
- func (txt *TextField) String() string
- func (txt *TextField) Tag() string
- func (txt *TextField) TextEntry() string
- func (p *TextField) Visible() bool
- type TextFieldWith
- type TextWith
- type Timer
- func (p *Timer) Collapsed() bool
- func (tmr *Timer) Embodiment() string
- func (p *Timer) Enabled() bool
- func (tmr *Timer) Issued() bool
- func (tmr *Timer) PeriodMs() int
- func (tmr *Timer) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Timer) SetCollapsed(collapsed bool) *Timer
- func (tmr *Timer) SetEmbodiment(s string) *Timer
- func (p *Timer) SetEnabled(enabled bool) *Timer
- func (tmr *Timer) SetPeriodMs(i int) *Timer
- func (p *Timer) SetStatus(i int) *Timer
- func (tmr *Timer) SetTag(s string) *Timer
- func (p *Timer) SetVisible(visible bool) *Timer
- func (p *Timer) Status() int
- func (tmr *Timer) Tag() string
- func (p *Timer) Visible() bool
- type TimerWith
- type Tristate
- func (p *Tristate) Collapsed() bool
- func (tri *Tristate) Embodiment() string
- func (p *Tristate) Enabled() bool
- func (tri *Tristate) Label() string
- func (tri *Tristate) LabelItem() Primitive
- func (tri *Tristate) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (tri *Tristate) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
- func (p *Tristate) SetCollapsed(collapsed bool) *Tristate
- func (tri *Tristate) SetEmbodiment(s string) *Tristate
- func (p *Tristate) SetEnabled(enabled bool) *Tristate
- func (tri *Tristate) SetLabel(s string) *Tristate
- func (tri *Tristate) SetLabelItem(item Primitive) *Tristate
- func (tri *Tristate) SetState(i int) *Tristate
- func (p *Tristate) SetStatus(i int) *Tristate
- func (tri *Tristate) SetTag(s string) *Tristate
- func (p *Tristate) SetVisible(visible bool) *Tristate
- func (tri *Tristate) State() int
- func (p *Tristate) Status() int
- func (tri *Tristate) String() string
- func (tri *Tristate) Tag() string
- func (p *Tristate) Visible() bool
- type TristateWith
- type Update
Constants ¶
This section is empty.
Variables ¶
var ErrCanceled = errors.New("operation canceled by provided context")
Defined error indicating that the operation was canceled by way of the context provided in the call. This can be returned from WaitOrCancel or AcceptSession functions.
var ErrInterrupted = errors.New("operation was interrupted by the caller")
Defined error indicating that the operation was interruptred by the caller using the interrupt channel argument.
var ErrSessionEnded = errors.New("session ended")
Defined error indicating the session ended, typically when a client disconnects. This can be returned from Wait, WaitOrCancel, or Update functions.
Functions ¶
func ConvertAnyToInt ¶ added in v0.0.63
Types ¶
type Any1DField ¶ added in v0.0.38
type Any1DField struct {
FieldBase
// contains filtered or unexported fields
}
func (*Any1DField) EgestValue ¶ added in v0.0.38
func (f *Any1DField) EgestValue() any
func (*Any1DField) Get ¶ added in v0.0.38
func (f *Any1DField) Get() []Primitive
func (*Any1DField) IngestValue ¶ added in v0.0.38
func (f *Any1DField) IngestValue(value any) error
func (*Any1DField) Length ¶ added in v0.0.46
func (f *Any1DField) Length() int
Convenience function that returns the length of the array.
func (*Any1DField) PrepareForUpdates ¶ added in v0.0.38
func (f *Any1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*Any1DField) Set ¶ added in v0.0.38
func (f *Any1DField) Set(ary []Primitive)
func (*Any1DField) UnprepareForUpdates ¶ added in v0.0.67
func (f *Any1DField) UnprepareForUpdates()
type Any2DField ¶ added in v0.0.38
type Any2DField struct {
FieldBase
// contains filtered or unexported fields
}
TODO: swap any type with primitive.Interface and update the test accordingly.
func (*Any2DField) EgestValue ¶ added in v0.0.38
func (f *Any2DField) EgestValue() any
func (*Any2DField) Get ¶ added in v0.0.38
func (f *Any2DField) Get() [][]Primitive
func (*Any2DField) IngestValue ¶ added in v0.0.38
func (f *Any2DField) IngestValue(value any) error
func (*Any2DField) Length ¶ added in v0.0.46
func (f *Any2DField) Length() int
Convenience function that returns the length of the array in rows.
func (*Any2DField) PrepareForUpdates ¶ added in v0.0.38
func (f *Any2DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*Any2DField) Set ¶ added in v0.0.38
func (f *Any2DField) Set(ary [][]Primitive)
func (*Any2DField) UnprepareForUpdates ¶ added in v0.0.67
func (f *Any2DField) UnprepareForUpdates()
type AnyField ¶ added in v0.0.38
type AnyField struct {
FieldBase
// contains filtered or unexported fields
}
func (*AnyField) EgestValue ¶ added in v0.0.38
func (*AnyField) IngestValue ¶ added in v0.0.38
func (*AnyField) PrepareForUpdates ¶ added in v0.0.38
func (f *AnyField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*AnyField) UnprepareForUpdates ¶ added in v0.0.67
func (f *AnyField) UnprepareForUpdates()
type BlobField ¶ added in v0.0.38
type BlobField struct {
FieldBase
// contains filtered or unexported fields
}
func (*BlobField) EgestValue ¶ added in v0.0.38
func (*BlobField) IngestValue ¶ added in v0.0.38
func (*BlobField) LoadFromFile ¶ added in v0.0.60
func (*BlobField) PrepareForUpdates ¶ added in v0.0.38
func (f *BlobField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*BlobField) SaveToFile ¶ added in v0.0.60
type BooleanField ¶ added in v0.0.38
type BooleanField struct {
FieldBase
// contains filtered or unexported fields
}
func (*BooleanField) EgestValue ¶ added in v0.0.38
func (f *BooleanField) EgestValue() any
func (*BooleanField) Get ¶ added in v0.0.38
func (f *BooleanField) Get() bool
func (*BooleanField) IngestValue ¶ added in v0.0.38
func (f *BooleanField) IngestValue(value any) error
func (*BooleanField) PrepareForUpdates ¶ added in v0.0.38
func (f *BooleanField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*BooleanField) Set ¶ added in v0.0.38
func (f *BooleanField) Set(b bool)
type Card ¶ added in v0.0.56
type Card struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A card displays a main item with optional leading, trailing, and sub item. It is often used to display a summary of a record such as a contact, a product, or a transaction.
func (*Card) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Card) Embodiment ¶ added in v0.0.56
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Card) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Card) LeadingItem ¶ added in v0.0.56
Returns the leading item for this card.
func (*Card) LocateNextDescendant ¶ added in v0.0.56
func (card *Card) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Card) PrepareForUpdates ¶ added in v0.0.56
func (card *Card) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Card) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Card) SetEmbodiment ¶ added in v0.0.56
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Card) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Card) SetLeadingItem ¶ added in v0.0.56
Sets the leading item for this card.
func (*Card) SetMainItem ¶ added in v0.0.56
Sets the main item for this card.
func (*Card) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Card) SetSubItem ¶ added in v0.0.56
Sets the sub item for this card.
func (*Card) SetTag ¶ added in v0.0.56
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Checks as Table cells.
func (*Card) SetTrailingItem ¶ added in v0.0.56
Sets the trailing item for this card.
func (*Card) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Card) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Card) String ¶ added in v0.0.56
Returns a string representation of this primitive: the mainItem. Implements of fmt:Stringer interface.
func (*Card) Tag ¶ added in v0.0.56
Returns an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Checks as Table cells.
func (*Card) TrailingItem ¶ added in v0.0.56
Returns the trailing item for this card.
type CardWith ¶ added in v0.0.56
type CardWith struct {
Embodiment string
LeadingItem Primitive
MainItem Primitive
SubItem Primitive
Status int
Tag string
TrailingItem Primitive
}
A card displays a main item with optional leading, trailing, and sub item. It is often used to display a summary of a record such as a contact, a product, or a transaction.
type Check ¶ added in v0.0.16
type Check struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A check provides a yes/no, on/off, 1/0, kind of choice to the user. It is often represented with a check box like you would see on a form.
func (*Check) Checked ¶ added in v0.0.16
Returns true if the check state is Yes, On, 1, etc., and false if the check state is No, Off, 0, etc.
func (*Check) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Check) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Check) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Check) LocateNextDescendant ¶ added in v0.0.63
func (check *Check) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Check) PrepareForUpdates ¶ added in v0.0.16
func (check *Check) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Check) SetChecked ¶ added in v0.0.16
Sets the check state.
func (*Check) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Check) SetEmbodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Check) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Check) SetLabelItem ¶ added in v0.0.63
Sets the label to display in the command.
func (*Check) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Check) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Checks as Table cells.
func (*Check) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Check) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Check) String ¶ added in v0.0.40
Returns a string representation of this primitive: the label. Implements of fmt:Stringer interface.
type CheckWith ¶ added in v0.0.17
type CheckWith struct {
Checked bool
Embodiment string
Label string
LabelItem Primitive
Status int
Tag string
}
A check provides a yes/no, on/off, 1/0, kind of choice to the user. It is often represented with a check box like you would see on a form.
type Choice ¶ added in v0.0.16
type Choice struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A choice is a user selection from a set of choices. It is often represented using a pull-down list.
func NewChoice ¶ added in v0.0.40
Creates a new Choice and assigns the initial Choice and Choices fields.
func (*Choice) ChoiceIndex ¶ added in v0.0.49
Returns the index (0, 1, ..) of selected choice or -1 if choice is empty. This is a convenience function as an alternative to Choice(). The canonical storage of choice remains a string.
func (*Choice) ChoiceLabels ¶ added in v0.0.56
Returns the labels associated with the choices.
func (*Choice) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Choice) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Choice) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Choice) PrepareForUpdates ¶ added in v0.0.16
func (choice *Choice) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Choice) SetChoiceIndex ¶ added in v0.0.49
Sets the selected choice or empty if none chosen or if index is out of range. This is a convenience function as an alternative to SetChoice(). The canonical storage of choice remains a string.
func (*Choice) SetChoiceLabels ¶ added in v0.0.56
Sets the optional labels to display for each choice.
func (*Choice) SetChoiceLabelsVA ¶ added in v0.0.56
Set the ChoiceLabels field using variadic string arguments.
func (*Choice) SetChoices ¶ added in v0.0.16
Sets the set of valid choices to choose from.
func (*Choice) SetChoicesVA ¶ added in v0.0.16
Set the Choices field using variadic string arguments.
func (*Choice) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Choice) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Choice) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Choice) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Choice) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Choices as Table cells.
func (*Choice) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Choice) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Choice) String ¶ added in v0.0.40
Returns a string representation of this primitive: the current choice. Implements of fmt:Stringer interface.
type ChoiceWith ¶ added in v0.0.17
type ChoiceWith struct {
Choice string
Choices []string
ChoiceLabels []string
Embodiment string
Status int
Tag string
}
A choice is a user selection from a set of choices. It is often represented using a pull-down list.
func (ChoiceWith) Make ¶ added in v0.0.17
func (w ChoiceWith) Make() *Choice
Makes a new Choice with specified field values.
type Command ¶ added in v0.0.10
type Command struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A command is used to handle momentary requests by the user such that, when the command is issued, the service does something useful. It is often rendered as a button with clear boundaries that suggest it can be clicked.
func NewCommand ¶ added in v0.0.40
Creates a new command and assigns a label.
func (*Command) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Command) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Command) Enabled ¶ added in v0.0.40
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Command) Issued ¶ added in v0.0.10
Returns true if the command was issued during the current Wait cycle.
func (*Command) LocateNextDescendant ¶ added in v0.0.63
func (cmd *Command) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Command) PrepareForUpdates ¶ added in v0.0.10
func (cmd *Command) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Command) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Command) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Command) SetEnabled ¶ added in v0.0.40
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Command) SetLabelItem ¶ added in v0.0.63
Sets the label to display in the command.
func (*Command) SetStatus ¶ added in v0.0.11
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Command) SetTag ¶ added in v0.0.40
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Commands as Table cells.
func (*Command) SetVisible ¶ added in v0.0.40
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Command) Status ¶ added in v0.0.10
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Command) String ¶ added in v0.0.40
Returns a string representation of this primitive: the label. Implements of fmt:Stringer interface.
type CommandWith ¶ added in v0.0.17
type CommandWith struct {
Embodiment string
Label string
LabelItem Primitive
Status int
Tag string
}
A command is used to handle momentary requests by the user such that, when the command is issued, the service does something useful. It is often rendered as a button with clear boundaries that suggest it can be clicked.
func (CommandWith) Make ¶ added in v0.0.17
func (w CommandWith) Make() *Command
Makes a new Command with specified field values.
type EventField ¶ added in v0.0.42
type EventField struct {
FieldBase
// contains filtered or unexported fields
}
The EventField is used to capture an event condition happening on the App side. For example, when the user clicks on a Command, we need to know on the server side the moment this happens during a Wait cycle.
Unlike other field types, this field doesn't store a value per se, but tracks if a value has been injested during the current Wait cycle. This information is only valid if the Issued() method is called during the current Wait cycle. If another Wait cycle is entered and no value is injested by this field, then it will no longer report Issued() = true.
The field type solved a nagging problem when dealing with handling events on the service side, especially when Command primitivess are clicked/issued. The Command doesn't have any state that changes like a Check or TextField might have, and the information it produces is momentary in nature.
This field requires initialization after creation by setting its TimestampProvider member. The timestamp provider supplies a time value that originates from the time package and uniquely represents the current Wait cycle. A good implementation will keep a central timestamp generated from time.Now(), called at the beginning of each Wait cycle, and a central function for returning the timestamp. The central function is assigned to every EventField during construction.
We avoided creating a global timestamp in this module because in the future there could be multiple, concurrent Wait cycles going on. It is also fragile to write unit tests this way.
func (*EventField) EgestValue ¶ added in v0.0.42
func (f *EventField) EgestValue() any
func (*EventField) IngestValue ¶ added in v0.0.42
func (f *EventField) IngestValue(value any) error
func (*EventField) Issued ¶ added in v0.0.42
func (f *EventField) Issued() bool
Returns true if the event was assigned during the current Wait cycle, as determined from the timestamp provider.
func (*EventField) PrepareForUpdates ¶ added in v0.0.42
func (f *EventField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
type EventTimestampProvider ¶ added in v1.0.0
type ExportFile ¶ added in v0.0.34
type ExportFile struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A file represents a blob of data that can be exported from the server side and stored to a file on the app side. The perspective of "export" is centered around the server software. This seems to be a little clearer than using Download/Upload terminology.
func (*ExportFile) Collapsed ¶ added in v0.0.68
func (p *ExportFile) Collapsed() bool
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*ExportFile) Data ¶ added in v0.0.34
func (ef *ExportFile) Data() []byte
Returns the blob of data representing the binary contents of the file. Note: this data could be empty and yet represent a valid, albeit empty, file for export.
func (*ExportFile) Embodiment ¶ added in v0.0.34
func (ef *ExportFile) Embodiment() string
Returns a JSON string specifying the embodiment to use for this primitive.
func (*ExportFile) Enabled ¶ added in v0.0.68
func (p *ExportFile) Enabled() bool
Returns the enabled status of the primitive. This is derived from the Status field.
func (*ExportFile) Exported ¶ added in v0.0.34
func (ef *ExportFile) Exported() bool
Returns true when the file has been exported (stored to a file) by the app. This field is normally only updated by the app.
func (*ExportFile) Name ¶ added in v0.0.34
func (ef *ExportFile) Name() string
Returns the suggested file name (including its extension separated by a period) to save the file as.
func (*ExportFile) PrepareForUpdates ¶ added in v0.0.34
func (ef *ExportFile) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*ExportFile) Reset ¶ added in v0.0.49
func (ef *ExportFile) Reset()
Clears the exported data and the exported flag.
func (*ExportFile) SetCollapsed ¶ added in v0.0.68
func (p *ExportFile) SetCollapsed(collapsed bool) *ExportFile
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*ExportFile) SetData ¶ added in v0.0.34
func (ef *ExportFile) SetData(d []byte) *ExportFile
Sets the blob of data representing the binary contents of the file to export.
func (*ExportFile) SetEmbodiment ¶ added in v0.0.34
func (ef *ExportFile) SetEmbodiment(s string) *ExportFile
Sets a JSON string specifying the embodiment to use for this primitive.
func (*ExportFile) SetEnabled ¶ added in v0.0.68
func (p *ExportFile) SetEnabled(enabled bool) *ExportFile
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*ExportFile) SetExported ¶ added in v0.0.34
func (ef *ExportFile) SetExported(b bool) *ExportFile
Sets whether or not the file has been exported (stored to a file) by the app. This field is normally only updated by the app.
func (*ExportFile) SetName ¶ added in v0.0.34
func (ef *ExportFile) SetName(s string) *ExportFile
Sets the suggested file name (including its extension separated by a period) to save the file as.
func (*ExportFile) SetStatus ¶ added in v0.0.68
func (p *ExportFile) SetStatus(i int) *ExportFile
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*ExportFile) SetTag ¶ added in v0.0.41
func (ef *ExportFile) SetTag(s string) *ExportFile
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using ExportFiles as Table cells.
func (*ExportFile) SetVisible ¶ added in v0.0.68
func (p *ExportFile) SetVisible(visible bool) *ExportFile
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*ExportFile) Status ¶ added in v0.0.68
func (p *ExportFile) Status() int
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*ExportFile) Tag ¶ added in v0.0.41
func (ef *ExportFile) Tag() string
Returns an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using ExportFiles as Table cells.
func (*ExportFile) Visible ¶ added in v0.0.68
func (p *ExportFile) Visible() bool
Returns the visibility of the group. This is derived from the Status field.
type ExportFileWith ¶ added in v0.0.34
A file represents a blob of data that can be exported from the server side and stored to a file on the app side. The perspective of "export" is centered around the server software. This seems to be a little clearer than using Download/Upload terminology.
func (ExportFileWith) Make ¶ added in v0.0.34
func (w ExportFileWith) Make() *ExportFile
Makes a new Command with specified field values.
type FieldBase ¶ added in v0.0.38
type FieldBase struct {
// contains filtered or unexported fields
}
func (*FieldBase) ClearUpdateInfo ¶ added in v0.0.67
func (f *FieldBase) ClearUpdateInfo()
func (*FieldBase) StashUpdateInfo ¶ added in v0.0.38
func (f *FieldBase) StashUpdateInfo(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider)
func (*FieldBase) UnprepareForUpdates ¶ added in v0.0.67
func (f *FieldBase) UnprepareForUpdates()
type Folder ¶ added in v1.0.0
type Folder struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A folder represents a container in a hierarchical list structure. It contains a label item (any primitive) and a level indicating its depth in the hierarchy. The Expanded field controls whether items logically "inside" this folder are shown.
func NewFolder ¶ added in v1.0.0
Creates a new Folder at a specified level and assigns the label item.
func (*Folder) Collapsed ¶ added in v1.0.0
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Folder) Embodiment ¶ added in v1.0.0
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Folder) Enabled ¶ added in v1.0.0
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Folder) LocateNextDescendant ¶ added in v1.0.0
func (folder *Folder) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Folder) PrepareForUpdates ¶ added in v1.0.0
func (folder *Folder) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Folder) SetCollapsed ¶ added in v1.0.0
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Folder) SetEmbodiment ¶ added in v1.0.0
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Folder) SetEnabled ¶ added in v1.0.0
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Folder) SetExpanded ¶ added in v1.0.0
Sets whether the folder is expanded.
func (*Folder) SetLabelItem ¶ added in v1.0.0
Sets the label item for this folder.
func (*Folder) SetStatus ¶ added in v1.0.0
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Folder) SetTag ¶ added in v1.0.0
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Folders inside other containers.
func (*Folder) SetVisible ¶ added in v1.0.0
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Folder) Status ¶ added in v1.0.0
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Folder) String ¶ added in v1.0.0
Returns a string representation of this primitive. Implements of fmt:Stringer interface.
type FolderItem ¶ added in v1.0.0
type FolderItem struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A folder item represents an item in a hierarchical list structure. It contains an item (any primitive) and a level indicating its depth in the hierarchy.
func NewFolderItem ¶ added in v1.0.0
func NewFolderItem(item Primitive, level int) *FolderItem
Creates a new FolderItem at a specified level and assigns the item.
func (*FolderItem) Collapsed ¶ added in v1.0.0
func (p *FolderItem) Collapsed() bool
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*FolderItem) Embodiment ¶ added in v1.0.0
func (folderItem *FolderItem) Embodiment() string
Returns a JSON string specifying the embodiment to use for this primitive.
func (*FolderItem) Enabled ¶ added in v1.0.0
func (p *FolderItem) Enabled() bool
Returns the enabled status of the primitive. This is derived from the Status field.
func (*FolderItem) Item ¶ added in v1.0.0
func (folderItem *FolderItem) Item() Primitive
Returns the item for this folder item.
func (*FolderItem) Level ¶ added in v1.0.0
func (folderItem *FolderItem) Level() int
Returns the hierarchical level of this folder item.
func (*FolderItem) LocateNextDescendant ¶ added in v1.0.0
func (folderItem *FolderItem) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*FolderItem) PrepareForUpdates ¶ added in v1.0.0
func (folderItem *FolderItem) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*FolderItem) SetCollapsed ¶ added in v1.0.0
func (p *FolderItem) SetCollapsed(collapsed bool) *FolderItem
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*FolderItem) SetEmbodiment ¶ added in v1.0.0
func (folderItem *FolderItem) SetEmbodiment(s string) *FolderItem
Sets a JSON string specifying the embodiment to use for this primitive.
func (*FolderItem) SetEnabled ¶ added in v1.0.0
func (p *FolderItem) SetEnabled(enabled bool) *FolderItem
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*FolderItem) SetItem ¶ added in v1.0.0
func (folderItem *FolderItem) SetItem(p Primitive) *FolderItem
Sets the item for this folder item.
func (*FolderItem) SetLevel ¶ added in v1.0.0
func (folderItem *FolderItem) SetLevel(level int) *FolderItem
Sets the hierarchical level of this folder item.
func (*FolderItem) SetStatus ¶ added in v1.0.0
func (p *FolderItem) SetStatus(i int) *FolderItem
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*FolderItem) SetTag ¶ added in v1.0.0
func (folderItem *FolderItem) SetTag(s string) *FolderItem
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using FolderItems inside other containers.
func (*FolderItem) SetVisible ¶ added in v1.0.0
func (p *FolderItem) SetVisible(visible bool) *FolderItem
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*FolderItem) Status ¶ added in v1.0.0
func (p *FolderItem) Status() int
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*FolderItem) String ¶ added in v1.0.0
func (folderItem *FolderItem) String() string
Returns a string representation of this primitive. Implements of fmt:Stringer interface.
func (*FolderItem) Tag ¶ added in v1.0.0
func (folderItem *FolderItem) Tag() string
Returns an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using FolderItems inside other containers.
func (*FolderItem) Visible ¶ added in v1.0.0
func (p *FolderItem) Visible() bool
Returns the visibility of the folder item. This is derived from the Status field.
type FolderItemWith ¶ added in v1.0.0
A folder item represents an item in a hierarchical list structure. It contains an item (any primitive) and a level indicating its depth in the hierarchy.
func (FolderItemWith) Make ¶ added in v1.0.0
func (w FolderItemWith) Make() *FolderItem
Makes a new FolderItem with specified field values.
type FolderWith ¶ added in v1.0.0
type FolderWith struct {
Embodiment string
Expanded bool
LabelItem Primitive
Level int
Status int
Tag string
}
A folder represents a container in a hierarchical list structure. It contains a label item (any primitive) and a level indicating its depth in the hierarchy. The Expanded field controls whether items logically "inside" this folder are shown.
func (FolderWith) Make ¶ added in v1.0.0
func (w FolderWith) Make() *Folder
Makes a new Folder with specified field values.
type Frame ¶ added in v0.0.29
type Frame struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A frame represents a complete user interface to show on the screen. It could be the main user interface or a sub-screen in the app. It includes the ability to layout controls in a specific manner.
func (*Frame) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Frame) Embodiment ¶ added in v0.0.40
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Frame) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Frame) FrameItems ¶ added in v0.0.29
Returns the collection of primitives that comprise the GUI frame.
func (*Frame) LocateNextDescendant ¶ added in v0.0.30
func (frame *Frame) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Frame) PrepareForUpdates ¶ added in v0.0.29
func (frame *Frame) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Frame) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Frame) SetEmbodiment ¶ added in v0.0.40
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Frame) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Frame) SetFrameItems ¶ added in v0.0.29
Sets the collection of primitives that comprise the GUI frame.
func (*Frame) SetFrameItemsVA ¶ added in v0.0.29
Sets the collection of primitives (variadic argument list) that comprise the GUI frame.
func (*Frame) SetShowing ¶ added in v0.0.33
Sets whether the Frame is being shown on the screen.
func (*Frame) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Frame) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Frames inside other containers.
func (*Frame) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Frame) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Frame) Tag ¶ added in v0.0.41
Returns an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Frames inside other containers.
type FrameWith ¶ added in v0.0.29
type FrameWith struct {
Embodiment string
FrameItems []Primitive
Icon Primitive
Showing bool
Status int
Tag string
Title string
}
A frame represents a complete user interface to show on the screen. It could be the main user interface or a sub-screen in the app. It includes the ability to layout controls in a specific manner.
type Group ¶ added in v0.0.16
type Group struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A group is a related set of primitives, such as a group of commands, that is static in type and quantity. If a dynamic number of primitives is desired then consider using a List primitive instead.
func (*Group) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Group) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Group) Enabled ¶ added in v0.0.56
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Group) GroupItems ¶ added in v0.0.16
Returns the collection of primitives that make up the group.
func (*Group) LocateNextDescendant ¶ added in v0.0.27
func (grp *Group) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Group) PrepareForUpdates ¶ added in v0.0.16
func (grp *Group) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Group) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Group) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Group) SetEnabled ¶ added in v0.0.56
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Group) SetGroupItems ¶ added in v0.0.16
Sets the collection of primitives that make up the group.
func (*Group) SetGroupItemsVA ¶ added in v0.0.16
Sets the collection of primitives (a variadic argument list) that make up the group.
func (*Group) SetStatus ¶ added in v0.0.56
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Group) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Groups inside other containers.
func (*Group) SetVisible ¶ added in v0.0.56
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Group) Status ¶ added in v0.0.56
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
type GroupWith ¶ added in v0.0.17
A group is a related set of primitives, such as a group of commands, that is static in type and quantity. If a dynamic number of primitives is desired then consider using a List primitive instead.
type Icon ¶ added in v0.0.56
type Icon struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
An icon primitive displays a material icon on the screen.
func (*Icon) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Icon) Embodiment ¶ added in v0.0.56
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Icon) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Icon) PrepareForUpdates ¶ added in v0.0.56
func (icon *Icon) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Icon) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Icon) SetEmbodiment ¶ added in v0.0.56
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Icon) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Icon) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Icon) SetTag ¶ added in v0.0.56
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Texts as Table cells.
func (*Icon) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Icon) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Icon) String ¶ added in v0.0.56
Returns a string representation of this primitive: the iconID. Implements of fmt:Stringer interface.
type Image ¶ added in v0.0.38
type Image struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
An image for displaying a graphic to display on the screen.
func (*Image) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Image) Embodiment ¶ added in v0.0.38
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Image) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Image) ID ¶ added in v0.0.60
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Image) LoadFromFile ¶ added in v0.0.60
func (*Image) PrepareForUpdates ¶ added in v0.0.38
func (image *Image) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Image) Ref ¶ added in v0.0.60
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Image) SaveToFile ¶ added in v0.0.60
func (*Image) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Image) SetEmbodiment ¶ added in v0.0.38
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Image) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Image) SetID ¶ added in v0.0.60
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Image) SetRef ¶ added in v0.0.60
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Image) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Image) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Commands as Table cells.
func (*Image) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Image) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
type ImageWith ¶ added in v0.0.38
type ImageWith struct {
// Embodiment specification
Embodiment string
// Binary data representing the image. Supported formats are: JPEG, PNG, GIF, Animated GIF, WebP, Animated WebP, BMP, and WBMP
Image []byte
// The file path containing an image. If specified, this takes precedence over Image field.
// Supported file types are: JPEG, PNG, GIF, Animated GIF, WebP, Animated WebP, BMP, and WBMP
FromFile string
// Arbitraty tag string for the primitive
Tag string
// ID for this primitive. Used when referencing it from another primitive. This can be arbitrary but
// it should ideally be a unique string. Otherwise, when two primitives have the same ID, there is no
// guarantee on which is referenced.
ID string
// Reference (ID) of another image primitive that contains the actual image data to display. This allows
// a way to use the same image in multiple places in a more efficient manner.
Ref string
Status int
}
An image for displaying a graphic to display on the screen.
type ImportFile ¶ added in v0.0.34
type ImportFile struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A file that represents a blob of data that can be imported from the app side and consumed on the server side.
func (*ImportFile) Collapsed ¶ added in v0.0.68
func (p *ImportFile) Collapsed() bool
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*ImportFile) Data ¶ added in v0.0.34
func (ifile *ImportFile) Data() []byte
Returns the blob of data for the file. Note: this data could be empty and yet represent a valid imported, albeit empty, file. Therefore, it is important to look at Imported() field to know whether data has been imported. Conversely, if the Imported() function returns false then this will return an empty array.
func (*ImportFile) Embodiment ¶ added in v0.0.34
func (ifile *ImportFile) Embodiment() string
Returns a JSON string specifying the embodiment to use for this primitive.
func (*ImportFile) Enabled ¶ added in v0.0.68
func (p *ImportFile) Enabled() bool
Returns the enabled status of the primitive. This is derived from the Status field.
func (*ImportFile) ImportData ¶ added in v0.0.49
func (ifile *ImportFile) ImportData(d []byte) *ImportFile
Sets the blob of data for the file and sets imported flag to true.
func (*ImportFile) Imported ¶ added in v0.0.34
func (ifile *ImportFile) Imported() bool
Returns true when the file has been imported by the app side and signals to the server side that file is ready to processs. This field is normally only updated by the app.
func (*ImportFile) Name ¶ added in v0.0.34
func (ifile *ImportFile) Name() string
Returns the imported file name including its extension separated by a period.
func (*ImportFile) PrepareForUpdates ¶ added in v0.0.34
func (ifile *ImportFile) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*ImportFile) Reset ¶ added in v0.0.49
func (ifile *ImportFile) Reset()
Clears the imported data and the imported flag.
func (*ImportFile) SetCollapsed ¶ added in v0.0.68
func (p *ImportFile) SetCollapsed(collapsed bool) *ImportFile
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*ImportFile) SetEmbodiment ¶ added in v0.0.34
func (ifile *ImportFile) SetEmbodiment(s string) *ImportFile
Sets a JSON string specifying the embodiment to use for this primitive.
func (*ImportFile) SetEnabled ¶ added in v0.0.68
func (p *ImportFile) SetEnabled(enabled bool) *ImportFile
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*ImportFile) SetImported ¶ added in v0.0.34
func (ifile *ImportFile) SetImported(b bool) *ImportFile
Sets whether the file has been imported by the app side and signals to the server side that file is ready to processs. This field is normally only updated by the app.
func (*ImportFile) SetName ¶ added in v0.0.34
func (ifile *ImportFile) SetName(s string) *ImportFile
Sets the imported file name including its extension separated by a period.
func (*ImportFile) SetStatus ¶ added in v0.0.68
func (p *ImportFile) SetStatus(i int) *ImportFile
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*ImportFile) SetTag ¶ added in v0.0.41
func (ifile *ImportFile) SetTag(s string) *ImportFile
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Commands as Table cells.
func (*ImportFile) SetValidExtensions ¶ added in v0.0.34
func (ifile *ImportFile) SetValidExtensions(sa []string) *ImportFile
Sets the valid extensions for importing (non-case sensitive and period separator is omitted).
func (*ImportFile) SetVisible ¶ added in v0.0.68
func (p *ImportFile) SetVisible(visible bool) *ImportFile
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*ImportFile) Status ¶ added in v0.0.68
func (p *ImportFile) Status() int
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*ImportFile) Tag ¶ added in v0.0.41
func (ifile *ImportFile) Tag() string
Returns an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Commands as Table cells.
func (*ImportFile) ValidExtensions ¶ added in v0.0.34
func (ifile *ImportFile) ValidExtensions() []string
Returns the valid extensions for importing (non-case sensitive and period separator is omitted).
func (*ImportFile) Visible ¶ added in v0.0.68
func (p *ImportFile) Visible() bool
Returns the visibility of the group. This is derived from the Status field.
type ImportFileWith ¶ added in v0.0.34
type ImportFileWith struct {
Data []byte
Embodiment string
Name string
Status int
Tag string
ValidExtensions []string
}
A file that represents a blob of data that can be imported from the app side and consumed on the server side.
func (ImportFileWith) Make ¶ added in v0.0.34
func (w ImportFileWith) Make() *ImportFile
Makes a new ImportFile with specified field values.
type Integer1DField ¶ added in v0.0.56
type Integer1DField struct {
FieldBase
// contains filtered or unexported fields
}
func (*Integer1DField) EgestValue ¶ added in v0.0.56
func (f *Integer1DField) EgestValue() any
func (*Integer1DField) Get ¶ added in v0.0.56
func (f *Integer1DField) Get() []int
func (*Integer1DField) IngestValue ¶ added in v0.0.56
func (f *Integer1DField) IngestValue(value any) error
func (*Integer1DField) PrepareForUpdates ¶ added in v0.0.56
func (f *Integer1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*Integer1DField) Set ¶ added in v0.0.56
func (f *Integer1DField) Set(ia []int)
type IntegerField ¶ added in v0.0.38
type IntegerField struct {
FieldBase
// contains filtered or unexported fields
}
func (*IntegerField) EgestValue ¶ added in v0.0.38
func (f *IntegerField) EgestValue() any
func (*IntegerField) Get ¶ added in v0.0.38
func (f *IntegerField) Get() int
func (*IntegerField) IngestValue ¶ added in v0.0.38
func (f *IntegerField) IngestValue(value any) error
func (*IntegerField) PrepareForUpdates ¶ added in v0.0.38
func (f *IntegerField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*IntegerField) Set ¶ added in v0.0.38
func (f *IntegerField) Set(i int)
type List ¶ added in v0.0.25
type List struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A list is a collection of primitives that have a sequential-like relationship and might be dynamic in quantity or kind.
func (*List) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*List) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*List) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*List) LocateNextDescendant ¶ added in v0.0.27
func (list *List) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*List) ModelFolder ¶ added in v1.0.0
Returns the model folder item.
func (*List) PrepareForUpdates ¶ added in v0.0.25
func (list *List) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*List) SelectedItems ¶ added in v0.0.68
Returns the currently selected items or empty list for none selected.
func (*List) SelectionMode ¶ added in v0.0.68
Returns the status of the table: 0 = None, 1 = One Always Selected, 2 = One or None, 3 = Multiple 4 = Range Atleast One, 5 = Range Any or None at all.
func (*List) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*List) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*List) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*List) SetListItems ¶ added in v0.0.25
Sets the items to show in the list.
func (*List) SetListItemsVA ¶ added in v0.0.25
Returns the items to show in the list (as a variadic argument list).
func (*List) SetModelFolder ¶ added in v1.0.0
Sets the model folder item.
func (*List) SetModelItem ¶ added in v0.0.56
Sets the model item.
func (*List) SetSelectedItems ¶ added in v0.0.68
Sets the currently selected items.
func (*List) SetSelectionMode ¶ added in v0.0.68
Sets the selection mode: 0 = None, 1 = One Always Selected, 2 = One or None, 3 = Multiple 4 = Range Atleast One, 5 = Range Any or None at all.
func (*List) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*List) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Lists inside other containers.
func (*List) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*List) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
type ListWith ¶ added in v0.0.25
type ListWith struct {
Embodiment string
ListItems []Primitive
ModelFolder Primitive
ModelItem Primitive
SelectedItems []int
SelectionMode int
Status int
Tag string
}
A list is a collection of primitives that have a sequential-like relationship and might be dynamic in quantity or kind.
type Nothing ¶ added in v0.0.56
type Nothing struct {
// Mix-in the common guts for primitives
PrimitiveBase
}
A nothing primitive displays nothing on the screen. It can be used as a placeholder.
func (*Nothing) PrepareForUpdates ¶ added in v0.0.56
func (nothing *Nothing) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
type NothingWith ¶ added in v0.0.56
type NothingWith struct {
}
A nothing primitive displays nothing on the screen. It can be used as a placeholder.
func (NothingWith) Make ¶ added in v0.0.56
func (w NothingWith) Make() *Nothing
Creates a new Nothing primitive using the supplied field assignments.
type NumericField ¶ added in v0.0.56
type NumericField struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A field for entering numeric values.
func NewNumericField ¶ added in v0.0.56
func NewNumericField(numericEntry string) *NumericField
Create a new NumericField and assign its numeric entry field.
func (*NumericField) Collapsed ¶ added in v0.0.68
func (p *NumericField) Collapsed() bool
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*NumericField) Embodiment ¶ added in v0.0.56
func (nf *NumericField) Embodiment() string
Returns a JSON string specifying the embodiment to use for this primitive.
func (*NumericField) Enabled ¶ added in v0.0.68
func (p *NumericField) Enabled() bool
Returns the enabled status of the primitive. This is derived from the Status field.
func (*NumericField) NumericEntry ¶ added in v0.0.56
func (nf *NumericField) NumericEntry() string
Returns the numeric entry value.
func (*NumericField) PrepareForUpdates ¶ added in v0.0.56
func (nf *NumericField) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*NumericField) SetCollapsed ¶ added in v0.0.68
func (p *NumericField) SetCollapsed(collapsed bool) *NumericField
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*NumericField) SetEmbodiment ¶ added in v0.0.56
func (nf *NumericField) SetEmbodiment(s string) *NumericField
Sets a JSON string specifying the embodiment to use for this primitive.
func (*NumericField) SetEnabled ¶ added in v0.0.68
func (p *NumericField) SetEnabled(enabled bool) *NumericField
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*NumericField) SetNumericEntry ¶ added in v0.0.56
func (nf *NumericField) SetNumericEntry(s string) *NumericField
Sets the the numeric entry value.
func (*NumericField) SetStatus ¶ added in v0.0.68
func (p *NumericField) SetStatus(i int) *NumericField
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*NumericField) SetTag ¶ added in v0.0.56
func (nf *NumericField) SetTag(s string) *NumericField
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Texts as Table cells.
func (*NumericField) SetVisible ¶ added in v0.0.68
func (p *NumericField) SetVisible(visible bool) *NumericField
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*NumericField) Status ¶ added in v0.0.68
func (p *NumericField) Status() int
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*NumericField) String ¶ added in v0.0.56
func (nf *NumericField) String() string
Returns a string representation of this primitive: the numeric entry. Implements of fmt:Stringer interface.
func (*NumericField) Tag ¶ added in v0.0.56
func (nf *NumericField) Tag() string
Returns an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Texts as Table cells.
func (*NumericField) Visible ¶ added in v0.0.68
func (p *NumericField) Visible() bool
Returns the visibility of the group. This is derived from the Status field.
type NumericFieldWith ¶ added in v0.0.56
A field for entering numeric values.
func (NumericFieldWith) Make ¶ added in v0.0.56
func (w NumericFieldWith) Make() *NumericField
Creates a new NumericField primitive using the supplied field assignments.
type Primitive ¶ added in v0.0.38
type Primitive interface {
fmt.Stringer
PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
UnprepareForUpdates()
LocateNextDescendant(locator *key.PKeyLocator) Primitive
EgestUpdate(fullupdate bool, fkeys []key.FKey) map[any]any
IngestUpdate(update map[any]any) error
}
type PrimitiveBase ¶ added in v0.0.38
type PrimitiveBase struct {
// contains filtered or unexported fields
}
PrimitiveBase fields for primitive updates.
func (*PrimitiveBase) EgestUpdate ¶ added in v0.0.38
func (*PrimitiveBase) IndexOf ¶ added in v0.0.40
func (r *PrimitiveBase) IndexOf(parentLevel int) int
Returns the index of this primitive in a parent container specified by parentLevel as follows: parentLevel = 0, immediate parent container parentLevel = 1, grandparent parentLevel = 2, great grandparent And so on.
It returns -1 if parentLevel is a negative number or is invalid given the depth where the primitive belongs.
func (*PrimitiveBase) IngestUpdate ¶ added in v0.0.38
func (r *PrimitiveBase) IngestUpdate(update map[any]any) error
func (*PrimitiveBase) InternalPrepareForUpdates ¶ added in v0.0.38
func (r *PrimitiveBase) InternalPrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider, getFields func() []FieldRef)
func (*PrimitiveBase) LocateNextDescendant ¶ added in v0.0.38
func (r *PrimitiveBase) LocateNextDescendant(locator *key.PKeyLocator) Primitive
func (*PrimitiveBase) String ¶ added in v0.0.40
func (r *PrimitiveBase) String() string
Default implementation of fmt:Stringer interface.
func (*PrimitiveBase) UnprepareForUpdates ¶ added in v0.0.67
func (r *PrimitiveBase) UnprepareForUpdates()
type ProntoGUI ¶ added in v0.0.11
type ProntoGUI interface {
// StartServing is deprecated. Use StartServingSingle instead, which has
// the exact same semantics.
StartServing(addr string, port int) error
// StartServingSingle begins listening at addr:port for a single client
// session. Only one client is handled at a time; additional session
// attempts are rejected. When the active client disconnects, a new client
// may establish a session. Use SetGUI, Wait, WaitOrCancel, and Update to interact
// with the connected client.
StartServingSingle(addr string, port int) error
// StartServingMultiple begins listening at addr:port for multiple client
// sessions. Up to maxSessions clients may be connected simultaneously;
// session attempts beyond this limit are rejected. Use AcceptSession to
// obtain a Session for each connected client.
StartServingMultiple(addr string, port int, maxSessions int) error
// StopServing shuts down the server and closes all active connections.
StopServing()
// AcceptSession blocks until a new client connects and returns a Session
// for that client. Only valid in multi-connection mode (after calling
// StartServingMultiple); returns an error if called in single-connection mode.
// It returns ErrCanceled if the context was canceled or ErrInterrupted if
// the caller interrupted the operation.
AcceptSession(ctx context.Context, interrupt chan bool) (Session, error)
// SetGUI sets the top-level primitives that define the GUI. Single-connection
// mode only. May be called before a client connects; the GUI will be sent
// once the first client connects.
SetGUI(primitives ...Primitive) error
// Wait sends the current GUI state to the client and blocks until the client
// sends back an update. Returns the Primitive that was updated, or an error
// if the client disconnects. Single-connection mode only.
Wait() (Primitive, error)
// WaitOrCancel is like Wait but also returns if the context is canceled
// or the interrupt channel is selected.
// Returns error of ErrCanceled if it was canceled or ErrInterrupted if
// interrupted by the caller.
// Single-connection mode only.
WaitOrCancel(ctx context.Context, interrupt chan bool) (Primitive, error)
// Update sends the current GUI state to the client and checks for an
// inbound update without blocking. Returns nil if no update is available.
// Single-connection mode only.
Update() (Primitive, error)
}
ProntoGUI is the API for streaming a GUI to one or more App clients over gRPC.
There are two modes of operation:
Single-connection mode: call StartServingSingle, then use SetGUI, Wait, WaitOrCancel, and Update to manage the GUI directly. Only one client is served at a time, but clients may disconnect and reconnect freely.
Multi-connection mode: call StartServingMultiple, then call AcceptSession in a loop. Each returned Session has its own SetGUI, Wait, etc. methods for managing that client's GUI independently.
func NewProntoGUI ¶ added in v0.0.11
func NewProntoGUI() ProntoGUI
NewProntoGUI creates a new ProntoGUI instance.
type Session ¶ added in v1.0.0
type Session interface {
// SetGUI sets the top-level primitives that define the GUI.
SetGUI(primitives ...Primitive)
// Wait sends the current GUI state to the client and blocks until the
// client sends back an update. Returns the Primitive that was updated,
// or an error if unsuccessful.
Wait() (Primitive, error)
// WaitOrCancel is like Wait but also returns ErrCanceled if the context
// is canceled or ErrInterrupted if the interrupt channel is selected
// before an update arrives.
WaitOrCancel(ctx context.Context, interrupt chan bool) (Primitive, error)
// Update sends the current GUI state to the client and checks for an
// inbound update without blocking. Returns nil if no update is available.
Update() (Primitive, error)
}
Session represents a single client connection with its own GUI lifecycle.
func NewSession ¶ added in v1.0.0
func NewSession(apicall *pgcomm.StreamingAPICall) Session
NewSession creates a new Session bound to the given streaming API call.
type String1DField ¶ added in v0.0.56
type String1DField struct {
FieldBase
// contains filtered or unexported fields
}
func (*String1DField) EgestValue ¶ added in v0.0.56
func (f *String1DField) EgestValue() any
func (*String1DField) Get ¶ added in v0.0.56
func (f *String1DField) Get() []string
func (*String1DField) IngestValue ¶ added in v0.0.56
func (f *String1DField) IngestValue(value any) error
func (*String1DField) PrepareForUpdates ¶ added in v0.0.56
func (f *String1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*String1DField) Set ¶ added in v0.0.56
func (f *String1DField) Set(sa []string)
type StringField ¶ added in v0.0.38
type StringField struct {
FieldBase
// contains filtered or unexported fields
}
func (*StringField) EgestValue ¶ added in v0.0.38
func (f *StringField) EgestValue() any
func (*StringField) Get ¶ added in v0.0.38
func (f *StringField) Get() string
func (*StringField) IngestValue ¶ added in v0.0.38
func (f *StringField) IngestValue(value any) error
func (*StringField) PrepareForUpdates ¶ added in v0.0.38
func (f *StringField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction, etsprovider EventTimestampProvider) (isContainer bool)
func (*StringField) Set ¶ added in v0.0.38
func (f *StringField) Set(s string)
type Synchro ¶ added in v0.0.11
type Synchro struct {
// contains filtered or unexported fields
}
func NewSynchro ¶ added in v0.0.11
func NewSynchro() *Synchro
func (*Synchro) GetFullUpdate ¶ added in v0.0.11
func (*Synchro) GetPartialUpdate ¶ added in v0.0.11
func (*Synchro) GetTopPrimitives ¶ added in v0.0.11
func (*Synchro) IngestUpdate ¶ added in v0.0.11
func (*Synchro) SetTopPrimitives ¶ added in v0.0.11
func (s *Synchro) SetTopPrimitives(etsprovider EventTimestampProvider, primitives ...Primitive)
type Table ¶ added in v0.0.35
type Table struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A table displays an array of primitives in a grid of rows and columns.
func (*Table) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Table) DeleteAllRows ¶ added in v0.0.50
func (table *Table) DeleteAllRows()
Deletes all rows from the table.
func (*Table) DeleteRow ¶ added in v0.0.40
Deletes a row in this table at the given index. An error is returned if the index is out of range.
func (*Table) Embodiment ¶ added in v0.0.35
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Table) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Table) GetHeadings ¶ added in v0.0.62
Generates a list of headings from each primitive in the HeaderRow. Although these are typically Text primitives, the scan relies on the primitive's string representation to allow for more general use.
func (*Table) HeaderRow ¶ added in v0.0.61
Returns the header row that describes each column in the table.
func (*Table) InsertRow ¶ added in v0.0.40
Inserts a new row in this table before the index specified. If index is -1 or extends beyond the number of rows in the table then row is appended at the end of the table. The row must match the dimension and cell types of the template row
func (*Table) LocateNextDescendant ¶ added in v0.0.35
func (table *Table) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Table) MakeHeadings ¶ added in v0.0.61
Constructs the HeaderRow from Text primitives, each holding content from the corresponding string provided in the headings argument.
func (*Table) MakeHeadingsVA ¶ added in v0.0.62
Constructs the HeaderRow from Text primitives, each holding content from the corresponding string provided in the variable argument list.
func (*Table) PrepareForUpdates ¶ added in v0.0.35
func (table *Table) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Table) Rows ¶ added in v0.0.35
Returns the dynamically populated 2D (rows, cols) collection of primitives that appear in the table.
func (*Table) SelectedRows ¶ added in v0.0.68
Returns the selected rows.
func (*Table) SelectionChanged ¶ added in v0.0.68
Returns true if the selection was changed.
func (*Table) SelectionMode ¶ added in v0.0.68
Returns the status of the table: 0 = None, 1 = One Always Selected, 2 = One or None, 3 = Multiple 4 = Range Atleast One, 5 = Range Any or None at all.
func (*Table) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Table) SetEmbodiment ¶ added in v0.0.35
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Table) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Table) SetHeaderRow ¶ added in v0.0.61
Sets the headings to use for each column in the table.
func (*Table) SetHeaderRowVA ¶ added in v0.0.61
Sets the headings (as variadic arguments) to use for each column in the table.
func (*Table) SetModelRow ¶ added in v0.0.56
Sets the model row.
func (*Table) SetRows ¶ added in v0.0.35
Sets the dynamically populated 2D (rows, cols) collection of primitives that appear in the table.
func (*Table) SetSelectedRows ¶ added in v0.0.68
Sets the selected rows.
func (*Table) SetSelectionMode ¶ added in v0.0.68
Sets the selection mode: 0 = None, 1 = One Always Selected, 2 = One or None, 3 = Multiple 4 = Range Atleast One, 5 = Range Any or None at all.
func (*Table) SetStatus ¶ added in v0.0.40
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Table) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Tables inside other containers.
func (*Table) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Table) Status ¶ added in v0.0.40
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
type TableWith ¶ added in v0.0.35
type TableWith struct {
Embodiment string
HeaderRow []Primitive
ModelRow []Primitive
Rows [][]Primitive
SelectedRows []int
SelectionMode int
Status int
Tag string
}
A table displays an array of primitives in a grid of rows and columns.
type TestPrimitive ¶ added in v0.0.38
type TestPrimitive struct {
// contains filtered or unexported fields
}
func (*TestPrimitive) EgestUpdate ¶ added in v0.0.38
func (*TestPrimitive) IngestUpdate ¶ added in v0.0.38
func (tp *TestPrimitive) IngestUpdate(update map[any]any) error
func (*TestPrimitive) IsPrepped ¶ added in v0.0.38
func (tp *TestPrimitive) IsPrepped() bool
func (*TestPrimitive) LocateNextDescendant ¶ added in v0.0.38
func (tp *TestPrimitive) LocateNextDescendant(locator *key.PKeyLocator) Primitive
func (*TestPrimitive) PrepareForUpdates ¶ added in v0.0.38
func (tp *TestPrimitive) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
func (*TestPrimitive) String ¶ added in v0.0.40
func (tp *TestPrimitive) String() string
func (*TestPrimitive) UnprepareForUpdates ¶ added in v0.0.67
func (tp *TestPrimitive) UnprepareForUpdates()
type Text ¶ added in v0.0.15
type Text struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A text primitive displays text on the screen.
func (*Text) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Text) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Text) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Text) PrepareForUpdates ¶ added in v0.0.15
func (txt *Text) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Text) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Text) SetContent ¶ added in v0.0.15
Sets the text content to display.
func (*Text) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Text) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Text) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Text) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Texts as Table cells.
func (*Text) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Text) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Text) String ¶ added in v0.0.40
Returns a string representation of this primitive: the content. Implements of fmt:Stringer interface.
type TextField ¶ added in v0.0.28
type TextField struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
An entry field that allows the user to enter text.
func NewTextField ¶ added in v0.0.40
Create a new TextField with initial text.
func (*TextField) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*TextField) Embodiment ¶ added in v0.0.28
Returns a JSON string specifying the embodiment to use for this primitive.
func (*TextField) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*TextField) PrepareForUpdates ¶ added in v0.0.28
func (txt *TextField) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*TextField) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*TextField) SetEmbodiment ¶ added in v0.0.28
Sets a JSON string specifying the embodiment to use for this primitive.
func (*TextField) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*TextField) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*TextField) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using TextFields as Table cells.
func (*TextField) SetTextEntry ¶ added in v0.0.28
Sets the text entered by the user.
func (*TextField) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*TextField) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*TextField) String ¶ added in v0.0.40
Returns a string representation of this primitive: the text entry. Implements of fmt:Stringer interface.
func (*TextField) Tag ¶ added in v0.0.41
Returns an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using TextFields as Table cells.
type TextFieldWith ¶ added in v0.0.28
An entry field that allows the user to enter text.
func (TextFieldWith) Make ¶ added in v0.0.28
func (w TextFieldWith) Make() *TextField
Creates a new TextField using the supplied field assignments.
type Timer ¶ added in v0.0.37
type Timer struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A timer is an invisible primitive that fires an event, triggering an update to the server. This is useful for low-precision GUI updates that originate on the server side. An example is updating "live" readings from a running process on the server.
func (*Timer) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Timer) Embodiment ¶ added in v0.0.37
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Timer) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Timer) Issued ¶ added in v0.0.56
Returns true if the command was issued during the current Wait cycle.
func (*Timer) PeriodMs ¶ added in v0.0.37
Returns the time period in milliseconds after which the timer fires an event. If the period is -1 (or any negative number) then the timer is disabled. A period of 0 will cause the timer to fire immediately after the primitive is updated.
func (*Timer) PrepareForUpdates ¶ added in v0.0.37
func (tmr *Timer) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Timer) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Timer) SetEmbodiment ¶ added in v0.0.37
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Timer) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Timer) SetPeriodMs ¶ added in v0.0.37
Sets the time period in milliseconds after which the timer fires an event. If the period is -1 (or any negative number) then the timer is disabled. A period of 0 will cause the timer to fire immediately after the primitive is updated.
func (*Timer) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Timer) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Timers inside containers.
func (*Timer) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Timer) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
type TimerWith ¶ added in v0.0.37
A timer is an invisible primitive that fires an event, triggering an update to the server. This is useful for low-precision GUI updates that originate on the server side. An example is updating "live" readings from a running process on the server.
type Tristate ¶ added in v0.0.16
type Tristate struct {
// Mix-in the common guts for primitives
PrimitiveBase
// contains filtered or unexported fields
}
A choice presented to the user that give three possible states: Affirmative (Yes, On, 1, etc.), Negative (No, Off, 0, etc.), and Indeterminate.
func NewTristate ¶ added in v0.0.40
Create a new TriState and assign a label.
func (*Tristate) Collapsed ¶ added in v0.0.68
Returns the collapsed status of the primitive. This is derived from the Status field.
func (*Tristate) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Tristate) Enabled ¶ added in v0.0.68
Returns the enabled status of the primitive. This is derived from the Status field.
func (*Tristate) Label ¶ added in v0.0.16
Returns the label to display along with the tristate option.
func (*Tristate) LocateNextDescendant ¶ added in v0.0.63
func (tri *Tristate) LocateNextDescendant(locator *key.PKeyLocator) Primitive
A non-recursive method to locate descendants by PKey. This is used internally by this library and normally should not be called by users of the library.
func (*Tristate) PrepareForUpdates ¶ added in v0.0.16
func (tri *Tristate) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction, etsprovider EventTimestampProvider)
Prepares the primitive for tracking pending updates to send to the app and for injesting updates from the app. This is used internally by this library and normally should not be called by users of the library.
func (*Tristate) SetCollapsed ¶ added in v0.0.68
Sets the collapsed status of the primitive. Setting this to true will set Status to 3 (collapsed) and setting this to false will set Status to 0 (visible & enabled).
func (*Tristate) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Tristate) SetEnabled ¶ added in v0.0.68
Sets the enabled status of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Tristate) SetLabel ¶ added in v0.0.16
Sets the label to display along with the tristate option.
func (*Tristate) SetLabelItem ¶ added in v0.0.63
Sets the label to display in the command.
func (*Tristate) SetState ¶ added in v0.0.16
Sets the state of the option (0 = Negative, 1 = Affirmative, and -1 = Indeterminate).
func (*Tristate) SetStatus ¶ added in v0.0.68
Sets the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Tristate) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, such as using Tristates as Table cells.
func (*Tristate) SetVisible ¶ added in v0.0.68
Sets the visibility of the primitive. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 2 (hidden).
func (*Tristate) State ¶ added in v0.0.16
Returns the state of the option (0 = Negative, 1 = Affirmative, and -1 = Indeterminate).
func (*Tristate) Status ¶ added in v0.0.68
Returns the status of the primitive: 0 = visible and enabled, 1 = visible and disabled, 2 = hidden and disabled, 3 = collapsed and disabled.
func (*Tristate) String ¶ added in v0.0.40
Returns a string representation of this primitive: the label. Implements of fmt:Stringer interface.
type TristateWith ¶ added in v0.0.17
type TristateWith struct {
Embodiment string
Label string
LabelItem Primitive
State int
Status int
Tag string
}
A choice presented to the user that give three possible states: Affirmative (Yes, On, 1, etc.), Negative (No, Off, 0, etc.), and Indeterminate.
func (TristateWith) Make ¶ added in v0.0.17
func (w TristateWith) Make() *Tristate
Creates a new TriState using the supplied field assignments.
Source Files
¶
- any1dfield.go
- any2dfield.go
- anyfield.go
- blobfield.go
- booleanfield.go
- card.go
- check.go
- choice.go
- command.go
- convenience.go
- eventfield.go
- eventtimestamp.go
- exportfile.go
- field.go
- fieldbase.go
- folder.go
- folder_item.go
- frame.go
- group.go
- icon.go
- image.go
- importfile.go
- integer1dfield.go
- integerfield.go
- list.go
- nothing.go
- numericfield.go
- primitive.go
- primitivebase.go
- prontogui.go
- session.go
- string1dfield.go
- stringfield.go
- synchro.go
- table.go
- testhelp.go
- text.go
- textfield.go
- timer.go
- tristate.go