Documentation ¶
Overview ¶
Copyright 2024 ProntoGUI, LLC. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Index ¶
- func CanonizeEmbodiment(embodiment string) string
- 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)
- 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)
- type AnyField
- type BlobField
- type BooleanField
- type Check
- func (check *Check) Checked() bool
- func (check *Check) Embodiment() string
- func (check *Check) Label() string
- func (check *Check) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (check *Check) SetChecked(b bool) *Check
- func (check *Check) SetEmbodiment(s string) *Check
- func (check *Check) SetLabel(s string) *Check
- func (check *Check) SetTag(s string) *Check
- func (check *Check) String() string
- func (check *Check) Tag() string
- type CheckWith
- type Choice
- func (choice *Choice) Choice() string
- func (choice *Choice) ChoiceIndex() int
- func (choice *Choice) Choices() []string
- func (choice *Choice) Embodiment() string
- func (choice *Choice) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (choice *Choice) SetChoice(s string) *Choice
- func (choice *Choice) SetChoiceIndex(index int) *Choice
- func (choice *Choice) SetChoices(sa []string) *Choice
- func (choice *Choice) SetChoicesVA(sa ...string) *Choice
- func (choice *Choice) SetEmbodiment(s string) *Choice
- func (choice *Choice) SetTag(s string) *Choice
- func (choice *Choice) String() string
- func (choice *Choice) Tag() string
- type ChoiceWith
- type Command
- func (cmd *Command) Embodiment() string
- func (cmd *Command) Enabled() bool
- func (cmd *Command) Issued() bool
- func (cmd *Command) Label() string
- func (cmd *Command) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (cmd *Command) SetEmbodiment(s string) *Command
- func (cmd *Command) SetEnabled(enabled bool) *Command
- func (cmd *Command) SetLabel(s string) *Command
- func (cmd *Command) SetStatus(i int) *Command
- func (cmd *Command) SetTag(s string) *Command
- func (cmd *Command) SetVisible(visible bool) *Command
- func (cmd *Command) Status() int
- func (cmd *Command) String() string
- func (cmd *Command) Tag() string
- func (cmd *Command) Visible() bool
- type CommandWith
- type EventField
- type ExportFile
- func (ef *ExportFile) Data() []byte
- func (ef *ExportFile) Embodiment() string
- func (ef *ExportFile) Exported() bool
- func (ef *ExportFile) Name() string
- func (ef *ExportFile) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (ef *ExportFile) Reset()
- func (ef *ExportFile) SetData(d []byte) *ExportFile
- func (ef *ExportFile) SetEmbodiment(s string) *ExportFile
- func (ef *ExportFile) SetExported(b bool) *ExportFile
- func (ef *ExportFile) SetName(s string) *ExportFile
- func (ef *ExportFile) SetTag(s string) *ExportFile
- func (ef *ExportFile) Tag() string
- type ExportFileWith
- type Field
- type FieldBase
- type FieldRef
- type Frame
- func (frame *Frame) Embodiment() string
- func (frame *Frame) FrameItems() []Primitive
- func (frame *Frame) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (frame *Frame) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (frame *Frame) SetEmbodiment(s string) *Frame
- func (frame *Frame) SetFrameItems(items []Primitive) *Frame
- func (frame *Frame) SetFrameItemsVA(items ...Primitive) *Frame
- func (frame *Frame) SetShowing(showing bool) *Frame
- func (frame *Frame) SetTag(s string) *Frame
- func (frame *Frame) Showing() bool
- func (frame *Frame) Tag() string
- type FrameWith
- type Group
- func (grp *Group) Embodiment() string
- func (grp *Group) GroupItems() []Primitive
- func (grp *Group) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (grp *Group) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (grp *Group) SetEmbodiment(s string) *Group
- func (grp *Group) SetGroupItems(items []Primitive) *Group
- func (grp *Group) SetGroupItemsVA(items ...Primitive) *Group
- func (grp *Group) SetTag(s string) *Group
- func (grp *Group) Tag() string
- type GroupWith
- type Image
- func (image *Image) Embodiment() string
- func (image *Image) Image() []byte
- func (image *Image) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (image *Image) SetEmbodiment(s string) *Image
- func (image *Image) SetImage(data []byte) *Image
- func (image *Image) SetTag(s string) *Image
- func (image *Image) Tag() string
- type ImageWith
- type ImportFile
- func (ifile *ImportFile) Data() []byte
- func (ifile *ImportFile) Embodiment() string
- 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)
- func (ifile *ImportFile) Reset()
- func (ifile *ImportFile) SetEmbodiment(s string) *ImportFile
- func (ifile *ImportFile) SetImported(b bool) *ImportFile
- func (ifile *ImportFile) SetName(s string) *ImportFile
- func (ifile *ImportFile) SetTag(s string) *ImportFile
- func (ifile *ImportFile) SetValidExtensions(sa []string) *ImportFile
- func (ifile *ImportFile) Tag() string
- func (ifile *ImportFile) ValidExtensions() []string
- type ImportFileWith
- type IntegerField
- type List
- func (list *List) Embodiment() string
- func (list *List) ListItems() []Primitive
- func (list *List) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (list *List) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (list *List) Selected() int
- func (list *List) SelectedItem() Primitive
- func (list *List) SetEmbodiment(s string) *List
- func (list *List) SetListItems(items []Primitive) *List
- func (list *List) SetListItemsVA(items ...Primitive) *List
- func (list *List) SetSelected(selected int) *List
- func (list *List) SetTag(s string) *List
- func (list *List) Tag() string
- type ListWith
- 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, getFields func() []FieldRef)
- func (r *PrimitiveBase) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (r *PrimitiveBase) String() string
- type ProntoGUI
- type StringField
- type Strings1DField
- func (f *Strings1DField) EgestValue() any
- func (f *Strings1DField) Get() []string
- func (f *Strings1DField) IngestValue(value any) error
- func (f *Strings1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction) (isContainer bool)
- func (f *Strings1DField) Set(sa []string)
- 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(primitives ...Primitive)
- type Table
- func (table *Table) DeleteAllRows()
- func (table *Table) DeleteRow(index int) error
- func (table *Table) Embodiment() string
- func (table *Table) Headings() []string
- func (table *Table) InsertRow(index int, row []Primitive)
- func (table *Table) LocateNextDescendant(locator *key.PKeyLocator) Primitive
- func (table *Table) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (table *Table) RowCount() int
- func (table *Table) Rows() [][]Primitive
- func (table *Table) SetEmbodiment(s string) *Table
- func (table *Table) SetHeadings(s []string) *Table
- func (table *Table) SetHeadingsVA(items ...string) *Table
- func (table *Table) SetRows(items [][]Primitive) *Table
- func (table *Table) SetStatus(status int) *Table
- func (table *Table) SetTag(s string) *Table
- func (table *Table) Status() int
- func (table *Table) Tag() string
- 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)
- func (tp *TestPrimitive) String() string
- type Text
- func (txt *Text) Content() string
- func (txt *Text) Embodiment() string
- func (txt *Text) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (txt *Text) SetContent(s string) *Text
- func (txt *Text) SetEmbodiment(s string) *Text
- func (txt *Text) SetTag(s string) *Text
- func (txt *Text) String() string
- func (txt *Text) Tag() string
- type TextField
- func (txt *TextField) Embodiment() string
- func (txt *TextField) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (txt *TextField) SetEmbodiment(s string) *TextField
- func (txt *TextField) SetTag(s string) *TextField
- func (txt *TextField) SetTextEntry(s string) *TextField
- func (txt *TextField) String() string
- func (txt *TextField) Tag() string
- func (txt *TextField) TextEntry() string
- type TextFieldWith
- type TextWith
- type Timer
- func (tmr *Timer) Embodiment() string
- func (tmr *Timer) PeriodMs() int
- func (tmr *Timer) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (tmr *Timer) SetEmbodiment(s string) *Timer
- func (tmr *Timer) SetPeriodMs(i int) *Timer
- func (tmr *Timer) SetTag(s string) *Timer
- func (tmr *Timer) Tag() string
- type TimerWith
- type Tristate
- func (tri *Tristate) Embodiment() string
- func (tri *Tristate) Label() string
- func (tri *Tristate) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
- func (tri *Tristate) SetEmbodiment(s string) *Tristate
- func (tri *Tristate) SetLabel(s string) *Tristate
- func (tri *Tristate) SetState(i int) *Tristate
- func (tri *Tristate) SetTag(s string) *Tristate
- func (tri *Tristate) State() int
- func (tri *Tristate) String() string
- func (tri *Tristate) Tag() string
- type TristateWith
- type Update
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanonizeEmbodiment ¶ added in v0.0.54
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) (isContainer bool)
func (*Any1DField) Set ¶ added in v0.0.38
func (f *Any1DField) Set(ary []Primitive)
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) (isContainer bool)
func (*Any2DField) Set ¶ added in v0.0.38
func (f *Any2DField) Set(ary [][]Primitive)
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
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) PrepareForUpdates ¶ added in v0.0.38
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) (isContainer bool)
func (*BooleanField) Set ¶ added in v0.0.38
func (f *BooleanField) Set(b bool)
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) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Check) PrepareForUpdates ¶ added in v0.0.16
func (check *Check) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) SetEmbodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
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.
type CheckWith ¶ added in v0.0.17
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 initiali 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 covenvenience function as an alternative to Choice(). The canonical storage of choice remains a string.
func (*Choice) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Choice) PrepareForUpdates ¶ added in v0.0.16
func (choice *Choice) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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 covenvenience function as an alternative to SetChoice(). The canonical storage of choice remains a string.
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) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
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.
type ChoiceWith ¶ added in v0.0.17
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) 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 command. 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) PrepareForUpdates ¶ added in v0.0.10
func (cmd *Command) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) 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 command. Setting this to true will set Status to 0 (visible & enabled) and setting this to false will set Status to 1 (disabled).
func (*Command) SetStatus ¶ added in v0.0.11
Sets the status of the command: 0 = Command Normal, 1 = Command Disabled, 2 = Command Hidden.
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 command. 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 command: 0 = Command Normal, 1 = Command Disabled, 2 = Command Hidden.
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
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 // A function that returns a timestamp uniquely tied to the current Wait cycle. TimestampProvider func() time.Time // 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) (isContainer bool)
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) 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) 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)
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) 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) 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) 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) 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.
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) StashUpdateInfo ¶ added in v0.0.38
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) Embodiment ¶ added in v0.0.40
Returns a JSON string specifying the embodiment to use for this primitive.
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)
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) SetEmbodiment ¶ added in v0.0.40
Sets a JSON string specifying the embodiment to use for this primitive.
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) SetTag ¶ added in v0.0.41
Sets an optional and arbitrary string to keep with this primitive. This is useful for identification later on, uch as using Frames inside other containers.
type FrameWith ¶ added in v0.0.29
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) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
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)
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) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
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.
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 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. (EXPERIMENTAL)
func (*Image) Embodiment ¶ added in v0.0.38
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Image) PrepareForUpdates ¶ added in v0.0.38
func (image *Image) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) SetEmbodiment ¶ added in v0.0.38
Sets a JSON string specifying the embodiment to use for this primitive.
type ImageWith ¶ added in v0.0.38
An image for displaying a graphic to display on the screen. (EXPERIMENTAL)
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) 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) 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)
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) 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) 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) 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) 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).
type ImportFileWith ¶ added in v0.0.34
type ImportFileWith struct { Data []byte Embodiment string Name string 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 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) (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) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
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) PrepareForUpdates ¶ added in v0.0.25
func (list *List) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) Selected ¶ added in v0.0.25
Returns the currently selected item or -1 for none selected.
func (*List) SelectedItem ¶ added in v0.0.51
SelectedItem returns the currently selected item from the list. If the selected index is within the valid range of list items, it returns the item at the selected index. If the selected index is out of range, it returns nil.
func (*List) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*List) SetListItems ¶ added in v0.0.25
Sets the ttems to show in the list.
func (*List) SetListItemsVA ¶ added in v0.0.25
Returns the ttems to show in the list (as a variadic argument list).
func (*List) SetSelected ¶ added in v0.0.25
Sets the currently selected item or -1 for none selected.
type ListWith ¶ added in v0.0.25
A list is a collection of primitives that have a sequential-like relationship and might be dynamic in quantity or kind.
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, 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.
type ProntoGUI ¶ added in v0.0.11
type ProntoGUI interface { StartServing(addr string, port int) error StopServing() SetGUI(primitives ...Primitive) Update() (Primitive, error) Wait() (Primitive, error) }
The API for working with app-to-server communication.
func NewProntoGUI ¶ added in v0.0.11
func NewProntoGUI() ProntoGUI
Creates a new ProntoGUI instance.
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) (isContainer bool)
func (*StringField) Set ¶ added in v0.0.38
func (f *StringField) Set(s string)
type Strings1DField ¶ added in v0.0.38
type Strings1DField struct { FieldBase // contains filtered or unexported fields }
func (*Strings1DField) EgestValue ¶ added in v0.0.38
func (f *Strings1DField) EgestValue() any
func (*Strings1DField) Get ¶ added in v0.0.38
func (f *Strings1DField) Get() []string
func (*Strings1DField) IngestValue ¶ added in v0.0.38
func (f *Strings1DField) IngestValue(value any) error
func (*Strings1DField) PrepareForUpdates ¶ added in v0.0.38
func (f *Strings1DField) PrepareForUpdates(fkey key.FKey, pkey key.PKey, fieldPKeyIndex int, onset key.OnSetFunction) (isContainer bool)
func (*Strings1DField) Set ¶ added in v0.0.38
func (f *Strings1DField) Set(sa []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
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) DeleteAllRows ¶ added in v0.0.50
func (table *Table) DeleteAllRows()
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) 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) PrepareForUpdates ¶ added in v0.0.35
func (table *Table) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) SetEmbodiment ¶ added in v0.0.35
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Table) SetHeadings ¶ added in v0.0.35
Sets the headings to use for each column in the table.
func (*Table) SetHeadingsVA ¶ added in v0.0.35
Sets the headings (as variadic arguments) to use for each column in the table.
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) SetStatus ¶ added in v0.0.40
Sets the status of the table: 0 = Table Normal, 1 = Table Disabled, 2 = Table Hidden.
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.
type TableWith ¶ added in v0.0.35
type TableWith struct { Embodiment string Headings []string Rows [][]Primitive 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)
func (*TestPrimitive) String ¶ added in v0.0.40
func (tp *TestPrimitive) String() string
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) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Text) PrepareForUpdates ¶ added in v0.0.15
func (txt *Text) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) 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) 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.
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) Embodiment ¶ added in v0.0.28
Returns a JSON string specifying the embodiment to use for this primitive.
func (*TextField) PrepareForUpdates ¶ added in v0.0.28
func (txt *TextField) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) SetEmbodiment ¶ added in v0.0.28
Sets a JSON string specifying the embodiment to use for this primitive.
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) String ¶ added in v0.0.40
Returns a string representation of this primitive: the text entry. Implements of fmt:Stringer interface.
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) Embodiment ¶ added in v0.0.37
Returns a JSON string specifying the embodiment to use for this primitive.
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)
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) SetEmbodiment ¶ added in v0.0.37
Sets a JSON string specifying the embodiment to use for this primitive.
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.
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) Embodiment ¶ added in v0.0.27
Returns a JSON string specifying the embodiment to use for this primitive.
func (*Tristate) Label ¶ added in v0.0.16
Returns the label to display along with the tristate option.
func (*Tristate) PrepareForUpdates ¶ added in v0.0.16
func (tri *Tristate) PrepareForUpdates(pkey key.PKey, onset key.OnSetFunction)
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) SetEmbodiment ¶ added in v0.0.27
Sets a JSON string specifying the embodiment to use for this primitive.
func (*Tristate) SetLabel ¶ added in v0.0.16
Sets the label to display along with the tristate option.
func (*Tristate) SetState ¶ added in v0.0.16
Sets the state of the option (0 = Negative, 1 = Affirmative, and -1 = Indeterminate).
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) State ¶ added in v0.0.16
Returns the state of the option (0 = Negative, 1 = Affirmative, and -1 = Indeterminate).
type TristateWith ¶ added in v0.0.17
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
- check.go
- choice.go
- command.go
- eventfield.go
- eventtimestamp.go
- exportfile.go
- field.go
- fieldbase.go
- frame.go
- group.go
- image.go
- importfile.go
- integerfield.go
- list.go
- primitive.go
- primitivebase.go
- prontogui.go
- stringfield.go
- strings1dfield.go
- synchro.go
- table.go
- testhelp.go
- text.go
- textfield.go
- timer.go
- tristate.go