Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CallBack ¶
type CallBack struct {
IParameters
// contains filtered or unexported fields
}
func NewCallBack ¶
func NewCallBack(onFunction OnFunction, arg ...any) *CallBack
type Event ¶
type Event struct {
ISwitch ISwitchButton
ICallBack ICallBack
}
type ICallBack ¶
type ICallBack interface {
Execute() error // 执行回调
IParameters // 参数
Clone(arg ...any) ICallBack // 克隆
}
type IParameters ¶
type IParameters interface {
Override(args ...any) // 覆盖参数
Get() []any // 获取参数 [全部]
Append(args ...any) // 追加参数
}
IParameters 参数
type ISwitchButton ¶
ISwitchButton 两种状态:开启、关闭
type OnFunction ¶
type Parameters ¶
type Parameters struct {
// contains filtered or unexported fields
}
func NewParameters ¶
func NewParameters() *Parameters
func (*Parameters) Append ¶
func (p *Parameters) Append(args ...any)
func (*Parameters) Get ¶
func (p *Parameters) Get() []any
func (*Parameters) Override ¶
func (p *Parameters) Override(args ...any)
type SwitchButton ¶
type SwitchButton struct {
// contains filtered or unexported fields
}
func NewSwitchButton ¶
func NewSwitchButton(state bool) *SwitchButton
func (*SwitchButton) IsOff ¶
func (p *SwitchButton) IsOff() bool
func (*SwitchButton) IsOn ¶
func (p *SwitchButton) IsOn() bool
func (*SwitchButton) Off ¶
func (p *SwitchButton) Off()
func (*SwitchButton) On ¶
func (p *SwitchButton) On()
Click to show internal directories.
Click to hide internal directories.