model

package module
v0.0.0-...-6e8b2b8 Latest Latest
Warning

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

Go to latest
Published: May 16, 2020 License: MIT Imports: 6 Imported by: 2

Documentation

Index

Constants

View Source
const (
	Class_Model           = "goui.model.Model"
	Class_StructModel     = "goui.model.StructModel"
	Class_Binding         = "goui.model.Binding"
	Class_PropertyBinding = "goui.model.PropertyBinding"
	Class_ContextBinding  = "goui.model.ContextBinding"
	Class_ListBinding     = "goui.model.ListBinding"
)
View Source
const (
	Event_parseError         = "parseError"
	Event_propertyChange     = "propertyChange"
	Event_requestCompleted   = "requestCompleted"
	Event_requestFailed      = "requestFailed"
	Event_requestSend        = "requestSend"
	Event_changeEvent        = "change"
	Event_dataReceivedEvent  = "dataReceived"
	Event_dataRequestedEvent = "dataRequested"
	Event_filterEvent        = "filter"
	Event_sortEvent          = "sort"
)

Variables

View Source
var (
	MD_Model           base.EventProviderMetadata
	MD_StructModel     base.EventProviderMetadata
	MD_Binding         base.EventProviderMetadata
	MD_PropertyBinding base.EventProviderMetadata
	MD_ContextBinding  base.EventProviderMetadata
	MD_ListBinding     base.EventProviderMetadata
)
View Source
var (
	Event_parseError_       = EventSettingFactor(base.EventDef{Name: "parseError"})
	Event_propertyChange_   = EventSettingFactor(base.EventDef{Name: "propertyChange"})
	Event_requestCompleted_ = EventSettingFactor(base.EventDef{Name: "requestCompleted"})
	Event_requestFailed_    = EventSettingFactor(base.EventDef{Name: "requestFailed"})
	Event_requestSend_      = EventSettingFactor(base.EventDef{Name: "requestSend"})
	// Event for Binding
	Event_changeEvent_ = EventSettingFactor(base.EventDef{Name: "change"})
	// Event for Binding
	Event_dataReceivedEvent_ = EventSettingFactor(base.EventDef{Name: "dataReceived"})
	// Event for Binding
	Event_dataRequestedEvent_ = EventSettingFactor(base.EventDef{Name: "dataRequested"})
	// Event for ListBinding
	Event_filterEvent_ = EventSettingFactor(base.EventDef{Name: "filter"})
	Event_sortEvent_   = EventSettingFactor(base.EventDef{Name: "sort"})
)

Functions

func NewBinding

func NewBinding(ctx com.Context) com.Binding

func NewContext

func NewContext(m Model, s string) com.Context

func NewContextBinding

func NewContextBinding(ctx com.Context) com.ContextBinding

func NewListBinding

func NewListBinding(ctx com.Context) com.ListBinding

func NewPropertyBinding

func NewPropertyBinding(ctx com.Context) com.PropertyBinding

Types

type EventSettingFactor

type EventSettingFactor base.EventDef

func (EventSettingFactor) AsSet

type ISContext

type ISContext struct {
	com.Context
}

func (ISContext) IType

func (x ISContext) IType() base.SettingType

type Model

type Model interface {
	message.MessageProcessor
	SetObject(v interface{})
	GetObject() interface{}
	AttachParseError(data com.EventData, fn com.EventHandler)
	AttachParseErrorOnce(data com.EventData, fn com.EventHandler)
	FireParseError(param com.EventParam)
	DetachParseError(fn com.EventHandler)
	HasParseError() bool
	AttachPropertyChange(data com.EventData, fn com.EventHandler)
	AttachPropertyChangeOnce(data com.EventData, fn com.EventHandler)
	FirePropertyChange(param com.EventParam)
	DetachPropertyChange(fn com.EventHandler)
	HasPropertyChange() bool
	AttachRequestCompleted(data com.EventData, fn com.EventHandler)
	AttachRequestCompletedOnce(data com.EventData, fn com.EventHandler)
	FireRequestCompleted(param com.EventParam)
	DetachRequestCompleted(fn com.EventHandler)
	HasRequestCompleted() bool
	AttachRequestSend(data com.EventData, fn com.EventHandler)
	AttachRequestSendOnce(data com.EventData, fn com.EventHandler)
	FireRequestSend(param com.EventParam)
	DetachRequestSend(fn com.EventHandler)
	HasRequestSend() bool
	AttachRequestFailed(data com.EventData, fn com.EventHandler)
	AttachRequestFailedOnce(data com.EventData, fn com.EventHandler)
	FireRequestFailed(param com.EventParam)
	DetachRequestFailed(fn com.EventHandler)
	HasRequestFailed() bool
	BindProperty(p string) com.PropertyBinding
	BindContext(p string) com.ContextBinding
	BindList(p string) com.ListBinding
}

type Path

type Path []path

func NewPath

func NewPath(p string) Path

func (Path) Append

func (p Path) Append(a Path) Path

func (Path) IsAbsolut

func (p Path) IsAbsolut() bool

func (Path) Len

func (p Path) Len() uint8

func (Path) Name

func (p Path) Name(i uint8) string

func (Path) Offset

func (p Path) Offset(i uint8) int

func (Path) String

func (p Path) String() string

type StructModel

type StructModel interface {
	Model
}

func NewStructModel

func NewStructModel(v interface{}) StructModel

type Value

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

func (Value) ArraySize

func (v Value) ArraySize() int

func (Value) Interface

func (v Value) Interface() interface{}

func (Value) IsValid

func (v Value) IsValid() bool

func (Value) Set

func (v Value) Set(s interface{})

func (Value) String

func (v Value) String() string

Jump to

Keyboard shortcuts

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