controller

package
v0.0.0-...-311b70d Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2018 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateChanneledEvent

func CreateChanneledEvent(signature interface{}, channel chan func()) framework.Event

func CreateEvent

func CreateEvent(signature interface{}) framework.Event

Types

type Attachable

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

func (*Attachable) Attach

func (a *Attachable) Attach()

func (*Attachable) Attached

func (a *Attachable) Attached() bool

func (*Attachable) Detach

func (a *Attachable) Detach()

func (*Attachable) Init

func (a *Attachable) Init(outer AttachableOuter)

func (*Attachable) OnAttach

func (a *Attachable) OnAttach(f func()) framework.EventSubscription

func (*Attachable) OnDetach

func (a *Attachable) OnDetach(f func()) framework.EventSubscription

type AttachableOuter

type AttachableOuter interface {
	outer.Relayouter
}

type ChanneledEvent

type ChanneledEvent struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*ChanneledEvent) Fire

func (e *ChanneledEvent) Fire(args ...interface{})

func (*ChanneledEvent) Listen

func (e *ChanneledEvent) Listen(listener interface{}) framework.EventSubscription

func (*ChanneledEvent) ParameterTypes

func (e *ChanneledEvent) ParameterTypes() []reflect.Type

type Container

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

func (*Container) AddChild

func (c *Container) AddChild(child framework.Control) *framework.Child

framework.Container compliance

func (*Container) AddChildAt

func (c *Container) AddChildAt(index int, control framework.Control) *framework.Child

index 是child的位置,control是要加入的子组件

func (*Container) Children

func (c *Container) Children() framework.Children

framework.Parent compliance

func (*Container) ContainsPoint

func (c *Container) ContainsPoint(p math.Point) bool

func (*Container) Init

func (c *Container) Init(outer ContainerOuter, theme framework.Theme)

func (*Container) IsMouseEventTarget

func (c *Container) IsMouseEventTarget() bool

func (*Container) RelayoutSuspended

func (c *Container) RelayoutSuspended() bool

RelayoutSuspended returns true if adding or removing a child Control to this Container will not trigger a relayout of this Container. The default is false where any mutation will trigger a relayout.

func (*Container) RemoveAll

func (c *Container) RemoveAll()

func (*Container) RemoveChild

func (c *Container) RemoveChild(control framework.Control)

func (*Container) RemoveChildAt

func (c *Container) RemoveChildAt(index int)

func (*Container) SetMouseEventTarget

func (c *Container) SetMouseEventTarget(mouseEventTarget bool)

func (*Container) SetRelayoutSuspended

func (c *Container) SetRelayoutSuspended(enable bool)

SetRelayoutSuspended enables or disables relayout of the Container on adding or removing a child Control to this Container.

type ContainerControlableOuter

type ContainerControlableOuter interface {
	framework.Control
	ContainerNoControlOuter
}

type Control

func (*Control) ContainsPoint

func (c *Control) ContainsPoint(p math.Point) bool

func (*Control) DesiredSize

func (c *Control) DesiredSize(min, max math.Size) math.Size

func (*Control) Init

func (c *Control) Init(outer ControlOuter, theme framework.Theme)

type ControlOuter

type ControlOuter interface {
	framework.Control
	outer.Painter
	outer.Redrawer
	outer.Relayouter
}

type DrawPaint

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

func (*DrawPaint) Draw

func (d *DrawPaint) Draw() framework.Canvas

func (*DrawPaint) Init

func (d *DrawPaint) Init(outer DrawPaintOuter, theme framework.Theme)

func (*DrawPaint) Redraw

func (d *DrawPaint) Redraw()

type DrawPaintOuter

type DrawPaintOuter interface {
	outer.Attachable
	outer.Painter
	outer.Parenter
	outer.Sized
}

type EventBase

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

func (*EventBase) Fire

func (e *EventBase) Fire(args ...interface{})

func (*EventBase) InvokeListeners

func (e *EventBase) InvokeListeners(args []interface{})

func (*EventBase) Listen

func (e *EventBase) Listen(listener interface{}) framework.EventSubscription

Event compliance

func (*EventBase) ParameterTypes

func (e *EventBase) ParameterTypes() []reflect.Type

func (*EventBase) String

func (e *EventBase) String() string

func (*EventBase) VerifyArguments

func (e *EventBase) VerifyArguments(args []interface{})

func (*EventBase) VerifySignature

func (e *EventBase) VerifySignature(argTys []reflect.Type, isVariadic bool)

type EventListener

type EventListener struct {
	Id       int
	Function reflect.Value
}

type FocusController

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

func CreateFocusController

func CreateFocusController(window framework.Window) *FocusController

func (*FocusController) Focus

func (c *FocusController) Focus() framework.Focusable

func (*FocusController) FocusNext

func (c *FocusController) FocusNext()

func (*FocusController) FocusPrev

func (c *FocusController) FocusPrev()

func (*FocusController) Focusable

func (*FocusController) NextChildFocusable

func (c *FocusController) NextChildFocusable(p framework.Parent, after framework.Control, forwards bool) framework.Focusable

func (*FocusController) NextFocusable

func (c *FocusController) NextFocusable(after framework.Control, forwards bool) framework.Focusable

func (*FocusController) SetFocus

func (c *FocusController) SetFocus(f framework.Focusable)

func (*FocusController) SetFocusCount

func (c *FocusController) SetFocusCount() int

type Focusable

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

func (*Focusable) GainedFocus

func (f *Focusable) GainedFocus()

func (*Focusable) HasFocus

func (f *Focusable) HasFocus() bool

