textfield

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 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 UISecretTextField

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

UISecretTextField 密码输入框组件 (UIKit 风格封装)

func NewUISecretTextField

func NewUISecretTextField(x, y, width, height int, placeholder string) *UISecretTextField

NewUISecretTextField 创建一个新的密码输入框

func (*UISecretTextField) IsEnabled

func (tf *UISecretTextField) IsEnabled() bool

IsEnabled 获取是否可用

func (*UISecretTextField) OnChange

func (tf *UISecretTextField) OnChange(callback func())

OnChange 设置文本内容变化时的回调函数

func (*UISecretTextField) Placeholder

func (tf *UISecretTextField) Placeholder() string

Placeholder 获取占位符文本

func (*UISecretTextField) Raw

Raw 返回底层的 FLTK 组件

func (*UISecretTextField) SetBackgroundColor

func (tf *UISecretTextField) SetBackgroundColor(color uint)

SetBackgroundColor 设置背景颜色

func (*UISecretTextField) SetBorderStyle

func (tf *UISecretTextField) SetBorderStyle(box fltk_bridge.BoxType)

SetBorderStyle 模拟 iOS 设置边框样式

func (*UISecretTextField) SetCornerRadius

func (tf *UISecretTextField) SetCornerRadius()

SetCornerRadius 模拟 iOS 设置圆角 (通过 FLTK 盒模型模拟)

func (*UISecretTextField) SetEnabled

func (tf *UISecretTextField) SetEnabled(enabled bool)

SetEnabled 设置是否可用

func (*UISecretTextField) SetFont

func (tf *UISecretTextField) SetFont(font fltk_bridge.Font)

SetFont 设置字体

func (*UISecretTextField) SetFontSize

func (tf *UISecretTextField) SetFontSize(size int)

SetFontSize 设置字体大小

func (*UISecretTextField) SetPlaceholder

func (tf *UISecretTextField) SetPlaceholder(placeholder string)

SetPlaceholder 设置占位符文本

func (*UISecretTextField) SetText

func (tf *UISecretTextField) SetText(text string)

SetText 设置输入框内容

func (*UISecretTextField) SetTextColor

func (tf *UISecretTextField) SetTextColor(color uint)

SetTextColor 设置文本颜色

func (*UISecretTextField) Text

func (tf *UISecretTextField) Text() string

Text 获取输入框内容

func (*UISecretTextField) View

func (tf *UISecretTextField) View() *view.UIView

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

type UITextField

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

UITextField 普通输入框组件 (UIKit 风格封装)

func NewUITextField

func NewUITextField(x, y, width, height int, placeholder string) *UITextField

NewUITextField 创建一个新的普通输入框

func (*UITextField) IsEnabled

func (tf *UITextField) IsEnabled() bool

IsEnabled 获取是否可用

func (*UITextField) OnChange

func (tf *UITextField) OnChange(callback func())

OnChange 设置文本内容变化时的回调函数

func (*UITextField) Placeholder

func (tf *UITextField) Placeholder() string

Placeholder 获取占位符文本

func (*UITextField) Raw

func (tf *UITextField) Raw() fltk_bridge.Widget

Raw 返回底层的 FLTK 组件

func (*UITextField) SetBackgroundColor

func (tf *UITextField) SetBackgroundColor(color uint)

SetBackgroundColor 设置背景颜色

func (*UITextField) SetBorderStyle

func (tf *UITextField) SetBorderStyle(box fltk_bridge.BoxType)

SetBorderStyle 模拟 iOS 设置边框样式

func (*UITextField) SetCornerRadius

func (tf *UITextField) SetCornerRadius()

SetCornerRadius 模拟 iOS 设置圆角 (通过 FLTK 盒模型模拟)

func (*UITextField) SetEnabled

func (tf *UITextField) SetEnabled(enabled bool)

SetEnabled 设置是否可用

func (*UITextField) SetFont

func (tf *UITextField) SetFont(font fltk_bridge.Font)

SetFont 设置字体

func (*UITextField) SetFontSize

func (tf *UITextField) SetFontSize(size int)

SetFontSize 设置字体大小

func (*UITextField) SetPlaceholder

func (tf *UITextField) SetPlaceholder(placeholder string)

SetPlaceholder 设置占位符文本

func (*UITextField) SetText

func (tf *UITextField) SetText(text string)

SetText 设置输入框内容

func (*UITextField) SetTextColor

func (tf *UITextField) SetTextColor(color uint)

SetTextColor 设置文本颜色

func (*UITextField) Text

func (tf *UITextField) Text() string

Text 获取输入框内容

func (*UITextField) View

func (tf *UITextField) View() *view.UIView

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

Jump to

Keyboard shortcuts

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