imguiw

package
v0.0.0-...-02edade Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PretendardGOV_Regular = "PretendardGOV-Regular.ttf"

	Fontawesome = "fa-regular-400.ttf"
)

Variables

This section is empty.

Functions

func ApplySubWindowClass

func ApplySubWindowClass()

func InitImgui

func InitImgui(title string, width, height int)

func RS

func RS(text string) string

func Run

func Run(fn func())

func SetBeforeDestroyContextCallback

func SetBeforeDestroyContextCallback(f func())

func T

func T(translateKey string, options ...goeasyi18n.Options) string

Types

type FontAtlas

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

func (*FontAtlas) AddFont

func (a *FontAtlas) AddFont(fontName string, size float32) *FontInfo

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

func (*FontAtlas) AddFontFromBytes

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

AddFontFromBytes does similar to AddFont, but using data from memory.

func (*FontAtlas) GetDefaultFonts

func (a *FontAtlas) GetDefaultFonts() []FontInfo

func (*FontAtlas) RegisterString

func (a *FontAtlas) RegisterString(str string) string

RegisterString register string to font atlas builder. Note only register strings that will be displayed on the UI.

func (*FontAtlas) SetDefaultFont

func (a *FontAtlas) SetDefaultFont(fontName string, size float32)

SetDefaultFont changes default font.

func (*FontAtlas) SetDefaultFontFromBytes

func (a *FontAtlas) SetDefaultFontFromBytes(fontBytes []byte, size float32)

SetDefaultFontFromBytes changes default font by bytes of the font file.

func (*FontAtlas) SetDefaultFontSize

func (a *FontAtlas) SetDefaultFontSize(size float32)

SetDefaultFontSize sets the default font size. Invoke this before MasterWindow.NewMasterWindow(..).

type FontInfo

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

FontInfo represents a giu implementation of imgui font.

func (*FontInfo) SetSize

func (f *FontInfo) SetSize(size float32) *FontInfo

func (*FontInfo) String

func (f *FontInfo) String() string

type ImguiDPI

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

func NewImguiDPI

func NewImguiDPI(style *imgui.Style, context *imgui.Context, io *imgui.IO) *ImguiDPI

func (*ImguiDPI) GetDPI

func (d *ImguiDPI) GetDPI() float32

func (*ImguiDPI) UpdateDPI

func (d *ImguiDPI) UpdateDPI()

type ImguiWContext

type ImguiWContext struct {
	FontAtlas *FontAtlas
	// contains filtered or unexported fields
}
var Context *ImguiWContext

func (*ImguiWContext) Backend

func (*ImguiWContext) ID

func (ic *ImguiWContext) ID() int

func (*ImguiWContext) IO

func (ic *ImguiWContext) IO() *imgui.IO

func (*ImguiWContext) WaitGroup

func (ic *ImguiWContext) WaitGroup() *sync.WaitGroup

type PlotSetupArgs

type PlotSetupArgs struct {
	AxisXLimitMax       float64
	IsLastSubPlot       bool
	IsFitRequest        bool
	IsFitAudioStreamPos bool
}

type PlotWidget

type PlotWidget interface {
	Title() string
	PlotSetup(args PlotSetupArgs)
	Plot()
	UpdateData()
	EventHandler(eventArgs any)
	IsDisposed() bool
}

type Widget

type Widget interface {
	View()
}

type Window

type Window interface {
	Widget

	Title() string

	IsOpen() bool
	SetIsOpen(bool)
}

Jump to

Keyboard shortcuts

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