giu

package module
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2021 License: MIT Imports: 21 Imported by: 183

README

giu

Go Report Card Build Status Godoc Card

A rapid cross-platform GUI framework for Go based on Dear ImGui and the great Go binding imgui-go.

Any contribution (features, widgets, tutorials, documents, etc...) is appreciated!

Supported Platforms

giu is built upon GLFW v3.3, so ideally giu could support all platforms that GLFW v3.3 supports.

  • Windows (only tested on Windows 10 x64)
  • MacOS (only tested on MacOS v10.15)
  • Linux (thanks remeh to test it)
  • Raspberry Pi 3B (thanks sndvaps to test it)

Features

Compare to other Dear ImGui golang bindings, giu has following features:

  • Small executable file size (<3MB after UPX compression for the example/helloworld demo).
  • Live-updating during the resizing of OS window (implemented on GLFW 3.3 and OpenGL 3.2).
  • Support for displaying various languages without any font setting. Giu will rebuild font atlas incrementally according to texts in UI between frames. Below is the list of languages currently supported:
    • macOS
      1. English
      2. Simplified Chinese
      3. Japanese
      4. Korean
    • Windows
      1. English
      2. Simplified Chinese
      3. Japanese
    • Kali Linux
      1. English
    • Need your help to add more language support by creating a PR or telling me the OS default font name for your language.
  • Redraws only when user event occurred. Costs only 0.5% CPU usage with 60FPS.
  • Declarative UI (see examples for more detail).
  • DPI awareness (auto scaling font and UI to adapt high DPI monitor).
  • Drop in usage, no need to implement render and platform.
  • OS clipboard support.

Screenshot Screenshot1 Screenshot2

Hello world

package main

import (
	"fmt"

	g "github.com/AllenDang/giu"
)

func onClickMe() {
	fmt.Println("Hello world!")
}

func onImSoCute() {
	fmt.Println("Im sooooooo cute!!")
}

func loop() {
	g.SingleWindow().Layout(
		g.Label("Hello world from giu"),
		g.Row(
			g.Button("Click Me").OnClick(onClickMe),
			g.Button("I'm so cute").OnClick(onImSoCute),
		),
	)
}

func main() {
	wnd := g.NewMasterWindow("Hello world", 400, 200, g.MasterWindowFlagsNotResizable, nil)
	wnd.Run(loop)
}

Here is result:

Helloworld

Quick intruduction

What is immediate mode GUI?

Immediate mode GUI system means the UI control doesn't retain its state and value. For example, calling giu.InputText("ID", &str) will display a input text box on screen, and the user entered value will be stored in &str. Input text box doesn't know anything about it.

And the loop method in the Hello world example is in charge of drawing all widgets based on the parameters passed into them. This method will be invoked 30 times per second to reflect interactive states (like clicked, hovered, value-changed, etc.). It will be the place you define the UI structure.

The layout and sizing system

By default, any widget placed inside a container's Layout will be placed vertically.

To create a row of widgets (aka place widgets one by one horizontally), use the Row() method. For example giu.Row(Label(...), Button(...)) will create a Label next to a Button.

To creata a column of widgets (aka place widgets one by one vertically) inside a row, use the Column() method.

Any widget that has a Size() method, could set its size explicitly. Note that you could pass a negative value to Size(), which will fill the remaining width/height value. For example, InputText(...).Size(-1) will create a input text box with longest width that its container has left.

Containers
MasterWindow

A MasterWindow means the platform native window implemented by OS. All subwindows and widgets will be placed inside it.

Window

A Window is a container with a title bar, and can be collapsed. SingleWindow is a special kind of window that will occupy all available space of MasterWindow.

Child

A Child is like a panel in other GUI frameworks - it can have a background color and border.

Widgets

Check examples/widgets for all kinds of widgets.

Install