func (*Focusable) Init

func (f *Focusable) Init(outer FocusableOuter)

func (*Focusable) IsFocusable

func (f *Focusable) IsFocusable() bool

framework.Control compliance

func (*Focusable) LostFocus

func (f *Focusable) LostFocus()

func (*Focusable) OnGainedFocus

func (f *Focusable) OnGainedFocus(l func()) framework.EventSubscription

func (*Focusable) OnLostFocus

func (f *Focusable) OnLostFocus(l func()) framework.EventSubscription

func (*Focusable) SetFocusable

func (f *Focusable) SetFocusable(bool)

type FocusableOuter

type FocusableOuter interface{}

type InputEventHandler

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

func (*InputEventHandler) Click

func (m *InputEventHandler) Click(ev framework.MouseEvent) (consume bool)

func (*InputEventHandler) DoubleClick

func (m *InputEventHandler) DoubleClick(ev framework.MouseEvent) (consume bool)

func (*InputEventHandler) Init

func (*InputEventHandler) IsMouseDown

func (m *InputEventHandler) IsMouseDown(button framework.MouseButton) bool

func (*InputEventHandler) IsMouseOver

func (m *InputEventHandler) IsMouseOver() bool

func (*InputEventHandler) KeyDown

func (m *InputEventHandler) KeyDown(ev framework.KeyboardEvent)

func (*InputEventHandler) KeyPress

func (m *InputEventHandler) KeyPress(ev framework.KeyboardEvent) (consume bool)

func (*InputEventHandler) KeyRepeat

func (m *InputEventHandler) KeyRepeat(ev framework.KeyboardEvent)

func (*InputEventHandler) KeyStroke

func (m *InputEventHandler) KeyStroke(ev framework.KeyStrokeEvent) (consume bool)

func (*InputEventHandler) KeyUp

func (*InputEventHandler) MouseDown

func (m *InputEventHandler) MouseDown(ev framework.MouseEvent)

func (*InputEventHandler) MouseEnter

func (m *InputEventHandler) MouseEnter(ev framework.MouseEvent)

func (*InputEventHandler) MouseExit

func (m *InputEventHandler) MouseExit(ev framework.MouseEvent)

func (*InputEventHandler) MouseMove

func (m *InputEventHandler) MouseMove(ev framework.MouseEvent)

func (*InputEventHandler) MouseScroll

func (m *InputEventHandler) MouseScroll(ev framework.MouseEvent) (consume bool)

func (*InputEventHandler) MouseUp

func (m *InputEventHandler) MouseUp(ev framework.MouseEvent)

func (*InputEventHandler) OnClick

func (*InputEventHandler) OnDoubleClick

func (*InputEventHandler) OnKeyDown

func (*InputEventHandler) OnKeyPress

func (*InputEventHandler) OnKeyRepeat

func (*InputEventHandler) OnKeyStroke

func (*InputEventHandler) OnKeyUp

func (*InputEventHandler) OnMouseDown

func (*InputEventHandler) OnMouseEnter

func (*InputEventHandler) OnMouseExit

func (*InputEventHandler) OnMouseMove

func (*InputEventHandler) OnMouseScroll

func (*InputEventHandler) OnMouseUp

type InputEventHandlerOuter

type InputEventHandlerOuter interface{}

type Layoutable

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

func (*Layoutable) Init

func (l *Layoutable) Init(outer LayoutableOuter, theme framework.Theme)

func (*Layoutable) Margin

func (l *Layoutable) Margin() math.Spacing

func (*Layoutable) Relayout

func (l *Layoutable) Relayout()

func (*Layoutable) SetMargin

func (l *Layoutable) SetMargin(m math.Spacing)

func (*Layoutable) SetSize

func (l *Layoutable) SetSize(size math.Size)

func (*Layoutable) Size

func (l *Layoutable) Size() math.Size

type LayoutableOuter

type LayoutableOuter interface {
	outer.Parenter
	outer.Redrawer
}

type Paddable

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

func (*Paddable) Init

func (p *Paddable) Init(outer PaddableOuter)

func (*Paddable) Padding

func (p *Paddable) Padding() math.Spacing

func (*Paddable) SetPadding

func (p *Paddable) SetPadding(m math.Spacing)

type PaddableOuter

type PaddableOuter interface {
	outer.LayoutChildren
	outer.Redrawer
}

type PaintChildren

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

func (*PaintChildren) Init

func (p *PaintChildren) Init(outer PaintChildrenOuter)

func (*PaintChildren) Paint

func (p *PaintChildren) Paint(c framework.Canvas)

func (*PaintChildren) PaintChild

func (p *PaintChildren) PaintChild(c framework.Canvas, child *framework.Child, idx int)

type PaintChildrenOuter

type PaintChildrenOuter interface {
	framework.Container
	outer.PaintChilder
	outer.Sized
}

type Parentable

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

func (*Parentable) Init

func (p *Parentable) Init(outer ParentableOuter)

func (*Parentable) Parent

func (p *Parentable) Parent() framework.Parent

func (*Parentable) SetParent

func (p *Parentable) SetParent(parent framework.Parent)

type ParentableOuter

type ParentableOuter interface{}

type Visible

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

func (*Visible) Init

func (v *Visible) Init(outer VisibleOuter)

func (*Visible) IsVisible

func (v *Visible) IsVisible() bool

func (*Visible) SetVisible

func (v *Visible) SetVisible(visible bool)

type VisibleOuter

type VisibleOuter interface {
	outer.Redrawer
	outer.Parenter
}

Jump to

Keyboard shortcuts

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