Documentation ¶
Index ¶
- Variables
- func AddOverlay(overlay ...*NFOverlay) error
- func Register(name, path string) error
- func RegisterAll(path string) error
- type NFOverlay
- func (o *NFOverlay) Hide(window fyne.Window, updateScenes ...*SceneStack)
- func (o *NFOverlay) Layout() *NFLayout.Layout
- func (o *NFOverlay) Name() string
- func (o *NFOverlay) SetLayout(layout *NFLayout.Layout)
- func (o *NFOverlay) SetName(name string)
- func (o *NFOverlay) SetVisible(visible bool, window fyne.Window, updateScenes ...*SceneStack)
- func (o *NFOverlay) Show(window fyne.Window, updateScenes ...*SceneStack)
- func (o *NFOverlay) Visible() bool
- type Scene
- func (scene *Scene) AddChild(newChild NFObjects.NFRendered)
- func (scene *Scene) AddFunction(newFunction NFObjects.NFObject)
- func (scene *Scene) CheckArgs() error
- func (scene *Scene) DeleteByID(ID uuid.UUID, search bool) error
- func (scene *Scene) DeleteChild(childID uuid.UUID, search bool) error
- func (scene *Scene) DeleteFunction(functionID uuid.UUID, search bool) error
- func (scene *Scene) FetchAll() (map[uuid.UUID][]NFObjects.NFObject, int)
- func (scene *Scene) FetchAllChildren() (map[uuid.UUID][]NFObjects.NFObject, int)
- func (scene *Scene) FetchAllFunctions() (map[uuid.UUID][]NFObjects.NFObject, int)
- func (scene *Scene) FetchChildren(children map[uuid.UUID][]NFObjects.NFObject) int
- func (scene *Scene) FetchChildrenAndFunctions(childrenAndFunctions map[uuid.UUID][]NFObjects.NFObject) int
- func (scene *Scene) FetchFunctions(functions map[uuid.UUID][]NFObjects.NFObject) int
- func (scene *Scene) FetchIDs() []uuid.UUID
- func (scene *Scene) GetArgs() *NFData.NFInterfaceMap
- func (scene *Scene) GetByID(ID uuid.UUID) NFObjects.NFObject
- func (scene *Scene) GetChildByID(childID uuid.UUID) NFObjects.NFObject
- func (scene *Scene) GetFunctionByID(functionID uuid.UUID) NFObjects.NFObject
- func (scene *Scene) GetFunctions() []NFObjects.NFObject
- func (scene *Scene) GetID() uuid.UUID
- func (scene *Scene) GetName() string
- func (scene *Scene) GetType() string
- func (scene *Scene) MakeId()
- func (scene *Scene) Parse(window fyne.Window) (*SceneStack, error)
- func (scene *Scene) ParseAndLoad(window fyne.Window) (*SceneStack, error)
- func (scene *Scene) RunAction(action string, window fyne.Window, newValues *NFData.NFInterfaceMap) (*NFData.NFInterfaceMap, error)
- func (scene *Scene) RunAllActions(action string, window fyne.Window, newValues *NFData.NFInterfaceMap) (int, []*NFData.NFInterfaceMap, error)
- func (scene *Scene) Save(path string) error
- func (scene *Scene) SetArgs(args *NFData.NFInterfaceMap)
- func (scene *Scene) SetName(newName string)
- func (scene *Scene) SetType(t string)
- func (scene *Scene) Validate() error
- type SceneStack
- type StackRenderer
Constants ¶
This section is empty.
Variables ¶
var Overlays = make(map[string]*NFOverlay)
var SceneMap = map[string]string{}
SceneMap is a map of scene names to their paths for easy access
Functions ¶
func AddOverlay ¶
func RegisterAll ¶
RegisterAll registers all scenes by walking both the embedded and local filesystems
This function is heavy and should only be called once at the start of the program, For adding scenes after the program has started use Register instead
Like most NFFS functions this function only functions in the local directory and the embedded filesystems
Types ¶
type NFOverlay ¶
type NFOverlay struct {
// contains filtered or unexported fields
}
func (*NFOverlay) Hide ¶
func (o *NFOverlay) Hide(window fyne.Window, updateScenes ...*SceneStack)
func (*NFOverlay) SetVisible ¶
func (o *NFOverlay) SetVisible(visible bool, window fyne.Window, updateScenes ...*SceneStack)
func (*NFOverlay) Show ¶
func (o *NFOverlay) Show(window fyne.Window, updateScenes ...*SceneStack)
type Scene ¶
type Scene struct { Name string `json:"Name"` UUID uuid.UUID `json:"UUID"` Layout *NFLayout.Layout `json:"Layout"` Functions []*NFFunction.Function `json:"Functions"` // List of functions that are children of the scene for action based execution Args *NFData.NFInterfaceMap `json:"Args"` }
Scene is the struct that holds all the information about a scene
func Get ¶
func Get(name string, config ...NFFS.Configuration) (*Scene, error)
Get gets a scene from the SceneMap loading it from the filesystem
func (*Scene) AddChild ¶
func (scene *Scene) AddChild(newChild NFObjects.NFRendered)
func (*Scene) AddFunction ¶
func (*Scene) DeleteFunction ¶
func (*Scene) FetchAllChildren ¶
func (*Scene) FetchAllFunctions ¶
func (*Scene) FetchChildren ¶
func (*Scene) FetchChildrenAndFunctions ¶
func (*Scene) FetchFunctions ¶
func (*Scene) GetArgs ¶
func (scene *Scene) GetArgs() *NFData.NFInterfaceMap
func (*Scene) GetFunctionByID ¶
func (*Scene) GetFunctions ¶
func (*Scene) Parse ¶
func (scene *Scene) Parse(window fyne.Window) (*SceneStack, error)
Parse parses a scene and returns a fyne.CanvasObject that can be added to the window
func (*Scene) ParseAndLoad ¶
func (scene *Scene) ParseAndLoad(window fyne.Window) (*SceneStack, error)
ParseAndLoad runs Parse before loading the scene in to active scene data
func (*Scene) RunAction ¶
func (scene *Scene) RunAction(action string, window fyne.Window, newValues *NFData.NFInterfaceMap) (*NFData.NFInterfaceMap, error)
func (*Scene) RunAllActions ¶
func (scene *Scene) RunAllActions(action string, window fyne.Window, newValues *NFData.NFInterfaceMap) (int, []*NFData.NFInterfaceMap, error)
func (*Scene) SetArgs ¶
func (scene *Scene) SetArgs(args *NFData.NFInterfaceMap)
type SceneStack ¶
type SceneStack struct { widget.BaseWidget // contains filtered or unexported fields }
func NewSceneStack ¶
func NewSceneStack(window fyne.Window, scene fyne.CanvasObject) *SceneStack
func (*SceneStack) CreateRenderer ¶
func (s *SceneStack) CreateRenderer() fyne.WidgetRenderer
func (*SceneStack) RefreshOverlays ¶
func (s *SceneStack) RefreshOverlays(window fyne.Window)
type StackRenderer ¶
type StackRenderer struct {
// contains filtered or unexported fields
}
func (*StackRenderer) Destroy ¶
func (s *StackRenderer) Destroy()
func (*StackRenderer) Layout ¶
func (s *StackRenderer) Layout(size fyne.Size)
func (*StackRenderer) MinSize ¶
func (s *StackRenderer) MinSize() fyne.Size
func (*StackRenderer) Objects ¶
func (s *StackRenderer) Objects() []fyne.CanvasObject
func (*StackRenderer) Refresh ¶
func (s *StackRenderer) Refresh()