The backend of giu depends on OpenGL 3.3, make sure your environment supports it (so far as I known some Virtual Machines like VirualBox doesn't support it).

MacOS
xcode-select --install
go get github.com/AllenDang/giu
Windows
  1. Install mingw download here. Thanks @alchem1ster!
  2. Add the binaries folder of mingw to the path (usually is \mingw64\bin).
  3. go get github.com/AllenDang/giu

Or, install TDM-GCC.

Linux

First you need to install required dependencies:

# apt install libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libglx-dev libgl1-mesa-dev libxxf86vm-dev

Then, a simple go build will work.

Cross-compiling is a bit more complicated. Let's say that you want to build for arm64. That's what you would need to do:

# dpkg --add-architecture arm64
# apt update
# apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
    libx11-dev:arm64 libxcursor-dev:arm64 libxrandr-dev:arm64 libxinerama-dev:arm64 libxi-dev:arm64 libglx-dev:arm64 libgl1-mesa-dev:arm64 libxxf86vm-dev:arm64
$ GOOS=linux GOARCH=arm64 CGO_ENABLED=1 CC=aarch64-linux-gnu-gcc CXX=aarch64-linux-gnu-g++ HOST=aarch64-linux-gnu go build -v

Deploying

Build MacOS version on MacOS.
go build -ldflags "-s -w" .
Build Windows version on Windows.
go build -ldflags "-s -w -H=windowsgui -extldflags=-static" .
Build Windows version on MacOS.
  1. Install mingw-64.
brew install mingw-w64
  1. Prepare and embed application icon to executable and build.
cat > YourExeName.rc << EOL
id ICON "./res/app_win.ico"
GLFW_ICON ICON "./res/app_win.ico"
EOL

x86_64-w64-mingw32-windres YourExeName.rc -O coff -o YourExeName.syso
GOOS=windows GOARCH=amd64 CGO_ENABLED=1 CC=x86_64-w64-mingw32-gcc CXX=x86_64-w64-mingw32-g++ HOST=x86_64-w64-mingw32 go build -ldflags "-s -w -H=windowsgui -extldflags=-static" -p 4 -v -o YourExeName.exe

rm YourExeName.syso
rm YourExeName.rc

Documentation

Check Wiki

Contribution

All kinds of pull request (document, demo, screenshots, code, etc.) are more then welcome!

Projects using giu

PipeIt

PipeIt is a text transformation, conversion, cleansing and extraction tool.

PipeIt Demo

Documentation

Overview

input menager is used to register a keyboard shortcuts in an app

Index

Constants

View Source
const (
	DirectionLeft  = iota
	DirectionRight = iota
	DirectionUp    = iota
	DirectionDown  = iota
)
View Source
const (
	TextureFilterNearest = iota
	TextureFilterLinear
	TextureFilterNearestMipmapNearest
	TextureFilterLinearMipmapNearest
	TextureFilterNearestMipmapLinear
	TextureFilterLinearMipmapLinear
)

Texture filtering types.

Variables

View Source
var Context context

Functions

func AlignTextToFramePadding

func AlignTextToFramePadding()

AlignTextToFramePadding vertically aligns upcoming text baseline to FramePadding.y so that it will align properly to regularly framed items. Call if you have text on a line before a framed item.

func CalcTextSize

func CalcTextSize(text string) (width, height float32)

func CloseCurrentPopup

func CloseCurrentPopup()

func GenAutoID added in v0.5.5

func GenAutoID(id string) string

func GetAvailableRegion added in v0.5.5

func GetAvailableRegion() (width, height float32)

func GetCursorPos

func GetCursorPos() image.Point

func GetCursorScreenPos

func GetCursorScreenPos() image.Point

func GetFramePadding

func GetFramePadding() (float32, float32)

func GetItemInnerSpacing

func GetItemInnerSpacing() (float32, float32)

func GetItemSpacing

func GetItemSpacing() (float32, float32)

func GetMousePos

func GetMousePos() image.Point

func GetWindowPadding

func GetWindowPadding() (float32, float32)

func IsItemActive

func IsItemActive() bool

func IsItemClicked added in v0.5.0

func IsItemClicked(mouseButton MouseButton) bool

func IsItemHovered

func IsItemHovered() bool

func IsKeyDown

func IsKeyDown(key Key) bool

func IsKeyPressed

func IsKeyPressed(key Key) bool

func IsKeyReleased

func IsKeyReleased(key Key) bool

func IsMouseClicked

func IsMouseClicked(button MouseButton) bool

func IsMouseDoubleClicked

func IsMouseDoubleClicked(button MouseButton) bool

func IsMouseDown

func IsMouseDown(button MouseButton) bool

func IsMouseReleased

func IsMouseReleased(button MouseButton) bool

func IsWindowAppearing

func IsWindowAppearing() bool

func IsWindowCollapsed

func IsWindowCollapsed() bool

func IsWindowFocused

func IsWindowFocused(flags FocusedFlags) bool

func IsWindowHovered

func IsWindowHovered(flags HoveredFlags) bool

func LoadImage

func LoadImage(imgPath string) (*image.RGBA, error)

func Msgbox

func Msgbox(title, content string)

func MsgboxV

func MsgboxV(title, content string, buttons MsgboxButtons, resultCallback func(DialogResult))

func OpenPopup

func OpenPopup(name string)

func PopClipRect

func PopClipRect()

func PopFont

func PopFont()

func PopItemWidth

func PopItemWidth()

func PopStyle

func PopStyle()

func PopStyleColor

func PopStyleColor()

func PopStyleColorV

func PopStyleColorV(count int)

func PopStyleV

func PopStyleV(count int)

func PopTextWrapPos

func PopTextWrapPos()

func PushButtonTextAlign

func PushButtonTextAlign(width, height float32)

Alignment for button text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.

func PushClipRect

func PushClipRect(clipRectMin, clipRectMax image.Point, intersectWithClipRect bool)

func PushColorButton

func PushColorButton(col color.RGBA)

func PushColorButtonActive

func PushColorButtonActive(col color.RGBA)

func PushColorButtonHovered

func PushColorButtonHovered(col color.RGBA)

func PushColorFrameBg

func PushColorFrameBg(col color.RGBA)

func PushColorText

func PushColorText(col color.RGBA)

func PushColorTextDisabled

func PushColorTextDisabled(col color.RGBA)

func PushColorWindowBg

func PushColorWindowBg(col color.RGBA)

func PushFont

func PushFont(font *FontInfo) bool

func PushFramePadding

func PushFramePadding(width, height float32)

func PushItemSpacing

func PushItemSpacing(width, height float32)

func PushItemWidth

func PushItemWidth(width float32)

func PushSelectableTextAlign

func PushSelectableTextAlign(width, height float32)

Alignment for selectable text. Defaults to (0.0f,0.5f) for left-aligned,vertically centered.

func PushStyleColor added in v0.5.5

func PushStyleColor(id StyleColorID, col color.RGBA)

func PushTextWrapPos

func PushTextWrapPos()

func PushWindowPadding

func PushWindowPadding(width, height float32)

func RegisterKeyboardShortcuts added in v0.5.5

func RegisterKeyboardShortcuts(s ...Shortcut)

func SameLine

func SameLine()

func SetCursorPos added in v0.5.5

func SetCursorPos(pos image.Point)

func SetCursorScreenPos added in v0.5.5

func SetCursorScreenPos(pos image.Point)

func SetDefaultFont added in v0.5.5

func SetDefaultFont(fontName string, size float32)

Change default font

func SetDefaultFontFromBytes added in v0.5.5

func SetDefaultFontFromBytes(fontBytes []byte, size float32)

Change default font by bytes of the font file

func SetItemDefaultFocus

func SetItemDefaultFocus()

func SetKeyboardFocusHere

func SetKeyboardFocusHere()

func SetKeyboardFocusHereV

func SetKeyboardFocusHereV(i int)

func SetMouseCursor

func SetMouseCursor(cursor MouseCursorType)

func SetNextWindowPos added in v0.5.0

func SetNextWindowPos(x, y float32)

func SetNextWindowSize

func SetNextWindowSize(width, height float32)

func SetNextWindowSizeV

func SetNextWindowSizeV(width, height float32, condition ExecCondition)

func ToVec2

func ToVec2(pt image.Point) imgui.Vec2

func ToVec4Color

func ToVec4Color(col color.RGBA) imgui.Vec4

func Update

func Update()

func Vec4ToRGBA

func Vec4ToRGBA(vec4 imgui.Vec4) color.RGBA

Types

type ArrowButtonWidget

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

func ArrowButton

func ArrowButton(id string, dir Direction) *ArrowButtonWidget

func (*ArrowButtonWidget) Build

func (ab *ArrowButtonWidget) Build()

func (*ArrowButtonWidget) OnClick added in v0.5.0

func (b *ArrowButtonWidget) OnClick(onClick func()) *ArrowButtonWidget

type BulletTextWidget

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

func BulletText

func BulletText(text string) *BulletTextWidget

func (*BulletTextWidget) Build

func (bt *BulletTextWidget) Build()

type BulletWidget

type BulletWidget struct{}

func Bullet

func Bullet() *BulletWidget

func (*BulletWidget) Build

func (b *BulletWidget) Build()

type ButtonWidget

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

func Button

func Button(id string) *ButtonWidget

func (*ButtonWidget) Build

func (b *ButtonWidget) Build()

func (*ButtonWidget) Disabled added in v0.5.5

func (b *ButtonWidget) Disabled(d bool) *ButtonWidget

func (*ButtonWidget) OnClick added in v0.5.0

func (b *ButtonWidget) OnClick(onClick func()) *ButtonWidget

func (*ButtonWidget) Size added in v0.5.0

func (b *ButtonWidget) Size(width, height float32) *ButtonWidget

type Canvas

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

func GetCanvas

func GetCanvas() *Canvas

func (*Canvas) AddBezierCubic added in v0.5.1

func (c *Canvas) AddBezierCubic(pos0, cp0, cp1, pos1 image.Point, color color.RGBA, thickness float32, num_segments int)

func (*Canvas) AddCircle

func (c *Canvas) AddCircle(center image.Point, radius float32, color color.RGBA, segments int, thickness float32)

func (*Canvas) AddCircleFilled

func (c *Canvas) AddCircleFilled(center image.Point, radius float32, color color.RGBA)

func (*Canvas) AddImage

func (c *Canvas) AddImage(texture *Texture, pMin, pMax image.Point)

func (*Canvas) AddImageV

func (c *Canvas) AddImageV(texture *Texture, pMin, pMax image.Point, uvMin, uvMax image.Point, color color.RGBA)

func (*Canvas) AddLine

func (c *Canvas) AddLine(p1, p2 image.Point, color color.RGBA, thickness float32)

func (*Canvas) AddQuad

func (c *Canvas) AddQuad(p1, p2, p3, p4 image.Point, color color.RGBA, thickness float32)

func (*Canvas) AddQuadFilled

func (c *Canvas) AddQuadFilled(p1, p2, p3, p4 image.Point, color color.RGBA)

func (*Canvas) AddRect

func (c *Canvas) AddRect(pMin, pMax image.Point, color color.RGBA, rounding float32, rounding_corners DrawFlags, thickness float32)

func (*Canvas) AddRectFilled

func (c *Canvas) AddRectFilled(pMin, pMax image.Point, color color.RGBA, rounding float32, rounding_corners DrawFlags)

func (*Canvas) AddText

func (c *Canvas) AddText(pos image.Point, color color.RGBA, text string)

func (*Canvas) AddTriangle

func (c *Canvas) AddTriangle(p1, p2, p3 image.Point, color color.RGBA, thickness float32)

func (*Canvas) AddTriangleFilled

func (c *Canvas) AddTriangleFilled(p1, p2, p3 image.Point, color color.RGBA)

func (*Canvas) PathArcTo

func (c *Canvas) PathArcTo(center image.Point, radius, a_min, a_max float32, num_segments int)

func (*Canvas) PathArcToFast

func (c *Canvas) PathArcToFast(center image.Point, radius float32, a_min_of_12, a_max_of_12 int)

func (*Canvas) PathBezierCubicCurveTo added in v0.5.1

func (c *Canvas) PathBezierCubicCurveTo(p1, p2, p3 image.Point, num_segments int)

func (*Canvas) PathClear

func (c *Canvas) PathClear()

func (*Canvas) PathFillConvex

func (c *Canvas) PathFillConvex(color color.RGBA)

func (*Canvas) PathLineTo

func (c *Canvas) PathLineTo(pos image.Point)

func (*Canvas) PathLineToMergeDuplicate

func (c *Canvas) PathLineToMergeDuplicate(pos image.Point)

func (*Canvas) PathStroke

func (c *Canvas) PathStroke(color color.RGBA, closed bool, thickness float32)

type CheckboxWidget

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

func Checkbox

func Checkbox(text string, selected *bool) *CheckboxWidget

func (*CheckboxWidget) Build

func (c *CheckboxWidget) Build()

func (*CheckboxWidget) OnChange added in v0.5.0

func (c *CheckboxWidget) OnChange(onChange func()) *CheckboxWidget

type ChildWidget

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

func Child

func Child() *ChildWidget

func (*ChildWidget) Border added in v0.5.0

func (c *ChildWidget) Border(border bool) *ChildWidget

func (*ChildWidget) Build

func (c *ChildWidget) Build()

func (*ChildWidget) Flags added in v0.5.0

func (c *ChildWidget) Flags(flags WindowFlags) *ChildWidget

func (*ChildWidget) Layout added in v0.5.0

func (c *ChildWidget) Layout(widgets ...Widget) *ChildWidget

func (*ChildWidget) Size added in v0.5.0

func (c *ChildWidget) Size(width, height float32) *ChildWidget

type CodeEditorWidget added in v0.5.5

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

func CodeEditor added in v0.5.5

func CodeEditor(title string) *CodeEditorWidget

func (*CodeEditorWidget) Copy added in v0.5.5

func (ce *CodeEditorWidget) Copy()

func (*CodeEditorWidget) Cut added in v0.5.5

func (ce *CodeEditorWidget) Cut()

func (*CodeEditorWidget) Delete added in v0.5.5

func (ce *CodeEditorWidget) Delete()

func (*CodeEditorWidget) GetCurrentLineText added in v0.5.5

func (ce *CodeEditorWidget) GetCurrentLineText() string

func (*CodeEditorWidget) GetCursorPos added in v0.5.5

func (ce *CodeEditorWidget) GetCursorPos() (int, int)

func (*CodeEditorWidget) GetScreenCursorPos added in v0.5.5

func (ce *CodeEditorWidget) GetScreenCursorPos() (int, int)

func (*CodeEditorWidget) GetSelectedText added in v0.5.5

func (ce *CodeEditorWidget) GetSelectedText() string

func (*CodeEditorWidget) GetSelectionStart added in v0.5.5

func (ce *CodeEditorWidget) GetSelectionStart() (int, int)

func (*CodeEditorWidget) GetText added in v0.5.5

func (ce *CodeEditorWidget) GetText() string

func (*CodeEditorWidget) GetWordUnderCursor added in v0.5.5

func (ce *CodeEditorWidget) GetWordUnderCursor() string

func (*CodeEditorWidget) HasSelection added in v0.5.5

func (ce *CodeEditorWidget) HasSelection() bool

func (*CodeEditorWidget) InsertText added in v0.5.5

func (ce *CodeEditorWidget) InsertText(text string)

func (*CodeEditorWidget) IsTextChanged added in v0.5.5

func (ce *CodeEditorWidget) IsTextChanged() bool

func (*CodeEditorWidget) Paste added in v0.5.5

func (ce *CodeEditorWidget) Paste()

func (*CodeEditorWidget) Render added in v0.5.5

func (ce *CodeEditorWidget) Render(width, height float32, border bool)

func (*CodeEditorWidget) SelectWordUnderCursor added in v0.5.5

func (ce *CodeEditorWidget) SelectWordUnderCursor()

func (*CodeEditorWidget) SetErrorMarkers added in v0.5.5

func (ce *CodeEditorWidget) SetErrorMarkers(markers imgui.ErrorMarkers)

func (*CodeEditorWidget) SetHandleKeyboardInputs added in v0.5.5

func (ce *CodeEditorWidget) SetHandleKeyboardInputs(b bool)

func (*CodeEditorWidget) SetLanguageDefinitionC added in v0.5.5

func (ce *CodeEditorWidget) SetLanguageDefinitionC()

func (*CodeEditorWidget) SetLanguageDefinitionCPP added in v0.5.5

func (ce *CodeEditorWidget) SetLanguageDefinitionCPP()

func (*CodeEditorWidget) SetLanguageDefinitionLua added in v0.5.5

func (ce *CodeEditorWidget) SetLanguageDefinitionLua()

func (*CodeEditorWidget) SetLanguageDefinitionSQL added in v0.5.5

func (ce *CodeEditorWidget) SetLanguageDefinitionSQL()

func (*CodeEditorWidget) SetShowWhitespaces added in v0.5.5

func (ce *CodeEditorWidget) SetShowWhitespaces(s bool)

func (*CodeEditorWidget) SetTabSize added in v0.5.5

func (ce *CodeEditorWidget) SetTabSize(size int)

func (*CodeEditorWidget) SetText added in v0.5.5

func (ce *CodeEditorWidget) SetText(str string)

type ColorEditFlags added in v0.5.4

type ColorEditFlags int

ColorEditFlags for ColorEdit3V(), etc.

const (
	// ColorEditFlagsNone default = 0.
	ColorEditFlagsNone ColorEditFlags = 0
	// ColorEditFlagsNoAlpha ignores Alpha component (read 3 components from the input pointer).
	ColorEditFlagsNoAlpha ColorEditFlags = 1 << 1
	// ColorEditFlagsNoPicker disables picker when clicking on colored square.
	ColorEditFlagsNoPicker ColorEditFlags = 1 << 2
	// ColorEditFlagsNoOptions disables toggling options menu when right-clicking on inputs/small preview.
	ColorEditFlagsNoOptions ColorEditFlags = 1 << 3
	// ColorEditFlagsNoSmallPreview disables colored square preview next to the inputs. (e.g. to show only the inputs).
	ColorEditFlagsNoSmallPreview ColorEditFlags = 1 << 4
	// ColorEditFlagsNoInputs disables inputs sliders/text widgets (e.g. to show only the small preview colored square).
	ColorEditFlagsNoInputs ColorEditFlags = 1 << 5
	// ColorEditFlagsNoTooltip disables tooltip when hovering the preview.
	ColorEditFlagsNoTooltip ColorEditFlags = 1 << 6
	// ColorEditFlagsNoLabel disables display of inline text label (the label is still forwarded to the tooltip and picker).
	ColorEditFlagsNoLabel ColorEditFlags = 1 << 7
	// ColorEditFlagsNoSidePreview disables bigger color preview on right side of the picker, use small colored square preview instead.
	ColorEditFlagsNoSidePreview ColorEditFlags = 1 << 8
	// ColorEditFlagsNoDragDrop disables drag and drop target. ColorButton: disable drag and drop source.
	ColorEditFlagsNoDragDrop ColorEditFlags = 1 << 9
	// ColorEditFlagsNoBorder disables border (which is enforced by default).
	ColorEditFlagsNoBorder ColorEditFlags = 1 << 10

	// ColorEditFlagsAlphaBar shows vertical alpha bar/gradient in picker.
	ColorEditFlagsAlphaBar ColorEditFlags = 1 << 16
	// ColorEditFlagsAlphaPreview displays preview as a transparent color over a checkerboard, instead of opaque.
	ColorEditFlagsAlphaPreview ColorEditFlags = 1 << 17
	// ColorEditFlagsAlphaPreviewHalf displays half opaque / half checkerboard, instead of opaque.
	ColorEditFlagsAlphaPreviewHalf ColorEditFlags = 1 << 18
	// ColorEditFlagsHDR = (WIP) surrently only disable 0.0f..1.0f limits in RGBA edition.
	// Note: you probably want to use ImGuiColorEditFlags_Float flag as well.
	ColorEditFlagsHDR ColorEditFlags = 1 << 19
	// ColorEditFlagsRGB sets the format as RGB.
	ColorEditFlagsRGB ColorEditFlags = 1 << 20
	// ColorEditFlagsHSV sets the format as HSV.
	ColorEditFlagsHSV ColorEditFlags = 1 << 21
	// ColorEditFlagsHEX sets the format as HEX.
	ColorEditFlagsHEX ColorEditFlags = 1 << 22
	// ColorEditFlagsUint8 _display_ values formatted as 0..255.
	ColorEditFlagsUint8 ColorEditFlags = 1 << 23
	// ColorEditFlagsFloat _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers.
	ColorEditFlagsFloat ColorEditFlags = 1 << 24

	// ColorEditFlagsPickerHueBar shows bar for Hue, rectangle for Sat/Value.
	ColorEditFlagsPickerHueBar ColorEditFlags = 1 << 25
	// ColorEditFlagsPickerHueWheel shows wheel for Hue, triangle for Sat/Value.
	ColorEditFlagsPickerHueWheel ColorEditFlags = 1 << 26
	// ColorEditFlagsInputRGB enables input and output data in RGB format.
	ColorEditFlagsInputRGB ColorEditFlags = 1 << 27
	// ColorEditFlagsInputHSV enables input and output data in HSV format.
	ColorEditFlagsInputHSV ColorEditFlags = 1 << 28
)

type ColorEditWidget added in v0.5.4

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

func ColorEdit added in v0.5.4

func ColorEdit(label string, color *color.RGBA) *ColorEditWidget

func (*ColorEditWidget) Build added in v0.5.4

func (ce *ColorEditWidget) Build()

func (*ColorEditWidget) Flags added in v0.5.4

func (*ColorEditWidget) OnChange added in v0.5.4

func (ce *ColorEditWidget) OnChange(cb func()) *ColorEditWidget

func (*ColorEditWidget) Size added in v0.5.4

func (ce *ColorEditWidget) Size(width float32) *ColorEditWidget

type ColumnWidget added in v0.5.1

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

func Column added in v0.5.1

func Column(widgets ...Widget) *ColumnWidget

Column layout will place all widgets one by one vertically.

func (*ColumnWidget) Build added in v0.5.1

func (g *ColumnWidget) Build()

type ComboCustomWidget

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

func ComboCustom

func ComboCustom(label, previewValue string) *ComboCustomWidget

func (*ComboCustomWidget) Build

func (cc *ComboCustomWidget) Build()

func (*ComboCustomWidget) Flags added in v0.5.0

func (*ComboCustomWidget) Layout added in v0.5.0

func (cc *ComboCustomWidget) Layout(widgets ...Widget) *ComboCustomWidget

func (*ComboCustomWidget) Size added in v0.5.0

func (cc *ComboCustomWidget) Size(width float32) *ComboCustomWidget

type ComboFlags

type ComboFlags int
const (
	// ComboFlagNone default ComboFlags = 0
	ComboFlagNone ComboFlags = 0
	// ComboFlagPopupAlignLeft aligns the popup toward the left by default.
	ComboFlagPopupAlignLeft ComboFlags = 1 << 0
	// ComboFlagHeightSmall has max ~4 items visible.
	// Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo().
	ComboFlagHeightSmall ComboFlags = 1 << 1
	// ComboFlagHeightRegular has max ~8 items visible (default).
	ComboFlagHeightRegular ComboFlags = 1 << 2
	// ComboFlagHeightLarge has max ~20 items visible.
	ComboFlagHeightLarge ComboFlags = 1 << 3
	// ComboFlagHeightLargest has as many fitting items as possible.
	ComboFlagHeightLargest ComboFlags = 1 << 4
	// ComboFlagNoArrowButton displays on the preview box without the square arrow button.
	ComboFlagNoArrowButton ComboFlags = 1 << 5
	// ComboFlagNoPreview displays only a square arrow button.
	ComboFlagNoPreview ComboFlags = 1 << 6
)

type ComboWidget

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

func Combo

func Combo(label, previewValue string, items []string, selected *int32) *ComboWidget

func (*ComboWidget) Build

func (c *ComboWidget) Build()

func (*ComboWidget) Flags added in v0.5.0

func (c *ComboWidget) Flags(flags ComboFlags) *ComboWidget

func (*ComboWidget) OnChange added in v0.5.0

func (c *ComboWidget) OnChange(onChange func()) *ComboWidget

func (*ComboWidget) Size added in v0.5.0

func (c *ComboWidget) Size(width float32) *ComboWidget

type ConditionWidget

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

func Condition

func Condition(cond bool, layoutIf Layout, layoutElse Layout) *ConditionWidget

func (*ConditionWidget) Build

func (c *ConditionWidget) Build()

type ContextMenuWidget

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

func ContextMenu

func ContextMenu() *ContextMenuWidget

func (*ContextMenuWidget) Build

func (c *ContextMenuWidget) Build()

func (*ContextMenuWidget) ID added in v0.5.5

func (*ContextMenuWidget) Layout added in v0.5.0

func (c *ContextMenuWidget) Layout(widgets ...Widget) *ContextMenuWidget

func (*ContextMenuWidget) MouseButton added in v0.5.0

func (c *ContextMenuWidget) MouseButton(mouseButton MouseButton) *ContextMenuWidget

type CustomWidget

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

func Custom

func Custom(builder func()) *CustomWidget

func (*CustomWidget) Build

func (c *CustomWidget) Build()

type DatePickerWidget

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

func DatePicker

func DatePicker(id string, date *time.Time) *DatePickerWidget

func (*DatePickerWidget) Build

func (d *DatePickerWidget) Build()

func (*DatePickerWidget) OnChange added in v0.5.0

func (d *DatePickerWidget) OnChange(onChange func()) *DatePickerWidget

func (*DatePickerWidget) Size added in v0.5.0

func (d *DatePickerWidget) Size(width float32) *DatePickerWidget

type DialogResult

type DialogResult uint8
const (
	DialogResultOK DialogResult = 1 << iota
	DialogResultCancel
	DialogResultYes
	DialogResultNo
)

type DialogResultCallback

type DialogResultCallback func(DialogResult)

type Direction

type Direction uint8

type Disposable

type Disposable interface {
	Dispose()
}

type DragIntWidget

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

func DragInt

func DragInt(label string, value *int32, min, max int32) *DragIntWidget

func (*DragIntWidget) Build

func (d *DragIntWidget) Build()

func (*DragIntWidget) Format added in v0.5.0

func (d *DragIntWidget) Format(format string) *DragIntWidget

func (*DragIntWidget) Speed added in v0.5.0

func (d *DragIntWidget) Speed(speed float32) *DragIntWidget

type DrawFlags added in v0.5.3

type DrawFlags int
const (
	DrawFlagsNone                    DrawFlags = 0
	DrawFlagsClosed                  DrawFlags = 1 << 0 // PathStroke(), AddPolyline(): specify that shape should be closed (portant: this is always == 1 for legacy reason)
	DrawFlagsRoundCornersTopLeft     DrawFlags = 1 << 4 // AddRect(), AddRectFilled(), PathRect(): enable rounding top-left corner only (when rounding > 0.0f, we default to all corners). Was 0x01.
	DrawFlagsRoundCornersTopRight    DrawFlags = 1 << 5 // AddRect(), AddRectFilled(), PathRect(): enable rounding top-right corner only (when rounding > 0.0f, we default to all corners). Was 0x02.
	DrawFlagsRoundCornersBottomLeft  DrawFlags = 1 << 6 // AddRect(), AddRectFilled(), PathRect(): enable rounding bottom-left corner only (when rounding > 0.0f, we default to all corners). Was 0x04.
	DrawFlagsRoundCornersBottomRight DrawFlags = 1 << 7 // AddRect(), AddRectFilled(), PathRect(): enable rounding bottom-right corner only (when rounding > 0.0f, we default to all corners). Wax 0x08.
	DrawFlagsRoundCornersNone        DrawFlags = 1 << 8 // AddRect(), AddRectFilled(), PathRect(): disable rounding on all corners (when rounding > 0.0f). This is NOT zero, NOT an implicit flag!
	DrawFlagsRoundCornersTop         DrawFlags = DrawFlagsRoundCornersTopLeft | DrawFlagsRoundCornersTopRight
	DrawFlagsRoundCornersBottom      DrawFlags = DrawFlagsRoundCornersBottomLeft | DrawFlagsRoundCornersBottomRight
	DrawFlagsRoundCornersLeft        DrawFlags = DrawFlagsRoundCornersBottomLeft | DrawFlagsRoundCornersTopLeft
	DrawFlagsRoundCornersRight       DrawFlags = DrawFlagsRoundCornersBottomRight | DrawFlagsRoundCornersTopRight
	DrawFlagsRoundCornersAll         DrawFlags = DrawFlagsRoundCornersTopLeft | DrawFlagsRoundCornersTopRight | DrawFlagsRoundCornersBottomLeft | DrawFlagsRoundCornersBottomRight
	DrawFlagsRoundCornersDefault     DrawFlags = DrawFlagsRoundCornersAll // Default to ALL corners if none of the RoundCornersXX flags are specified.
	DrawFlagsRoundCornersMask        DrawFlags = DrawFlagsRoundCornersAll | DrawFlagsRoundCornersNone
)

type DummyWidget

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

func Dummy

func Dummy(width, height float32) *DummyWidget

func (*DummyWidget) Build

func (d *DummyWidget) Build()

type ExecCondition

type ExecCondition imgui.Condition
const (
	ConditionAlways       ExecCondition = ExecCondition(imgui.ConditionAlways)
	ConditionOnce         ExecCondition = ExecCondition(imgui.ConditionOnce)
	ConditionFirstUseEver ExecCondition = ExecCondition(imgui.ConditionFirstUseEver)
	ConditionAppearing    ExecCondition = ExecCondition(imgui.ConditionAppearing)
)

type FocusedFlags

type FocusedFlags int
const (
	// FocusedFlagsNone default FocusedFlags = 0
	FocusedFlagsNone FocusedFlags = 0
	// FocusedFlagsChildWindows matches if any children of the window is focused
	FocusedFlagsChildWindows FocusedFlags = 1 << 0
	// FocusedFlagsRootWindow tests from root window (top most parent of the current hierarchy)
	FocusedFlagsRootWindow FocusedFlags = 1 << 1
	// FocusedFlagsAnyWindow matches if any window is focused.
	FocusedFlagsAnyWindow FocusedFlags = 1 << 2
	// FocusedFlagsRootAndChildWindows combines FocusedFlagsRootWindow and FocusedFlagsChildWindows.
	FocusedFlagsRootAndChildWindows = FocusedFlagsRootWindow | FocusedFlagsChildWindows
)

type FontInfo added in v0.5.5

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

func AddFont added in v0.5.5

func AddFont(fontName string, size float32) *FontInfo

Add font by name, if the font is found, return *FontInfo, otherwise return nil. To use added font, use giu.Style().SetFont(...).

func AddFontFromBytes added in v0.5.5

func AddFontFromBytes(fontName string, fontBytes []byte, size float32) *FontInfo

func (*FontInfo) String added in v0.5.5

func (f *FontInfo) String() string

type HSplitterWidget

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

func HSplitter

func HSplitter(delta *float32) *HSplitterWidget

func (*HSplitterWidget) Build

func (h *HSplitterWidget) Build()

func (*HSplitterWidget) Size added in v0.5.0

func (h *HSplitterWidget) Size(width, height float32) *HSplitterWidget

type HoveredFlags

type HoveredFlags int
const (
	// HoveredFlagsNone is the default and matches if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them.
	HoveredFlagsNone HoveredFlags = 0
	// HoveredFlagsChildWindows is for IsWindowHovered() and matches if any children of the window is hovered
	HoveredFlagsChildWindows HoveredFlags = 1 << 0
	// HoveredFlagsRootWindow is for IsWindowHovered() and tests from root window (top most parent of the current hierarchy)
	HoveredFlagsRootWindow HoveredFlags = 1 << 1
	// HoveredFlagsAnyWindow is for IsWindowHovered() and matches if any window is hovered
	HoveredFlagsAnyWindow HoveredFlags = 1 << 2
	// HoveredFlagsAllowWhenBlockedByPopup matches even if a popup window is normally blocking access to this item/window
	HoveredFlagsAllowWhenBlockedByPopup HoveredFlags = 1 << 3
	// HoveredFlagsAllowWhenBlockedByModal matches even if a modal popup window is normally blocking access to this item/window. UNIMPLEMENTED in imgui.
	// HoveredFlagsAllowWhenBlockedByModal  HoveredFlags   = 1 << 4
	// HoveredFlagsAllowWhenBlockedByActiveItem matches true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns.
	HoveredFlagsAllowWhenBlockedByActiveItem HoveredFlags = 1 << 5
	// HoveredFlagsAllowWhenOverlapped matches even if the position is obstructed or overlapped by another window
	HoveredFlagsAllowWhenOverlapped HoveredFlags = 1 << 6
	// HoveredFlagsAllowWhenDisabled matches even if the item is disabled
	HoveredFlagsAllowWhenDisabled HoveredFlags = 1 << 7
	// HoveredFlagsRectOnly combines HoveredFlagsAllowWhenBlockedByPopup, HoveredFlagsAllowWhenBlockedByActiveItem, and HoveredFlagsAllowWhenOverlapped.
	HoveredFlagsRectOnly HoveredFlags = HoveredFlagsAllowWhenBlockedByPopup | HoveredFlagsAllowWhenBlockedByActiveItem | HoveredFlagsAllowWhenOverlapped
	// HoveredFlagsRootAndChildWindows combines HoveredFlagsRootWindow and HoveredFlagsChildWindows.
	HoveredFlagsRootAndChildWindows HoveredFlags = HoveredFlagsRootWindow | HoveredFlagsChildWindows
)

type ImPlotYAxis added in v0.5.1

type ImPlotYAxis int
const (
	ImPlotYAxisLeft          ImPlotYAxis = 0 // left (default)
	ImPlotYAxisFirstOnRight  ImPlotYAxis = 1 // first on right side
	ImPlotYAxisSecondOnRight ImPlotYAxis = 2 // second on right side
)

type ImageButtonWidget

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

func ImageButton

func ImageButton(texture *Texture) *ImageButtonWidget

func (*ImageButtonWidget) BgColor added in v0.5.0

func (b *ImageButtonWidget) BgColor(bgColor color.RGBA) *ImageButtonWidget

func (*ImageButtonWidget) Build

func (i *ImageButtonWidget) Build()

func (*ImageButtonWidget) FramePadding added in v0.5.0

func (b *ImageButtonWidget) FramePadding(padding int) *ImageButtonWidget

func (*ImageButtonWidget) OnClick added in v0.5.0

func (b *ImageButtonWidget) OnClick(onClick func()) *ImageButtonWidget

func (*ImageButtonWidget) Size added in v0.5.0

func (b *ImageButtonWidget) Size(width, height float32) *ImageButtonWidget

func (*ImageButtonWidget) TintColor added in v0.5.0

func (b *ImageButtonWidget) TintColor(tintColor color.RGBA) *ImageButtonWidget

func (*ImageButtonWidget) UV added in v0.5.0

type ImageButtonWithRgbaWidget added in v0.5.5

type ImageButtonWithRgbaWidget struct {
	*ImageButtonWidget
	// contains filtered or unexported fields
}

func ImageButtonWithRgba added in v0.5.5

func ImageButtonWithRgba(rgba *image.RGBA) *ImageButtonWithRgbaWidget

func (*ImageButtonWithRgbaWidget) BgColor added in v0.5.5

func (*ImageButtonWithRgbaWidget) Build added in v0.5.5

func (i *ImageButtonWithRgbaWidget) Build()

func (*ImageButtonWithRgbaWidget) FramePadding added in v0.5.5

func (b *ImageButtonWithRgbaWidget) FramePadding(padding int) *ImageButtonWithRgbaWidget

func (*ImageButtonWithRgbaWidget) OnClick added in v0.5.5

func (b *ImageButtonWithRgbaWidget) OnClick(onClick func()) *ImageButtonWithRgbaWidget

func (*ImageButtonWithRgbaWidget) Size added in v0.5.5

func (*ImageButtonWithRgbaWidget) TintColor added in v0.5.5

func (*ImageButtonWithRgbaWidget) UV added in v0.5.5

type ImageState

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

func (*ImageState) Dispose

func (is *ImageState) Dispose()

type ImageWidget

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

func Image

func Image(texture *Texture) *ImageWidget

func (*ImageWidget) BorderCol added in v0.5.0

func (i *ImageWidget) BorderCol(borderColor color.RGBA) *ImageWidget

func (*ImageWidget) Build

func (i *ImageWidget) Build()

func (*ImageWidget) OnClick added in v0.5.5

func (i *ImageWidget) OnClick(cb func()) *ImageWidget

func (*ImageWidget) Size added in v0.5.0

func (i *ImageWidget) Size(width, height float32) *ImageWidget

func (*ImageWidget) TintColor added in v0.5.0

func (i *ImageWidget) TintColor(tintColor color.RGBA) *ImageWidget

func (*ImageWidget) Uv added in v0.5.0

func (i *ImageWidget) Uv(uv0, uv1 image.Point) *ImageWidget

type ImageWithFileWidget

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

func ImageWithFile

func ImageWithFile(imgPath string) *ImageWithFileWidget

func (*ImageWithFileWidget) Build

func (i *ImageWithFileWidget) Build()

func (*ImageWithFileWidget) OnClick added in v0.5.5

func (i *ImageWithFileWidget) OnClick(cb func()) *ImageWithFileWidget

func (*ImageWithFileWidget) Size added in v0.5.0

func (i *ImageWithFileWidget) Size(width, height float32) *ImageWithFileWidget

type ImageWithRgbaWidget added in v0.5.5

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

func ImageWithRgba added in v0.5.5

func ImageWithRgba(rgba *image.RGBA) *ImageWithRgbaWidget

func (*ImageWithRgbaWidget) Build added in v0.5.5

func (i *ImageWithRgbaWidget) Build()

func (*ImageWithRgbaWidget) OnClick added in v0.5.5

func (i *ImageWithRgbaWidget) OnClick(cb func()) *ImageWithRgbaWidget

func (*ImageWithRgbaWidget) Size added in v0.5.5

func (i *ImageWithRgbaWidget) Size(width, height float32) *ImageWithRgbaWidget

type ImageWithUrlWidget

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

func ImageWithUrl

func ImageWithUrl(url string) *ImageWithUrlWidget

func (*ImageWithUrlWidget) Build

func (i *ImageWithUrlWidget) Build()

func (*ImageWithUrlWidget) LayoutForFailure added in v0.5.0

func (i *ImageWithUrlWidget) LayoutForFailure(widgets ...Widget) *ImageWithUrlWidget

func (*ImageWithUrlWidget) LayoutForLoading added in v0.5.0

func (i *ImageWithUrlWidget) LayoutForLoading(widgets ...Widget) *ImageWithUrlWidget

func (*ImageWithUrlWidget) OnClick added in v0.5.5

func (i *ImageWithUrlWidget) OnClick(cb func()) *ImageWithUrlWidget

func (*ImageWithUrlWidget) OnFailure added in v0.5.4

func (i *ImageWithUrlWidget) OnFailure(onFailure func(error)) *ImageWithUrlWidget

func (*ImageWithUrlWidget) OnReady added in v0.5.4

func (i *ImageWithUrlWidget) OnReady(onReady func()) *ImageWithUrlWidget

Event trigger when image is downloaded and ready to display.

func (*ImageWithUrlWidget) Size added in v0.5.0

func (i *ImageWithUrlWidget) Size(width, height float32) *ImageWithUrlWidget

func (*ImageWithUrlWidget) Timeout added in v0.5.0

func (i *ImageWithUrlWidget) Timeout(downloadTimeout time.Duration) *ImageWithUrlWidget

type InputFloatWidget

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

func InputFloat

func InputFloat(label string, value *float32) *InputFloatWidget

func (*InputFloatWidget) Build

func (i *InputFloatWidget) Build()

func (*InputFloatWidget) Flags added in v0.5.0

func (*InputFloatWidget) Format added in v0.5.0

func (i *InputFloatWidget) Format(format string) *InputFloatWidget

func (*InputFloatWidget) Label added in v0.5.5

func (i *InputFloatWidget) Label(label string) *InputFloatWidget

func (*InputFloatWidget) Size added in v0.5.0

func (i *InputFloatWidget) Size(width float32) *InputFloatWidget

type InputIntWidget

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

func InputInt

func InputInt(value *int32) *InputIntWidget

func (*InputIntWidget) Build

func (i *InputIntWidget) Build()

func (*InputIntWidget) Flags added in v0.5.0

func (i *InputIntWidget) Flags(flags InputTextFlags) *InputIntWidget

func (*InputIntWidget) Label added in v0.5.5

func (i *InputIntWidget) Label(label string) *InputIntWidget

func (*InputIntWidget) OnChange added in v0.5.0

func (i *InputIntWidget) OnChange(onChange func()) *InputIntWidget

func (*InputIntWidget) Size added in v0.5.0

func (i *InputIntWidget) Size(width float32) *InputIntWidget

type InputTextFlags

type InputTextFlags int
const (
	InputTextFlagsNone                InputTextFlags = 0
	InputTextFlagsCharsDecimal        InputTextFlags = 1 << 0  // Allow 0123456789.+-*/
	InputTextFlagsCharsHexadecimal    InputTextFlags = 1 << 1  // Allow 0123456789ABCDEFabcdef
	InputTextFlagsCharsUppercase      InputTextFlags = 1 << 2  // Turn a..z into A..Z
	InputTextFlagsCharsNoBlank        InputTextFlags = 1 << 3  // Filter out spaces, tabs
	InputTextFlagsAutoSelectAll       InputTextFlags = 1 << 4  // Select entire text when first taking mouse focus
	InputTextFlagsEnterReturnsTrue    InputTextFlags = 1 << 5  // Return 'true' when Enter is pressed (as opposed to every time the value was modified). Consider looking at the IsItemDeactivatedAfterEdit() function.
	InputTextFlagsCallbackCompletion  InputTextFlags = 1 << 6  // Callback on pressing TAB (for completion handling)
	InputTextFlagsCallbackHistory     InputTextFlags = 1 << 7  // Callback on pressing Up/Down arrows (for history handling)
	InputTextFlagsCallbackAlways      InputTextFlags = 1 << 8  // Callback on each iteration. User code may query cursor position, modify text buffer.
	InputTextFlagsCallbackCharFilter  InputTextFlags = 1 << 9  // Callback on character inputs to replace or discard them. Modify 'EventChar' to replace or discard, or return 1 in callback to discard.
	InputTextFlagsAllowTabInput       InputTextFlags = 1 << 10 // Pressing TAB input a '\t' character into the text field
	InputTextFlagsCtrlEnterForNewLine InputTextFlags = 1 << 11 // In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter).
	InputTextFlagsNoHorizontalScroll  InputTextFlags = 1 << 12 // Disable following the cursor horizontally
	InputTextFlagsAlwaysOverwrite     InputTextFlags = 1 << 13 // Overwrite mode
	InputTextFlagsReadOnly            InputTextFlags = 1 << 14 // Read-only mode
	InputTextFlagsPassword            InputTextFlags = 1 << 15 // Password mode, display all characters as '*'
	InputTextFlagsNoUndoRedo          InputTextFlags = 1 << 16 // Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID().
	InputTextFlagsCharsScientific     InputTextFlags = 1 << 17 // Allow 0123456789.+-*/eE (Scientific notation input)
	InputTextFlagsCallbackResize      InputTextFlags = 1 << 18 // Callback on buffer capacity changes request (beyond 'bufsize' parameter value), allowing the string to grow. Notify when the string wants to be resized (for string types which hold a cache of their Size). You will be provided a new BufSize in the callback and NEED to honor it. (see misc/cpp/imguistdlib.h for an example of using this)
	InputTextFlagsCallbackEdit        InputTextFlags = 1 << 19 // Callback on any edit (note that InputText() already returns true on edit, the callback is useful mainly to manipulate the underlying buffer while focus is active)
)

type InputTextMultilineWidget

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

func InputTextMultiline

func InputTextMultiline(text *string) *InputTextMultilineWidget

func (*InputTextMultilineWidget) Build

func (i *InputTextMultilineWidget) Build()

func (*InputTextMultilineWidget) Callback added in v0.5.0

func (i *InputTextMultilineWidget) Callback(cb imgui.InputTextCallback) *InputTextMultilineWidget

func (*InputTextMultilineWidget) Flags added in v0.5.0

func (*InputTextMultilineWidget) Label added in v0.5.5

func (*InputTextMultilineWidget) OnChange added in v0.5.0

func (i *InputTextMultilineWidget) OnChange(onChange func()) *InputTextMultilineWidget

func (*InputTextMultilineWidget) Size added in v0.5.0

type InputTextWidget

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

func InputText

func InputText(value *string) *InputTextWidget

func (*InputTextWidget) AutoComplete added in v0.5.5

func (i *InputTextWidget) AutoComplete(candidates []string) *InputTextWidget

Enable auto complete popup by using fuzzy search of current value agains candidates Press enter to confirm the first candidate

func (*InputTextWidget) Build

func (i *InputTextWidget) Build()

func (*InputTextWidget) Callback added in v0.5.0

func (i *InputTextWidget) Callback(cb imgui.InputTextCallback) *InputTextWidget

func (*InputTextWidget) Flags added in v0.5.0

func (*InputTextWidget) Hint added in v0.5.4

func (i *InputTextWidget) Hint(hint string) *InputTextWidget

func (*InputTextWidget) Label added in v0.5.5

func (i *InputTextWidget) Label(label string) *InputTextWidget

func (*InputTextWidget) OnChange added in v0.5.0

func (i *InputTextWidget) OnChange(onChange func()) *InputTextWidget

func (*InputTextWidget) Size added in v0.5.0

func (i *InputTextWidget) Size(width float32) *InputTextWidget

type InvisibleButtonWidget

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

func InvisibleButton

func InvisibleButton(id string) *InvisibleButtonWidget

func (*InvisibleButtonWidget) Build

func (ib *InvisibleButtonWidget) Build()

func (*InvisibleButtonWidget) OnClick added in v0.5.0

func (b *InvisibleButtonWidget) OnClick(onClick func()) *InvisibleButtonWidget

func (*InvisibleButtonWidget) Size added in v0.5.0

func (b *InvisibleButtonWidget) Size(width, height float32) *InvisibleButtonWidget

type Key

type Key int
const (
	KeyUnknown      Key = Key(glfw.KeyUnknown)
	KeySpace        Key = Key(glfw.KeySpace)
	KeyApostrophe   Key = Key(glfw.KeyApostrophe)
	KeyComma        Key = Key(glfw.KeyComma)
	KeyMinus        Key = Key(glfw.KeyMinus)
	KeyPeriod       Key = Key(glfw.KeyPeriod)
	KeySlash        Key = Key(glfw.KeySlash)
	Key0            Key = Key(glfw.Key0)
	Key1            Key = Key(glfw.Key1)
	Key2            Key = Key(glfw.Key2)
	Key3            Key = Key(glfw.Key3)
	Key4            Key = Key(glfw.Key4)
	Key5            Key = Key(glfw.Key5)
	Key6            Key = Key(glfw.Key6)
	Key7            Key = Key(glfw.Key7)
	Key8            Key = Key(glfw.Key8)
	Key9            Key = Key(glfw.Key9)
	KeySemicolon    Key = Key(glfw.KeySemicolon)
	KeyEqual        Key = Key(glfw.KeyEqual)
	KeyA            Key = Key(glfw.KeyA)
	KeyB            Key = Key(glfw.KeyB)
	KeyC            Key = Key(glfw.KeyC)
	KeyD            Key = Key(glfw.KeyD)
	KeyE            Key = Key(glfw.KeyE)
	KeyF            Key = Key(glfw.KeyF)
	KeyG            Key = Key(glfw.KeyG)
	KeyH            Key = Key(glfw.KeyH)
	KeyI            Key = Key(glfw.KeyI)
	KeyJ            Key = Key(glfw.KeyJ)
	KeyK            Key = Key(glfw.KeyK)
	KeyL            Key = Key(glfw.KeyL)
	KeyM            Key = Key(glfw.KeyM)
	KeyN            Key = Key(glfw.KeyN)
	KeyO            Key = Key(glfw.KeyO)
	KeyP            Key = Key(glfw.KeyP)
	KeyQ            Key = Key(glfw.KeyQ)
	KeyR            Key = Key(glfw.KeyR)
	KeyS            Key = Key(glfw.KeyS)
	KeyT            Key = Key(glfw.KeyT)
	KeyU            Key = Key(glfw.KeyU)
	KeyV            Key = Key(glfw.KeyV)
	KeyW            Key = Key(glfw.KeyW)
	KeyX            Key = Key(glfw.KeyX)
	KeyY            Key = Key(glfw.KeyY)
	KeyZ            Key = Key(glfw.KeyZ)
	KeyLeftBracket  Key = Key(glfw.KeyLeftBracket)
	KeyBackslash    Key = Key(glfw.KeyBackslash)
	KeyRightBracket Key = Key(glfw.KeyRightBracket)
	KeyGraveAccent  Key = Key(glfw.KeyGraveAccent)
	KeyWorld1       Key = Key(glfw.KeyWorld1)
	KeyWorld2       Key = Key(glfw.KeyWorld2)
	KeyEscape       Key = Key(glfw.KeyEscape)
	KeyEnter        Key = Key(glfw.KeyEnter)
	KeyTab          Key = Key(glfw.KeyTab)
	KeyBackspace    Key = Key(glfw.KeyBackspace)
	KeyInsert       Key = Key(glfw.KeyInsert)
	KeyDelete       Key = Key(glfw.KeyDelete)
	KeyRight        Key = Key(glfw.KeyRight)
	KeyLeft         Key = Key(glfw.KeyLeft)
	KeyDown         Key = Key(glfw.KeyDown)
	KeyUp           Key = Key(glfw.KeyUp)
	KeyPageUp       Key = Key(glfw.KeyPageUp)
	KeyPageDown     Key = Key(glfw.KeyPageDown)
	KeyHome         Key = Key(glfw.KeyHome)
	KeyEnd          Key = Key(glfw.KeyEnd)
	KeyCapsLock     Key = Key(glfw.KeyCapsLock)
	KeyScrollLock   Key = Key(glfw.KeyScrollLock)
	KeyNumLock      Key = Key(glfw.KeyNumLock)
	KeyPrintScreen  Key = Key(glfw.KeyPrintScreen)
	KeyPause        Key = Key(glfw.KeyPause)
	KeyF1           Key = Key(glfw.KeyF1)
	KeyF2           Key = Key(glfw.KeyF2)
	KeyF3           Key = Key(glfw.KeyF3)
	KeyF4           Key = Key(glfw.KeyF4)
	KeyF5           Key = Key(glfw.KeyF5)
	KeyF6           Key = Key(glfw.KeyF6)
	KeyF7           Key = Key(glfw.KeyF7)
	KeyF8           Key = Key(glfw.KeyF8)
	KeyF9           Key = Key(glfw.KeyF9)
	KeyF10          Key = Key(glfw.KeyF10)
	KeyF11          Key = Key(glfw.KeyF11)
	KeyF12          Key = Key(glfw.KeyF12)
	KeyF13          Key = Key(glfw.KeyF13)
	KeyF14          Key = Key(glfw.KeyF14)
	KeyF15          Key = Key(glfw.KeyF15)
	KeyF16          Key = Key(glfw.KeyF16)
	KeyF17          Key = Key(glfw.KeyF17)
	KeyF18          Key = Key(glfw.KeyF18)
	KeyF19          Key = Key(glfw.KeyF19)
	KeyF20          Key = Key(glfw.KeyF20)
	KeyF21          Key = Key(glfw.KeyF21)
	KeyF22          Key = Key(glfw.KeyF22)
	KeyF23          Key = Key(glfw.KeyF23)
	KeyF24          Key = Key(glfw.KeyF24)
	KeyF25          Key = Key(glfw.KeyF25)
	KeyKP0          Key = Key(glfw.KeyKP0)
	KeyKP1          Key = Key(glfw.KeyKP1)
	KeyKP2          Key = Key(glfw.KeyKP2)
	KeyKP3          Key = Key(glfw.KeyKP3)
	KeyKP4          Key = Key(glfw.KeyKP4)
	KeyKP5          Key = Key(glfw.KeyKP5)
	KeyKP6          Key = Key(glfw.KeyKP6)
	KeyKP7          Key = Key(glfw.KeyKP7)
	KeyKP8          Key = Key(glfw.KeyKP8)
	KeyKP9          Key = Key(glfw.KeyKP9)
	KeyKPDecimal    Key = Key(glfw.KeyKPDecimal)
	KeyKPDivide     Key = Key(glfw.KeyKPDivide)
	KeyKPMultiply   Key = Key(glfw.KeyKPMultiply)
	KeyKPSubtract   Key = Key(glfw.KeyKPSubtract)
	KeyKPAdd        Key = Key(glfw.KeyKPAdd)
	KeyKPEnter      Key = Key(glfw.KeyKPEnter)
	KeyKPEqual      Key = Key(glfw.KeyKPEqual)
	KeyLeftShift    Key = Key(glfw.KeyLeftShift)
	KeyLeftControl  Key = Key(glfw.KeyLeftControl)
	KeyLeftAlt      Key = Key(glfw.KeyLeftAlt)
	KeyLeftSuper    Key = Key(glfw.KeyLeftSuper)
	KeyRightShift   Key = Key(glfw.KeyRightShift)
	KeyRightControl Key = Key(glfw.KeyRightControl)
	KeyRightAlt     Key = Key(glfw.KeyRightAlt)
	KeyRightSuper   Key = Key(glfw.KeyRightSuper)
	KeyMenu         Key = Key(glfw.KeyMenu)
	KeyLast         Key = Key(glfw.KeyLast)
)

These key codes are inspired by the USB HID Usage Tables v1.12 (p. 53-60), but re-arranged to map to 7-bit ASCII for printable keys (function keys are put in the 256+ range).

type LabelWidget

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

func Label

func Label(label string) *LabelWidget

func (*LabelWidget) Build

func (l *LabelWidget) Build()

func (*LabelWidget) Font added in v0.5.0

func (l *LabelWidget) Font(font *FontInfo) *LabelWidget

func (*LabelWidget) Wrapped added in v0.5.0

func (l *LabelWidget) Wrapped(wrapped bool) *LabelWidget

type Layout

type Layout []Widget

func PrepareMsgbox

func PrepareMsgbox() Layout

Embed various Msgboxs to layout. Invoke this function in the same layout level where you call g.Msgbox.

func RangeBuilder

func RangeBuilder(id string, values []interface{}, builder func(int, interface{}) Widget) Layout

Batch create widgets and render only which is visible.

func (Layout) Build

func (l Layout) Build()

type ListBoxState

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

func (*ListBoxState) Dispose

func (s *ListBoxState) Dispose()

type ListBoxWidget

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

func ListBox

func ListBox(id string, items []string) *ListBoxWidget

func (*ListBoxWidget) Border added in v0.5.0

func (l *ListBoxWidget) Border(b bool) *ListBoxWidget

func (*ListBoxWidget) Build

func (l *ListBoxWidget) Build()

func (*ListBoxWidget) ContextMenu added in v0.5.0

func (l *ListBoxWidget) ContextMenu(menuItems []string) *ListBoxWidget

func (*ListBoxWidget) OnChange added in v0.5.0

func (l *ListBoxWidget) OnChange(onChange func(selectedIndex int)) *ListBoxWidget

func (*ListBoxWidget) OnDClick added in v0.5.0

func (l *ListBoxWidget) OnDClick(onDClick func(selectedIndex int)) *ListBoxWidget

func (*ListBoxWidget) OnMenu added in v0.5.0

func (l *ListBoxWidget) OnMenu(onMenu func(selectedIndex int, menu string)) *ListBoxWidget

func (*ListBoxWidget) Size added in v0.5.0

func (l *ListBoxWidget) Size(width, height float32) *ListBoxWidget
type MainMenuBarWidget struct {
	// contains filtered or unexported fields
}
func MainMenuBar() *MainMenuBarWidget
func (m *MainMenuBarWidget) Build()
func (m *MainMenuBarWidget) Layout(widgets ...Widget) *MainMenuBarWidget

type MasterWindow

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

func NewMasterWindow

func NewMasterWindow(title string, width, height int, flags MasterWindowFlags) *MasterWindow

func (*MasterWindow) GetPos

func (w *MasterWindow) GetPos() (x, y int)

Return position of master window.

func (*MasterWindow) GetSize

func (w *MasterWindow) GetSize() (width, height int)

Return size of master window.

func (*MasterWindow) RegisterKeyboardShortcuts added in v0.5.5

func (w *MasterWindow) RegisterKeyboardShortcuts(s ...WindowShortcut) *MasterWindow

func (*MasterWindow) Run added in v0.5.0

func (w *MasterWindow) Run(loopFunc func())

Call the main loop. loopFunc will be used to construct the ui.

func (*MasterWindow) SetBgColor

func (w *MasterWindow) SetBgColor(color color.RGBA)

Set background color of master window.

func (*MasterWindow) SetDropCallback

func (w *MasterWindow) SetDropCallback(cb func([]string))

func (*MasterWindow) SetPos

func (w *MasterWindow) SetPos(x, y int)

Set position of master window.

func (*MasterWindow) SetSize added in v0.5.1

func (w *MasterWindow) SetSize(x, y int)

type MasterWindowFlags

type MasterWindowFlags imgui.GLFWWindowFlags
const (
	// Specifies the window will be fixed size.
	MasterWindowFlagsNotResizable MasterWindowFlags = MasterWindowFlags(imgui.GLFWWindowFlagsNotResizable)
	// Specifies whether the window is maximized.
	MasterWindowFlagsMaximized MasterWindowFlags = MasterWindowFlags(imgui.GLFWWindowFlagsMaximized)
	// Specifies whether the window will be always-on-top.
	MasterWindowFlagsFloating MasterWindowFlags = MasterWindowFlags(imgui.GLFWWindowFlagsFloating)
	// Specifies whether the window will be frameless.
	MasterWindowFlagsFrameless MasterWindowFlags = MasterWindowFlags(imgui.GLFWWindowFlagsFrameless)
	// Specifies whether the window will be transparent.
	MasterWindowFlagsTransparent MasterWindowFlags = MasterWindowFlags(imgui.GLFWWindowFlagsTransparent)
)
type MenuBarWidget struct {
	// contains filtered or unexported fields
}
func MenuBar() *MenuBarWidget
func (m *MenuBarWidget) Build()
func (m *MenuBarWidget) Layout(widgets ...Widget) *MenuBarWidget
type MenuItemWidget struct {
	// contains filtered or unexported fields
}
func MenuItem(label string) *MenuItemWidget
func (m *MenuItemWidget) Build()
func (m *MenuItemWidget) Enabled(e bool) *MenuItemWidget
func (m *MenuItemWidget) OnClick(onClick func()) *MenuItemWidget
func (m *MenuItemWidget) Selected(s bool) *MenuItemWidget
type MenuWidget struct {
	// contains filtered or unexported fields
}
func Menu(label string) *MenuWidget
func (m *MenuWidget) Build()
func (m *MenuWidget) Enabled(e bool) *MenuWidget
func (m *MenuWidget) Layout(widgets ...Widget) *MenuWidget

type Modifier added in v0.5.5

type Modifier int
const (
	ModNone     Modifier = iota
	ModControl  Modifier = Modifier(glfw.ModControl)
	ModAlt      Modifier = Modifier(glfw.ModAlt)
	ModSuper    Modifier = Modifier(glfw.ModSuper)
	ModShift    Modifier = Modifier(glfw.ModShift)
	ModCapsLock Modifier = Modifier(glfw.ModCapsLock)
	ModNumLock  Modifier = Modifier(glfw.ModNumLock)
)

type MouseButton

type MouseButton int
const (
	MouseButtonLeft   MouseButton = 0
	MouseButtonRight  MouseButton = 1
	MouseButtonMiddle MouseButton = 2
)

type MouseCursorType

type MouseCursorType int
const (
	// MouseCursorNone no mouse cursor
	MouseCursorNone MouseCursorType = -1
	// MouseCursorArrow standard arrow mouse cursor
	MouseCursorArrow MouseCursorType = 0
	// MouseCursorTextInput when hovering over InputText, etc.
	MouseCursorTextInput MouseCursorType = 1
	// MouseCursorResizeAll (Unused by imgui functions)
	MouseCursorResizeAll MouseCursorType = 2
	// MouseCursorResizeNS when hovering over an horizontal border
	MouseCursorResizeNS MouseCursorType = 3
	// MouseCursorResizeEW when hovering over a vertical border or a column
	MouseCursorResizeEW MouseCursorType = 4
	// MouseCursorResizeNESW when hovering over the bottom-left corner of a window
	MouseCursorResizeNESW MouseCursorType = 5
	// MouseCursorResizeNWSE when hovering over the bottom-right corner of a window
	MouseCursorResizeNWSE MouseCursorType = 6
	// MouseCursorHand (Unused by imgui functions. Use for e.g. hyperlinks)
	MouseCursorHand  MouseCursorType = 7
	MouseCursorCount MouseCursorType = 8
)

type MsgboxButtons

type MsgboxButtons uint8
const (
	MsgboxButtonsYesNo MsgboxButtons = 1 << iota
	MsgboxButtonsOkCancel
	MsgboxButtonsOk
)

type MsgboxState

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

func (*MsgboxState) Dispose

func (ms *MsgboxState) Dispose()

type PlotAxisFlags added in v0.5.5

type PlotAxisFlags int
const (
	PlotAxisFlagsNone          PlotAxisFlags = 0      // default
	PlotAxisFlagsNoLabel       PlotAxisFlags = 1 << 0 // the axis label will not be displayed (axis labels also hidden if the supplied string name is NULL)
	PlotAxisFlagsNoGridLines   PlotAxisFlags = 1 << 1 // the axis grid lines will not be displayed
	PlotAxisFlagsNoTickMarks   PlotAxisFlags = 1 << 2 // the axis tick marks will not be displayed
	PlotAxisFlagsNoTickLabels  PlotAxisFlags = 1 << 3 // the axis tick labels will not be displayed
	PlotAxisFlagsLogScale      PlotAxisFlags = 1 << 4 // a logartithmic (base 10) axis scale will be used (mutually exclusive with PlotAxisFlagsTime)
	PlotAxisFlagsTime          PlotAxisFlags = 1 << 5 // axis will display date/time formatted labels (mutually exclusive with PlotAxisFlagsLogScale)
	PlotAxisFlagsInvert        PlotAxisFlags = 1 << 6 // the axis will be inverted
	PlotAxisFlagsLockMin       PlotAxisFlags = 1 << 7 // the axis minimum value will be locked when panning/zooming
	PlotAxisFlagsLockMax       PlotAxisFlags = 1 << 8 // the axis maximum value will be locked when panning/zooming
	PlotAxisFlagsLock          PlotAxisFlags = PlotAxisFlagsLockMin | PlotAxisFlagsLockMax
	PlotAxisFlagsNoDecorations PlotAxisFlags = PlotAxisFlagsNoLabel | PlotAxisFlagsNoGridLines | PlotAxisFlagsNoTickMarks | PlotAxisFlagsNoTickLabels
)

type PlotBarHWidget added in v0.5.1

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

func PlotBarH added in v0.5.1

func PlotBarH(title string, data []float64) *PlotBarHWidget

func (*PlotBarHWidget) Height added in v0.5.1

func (p *PlotBarHWidget) Height(height float64) *PlotBarHWidget

func (*PlotBarHWidget) Offset added in v0.5.1

func (p *PlotBarHWidget) Offset(offset int) *PlotBarHWidget

func (*PlotBarHWidget) Plot added in v0.5.1

func (p *PlotBarHWidget) Plot()

func (*PlotBarHWidget) Shift added in v0.5.1

func (p *PlotBarHWidget) Shift(shift float64) *PlotBarHWidget

type PlotBarWidget added in v0.5.1

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

func PlotBar added in v0.5.1

func PlotBar(title string, data []float64) *PlotBarWidget

func (*PlotBarWidget) Offset added in v0.5.1

func (p *PlotBarWidget) Offset(offset int) *PlotBarWidget

func (*PlotBarWidget) Plot added in v0.5.1

func (p *PlotBarWidget) Plot()

func (*PlotBarWidget) Shift added in v0.5.1

func (p *PlotBarWidget) Shift(shift float64) *PlotBarWidget

func (*PlotBarWidget) Width added in v0.5.1

func (p *PlotBarWidget) Width(width float64) *PlotBarWidget

type PlotCanvasWidget added in v0.5.1

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

func Plot added in v0.5.1

func Plot(title string) *PlotCanvasWidget

func (*PlotCanvasWidget) AxisLimits added in v0.5.1

func (p *PlotCanvasWidget) AxisLimits(xmin, xmax, ymin, ymax float64, cond ExecCondition) *PlotCanvasWidget

func (*PlotCanvasWidget) Build added in v0.5.1

func (p *PlotCanvasWidget) Build()

func (*PlotCanvasWidget) Flags added in v0.5.1

func (p *PlotCanvasWidget) Flags(flags PlotFlags) *PlotCanvasWidget

func (*PlotCanvasWidget) Plots added in v0.5.1

func (p *PlotCanvasWidget) Plots(plots ...PlotWidget) *PlotCanvasWidget

func (*PlotCanvasWidget) Size added in v0.5.1

func (p *PlotCanvasWidget) Size(width, height int) *PlotCanvasWidget

func (*PlotCanvasWidget) XAxeFlags added in v0.5.1

func (p *PlotCanvasWidget) XAxeFlags(flags PlotAxisFlags) *PlotCanvasWidget

func (*PlotCanvasWidget) XTicks added in v0.5.1

func (p *PlotCanvasWidget) XTicks(ticks []PlotTicker, showDefault bool) *PlotCanvasWidget

func (*PlotCanvasWidget) YAxeFlags added in v0.5.1

func (p *PlotCanvasWidget) YAxeFlags(yFlags, y2Flags, y3Flags PlotAxisFlags) *PlotCanvasWidget

func (*PlotCanvasWidget) YTicks added in v0.5.1

func (p *PlotCanvasWidget) YTicks(ticks []PlotTicker, showDefault bool, yAxis ImPlotYAxis) *PlotCanvasWidget

type PlotFlags added in v0.5.5

type PlotFlags int
const (
	PlotFlagsNone        PlotFlags = 0       // default
	PlotFlagsNoTitle     PlotFlags = 1 << 0  // the plot title will not be displayed (titles are also hidden if preceeded by double hashes, e.g. "##MyPlot")
	PlotFlagsNoLegend    PlotFlags = 1 << 1  // the legend will not be displayed
	PlotFlagsNoMenus     PlotFlags = 1 << 2  // the user will not be able to open context menus with right-click
	PlotFlagsNoBoxSelect PlotFlags = 1 << 3  // the user will not be able to box-select with right-click drag
	PlotFlagsNoMousePos  PlotFlags = 1 << 4  // the mouse position, in plot coordinates, will not be displayed inside of the plot
	PlotFlagsNoHighlight PlotFlags = 1 << 5  // plot items will not be highlighted when their legend entry is hovered
	PlotFlagsNoChild     PlotFlags = 1 << 6  // a child window region will not be used to capture mouse scroll (can boost performance for single Gui window applications)
	PlotFlagsEqual       PlotFlags = 1 << 7  // primary x and y axes will be constrained to have the same units/pixel (does not apply to auxiliary y-axes)
	PlotFlagsYAxis2      PlotFlags = 1 << 8  // enable a 2nd y-axis on the right side
	PlotFlagsYAxis3      PlotFlags = 1 << 9  // enable a 3rd y-axis on the right side
	PlotFlagsQuery       PlotFlags = 1 << 10 // the user will be able to draw query rects with middle-mouse or CTRL + right-click drag
	PlotFlagsCrosshairs  PlotFlags = 1 << 11 // the default mouse cursor will be replaced with a crosshair when hovered
	PlotFlagsAntiAliased PlotFlags = 1 << 12 // plot lines will be software anti-aliased (not recommended for high density plots, prefer MSAA)
	PlotFlagsCanvasOnly  PlotFlags = PlotFlagsNoTitle | PlotFlagsNoLegend | PlotFlagsNoMenus | PlotFlagsNoBoxSelect | PlotFlagsNoMousePos
)

type PlotLineWidget added in v0.5.1

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

func PlotLine added in v0.5.1

func PlotLine(title string, values []float64) *PlotLineWidget

func (*PlotLineWidget) Offset added in v0.5.1

func (p *PlotLineWidget) Offset(offset int) *PlotLineWidget

func (*PlotLineWidget) Plot added in v0.5.1

func (p *PlotLineWidget) Plot()

func (*PlotLineWidget) X0 added in v0.5.1

func (*PlotLineWidget) XScale added in v0.5.1

func (p *PlotLineWidget) XScale(scale float64) *PlotLineWidget

type PlotLineXYWidget added in v0.5.1

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

func PlotLineXY added in v0.5.1

func PlotLineXY(title string, xvalues, yvalues []float64) *PlotLineXYWidget

func (*PlotLineXYWidget) Offset added in v0.5.1

func (p *PlotLineXYWidget) Offset(offset int) *PlotLineXYWidget

func (*PlotLineXYWidget) Plot added in v0.5.1

func (p *PlotLineXYWidget) Plot()

type PlotPieChartWidget added in v0.5.2

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

func PlotPieChart added in v0.5.2

func PlotPieChart(labels []string, values []float64, x, y, radius float64) *PlotPieChartWidget

func (*PlotPieChartWidget) Angle0 added in v0.5.2

func (*PlotPieChartWidget) LabelFormat added in v0.5.2

func (p *PlotPieChartWidget) LabelFormat(fmtStr string) *PlotPieChartWidget

func (*PlotPieChartWidget) Normalize added in v0.5.2

func (p *PlotPieChartWidget) Normalize(n bool) *PlotPieChartWidget

func (*PlotPieChartWidget) Plot added in v0.5.2

func (p *PlotPieChartWidget) Plot()

type PlotScatterWidget added in v0.5.2

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

func PlotScatter added in v0.5.2

func PlotScatter(label string, values []float64) *PlotScatterWidget

func (*PlotScatterWidget) Offset added in v0.5.2

func (p *PlotScatterWidget) Offset(offset int) *PlotScatterWidget

func (*PlotScatterWidget) Plot added in v0.5.2

func (p *PlotScatterWidget) Plot()

func (*PlotScatterWidget) X0 added in v0.5.2

func (*PlotScatterWidget) XScale added in v0.5.2

type PlotScatterXYWidget added in v0.5.2

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

func PlotScatterXY added in v0.5.2

func PlotScatterXY(label string, xs, ys []float64) *PlotScatterXYWidget

func (*PlotScatterXYWidget) Offset added in v0.5.2

func (p *PlotScatterXYWidget) Offset(offset int) *PlotScatterXYWidget

func (*PlotScatterXYWidget) Plot added in v0.5.2

func (p *PlotScatterXYWidget) Plot()

type PlotTicker added in v0.5.1

type PlotTicker struct {
	Position float64
	Label    string
}

type PlotWidget added in v0.5.1

type PlotWidget interface {
	Plot()
}

type PopupModalWidget

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

func PopupModal

func PopupModal(name string) *PopupModalWidget

func (*PopupModalWidget) Build

func (p *PopupModalWidget) Build()

func (*PopupModalWidget) Flags added in v0.5.0

func (*PopupModalWidget) IsOpen added in v0.5.0

func (p *PopupModalWidget) IsOpen(open *bool) *PopupModalWidget

func (*PopupModalWidget) Layout added in v0.5.0

func (p *PopupModalWidget) Layout(widgets ...Widget) *PopupModalWidget

type PopupWidget

type PopupWidget struct {
	// contains filtered or unexported fields
}
func Popup(name string) *PopupWidget

func (*PopupWidget) Build

func (p *PopupWidget) Build()

func (*PopupWidget) Flags added in v0.5.0

func (p *PopupWidget) Flags(flags WindowFlags) *PopupWidget

func (*PopupWidget) Layout added in v0.5.0

func (p *PopupWidget) Layout(widgets ...Widget) *PopupWidget

type ProgressBarWidget

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

func ProgressBar

func ProgressBar(fraction float32) *ProgressBarWidget

func (*ProgressBarWidget) Build

func (p *ProgressBarWidget) Build()

func (*ProgressBarWidget) Overlay added in v0.5.0

func (p *ProgressBarWidget) Overlay(overlay string) *ProgressBarWidget

func (*ProgressBarWidget) Size added in v0.5.0

func (p *ProgressBarWidget) Size(width, height float32) *ProgressBarWidget

type ProgressIndicatorState

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

func (*ProgressIndicatorState) Dispose

func (ps *ProgressIndicatorState) Dispose()

func (*ProgressIndicatorState) Update

func (ps *ProgressIndicatorState) Update()

type ProgressIndicatorWidget

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

func ProgressIndicator

func ProgressIndicator(label string, width, height, radius float32) *ProgressIndicatorWidget

func (*ProgressIndicatorWidget) Build

func (p *ProgressIndicatorWidget) Build()

type RadioButtonWidget

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

func RadioButton

func RadioButton(text string, active bool) *RadioButtonWidget

func (*RadioButtonWidget) Build

func (r *RadioButtonWidget) Build()

func (*RadioButtonWidget) OnChange added in v0.5.0

func (r *RadioButtonWidget) OnChange(onChange func()) *RadioButtonWidget

type RowWidget

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

func Row

func Row(widgets ...Widget) *RowWidget

func (*RowWidget) Build

func (l *RowWidget) Build()

type SelectableFlags

type SelectableFlags int
const (
	// SelectableFlagsNone default SelectableFlags = 0
	SelectableFlagsNone SelectableFlags = 0
	// SelectableFlagsDontClosePopups makes clicking the selectable not close any parent popup windows.
	SelectableFlagsDontClosePopups SelectableFlags = 1 << 0
	// SelectableFlagsSpanAllColumns allows the selectable frame to span all columns (text will still fit in current column).
	SelectableFlagsSpanAllColumns SelectableFlags = 1 << 1
	// SelectableFlagsAllowDoubleClick generates press events on double clicks too.
	SelectableFlagsAllowDoubleClick SelectableFlags = 1 << 2
	// SelectableFlagsDisabled disallows selection and displays text in a greyed out color.
	SelectableFlagsDisabled SelectableFlags = 1 << 3
)

type SelectableWidget

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

func Selectable

func Selectable(label string) *SelectableWidget

func (*SelectableWidget) Build

func (s *SelectableWidget) Build()

func (*SelectableWidget) Flags added in v0.5.0

func (*SelectableWidget) OnClick added in v0.5.0

func (s *SelectableWidget) OnClick(onClick func()) *SelectableWidget

func (*SelectableWidget) Selected added in v0.5.0

func (s *SelectableWidget) Selected(selected bool) *SelectableWidget

func (*SelectableWidget) Size added in v0.5.0

func (s *SelectableWidget) Size(width, height float32) *SelectableWidget

type SeparatorWidget

type SeparatorWidget struct{}

func Separator

func Separator() *SeparatorWidget

func (*SeparatorWidget) Build

func (s *SeparatorWidget) Build()

type Shortcut added in v0.5.5

type Shortcut struct {
	Key      Key
	Modifier Modifier
	Callback func()
	IsGlobal ShortcutType
}

type ShortcutType added in v0.5.5

type ShortcutType bool

ShortcutType represens a type of shortcut (global or local)

const (
	// GlobalShortcut is registered for all the app
	GlobalShortcut ShortcutType = true

	// LocLShortcut is registered for current window only
	LocalShortcut ShortcutType = false
)

type SliderFlags added in v0.5.4

type SliderFlags int
const (
	SliderFlagsNone            SliderFlags = 0
	SliderFlagsAlwaysClamp     SliderFlags = 1 << 4     // Clamp value to min/max bounds when input manually with CTRL+Click. By default CTRL+Click allows going out of bounds.
	SliderFlagsLogarithmic     SliderFlags = 1 << 5     // Make the widget logarithmic (linear otherwise). Consider using ImGuiSliderFlagsNoRoundToFormat with this if using a format-string with small amount of digits.
	SliderFlagsNoRoundToFormat SliderFlags = 1 << 6     // Disable rounding underlying value to match precision of the display format string (e.g. %.3f values are rounded to those 3 digits)
	SliderFlagsNoInput         SliderFlags = 1 << 7     // Disable CTRL+Click or Enter key allowing to input text directly into the widget
	SliderFlagsInvalidMask     SliderFlags = 0x7000000F // [Internal] We treat using those bits as being potentially a 'float power' argument from the previous API that has got miscast to this enum, and will trigger an assert if needed.
)

type SliderFloatWidget

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

func SliderFloat

func SliderFloat(label string, value *float32, min, max float32) *SliderFloatWidget

func (*SliderFloatWidget) Build

func (sf *SliderFloatWidget) Build()

func (*SliderFloatWidget) Format added in v0.5.0

func (s *SliderFloatWidget) Format(format string) *SliderFloatWidget

func (*SliderFloatWidget) OnChange added in v0.5.3

func (sf *SliderFloatWidget) OnChange(onChange func()) *SliderFloatWidget

func (*SliderFloatWidget) Size added in v0.5.3

func (sf *SliderFloatWidget) Size(width float32) *SliderFloatWidget

type SliderIntWidget

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

func SliderInt

func SliderInt(label string, value *int32, min, max int32) *SliderIntWidget

func (*SliderIntWidget) Build

func (s *SliderIntWidget) Build()

func (*SliderIntWidget) Format added in v0.5.0

func (s *SliderIntWidget) Format(format string) *SliderIntWidget

func (*SliderIntWidget) OnChange added in v0.5.3

func (s *SliderIntWidget) OnChange(onChange func()) *SliderIntWidget

func (*SliderIntWidget) Size added in v0.5.3

func (s *SliderIntWidget) Size(width float32) *SliderIntWidget

type SmallButtonWidget

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

func SmallButton

func SmallButton(id string) *SmallButtonWidget

func (*SmallButtonWidget) Build

func (sb *SmallButtonWidget) Build()

func (*SmallButtonWidget) OnClick added in v0.5.0

func (b *SmallButtonWidget) OnClick(onClick func()) *SmallButtonWidget

type SpacingWidget

type SpacingWidget struct{}

func Spacing

func Spacing() *SpacingWidget

func (*SpacingWidget) Build

func (s *SpacingWidget) Build()

type SplitDirection

type SplitDirection uint8
const (
	DirectionHorizontal SplitDirection = 1 << iota
	DirectionVertical
)

type SplitLayoutState

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

func (*SplitLayoutState) Dispose

func (s *SplitLayoutState) Dispose()

type SplitLayoutWidget

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

func SplitLayout

func SplitLayout(direction SplitDirection, border bool, sashPos float32, layout1, layout2 Widget) *SplitLayoutWidget

func (*SplitLayoutWidget) Build

func (s *SplitLayoutWidget) Build()

type StyleColorID added in v0.5.5

type StyleColorID int

StyleColorID identifies a color in the UI style.

const (
	StyleColorText                  StyleColorID = 0
	StyleColorTextDisabled          StyleColorID = 1
	StyleColorWindowBg              StyleColorID = 2
	StyleColorChildBg               StyleColorID = 3
	StyleColorPopupBg               StyleColorID = 4
	StyleColorBorder                StyleColorID = 5
	StyleColorBorderShadow          StyleColorID = 6
	StyleColorFrameBg               StyleColorID = 7
	StyleColorFrameBgHovered        StyleColorID = 8
	StyleColorFrameBgActive         StyleColorID = 9
	StyleColorTitleBg               StyleColorID = 10
	StyleColorTitleBgActive         StyleColorID = 11
	StyleColorTitleBgCollapsed      StyleColorID = 12
	StyleColorMenuBarBg             StyleColorID = 13
	StyleColorScrollbarBg           StyleColorID = 14
	StyleColorScrollbarGrab         StyleColorID = 15
	StyleColorScrollbarGrabHovered  StyleColorID = 16
	StyleColorScrollbarGrabActive   StyleColorID = 17
	StyleColorCheckMark             StyleColorID = 18
	StyleColorSliderGrab            StyleColorID = 19
	StyleColorSliderGrabActive      StyleColorID = 20
	StyleColorButton                StyleColorID = 21
	StyleColorButtonHovered         StyleColorID = 22
	StyleColorButtonActive          StyleColorID = 23
	StyleColorHeader                StyleColorID = 24
	StyleColorHeaderHovered         StyleColorID = 25
	StyleColorHeaderActive          StyleColorID = 26
	StyleColorSeparator             StyleColorID = 27
	StyleColorSeparatorHovered      StyleColorID = 28
	StyleColorSeparatorActive       StyleColorID = 29
	StyleColorResizeGrip            StyleColorID = 30
	StyleColorResizeGripHovered     StyleColorID = 31
	StyleColorResizeGripActive      StyleColorID = 32
	StyleColorTab                   StyleColorID = 33
	StyleColorTabHovered            StyleColorID = 34
	StyleColorTabActive             StyleColorID = 35
	StyleColorTabUnfocused          StyleColorID = 36
	StyleColorTabUnfocusedActive    StyleColorID = 37
	StyleColorPlotLines             StyleColorID = 38
	StyleColorPlotLinesHovered      StyleColorID = 39
	StyleColorProgressBarActive     StyleColorID = 40
	StyleColorPlotHistogram         StyleColorID = 40
	StyleColorPlotHistogramHovered  StyleColorID = 41
	StyleColorTableHeaderBg         StyleColorID = 42
	StyleColorTableBorderStrong     StyleColorID = 43
	StyleColorTableBorderLight      StyleColorID = 44
	StyleColorTableRowBg            StyleColorID = 45
	StyleColorTableRowBgAlt         StyleColorID = 46
	StyleColorTextSelectedBg        StyleColorID = 47
	StyleColorDragDropTarget        StyleColorID = 48
	StyleColorNavHighlight          StyleColorID = 49
	StyleColorNavWindowingHighlight StyleColorID = 50
	StyleColorNavWindowingDimBg     StyleColorID = 51
	StyleColorModalWindowDimBg      StyleColorID = 52
)

StyleColor identifier

type StyleSetter added in v0.5.4

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

func Style added in v0.5.4

func Style() *StyleSetter

func (*StyleSetter) Build added in v0.5.4

func (ss *StyleSetter) Build()

func (*StyleSetter) SetColor added in v0.5.4

func (ss *StyleSetter) SetColor(colorId StyleColorID, col color.RGBA) *StyleSetter

func (*StyleSetter) SetDisabled added in v0.5.5

func (ss *StyleSetter) SetDisabled(d bool) *StyleSetter

func (*StyleSetter) SetFont added in v0.5.5

func (ss *StyleSetter) SetFont(font *FontInfo) *StyleSetter

func (*StyleSetter) SetStyle added in v0.5.4

func (ss *StyleSetter) SetStyle(varId StyleVarID, width, height float32) *StyleSetter

func (*StyleSetter) To added in v0.5.4

func (ss *StyleSetter) To(widgets ...Widget) *StyleSetter

type StyleVarID added in v0.5.5

type StyleVarID int

StyleVarID identifies a style variable in the UI style.

const (
	// StyleVarAlpha is a float
	StyleVarAlpha StyleVarID = 0
	// StyleVarWindowPadding is a Vec2
	StyleVarWindowPadding StyleVarID = 1
	// StyleVarWindowRounding is a float
	StyleVarWindowRounding StyleVarID = 2
	// StyleVarWindowBorderSize is a float
	StyleVarWindowBorderSize StyleVarID = 3
	// StyleVarWindowMinSize is a Vec2
	StyleVarWindowMinSize StyleVarID = 4
	// StyleVarWindowTitleAlign is a Vec2
	StyleVarWindowTitleAlign StyleVarID = 5
	// StyleVarChildRounding is a float
	StyleVarChildRounding StyleVarID = 6
	// StyleVarChildBorderSize is a float
	StyleVarChildBorderSize StyleVarID = 7
	// StyleVarPopupRounding is a float
	StyleVarPopupRounding StyleVarID = 8
	// StyleVarPopupBorderSize is a float
	StyleVarPopupBorderSize StyleVarID = 9
	// StyleVarFramePadding is a Vec2
	StyleVarFramePadding StyleVarID = 10
	// StyleVarFrameRounding is a float
	StyleVarFrameRounding StyleVarID = 11
	// StyleVarFrameBorderSize is a float
	StyleVarFrameBorderSize StyleVarID = 12
	// StyleVarItemSpacing is a Vec2
	StyleVarItemSpacing StyleVarID = 13
	// StyleVarItemInnerSpacing is a Vec2
	StyleVarItemInnerSpacing StyleVarID = 14
	// StyleVarIndentSpacing is a float
	StyleVarIndentSpacing StyleVarID = 15
	// StyleVarScrollbarSize is a float
	StyleVarScrollbarSize StyleVarID = 16
	// StyleVarScrollbarRounding is a float
	StyleVarScrollbarRounding StyleVarID = 17
	// StyleVarGrabMinSize is a float
	StyleVarGrabMinSize StyleVarID = 18
	// StyleVarGrabRounding is a float
	StyleVarGrabRounding StyleVarID = 19
	// StyleVarTabRounding is a float
	StyleVarTabRounding StyleVarID = 20
	// StyleVarButtonTextAlign is a Vec2
	StyleVarButtonTextAlign StyleVarID = 21
	// StyleVarSelectableTextAlign is a Vec2
	StyleVarSelectableTextAlign StyleVarID = 22
)

type TabBarFlags

type TabBarFlags int
const (
	// TabBarFlagsNone default TabBarFlags = 0.
	TabBarFlagsNone TabBarFlags = 0
	// TabBarFlagsReorderable Allow manually dragging tabs to re-order them + New tabs are appended at the end of list
	TabBarFlagsReorderable TabBarFlags = 1 << 0
	// TabBarFlagsAutoSelectNewTabs Automatically select new tabs when they appear
	TabBarFlagsAutoSelectNewTabs TabBarFlags = 1 << 1
	// TabBarFlagsTabListPopupButton Disable buttons to open the tab list popup
	TabBarFlagsTabListPopupButton TabBarFlags = 1 << 2
	// TabBarFlagsNoCloseWithMiddleMouseButton Disable behavior of closing tabs (that are submitted with p_open != NULL)
	// with middle mouse button. You can still repro this behavior on user's side with if
	// (IsItemHovered() && IsMouseClicked(2)) *p_open TabBarFlags = false.
	TabBarFlagsNoCloseWithMiddleMouseButton TabBarFlags = 1 << 3
	// TabBarFlagsNoTabListScrollingButtons Disable scrolling buttons (apply when fitting policy is
	// TabBarFlagsFittingPolicyScroll)
	TabBarFlagsNoTabListScrollingButtons TabBarFlags = 1 << 4
	// TabBarFlagsNoTooltip Disable tooltips when hovering a tab
	TabBarFlagsNoTooltip TabBarFlags = 1 << 5
	// TabBarFlagsFittingPolicyResizeDown Resize tabs when they don't fit
	TabBarFlagsFittingPolicyResizeDown TabBarFlags = 1 << 6
	// TabBarFlagsFittingPolicyScroll Add scroll buttons when tabs don't fit
	TabBarFlagsFittingPolicyScroll TabBarFlags = 1 << 7
	// TabBarFlagsFittingPolicyMask combines
	// TabBarFlagsFittingPolicyResizeDown and TabBarFlagsFittingPolicyScroll
	TabBarFlagsFittingPolicyMask TabBarFlags = TabBarFlagsFittingPolicyResizeDown | TabBarFlagsFittingPolicyScroll
	// TabBarFlagsFittingPolicyDefault alias for TabBarFlagsFittingPolicyResizeDown
	TabBarFlagsFittingPolicyDefault TabBarFlags = TabBarFlagsFittingPolicyResizeDown
)

type TabBarWidget

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

func TabBar

func TabBar() *TabBarWidget

func (*TabBarWidget) Build

func (t *TabBarWidget) Build()

func (*TabBarWidget) Flags added in v0.5.0

func (t *TabBarWidget) Flags(flags TabBarFlags) *TabBarWidget

func (*TabBarWidget) TabItems added in v0.5.5

func (t *TabBarWidget) TabItems(items ...*TabItemWidget) *TabBarWidget

type TabItemFlags

type TabItemFlags int
const (
	// TabItemFlagsNone default TabItemFlags = 0
	TabItemFlagsNone TabItemFlags = 0
	// TabItemFlagsUnsavedDocument Append '*' to title without affecting the ID, as a convenience to avoid using the
	// ### operator. Also: tab is selected on closure and closure is deferred by one frame to allow code to undo it
	// without flicker.
	TabItemFlagsUnsavedDocument TabItemFlags = 1 << 0
	// TabItemFlagsSetSelected Trigger flag to programmatically make the tab selected when calling BeginTabItem()
	TabItemFlagsSetSelected TabItemFlags = 1 << 1
	// TabItemFlagsNoCloseWithMiddleMouseButton  Disable behavior of closing tabs (that are submitted with
	// p_open != NULL) with middle mouse button. You can still repro this behavior on user's side with if
	// (IsItemHovered() && IsMouseClicked(2)) *p_open TabItemFlags = false.
	TabItemFlagsNoCloseWithMiddleMouseButton TabItemFlags = 1 << 2
	// TabItemFlagsNoPushID Don't call PushID(tab->ID)/PopID() on BeginTabItem()/EndTabItem()
	TabItemFlagsNoPushID TabItemFlags = 1 << 3
)

type TabItemWidget

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

func TabItem

func TabItem(label string) *TabItemWidget

func (*TabItemWidget) Build

func (t *TabItemWidget) Build()

func (*TabItemWidget) Flags added in v0.5.0

func (t *TabItemWidget) Flags(flags TabItemFlags) *TabItemWidget

func (*TabItemWidget) IsOpen added in v0.5.0

func (t *TabItemWidget) IsOpen(open *bool) *TabItemWidget

func (*TabItemWidget) Layout added in v0.5.0

func (t *TabItemWidget) Layout(widgets ...Widget) *TabItemWidget

type TableColumnFlags added in v0.5.5

type TableColumnFlags int
const (
	// Input configuration flags
	TableColumnFlagsNone                 TableColumnFlags = 0
	TableColumnFlagsDefaultHide          TableColumnFlags = 1 << 0  // Default as a hidden/disabled column.
	TableColumnFlagsDefaultSort          TableColumnFlags = 1 << 1  // Default as a sorting column.
	TableColumnFlagsWidthStretch         TableColumnFlags = 1 << 2  // Column will stretch. Preferable with horizontal scrolling disabled (default if table sizing policy is SizingStretchSame or SizingStretchProp).
	TableColumnFlagsWidthFixed           TableColumnFlags = 1 << 3  // Column will not stretch. Preferable with horizontal scrolling enabled (default if table sizing policy is SizingFixedFit and table is resizable).
	TableColumnFlagsNoResize             TableColumnFlags = 1 << 4  // Disable manual resizing.
	TableColumnFlagsNoReorder            TableColumnFlags = 1 << 5  // Disable manual reordering this column, this will also prevent other columns from crossing over this column.
	TableColumnFlagsNoHide               TableColumnFlags = 1 << 6  // Disable ability to hide/disable this column.
	TableColumnFlagsNoClip               TableColumnFlags = 1 << 7  // Disable clipping for this column (all NoClip columns will render in a same draw command).
	TableColumnFlagsNoSort               TableColumnFlags = 1 << 8  // Disable ability to sort on this field (even if TableFlagsSortable is set on the table).
	TableColumnFlagsNoSortAscending      TableColumnFlags = 1 << 9  // Disable ability to sort in the ascending direction.
	TableColumnFlagsNoSortDescending     TableColumnFlags = 1 << 10 // Disable ability to sort in the descending direction.
	TableColumnFlagsNoHeaderWidth        TableColumnFlags = 1 << 11 // Disable header text width contribution to automatic column width.
	TableColumnFlagsPreferSortAscending  TableColumnFlags = 1 << 12 // Make the initial sort direction Ascending when first sorting on this column (default).
	TableColumnFlagsPreferSortDescending TableColumnFlags = 1 << 13 // Make the initial sort direction Descending when first sorting on this column.
	TableColumnFlagsIndentEnable         TableColumnFlags = 1 << 14 // Use current Indent value when entering cell (default for column 0).
	TableColumnFlagsIndentDisable        TableColumnFlags = 1 << 15 // Ignore current Indent value when entering cell (default for columns > 0). Indentation changes within the cell will still be honored.

	// Output status flags read-only via TableGetColumnFlags()
	TableColumnFlagsIsEnabled TableColumnFlags = 1 << 20 // Status: is enabled == not hidden by user/api (referred to as "Hide" in DefaultHide and NoHide) flags.
	TableColumnFlagsIsVisible TableColumnFlags = 1 << 21 // Status: is visible == is enabled AND not clipped by scrolling.
	TableColumnFlagsIsSorted  TableColumnFlags = 1 << 22 // Status: is currently part of the sort specs
	TableColumnFlagsIsHovered TableColumnFlags = 1 << 23 // Status: is hovered by mouse

	// [Internal] Combinations and masks
	TableColumnFlagsWidthMask      TableColumnFlags = TableColumnFlagsWidthStretch | TableColumnFlagsWidthFixed
	TableColumnFlagsIndentMask     TableColumnFlags = TableColumnFlagsIndentEnable | TableColumnFlagsIndentDisable
	TableColumnFlagsStatusMask     TableColumnFlags = TableColumnFlagsIsEnabled | TableColumnFlagsIsVisible | TableColumnFlagsIsSorted | TableColumnFlagsIsHovered
	TableColumnFlagsNoDirectResize TableColumnFlags = 1 << 30 // [Internal] Disable user resizing this column directly (it may however we resized indirectly from its left edge)
)

type TableColumnWidget added in v0.5.4

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

func TableColumn added in v0.5.4

func TableColumn(label string) *TableColumnWidget

func (*TableColumnWidget) Build added in v0.5.4

func (c *TableColumnWidget) Build()

func (*TableColumnWidget) Flags added in v0.5.4

func (*TableColumnWidget) InnerWidthOrWeight added in v0.5.4

func (c *TableColumnWidget) InnerWidthOrWeight(w float32) *TableColumnWidget

func (*TableColumnWidget) UserId added in v0.5.4

type TableFlags added in v0.5.5

type TableFlags int
const (
	// Features
	TableFlagsNone              TableFlags = 0
	TableFlagsResizable         TableFlags = 1 << 0 // Enable resizing columns.
	TableFlagsReorderable       TableFlags = 1 << 1 // Enable reordering columns in header row (need calling TableSetupColumn() + TableHeadersRow() to display headers)
	TableFlagsHideable          TableFlags = 1 << 2 // Enable hiding/disabling columns in context menu.
	TableFlagsSortable          TableFlags = 1 << 3 // Enable sorting. Call TableGetSortSpecs() to obtain sort specs. Also see TableFlagsSortMulti and TableFlagsSortTristate.
	TableFlagsNoSavedSettings   TableFlags = 1 << 4 // Disable persisting columns order, width and sort settings in the .ini file.
	TableFlagsContextMenuInBody TableFlags = 1 << 5 // Right-click on columns body/contents will display table context menu. By default it is available in TableHeadersRow().
	// Decorations
	TableFlagsRowBg                                TableFlags = 1 << 6                                            // Set each RowBg color with ColTableRowBg or ColTableRowBgAlt (equivalent of calling TableSetBgColor with TableBgFlagsRowBg0 on each row manually)
	TableFlagsBordersInnerH                        TableFlags = 1 << 7                                            // Draw horizontal borders between rows.
	TableFlagsBordersOuterH                        TableFlags = 1 << 8                                            // Draw horizontal borders at the top and bottom.
	TableFlagsBordersInnerV                        TableFlags = 1 << 9                                            // Draw vertical borders between columns.
	TableFlagsBordersOuterV                        TableFlags = 1 << 10                                           // Draw vertical borders on the left and right sides.
	TableFlagsBordersH                             TableFlags = TableFlagsBordersInnerH | TableFlagsBordersOuterH // Draw horizontal borders.
	TableFlagsBordersV                             TableFlags = TableFlagsBordersInnerV | TableFlagsBordersOuterV // Draw vertical borders.
	TableFlagsBordersInner                         TableFlags = TableFlagsBordersInnerV | TableFlagsBordersInnerH // Draw inner borders.
	TableFlagsBordersOuter                         TableFlags = TableFlagsBordersOuterV | TableFlagsBordersOuterH // Draw outer borders.
	TableFlagsBorders                              TableFlags = TableFlagsBordersInner | TableFlagsBordersOuter   // Draw all borders.
	TableFlagsNoBordersInBody                      TableFlags = 1 << 11                                           // [ALPHA] Disable vertical borders in columns Body (borders will always appears in Headers). -> May move to style
	TableFlagsNoBordersInBodyUntilResizeTableFlags TableFlags = 1 << 12                                           // [ALPHA] Disable vertical borders in columns Body until hovered for resize (borders will always appears in Headers). -> May move to style
	// Sizing Policy (read above for defaults)TableFlags
	TableFlagsSizingFixedFit    TableFlags = 1 << 13 // Columns default to WidthFixed or WidthAuto (if resizable or not resizable), matching contents width.
	TableFlagsSizingFixedSame   TableFlags = 2 << 13 // Columns default to WidthFixed or WidthAuto (if resizable or not resizable), matching the maximum contents width of all columns. Implicitly enable TableFlagsNoKeepColumnsVisible.
	TableFlagsSizingStretchProp TableFlags = 3 << 13 // Columns default to WidthStretch with default weights proportional to each columns contents widths.
	TableFlagsSizingStretchSame TableFlags = 4 << 13 // Columns default to WidthStretch with default weights all equal, unless overriden by TableSetupColumn().
	// Sizing Extra Options
	TableFlagsNoHostExtendX        TableFlags = 1 << 16 // Make outer width auto-fit to columns, overriding outersize.x value. Only available when ScrollX/ScrollY are disabled and Stretch columns are not used.
	TableFlagsNoHostExtendY        TableFlags = 1 << 17 // Make outer height stop exactly at outersize.y (prevent auto-extending table past the limit). Only available when ScrollX/ScrollY are disabled. Data below the limit will be clipped and not visible.
	TableFlagsNoKeepColumnsVisible TableFlags = 1 << 18 // Disable keeping column always minimally visible when ScrollX is off and table gets too small. Not recommended if columns are resizable.
	TableFlagsPreciseWidths        TableFlags = 1 << 19 // Disable distributing remainder width to stretched columns (width allocation on a 100-wide table with 3 columns: Without this flag: 33,33,34. With this flag: 33,33,33). With larger number of columns, resizing will appear to be less smooth.
	// Clipping
	TableFlagsNoClip TableFlags = 1 << 20 // Disable clipping rectangle for every individual columns (reduce draw command count, items will be able to overflow into other columns). Generally incompatible with TableSetupScrollFreeze().
	// Padding
	TableFlagsPadOuterX   TableFlags = 1 << 21 // Default if BordersOuterV is on. Enable outer-most padding. Generally desirable if you have headers.
	TableFlagsNoPadOuterX TableFlags = 1 << 22 // Default if BordersOuterV is off. Disable outer-most padding.
	TableFlagsNoPadInnerX TableFlags = 1 << 23 // Disable inner padding between columns (double inner padding if BordersOuterV is on, single inner padding if BordersOuterV is off).
	// Scrolling
	TableFlagsScrollX TableFlags = 1 << 24 // Enable horizontal scrolling. Require 'outersize' parameter of BeginTable() to specify the container size. Changes default sizing policy. Because this create a child window, ScrollY is currently generally recommended when using ScrollX.
	TableFlagsScrollY TableFlags = 1 << 25 // Enable vertical scrolling. Require 'outersize' parameter of BeginTable() to specify the container size.
	// Sorting
	TableFlagsSortMulti    TableFlags = 1 << 26 // Hold shift when clicking headers to sort on multiple column. TableGetSortSpecs() may return specs where (SpecsCount > 1).
	TableFlagsSortTristate TableFlags = 1 << 27 // Allow no sorting, disable default sorting. TableGetSortSpecs() may return specs where (SpecsCount == 0).

	// [Internal] Combinations and masks
	TableFlagsSizingMask TableFlags = TableFlagsSizingFixedFit | TableFlagsSizingFixedSame | TableFlagsSizingStretchProp | TableFlagsSizingStretchSame
)

type TableRowFlags added in v0.5.5

type TableRowFlags int
const (
	TableRowFlagsNone    TableRowFlags = 0
	TableRowFlagsHeaders TableRowFlags = 1 << 0 // Identify header row (set default background color + width of its contents accounted different for auto column width)
)

type TableRowWidget added in v0.5.4

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

func TableRow added in v0.5.4

func TableRow(widgets ...Widget) *TableRowWidget

func (*TableRowWidget) BgColor added in v0.5.4

func (r *TableRowWidget) BgColor(c *color.RGBA) *TableRowWidget

func (*TableRowWidget) Build added in v0.5.4

func (r *TableRowWidget) Build()

func (*TableRowWidget) Flags added in v0.5.4

func (r *TableRowWidget) Flags(flags TableRowFlags) *TableRowWidget

func (*TableRowWidget) MinHeight added in v0.5.4

func (r *TableRowWidget) MinHeight(height float64) *TableRowWidget

type TableWidget added in v0.5.1

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

func Table

func Table() *TableWidget

func (*TableWidget) Build added in v0.5.1

func (t *TableWidget) Build()

func (*TableWidget) Columns added in v0.5.1

func (t *TableWidget) Columns(cols ...*TableColumnWidget) *TableWidget

func (*TableWidget) FastMode added in v0.5.1

func (t *TableWidget) FastMode(b bool) *TableWidget

Display visible rows only to boost performance.

func (*TableWidget) Flags added in v0.5.1

func (t *TableWidget) Flags(flags TableFlags) *TableWidget

func (*TableWidget) Freeze added in v0.5.1

func (t *TableWidget) Freeze(col, row int) *TableWidget

Freeze columns/rows so they stay visible when scrolled.

func (*TableWidget) InnerWidth added in v0.5.1

func (t *TableWidget) InnerWidth(width float64) *TableWidget

func (*TableWidget) Rows added in v0.5.1

func (t *TableWidget) Rows(rows ...*TableRowWidget) *TableWidget

func (*TableWidget) Size added in v0.5.1

func (t *TableWidget) Size(width, height float32) *TableWidget

type Texture

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

func NewTextureFromRgba

func NewTextureFromRgba(rgba *image.RGBA) (*Texture, error)

Create new texture from rgba. Note: this function has to be invokded in a go routine. If call this in mainthread will result in stuck.

func ToTexture added in v0.5.0

func ToTexture(textureID imgui.TextureID) *Texture

ToTexture converts imgui.TextureID to Texture.

type TooltipWidget

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

func Tooltip

func Tooltip(tip string) *TooltipWidget

func (*TooltipWidget) Build

func (t *TooltipWidget) Build()

func (*TooltipWidget) Layout added in v0.5.0

func (t *TooltipWidget) Layout(widgets ...Widget) *TooltipWidget

type TreeNodeFlags

type TreeNodeFlags int
const (
	// TreeNodeFlagsNone default TreeNodeFlags = 0
	TreeNodeFlagsNone TreeNodeFlags = 0
	// TreeNodeFlagsSelected draws as selected.
	TreeNodeFlagsSelected TreeNodeFlags = 1 << 0
	// TreeNodeFlagsFramed draws full colored frame (e.g. for CollapsingHeader).
	TreeNodeFlagsFramed TreeNodeFlags = 1 << 1
	// TreeNodeFlagsAllowItemOverlap hit testing to allow subsequent widgets to overlap this one.
	TreeNodeFlagsAllowItemOverlap TreeNodeFlags = 1 << 2
	// TreeNodeFlagsNoTreePushOnOpen doesn't do a TreePush() when open
	// (e.g. for CollapsingHeader) TreeNodeFlags = no extra indent nor pushing on ID stack.
	TreeNodeFlagsNoTreePushOnOpen TreeNodeFlags = 1 << 3
	// TreeNodeFlagsNoAutoOpenOnLog doesn't automatically and temporarily open node when Logging is active
	// (by default logging will automatically open tree nodes).
	TreeNodeFlagsNoAutoOpenOnLog TreeNodeFlags = 1 << 4
	// TreeNodeFlagsDefaultOpen defaults node to be open.
	TreeNodeFlagsDefaultOpen TreeNodeFlags = 1 << 5
	// TreeNodeFlagsOpenOnDoubleClick needs double-click to open node.
	TreeNodeFlagsOpenOnDoubleClick TreeNodeFlags = 1 << 6
	// TreeNodeFlagsOpenOnArrow opens only when clicking on the arrow part.
	// If TreeNodeFlagsOpenOnDoubleClick is also set, single-click arrow or double-click all box to open.
	TreeNodeFlagsOpenOnArrow TreeNodeFlags = 1 << 7
	// TreeNodeFlagsLeaf allows no collapsing, no arrow (use as a convenience for leaf nodes).
	TreeNodeFlagsLeaf TreeNodeFlags = 1 << 8
	// TreeNodeFlagsBullet displays a bullet instead of an arrow.
	TreeNodeFlagsBullet TreeNodeFlags = 1 << 9
	// TreeNodeFlagsFramePadding uses FramePadding (even for an unframed text node) to
	// vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding().
	TreeNodeFlagsFramePadding TreeNodeFlags = 1 << 10
	// TreeNodeFlagsSpanAvailWidth extends hit box to the right-most edge, even if not framed.
	// This is not the default in order to allow adding other items on the same line.
	// In the future we may refactor the hit system to be front-to-back, allowing natural overlaps
	// and then this can become the default.
	TreeNodeFlagsSpanAvailWidth TreeNodeFlags = 1 << 11
	// TreeNodeFlagsSpanFullWidth extends hit box to the left-most and right-most edges (bypass the indented area).
	TreeNodeFlagsSpanFullWidth TreeNodeFlags = 1 << 12
	// TreeNodeFlagsNavLeftJumpsBackHere (WIP) Nav: left direction may move to this TreeNode() from any of its child
	// (items submitted between TreeNode and TreePop)
	TreeNodeFlagsNavLeftJumpsBackHere TreeNodeFlags = 1 << 13
	// TreeNodeFlagsCollapsingHeader combines TreeNodeFlagsFramed and TreeNodeFlagsNoAutoOpenOnLog.
	TreeNodeFlagsCollapsingHeader TreeNodeFlags = TreeNodeFlagsFramed | TreeNodeFlagsNoTreePushOnOpen | TreeNodeFlagsNoAutoOpenOnLog
)

type TreeNodeWidget

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

func TreeNode

func TreeNode(label string) *TreeNodeWidget

func (*TreeNodeWidget) Build

func (t *TreeNodeWidget) Build()

func (*TreeNodeWidget) Event added in v0.5.0

func (t *TreeNodeWidget) Event(handler func()) *TreeNodeWidget

Create TreeNode with eventHandler You could detect events (e.g. IsItemClicked IsMouseDoubleClicked etc...) and handle them for TreeNode inside eventHandler

func (*TreeNodeWidget) Flags added in v0.5.0

func (t *TreeNodeWidget) Flags(flags TreeNodeFlags) *TreeNodeWidget

func (*TreeNodeWidget) Layout added in v0.5.0

func (t *TreeNodeWidget) Layout(widgets ...Widget) *TreeNodeWidget

type VSliderIntWidget added in v0.5.4

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

func VSliderInt added in v0.5.4

func VSliderInt(label string, value *int32, min, max int32) *VSliderIntWidget

func (*VSliderIntWidget) Build added in v0.5.4

func (vs *VSliderIntWidget) Build()

func (*VSliderIntWidget) Flags added in v0.5.4

func (vs *VSliderIntWidget) Flags(flags SliderFlags) *VSliderIntWidget

func (*VSliderIntWidget) Format added in v0.5.4

func (vs *VSliderIntWidget) Format(format string) *VSliderIntWidget

func (*VSliderIntWidget) OnChange added in v0.5.4

func (vs *VSliderIntWidget) OnChange(onChange func()) *VSliderIntWidget

func (*VSliderIntWidget) Size added in v0.5.4

func (vs *VSliderIntWidget) Size(width, height float32) *VSliderIntWidget

type VSplitterWidget

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

func VSplitter

func VSplitter(delta *float32) *VSplitterWidget

func (*VSplitterWidget) Build

func (v *VSplitterWidget) Build()

func (*VSplitterWidget) Size added in v0.5.0

func (v *VSplitterWidget) Size(width, height float32) *VSplitterWidget

type Widget

type Widget interface {
	Build()
}

type WindowFlags

type WindowFlags int
const (
	// WindowFlagsNone default WindowFlags = 0
	WindowFlagsNone WindowFlags = 0
	// WindowFlagsNoTitleBar disables title-bar.
	WindowFlagsNoTitleBar WindowFlags = 1 << 0
	// WindowFlagsNoResize disables user resizing with the lower-right grip.
	WindowFlagsNoResize WindowFlags = 1 << 1
	// WindowFlagsNoMove disables user moving the window.
	WindowFlagsNoMove WindowFlags = 1 << 2
	// WindowFlagsNoScrollbar disables scrollbars. Window can still scroll with mouse or programmatically.
	WindowFlagsNoScrollbar WindowFlags = 1 << 3
	// WindowFlagsNoScrollWithMouse disables user vertically scrolling with mouse wheel. On child window, mouse wheel
	// will be forwarded to the parent unless NoScrollbar is also set.
	WindowFlagsNoScrollWithMouse WindowFlags = 1 << 4
	// WindowFlagsNoCollapse disables user collapsing window by double-clicking on it.
	WindowFlagsNoCollapse WindowFlags = 1 << 5
	// WindowFlagsAlwaysAutoResize resizes every window to its content every frame.
	WindowFlagsAlwaysAutoResize WindowFlags = 1 << 6
	// WindowFlagsNoBackground disables drawing background color (WindowBg, etc.) and outside border. Similar as using
	// SetNextWindowBgAlpha(0.0f).
	WindowFlagsNoBackground WindowFlags = 1 << 7
	// WindowFlagsNoSavedSettings will never load/save settings in .ini file.
	WindowFlagsNoSavedSettings WindowFlags = 1 << 8
	// WindowFlagsNoMouseInputs disables catching mouse, hovering test with pass through.
	WindowFlagsNoMouseInputs WindowFlags = 1 << 9
	// WindowFlagsMenuBar has a menu-bar.
	WindowFlagsMenuBar WindowFlags = 1 << 10
	// WindowFlagsHorizontalScrollbar allows horizontal scrollbar to appear (off by default). You may use
	// SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo
	// in the "Horizontal Scrolling" section.
	WindowFlagsHorizontalScrollbar WindowFlags = 1 << 11
	// WindowFlagsNoFocusOnAppearing disables taking focus when transitioning from hidden to visible state.
	WindowFlagsNoFocusOnAppearing WindowFlags = 1 << 12
	// WindowFlagsNoBringToFrontOnFocus disables bringing window to front when taking focus. e.g. clicking on it or
	// programmatically giving it focus.
	WindowFlagsNoBringToFrontOnFocus WindowFlags = 1 << 13
	// WindowFlagsAlwaysVerticalScrollbar always shows vertical scrollbar, even if ContentSize.y < Size.y .
	WindowFlagsAlwaysVerticalScrollbar WindowFlags = 1 << 14
	// WindowFlagsAlwaysHorizontalScrollbar always shows horizontal scrollbar, even if ContentSize.x < Size.x .
	WindowFlagsAlwaysHorizontalScrollbar WindowFlags = 1 << 15
	// WindowFlagsAlwaysUseWindowPadding ensures child windows without border uses style.WindowPadding (ignored by
	// default for non-bordered child windows, because more convenient).
	WindowFlagsAlwaysUseWindowPadding WindowFlags = 1 << 16
	// WindowFlagsNoNavInputs has no gamepad/keyboard navigation within the window.
	WindowFlagsNoNavInputs WindowFlags = 1 << 18
	// WindowFlagsNoNavFocus has no focusing toward this window with gamepad/keyboard navigation
	// (e.g. skipped by CTRL+TAB)
	WindowFlagsNoNavFocus WindowFlags = 1 << 19
	// WindowFlagsUnsavedDocument appends '*' to title without affecting the ID, as a convenience to avoid using the
	// ### operator. When used in a tab/docking context, tab is selected on closure and closure is deferred by one
	// frame to allow code to cancel the closure (with a confirmation popup, etc.) without flicker.
	WindowFlagsUnsavedDocument WindowFlags = 1 << 20

	// WindowFlagsNoNav combines WindowFlagsNoNavInputs and WindowFlagsNoNavFocus.
	WindowFlagsNoNav WindowFlags = WindowFlagsNoNavInputs | WindowFlagsNoNavFocus
	// WindowFlagsNoDecoration combines WindowFlagsNoTitleBar, WindowFlagsNoResize, WindowFlagsNoScrollbar and
	// WindowFlagsNoCollapse.
	WindowFlagsNoDecoration WindowFlags = WindowFlagsNoTitleBar | WindowFlagsNoResize | WindowFlagsNoScrollbar | WindowFlagsNoCollapse
	// WindowFlagsNoInputs combines WindowFlagsNoMouseInputs, WindowFlagsNoNavInputs and WindowFlagsNoNavFocus.
	WindowFlagsNoInputs WindowFlags = WindowFlagsNoMouseInputs | WindowFlagsNoNavInputs | WindowFlagsNoNavFocus
)

type WindowShortcut added in v0.5.5

type WindowShortcut struct {
	Key      Key
	Modifier Modifier
	Callback func()
}

type WindowWidget added in v0.5.0

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

func SingleWindow

func SingleWindow() *WindowWidget

func SingleWindowWithMenuBar

func SingleWindowWithMenuBar() *WindowWidget

func Window

func Window(title string) *WindowWidget

func (*WindowWidget) BringToFront added in v0.5.5

func (w *WindowWidget) BringToFront()

func (*WindowWidget) CurrentPosition added in v0.5.5

func (w *WindowWidget) CurrentPosition() (x, y float32)

func (*WindowWidget) CurrentSize added in v0.5.5

func (w *WindowWidget) CurrentSize() (width, height float32)

func (*WindowWidget) Flags added in v0.5.0

func (w *WindowWidget) Flags(flags WindowFlags) *WindowWidget

func (*WindowWidget) HasFocus added in v0.5.5

func (w *WindowWidget) HasFocus() bool

func (*WindowWidget) IsOpen added in v0.5.0

func (w *WindowWidget) IsOpen(open *bool) *WindowWidget

func (*WindowWidget) Layout added in v0.5.0

func (w *WindowWidget) Layout(widgets ...Widget)

func (*WindowWidget) Pos added in v0.5.0

func (w *WindowWidget) Pos(x, y float32) *WindowWidget

func (*WindowWidget) RegisterKeyboardShortcuts added in v0.5.5

func (w *WindowWidget) RegisterKeyboardShortcuts(s ...WindowShortcut) *WindowWidget

func (*WindowWidget) Size added in v0.5.0

func (w *WindowWidget) Size(width, height float32) *WindowWidget

Jump to

Keyboard shortcuts

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