Skip to content

package common_workspace

import "kaiju/editor/editor_workspace/common_workspace"

Functions

ReflectAddToSlice

func ReflectAddToSlice(obj any, e *document.Element)

ReflectObjectValueFromUI

func ReflectObjectValueFromUI(obj any, e *document.Element) reflect.Value

ReflectRemoveFromSlice

func ReflectRemoveFromSlice(obj any, e *document.Element)

SetObjectValueFromUI

func SetObjectValueFromUI(obj any, e *document.Element)

Types

CommonWorkspace

struct

type CommonWorkspace struct {
    Host      *engine.Host
    Doc       *document.Document
    UiMan     ui.Manager
    IsBlurred bool
}

CommonWorkspace.Blur

func (w *CommonWorkspace) Blur()

CommonWorkspace.CommonClose

func (w *CommonWorkspace) CommonClose()

CommonWorkspace.CommonOpen

func (w *CommonWorkspace) CommonOpen()

CommonWorkspace.Focus

func (w *CommonWorkspace) Focus()

CommonWorkspace.InitializeWithUI

func (w *CommonWorkspace) InitializeWithUI(host *engine.Host, htmlPath string, withData any, funcMap map[string]func(*document.Element)) error

DataUISection

struct

type DataUISection struct {
    Name   string
    Fields []DataUISectionField
}

ReflectUIStructure

func ReflectUIStructure(obj any, path string, fallbackOptions map[string][]ui.SelectOption) DataUISection

DataUISectionField

struct

type DataUISectionField struct {
    Name     string
    Type     string
    List     []ui.SelectOption
    Value    any
    Sections []DataUISection
    RootPath string
    TipKey   string
}

DataUISectionField.DisplayName

func (f DataUISectionField) DisplayName() string

DataUISectionField.FullPath

func (f DataUISectionField) FullPath() string

DataUISectionField.PascalToTitle

func (f DataUISectionField) PascalToTitle(str string) string

DataUISectionField.ValueListHas

func (f DataUISectionField) ValueListHas(val string) bool