Documentation ¶
Index ¶
- func CreateChanneledEvent(signature interface{}, channel chan func()) framework.Event
- func CreateEvent(signature interface{}) framework.Event
- type Attachable
- type AttachableOuter
- type ChanneledEvent
- type Container
- func (c *Container) AddChild(child framework.Control) *framework.Child
- func (c *Container) AddChildAt(index int, control framework.Control) *framework.Child
- func (c *Container) Children() framework.Children
- func (c *Container) ContainsPoint(p math.Point) bool
- func (c *Container) Init(outer ContainerOuter, theme framework.Theme)
- func (c *Container) IsMouseEventTarget() bool
- func (c *Container) RelayoutSuspended() bool
- func (c *Container) RemoveAll()
- func (c *Container) RemoveChild(control framework.Control)
- func (c *Container) RemoveChildAt(index int)
- func (c *Container) SetMouseEventTarget(mouseEventTarget bool)
- func (c *Container) SetRelayoutSuspended(enable bool)
- type ContainerControlable
- type ContainerControlableOuter
- type ContainerNoControlOuter
- type ContainerOuter
- type Control
- type ControlOuter
- type DrawPaint
- type DrawPaintOuter
- type EventBase
- func (e *EventBase) Fire(args ...interface{})
- func (e *EventBase) InvokeListeners(args []interface{})
- func (e *EventBase) Listen(listener interface{}) framework.EventSubscription
- func (e *EventBase) ParameterTypes() []reflect.Type
- func (e *EventBase) String() string
- func (e *EventBase) VerifyArguments(args []interface{})
- func (e *EventBase) VerifySignature(argTys []reflect.Type, isVariadic bool)
- type EventListener
- type FocusController
- func (c *FocusController) Focus() framework.Focusable
- func (c *FocusController) FocusNext()
- func (c *FocusController) FocusPrev()
- func (c *FocusController) Focusable(ctrl framework.Control) framework.Focusable
- func (c *FocusController) NextChildFocusable(p framework.Parent, after framework.Control, forwards bool) framework.Focusable
- func (c *FocusController) NextFocusable(after framework.Control, forwards bool) framework.Focusable
- func (c *FocusController) SetFocus(f framework.Focusable)
- func (c *FocusController) SetFocusCount() int
- type Focusable
- func (f *Focusable) GainedFocus()
- func (f *Focusable) HasFocus() bool
- func (f *Focusable) Init(outer FocusableOuter)
- func (f *Focusable) IsFocusable() bool
- func (f *Focusable) LostFocus()
- func (f *Focusable) OnGainedFocus(l func()) framework.EventSubscription
- func (f *Focusable) OnLostFocus(l func()) framework.EventSubscription
- func (f *Focusable) SetFocusable(bool)
- type FocusableOuter
- type InputEventHandler
- func (m *InputEventHandler) Click(ev framework.MouseEvent) (consume bool)
- func (m *InputEventHandler) DoubleClick(ev framework.MouseEvent) (consume bool)
- func (m *InputEventHandler) Init(outer InputEventHandlerOuter)
- func (m *InputEventHandler) IsMouseDown(button framework.MouseButton) bool
- func (m *InputEventHandler) IsMouseOver() bool
- func (m *InputEventHandler) KeyDown(ev framework.KeyboardEvent)
- func (m *InputEventHandler) KeyPress(ev framework.KeyboardEvent) (consume bool)
- func (m *InputEventHandler) KeyRepeat(ev framework.KeyboardEvent)
- func (m *InputEventHandler) KeyStroke(ev framework.KeyStrokeEvent) (consume bool)
- func (m *InputEventHandler) KeyUp(ev framework.KeyboardEvent)
- func (m *InputEventHandler) MouseDown(ev framework.MouseEvent)
- func (m *InputEventHandler) MouseEnter(ev framework.MouseEvent)
- func (m *InputEventHandler) MouseExit(ev framework.MouseEvent)
- func (m *InputEventHandler) MouseMove(ev framework.MouseEvent)
- func (m *InputEventHandler) MouseScroll(ev framework.MouseEvent) (consume bool)
- func (m *InputEventHandler) MouseUp(ev framework.MouseEvent)
- func (m *InputEventHandler) OnClick(f func(framework.MouseEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnDoubleClick(f func(framework.MouseEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnKeyDown(f func(framework.KeyboardEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnKeyPress(f func(framework.KeyboardEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnKeyRepeat(f func(framework.KeyboardEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnKeyStroke(f func(framework.KeyStrokeEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnKeyUp(f func(framework.KeyboardEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnMouseDown(f func(framework.MouseEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnMouseEnter(f func(framework.MouseEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnMouseExit(f func(framework.MouseEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnMouseMove(f func(framework.MouseEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnMouseScroll(f func(framework.MouseEvent)) framework.EventSubscription
- func (m *InputEventHandler) OnMouseUp(f func(framework.MouseEvent)) framework.EventSubscription
- type InputEventHandlerOuter
- type Layoutable
- type LayoutableOuter
- type Paddable
- type PaddableOuter
- type PaintChildren
- type PaintChildrenOuter
- type Parentable
- type ParentableOuter
- type Visible
- type VisibleOuter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateChanneledEvent ¶
func CreateEvent ¶
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 ¶
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) AddChildAt ¶
index 是child的位置,control是要加入的子组件
func (*Container) IsMouseEventTarget ¶
func (*Container) RelayoutSuspended ¶
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) RemoveChild ¶
func (*Container) RemoveChildAt ¶
func (*Container) SetMouseEventTarget ¶
func (*Container) SetRelayoutSuspended ¶
SetRelayoutSuspended enables or disables relayout of the Container on adding or removing a child Control to this Container.
type ContainerControlable ¶
type ContainerControlable struct { Attachable Container DrawPaint InputEventHandler Layoutable Paddable PaintChildren Visible Parentable }
func (*ContainerControlable) Init ¶
func (c *ContainerControlable) Init(outer ContainerControlableOuter, theme framework.Theme)
type ContainerControlableOuter ¶
type ContainerControlableOuter interface { framework.Control ContainerNoControlOuter }
type ContainerNoControlOuter ¶
type ContainerNoControlOuter interface { framework.Container outer.PaintChilder outer.Painter outer.LayoutChildren }
type ContainerOuter ¶
type ContainerOuter interface { outer.Attachable outer.IsVisibler outer.LayoutChildren outer.Parenter outer.Sized framework.Container }
type Control ¶
type Control struct { Attachable DrawPaint InputEventHandler Layoutable Parentable Visible }
type ControlOuter ¶
type DrawPaintOuter ¶
type EventBase ¶
type EventBase struct {
// contains filtered or unexported fields
}
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 (*EventBase) VerifyArguments ¶
func (e *EventBase) VerifyArguments(args []interface{})
type EventListener ¶
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 (c *FocusController) Focusable(ctrl framework.Control) framework.Focusable
func (*FocusController) NextChildFocusable ¶
func (*FocusController) NextFocusable ¶
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) Init ¶
func (f *Focusable) Init(outer FocusableOuter)
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 ¶
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 (m *InputEventHandler) Init(outer InputEventHandlerOuter)
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 (m *InputEventHandler) KeyUp(ev framework.KeyboardEvent)
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 (m *InputEventHandler) OnClick(f func(framework.MouseEvent)) framework.EventSubscription
func (*InputEventHandler) OnDoubleClick ¶
func (m *InputEventHandler) OnDoubleClick(f func(framework.MouseEvent)) framework.EventSubscription
func (*InputEventHandler) OnKeyDown ¶
func (m *InputEventHandler) OnKeyDown(f func(framework.KeyboardEvent)) framework.EventSubscription
func (*InputEventHandler) OnKeyPress ¶
func (m *InputEventHandler) OnKeyPress(f func(framework.KeyboardEvent)) framework.EventSubscription
func (*InputEventHandler) OnKeyRepeat ¶
func (m *InputEventHandler) OnKeyRepeat(f func(framework.KeyboardEvent)) framework.EventSubscription
func (*InputEventHandler) OnKeyStroke ¶
func (m *InputEventHandler) OnKeyStroke(f func(framework.KeyStrokeEvent)) framework.EventSubscription
func (*InputEventHandler) OnKeyUp ¶
func (m *InputEventHandler) OnKeyUp(f func(framework.KeyboardEvent)) framework.EventSubscription
func (*InputEventHandler) OnMouseDown ¶
func (m *InputEventHandler) OnMouseDown(f func(framework.MouseEvent)) framework.EventSubscription
func (*InputEventHandler) OnMouseEnter ¶
func (m *InputEventHandler) OnMouseEnter(f func(framework.MouseEvent)) framework.EventSubscription
func (*InputEventHandler) OnMouseExit ¶
func (m *InputEventHandler) OnMouseExit(f func(framework.MouseEvent)) framework.EventSubscription
func (*InputEventHandler) OnMouseMove ¶
func (m *InputEventHandler) OnMouseMove(f func(framework.MouseEvent)) framework.EventSubscription
func (*InputEventHandler) OnMouseScroll ¶
func (m *InputEventHandler) OnMouseScroll(f func(framework.MouseEvent)) framework.EventSubscription
func (*InputEventHandler) OnMouseUp ¶
func (m *InputEventHandler) OnMouseUp(f func(framework.MouseEvent)) framework.EventSubscription
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 Paddable ¶
type Paddable struct {
// contains filtered or unexported fields
}
func (*Paddable) Init ¶
func (p *Paddable) Init(outer PaddableOuter)
func (*Paddable) SetPadding ¶
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 ¶
type PaintChildrenOuter ¶
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) SetVisible ¶
Click to show internal directories.
Click to hide internal directories.