config

package
v0.3.1-0...-ca91996 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2021 License: MIT Imports: 7 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BackgroundSelect

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

BackgroundSelect is a DOM component autogenerated by Askew

func (*BackgroundSelect) Destroy

func (o *BackgroundSelect) Destroy()

Destroy destroys this element (and all contained components). If it is currently inserted anywhere, it gets removed before.

func (*BackgroundSelect) Extract

func (o *BackgroundSelect) Extract()

Extract removes this component from its current parent. The component will be in initial state afterwards.

func (*BackgroundSelect) FirstNode

func (o *BackgroundSelect) FirstNode() js.Value

FirstNode returns the first DOM node of this component. It implements the askew.Component interface.

func (*BackgroundSelect) Init

func (bg *BackgroundSelect) Init(ctx server.Context)

Init initializes the BackgroundSelect widget.

func (*BackgroundSelect) InsertInto

func (o *BackgroundSelect) InsertInto(parent js.Value, before js.Value)

InsertInto inserts this component into the given object. The component will be in inserted state afterwards.

The component will be inserted in front of 'before', or at the end if 'before' is 'js.Undefined()'.

func (*BackgroundSelect) ItemClicked

func (bg *BackgroundSelect) ItemClicked(index int) bool

func (*BackgroundSelect) Receive

func (bg *BackgroundSelect) Receive(input json.RawMessage, ctx server.Context) error

Receive loads the data in the given JSON input.

func (*BackgroundSelect) Reset

func (bg *BackgroundSelect) Reset()

Reset resets the UI to the values that have last been queried via Data(). If the values have never been queried, the UI is reset to the initial data the state object was loaded with.

func (*BackgroundSelect) Send

func (bg *BackgroundSelect) Send(ctx server.Context) interface{}

Send returns an instance of api.Background

func (*BackgroundSelect) SetEditHandler

func (bg *BackgroundSelect) SetEditHandler(editHandler EditHandler)

func (*BackgroundSelect) SetEnabled

func (bg *BackgroundSelect) SetEnabled(value bool)

SetEnabled enables or disables the GUI.

type BackgroundSelectList

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

BackgroundSelectList is a list of BackgroundSelect whose manipulation methods auto-update the corresponding nodes in the document.

func (*BackgroundSelectList) Append

func (l *BackgroundSelectList) Append(item *BackgroundSelect)

Append appends the given item to the list.

func (*BackgroundSelectList) Destroy

func (l *BackgroundSelectList) Destroy(index int)

Destroy destroys the item at the given index and removes it from the list.

func (*BackgroundSelectList) DestroyAll

func (l *BackgroundSelectList) DestroyAll()

DestroyAll destroys all items in the list and empties it.

func (*BackgroundSelectList) Init

func (l *BackgroundSelectList) Init(container js.Value, index int)

Init initializes the list, discarding previous data. The list's items will be placed in the given container, starting at the given index.

func (*BackgroundSelectList) Insert

func (l *BackgroundSelectList) Insert(index int, item *BackgroundSelect)

Insert inserts the given item at the given index into the list.

func (*BackgroundSelectList) Item

func (l *BackgroundSelectList) Item(index int) *BackgroundSelect

Item returns the item at the current index.

func (*BackgroundSelectList) Len

func (l *BackgroundSelectList) Len() int

Len returns the number of items in the list.

func (*BackgroundSelectList) Remove

func (l *BackgroundSelectList) Remove(index int) *BackgroundSelect

Remove removes the item at the given index from the list and returns it.

type EditHandler

type EditHandler interface {
	Edited()
}

EditHandler is a listener that gets called when an UI element's displayed state is changed.

type FontSelect

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

FontSelect is a DOM component autogenerated by Askew

func (*FontSelect) Destroy

func (o *FontSelect) Destroy()

Destroy destroys this element (and all contained components). If it is currently inserted anywhere, it gets removed before.

func (*FontSelect) Extract

func (o *FontSelect) Extract()

Extract removes this component from its current parent. The component will be in initial state afterwards.

func (*FontSelect) FirstNode

func (o *FontSelect) FirstNode() js.Value

FirstNode returns the first DOM node of this component. It implements the askew.Component interface.

func (*FontSelect) Init

func (fs *FontSelect) Init(ctx server.Context)

Init initializes the FontSelect widget.

func (*FontSelect) InsertInto

func (o *FontSelect) InsertInto(parent js.Value, before js.Value)

InsertInto inserts this component into the given object. The component will be in inserted state afterwards.

The component will be inserted in front of 'before', or at the end if 'before' is 'js.Undefined()'.

