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 RenderWithDeferred(screen *ebiten.Image, rs []Renderer)
- func WidgetFireFocusEvent(w *Widget, focused bool)
- type AnchorLayout
- type AnchorLayoutData
- type AnchorLayoutOpt
- type AnchorLayoutOptions
- type AnchorLayoutPosition
- type Button
- func (b *Button) GetWidget() *Widget
- func (b *Button) PreferredSize() (int, int)
- func (b *Button) Render(screen *ebiten.Image, def DeferredRenderFunc)
- func (b *Button) RequestRelayout()
- func (b *Button) SetLocation(rect img.Rectangle)
- func (b *Button) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (b *Button) Text() *Text
- type ButtonClickedEventArgs
- type ButtonClickedHandlerFunc
- type ButtonImage
- type ButtonImageImage
- type ButtonOpt
- type ButtonOptions
- func (o ButtonOptions) ClickedHandler(f ButtonClickedHandlerFunc) 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) 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) Text(label string, face font.Face, color *ButtonTextColor) ButtonOpt
- func (o ButtonOptions) TextAndImage(label string, face font.Face, image *ButtonImageImage, color *ButtonTextColor) ButtonOpt
- func (o ButtonOptions) TextPadding(p Insets) ButtonOpt
- func (o ButtonOptions) TextSimpleLeft(label string, face font.Face, color *ButtonTextColor, padding Insets) ButtonOpt
- func (o ButtonOptions) WidgetOpts(opts ...WidgetOpt) ButtonOpt
- type ButtonPressedEventArgs
- type ButtonPressedHandlerFunc
- type ButtonReleasedEventArgs
- type ButtonReleasedHandlerFunc
- type ButtonTextColor
- type Caret
- type CaretOpt
- type CaretOptions
- type Checkbox
- func (c *Checkbox) GetWidget() *Widget
- func (c *Checkbox) PreferredSize() (int, int)
- func (c *Checkbox) Render(screen *ebiten.Image, def DeferredRenderFunc)
- func (c *Checkbox) SetLocation(rect image.Rectangle)
- func (c *Checkbox) SetState(s CheckboxState)
- func (c *Checkbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (c *Checkbox) State() CheckboxState
- type CheckboxChangedEventArgs
- type CheckboxChangedHandlerFunc
- type CheckboxGraphicImage
- type CheckboxOpt
- type CheckboxOptions
- type CheckboxState
- 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, def DeferredRenderFunc)
- func (c *ComboButton) SetLabel(l string)
- func (c *ComboButton) SetLocation(rect image.Rectangle)
- func (c *ComboButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- type ComboButtonOpt
- type ComboButtonOptions
- type Container
- func (c *Container) AddChild(child PreferredSizeLocateableWidget) RemoveChildFunc
- func (c *Container) GetWidget() *Widget
- func (c *Container) PreferredSize() (int, int)
- func (c *Container) Render(screen *ebiten.Image, def DeferredRenderFunc)
- func (c *Container) RequestRelayout()
- func (c *Container) SetLocation(rect img.Rectangle)
- func (c *Container) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- func (c *Container) WidgetAt(x int, y int) HasWidget
- type ContainerOpt
- type ContainerOptions
- type DeferredRenderFunc
- type Direction
- type DragAndDrop
- type DragAndDropDroppedEventArgs
- type DragAndDropDroppedHandlerFunc
- type DragAndDropOpt
- type DragAndDropOptions
- func (o DragAndDropOptions) Container(c Locater) DragAndDropOpt
- func (o DragAndDropOptions) ContentsCreater(c DragContentsCreater) DragAndDropOpt
- func (o DragAndDropOptions) DroppedHandler(f DragAndDropDroppedHandlerFunc) DragAndDropOpt
- func (o DragAndDropOptions) MinDragStartDistance(d int) DragAndDropOpt
- type DragContentsCreater
- type DragContentsUpdater
- type DragWidget
- type FlipBook
- func (f *FlipBook) GetWidget() *Widget
- func (f *FlipBook) PreferredSize() (int, int)
- func (f *FlipBook) Render(screen *ebiten.Image, def DeferredRenderFunc)
- 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) WidgetAt(x int, y int) HasWidget
- type FlipBookOpt
- type FlipBookOptions
- 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 LabeledCheckbox
- func (l *LabeledCheckbox) Checkbox() *Checkbox
- func (l *LabeledCheckbox) GetWidget() *Widget
- func (l *LabeledCheckbox) Label() *Label
- func (l *LabeledCheckbox) PreferredSize() (int, int)
- func (l *LabeledCheckbox) Render(screen *ebiten.Image, def DeferredRenderFunc)
- func (l *LabeledCheckbox) SetLocation(rect image.Rectangle)
- func (l *LabeledCheckbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- type LabeledCheckboxOpt
- type LabeledCheckboxOptions
- type Layouter
- type List
- func (l *List) GetWidget() *Widget
- func (l *List) PreferredSize() (int, int)
- func (l *List) Render(screen *ebiten.Image, def DeferredRenderFunc)
- func (l *List) RequestRelayout()
- func (l *List) SelectedEntry() interface{}
- func (l *List) SetLocation(rect img.Rectangle)
- func (l *List) SetScrollLeft(left float64)
- func (l *List) SetScrollTop(t float64)
- func (l *List) SetSelectedEntry(e interface{})
- func (l *List) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- type ListComboButton
- func (l *ListComboButton) ContentVisible() bool
- func (l *ListComboButton) GetWidget() *Widget
- func (l *ListComboButton) Label() string
- func (l *ListComboButton) PreferredSize() (int, int)
- func (l *ListComboButton) Render(screen *ebiten.Image, def DeferredRenderFunc)
- 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)
- type ListComboButtonEntrySelectedEventArgs
- type ListComboButtonEntrySelectedHandlerFunc
- type ListComboButtonOpt
- type ListComboButtonOptions
- 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) Text(face font.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) Entries(e []interface{}) ListOpt
- func (o ListOptions) EntryColor(c *ListEntryColor) ListOpt
- func (o ListOptions) EntryFontFace(f font.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) HideHorizontalSlider() ListOpt
- func (o ListOptions) HideVerticalSlider() ListOpt
- func (o ListOptions) ScrollContainerOpts(opts ...ScrollContainerOpt) ListOpt
- func (o ListOptions) SliderOpts(opts ...SliderOpt) ListOpt
- type Locateable
- type Locater
- type MultiOnce
- type PreferredSizeLocateableWidget
- type PreferredSizer
- type RadioGroup
- type RadioGroupChangedEventArgs
- type RadioGroupChangedHandlerFunc
- type RadioGroupOpt
- type RadioGroupOptions
- type Relayoutable
- type RemoveChildFunc
- 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) GetWidget() *Widget
- func (s *ScrollContainer) PreferredSize() (int, int)
- func (s *ScrollContainer) Render(screen *ebiten.Image, def DeferredRenderFunc)
- func (s *ScrollContainer) SetLocation(rect img.Rectangle)
- func (s *ScrollContainer) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- 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 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, def DeferredRenderFunc)
- 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)
- 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
- 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) HandleSize(s int) SliderOpt
- func (o SliderOptions) Images(track *SliderTrackImage, handle *ButtonImage) SliderOpt
- func (o SliderOptions) MinMax(min int, max int) SliderOpt
- func (o SliderOptions) PageSizeFunc(f SliderPageSizeFunc) SliderOpt
- func (o SliderOptions) TrackPadding(i Insets) SliderOpt
- func (o SliderOptions) WidgetOpts(opts ...WidgetOpt) SliderOpt
- type SliderPageSizeFunc
- type SliderTrackImage
- type StateButton
- func (s *StateButton) GetWidget() *Widget
- func (s *StateButton) PreferredSize() (int, int)
- func (s *StateButton) Render(screen *ebiten.Image, def DeferredRenderFunc)
- func (s *StateButton) RequestRelayout()
- func (s *StateButton) SetLocation(rect image.Rectangle)
- func (s *StateButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
- type StateButtonOpt
- type StateButtonOptions
- type TabBook
- func (t *TabBook) GetWidget() *Widget
- func (t *TabBook) PreferredSize() (int, int)
- func (t *TabBook) Render(screen *ebiten.Image, def DeferredRenderFunc)
- 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
- type TabBookOpt
- type TabBookOptions
- func (o TabBookOptions) ContainerOpts(opts ...ContainerOpt) TabBookOpt
- func (o TabBookOptions) FlipBookOpts(opts ...FlipBookOpt) TabBookOpt
- func (o TabBookOptions) Spacing(s int) TabBookOpt
- func (o TabBookOptions) TabButtonImage(idle *ButtonImage, selected *ButtonImage) TabBookOpt
- func (o TabBookOptions) TabButtonOpts(opts ...StateButtonOpt) TabBookOpt
- func (o TabBookOptions) TabButtonSpacing(s int) TabBookOpt
- func (o TabBookOptions) TabButtonText(face font.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 TextInput
- type TextInputChangedEventArgs
- type TextInputChangedHandlerFunc
- type TextInputColor
- type TextInputImage
- type TextInputOpt
- type TextInputOptions
- func (o TextInputOptions) CaretOpts(opts ...CaretOpt) TextInputOpt
- func (o TextInputOptions) ChangedHandler(f TextInputChangedHandlerFunc) TextInputOpt
- func (o TextInputOptions) Color(c *TextInputColor) TextInputOpt
- func (o TextInputOptions) Face(f font.Face) TextInputOpt
- func (o TextInputOptions) Image(i *TextInputImage) 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) Validation(f TextInputValidationFunc) TextInputOpt
- func (o TextInputOptions) WidgetOpts(opts ...WidgetOpt) TextInputOpt
- type TextInputValidationFunc
- type TextOpt
- type TextOptions
- type TextPosition
- type TextToolTip
- type TextToolTipOpt
- type TextToolTipOptions
- type ToolTip
- type ToolTipContentsCreater
- type ToolTipContentsUpdater
- type ToolTipOpt
- type ToolTipOptions
- type ToolTipWidget
- type Widget
- type WidgetCursorEnterEventArgs
- type WidgetCursorEnterHandlerFunc
- type WidgetCursorExitEventArgs
- type WidgetCursorExitHandlerFunc
- type WidgetFocusEventArgs
- type WidgetMouseButtonPressedEventArgs
- type WidgetMouseButtonPressedHandlerFunc
- type WidgetMouseButtonReleasedEventArgs
- type WidgetMouseButtonReleasedHandlerFunc
- type WidgetOpt
- type WidgetOptions
- func (o WidgetOptions) CursorEnterHandler(f WidgetCursorEnterHandlerFunc) WidgetOpt
- func (o WidgetOptions) CursorExitHandler(f WidgetCursorExitHandlerFunc) WidgetOpt
- func (o WidgetOptions) LayoutData(ld interface{}) WidgetOpt
- func (o WidgetOptions) MouseButtonPressedHandler(f WidgetMouseButtonPressedHandlerFunc) WidgetOpt
- func (o WidgetOptions) MouseButtonReleasedHandler(f WidgetMouseButtonReleasedHandlerFunc) WidgetOpt
- func (o WidgetOptions) ScrolledHandler(f WidgetScrolledHandlerFunc) WidgetOpt
- type WidgetScrolledEventArgs
- type WidgetScrolledHandlerFunc
- type Window
- type WindowOpt
- type WindowOptions
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 ( CheckboxUnchecked = CheckboxState(iota) CheckboxChecked CheckboxGreyed )
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 ( // 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 )
Variables ¶
This section is empty.
Functions ¶
func RenderWithDeferred ¶
func RenderWithDeferred(screen *ebiten.Image, rs []Renderer)
RenderWithDeferred renders r to screen. This function should not be called directly.
func WidgetFireFocusEvent ¶
Types ¶
type AnchorLayout ¶
type AnchorLayout struct {
// contains filtered or unexported fields
}
AnchorLayout layouts a single widget anchored to either a corner or edge of a rectangle, optionally stretching it in one or both directions.
AnchorLayout will only layout the first widget in a container and ignore all other widgets.
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 }
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.
type AnchorLayoutPosition ¶
type AnchorLayoutPosition int
AnchorLayoutPosition is the type used to specify an anchoring position.
type Button ¶
type Button struct { Image *ButtonImage KeepPressedOnExit bool GraphicImage *ButtonImageImage TextColor *ButtonTextColor PressedEvent *event.Event ReleasedEvent *event.Event ClickedEvent *event.Event // contains filtered or unexported fields }
func (*Button) PreferredSize ¶
func (*Button) Render ¶
func (b *Button) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*Button) RequestRelayout ¶
func (b *Button) RequestRelayout()
func (*Button) SetLocation ¶
func (*Button) SetupInputLayer ¶
func (b *Button) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type ButtonClickedEventArgs ¶
type ButtonClickedEventArgs struct {
Button *Button
}
type ButtonClickedHandlerFunc ¶
type ButtonClickedHandlerFunc func(args *ButtonClickedEventArgs)
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) 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) 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) Text ¶
func (o ButtonOptions) Text(label string, face font.Face, color *ButtonTextColor) ButtonOpt
func (ButtonOptions) TextAndImage ¶
func (o ButtonOptions) TextAndImage(label string, face font.Face, image *ButtonImageImage, color *ButtonTextColor) ButtonOpt
TODO: add parameter for image position (start/end)
func (ButtonOptions) TextPadding ¶
func (o ButtonOptions) TextPadding(p Insets) ButtonOpt
func (ButtonOptions) TextSimpleLeft ¶
func (o ButtonOptions) TextSimpleLeft(label string, face font.Face, color *ButtonTextColor, padding Insets) 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 Caret ¶
func (*Caret) PreferredSize ¶
func (*Caret) Render ¶
func (c *Caret) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*Caret) ResetBlinking ¶
func (c *Caret) ResetBlinking()
func (*Caret) SetLocation ¶
type Checkbox ¶
func NewCheckbox ¶
func NewCheckbox(opts ...CheckboxOpt) *Checkbox
func (*Checkbox) PreferredSize ¶
func (*Checkbox) Render ¶
func (c *Checkbox) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*Checkbox) SetLocation ¶
func (*Checkbox) SetState ¶
func (c *Checkbox) SetState(s CheckboxState)
func (*Checkbox) SetupInputLayer ¶
func (c *Checkbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*Checkbox) State ¶
func (c *Checkbox) State() CheckboxState
type CheckboxChangedEventArgs ¶
type CheckboxChangedEventArgs struct { Checkbox *Checkbox State CheckboxState }
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) ChangedHandler ¶
func (o CheckboxOptions) ChangedHandler(f CheckboxChangedHandlerFunc) CheckboxOpt
func (CheckboxOptions) Image ¶
func (o CheckboxOptions) Image(i *CheckboxGraphicImage) CheckboxOpt
func (CheckboxOptions) TriState ¶
func (o CheckboxOptions) TriState() CheckboxOpt
type CheckboxState ¶
type CheckboxState int
func (CheckboxState) Advance ¶
func (s CheckboxState) Advance(triState bool) CheckboxState
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, def DeferredRenderFunc)
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)
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(child PreferredSizeLocateableWidget) RemoveChildFunc
func (*Container) PreferredSize ¶
func (*Container) Render ¶
func (c *Container) Render(screen *ebiten.Image, def DeferredRenderFunc)
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
func (ContainerOptions) Layout ¶
func (o ContainerOptions) Layout(layout Layouter) ContainerOpt
func (ContainerOptions) WidgetOpts ¶
func (o ContainerOptions) WidgetOpts(opts ...WidgetOpt) ContainerOpt
type DeferredRenderFunc ¶
type DeferredRenderFunc func(r RenderFunc)
DeferredRenderFunc is a function that stores r for deferred execution.
type DragAndDrop ¶
func NewDragAndDrop ¶
func NewDragAndDrop(opts ...DragAndDropOpt) *DragAndDrop
func (*DragAndDrop) Render ¶
func (d *DragAndDrop) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*DragAndDrop) SetupInputLayer ¶
func (d *DragAndDrop) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type DragAndDropDroppedHandlerFunc ¶
type DragAndDropDroppedHandlerFunc func(args *DragAndDropDroppedEventArgs)
type DragAndDropOpt ¶
type DragAndDropOpt func(d *DragAndDrop)
type DragAndDropOptions ¶
type DragAndDropOptions struct { }
var DragAndDropOpts DragAndDropOptions
func (DragAndDropOptions) Container ¶
func (o DragAndDropOptions) Container(c Locater) DragAndDropOpt
func (DragAndDropOptions) ContentsCreater ¶
func (o DragAndDropOptions) ContentsCreater(c DragContentsCreater) DragAndDropOpt
func (DragAndDropOptions) DroppedHandler ¶
func (o DragAndDropOptions) DroppedHandler(f DragAndDropDroppedHandlerFunc) DragAndDropOpt
func (DragAndDropOptions) MinDragStartDistance ¶
func (o DragAndDropOptions) MinDragStartDistance(d int) DragAndDropOpt
type DragContentsCreater ¶
type DragContentsCreater interface {
Create(HasWidget, int, int) (DragWidget, interface{})
}
type DragContentsUpdater ¶
type DragWidget ¶
type DragWidget interface { HasWidget PreferredSizer Locateable Renderer }
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) PreferredSize ¶
PreferredSize implements PreferredSizer.
func (*FlipBook) Render ¶
func (f *FlipBook) Render(screen *ebiten.Image, def DeferredRenderFunc)
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 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) Render ¶
func (g *Graphic) Render(screen *ebiten.Image, def DeferredRenderFunc)
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) Render ¶
func (l *Label) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*Label) SetLocation ¶
type LabelOptions ¶
type LabelOptions struct { }
var LabelOpts LabelOptions
func (LabelOptions) Text ¶
func (o LabelOptions) Text(label string, face font.Face, color *LabelColor) LabelOpt
func (LabelOptions) TextOpts ¶
func (o LabelOptions) TextOpts(opts ...TextOpt) LabelOpt
type LabeledCheckbox ¶
type LabeledCheckbox struct {
// contains filtered or unexported fields
}
func NewLabeledCheckbox ¶
func NewLabeledCheckbox(opts ...LabeledCheckboxOpt) *LabeledCheckbox
func (*LabeledCheckbox) Checkbox ¶
func (l *LabeledCheckbox) Checkbox() *Checkbox
func (*LabeledCheckbox) GetWidget ¶
func (l *LabeledCheckbox) GetWidget() *Widget
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, def DeferredRenderFunc)
func (*LabeledCheckbox) SetLocation ¶
func (l *LabeledCheckbox) SetLocation(rect image.Rectangle)
func (*LabeledCheckbox) SetupInputLayer ¶
func (l *LabeledCheckbox) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
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) LabelOpts ¶
func (o LabeledCheckboxOptions) LabelOpts(opts ...LabelOpt) LabeledCheckboxOpt
func (LabeledCheckboxOptions) Spacing ¶
func (o LabeledCheckboxOptions) Spacing(s int) LabeledCheckboxOpt
type Layouter ¶
type Layouter interface { PreferredSize(widgets []PreferredSizeLocateableWidget) (int, int) Layout(widgets []PreferredSizeLocateableWidget, rect image.Rectangle) }
type List ¶
func (*List) PreferredSize ¶
func (*List) Render ¶
func (l *List) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*List) RequestRelayout ¶
func (l *List) RequestRelayout()
func (*List) SelectedEntry ¶
func (l *List) SelectedEntry() interface{}
func (*List) SetLocation ¶
func (*List) SetScrollLeft ¶
func (*List) SetScrollTop ¶
func (*List) SetSelectedEntry ¶
func (l *List) SetSelectedEntry(e interface{})
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) ContentVisible ¶
func (l *ListComboButton) ContentVisible() bool
func (*ListComboButton) GetWidget ¶
func (l *ListComboButton) GetWidget() *Widget
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, def DeferredRenderFunc)
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)
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) 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) Text ¶
func (o ListComboButtonOptions) Text(face font.Face, image *ButtonImageImage, color *ButtonTextColor) ListComboButtonOpt
type ListEntryColor ¶
type ListEntryLabelFunc ¶
type ListEntryLabelFunc func(e interface{}) string
type ListEntrySelectedEventArgs ¶
type ListEntrySelectedEventArgs struct { List *List Entry interface{} PreviousEntry interface{} }
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) Entries ¶
func (o ListOptions) Entries(e []interface{}) ListOpt
func (ListOptions) EntryColor ¶
func (o ListOptions) EntryColor(c *ListEntryColor) ListOpt
func (ListOptions) EntryFontFace ¶
func (o ListOptions) EntryFontFace(f font.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) 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) SliderOpts ¶
func (o ListOptions) SliderOpts(opts ...SliderOpt) 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 RadioGroup ¶
func NewRadioGroup ¶
func NewRadioGroup(opts ...RadioGroupOpt) *RadioGroup
func (*RadioGroup) Active ¶
func (r *RadioGroup) Active() *Checkbox
func (*RadioGroup) SetActive ¶
func (r *RadioGroup) SetActive(a *Checkbox)
type RadioGroupChangedEventArgs ¶
type RadioGroupChangedEventArgs struct {
Active *Checkbox
}
type RadioGroupChangedHandlerFunc ¶
type RadioGroupChangedHandlerFunc func(args *RadioGroupChangedEventArgs)
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) Checkboxes ¶
func (o RadioGroupOptions) Checkboxes(cb ...*Checkbox) RadioGroupOpt
type Relayoutable ¶
type Relayoutable interface {
RequestRelayout()
}
type RemoveChildFunc ¶
type RemoveChildFunc func()
type RenderFunc ¶
type RenderFunc func(screen *ebiten.Image, def DeferredRenderFunc)
RenderFunc is a function that renders a widget onto screen. def may be called to defer additional rendering.
type Renderer ¶
type Renderer interface { // Render renders the widget onto screen. def may be called to defer additional rendering. Render(screen *ebiten.Image, def DeferredRenderFunc) }
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) 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, def DeferredRenderFunc)
func (*ScrollContainer) SetLocation ¶
func (s *ScrollContainer) SetLocation(rect img.Rectangle)
func (*ScrollContainer) SetupInputLayer ¶
func (s *ScrollContainer) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
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 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, def DeferredRenderFunc)
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)
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) PreferredSize ¶
func (*Slider) Render ¶
func (s *Slider) Render(screen *ebiten.Image, def DeferredRenderFunc)
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) HandleSize ¶
func (o SliderOptions) HandleSize(s int) SliderOpt
func (SliderOptions) Images ¶
func (o SliderOptions) Images(track *SliderTrackImage, handle *ButtonImage) SliderOpt
func (SliderOptions) PageSizeFunc ¶
func (o SliderOptions) PageSizeFunc(f SliderPageSizeFunc) 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 StateButton ¶
type StateButton struct { // TODO: changing this should fire an event State interface{} // contains filtered or unexported fields }
func NewStateButton ¶
func NewStateButton(opts ...StateButtonOpt) *StateButton
func (*StateButton) GetWidget ¶
func (s *StateButton) GetWidget() *Widget
func (*StateButton) PreferredSize ¶
func (s *StateButton) PreferredSize() (int, int)
func (*StateButton) Render ¶
func (s *StateButton) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*StateButton) RequestRelayout ¶
func (s *StateButton) RequestRelayout()
func (*StateButton) SetLocation ¶
func (s *StateButton) SetLocation(rect image.Rectangle)
func (*StateButton) SetupInputLayer ¶
func (s *StateButton) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type StateButtonOpt ¶
type StateButtonOpt func(s *StateButton)
type StateButtonOptions ¶
type StateButtonOptions struct { }
var StateButtonOpts StateButtonOptions
func (StateButtonOptions) ButtonOpts ¶
func (o StateButtonOptions) ButtonOpts(opts ...ButtonOpt) StateButtonOpt
func (StateButtonOptions) StateImages ¶
func (o StateButtonOptions) StateImages(states map[interface{}]*ButtonImage) StateButtonOpt
type TabBook ¶
func NewTabBook ¶
func NewTabBook(opts ...TabBookOpt) *TabBook
func (*TabBook) PreferredSize ¶
func (*TabBook) Render ¶
func (t *TabBook) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*TabBook) RequestRelayout ¶
func (t *TabBook) RequestRelayout()
func (*TabBook) SetLocation ¶
func (*TabBook) SetTab ¶
func (t *TabBook) SetTab(tab *TabBookTab)
func (*TabBook) SetupInputLayer ¶
func (t *TabBook) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
func (*TabBook) Tab ¶
func (t *TabBook) Tab() *TabBookTab
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) Spacing ¶
func (o TabBookOptions) Spacing(s int) TabBookOpt
func (TabBookOptions) TabButtonImage ¶
func (o TabBookOptions) TabButtonImage(idle *ButtonImage, selected *ButtonImage) TabBookOpt
func (TabBookOptions) TabButtonOpts ¶
func (o TabBookOptions) TabButtonOpts(opts ...StateButtonOpt) TabBookOpt
func (TabBookOptions) TabButtonSpacing ¶
func (o TabBookOptions) TabButtonSpacing(s int) TabBookOpt
func (TabBookOptions) TabButtonText ¶
func (o TabBookOptions) TabButtonText(face font.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 ¶
type TabBookTab struct { Disabled bool // contains filtered or unexported fields }
func NewTabBookTab ¶
func NewTabBookTab(label string, widget PreferredSizeLocateableWidget) *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 font.Face Color color.Color // contains filtered or unexported fields }
func (*Text) PreferredSize ¶
func (*Text) Render ¶
func (t *Text) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*Text) SetLocation ¶
type TextInput ¶
type TextInput struct { ChangedEvent *event.Event InputText string // contains filtered or unexported fields }
func NewTextInput ¶
func NewTextInput(opts ...TextInputOpt) *TextInput
func (*TextInput) PreferredSize ¶
func (*TextInput) Render ¶
func (t *TextInput) Render(screen *ebiten.Image, def DeferredRenderFunc)
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) CaretOpts ¶
func (o TextInputOptions) CaretOpts(opts ...CaretOpt) TextInputOpt
func (TextInputOptions) ChangedHandler ¶
func (o TextInputOptions) ChangedHandler(f TextInputChangedHandlerFunc) TextInputOpt
func (TextInputOptions) Color ¶
func (o TextInputOptions) Color(c *TextInputColor) TextInputOpt
func (TextInputOptions) Face ¶
func (o TextInputOptions) Face(f font.Face) TextInputOpt
func (TextInputOptions) Image ¶
func (o TextInputOptions) Image(i *TextInputImage) TextInputOpt
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) 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) Position ¶
func (o TextOptions) Position(h TextPosition, v TextPosition) TextOpt
func (TextOptions) WidgetOpts ¶
func (o TextOptions) WidgetOpts(opts ...WidgetOpt) TextOpt
type TextPosition ¶
type TextPosition int
type TextToolTip ¶
type TextToolTip struct { Label string // contains filtered or unexported fields }
func NewTextToolTip ¶
func NewTextToolTip(opts ...TextToolTipOpt) *TextToolTip
func (*TextToolTip) GetWidget ¶
func (t *TextToolTip) GetWidget() *Widget
func (*TextToolTip) PreferredSize ¶
func (t *TextToolTip) PreferredSize() (int, int)
func (*TextToolTip) Render ¶
func (t *TextToolTip) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*TextToolTip) RequestRelayout ¶
func (t *TextToolTip) RequestRelayout()
func (*TextToolTip) SetLocation ¶
func (t *TextToolTip) SetLocation(rect img.Rectangle)
type TextToolTipOpt ¶
type TextToolTipOpt func(t *TextToolTip)
type TextToolTipOptions ¶
type TextToolTipOptions struct { }
var TextToolTipOpts TextToolTipOptions
func (TextToolTipOptions) ContainerOpts ¶
func (o TextToolTipOptions) ContainerOpts(opts ...ContainerOpt) TextToolTipOpt
func (TextToolTipOptions) Padding ¶
func (o TextToolTipOptions) Padding(i Insets) TextToolTipOpt
func (TextToolTipOptions) TextOpts ¶
func (o TextToolTipOptions) TextOpts(opts ...TextOpt) TextToolTipOpt
type ToolTip ¶
func NewToolTip ¶
func NewToolTip(opts ...ToolTipOpt) *ToolTip
func (*ToolTip) Render ¶
func (t *ToolTip) Render(screen *ebiten.Image, def DeferredRenderFunc)
type ToolTipContentsCreater ¶
type ToolTipContentsCreater interface {
Create(HasWidget) ToolTipWidget
}
type ToolTipContentsUpdater ¶
type ToolTipContentsUpdater interface {
Update(HasWidget)
}
type ToolTipOpt ¶
type ToolTipOpt func(t *ToolTip)
type ToolTipOptions ¶
type ToolTipOptions struct { }
var ToolTipOpts ToolTipOptions
func (ToolTipOptions) Container ¶
func (o ToolTipOptions) Container(c Locater) ToolTipOpt
func (ToolTipOptions) ContentsCreater ¶
func (o ToolTipOptions) ContentsCreater(c ToolTipContentsCreater) ToolTipOpt
func (ToolTipOptions) Delay ¶
func (o ToolTipOptions) Delay(d time.Duration) ToolTipOpt
func (ToolTipOptions) Offset ¶
func (o ToolTipOptions) Offset(off img.Point) ToolTipOpt
func (ToolTipOptions) Sticky ¶
func (o ToolTipOptions) Sticky() ToolTipOpt
type ToolTipWidget ¶
type ToolTipWidget interface { PreferredSizer Locateable Renderer }
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{} // 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 // CursorEnterEvent fires an event with *WidgetCursorEnterEventArgs when the cursor enters the widget's Rect. CursorEnterEvent *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 // 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) Render ¶
func (w *Widget) Render(screen *ebiten.Image, def DeferredRenderFunc)
Render renders w onto screen. Since Widget is only an abstraction, it does not actually draw anything, but it is still responsible for firing events. Concrete widget implementations should 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 WidgetCursorEnterEventArgs ¶
type WidgetCursorEnterEventArgs struct {
Widget *Widget
}
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
}
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 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) 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) LayoutData ¶
func (o WidgetOptions) LayoutData(ld interface{}) WidgetOpt
WithLayoutData configures a Widget with layout data ld.
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.
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 Window ¶
type Window struct { Modal bool // contains filtered or unexported fields }
func (*Window) Render ¶
func (w *Window) Render(screen *ebiten.Image, def DeferredRenderFunc)
func (*Window) RequestRelayout ¶
func (w *Window) RequestRelayout()
func (*Window) SetLocation ¶
func (*Window) SetupInputLayer ¶
func (w *Window) SetupInputLayer(def input.DeferredSetupInputLayerFunc)
type WindowOptions ¶
type WindowOptions struct { }
var WindowOpts WindowOptions
func (WindowOptions) Contents ¶
func (o WindowOptions) Contents(c *Container) WindowOpt
func (WindowOptions) Modal ¶
func (o WindowOptions) Modal() WindowOpt
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
- radiogroup.go
- rowlayout.go
- scrollcontainer.go
- selectcombobutton.go
- slider.go
- statebutton.go
- tabbook.go
- text.go
- text_tooltip.go
- textinput.go
- tooltip.go
- widget.go
- window.go