Documentation ¶
Overview ¶
Package widget contains various widget implementations such as buttons, checkboxes, combo boxes, lists etc. It also provides several different layout mechanisms to automatically layout widgets according to different rules.
Index ¶
- Constants
- func AppendToDeferredRenderQueue(r RenderFunc)
- func RenderDeferred(screen *ebiten.Image)
- type AnchorLayout
- type AnchorLayoutData
- type AnchorLayoutOpt
- type AnchorLayoutOptions
- type AnchorLayoutPosition
- type Button
- func (b *Button) AddFocus(direction FocusDirection, focus Focuser)
- func (b *Button) Click()
- func (b *Button) Configure(opts ...ButtonOpt)
- func (b *Button) Focus(focused bool)
- func (b *Button) GetFocus(direction FocusDirection) Focuser
- func (b *Button) GetWidget() *Widget
- func (b *Button) IsFocused() bool
- func (b *Button) PreferredSize() (int, int)
- func (b *Button) Render(screen *ebiten.Image)
- func (b *Button) RequestRelayout()
- func (b *Button) SetLocation(rect img.Rectangle)
- func (b *Button) SetState(state WidgetState)
- func (b *Button) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (b *Button) State() WidgetState
- func (b *Button) TabOrder() int
- func (b *Button) Text() *Text
- func (b *Button) Update()
- type ButtonChangedEventArgs
- type ButtonChangedHandlerFunc
- type ButtonClickedEventArgs
- type ButtonClickedHandlerFunc
- type ButtonCursorHoverHandlerFunc
- type ButtonHoverEventArgs
- type ButtonImage
- type ButtonImageImage
- type ButtonOpt
- type ButtonOptions
- func (o ButtonOptions) ClickedHandler(f ButtonClickedHandlerFunc) ButtonOpt
- func (o ButtonOptions) CursorEnteredHandler(f ButtonCursorHoverHandlerFunc) ButtonOpt
- func (o ButtonOptions) CursorExitedHandler(f ButtonCursorHoverHandlerFunc) ButtonOpt
- func (o ButtonOptions) CursorMovedHandler(f ButtonCursorHoverHandlerFunc) ButtonOpt
- func (o ButtonOptions) DisableDefaultKeys() ButtonOpt
- func (o ButtonOptions) Graphic(i *ebiten.Image) ButtonOpt
- func (o ButtonOptions) GraphicNineSlice(i *image.NineSlice) ButtonOpt
- func (o ButtonOptions) GraphicPadding(i Insets) ButtonOpt
- func (o ButtonOptions) IgnoreTransparentPixels(ignoreTransparentPixels bool) ButtonOpt
- func (o ButtonOptions) Image(i *ButtonImage) ButtonOpt
- func (o ButtonOptions) KeepPressedOnExit() ButtonOpt
- func (o ButtonOptions) PressedHandler(f ButtonPressedHandlerFunc) ButtonOpt
- func (o ButtonOptions) ReleasedHandler(f ButtonReleasedHandlerFunc) ButtonOpt
- func (o ButtonOptions) StateChangedHandler(f ButtonChangedHandlerFunc) ButtonOpt
- func (o ButtonOptions) TabOrder(tabOrder int) ButtonOpt
- func (o ButtonOptions) Text(label string, face text.Face, color *ButtonTextColor) ButtonOpt
- func (o ButtonOptions) TextAndImage(label string, face text.Face, image *ButtonImageImage, color *ButtonTextColor) ButtonOpt
- func (o ButtonOptions) TextColor(color *ButtonTextColor) ButtonOpt
- func (o ButtonOptions) TextFace(face text.Face) ButtonOpt
- func (o ButtonOptions) TextLabel(label string) ButtonOpt
- func (o ButtonOptions) TextPadding(p Insets) ButtonOpt
- func (o ButtonOptions) TextPosition(h TextPosition, v TextPosition) ButtonOpt
- func (o ButtonOptions) TextProcessBBCode(enabled bool) ButtonOpt
- func (o ButtonOptions) ToggleMode() ButtonOpt
- func (o ButtonOptions) WidgetOpts(opts ...WidgetOpt) ButtonOpt
- type ButtonPressedEventArgs
- type ButtonPressedHandlerFunc
- type ButtonReleasedEventArgs
- type ButtonReleasedHandlerFunc
- type ButtonTextColor
- type CanDropFunc
- type Caret
- type CaretOpt
- type CaretOptions
- type Checkbox
- func (c *Checkbox) AddFocus(direction FocusDirection, focus Focuser)
- func (c *Checkbox) Click()
- func (c *Checkbox) Focus(focused bool)
- func (c *Checkbox) GetFocus(direction FocusDirection) Focuser
- func (c *Checkbox) GetWidget() *Widget
- func (c *Checkbox) IsFocused() bool
- func (c *Checkbox) PreferredSize() (int, int)
- func (c *Checkbox) Render(screen *ebiten.Image)
- func (c *Checkbox) SetLocation(rect image.Rectangle)
- func (tw *Checkbox) SetState(state WidgetState)
- func (c *Checkbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (tw *Checkbox) State() WidgetState
- func (c *Checkbox) TabOrder() int
- func (c *Checkbox) Update()
- type CheckboxChangedEventArgs
- type CheckboxChangedHandlerFunc
- type CheckboxGraphicImage
- type CheckboxOpt
- type CheckboxOptions
- func (o CheckboxOptions) ButtonOpts(opts ...ButtonOpt) CheckboxOpt
- func (o CheckboxOptions) Image(i *CheckboxGraphicImage) CheckboxOpt
- func (o CheckboxOptions) InitialState(state WidgetState) CheckboxOpt
- func (o CheckboxOptions) StateChangedHandler(f CheckboxChangedHandlerFunc) CheckboxOpt
- func (o CheckboxOptions) TabOrder(tabOrder int) CheckboxOpt
- func (o CheckboxOptions) TriState() CheckboxOpt
- type ComboButton
- func (c *ComboButton) GetWidget() *Widget
- func (c *ComboButton) Label() string
- func (c *ComboButton) PreferredSize() (int, int)
- func (c *ComboButton) Render(screen *ebiten.Image)
- func (c *ComboButton) SetLabel(l string)
- func (c *ComboButton) SetLocation(rect image.Rectangle)
- func (c *ComboButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (c *ComboButton) Update()
- type ComboButtonOpt
- type ComboButtonOptions
- type Container
- func (c *Container) AddChild(children ...PreferredSizeLocateableWidget) RemoveChildFunc
- func (c *Container) Children() []PreferredSizeLocateableWidget
- func (c *Container) GetDropTargets() []HasWidget
- func (c *Container) GetFocusers() []Focuser
- func (c *Container) GetWidget() *Widget
- func (c *Container) PreferredSize() (int, int)
- func (c *Container) RemoveChild(child PreferredSizeLocateableWidget)
- func (c *Container) RemoveChildren()
- func (c *Container) Render(screen *ebiten.Image)
- func (c *Container) RequestRelayout()
- func (c *Container) SetLocation(rect img.Rectangle)
- func (c *Container) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (c *Container) Update()
- func (c *Container) WidgetAt(x int, y int) HasWidget
- type ContainerOpt
- type ContainerOptions
- type Direction
- type DragAndDrop
- type DragAndDropAnchor
- type DragAndDropDroppedEventArgs
- type DragAndDropDroppedHandlerFunc
- type DragAndDropOpt
- type DragAndDropOptions
- func (o DragAndDropOptions) ContentsCreater(c DragContentsCreater) DragAndDropOpt
- func (o DragAndDropOptions) ContentsOriginHorizontal(contentsOriginHorizontal DragAndDropAnchor) DragAndDropOpt
- func (o DragAndDropOptions) ContentsOriginVertical(contentsOriginVertical DragAndDropAnchor) DragAndDropOpt
- func (o DragAndDropOptions) DisableDrag() DragAndDropOpt
- func (o DragAndDropOptions) MinDragStartDistance(d int) DragAndDropOpt
- func (o DragAndDropOptions) Offset(off image.Point) DragAndDropOpt
- type DragContentsCreater
- type DragContentsEnder
- type DragContentsUpdater
- type DropFunc
- type Dropper
- type FlipBook
- func (f *FlipBook) GetDropTargets() []HasWidget
- func (f *FlipBook) GetFocusers() []Focuser
- func (f *FlipBook) GetWidget() *Widget
- func (f *FlipBook) PreferredSize() (int, int)
- func (f *FlipBook) Render(screen *ebiten.Image)
- func (f *FlipBook) RequestRelayout()
- func (f *FlipBook) SetLocation(rect img.Rectangle)
- func (f *FlipBook) SetPage(page PreferredSizeLocateableWidget)
- func (f *FlipBook) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (f *FlipBook) Update()
- func (f *FlipBook) WidgetAt(x int, y int) HasWidget
- type FlipBookOpt
- type FlipBookOptions
- type FocusDirection
- type Focuser
- type Graphic
- type GraphicOpt
- type GraphicOptions
- type GridLayout
- type GridLayoutData
- type GridLayoutOpt
- type GridLayoutOptions
- type GridLayoutPosition
- type HasWidget
- type Insets
- type Label
- type LabelColor
- type LabelOpt
- type LabelOptions
- type LabelOrder
- type LabeledCheckbox
- func (l *LabeledCheckbox) AddFocus(direction FocusDirection, focus Focuser)
- func (l *LabeledCheckbox) Checkbox() *Checkbox
- func (l *LabeledCheckbox) Click()
- func (l *LabeledCheckbox) Focus(focused bool)
- func (l *LabeledCheckbox) GetFocus(direction FocusDirection) Focuser
- func (l *LabeledCheckbox) GetWidget() *Widget
- func (l *LabeledCheckbox) IsFocused() bool
- func (l *LabeledCheckbox) Label() *Label
- func (l *LabeledCheckbox) PreferredSize() (int, int)
- func (l *LabeledCheckbox) Render(screen *ebiten.Image)
- func (l *LabeledCheckbox) SetLocation(rect image.Rectangle)
- func (l *LabeledCheckbox) SetState(state WidgetState)
- func (l *LabeledCheckbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (l *LabeledCheckbox) TabOrder() int
- func (l *LabeledCheckbox) Update()
- type LabeledCheckboxOpt
- type LabeledCheckboxOptions
- func (o LabeledCheckboxOptions) CheckboxOpts(opts ...CheckboxOpt) LabeledCheckboxOpt
- func (o LabeledCheckboxOptions) LabelFirst() LabeledCheckboxOpt
- func (o LabeledCheckboxOptions) LabelOpts(opts ...LabelOpt) LabeledCheckboxOpt
- func (o LabeledCheckboxOptions) Spacing(s int) LabeledCheckboxOpt
- func (o LabeledCheckboxOptions) WidgetOpts(opts ...WidgetOpt) LabeledCheckboxOpt
- type Layouter
- type List
- func (l *List) AddEntry(entry any)
- func (l *List) AddFocus(direction FocusDirection, focus Focuser)
- func (l *List) Entries() []any
- func (l *List) Focus(focused bool)
- func (l *List) FocusNext()
- func (l *List) FocusPrevious()
- func (l *List) GetFocus(direction FocusDirection) Focuser
- func (l *List) GetWidget() *Widget
- func (l *List) IsFocused() bool
- func (l *List) PreferredSize() (int, int)
- func (l *List) RemoveEntry(entry any)
- func (l *List) Render(screen *ebiten.Image)
- func (l *List) RequestRelayout()
- func (l *List) SelectFocused()
- func (l *List) SelectedEntry() any
- func (l *List) SetEntries(newEntries []any)
- func (l *List) SetLocation(rect img.Rectangle)
- func (l *List) SetSelectedEntry(entry any)
- func (l *List) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (l *List) TabOrder() int
- func (l *List) Update()
- type ListComboButton
- func (l *ListComboButton) AddFocus(direction FocusDirection, focus Focuser)
- func (l *ListComboButton) ContentVisible() bool
- func (l *ListComboButton) Focus(focused bool)
- func (l *ListComboButton) FocusNext()
- func (l *ListComboButton) FocusPrevious()
- func (l *ListComboButton) GetFocus(direction FocusDirection) Focuser
- func (l *ListComboButton) GetWidget() *Widget
- func (l *ListComboButton) IsFocused() bool
- func (l *ListComboButton) Label() string
- func (l *ListComboButton) PreferredSize() (int, int)
- func (l *ListComboButton) Render(screen *ebiten.Image)
- func (l *ListComboButton) SelectFocused()
- func (l *ListComboButton) SelectedEntry() interface{}
- func (l *ListComboButton) SetContentVisible(v bool)
- func (l *ListComboButton) SetLocation(rect image.Rectangle)
- func (l *ListComboButton) SetSelectedEntry(e interface{})
- func (l *ListComboButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (l *ListComboButton) TabOrder() int
- func (l *ListComboButton) Update()
- type ListComboButtonEntrySelectedEventArgs
- type ListComboButtonEntrySelectedHandlerFunc
- type ListComboButtonOpt
- type ListComboButtonOptions
- func (o ListComboButtonOptions) DisableDefaultKeys(val bool) ListComboButtonOpt
- func (o ListComboButtonOptions) EntryLabelFunc(button SelectComboButtonEntryLabelFunc, list ListEntryLabelFunc) ListComboButtonOpt
- func (o ListComboButtonOptions) EntrySelectedHandler(f ListComboButtonEntrySelectedHandlerFunc) ListComboButtonOpt
- func (o ListComboButtonOptions) ListOpts(opts ...ListOpt) ListComboButtonOpt
- func (o ListComboButtonOptions) SelectComboButtonOpts(opts ...SelectComboButtonOpt) ListComboButtonOpt
- func (o ListComboButtonOptions) TabOrder(tabOrder int) ListComboButtonOpt
- func (o ListComboButtonOptions) Text(face text.Face, image *ButtonImageImage, color *ButtonTextColor) ListComboButtonOpt
- type ListEntryColor
- type ListEntryLabelFunc
- type ListEntrySelectedEventArgs
- type ListEntrySelectedHandlerFunc
- type ListOpt
- type ListOptions
- func (o ListOptions) AllowReselect() ListOpt
- func (o ListOptions) ContainerOpts(opts ...ContainerOpt) ListOpt
- func (o ListOptions) ControlWidgetSpacing(s int) ListOpt
- func (o ListOptions) DisableDefaultKeys(val bool) ListOpt
- func (o ListOptions) Entries(e []any) ListOpt
- func (o ListOptions) EntryColor(c *ListEntryColor) ListOpt
- func (o ListOptions) EntryFontFace(f text.Face) ListOpt
- func (o ListOptions) EntryLabelFunc(f ListEntryLabelFunc) ListOpt
- func (o ListOptions) EntrySelectedHandler(f ListEntrySelectedHandlerFunc) ListOpt
- func (o ListOptions) EntryTextPadding(i Insets) ListOpt
- func (o ListOptions) EntryTextPosition(h TextPosition, v TextPosition) ListOpt
- func (o ListOptions) HideHorizontalSlider() ListOpt
- func (o ListOptions) HideVerticalSlider() ListOpt
- func (o ListOptions) ScrollContainerOpts(opts ...ScrollContainerOpt) ListOpt
- func (o ListOptions) SelectFocus() ListOpt
- func (o ListOptions) SliderOpts(opts ...SliderOpt) ListOpt
- func (o ListOptions) TabOrder(tabOrder int) ListOpt
- type Locateable
- type Locater
- type MultiOnce
- type PreferredSizeLocateableWidget
- type PreferredSizer
- type ProgressBar
- func (s *ProgressBar) Configure(opts ...ProgressBarOpt)
- func (s *ProgressBar) GetCurrent() int
- func (s *ProgressBar) GetWidget() *Widget
- func (s *ProgressBar) PreferredSize() (int, int)
- func (s *ProgressBar) Render(screen *ebiten.Image)
- func (s *ProgressBar) SetCurrent(value int) bool
- func (s *ProgressBar) SetLocation(rect img.Rectangle)
- func (s *ProgressBar) Update()
- type ProgressBarImage
- type ProgressBarOpt
- type ProgressBarOptions
- func (o ProgressBarOptions) Direction(d Direction) ProgressBarOpt
- func (o ProgressBarOptions) Images(track *ProgressBarImage, fill *ProgressBarImage) ProgressBarOpt
- func (o ProgressBarOptions) Inverted(inverted bool) ProgressBarOpt
- func (o ProgressBarOptions) TrackPadding(i Insets) ProgressBarOpt
- func (o ProgressBarOptions) Values(min int, max int, current int) ProgressBarOpt
- func (o ProgressBarOptions) WidgetOpts(opts ...WidgetOpt) ProgressBarOpt
- type RadioGroup
- type RadioGroupChangedEventArgs
- type RadioGroupChangedHandlerFunc
- type RadioGroupElement
- type RadioGroupOpt
- type RadioGroupOptions
- type Relayoutable
- type RemoveChildFunc
- type RemoveWindowFunc
- type RenderFunc
- type Renderer
- type RowLayout
- type RowLayoutData
- type RowLayoutOpt
- type RowLayoutOptions
- type RowLayoutPosition
- type ScrollContainer
- func (s *ScrollContainer) ContentRect() img.Rectangle
- func (s *ScrollContainer) GetDropTargets() []HasWidget
- func (s *ScrollContainer) GetFocusers() []Focuser
- func (s *ScrollContainer) GetWidget() *Widget
- func (s *ScrollContainer) PreferredSize() (int, int)
- func (s *ScrollContainer) Render(screen *ebiten.Image)
- func (s *ScrollContainer) SetLocation(rect img.Rectangle)
- func (s *ScrollContainer) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (s *ScrollContainer) Update()
- func (s *ScrollContainer) ViewRect() img.Rectangle
- type ScrollContainerImage
- type ScrollContainerOpt
- type ScrollContainerOptions
- func (o ScrollContainerOptions) Content(c HasWidget) ScrollContainerOpt
- func (o ScrollContainerOptions) Image(i *ScrollContainerImage) ScrollContainerOpt
- func (o ScrollContainerOptions) Padding(p Insets) ScrollContainerOpt
- func (o ScrollContainerOptions) StretchContentWidth() ScrollContainerOpt
- func (o ScrollContainerOptions) WidgetOpts(opts ...WidgetOpt) ScrollContainerOpt
- type ScrollMode
- type SelectComboButton
- func (s *SelectComboButton) ContentVisible() bool
- func (s *SelectComboButton) GetWidget() *Widget
- func (s *SelectComboButton) Label() string
- func (s *SelectComboButton) PreferredSize() (int, int)
- func (s *SelectComboButton) Render(screen *ebiten.Image)
- func (s *SelectComboButton) SelectedEntry() interface{}
- func (s *SelectComboButton) SetContentVisible(v bool)
- func (s *SelectComboButton) SetLabel(l string)
- func (s *SelectComboButton) SetLocation(rect image.Rectangle)
- func (s *SelectComboButton) SetSelectedEntry(e interface{})
- func (s *SelectComboButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (s *SelectComboButton) Update()
- type SelectComboButtonEntryLabelFunc
- type SelectComboButtonEntrySelectedEventArgs
- type SelectComboButtonEntrySelectedHandlerFunc
- type SelectComboButtonOpt
- type SelectComboButtonOptions
- func (o SelectComboButtonOptions) ComboButtonOpts(opts ...ComboButtonOpt) SelectComboButtonOpt
- func (o SelectComboButtonOptions) EntryLabelFunc(f SelectComboButtonEntryLabelFunc) SelectComboButtonOpt
- func (o SelectComboButtonOptions) EntrySelectedHandler(f SelectComboButtonEntrySelectedHandlerFunc) SelectComboButtonOpt
- type Slider
- func (s *Slider) AddFocus(direction FocusDirection, focus Focuser)
- func (s *Slider) Focus(focused bool)
- func (s *Slider) GetFocus(direction FocusDirection) Focuser
- func (s *Slider) GetWidget() *Widget
- func (s *Slider) IsFocused() bool
- func (s *Slider) PreferredSize() (int, int)
- func (s *Slider) Render(screen *ebiten.Image)
- func (s *Slider) SetLocation(rect img.Rectangle)
- func (s *Slider) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (s *Slider) TabOrder() int
- func (s *Slider) Update()
- type SliderChangedEventArgs
- type SliderChangedHandlerFunc
- type SliderOpt
- type SliderOptions
- func (o SliderOptions) ChangedHandler(f SliderChangedHandlerFunc) SliderOpt
- func (o SliderOptions) Direction(d Direction) SliderOpt
- func (o SliderOptions) DisableDefaultKeys(val bool) SliderOpt
- func (o SliderOptions) FixedHandleSize(s int) SliderOpt
- func (o SliderOptions) HandleImage(handle *ButtonImage) SliderOpt
- func (o SliderOptions) Images(track *SliderTrackImage, handle *ButtonImage) SliderOpt
- func (o SliderOptions) MinHandleSize(s int) SliderOpt
- func (o SliderOptions) MinMax(min int, max int) SliderOpt
- func (o SliderOptions) PageSizeFunc(f SliderPageSizeFunc) SliderOpt
- func (o SliderOptions) TabOrder(tabOrder int) SliderOpt
- func (o SliderOptions) TrackImage(track *SliderTrackImage) SliderOpt
- func (o SliderOptions) TrackOffset(i int) SliderOpt
- func (o SliderOptions) TrackPadding(i Insets) SliderOpt
- func (o SliderOptions) WidgetOpts(opts ...WidgetOpt) SliderOpt
- type SliderPageSizeFunc
- type SliderTrackImage
- type StackedLayout
- type StackedLayoutData
- type StackedLayoutOpt
- type StackedLayoutOptions
- type TabBook
- func (t *TabBook) GetDropTargets() []HasWidget
- func (t *TabBook) GetTabButton(tab *TabBookTab) *Button
- func (t *TabBook) GetWidget() *Widget
- func (t *TabBook) PreferredSize() (int, int)
- func (t *TabBook) Render(screen *ebiten.Image)
- func (t *TabBook) RequestRelayout()
- func (t *TabBook) SetLocation(rect image.Rectangle)
- func (t *TabBook) SetTab(tab *TabBookTab)
- func (t *TabBook) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (t *TabBook) Tab() *TabBookTab
- func (t *TabBook) Update()
- type TabBookOpt
- type TabBookOptions
- func (o TabBookOptions) ContainerOpts(opts ...ContainerOpt) TabBookOpt
- func (o TabBookOptions) FlipBookOpts(opts ...FlipBookOpt) TabBookOpt
- func (o TabBookOptions) InitialTab(tab *TabBookTab) TabBookOpt
- func (o TabBookOptions) Spacing(s int) TabBookOpt
- func (o TabBookOptions) TabButtonImage(buttonImages *ButtonImage) TabBookOpt
- func (o TabBookOptions) TabButtonOpts(opts ...ButtonOpt) TabBookOpt
- func (o TabBookOptions) TabButtonSpacing(s int) TabBookOpt
- func (o TabBookOptions) TabButtonText(face text.Face, color *ButtonTextColor) TabBookOpt
- func (o TabBookOptions) TabSelectedHandler(f TabBookTabSelectedHandlerFunc) TabBookOpt
- func (o TabBookOptions) Tabs(tabs ...*TabBookTab) TabBookOpt
- type TabBookTab
- type TabBookTabSelectedEventArgs
- type TabBookTabSelectedHandlerFunc
- type Text
- type TextArea
- func (l *TextArea) AppendText(value string)
- func (l *TextArea) GetFocusers() []Focuser
- func (l *TextArea) GetText() string
- func (l *TextArea) GetWidget() *Widget
- func (l *TextArea) PreferredSize() (int, int)
- func (l *TextArea) PrependText(value string)
- func (l *TextArea) Render(screen *ebiten.Image)
- func (l *TextArea) RequestRelayout()
- func (l *TextArea) SetLocation(rect img.Rectangle)
- func (l *TextArea) SetText(value string)
- func (l *TextArea) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (l *TextArea) Update()
- type TextAreaEntrySelectedEventArgs
- type TextAreaEntrySelectedHandlerFunc
- type TextAreaOpt
- type TextAreaOptions
- func (o TextAreaOptions) ContainerOpts(opts ...ContainerOpt) TextAreaOpt
- func (o TextAreaOptions) ControlWidgetSpacing(s int) TextAreaOpt
- func (o TextAreaOptions) FontColor(color color.Color) TextAreaOpt
- func (o TextAreaOptions) FontFace(f text.Face) TextAreaOpt
- func (o TextAreaOptions) HorizontalScrollMode(scrollMode ScrollMode) TextAreaOpt
- func (o TextAreaOptions) ProcessBBCode(processBBCode bool) TextAreaOpt
- func (o TextAreaOptions) ScrollContainerOpts(opts ...ScrollContainerOpt) TextAreaOpt
- func (o TextAreaOptions) ShowHorizontalScrollbar() TextAreaOpt
- func (o TextAreaOptions) ShowVerticalScrollbar() TextAreaOpt
- func (o TextAreaOptions) SliderOpts(opts ...SliderOpt) TextAreaOpt
- func (o TextAreaOptions) Text(initialText string) TextAreaOpt
- func (o TextAreaOptions) TextPadding(i Insets) TextAreaOpt
- func (o TextAreaOptions) VerticalScrollMode(scrollMode ScrollMode) TextAreaOpt
- type TextInput
- func (t *TextInput) AddFocus(direction FocusDirection, focus Focuser)
- func (t *TextInput) Backspace()
- func (t *TextInput) CursorMoveEnd()
- func (t *TextInput) CursorMoveLeft()
- func (t *TextInput) CursorMoveRight()
- func (t *TextInput) CursorMoveStart()
- func (t *TextInput) Delete()
- func (t *TextInput) Focus(focused bool)
- func (t *TextInput) GetFocus(direction FocusDirection) Focuser
- func (t *TextInput) GetText() string
- func (t *TextInput) GetWidget() *Widget
- func (t *TextInput) Insert(c []rune)
- func (t *TextInput) IsFocused() bool
- func (t *TextInput) PreferredSize() (int, int)
- func (t *TextInput) Render(screen *ebiten.Image)
- func (t *TextInput) SetLocation(rect img.Rectangle)
- func (t *TextInput) SetText(text string)
- func (t *TextInput) Submit()
- func (t *TextInput) TabOrder() int
- func (t *TextInput) Update()
- type TextInputChangedEventArgs
- type TextInputChangedHandlerFunc
- type TextInputColor
- type TextInputImage
- type TextInputOpt
- type TextInputOptions
- func (o TextInputOptions) AllowDuplicateSubmit(allowDuplicateSubmit bool) TextInputOpt
- func (o TextInputOptions) CaretOpts(opts ...CaretOpt) TextInputOpt
- func (o TextInputOptions) ChangedHandler(f TextInputChangedHandlerFunc) TextInputOpt
- func (o TextInputOptions) ClearOnSubmit(clearOnSubmit bool) TextInputOpt
- func (o TextInputOptions) Color(c *TextInputColor) TextInputOpt
- func (o TextInputOptions) Face(f text.Face) TextInputOpt
- func (o TextInputOptions) IgnoreEmptySubmit(ignoreEmptySubmit bool) TextInputOpt
- func (o TextInputOptions) Image(i *TextInputImage) TextInputOpt
- func (o TextInputOptions) MobileInputMode(mobileInputMode jsUtil.MobileInputMode) TextInputOpt
- func (o TextInputOptions) Padding(i Insets) TextInputOpt
- func (o TextInputOptions) Placeholder(s string) TextInputOpt
- func (o TextInputOptions) RepeatInterval(i time.Duration) TextInputOpt
- func (o TextInputOptions) Secure(b bool) TextInputOpt
- func (o TextInputOptions) SubmitHandler(f TextInputChangedHandlerFunc) TextInputOpt
- func (o TextInputOptions) TabOrder(to int) TextInputOpt
- func (o TextInputOptions) Validation(f TextInputValidationFunc) TextInputOpt
- func (o TextInputOptions) WidgetOpts(opts ...WidgetOpt) TextInputOpt
- type TextInputValidationFunc
- type TextOpt
- type TextOptions
- func (o TextOptions) Insets(inset Insets) TextOpt
- func (o TextOptions) MaxWidth(maxWidth float64) TextOpt
- func (o TextOptions) Position(h TextPosition, v TextPosition) TextOpt
- func (o TextOptions) ProcessBBCode(processBBCode bool) TextOpt
- func (o TextOptions) Text(label string, face text.Face, color color.Color) TextOpt
- func (o TextOptions) TextColor(color color.Color) TextOpt
- func (o TextOptions) TextFace(face text.Face) TextOpt
- func (o TextOptions) TextLabel(label string) TextOpt
- func (o TextOptions) WidgetOpts(opts ...WidgetOpt) TextOpt
- type TextPosition
- type ToolTip
- type ToolTipAnchor
- type ToolTipDirection
- type ToolTipOpt
- type ToolTipOptions
- func (o ToolTipOptions) Content(c *Container) ToolTipOpt
- func (o ToolTipOptions) ContentOriginHorizontal(contentOriginHorizontal ToolTipAnchor) ToolTipOpt
- func (o ToolTipOptions) ContentOriginVertical(contentOriginVertical ToolTipAnchor) ToolTipOpt
- func (o ToolTipOptions) Delay(d time.Duration) ToolTipOpt
- func (o ToolTipOptions) Offset(off image.Point) ToolTipOpt
- func (o ToolTipOptions) Position(position ToolTipPosition) ToolTipOpt
- func (o ToolTipOptions) ToolTipUpdater(toolTipUpdater ToolTipUpdater) ToolTipOpt
- func (o ToolTipOptions) WidgetOriginHorizontal(widgetOriginHorizontal ToolTipAnchor) ToolTipOpt
- func (o ToolTipOptions) WidgetOriginVertical(widgetOriginVertical ToolTipAnchor) ToolTipOpt
- type ToolTipPosition
- type ToolTipUpdater
- type Updater
- type Visibility
- type Widget
- func (w *Widget) EffectiveInputLayer() *input.Layer
- func (w *Widget) ElevateToNewInputLayer(l *input.Layer)
- func (widget *Widget) FireContextMenuEvent(w *Widget, l image.Point)
- func (widget *Widget) FireDragAndDropEvent(w *Window, show bool, dnd *DragAndDrop)
- func (widget *Widget) FireFocusEvent(w HasWidget, focused bool, location image.Point)
- func (widget *Widget) FireToolTipEvent(w *Window, show bool)
- func (w *Widget) Parent() *Widget
- func (w *Widget) Render(screen *ebiten.Image)
- func (w *Widget) SetLocation(rect image.Rectangle)
- func (w *Widget) Update()
- type WidgetContextMenuEventArgs
- type WidgetCursorEnterEventArgs
- type WidgetCursorEnterHandlerFunc
- type WidgetCursorExitEventArgs
- type WidgetCursorExitHandlerFunc
- type WidgetCursorMoveEventArgs
- type WidgetCursorMoveHandlerFunc
- type WidgetDragAndDropEventArgs
- type WidgetFocusEventArgs
- type WidgetMouseButtonPressedEventArgs
- type WidgetMouseButtonPressedHandlerFunc
- type WidgetMouseButtonReleasedEventArgs
- type WidgetMouseButtonReleasedHandlerFunc
- type WidgetOpt
- type WidgetOptions
- func (o WidgetOptions) CanDrop(candropFunc CanDropFunc) WidgetOpt
- func (o WidgetOptions) ContextMenu(contextMenu *Container) WidgetOpt
- func (o WidgetOptions) ContextMenuCloseMode(contextMenuCloseMode WindowCloseMode) WidgetOpt
- func (o WidgetOptions) CursorEnterHandler(f WidgetCursorEnterHandlerFunc) WidgetOpt
- func (o WidgetOptions) CursorExitHandler(f WidgetCursorExitHandlerFunc) WidgetOpt
- func (o WidgetOptions) CursorHovered(cursorHovered string) WidgetOpt
- func (o WidgetOptions) CursorMoveHandler(f WidgetCursorMoveHandlerFunc) WidgetOpt
- func (o WidgetOptions) CursorPressed(cursorPressed string) WidgetOpt
- func (o WidgetOptions) CustomData(cd interface{}) WidgetOpt
- func (o WidgetOptions) Dropped(dropFunc DropFunc) WidgetOpt
- func (o WidgetOptions) EnableDragAndDrop(d *DragAndDrop) WidgetOpt
- func (o WidgetOptions) LayoutData(ld interface{}) WidgetOpt
- func (o WidgetOptions) MinSize(minWidth int, minHeight int) WidgetOpt
- func (o WidgetOptions) MouseButtonPressedHandler(f WidgetMouseButtonPressedHandlerFunc) WidgetOpt
- func (o WidgetOptions) MouseButtonReleasedHandler(f WidgetMouseButtonReleasedHandlerFunc) WidgetOpt
- func (o WidgetOptions) ScrolledHandler(f WidgetScrolledHandlerFunc) WidgetOpt
- func (o WidgetOptions) ToolTip(toolTip *ToolTip) WidgetOpt
- func (o WidgetOptions) TrackHover(trackHover bool) WidgetOpt
- type WidgetScrolledEventArgs
- type WidgetScrolledHandlerFunc
- type WidgetState
- type WidgetToolTipEventArgs
- type Window
- func (w *Window) Close()
- func (w *Window) GetCloseFunction() RemoveWindowFunc
- func (w *Window) GetContainer() *Container
- func (w *Window) Render(screen *ebiten.Image)
- func (w *Window) RequestRelayout()
- func (w *Window) SetCloseFunction(close RemoveWindowFunc)
- func (w *Window) SetLocation(rect image.Rectangle)
- func (w *Window) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (w *Window) Update()
- type WindowChangedEventArgs
- type WindowChangedHandlerFunc
- type WindowCloseMode
- type WindowClosedEventArgs
- type WindowClosedHandlerFunc
- type WindowOpt
- type WindowOptions
- func (o WindowOptions) CloseMode(mode WindowCloseMode) WindowOpt
- func (o WindowOptions) ClosedHandler(f WindowClosedHandlerFunc) WindowOpt
- func (o WindowOptions) Contents(c *Container) WindowOpt
- func (o WindowOptions) Draggable() WindowOpt
- func (o WindowOptions) DrawLayer(layer int) WindowOpt
- func (o WindowOptions) Location(rect image.Rectangle) WindowOpt
- func (o WindowOptions) MaxSize(width int, height int) WindowOpt
- func (o WindowOptions) MinSize(width int, height int) WindowOpt
- func (o WindowOptions) Modal() WindowOpt
- func (o WindowOptions) MoveHandler(f WindowChangedHandlerFunc) WindowOpt
- func (o WindowOptions) ResizeHandler(f WindowChangedHandlerFunc) WindowOpt
- func (o WindowOptions) Resizeable() WindowOpt
- func (o WindowOptions) TitleBar(tb *Container, height int) WindowOpt
Constants ¶
const ( // AnchorLayoutPositionStart is the anchoring position for "left" (in the horizontal direction) or "top" (in the vertical direction.) AnchorLayoutPositionStart = AnchorLayoutPosition(iota) // AnchorLayoutPositionCenter is the center anchoring position. AnchorLayoutPositionCenter // AnchorLayoutPositionEnd is the anchoring position for "right" (in the horizontal direction) or "bottom" (in the vertical direction.) AnchorLayoutPositionEnd )
const ( // GridLayoutPositionStart is the anchoring position for "left" (in the horizontal direction) or "top" (in the vertical direction.) GridLayoutPositionStart = GridLayoutPosition(iota) // GridLayoutPositionStart is the center anchoring position. GridLayoutPositionCenter // GridLayoutPositionStart is the anchoring position for "right" (in the horizontal direction) or "bottom" (in the vertical direction.) GridLayoutPositionEnd )
const ( DirectionHorizontal = Direction(iota) DirectionVertical )
const ( WidgetUnchecked = WidgetState(iota) WidgetChecked WidgetGreyed )
const ( // RowLayoutPositionStart is the anchoring position for "left" (in the horizontal direction) or "top" (in the vertical direction.) RowLayoutPositionStart = RowLayoutPosition(iota) // RowLayoutPositionCenter is the center anchoring position. RowLayoutPositionCenter // RowLayoutPositionEnd is the anchoring position for "right" (in the horizontal direction) or "bottom" (in the vertical direction.) RowLayoutPositionEnd )
const ( TextPositionStart = TextPosition(iota) TextPositionCenter TextPositionEnd )
const COLOR_CLOSE = "/color]"
const COLOR_OPEN = "color="
Variables ¶
This section is empty.
Functions ¶
func AppendToDeferredRenderQueue ¶ added in v0.6.0
func AppendToDeferredRenderQueue(r RenderFunc)
func RenderDeferred ¶ added in v0.6.0
func RenderDeferred(screen *ebiten.Image)
RenderWithDeferred renders r to screen. This function should not be called directly.
Types ¶
type AnchorLayout ¶
type AnchorLayout struct {
// contains filtered or unexported fields
}
AnchorLayout layouts widgets anchored to either a corner or edge of a rectangle, optionally stretching it in one or both directions.
AnchorLayout will layout all widgets in the container to the specified locations regardless of overlap. The widgets in the container will be drawn in the order they were added to the container.
Widget.LayoutData of widgets being layouted by AnchorLayout need to be of type AnchorLayoutData.
func NewAnchorLayout ¶
func NewAnchorLayout(opts ...AnchorLayoutOpt) *AnchorLayout
NewAnchorLayout constructs a new AnchorLayout, configured by opts.
func (*AnchorLayout) Layout ¶
func (a *AnchorLayout) Layout(widgets []PreferredSizeLocateableWidget, rect image.Rectangle)
Layout implements Layouter.
func (*AnchorLayout) PreferredSize ¶
func (a *AnchorLayout) PreferredSize(widgets []PreferredSizeLocateableWidget) (int, int)
PreferredSize implements Layouter.
type AnchorLayoutData ¶
type AnchorLayoutData struct { // HorizontalPosition specifies the horizontal anchoring position. HorizontalPosition AnchorLayoutPosition // VerticalPosition specifies the vertical anchoring position. VerticalPosition AnchorLayoutPosition // StretchHorizontal specifies whether to stretch in the horizontal direction. StretchHorizontal bool // StretchVertical specifies whether to stretch in the vertical direction. StretchVertical bool // Sets the padding for the child. Padding Insets }
AnchorLayoutData specifies layout settings for a widget.
type AnchorLayoutOpt ¶
type AnchorLayoutOpt func(a *AnchorLayout)
AnchorLayoutOpt is a function that configures a.
type AnchorLayoutOptions ¶
type AnchorLayoutOptions struct { }
var AnchorLayoutOpts AnchorLayoutOptions
AnchorLayoutOpts contains functions that configure an AnchorLayout.
func (AnchorLayoutOptions) Padding ¶
func (o AnchorLayoutOptions) Padding(i Insets) AnchorLayoutOpt
Padding configures an anchor layout to use padding i. This affects all children.
type AnchorLayoutPosition ¶
type AnchorLayoutPosition int
AnchorLayoutPosition is the type used to specify an anchoring position.
type Button ¶
type Button struct { Image *ButtonImage IgnoreTransparentPixels bool KeepPressedOnExit bool ToggleMode bool GraphicImage *ButtonImageImage TextColor *ButtonTextColor // Allows the user to disable space bar and enter automatically triggering a focused button. DisableDefaultKeys bool PressedEvent *event.Event ReleasedEvent *event.Event ClickedEvent *event.Event CursorEnteredEvent *event.Event CursorMovedEvent *event.Event CursorExitedEvent *event.Event StateChangedEvent *event.Event // contains filtered or unexported fields }
func (*Button) AddFocus ¶ added in v0.5.7
func (b *Button) AddFocus(direction FocusDirection, focus Focuser)
func (*Button) GetFocus ¶ added in v0.5.7
func (b *Button) GetFocus(direction FocusDirection) Focuser
func (*Button) PreferredSize ¶
func (*Button) RequestRelayout ¶
func (b *Button) RequestRelayout()
func (*Button) SetLocation ¶
func (*Button) SetState ¶
func (b *Button) SetState(state WidgetState)
func (*Button) SetupInputLayer ¶
func (b *Button) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*Button) State ¶
func (b *Button) State() WidgetState
type ButtonChangedEventArgs ¶
type ButtonChangedEventArgs struct { Button *Button State WidgetState OffsetX int OffsetY int }
type ButtonChangedHandlerFunc ¶
type ButtonChangedHandlerFunc func(args *ButtonChangedEventArgs)
type ButtonClickedEventArgs ¶
type ButtonClickedHandlerFunc ¶
type ButtonClickedHandlerFunc func(args *ButtonClickedEventArgs)
type ButtonCursorHoverHandlerFunc ¶
type ButtonCursorHoverHandlerFunc func(args *ButtonHoverEventArgs)
type ButtonHoverEventArgs ¶
type ButtonImage ¶
type ButtonImageImage ¶
type ButtonImageImage struct { Idle *ebiten.Image Disabled *ebiten.Image }
type ButtonOptions ¶
type ButtonOptions struct { }
var ButtonOpts ButtonOptions
func (ButtonOptions) ClickedHandler ¶
func (o ButtonOptions) ClickedHandler(f ButtonClickedHandlerFunc) ButtonOpt
func (ButtonOptions) CursorEnteredHandler ¶
func (o ButtonOptions) CursorEnteredHandler(f ButtonCursorHoverHandlerFunc) ButtonOpt
func (ButtonOptions) CursorExitedHandler ¶
func (o ButtonOptions) CursorExitedHandler(f ButtonCursorHoverHandlerFunc) ButtonOpt
func (ButtonOptions) CursorMovedHandler ¶ added in v0.5.7
func (o ButtonOptions) CursorMovedHandler(f ButtonCursorHoverHandlerFunc) ButtonOpt
func (ButtonOptions) DisableDefaultKeys ¶ added in v0.5.7
func (o ButtonOptions) DisableDefaultKeys() ButtonOpt
This option will disable enter and space from submitting a focused button.
func (ButtonOptions) Graphic ¶
func (o ButtonOptions) Graphic(i *ebiten.Image) ButtonOpt
func (ButtonOptions) GraphicNineSlice ¶
func (o ButtonOptions) GraphicNineSlice(i *image.NineSlice) ButtonOpt
func (ButtonOptions) GraphicPadding ¶
func (o ButtonOptions) GraphicPadding(i Insets) ButtonOpt
func (ButtonOptions) IgnoreTransparentPixels ¶ added in v0.5.8
func (o ButtonOptions) IgnoreTransparentPixels(ignoreTransparentPixels bool) ButtonOpt
IgnoreTransparentPixels disables mouse events like cursor entered, moved and exited if the mouse pointer is over a pixel that is transparent (alpha = 0). The source of pixels is Image.Idle. This options is especially useful, if your button does not have a rectangular shape.
func (ButtonOptions) Image ¶
func (o ButtonOptions) Image(i *ButtonImage) ButtonOpt
func (ButtonOptions) KeepPressedOnExit ¶
func (o ButtonOptions) KeepPressedOnExit() ButtonOpt
func (ButtonOptions) PressedHandler ¶
func (o ButtonOptions) PressedHandler(f ButtonPressedHandlerFunc) ButtonOpt
func (ButtonOptions) ReleasedHandler ¶
func (o ButtonOptions) ReleasedHandler(f ButtonReleasedHandlerFunc) ButtonOpt
func (ButtonOptions) StateChangedHandler ¶
func (o ButtonOptions) StateChangedHandler(f ButtonChangedHandlerFunc) ButtonOpt
func (ButtonOptions) TabOrder ¶ added in v0.3.0
func (o ButtonOptions) TabOrder(tabOrder int) ButtonOpt
func (ButtonOptions) Text ¶
func (o ButtonOptions) Text(label string, face text.Face, color *ButtonTextColor) ButtonOpt
Text combines three options: TextLabel, TextFace and TextColor. It can be used for the inline configurations of Text object while separate functions are useful for a multi-step configuration.
func (ButtonOptions) TextAndImage ¶
func (o ButtonOptions) TextAndImage(label string, face text.Face, image *ButtonImageImage, color *ButtonTextColor) ButtonOpt
TODO: add parameter for image position (start/end)
func (ButtonOptions) TextColor ¶ added in v0.5.7
func (o ButtonOptions) TextColor(color *ButtonTextColor) ButtonOpt
func (ButtonOptions) TextFace ¶ added in v0.5.7
func (o ButtonOptions) TextFace(face text.Face) ButtonOpt
func (ButtonOptions) TextLabel ¶ added in v0.5.7
func (o ButtonOptions) TextLabel(label string) ButtonOpt
func (ButtonOptions) TextPadding ¶
func (o ButtonOptions) TextPadding(p Insets) ButtonOpt
func (ButtonOptions) TextPosition ¶ added in v0.5.5
func (o ButtonOptions) TextPosition(h TextPosition, v TextPosition) ButtonOpt
TextPosition sets the horizontal and vertical position of the text within the button. Default is TextPositionCenter for both.
func (ButtonOptions) TextProcessBBCode ¶ added in v0.5.7
func (o ButtonOptions) TextProcessBBCode(enabled bool) ButtonOpt
func (ButtonOptions) ToggleMode ¶
func (o ButtonOptions) ToggleMode() ButtonOpt
func (ButtonOptions) WidgetOpts ¶
func (o ButtonOptions) WidgetOpts(opts ...WidgetOpt) ButtonOpt
type ButtonPressedEventArgs ¶
type ButtonPressedHandlerFunc ¶
type ButtonPressedHandlerFunc func(args *ButtonPressedEventArgs)
type ButtonReleasedEventArgs ¶
type ButtonReleasedHandlerFunc ¶
type ButtonReleasedHandlerFunc func(args *ButtonReleasedEventArgs)
type ButtonTextColor ¶
type CanDropFunc ¶ added in v0.4.0
type CanDropFunc func(args *DragAndDropDroppedEventArgs) bool
type Caret ¶
func (*Caret) PreferredSize ¶
func (*Caret) ResetBlinking ¶
func (c *Caret) ResetBlinking()
func (*Caret) SetLocation ¶
type CaretOptions ¶
type CaretOptions struct { }
var CaretOpts CaretOptions
func (CaretOptions) Size ¶
func (o CaretOptions) Size(face text.Face, width int) CaretOpt
type Checkbox ¶
func NewCheckbox ¶
func NewCheckbox(opts ...CheckboxOpt) *Checkbox
func (*Checkbox) AddFocus ¶ added in v0.5.7
func (c *Checkbox) AddFocus(direction FocusDirection, focus Focuser)
func (*Checkbox) GetFocus ¶ added in v0.5.7
func (c *Checkbox) GetFocus(direction FocusDirection) Focuser
func (*Checkbox) PreferredSize ¶
func (*Checkbox) SetLocation ¶
func (*Checkbox) SetState ¶
func (tw *Checkbox) SetState(state WidgetState)
func (*Checkbox) SetupInputLayer ¶
func (c *Checkbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*Checkbox) State ¶
func (tw *Checkbox) State() WidgetState
type CheckboxChangedEventArgs ¶
type CheckboxChangedEventArgs struct { Active *Checkbox State WidgetState }
type CheckboxChangedHandlerFunc ¶
type CheckboxChangedHandlerFunc func(args *CheckboxChangedEventArgs)
type CheckboxGraphicImage ¶
type CheckboxGraphicImage struct { Unchecked *ButtonImageImage Checked *ButtonImageImage Greyed *ButtonImageImage }
type CheckboxOpt ¶
type CheckboxOpt func(c *Checkbox)
type CheckboxOptions ¶
type CheckboxOptions struct { }
var CheckboxOpts CheckboxOptions
func (CheckboxOptions) ButtonOpts ¶
func (o CheckboxOptions) ButtonOpts(opts ...ButtonOpt) CheckboxOpt
func (CheckboxOptions) Image ¶
func (o CheckboxOptions) Image(i *CheckboxGraphicImage) CheckboxOpt
func (CheckboxOptions) InitialState ¶ added in v0.5.8
func (o CheckboxOptions) InitialState(state WidgetState) CheckboxOpt
func (CheckboxOptions) StateChangedHandler ¶
func (o CheckboxOptions) StateChangedHandler(f CheckboxChangedHandlerFunc) CheckboxOpt
func (CheckboxOptions) TabOrder ¶ added in v0.3.0
func (o CheckboxOptions) TabOrder(tabOrder int) CheckboxOpt
func (CheckboxOptions) TriState ¶
func (o CheckboxOptions) TriState() CheckboxOpt
type ComboButton ¶
type ComboButton struct { ContentVisible bool // contains filtered or unexported fields }
func NewComboButton ¶
func NewComboButton(opts ...ComboButtonOpt) *ComboButton
func (*ComboButton) GetWidget ¶
func (c *ComboButton) GetWidget() *Widget
func (*ComboButton) Label ¶
func (c *ComboButton) Label() string
func (*ComboButton) PreferredSize ¶
func (c *ComboButton) PreferredSize() (int, int)
func (*ComboButton) Render ¶
func (c *ComboButton) Render(screen *ebiten.Image)
func (*ComboButton) SetLabel ¶
func (c *ComboButton) SetLabel(l string)
func (*ComboButton) SetLocation ¶
func (c *ComboButton) SetLocation(rect image.Rectangle)
func (*ComboButton) SetupInputLayer ¶
func (c *ComboButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*ComboButton) Update ¶ added in v0.6.0
func (c *ComboButton) Update()
type ComboButtonOpt ¶
type ComboButtonOpt func(c *ComboButton)
type ComboButtonOptions ¶
type ComboButtonOptions struct { }
var ComboButtonOpts ComboButtonOptions
func (ComboButtonOptions) ButtonOpts ¶
func (o ComboButtonOptions) ButtonOpts(opts ...ButtonOpt) ComboButtonOpt
func (ComboButtonOptions) Content ¶
func (o ComboButtonOptions) Content(c HasWidget) ComboButtonOpt
func (ComboButtonOptions) MaxContentHeight ¶
func (o ComboButtonOptions) MaxContentHeight(h int) ComboButtonOpt
type Container ¶
type Container struct { BackgroundImage *image.NineSlice AutoDisableChildren bool // contains filtered or unexported fields }
func NewContainer ¶
func NewContainer(opts ...ContainerOpt) *Container
func (*Container) AddChild ¶
func (c *Container) AddChild(children ...PreferredSizeLocateableWidget) RemoveChildFunc
func (*Container) Children ¶ added in v0.3.0
func (c *Container) Children() []PreferredSizeLocateableWidget
func (*Container) GetDropTargets ¶ added in v0.4.0
func (*Container) GetFocusers ¶ added in v0.3.0
func (*Container) PreferredSize ¶
func (*Container) RemoveChild ¶
func (c *Container) RemoveChild(child PreferredSizeLocateableWidget)
func (*Container) RemoveChildren ¶
func (c *Container) RemoveChildren()
func (*Container) RequestRelayout ¶
func (c *Container) RequestRelayout()
func (*Container) SetLocation ¶
func (*Container) SetupInputLayer ¶
func (c *Container) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type ContainerOpt ¶
type ContainerOpt func(c *Container)
type ContainerOptions ¶
type ContainerOptions struct { }
var ContainerOpts ContainerOptions
func (ContainerOptions) AutoDisableChildren ¶
func (o ContainerOptions) AutoDisableChildren() ContainerOpt
func (ContainerOptions) BackgroundImage ¶
func (o ContainerOptions) BackgroundImage(i *image.NineSlice) ContainerOpt
This will set the background image to the provided NineSlice. If this is set then we will automatically track that the UI has been hovered over for this container Use widget.WidgetOpts.TrackHover(false) to turn this off if desired.
func (ContainerOptions) Layout ¶
func (o ContainerOptions) Layout(layout Layouter) ContainerOpt
func (ContainerOptions) WidgetOpts ¶
func (o ContainerOptions) WidgetOpts(opts ...WidgetOpt) ContainerOpt
type DragAndDrop ¶
type DragAndDrop struct { ContentsOriginVertical DragAndDropAnchor ContentsOriginHorizontal DragAndDropAnchor Offset image.Point AvailableDropTargets []HasWidget // contains filtered or unexported fields }
func NewDragAndDrop ¶
func NewDragAndDrop(opts ...DragAndDropOpt) *DragAndDrop
func (*DragAndDrop) SetupInputLayer ¶
func (d *DragAndDrop) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*DragAndDrop) StartDrag ¶ added in v0.4.0
func (d *DragAndDrop) StartDrag()
To avoid conflicting with dragging, if you trigger it on left click you should put the trigger in the button released event
func (*DragAndDrop) StopDrag ¶ added in v0.4.0
func (d *DragAndDrop) StopDrag()
func (*DragAndDrop) Update ¶ added in v0.6.0
func (d *DragAndDrop) Update(parent HasWidget)
type DragAndDropAnchor ¶ added in v0.4.0
type DragAndDropAnchor int
const ( // Anchor at the start of the element DND_ANCHOR_START DragAndDropAnchor = iota // Anchor in the middle of the element DND_ANCHOR_MIDDLE // Anchor at the end of the element DND_ANCHOR_END )
type DragAndDropDroppedHandlerFunc ¶
type DragAndDropDroppedHandlerFunc func(args *DragAndDropDroppedEventArgs)
type DragAndDropOpt ¶
type DragAndDropOpt func(d *DragAndDrop)
type DragAndDropOptions ¶
type DragAndDropOptions struct { }
var DragAndDropOpts DragAndDropOptions
func (DragAndDropOptions) ContentsCreater ¶
func (o DragAndDropOptions) ContentsCreater(c DragContentsCreater) DragAndDropOpt
func (DragAndDropOptions) ContentsOriginHorizontal ¶ added in v0.4.0
func (o DragAndDropOptions) ContentsOriginHorizontal(contentsOriginHorizontal DragAndDropAnchor) DragAndDropOpt
The horizontal position of the anchor on the tooltip.
Optional - Defaults to DND_ANCHOR_MIDDLE
func (DragAndDropOptions) ContentsOriginVertical ¶ added in v0.4.0
func (o DragAndDropOptions) ContentsOriginVertical(contentsOriginVertical DragAndDropAnchor) DragAndDropOpt
The vertical position of the anchor on the tooltip.
Optional - Defaults to DND_ANCHOR_MIDDLE
func (DragAndDropOptions) DisableDrag ¶ added in v0.4.0
func (o DragAndDropOptions) DisableDrag() DragAndDropOpt
Disable Drag to start Drag and Drop. You may use the "StartDrag()" method on this object or the to begin the drag operation.
Expected use-case: click to pick up, click to drop.
func (DragAndDropOptions) MinDragStartDistance ¶
func (o DragAndDropOptions) MinDragStartDistance(d int) DragAndDropOpt
The minimum distance in pixels a user must drag their cursor to display the dragged element.
Optional - Defaults to 15 pixels
func (DragAndDropOptions) Offset ¶ added in v0.4.0
func (o DragAndDropOptions) Offset(off image.Point) DragAndDropOpt
The X/Y offsets from the Tooltip anchor point
type DragContentsCreater ¶
type DragContentsEnder ¶ added in v0.4.3
type DragContentsUpdater ¶
type DropFunc ¶ added in v0.4.0
type DropFunc func(args *DragAndDropDroppedEventArgs)
type FlipBook ¶
type FlipBook struct {
// contains filtered or unexported fields
}
A FlipBook is a container that always renders exactly one child widget: the current page. The current page will be embedded in a AnchorLayout.
func NewFlipBook ¶
func NewFlipBook(opts ...FlipBookOpt) *FlipBook
NewFlipBook constructs a new FlipBook configured with opts.
func (*FlipBook) GetDropTargets ¶ added in v0.4.0
func (*FlipBook) GetFocusers ¶ added in v0.3.0
func (*FlipBook) PreferredSize ¶
PreferredSize implements PreferredSizer.
func (*FlipBook) Render ¶
func (f *FlipBook) Render(screen *ebiten.Image)
Render implements Renderer.
func (*FlipBook) RequestRelayout ¶
func (f *FlipBook) RequestRelayout()
RequestRelayout implements Relayoutable.
func (*FlipBook) SetLocation ¶
SetLocation implements Locateable.
func (*FlipBook) SetPage ¶
func (f *FlipBook) SetPage(page PreferredSizeLocateableWidget)
SetPage sets the current page to be rendered to page. The previous page will no longer be rendered.
Note that when switching to a new page, it may be necessary to re-layout parent containers if the pages are of different sizes.
func (*FlipBook) SetupInputLayer ¶
func (f *FlipBook) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
SetupInputLayer implements InputLayerer.
type FlipBookOptions ¶
type FlipBookOptions struct { }
var FlipBookOpts FlipBookOptions
FlipBookOpts contains functions that configure a FlipBook.
func (FlipBookOptions) ContainerOpts ¶
func (o FlipBookOptions) ContainerOpts(opts ...ContainerOpt) FlipBookOpt
WithContainerOpts configures a FlipBook with opts.
func (FlipBookOptions) Padding ¶
func (o FlipBookOptions) Padding(i Insets) FlipBookOpt
WithPadding configures a FlipBook with padding i.
type FocusDirection ¶ added in v0.5.7
type FocusDirection int
const ( FOCUS_NEXT FocusDirection = iota FOCUS_PREVIOUS FOCUS_NORTH FOCUS_NORTHEAST FOCUS_EAST FOCUS_SOUTHEAST FOCUS_SOUTH FOCUS_SOUTHWEST FOCUS_WEST FOCUS_NORTHWEST )
type Focuser ¶
type Focuser interface { HasWidget Focus(focused bool) IsFocused() bool TabOrder() int GetFocus(direction FocusDirection) Focuser AddFocus(direction FocusDirection, focus Focuser) }
type Graphic ¶
type Graphic struct { Image *ebiten.Image ImageNineSlice *image.NineSlice // contains filtered or unexported fields }
func NewGraphic ¶
func NewGraphic(opts ...GraphicOpt) *Graphic
func (*Graphic) PreferredSize ¶
func (*Graphic) SetLocation ¶
type GraphicOpt ¶
type GraphicOpt func(g *Graphic)
type GraphicOptions ¶
type GraphicOptions struct { }
var GraphicOpts GraphicOptions
func (GraphicOptions) Image ¶
func (o GraphicOptions) Image(i *ebiten.Image) GraphicOpt
func (GraphicOptions) ImageNineSlice ¶
func (o GraphicOptions) ImageNineSlice(i *image.NineSlice) GraphicOpt
func (GraphicOptions) WidgetOpts ¶
func (o GraphicOptions) WidgetOpts(opts ...WidgetOpt) GraphicOpt
type GridLayout ¶
type GridLayout struct {
// contains filtered or unexported fields
}
GridLayout layouts widgets in a grid fashion, with columns or rows optionally being stretched.
Widget.LayoutData of widgets being layouted by GridLayout need to be of type GridLayoutData.
func NewGridLayout ¶
func NewGridLayout(opts ...GridLayoutOpt) *GridLayout
NewGridLayout constructs a new GridLayout, configured by opts.
func (*GridLayout) Layout ¶
func (g *GridLayout) Layout(widgets []PreferredSizeLocateableWidget, rect image.Rectangle)
Layout implements Layouter.
func (*GridLayout) PreferredSize ¶
func (g *GridLayout) PreferredSize(widgets []PreferredSizeLocateableWidget) (int, int)
PreferredSize implements Layouter.
type GridLayoutData ¶
type GridLayoutData struct { // MaxWidth specifies the maximum width. MaxWidth int // MaxHeight specifies the maximum height.. MaxHeight int // HorizontalPosition specifies the horizontal anchoring position inside the grid cell. HorizontalPosition GridLayoutPosition // VerticalPosition specifies the vertical anchoring position inside the grid cell. VerticalPosition GridLayoutPosition }
GridLayoutData specifies layout settings for a widget.
type GridLayoutOpt ¶
type GridLayoutOpt func(g *GridLayout)
GridLayoutOpt is a function that configures g.
type GridLayoutOptions ¶
type GridLayoutOptions struct { }
var GridLayoutOpts GridLayoutOptions
GridLayoutOpts contains functions that configure a GridLayout.
func (GridLayoutOptions) Columns ¶
func (o GridLayoutOptions) Columns(c int) GridLayoutOpt
Columns configures a grid layout to use c columns.
func (GridLayoutOptions) Padding ¶
func (o GridLayoutOptions) Padding(i Insets) GridLayoutOpt
Padding configures a grid layout to use padding i.
func (GridLayoutOptions) Spacing ¶
func (o GridLayoutOptions) Spacing(c int, r int) GridLayoutOpt
Spacing configures a grid layout to separate columns by spacing c and rows by spacing r.
func (GridLayoutOptions) Stretch ¶
func (o GridLayoutOptions) Stretch(c []bool, r []bool) GridLayoutOpt
Stretch configures a grid layout to stretch columns according to c and rows according to r. The number of elements of c and r must correspond with the number of columns and rows in the layout.
type GridLayoutPosition ¶
type GridLayoutPosition int
GridLayoutPosition is the type used to specify an anchoring position.
type HasWidget ¶
type HasWidget interface {
GetWidget() *Widget
}
HasWidget must be implemented by concrete widget types to get their Widget.
type Insets ¶
func NewInsetsSimple ¶
type Label ¶
type Label struct { Label string // contains filtered or unexported fields }
func (*Label) PreferredSize ¶
func (*Label) SetLocation ¶
type LabelOptions ¶
type LabelOptions struct { }
var LabelOpts LabelOptions
func (LabelOptions) Text ¶
func (o LabelOptions) Text(label string, face text.Face, color *LabelColor) LabelOpt
func (LabelOptions) TextOpts ¶
func (o LabelOptions) TextOpts(opts ...TextOpt) LabelOpt
type LabelOrder ¶ added in v0.4.1
type LabelOrder int
const ( CHECKBOX_FIRST LabelOrder = iota LABEL_FIRST )
type LabeledCheckbox ¶
type LabeledCheckbox struct {
// contains filtered or unexported fields
}
func NewLabeledCheckbox ¶
func NewLabeledCheckbox(opts ...LabeledCheckboxOpt) *LabeledCheckbox
func (*LabeledCheckbox) AddFocus ¶ added in v0.5.7
func (l *LabeledCheckbox) AddFocus(direction FocusDirection, focus Focuser)
func (*LabeledCheckbox) Checkbox ¶
func (l *LabeledCheckbox) Checkbox() *Checkbox
func (*LabeledCheckbox) Click ¶ added in v0.5.7
func (l *LabeledCheckbox) Click()
func (*LabeledCheckbox) Focus ¶ added in v0.3.0
func (l *LabeledCheckbox) Focus(focused bool)
func (*LabeledCheckbox) GetFocus ¶ added in v0.5.7
func (l *LabeledCheckbox) GetFocus(direction FocusDirection) Focuser
func (*LabeledCheckbox) GetWidget ¶
func (l *LabeledCheckbox) GetWidget() *Widget
func (*LabeledCheckbox) IsFocused ¶ added in v0.5.3
func (l *LabeledCheckbox) IsFocused() bool
func (*LabeledCheckbox) Label ¶
func (l *LabeledCheckbox) Label() *Label
func (*LabeledCheckbox) PreferredSize ¶
func (l *LabeledCheckbox) PreferredSize() (int, int)
func (*LabeledCheckbox) Render ¶
func (l *LabeledCheckbox) Render(screen *ebiten.Image)
func (*LabeledCheckbox) SetLocation ¶
func (l *LabeledCheckbox) SetLocation(rect image.Rectangle)
func (*LabeledCheckbox) SetState ¶ added in v0.4.1
func (l *LabeledCheckbox) SetState(state WidgetState)
func (*LabeledCheckbox) SetupInputLayer ¶
func (l *LabeledCheckbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*LabeledCheckbox) TabOrder ¶ added in v0.3.0
func (l *LabeledCheckbox) TabOrder() int
func (*LabeledCheckbox) Update ¶ added in v0.6.0
func (l *LabeledCheckbox) Update()
type LabeledCheckboxOpt ¶
type LabeledCheckboxOpt func(l *LabeledCheckbox)
type LabeledCheckboxOptions ¶
type LabeledCheckboxOptions struct { }
var LabeledCheckboxOpts LabeledCheckboxOptions
func (LabeledCheckboxOptions) CheckboxOpts ¶
func (o LabeledCheckboxOptions) CheckboxOpts(opts ...CheckboxOpt) LabeledCheckboxOpt
func (LabeledCheckboxOptions) LabelFirst ¶ added in v0.4.1
func (o LabeledCheckboxOptions) LabelFirst() LabeledCheckboxOpt
func (LabeledCheckboxOptions) LabelOpts ¶
func (o LabeledCheckboxOptions) LabelOpts(opts ...LabelOpt) LabeledCheckboxOpt
func (LabeledCheckboxOptions) Spacing ¶
func (o LabeledCheckboxOptions) Spacing(s int) LabeledCheckboxOpt
func (LabeledCheckboxOptions) WidgetOpts ¶ added in v0.4.1
func (o LabeledCheckboxOptions) WidgetOpts(opts ...WidgetOpt) LabeledCheckboxOpt
type Layouter ¶
type Layouter interface { PreferredSize(widgets []PreferredSizeLocateableWidget) (int, int) Layout(widgets []PreferredSizeLocateableWidget, rect image.Rectangle) }
type List ¶
func (*List) AddEntry ¶ added in v0.5.5
Add a new entry to the end of the list Note: Duplicates will not be added
func (*List) AddFocus ¶ added in v0.5.7
func (l *List) AddFocus(direction FocusDirection, focus Focuser)
func (*List) FocusPrevious ¶ added in v0.5.7
func (l *List) FocusPrevious()
func (*List) GetFocus ¶ added in v0.5.7
func (l *List) GetFocus(direction FocusDirection) Focuser
func (*List) PreferredSize ¶
func (*List) RemoveEntry ¶ added in v0.5.5
Remove the passed in entry from the list if it exists
func (*List) RequestRelayout ¶
func (l *List) RequestRelayout()
func (*List) SelectFocused ¶ added in v0.5.7
func (l *List) SelectFocused()
func (*List) SelectedEntry ¶
Return the currently selected entry in the list
func (*List) SetEntries ¶ added in v0.5.5
Updates the entries in the list. Note: Duplicates will be removed.
func (*List) SetLocation ¶
func (*List) SetSelectedEntry ¶
Set the Selected Entry to e if it is found.
func (*List) SetupInputLayer ¶
func (l *List) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type ListComboButton ¶
type ListComboButton struct { EntrySelectedEvent *event.Event // contains filtered or unexported fields }
func NewListComboButton ¶
func NewListComboButton(opts ...ListComboButtonOpt) *ListComboButton
func (*ListComboButton) AddFocus ¶ added in v0.5.7
func (l *ListComboButton) AddFocus(direction FocusDirection, focus Focuser)
func (*ListComboButton) ContentVisible ¶
func (l *ListComboButton) ContentVisible() bool
func (*ListComboButton) Focus ¶ added in v0.3.0
func (l *ListComboButton) Focus(focused bool)
func (*ListComboButton) FocusNext ¶ added in v0.5.7
func (l *ListComboButton) FocusNext()
func (*ListComboButton) FocusPrevious ¶ added in v0.5.7
func (l *ListComboButton) FocusPrevious()
func (*ListComboButton) GetFocus ¶ added in v0.5.7
func (l *ListComboButton) GetFocus(direction FocusDirection) Focuser
func (*ListComboButton) GetWidget ¶
func (l *ListComboButton) GetWidget() *Widget
func (*ListComboButton) IsFocused ¶ added in v0.5.3
func (l *ListComboButton) IsFocused() bool
func (*ListComboButton) Label ¶
func (l *ListComboButton) Label() string
func (*ListComboButton) PreferredSize ¶
func (l *ListComboButton) PreferredSize() (int, int)
func (*ListComboButton) Render ¶
func (l *ListComboButton) Render(screen *ebiten.Image)
func (*ListComboButton) SelectFocused ¶ added in v0.5.7
func (l *ListComboButton) SelectFocused()
func (*ListComboButton) SelectedEntry ¶
func (l *ListComboButton) SelectedEntry() interface{}
func (*ListComboButton) SetContentVisible ¶
func (l *ListComboButton) SetContentVisible(v bool)
func (*ListComboButton) SetLocation ¶
func (l *ListComboButton) SetLocation(rect image.Rectangle)
func (*ListComboButton) SetSelectedEntry ¶
func (l *ListComboButton) SetSelectedEntry(e interface{})
func (*ListComboButton) SetupInputLayer ¶
func (l *ListComboButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*ListComboButton) TabOrder ¶ added in v0.3.0
func (l *ListComboButton) TabOrder() int
func (*ListComboButton) Update ¶ added in v0.6.0
func (l *ListComboButton) Update()
type ListComboButtonEntrySelectedEventArgs ¶
type ListComboButtonEntrySelectedEventArgs struct { Button *ListComboButton Entry interface{} PreviousEntry interface{} }
type ListComboButtonEntrySelectedHandlerFunc ¶
type ListComboButtonEntrySelectedHandlerFunc func(args *ListComboButtonEntrySelectedEventArgs)
type ListComboButtonOpt ¶
type ListComboButtonOpt func(l *ListComboButton)
type ListComboButtonOptions ¶
type ListComboButtonOptions struct { }
var ListComboButtonOpts ListComboButtonOptions
func (ListComboButtonOptions) DisableDefaultKeys ¶ added in v0.3.3
func (o ListComboButtonOptions) DisableDefaultKeys(val bool) ListComboButtonOpt
func (ListComboButtonOptions) EntryLabelFunc ¶
func (o ListComboButtonOptions) EntryLabelFunc(button SelectComboButtonEntryLabelFunc, list ListEntryLabelFunc) ListComboButtonOpt
func (ListComboButtonOptions) EntrySelectedHandler ¶
func (o ListComboButtonOptions) EntrySelectedHandler(f ListComboButtonEntrySelectedHandlerFunc) ListComboButtonOpt
func (ListComboButtonOptions) ListOpts ¶
func (o ListComboButtonOptions) ListOpts(opts ...ListOpt) ListComboButtonOpt
func (ListComboButtonOptions) SelectComboButtonOpts ¶
func (o ListComboButtonOptions) SelectComboButtonOpts(opts ...SelectComboButtonOpt) ListComboButtonOpt
func (ListComboButtonOptions) TabOrder ¶ added in v0.3.0
func (o ListComboButtonOptions) TabOrder(tabOrder int) ListComboButtonOpt
func (ListComboButtonOptions) Text ¶
func (o ListComboButtonOptions) Text(face text.Face, image *ButtonImageImage, color *ButtonTextColor) ListComboButtonOpt
type ListEntryColor ¶
type ListEntryColor struct { Unselected color.Color Selected color.Color DisabledUnselected color.Color DisabledSelected color.Color SelectingBackground color.Color SelectedBackground color.Color FocusedBackground color.Color SelectingFocusedBackground color.Color SelectedFocusedBackground color.Color DisabledSelectedBackground color.Color }
type ListEntryLabelFunc ¶
type ListEntrySelectedHandlerFunc ¶
type ListEntrySelectedHandlerFunc func(args *ListEntrySelectedEventArgs)
type ListOptions ¶
type ListOptions struct { }
var ListOpts ListOptions
func (ListOptions) AllowReselect ¶
func (o ListOptions) AllowReselect() ListOpt
func (ListOptions) ContainerOpts ¶
func (o ListOptions) ContainerOpts(opts ...ContainerOpt) ListOpt
func (ListOptions) ControlWidgetSpacing ¶
func (o ListOptions) ControlWidgetSpacing(s int) ListOpt
func (ListOptions) DisableDefaultKeys ¶ added in v0.3.3
func (o ListOptions) DisableDefaultKeys(val bool) ListOpt
func (ListOptions) Entries ¶
func (o ListOptions) Entries(e []any) ListOpt
func (ListOptions) EntryColor ¶
func (o ListOptions) EntryColor(c *ListEntryColor) ListOpt
func (ListOptions) EntryFontFace ¶
func (o ListOptions) EntryFontFace(f text.Face) ListOpt
func (ListOptions) EntryLabelFunc ¶
func (o ListOptions) EntryLabelFunc(f ListEntryLabelFunc) ListOpt
func (ListOptions) EntrySelectedHandler ¶
func (o ListOptions) EntrySelectedHandler(f ListEntrySelectedHandlerFunc) ListOpt
func (ListOptions) EntryTextPadding ¶
func (o ListOptions) EntryTextPadding(i Insets) ListOpt
func (ListOptions) EntryTextPosition ¶ added in v0.5.5
func (o ListOptions) EntryTextPosition(h TextPosition, v TextPosition) ListOpt
EntryTextPosition sets the position of the text for entries. Defaults to both TextPositionCenter.
func (ListOptions) HideHorizontalSlider ¶
func (o ListOptions) HideHorizontalSlider() ListOpt
func (ListOptions) HideVerticalSlider ¶
func (o ListOptions) HideVerticalSlider() ListOpt
func (ListOptions) ScrollContainerOpts ¶
func (o ListOptions) ScrollContainerOpts(opts ...ScrollContainerOpt) ListOpt
func (ListOptions) SelectFocus ¶ added in v0.5.6
func (o ListOptions) SelectFocus() ListOpt
SelectFocus automatically selects each focused entry.
func (ListOptions) SliderOpts ¶
func (o ListOptions) SliderOpts(opts ...SliderOpt) ListOpt
func (ListOptions) TabOrder ¶ added in v0.3.0
func (o ListOptions) TabOrder(tabOrder int) ListOpt
type Locateable ¶
type MultiOnce ¶
type MultiOnce struct {
// contains filtered or unexported fields
}
MultiOnce works like sync.Once, but can execute any number of functions.
type PreferredSizeLocateableWidget ¶
type PreferredSizeLocateableWidget interface { HasWidget PreferredSizer Locateable }
type PreferredSizer ¶
PreferredSizer may be implemented by concrete widget types that can report a preferred size.
type ProgressBar ¶
func NewProgressBar ¶
func NewProgressBar(opts ...ProgressBarOpt) *ProgressBar
func (*ProgressBar) Configure ¶
func (s *ProgressBar) Configure(opts ...ProgressBarOpt)
func (*ProgressBar) GetCurrent ¶
func (s *ProgressBar) GetCurrent() int
func (*ProgressBar) GetWidget ¶
func (s *ProgressBar) GetWidget() *Widget
func (*ProgressBar) PreferredSize ¶
func (s *ProgressBar) PreferredSize() (int, int)
func (*ProgressBar) Render ¶
func (s *ProgressBar) Render(screen *ebiten.Image)
func (*ProgressBar) SetCurrent ¶
func (s *ProgressBar) SetCurrent(value int) bool
func (*ProgressBar) SetLocation ¶
func (s *ProgressBar) SetLocation(rect img.Rectangle)
func (*ProgressBar) Update ¶ added in v0.6.0
func (s *ProgressBar) Update()
type ProgressBarImage ¶
type ProgressBarOpt ¶
type ProgressBarOpt func(s *ProgressBar)
type ProgressBarOptions ¶
type ProgressBarOptions struct { }
var ProgressBarOpts ProgressBarOptions
func (ProgressBarOptions) Direction ¶ added in v0.5.5
func (o ProgressBarOptions) Direction(d Direction) ProgressBarOpt
Direction sets the direction of the progress bar. The default is horizontal.
func (ProgressBarOptions) Images ¶
func (o ProgressBarOptions) Images(track *ProgressBarImage, fill *ProgressBarImage) ProgressBarOpt
func (ProgressBarOptions) Inverted ¶ added in v0.5.5
func (o ProgressBarOptions) Inverted(inverted bool) ProgressBarOpt
Inverted sets whether the progress bar is inverted. The default is false, which means from left to right or top to bottom.
func (ProgressBarOptions) TrackPadding ¶
func (o ProgressBarOptions) TrackPadding(i Insets) ProgressBarOpt
func (ProgressBarOptions) Values ¶
func (o ProgressBarOptions) Values(min int, max int, current int) ProgressBarOpt
func (ProgressBarOptions) WidgetOpts ¶
func (o ProgressBarOptions) WidgetOpts(opts ...WidgetOpt) ProgressBarOpt
type RadioGroup ¶
func NewRadioGroup ¶
func NewRadioGroup(opts ...RadioGroupOpt) *RadioGroup
func (*RadioGroup) Active ¶
func (r *RadioGroup) Active() RadioGroupElement
func (*RadioGroup) SetActive ¶
func (r *RadioGroup) SetActive(a RadioGroupElement)
type RadioGroupChangedEventArgs ¶
type RadioGroupChangedEventArgs struct {
Active RadioGroupElement
}
type RadioGroupChangedHandlerFunc ¶
type RadioGroupChangedHandlerFunc func(args *RadioGroupChangedEventArgs)
type RadioGroupElement ¶
type RadioGroupElement interface { SetState(state WidgetState) // contains filtered or unexported methods }
type RadioGroupOpt ¶
type RadioGroupOpt func(r *RadioGroup)
type RadioGroupOptions ¶
type RadioGroupOptions struct { }
var RadioGroupOpts RadioGroupOptions
func (RadioGroupOptions) ChangedHandler ¶
func (o RadioGroupOptions) ChangedHandler(f RadioGroupChangedHandlerFunc) RadioGroupOpt
func (RadioGroupOptions) Elements ¶
func (o RadioGroupOptions) Elements(e ...RadioGroupElement) RadioGroupOpt
func (RadioGroupOptions) InitialElement ¶ added in v0.5.5
func (o RadioGroupOptions) InitialElement(e RadioGroupElement) RadioGroupOpt
This function allows you to select which element should be selected initialially. Otherwise it will select the first element in the Elements array.
type Relayoutable ¶
type Relayoutable interface {
RequestRelayout()
}
type RemoveChildFunc ¶
type RemoveChildFunc func()
type RemoveWindowFunc ¶
type RemoveWindowFunc func()
type RenderFunc ¶
type RenderFunc func(screen *ebiten.Image)
type Renderer ¶
type Renderer interface {
// Render renders the widget onto screen.
Render(screen *ebiten.Image)
}
Renderer may be implemented by concrete widget types that can render onto the screen.
type RowLayout ¶
type RowLayout struct {
// contains filtered or unexported fields
}
RowLayout layouts widgets in either a single row or a single column, optionally stretching them in the other direction.
Widget.LayoutData of widgets being layouted by RowLayout need to be of type RowLayoutData.
func NewRowLayout ¶
func NewRowLayout(opts ...RowLayoutOpt) *RowLayout
NewRowLayout constructs a new RowLayout, configured by opts.
func (*RowLayout) Layout ¶
func (r *RowLayout) Layout(widgets []PreferredSizeLocateableWidget, rect image.Rectangle)
Layout implements Layouter.
func (*RowLayout) PreferredSize ¶
func (r *RowLayout) PreferredSize(widgets []PreferredSizeLocateableWidget) (int, int)
PreferredSize implements Layouter.
type RowLayoutData ¶
type RowLayoutData struct { // Position specifies the anchoring position for the direction that is not the primary direction of the layout. Position RowLayoutPosition // Stretch specifies whether to stretch in the direction that is not the primary direction of the layout. Stretch bool // MaxWidth specifies the maximum width. MaxWidth int // MaxHeight specifies the maximum height. MaxHeight int }
RowLayoutData specifies layout settings for a widget.
type RowLayoutOpt ¶
type RowLayoutOpt func(r *RowLayout)
RowLayoutOpt is a function that configures r.
type RowLayoutOptions ¶
type RowLayoutOptions struct { }
var RowLayoutOpts RowLayoutOptions
RowLayoutOpts contains functions that configure a RowLayout.
func (RowLayoutOptions) Direction ¶
func (o RowLayoutOptions) Direction(d Direction) RowLayoutOpt
Direction configures a row layout to layout widgets in the primary direction d. This will also switch the meaning of any widget's RowLayoutData.Position and RowLayoutData.Stretch to the other direction.
func (RowLayoutOptions) Padding ¶
func (o RowLayoutOptions) Padding(i Insets) RowLayoutOpt
Padding configures a row layout to use padding i.
func (RowLayoutOptions) Spacing ¶
func (o RowLayoutOptions) Spacing(s int) RowLayoutOpt
Spacing configures a row layout to separate widgets by spacing s.
type RowLayoutPosition ¶
type RowLayoutPosition int
RowLayoutPosition is the type used to specify an anchoring position.
type ScrollContainer ¶
type ScrollContainer struct { ScrollLeft float64 ScrollTop float64 // contains filtered or unexported fields }
func NewScrollContainer ¶
func NewScrollContainer(opts ...ScrollContainerOpt) *ScrollContainer
func (*ScrollContainer) ContentRect ¶
func (s *ScrollContainer) ContentRect() img.Rectangle
func (*ScrollContainer) GetDropTargets ¶ added in v0.4.0
func (s *ScrollContainer) GetDropTargets() []HasWidget
func (*ScrollContainer) GetFocusers ¶ added in v0.3.0
func (s *ScrollContainer) GetFocusers() []Focuser
func (*ScrollContainer) GetWidget ¶
func (s *ScrollContainer) GetWidget() *Widget
func (*ScrollContainer) PreferredSize ¶
func (s *ScrollContainer) PreferredSize() (int, int)
func (*ScrollContainer) Render ¶
func (s *ScrollContainer) Render(screen *ebiten.Image)
func (*ScrollContainer) SetLocation ¶
func (s *ScrollContainer) SetLocation(rect img.Rectangle)
func (*ScrollContainer) SetupInputLayer ¶
func (s *ScrollContainer) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*ScrollContainer) Update ¶ added in v0.6.0
func (s *ScrollContainer) Update()
func (*ScrollContainer) ViewRect ¶ added in v0.5.6
func (s *ScrollContainer) ViewRect() img.Rectangle
type ScrollContainerImage ¶
type ScrollContainerOpt ¶
type ScrollContainerOpt func(s *ScrollContainer)
type ScrollContainerOptions ¶
type ScrollContainerOptions struct { }
var ScrollContainerOpts ScrollContainerOptions
func (ScrollContainerOptions) Content ¶
func (o ScrollContainerOptions) Content(c HasWidget) ScrollContainerOpt
func (ScrollContainerOptions) Image ¶
func (o ScrollContainerOptions) Image(i *ScrollContainerImage) ScrollContainerOpt
func (ScrollContainerOptions) Padding ¶
func (o ScrollContainerOptions) Padding(p Insets) ScrollContainerOpt
func (ScrollContainerOptions) StretchContentWidth ¶
func (o ScrollContainerOptions) StretchContentWidth() ScrollContainerOpt
func (ScrollContainerOptions) WidgetOpts ¶
func (o ScrollContainerOptions) WidgetOpts(opts ...WidgetOpt) ScrollContainerOpt
type ScrollMode ¶ added in v0.2.7
type ScrollMode int
const ( // Default. Scrolling is not automatically handled None ScrollMode = iota // The TextArea is automatically scrolled to the beginning on change ScrollBeginning // The TextArea is automatically scrolled to the end on change ScrollEnd // The TextArea will initially position the text at the end of the scroll area PositionAtEnd )
type SelectComboButton ¶
type SelectComboButton struct { EntrySelectedEvent *event.Event // contains filtered or unexported fields }
func NewSelectComboButton ¶
func NewSelectComboButton(opts ...SelectComboButtonOpt) *SelectComboButton
func (*SelectComboButton) ContentVisible ¶
func (s *SelectComboButton) ContentVisible() bool
func (*SelectComboButton) GetWidget ¶
func (s *SelectComboButton) GetWidget() *Widget
func (*SelectComboButton) Label ¶
func (s *SelectComboButton) Label() string
func (*SelectComboButton) PreferredSize ¶
func (s *SelectComboButton) PreferredSize() (int, int)
func (*SelectComboButton) Render ¶
func (s *SelectComboButton) Render(screen *ebiten.Image)
func (*SelectComboButton) SelectedEntry ¶
func (s *SelectComboButton) SelectedEntry() interface{}
func (*SelectComboButton) SetContentVisible ¶
func (s *SelectComboButton) SetContentVisible(v bool)
func (*SelectComboButton) SetLabel ¶
func (s *SelectComboButton) SetLabel(l string)
func (*SelectComboButton) SetLocation ¶
func (s *SelectComboButton) SetLocation(rect image.Rectangle)
func (*SelectComboButton) SetSelectedEntry ¶
func (s *SelectComboButton) SetSelectedEntry(e interface{})
func (*SelectComboButton) SetupInputLayer ¶
func (s *SelectComboButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*SelectComboButton) Update ¶ added in v0.6.0
func (s *SelectComboButton) Update()
type SelectComboButtonEntryLabelFunc ¶
type SelectComboButtonEntryLabelFunc func(e interface{}) string
type SelectComboButtonEntrySelectedEventArgs ¶
type SelectComboButtonEntrySelectedEventArgs struct { Button *SelectComboButton Entry interface{} PreviousEntry interface{} }
type SelectComboButtonEntrySelectedHandlerFunc ¶
type SelectComboButtonEntrySelectedHandlerFunc func(args *SelectComboButtonEntrySelectedEventArgs)
type SelectComboButtonOpt ¶
type SelectComboButtonOpt func(s *SelectComboButton)
type SelectComboButtonOptions ¶
type SelectComboButtonOptions struct { }
var SelectComboButtonOpts SelectComboButtonOptions
func (SelectComboButtonOptions) ComboButtonOpts ¶
func (o SelectComboButtonOptions) ComboButtonOpts(opts ...ComboButtonOpt) SelectComboButtonOpt
func (SelectComboButtonOptions) EntryLabelFunc ¶
func (o SelectComboButtonOptions) EntryLabelFunc(f SelectComboButtonEntryLabelFunc) SelectComboButtonOpt
func (SelectComboButtonOptions) EntrySelectedHandler ¶
func (o SelectComboButtonOptions) EntrySelectedHandler(f SelectComboButtonEntrySelectedHandlerFunc) SelectComboButtonOpt
type Slider ¶
type Slider struct { Min int Max int Current int DrawTrackDisabled bool ChangedEvent *event.Event // contains filtered or unexported fields }
func (*Slider) AddFocus ¶ added in v0.5.7
func (s *Slider) AddFocus(direction FocusDirection, focus Focuser)
func (*Slider) GetFocus ¶ added in v0.5.7
func (s *Slider) GetFocus(direction FocusDirection) Focuser
func (*Slider) PreferredSize ¶
func (*Slider) SetLocation ¶
func (*Slider) SetupInputLayer ¶
func (s *Slider) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type SliderChangedEventArgs ¶
type SliderChangedHandlerFunc ¶
type SliderChangedHandlerFunc func(args *SliderChangedEventArgs)
type SliderOptions ¶
type SliderOptions struct { }
var SliderOpts SliderOptions
func (SliderOptions) ChangedHandler ¶
func (o SliderOptions) ChangedHandler(f SliderChangedHandlerFunc) SliderOpt
func (SliderOptions) Direction ¶
func (o SliderOptions) Direction(d Direction) SliderOpt
func (SliderOptions) DisableDefaultKeys ¶ added in v0.3.3
func (o SliderOptions) DisableDefaultKeys(val bool) SliderOpt
func (SliderOptions) FixedHandleSize ¶
func (o SliderOptions) FixedHandleSize(s int) SliderOpt
func (SliderOptions) HandleImage ¶ added in v0.5.7
func (o SliderOptions) HandleImage(handle *ButtonImage) SliderOpt
This sets the handle images (required)
func (SliderOptions) Images ¶
func (o SliderOptions) Images(track *SliderTrackImage, handle *ButtonImage) SliderOpt
This sets the track images (not required) and the handle images (required)
func (SliderOptions) MinHandleSize ¶
func (o SliderOptions) MinHandleSize(s int) SliderOpt
func (SliderOptions) PageSizeFunc ¶
func (o SliderOptions) PageSizeFunc(f SliderPageSizeFunc) SliderOpt
func (SliderOptions) TabOrder ¶ added in v0.3.0
func (o SliderOptions) TabOrder(tabOrder int) SliderOpt
func (SliderOptions) TrackImage ¶ added in v0.5.7
func (o SliderOptions) TrackImage(track *SliderTrackImage) SliderOpt
This sets the track images (not required)
func (SliderOptions) TrackOffset ¶
func (o SliderOptions) TrackOffset(i int) SliderOpt
func (SliderOptions) TrackPadding ¶
func (o SliderOptions) TrackPadding(i Insets) SliderOpt
func (SliderOptions) WidgetOpts ¶
func (o SliderOptions) WidgetOpts(opts ...WidgetOpt) SliderOpt
type SliderPageSizeFunc ¶
type SliderPageSizeFunc func() int
type SliderTrackImage ¶
type StackedLayout ¶ added in v0.2.4
type StackedLayout struct {
// contains filtered or unexported fields
}
StackedLayout lays out multiple widgets stacked on top of each other in the order they are added as children Each child will have the dimensions equal to the max size of all the StackedLayout's children
Note: Events will propogate to each layer. e.g. if you have overlapping buttons, a click event over both will trigger both events.
Widget.LayoutData of widgets being layed out by StackedLayout should be left empty.
func NewStackedLayout ¶ added in v0.2.4
func NewStackedLayout(opts ...StackedLayoutOpt) *StackedLayout
NewStackedLayout constructs a new StackedLayout, configured by opts.
func (*StackedLayout) Layout ¶ added in v0.2.4
func (a *StackedLayout) Layout(widgets []PreferredSizeLocateableWidget, rect image.Rectangle)
Layout implements Layouter.
func (*StackedLayout) PreferredSize ¶ added in v0.2.4
func (a *StackedLayout) PreferredSize(widgets []PreferredSizeLocateableWidget) (int, int)
PreferredSize implements Layouter.
type StackedLayoutData ¶ added in v0.2.4
type StackedLayoutData struct { }
StackedLayoutData specifies layout settings for a widget.
type StackedLayoutOpt ¶ added in v0.2.4
type StackedLayoutOpt func(a *StackedLayout)
StackedLayoutOpt is a function that configures a.
type StackedLayoutOptions ¶ added in v0.2.4
type StackedLayoutOptions struct { }
var StackedLayoutOpts StackedLayoutOptions
StackedLayoutOpts contains functions that configure an StackedLayout.
func (StackedLayoutOptions) Padding ¶ added in v0.2.4
func (o StackedLayoutOptions) Padding(i Insets) StackedLayoutOpt
Padding configures an Stacked layout to use padding i.
type TabBook ¶
func NewTabBook ¶
func NewTabBook(opts ...TabBookOpt) *TabBook
func (*TabBook) GetDropTargets ¶ added in v0.4.3
func (*TabBook) GetTabButton ¶ added in v0.5.7
func (t *TabBook) GetTabButton(tab *TabBookTab) *Button
Return the button associated with the provided TabBookTab if not exists else nil
func (*TabBook) PreferredSize ¶
func (*TabBook) RequestRelayout ¶
func (t *TabBook) RequestRelayout()
func (*TabBook) SetLocation ¶
func (*TabBook) SetTab ¶
func (t *TabBook) SetTab(tab *TabBookTab)
Set the current tab for the tab book.
Note: This method should only be called after the ui is running. To set the initial tab please use the TabBookOptions.InitialTab method during tabbook creation.
func (*TabBook) SetupInputLayer ¶
func (t *TabBook) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type TabBookOpt ¶
type TabBookOpt func(t *TabBook)
type TabBookOptions ¶
type TabBookOptions struct { }
var TabBookOpts TabBookOptions
func (TabBookOptions) ContainerOpts ¶
func (o TabBookOptions) ContainerOpts(opts ...ContainerOpt) TabBookOpt
func (TabBookOptions) FlipBookOpts ¶
func (o TabBookOptions) FlipBookOpts(opts ...FlipBookOpt) TabBookOpt
func (TabBookOptions) InitialTab ¶ added in v0.5.5
func (o TabBookOptions) InitialTab(tab *TabBookTab) TabBookOpt
func (TabBookOptions) Spacing ¶
func (o TabBookOptions) Spacing(s int) TabBookOpt
func (TabBookOptions) TabButtonImage ¶
func (o TabBookOptions) TabButtonImage(buttonImages *ButtonImage) TabBookOpt
func (TabBookOptions) TabButtonOpts ¶
func (o TabBookOptions) TabButtonOpts(opts ...ButtonOpt) TabBookOpt
func (TabBookOptions) TabButtonSpacing ¶
func (o TabBookOptions) TabButtonSpacing(s int) TabBookOpt
func (TabBookOptions) TabButtonText ¶
func (o TabBookOptions) TabButtonText(face text.Face, color *ButtonTextColor) TabBookOpt
func (TabBookOptions) TabSelectedHandler ¶
func (o TabBookOptions) TabSelectedHandler(f TabBookTabSelectedHandlerFunc) TabBookOpt
func (TabBookOptions) Tabs ¶
func (o TabBookOptions) Tabs(tabs ...*TabBookTab) TabBookOpt
type TabBookTab ¶
func NewTabBookTab ¶
func NewTabBookTab(label string, opts ...ContainerOpt) *TabBookTab
type TabBookTabSelectedEventArgs ¶
type TabBookTabSelectedEventArgs struct { TabBook *TabBook Tab *TabBookTab PreviousTab *TabBookTab }
type TabBookTabSelectedHandlerFunc ¶
type TabBookTabSelectedHandlerFunc func(args *TabBookTabSelectedEventArgs)
type Text ¶
type Text struct { Label string Face text.Face Color color.Color MaxWidth float64 Inset Insets // contains filtered or unexported fields }
func (*Text) PreferredSize ¶
func (*Text) SetLocation ¶
type TextArea ¶
type TextArea struct {
// contains filtered or unexported fields
}
func NewTextArea ¶
func NewTextArea(opts ...TextAreaOpt) *TextArea
func (*TextArea) AppendText ¶
func (*TextArea) GetFocusers ¶ added in v0.3.0
func (*TextArea) PreferredSize ¶
func (*TextArea) PrependText ¶
func (*TextArea) RequestRelayout ¶
func (l *TextArea) RequestRelayout()
func (*TextArea) SetLocation ¶
func (*TextArea) SetupInputLayer ¶
func (l *TextArea) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type TextAreaEntrySelectedEventArgs ¶
type TextAreaEntrySelectedEventArgs struct { TextArea *TextArea Entry interface{} PreviousEntry interface{} }
type TextAreaEntrySelectedHandlerFunc ¶
type TextAreaEntrySelectedHandlerFunc func(args *TextAreaEntrySelectedEventArgs)
type TextAreaOpt ¶
type TextAreaOpt func(l *TextArea)
type TextAreaOptions ¶
type TextAreaOptions struct { }
var TextAreaOpts TextAreaOptions
func (TextAreaOptions) ContainerOpts ¶
func (o TextAreaOptions) ContainerOpts(opts ...ContainerOpt) TextAreaOpt
Specify the Container options for the text area
func (TextAreaOptions) ControlWidgetSpacing ¶
func (o TextAreaOptions) ControlWidgetSpacing(s int) TextAreaOpt
Specify spacing between the text container and scrollbars
func (TextAreaOptions) FontColor ¶
func (o TextAreaOptions) FontColor(color color.Color) TextAreaOpt
Set the default color for the text area
func (TextAreaOptions) FontFace ¶
func (o TextAreaOptions) FontFace(f text.Face) TextAreaOpt
Set the font face for this text area
func (TextAreaOptions) HorizontalScrollMode ¶ added in v0.2.7
func (o TextAreaOptions) HorizontalScrollMode(scrollMode ScrollMode) TextAreaOpt
Set how horizontal scrolling should be handled
func (TextAreaOptions) ProcessBBCode ¶ added in v0.2.7
func (o TextAreaOptions) ProcessBBCode(processBBCode bool) TextAreaOpt
Set whether or not the text area should process BBCodes. e.g. [color=FF0000]red[/color]
func (TextAreaOptions) ScrollContainerOpts ¶
func (o TextAreaOptions) ScrollContainerOpts(opts ...ScrollContainerOpt) TextAreaOpt
Specify the options for the scroll container
func (TextAreaOptions) ShowHorizontalScrollbar ¶ added in v0.2.7
func (o TextAreaOptions) ShowHorizontalScrollbar() TextAreaOpt
Show the horizontal scrollbar.
func (TextAreaOptions) ShowVerticalScrollbar ¶ added in v0.2.7
func (o TextAreaOptions) ShowVerticalScrollbar() TextAreaOpt
Show the vertical scrollbar.
func (TextAreaOptions) SliderOpts ¶
func (o TextAreaOptions) SliderOpts(opts ...SliderOpt) TextAreaOpt
Specify the options for the scroll bars
func (TextAreaOptions) Text ¶
func (o TextAreaOptions) Text(initialText string) TextAreaOpt
Set the initial Text for the text area
func (TextAreaOptions) TextPadding ¶
func (o TextAreaOptions) TextPadding(i Insets) TextAreaOpt
Set how far from the edges of the textarea the text should be set
func (TextAreaOptions) VerticalScrollMode ¶ added in v0.2.7
func (o TextAreaOptions) VerticalScrollMode(scrollMode ScrollMode) TextAreaOpt
Set how vertical scrolling should be handled
type TextInput ¶
type TextInput struct { ChangedEvent *event.Event SubmitEvent *event.Event // contains filtered or unexported fields }
func NewTextInput ¶
func NewTextInput(opts ...TextInputOpt) *TextInput
func (*TextInput) AddFocus ¶ added in v0.5.7
func (t *TextInput) AddFocus(direction FocusDirection, focus Focuser)
func (*TextInput) CursorMoveEnd ¶ added in v0.5.4
func (t *TextInput) CursorMoveEnd()
func (*TextInput) CursorMoveLeft ¶ added in v0.5.4
func (t *TextInput) CursorMoveLeft()
func (*TextInput) CursorMoveRight ¶ added in v0.5.4
func (t *TextInput) CursorMoveRight()
func (*TextInput) CursorMoveStart ¶ added in v0.5.4
func (t *TextInput) CursorMoveStart()
func (*TextInput) GetFocus ¶ added in v0.5.7
func (t *TextInput) GetFocus(direction FocusDirection) Focuser
func (*TextInput) PreferredSize ¶
func (*TextInput) SetLocation ¶
type TextInputChangedHandlerFunc ¶
type TextInputChangedHandlerFunc func(args *TextInputChangedEventArgs)
type TextInputColor ¶
type TextInputImage ¶
type TextInputOpt ¶
type TextInputOpt func(t *TextInput)
type TextInputOptions ¶
type TextInputOptions struct { }
var TextInputOpts TextInputOptions
func (TextInputOptions) AllowDuplicateSubmit ¶ added in v0.2.1
func (o TextInputOptions) AllowDuplicateSubmit(allowDuplicateSubmit bool) TextInputOpt
func (TextInputOptions) CaretOpts ¶
func (o TextInputOptions) CaretOpts(opts ...CaretOpt) TextInputOpt
func (TextInputOptions) ChangedHandler ¶
func (o TextInputOptions) ChangedHandler(f TextInputChangedHandlerFunc) TextInputOpt
func (TextInputOptions) ClearOnSubmit ¶ added in v0.2.1
func (o TextInputOptions) ClearOnSubmit(clearOnSubmit bool) TextInputOpt
func (TextInputOptions) Color ¶
func (o TextInputOptions) Color(c *TextInputColor) TextInputOpt
func (TextInputOptions) Face ¶
func (o TextInputOptions) Face(f text.Face) TextInputOpt
func (TextInputOptions) IgnoreEmptySubmit ¶ added in v0.2.1
func (o TextInputOptions) IgnoreEmptySubmit(ignoreEmptySubmit bool) TextInputOpt
func (TextInputOptions) Image ¶
func (o TextInputOptions) Image(i *TextInputImage) TextInputOpt
func (TextInputOptions) MobileInputMode ¶ added in v0.5.5
func (o TextInputOptions) MobileInputMode(mobileInputMode jsUtil.MobileInputMode) TextInputOpt
Sets the keyboard type to use when viewed on a mobile browser.
https://css-tricks.com/everything-you-ever-wanted-to-know-about-inputmode
func (TextInputOptions) Padding ¶
func (o TextInputOptions) Padding(i Insets) TextInputOpt
func (TextInputOptions) Placeholder ¶
func (o TextInputOptions) Placeholder(s string) TextInputOpt
func (TextInputOptions) RepeatInterval ¶
func (o TextInputOptions) RepeatInterval(i time.Duration) TextInputOpt
func (TextInputOptions) Secure ¶
func (o TextInputOptions) Secure(b bool) TextInputOpt
func (TextInputOptions) SubmitHandler ¶ added in v0.2.1
func (o TextInputOptions) SubmitHandler(f TextInputChangedHandlerFunc) TextInputOpt
func (TextInputOptions) TabOrder ¶ added in v0.3.0
func (o TextInputOptions) TabOrder(to int) TextInputOpt
func (TextInputOptions) Validation ¶
func (o TextInputOptions) Validation(f TextInputValidationFunc) TextInputOpt
func (TextInputOptions) WidgetOpts ¶
func (o TextInputOptions) WidgetOpts(opts ...WidgetOpt) TextInputOpt
type TextInputValidationFunc ¶
type TextOptions ¶
type TextOptions struct { }
var TextOpts TextOptions
func (TextOptions) Insets ¶
func (o TextOptions) Insets(inset Insets) TextOpt
func (TextOptions) MaxWidth ¶ added in v0.5.4
func (o TextOptions) MaxWidth(maxWidth float64) TextOpt
MaxWidth sets the max width the text will allow before wrapping to the next line
func (TextOptions) Position ¶
func (o TextOptions) Position(h TextPosition, v TextPosition) TextOpt
func (TextOptions) ProcessBBCode ¶ added in v0.2.7
func (o TextOptions) ProcessBBCode(processBBCode bool) TextOpt
func (TextOptions) Text ¶
func (o TextOptions) Text(label string, face text.Face, color color.Color) TextOpt
Text combines three options: TextLabel, TextFace and TextColor. It can be used for the inline configurations of Text object while separate functions are useful for a multi-step configuration.
func (TextOptions) TextColor ¶ added in v0.5.6
func (o TextOptions) TextColor(color color.Color) TextOpt
func (TextOptions) TextFace ¶ added in v0.5.6
func (o TextOptions) TextFace(face text.Face) TextOpt
func (TextOptions) TextLabel ¶ added in v0.5.6
func (o TextOptions) TextLabel(label string) TextOpt
func (TextOptions) WidgetOpts ¶
func (o TextOptions) WidgetOpts(opts ...WidgetOpt) TextOpt
type TextPosition ¶
type TextPosition int
type ToolTip ¶
type ToolTip struct { Position ToolTipPosition WidgetOriginVertical ToolTipAnchor WidgetOriginHorizontal ToolTipAnchor ContentOriginVertical ToolTipAnchor ContentOriginHorizontal ToolTipAnchor Delay time.Duration Offset image.Point ToolTipUpdater ToolTipUpdater // contains filtered or unexported fields }
func NewTextToolTip ¶
func NewTextToolTip(label string, face text.Face, color color.Color, background *e_image.NineSlice) *ToolTip
Create a new Text Tooltip with the following defaults:
- ProcessBBCode = true
- Padding = Top/Bottom: 5px Left/Right: 10px
- Delay = 800ms
- Offset = 0, 20
- ContentOriginHorizontal = TOOLTIP_ANCHOR_END
- ContentOriginVertical = TOOLTIP_ANCHOR_START
func NewToolTip ¶
func NewToolTip(opts ...ToolTipOpt) *ToolTip
Create a new Tooltip. This method allows you to specify every aspect of the displayed tooltip's content.
type ToolTipAnchor ¶ added in v0.3.0
type ToolTipAnchor int
const ( // Anchor at the start of the element TOOLTIP_ANCHOR_START ToolTipAnchor = iota // Anchor in the middle of the element TOOLTIP_ANCHOR_MIDDLE // Anchor at the end of the element TOOLTIP_ANCHOR_END )
type ToolTipDirection ¶ added in v0.3.0
type ToolTipDirection int
type ToolTipOpt ¶
type ToolTipOpt func(t *ToolTip)
type ToolTipOptions ¶
type ToolTipOptions struct { }
var ToolTipOpts ToolTipOptions
func (ToolTipOptions) Content ¶ added in v0.3.0
func (o ToolTipOptions) Content(c *Container) ToolTipOpt
The container to be displayed
func (ToolTipOptions) ContentOriginHorizontal ¶ added in v0.3.0
func (o ToolTipOptions) ContentOriginHorizontal(contentOriginHorizontal ToolTipAnchor) ToolTipOpt
The horizontal position of the anchor on the tooltip.
func (ToolTipOptions) ContentOriginVertical ¶ added in v0.3.0
func (o ToolTipOptions) ContentOriginVertical(contentOriginVertical ToolTipAnchor) ToolTipOpt
The vertical position of the anchor on the tooltip.
func (ToolTipOptions) Delay ¶
func (o ToolTipOptions) Delay(d time.Duration) ToolTipOpt
How long to wait before displaying the tooltip
func (ToolTipOptions) Offset ¶
func (o ToolTipOptions) Offset(off image.Point) ToolTipOpt
The X/Y offsets from the Tooltip anchor point
func (ToolTipOptions) Position ¶ added in v0.3.0
func (o ToolTipOptions) Position(position ToolTipPosition) ToolTipOpt
Where to display the tooltip
func (ToolTipOptions) ToolTipUpdater ¶ added in v0.3.0
func (o ToolTipOptions) ToolTipUpdater(toolTipUpdater ToolTipUpdater) ToolTipOpt
A method that is called every draw call that the tooltip is visible. This allows you to hook into the draw loop to update the tooltip if necessary
func (ToolTipOptions) WidgetOriginHorizontal ¶ added in v0.3.0
func (o ToolTipOptions) WidgetOriginHorizontal(widgetOriginHorizontal ToolTipAnchor) ToolTipOpt
The horizontal position of the anchor on the widget. Only used when Postion = WIDGET
func (ToolTipOptions) WidgetOriginVertical ¶ added in v0.3.0
func (o ToolTipOptions) WidgetOriginVertical(widgetOriginVertical ToolTipAnchor) ToolTipOpt
The vertical position of the anchor on the widget. Only used when Postion = WIDGET
type ToolTipPosition ¶ added in v0.3.0
type ToolTipPosition int
const ( // The tooltip will follow the cursor around while visible TOOLTIP_POS_CURSOR_FOLLOW ToolTipPosition = iota // The tooltip will stick to where the cursor was when the tooltip was made visible TOOLTIP_POS_CURSOR_STICKY // The tooltip will display based on the Widget and Content anchor settings. // It defaults to opening right aligned and directly under the widget. TOOLTIP_POS_WIDGET )
type ToolTipUpdater ¶ added in v0.3.0
type ToolTipUpdater func(*Container)
type Updater ¶ added in v0.6.0
type Updater interface {
// Update updates the widget state based on input.
Update()
}
Updater may be implemented by concrete widget types that should be updated.
type Visibility ¶ added in v0.5.5
type Visibility int
const ( Visibility_Show Visibility = iota Visibility_Hide_Blocking // Hide widget, but take up space Visibility_Hide // Hide widget, but don't take up space )
type Widget ¶
type Widget struct { // Rect specifies the widget's position on screen. It is usually not set directly, but a Layouter is // used to set the position in relation to other widgets or the space available. Rect image.Rectangle // LayoutData specifies additional optional data for a Layouter that is used to layout this widget's // parent container. The exact type depends on the layout being used, for example, GridLayout requires // GridLayoutData to be used. LayoutData interface{} //The minimum width for this Widget MinWidth int //The minimum height for this Widget MinHeight int // Disabled specifies whether the widget is disabled, whatever that means. Disabled widgets should // usually render in some sort of "greyed out" visual state, and not react to user input. // // Not reacting to user input depends on the actual implementation. For example, List will not allow // entry selection via clicking, but the scrollbars will still be usable. The reasoning is that from // the user's perspective, scrolling does not change state, but only the display of that state. Disabled bool // Hidden specifies whether the widget is visible. Hidden widgets should // not render anything or react to user input. Visibility Visibility // CursorEnterEvent fires an event with *WidgetCursorEnterEventArgs when the cursor enters the widget's Rect. CursorEnterEvent *event.Event // CursorMoveEvent fires an event with *WidgetCursorMoveEventArgs when the cursor moves within the widget's Rect. CursorMoveEvent *event.Event // CursorExitEvent fires an event with *WidgetCursorExitEventArgs when the cursor exits the widget's Rect. CursorExitEvent *event.Event // MouseButtonPressedEvent fires an event with *WidgetMouseButtonPressedEventArgs when a mouse button is pressed // while the cursor is inside the widget's Rect. MouseButtonPressedEvent *event.Event // MouseButtonReleasedEvent fires an event with *WidgetMouseButtonReleasedEventArgs when a mouse button is released // while the cursor is inside the widget's Rect. MouseButtonReleasedEvent *event.Event // ScrolledEvent fires an event with *WidgetScrolledEventArgs when the mouse wheel is scrolled while // the cursor is inside the widget's Rect. ScrolledEvent *event.Event FocusEvent *event.Event ContextMenuEvent *event.Event ToolTipEvent *event.Event DragAndDropEvent *event.Event // Custom Data is a field to allow users to attach data to any widget CustomData interface{} // This allows for non-focusable widgets (Containers) to report hover. TrackHover bool ContextMenu *Container ContextMenuWindow *Window ContextMenuCloseMode WindowCloseMode ToolTip *ToolTip DragAndDrop *DragAndDrop CursorHovered string CursorPressed string // contains filtered or unexported fields }
A Widget is an abstraction of a user interface widget, such as a button. Actual widget implementations "have" a Widget in their internal structure.
func (*Widget) EffectiveInputLayer ¶
EffectiveInputLayer returns w's effective input layer. If w does not have an input layer, or if the input layer is no longer valid, it returns w's parent widget's effective input layer. If w does not have a parent widget, it returns input.DefaultLayer.
func (*Widget) ElevateToNewInputLayer ¶
ElevateToNewInputLayer adds l to the top of the input layer stack, then sets w's input layer to l.
func (*Widget) FireContextMenuEvent ¶ added in v0.2.10
func (*Widget) FireDragAndDropEvent ¶ added in v0.4.0
func (widget *Widget) FireDragAndDropEvent(w *Window, show bool, dnd *DragAndDrop)
func (*Widget) FireFocusEvent ¶ added in v0.3.0
func (*Widget) FireToolTipEvent ¶ added in v0.3.0
func (*Widget) Render ¶
func (w *Widget) Render(screen *ebiten.Image)
always call this method first before rendering themselves.
func (*Widget) SetLocation ¶
SetLocation sets w's position to rect. This is usually not called directly, but by a layout.
type WidgetContextMenuEventArgs ¶ added in v0.2.10
type WidgetCursorEnterEventArgs ¶
type WidgetCursorEnterEventArgs struct { Widget *Widget // OffsetX is the x offset relative to the widget's Rect. OffsetX int // OffsetY is the y offset relative to the widget's Rect. OffsetY int }
WidgetCursorEnterEventArgs are the arguments for cursor enter events.
type WidgetCursorEnterHandlerFunc ¶
type WidgetCursorEnterHandlerFunc func(args *WidgetCursorEnterEventArgs) //nolint:golint
WidgetCursorEnterHandlerFunc is a function that handles cursor enter events.
type WidgetCursorExitEventArgs ¶
type WidgetCursorExitEventArgs struct { Widget *Widget // OffsetX is the x offset relative to the widget's Rect. OffsetX int // OffsetY is the y offset relative to the widget's Rect. OffsetY int }
WidgetCursorExitEventArgs are the arguments for cursor exit events.
type WidgetCursorExitHandlerFunc ¶
type WidgetCursorExitHandlerFunc func(args *WidgetCursorExitEventArgs) //nolint:golint
WidgetCursorExitHandlerFunc is a function that handles cursor exit events.
type WidgetCursorMoveEventArgs ¶ added in v0.5.7
type WidgetCursorMoveEventArgs struct { Widget *Widget // OffsetX is the x offset relative to the widget's Rect. OffsetX int // OffsetY is the y offset relative to the widget's Rect. OffsetY int // DiffX is the x change to the old mouse cursor position. DiffX int // DiffY is the y change to the old mouse cursor position. DiffY int }
WidgetCursorMoveEventArgs are the arguments for cursor move events.
type WidgetCursorMoveHandlerFunc ¶ added in v0.5.7
type WidgetCursorMoveHandlerFunc func(args *WidgetCursorMoveEventArgs) //nolint:golint
WidgetCursorMoveHandlerFunc is a function that handles cursor move events.
type WidgetDragAndDropEventArgs ¶ added in v0.4.0
type WidgetDragAndDropEventArgs struct { Window *Window Show bool DnD *DragAndDrop }
type WidgetFocusEventArgs ¶
type WidgetMouseButtonPressedEventArgs ¶
type WidgetMouseButtonPressedEventArgs struct { Widget *Widget Button ebiten.MouseButton // OffsetX is the x offset relative to the widget's Rect. OffsetX int // OffsetY is the y offset relative to the widget's Rect. OffsetY int }
WidgetMouseButtonPressedEventArgs are the arguments for mouse button press events.
type WidgetMouseButtonPressedHandlerFunc ¶
type WidgetMouseButtonPressedHandlerFunc func(args *WidgetMouseButtonPressedEventArgs) //nolint:golint
WidgetMouseButtonPressedHandlerFunc is a function that handles mouse button press events.
type WidgetMouseButtonReleasedEventArgs ¶
type WidgetMouseButtonReleasedEventArgs struct { Widget *Widget Button ebiten.MouseButton // Inside specifies whether the button has been released inside the widget's Rect. Inside bool // OffsetX is the x offset relative to the widget's Rect. OffsetX int // OffsetY is the y offset relative to the widget's Rect. OffsetY int }
WidgetMouseButtonReleasedEventArgs are the arguments for mouse button release events.
type WidgetMouseButtonReleasedHandlerFunc ¶
type WidgetMouseButtonReleasedHandlerFunc func(args *WidgetMouseButtonReleasedEventArgs) //nolint:golint
WidgetMouseButtonReleasedHandlerFunc is a function that handles mouse button release events.
type WidgetOpt ¶
type WidgetOpt func(w *Widget) //nolint:golint
WidgetOpt is a function that configures w.
type WidgetOptions ¶
type WidgetOptions struct { }
var WidgetOpts WidgetOptions
WidgetOpts contains functions that configure a Widget.
func (WidgetOptions) CanDrop ¶ added in v0.4.0
func (o WidgetOptions) CanDrop(candropFunc CanDropFunc) WidgetOpt
This sets the widget as a target of a Drag and Drop action
The Drop function must return true if it accepts this drop and false if it does not accept the drop
func (WidgetOptions) ContextMenu ¶ added in v0.2.10
func (o WidgetOptions) ContextMenu(contextMenu *Container) WidgetOpt
func (WidgetOptions) ContextMenuCloseMode ¶ added in v0.2.10
func (o WidgetOptions) ContextMenuCloseMode(contextMenuCloseMode WindowCloseMode) WidgetOpt
func (WidgetOptions) CursorEnterHandler ¶
func (o WidgetOptions) CursorEnterHandler(f WidgetCursorEnterHandlerFunc) WidgetOpt
WithCursorEnterHandler configures a Widget with cursor enter event handler f.
func (WidgetOptions) CursorExitHandler ¶
func (o WidgetOptions) CursorExitHandler(f WidgetCursorExitHandlerFunc) WidgetOpt
WithCursorExitHandler configures a Widget with cursor exit event handler f.
func (WidgetOptions) CursorHovered ¶ added in v0.5.0
func (o WidgetOptions) CursorHovered(cursorHovered string) WidgetOpt
func (WidgetOptions) CursorMoveHandler ¶ added in v0.5.7
func (o WidgetOptions) CursorMoveHandler(f WidgetCursorMoveHandlerFunc) WidgetOpt
WithCursorMoveHandler configures a Widget with cursor move event handler f.
func (WidgetOptions) CursorPressed ¶ added in v0.5.0
func (o WidgetOptions) CursorPressed(cursorPressed string) WidgetOpt
func (WidgetOptions) CustomData ¶
func (o WidgetOptions) CustomData(cd interface{}) WidgetOpt
WithCustomData configures a Widget with custom data cd.
func (WidgetOptions) Dropped ¶ added in v0.4.0
func (o WidgetOptions) Dropped(dropFunc DropFunc) WidgetOpt
This is the function that is run if an item is dropped on this widget
func (WidgetOptions) EnableDragAndDrop ¶ added in v0.4.0
func (o WidgetOptions) EnableDragAndDrop(d *DragAndDrop) WidgetOpt
This sets the source of a Drag and Drop action
func (WidgetOptions) LayoutData ¶
func (o WidgetOptions) LayoutData(ld interface{}) WidgetOpt
WithLayoutData configures a Widget with layout data ld.
func (WidgetOptions) MinSize ¶
func (o WidgetOptions) MinSize(minWidth int, minHeight int) WidgetOpt
func (WidgetOptions) MouseButtonPressedHandler ¶
func (o WidgetOptions) MouseButtonPressedHandler(f WidgetMouseButtonPressedHandlerFunc) WidgetOpt
WithMouseButtonPressedHandler configures a Widget with mouse button press event handler f.
func (WidgetOptions) MouseButtonReleasedHandler ¶
func (o WidgetOptions) MouseButtonReleasedHandler(f WidgetMouseButtonReleasedHandlerFunc) WidgetOpt
WithMouseButtonReleasedHandler configures a Widget with mouse button release event handler f.
func (WidgetOptions) ScrolledHandler ¶
func (o WidgetOptions) ScrolledHandler(f WidgetScrolledHandlerFunc) WidgetOpt
WithScrolledHandler configures a Widget with mouse wheel scroll event handler f.
func (WidgetOptions) ToolTip ¶ added in v0.3.0
func (o WidgetOptions) ToolTip(toolTip *ToolTip) WidgetOpt
func (WidgetOptions) TrackHover ¶ added in v0.5.8
func (o WidgetOptions) TrackHover(trackHover bool) WidgetOpt
This allows for non-focusable widgets (Containers) to report hover.
type WidgetScrolledEventArgs ¶
WidgetScrolledEventArgs are the arguments for mouse wheel scroll events.
type WidgetScrolledHandlerFunc ¶
type WidgetScrolledHandlerFunc func(args *WidgetScrolledEventArgs) //nolint:golint
WidgetScrolledHandlerFunc is a function that handles mouse wheel scroll events.
type WidgetState ¶
type WidgetState int
func (WidgetState) Advance ¶
func (s WidgetState) Advance(triState bool) WidgetState
type WidgetToolTipEventArgs ¶ added in v0.3.0
type Window ¶
type Window struct { ResizeEvent *event.Event MoveEvent *event.Event ClosedEvent *event.Event Modal bool Contents *Container TitleBar *Container Draggable bool Resizeable bool MinSize *image.Point MaxSize *image.Point DrawLayer int //Used to indicate this window should close if other windows close. Ephemeral bool // contains filtered or unexported fields }
func (*Window) GetCloseFunction ¶ added in v0.5.6
func (w *Window) GetCloseFunction() RemoveWindowFunc
Typically used internally.
func (*Window) GetContainer ¶ added in v0.2.10
Typically used internally.
Returns the root container that holds the provided titlebar and contents
func (*Window) SetCloseFunction ¶
func (w *Window) SetCloseFunction(close RemoveWindowFunc)
Typically used internally.
func (*Window) SetLocation ¶
This method will set the size and location of this window. This method will account for specified MinSize and MaxSize values.
func (*Window) SetupInputLayer ¶
func (w *Window) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
Typically used internally
type WindowChangedEventArgs ¶ added in v0.2.3
type WindowChangedHandlerFunc ¶ added in v0.2.3
type WindowChangedHandlerFunc func(args *WindowChangedEventArgs)
type WindowCloseMode ¶ added in v0.2.10
type WindowCloseMode int
const ( // The window will not automatically close NONE WindowCloseMode = iota // The window will close when you click anywhere CLICK // The window will close when you click outside the window CLICK_OUT )
type WindowClosedEventArgs ¶ added in v0.5.7
type WindowClosedEventArgs struct {
Window *Window
}
type WindowClosedHandlerFunc ¶ added in v0.5.7
type WindowClosedHandlerFunc func(args *WindowClosedEventArgs)
type WindowOptions ¶
type WindowOptions struct { }
var WindowOpts WindowOptions
func (WindowOptions) CloseMode ¶ added in v0.2.10
func (o WindowOptions) CloseMode(mode WindowCloseMode) WindowOpt
Set the way this window should close
func (WindowOptions) ClosedHandler ¶ added in v0.5.7
func (o WindowOptions) ClosedHandler(f WindowClosedHandlerFunc) WindowOpt
This handler is triggered when window is closed. The window can be closed by either calling Window.Close or by invoking an [UI.AddWindow] returned close function.
This handler is called after the window is closed. The provided Window object is still accessible, but the window is already removed from UI.
func (WindowOptions) Contents ¶
func (o WindowOptions) Contents(c *Container) WindowOpt
This is the container with the body of this window
func (WindowOptions) Draggable ¶ added in v0.2.3
func (o WindowOptions) Draggable() WindowOpt
Sets the window to be draggable. The handle for this is the titleBar. If you haven't provided a titleBar this option is ignored
func (WindowOptions) DrawLayer ¶ added in v0.3.2
func (o WindowOptions) DrawLayer(layer int) WindowOpt
This option sets order the window will be drawn
- < 0 will have the window drawn before the container
- >= 0 will have the window drawn after the container
func (WindowOptions) Location ¶ added in v0.2.7
func (o WindowOptions) Location(rect image.Rectangle) WindowOpt
This option sets the size and location of the window. This method will account for specified MinSize and MaxSize values.
func (WindowOptions) MaxSize ¶ added in v0.2.3
func (o WindowOptions) MaxSize(width int, height int) WindowOpt
Set the maximum size that the window can be resized to
func (WindowOptions) MinSize ¶ added in v0.2.3
func (o WindowOptions) MinSize(width int, height int) WindowOpt
Sets the minimum size that the window can be reszied to
func (WindowOptions) Modal ¶
func (o WindowOptions) Modal() WindowOpt
Sets the window to be modal. Blocking UI interactions on anything else.
func (WindowOptions) MoveHandler ¶ added in v0.2.3
func (o WindowOptions) MoveHandler(f WindowChangedHandlerFunc) WindowOpt
This handler is triggered when a move event is completed
func (WindowOptions) ResizeHandler ¶ added in v0.2.3
func (o WindowOptions) ResizeHandler(f WindowChangedHandlerFunc) WindowOpt
This handler is triggered when a resize event is completed
func (WindowOptions) Resizeable ¶ added in v0.2.3
func (o WindowOptions) Resizeable() WindowOpt
Sets the window to be resizeable
Source Files ¶
- anchorlayout.go
- button.go
- caret.go
- checkbox.go
- combobutton.go
- container.go
- dnd.go
- doc.go
- flipbook.go
- graphic.go
- gridlayout.go
- label.go
- labeledcheckbox.go
- layout.go
- list.go
- listcombobutton.go
- multionce.go
- progressbar.go
- radiogroup.go
- rowlayout.go
- scrollcontainer.go
- selectcombobutton.go
- slider.go
- stackedlayout.go
- tabbook.go
- text.go
- textarea.go
- textinput.go
- tooltip.go
- widget.go
- window.go