func (*FontSelect) Receive

func (fs *FontSelect) Receive(input json.RawMessage, ctx server.Context) error

Receive loads the data given via input.

func (*FontSelect) Reset

func (fs *FontSelect) Reset()

Reset resets the UI to the values that have last been queried via Send(). If the values have never been queried, the UI is reset to the initial data the state object was loaded with.

func (*FontSelect) Send

func (fs *FontSelect) Send(ctx server.Context) interface{}

Send returns an api.Font object containing the currently selected values.

func (*FontSelect) SetEditHandler

func (fs *FontSelect) SetEditHandler(editHandler EditHandler)

func (*FontSelect) SetEnabled

func (fs *FontSelect) SetEnabled(value bool)

SetEnabled enables or disables the GUI.

type FontSelectList

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

FontSelectList is a list of FontSelect whose manipulation methods auto-update the corresponding nodes in the document.

func (*FontSelectList) Append

func (l *FontSelectList) Append(item *FontSelect)

Append appends the given item to the list.

func (*FontSelectList) Destroy

func (l *FontSelectList) Destroy(index int)

Destroy destroys the item at the given index and removes it from the list.

func (*FontSelectList) DestroyAll

func (l *FontSelectList) DestroyAll()

DestroyAll destroys all items in the list and empties it.

func (*FontSelectList) Init

func (l *FontSelectList) Init(container js.Value, index int)

Init initializes the list, discarding previous data. The list's items will be placed in the given container, starting at the given index.

func (*FontSelectList) Insert

func (l *FontSelectList) Insert(index int, item *FontSelect)

Insert inserts the given item at the given index into the list.

func (*FontSelectList) Item

func (l *FontSelectList) Item(index int) *FontSelect

Item returns the item at the current index.

func (*FontSelectList) Len

func (l *FontSelectList) Len() int

Len returns the number of items in the list.

func (*FontSelectList) Remove

func (l *FontSelectList) Remove(index int) *FontSelect

Remove removes the item at the given index from the list and returns it.

type OptionalBackgroundSelect

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

OptionalBackgroundSelect is a nillable embeddable container for BackgroundSelect.

func (*OptionalBackgroundSelect) Init

func (o *OptionalBackgroundSelect) Init(container js.Value, index int)

Init initializes the container to be empty. The contained item, if any, will be placed in the given container at the given index.

func (*OptionalBackgroundSelect) Item

Item returns the current item, or nil if no item is assigned

func (*OptionalBackgroundSelect) Remove

Remove removes the current item and returns it. Returns nil if there is no current item.

func (*OptionalBackgroundSelect) Set

Set sets the contained item destroying the current one. Give nil as value to simply destroy the current item.

type OptionalFontSelect

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

OptionalFontSelect is a nillable embeddable container for FontSelect.

func (*OptionalFontSelect) Init

func (o *OptionalFontSelect) Init(container js.Value, index int)

Init initializes the container to be empty. The contained item, if any, will be placed in the given container at the given index.

func (*OptionalFontSelect) Item

func (o *OptionalFontSelect) Item() *FontSelect

Item returns the current item, or nil if no item is assigned

func (*OptionalFontSelect) Remove

func (o *OptionalFontSelect) Remove() askew.Component

Remove removes the current item and returns it. Returns nil if there is no current item.

func (*OptionalFontSelect) Set

func (o *OptionalFontSelect) Set(value *FontSelect)

Set sets the contained item destroying the current one. Give nil as value to simply destroy the current item.

type Widget

type Widget interface {
	askew.Component
	// Receiver initializes the controller's state from JSON sent from the server.
	comms.Receiver
	// Sender sends the data entered by the user back to the server.
	// By sending the data, it consolidates it so that future calls to Reset()
	// will reset the values to the values being sent.
	comms.Sender
	// Reset resets the UI to the values that have last been queried via Data().
	// If the values have never been queried, the UI is reset to the initial
	// data the state object was loaded with.
	Reset()
	// SetEnabled enables or disables the GUI.
	SetEnabled(value bool)
	// SetEditHandler sets the object that should receive Edited() events.
	SetEditHandler(handler EditHandler)
}

Widget is the UI element for a ConfigItem.

func NewBackgroundSelect

func NewBackgroundSelect(ctx server.Context) Widget

NewBackgroundSelect creates a new BackgroundSelect widget and initializes it.

func NewFontSelect

func NewFontSelect(ctx server.Context) Widget

NewFontSelect creates a new FontSelect widget and initializes it.

Jump to

Keyboard shortcuts

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