input

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Input

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

Input 输入框组件

func New

func New(x, y, width, height int, placeholder string) *Input

New 创建一个新的输入框

func NewWithType

func NewWithType(x, y, width, height int, placeholder string, inputType InputType) *Input

NewWithType 创建一个指定类型的输入框

func (*Input) IsEnabled

func (in *Input) IsEnabled() bool

IsEnabled 获取是否可用

func (*Input) OnChange

func (in *Input) OnChange(callback func())

OnChange 设置文本变化回调

func (*Input) Placeholder

func (in *Input) Placeholder() string

Placeholder 获取占位文本

func (*Input) Raw

func (in *Input) Raw() fltk_bridge.Widget

Raw 返回底层FLTK输入框

func (*Input) SetBackgroundColor

func (in *Input) SetBackgroundColor(color uint)

SetBackgroundColor 设置背景颜色

func (*Input) SetEnabled

func (in *Input) SetEnabled(enabled bool)

SetEnabled 设置是否可用

func (*Input) SetFont

func (in *Input) SetFont(font fltk_bridge.Font)

SetFont 设置字体

func (*Input) SetFontSize

func (in *Input) SetFontSize(size int)

SetFontSize 设置字体大小

func (*Input) SetPlaceholder

func (in *Input) SetPlaceholder(placeholder string)

SetPlaceholder 设置占位文本

func (*Input) SetText

func (in *Input) SetText(text string)

SetText 设置输入框文本

func (*Input) SetTextColor

func (in *Input) SetTextColor(color uint)

SetTextColor 设置文本颜色

func (*Input) Text

func (in *Input) Text() string

Text 获取输入框文本

func (*Input) View

func (in *Input) View() *view.UIView

View 返回基础视图,实现view.Viewable接口

type InputType

type InputType int

InputType 输入框类型

const (
	// TextInput 文本输入框
	TextInput InputType = iota
	// IntInput 整数输入框
	IntInput
	// FloatInput 浮点数输入框
	FloatInput
	// SecretInput 密码输入框
	SecretInput
)

Jump to

Keyboard shortcuts

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