Documentation
¶
Index ¶
- Constants
- Variables
- func ChangeImageDetails(file_path string, fs fs.FS, details any) (ok bool)
- type Button
- type Icon
- func (icon_ref *Icon) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (icon_ref *Icon) Clickable() bool
- func (icon_ref *Icon) CursorShape(context *guigui.Context, widgetBounds *guigui.WidgetBounds) (ebiten.CursorShapeType, bool)
- func (icon_ref *Icon) HandlePointingInput(context *guigui.Context, widgetBounds *guigui.WidgetBounds) guigui.HandleInputResult
- func (icon_ref *Icon) HasIcon() bool
- func (icon_ref *Icon) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (icon_ref *Icon) Load(icon string, fs fs.FS, size image.Point) error
- func (icon_ref *Icon) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (icon_ref *Icon) OnClick(fn func(context *guigui.Context, icon_ref *Icon))
- func (icon_ref *Icon) SetClickable(clickable bool)
- type ImageDetails
- type InfiniteLoadingBar
- func (d *InfiniteLoadingBar) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (d *InfiniteLoadingBar) Draw(context *guigui.Context, widgetBounds *guigui.WidgetBounds, dst *ebiten.Image)
- func (d *InfiniteLoadingBar) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (d *InfiniteLoadingBar) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (d *InfiniteLoadingBar) Tick(context *guigui.Context, widgetBounds *guigui.WidgetBounds) error
- type InfoHint
- func (infohint *InfoHint) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (infohint *InfoHint) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (infohint *InfoHint) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (infohint *InfoHint) SetText(text string)
- type LabeledToggle
- func (d *LabeledToggle) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (d *LabeledToggle) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (d *LabeledToggle) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (d *LabeledToggle) SetLabel(label string)
- func (d *LabeledToggle) Toggle() *basicwidget.Toggle
- type LazyWidget
- type Link
- func (d *Link) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (d *Link) HandlePointingInput(context *guigui.Context, widgetBounds *guigui.WidgetBounds) guigui.HandleInputResult
- func (d *Link) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (d *Link) SetBaseStyle(style *basicwidget.TextStyle)
- func (d *Link) SetURL(u *url.URL) error
- func (d *Link) SetURL_Str(u string)
- type SkeletonLoader
- func (d *SkeletonLoader[T]) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (d *SkeletonLoader[T]) Draw(context *guigui.Context, widgetBounds *guigui.WidgetBounds, dst *ebiten.Image)
- func (d *SkeletonLoader[T]) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (d *SkeletonLoader[T]) Loading() bool
- func (d *SkeletonLoader[T]) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (d *SkeletonLoader[T]) SetLoading(loading bool)
- func (d *SkeletonLoader[T]) Tick(context *guigui.Context, widgetBounds *guigui.WidgetBounds) error
- func (d *SkeletonLoader[T]) Widget() T
- type TabContainer
- func (d *TabContainer[T]) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (d *TabContainer[T]) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (d *TabContainer[T]) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (d *TabContainer[T]) OnTabClose(fn func(context *guigui.Context, index int, data TabItem[T]))
- func (d *TabContainer[T]) OnTabSelect(fn func(context *guigui.Context, index int, data TabItem[T]))
- func (d *TabContainer[T]) OnTabSwitch(...)
- func (d *TabContainer[T]) SelectTabItem(index int)
- func (d *TabContainer[T]) SelectedTabItem() (index int, ok bool)
- func (d *TabContainer[T]) SetTabItems(items []TabItem[T])
- func (d *TabContainer[T]) SetUnselectedWidget(widget guigui.Widget)
- func (d *TabContainer[T]) TabItemsLenght() int
- func (d *TabContainer[T]) UnselectedWidget() guigui.Widget
- type TabIcon
- type TabItem
- type Text
- type TextContent
- type TextInput
- func (d *TextInput) Build(context *guigui.Context, adder *guigui.ChildAdder) error
- func (d *TextInput) Disable(item context_menu_item) bool
- func (d *TextInput) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, ...)
- func (d *TextInput) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
- func (d *TextInput) OnAdditionalItemSelected(fn func(context *guigui.Context, index int))
- func (d *TextInput) SetAditionalItems(addition_items []basicwidget.PopupMenuItem[int])
- func (d *TextInput) SetDisable(item context_menu_item, disable bool)
- func (d *TextInput) SetTextContent(textcontent TextContent)
- func (d *TextInput) TextContent() TextContent
- func (d *TextInput) TextInput() *basicwidget.TextInput
Constants ¶
View Source
const ( ContextMenuItemCopy context_menu_item = iota + 0 ContextMenuItemPaste ContextMenuItemCut ContextMenuItemSelectAll ContextMenuItemUndo ContextMenuItemRedo DefualtContextMenuItemEnd )
Variables ¶
View Source
var (
DefualtURL_Style basicwidget.TextStyle = basicwidget.TextStyle{}
)
Functions ¶
Types ¶
type Button ¶
type Button struct {
basicwidget.Button
// contains filtered or unexported fields
}
func (*Button) Layout ¶
func (d *Button) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*Button) SetTooltip ¶
type Icon ¶
type Icon struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
TODO: Add an transparency option for icon TODO: Add a cache for icons.
func (*Icon) CursorShape ¶
func (icon_ref *Icon) CursorShape(context *guigui.Context, widgetBounds *guigui.WidgetBounds) (ebiten.CursorShapeType, bool)
func (*Icon) HandlePointingInput ¶
func (icon_ref *Icon) HandlePointingInput(context *guigui.Context, widgetBounds *guigui.WidgetBounds) guigui.HandleInputResult
func (*Icon) Layout ¶
func (icon_ref *Icon) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*Icon) SetClickable ¶
type ImageDetails ¶
type InfiniteLoadingBar ¶
type InfiniteLoadingBar struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*InfiniteLoadingBar) Build ¶
func (d *InfiniteLoadingBar) Build(context *guigui.Context, adder *guigui.ChildAdder) error
func (*InfiniteLoadingBar) Draw ¶
func (d *InfiniteLoadingBar) Draw(context *guigui.Context, widgetBounds *guigui.WidgetBounds, dst *ebiten.Image)
func (*InfiniteLoadingBar) Layout ¶
func (d *InfiniteLoadingBar) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*InfiniteLoadingBar) Measure ¶
func (d *InfiniteLoadingBar) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
func (*InfiniteLoadingBar) Tick ¶
func (d *InfiniteLoadingBar) Tick(context *guigui.Context, widgetBounds *guigui.WidgetBounds) error
type InfoHint ¶
type InfoHint struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*InfoHint) Layout ¶
func (infohint *InfoHint) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
type LabeledToggle ¶
type LabeledToggle struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*LabeledToggle) Build ¶
func (d *LabeledToggle) Build(context *guigui.Context, adder *guigui.ChildAdder) error
func (*LabeledToggle) Layout ¶
func (d *LabeledToggle) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*LabeledToggle) Measure ¶
func (d *LabeledToggle) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
func (*LabeledToggle) SetLabel ¶
func (d *LabeledToggle) SetLabel(label string)
func (*LabeledToggle) Toggle ¶
func (d *LabeledToggle) Toggle() *basicwidget.Toggle
type LazyWidget ¶
SPDX-License-Identifier: Apache-2.0 SPDX-FileCopyrightText: 2024 The Guigui Authors Original code belongs to @hajime-hojshi
func (*LazyWidget[T]) Widget ¶
func (l *LazyWidget[T]) Widget() T
type Link ¶
type Link struct {
basicwidget.Text
// contains filtered or unexported fields
}
Note: This can alos open file paths so be makesure the url is what you want to open. If text value != url a tooltip will show the url otherwise the tooltip will not show.
func (*Link) HandlePointingInput ¶
func (d *Link) HandlePointingInput(context *guigui.Context, widgetBounds *guigui.WidgetBounds) guigui.HandleInputResult
func (*Link) Layout ¶
func (d *Link) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*Link) SetBaseStyle ¶
func (d *Link) SetBaseStyle(style *basicwidget.TextStyle)
func (*Link) SetURL_Str ¶
type SkeletonLoader ¶
type SkeletonLoader[T guigui.Widget] struct { guigui.DefaultWidget // contains filtered or unexported fields }
func (*SkeletonLoader[T]) Build ¶
func (d *SkeletonLoader[T]) Build(context *guigui.Context, adder *guigui.ChildAdder) error
func (*SkeletonLoader[T]) Draw ¶
func (d *SkeletonLoader[T]) Draw(context *guigui.Context, widgetBounds *guigui.WidgetBounds, dst *ebiten.Image)
func (*SkeletonLoader[T]) Layout ¶
func (d *SkeletonLoader[T]) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*SkeletonLoader[T]) Loading ¶
func (d *SkeletonLoader[T]) Loading() bool
func (*SkeletonLoader[T]) Measure ¶
func (d *SkeletonLoader[T]) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
func (*SkeletonLoader[T]) SetLoading ¶
func (d *SkeletonLoader[T]) SetLoading(loading bool)
func (*SkeletonLoader[T]) Tick ¶
func (d *SkeletonLoader[T]) Tick(context *guigui.Context, widgetBounds *guigui.WidgetBounds) error
func (*SkeletonLoader[T]) Widget ¶
func (d *SkeletonLoader[T]) Widget() T
type TabContainer ¶
type TabContainer[T comparable] struct { guigui.DefaultWidget // contains filtered or unexported fields }
func (*TabContainer[T]) Build ¶
func (d *TabContainer[T]) Build(context *guigui.Context, adder *guigui.ChildAdder) error
func (*TabContainer[T]) Layout ¶
func (d *TabContainer[T]) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*TabContainer[T]) Measure ¶
func (d *TabContainer[T]) Measure(context *guigui.Context, constraints guigui.Constraints) image.Point
func (*TabContainer[T]) OnTabClose ¶
func (d *TabContainer[T]) OnTabClose(fn func(context *guigui.Context, index int, data TabItem[T]))
func (*TabContainer[T]) OnTabSelect ¶
func (d *TabContainer[T]) OnTabSelect(fn func(context *guigui.Context, index int, data TabItem[T]))
func (*TabContainer[T]) OnTabSwitch ¶
func (*TabContainer[T]) SelectTabItem ¶
func (d *TabContainer[T]) SelectTabItem(index int)
func (*TabContainer[T]) SelectedTabItem ¶
func (d *TabContainer[T]) SelectedTabItem() (index int, ok bool)
func (*TabContainer[T]) SetTabItems ¶
func (d *TabContainer[T]) SetTabItems(items []TabItem[T])
func (*TabContainer[T]) SetUnselectedWidget ¶
func (d *TabContainer[T]) SetUnselectedWidget(widget guigui.Widget)
func (*TabContainer[T]) TabItemsLenght ¶
func (d *TabContainer[T]) TabItemsLenght() int
func (*TabContainer[T]) UnselectedWidget ¶
func (d *TabContainer[T]) UnselectedWidget() guigui.Widget
type Text ¶
type Text struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
func (*Text) Layout ¶
func (d *Text) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*Text) Text ¶
func (d *Text) Text() *basicwidget.Text
type TextContent ¶
type TextContent int
const ( TextContentPlainText TextContent = iota + 0 TextContentHTML )
type TextInput ¶
type TextInput struct {
guigui.DefaultWidget
// contains filtered or unexported fields
}
TextInput is a widget for text input with context menu support.
func (*TextInput) Layout ¶
func (d *TextInput) Layout(context *guigui.Context, widgetBounds *guigui.WidgetBounds, layouter *guigui.ChildLayouter)
func (*TextInput) OnAdditionalItemSelected ¶
OnAdditionalItemSelected sets the callback for when an additional context menu item is selected.
func (*TextInput) SetAditionalItems ¶
func (d *TextInput) SetAditionalItems(addition_items []basicwidget.PopupMenuItem[int])
SetAditionalItems sets the additional context menu items.
func (*TextInput) SetDisable ¶
Only for defualt items. Sets whether the item is disabled.
func (*TextInput) SetTextContent ¶
func (d *TextInput) SetTextContent(textcontent TextContent)
func (*TextInput) TextContent ¶
func (d *TextInput) TextContent() TextContent
func (*TextInput) TextInput ¶
func (d *TextInput) TextInput() *basicwidget.TextInput
Source Files
¶
Click to show internal directories.
Click to hide internal directories.