Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/AllenDang/giu
/ functions
Functions
1,016 in github.com/AllenDang/giu
⨍
Functions
1,016
◇
Types & classes
198
↓ 103 callers
Method
Label
Label sets label (id).
TextWidgets.go:365
↓ 98 callers
Method
SetColorVec4
SetColorVec4 is a lower-level function to set colors. It omits color conversion for e.g. better performance/compatibility. Historically was introduced
StyleSetter.go:96
↓ 70 callers
Method
Build
()
Layout.go:12
↓ 68 callers
Method
Layout
Layout sets layout of the menu. (See MenuItemWidget).
Widgets.go:514
↓ 56 callers
Function
ToVec2
ToVec2 converts image.Point to imgui.Vec2.
Utils.go:82
↓ 54 callers
Function
GenAutoID
GenAutoID automatically generates widget's ID. It returns an unique value each time it is called.
Context.go:13
↓ 51 callers
Method
PrepareString
PrepareString prepares string to be displayed by imgui. It does the following (exactly one at the moment): - translates the string with the Translator
Context.go:123
↓ 50 callers
Method
OnClick
OnClick sets callback that will be executed when item is clicked.
Widgets.go:471
↓ 50 callers
Method
String
()
Utils.go:24
↓ 48 callers
Method
Run
Run runs the main loop. loopFunc will be used to construct the ui. Run should be called at the end of main function, after setting up the master windo
MasterWindow.go:186
↓ 46 callers
Method
Add
Add allows to add another CSS stylesheet to the current one. NOTE: modifies receiver and returns it as well.
CSS.go:69
↓ 39 callers
Method
Size
Size sets child size.
Widgets.go:91
↓ 24 callers
Function
Custom
Custom creates a new custom widget.
ExtraWidgets.go:131
↓ 23 callers
Function
Label
Label constructs label widget.
TextWidgets.go:539
↓ 21 callers
Function
SetState
SetState is a generic version of Context.SetState.
Context.go:186
↓ 20 callers
Function
Button
Button creates a new button widget.
ClickableWidgets.go:24
↓ 20 callers
Function
ToVec4Color
ToVec4Color converts rgba color to imgui.Vec4.
Utils.go:68
↓ 19 callers
Method
Flags
Flags sets popup's flags.
Popups.go:66
↓ 17 callers
Method
To
To specifies a layout to which the style will be applied.
CSS.go:238
↓ 16 callers
Function
ColorToUint
ColorToUint converts GO color into Uint32 color it is 0xRRGGBBAA.
Utils.go:245
↓ 15 callers
Function
Assert
Assert checks if cond. If not cond, it alls golang panic.
Utils.go:222
↓ 15 callers
Function
NewMasterWindow
NewMasterWindow creates a new master window and initializes GLFW. it should be called in main function. For more details and use cases, see examples/h
MasterWindow.go:67
↓ 14 callers
Method
ID
ID returns imgui.TextureID of the texture.
Texture.go:54
↓ 14 callers
Method
SetColor
SetColor sets colorID's color.
StyleSetter.go:83
↓ 13 callers
Method
SetProperty
SetProperty allows to set chosen property to value. Type of value could be: - uint16 - uint32 - *uint32 - uint64 - uint8 - vec4 - float64 - int16 - in
PlotSpec.go:58
↓ 13 callers
Method
Texture
Texture commits any pending changes to the RGBA surface and returns the associated texture.
ReflectiveBoundTexture.go:225
↓ 12 callers
Method
OnChange
OnChange sets callback when combo value gets changed.
Widgets.go:249
↓ 12 callers
Method
Pos
Pos sets the window start position NOTE: The position could be changed by user later. To prevent user from changing window position use WIndowFlagsNoM
Window.go:104
↓ 12 callers
Function
Style
Style initializes a style setter (see examples/setstyle).
StyleSetter.go:31
↓ 12 callers
Method
getState
()
CodeEditor.go:232
↓ 11 callers
Method
SetStyle
SetStyle sets styleVarID to width and height.
StyleSetter.go:102
↓ 11 callers
Function
Window
Window creates a WindowWidget.
Window.go:72
↓ 10 callers
Method
Text
Text sets editor's text.
CodeEditor.go:99
↓ 10 callers
Method
getMatrix
matrix returns current matrix compatible with ImGuizmo (pointer to 4x4m). It recompiles as necessary.
Gizmo.go:420
↓ 10 callers
Function
runCmd
(cmd *exec.Cmd)
cmd/gmdeploy/utils.go:23
↓ 9 callers
Method
Scale
Scale sets the scale of the matrix.
Gizmo.go:366
↓ 9 callers
Method
SetStyleFloat
SetStyleFloat sets styleVarID to float value. NOTE: for float typed values see above in comments over StyleVarID's comments.
StyleSetter.go:120
↓ 8 callers
Function
GetAvailableRegion
GetAvailableRegion returns region available for rendering. it is always WindowSize-WindowPadding*2.
Utils.go:143
↓ 8 callers
Function
ImageToRgba
ImageToRgba converts image.Image to *image.RGBA.
Utils.go:55
↓ 8 callers
Function
Labelf
Labelf allows to add formatted label.
TextWidgets.go:547
↓ 8 callers
Method
Range
(func(w Widget))
Layout.go:36
↓ 8 callers
Function
SingleWindow
SingleWindow creates one window filling all available space in MasterWindow. If SingleWindow is set up, no other windows may be defined.
Window.go:12
↓ 8 callers
Method
registerDefaultFont
(fontName string)
FontAtlasProsessor.go:162
↓ 7 callers
Method
GetSpec
GetSpec returns underlying instance of implot.Spec (to use with implot functions).
PlotSpec.go:88
↓ 7 callers
Function
NewPlotSpec
NewPlotSpec creates a new PlotSpec instance with default values.
PlotSpec.go:42
↓ 7 callers
Function
PopItemWidth
PopItemWidth should be called to stop applying PushItemWidth effect If it isn't called imgui will panic.
Style.go:190
↓ 7 callers
Function
PushItemWidth
PushItemWidth sets following item's widths NOTE: don't forget to call PopItemWidth! If you don't do so, imgui will panic.
Style.go:184
↓ 7 callers
Method
RegisterKeyboardShortcuts
RegisterKeyboardShortcuts adds a specified shortcuts into input handler
InputHandler.go:39
↓ 7 callers
Function
Row
Row creates RowWidget.
Widgets.go:20
↓ 7 callers
Function
TableColumn
TableColumn creates a new TableColumnWidget.
TableWidgets.go:87
↓ 7 callers
Method
ToImageWidget
ToImageWidget converts the ReflectiveBoundTexture to an ImageWidget. Returns: - *ImageWidget: The ImageWidget representation of the ReflectiveBoundTe
ReflectiveBoundTexture.go:96
↓ 7 callers
Function
Vec4ToRGBA
Vec4ToRGBA converts imgui's Vec4 to golang rgba color.
Utils.go:90
↓ 6 callers
Method
Plot
()
Plot.go:30
↓ 6 callers
Method
Plots
Plots adds plots to plot canvas.
Plot.go:231
↓ 6 callers
Method
Push
Push allows to manually activate Styles written inside of StyleSetter it works like imgui.PushXXX() stuff, but for group of style variables, just like
StyleSetter.go:292
↓ 6 callers
Method
Rows
Rows sets the rows of the table.
TableWidgets.go:195
↓ 6 callers
Method
SetSurfaceFromRGBA
SetSurfaceFromRGBA sets the surface of the ReflectiveBoundTexture from the provided RGBA image. If the provided image is nil, it returns an error. If
ReflectiveBoundTexture.go:78
↓ 6 callers
Function
mkdirAll
(name string)
cmd/gmdeploy/utils.go:16
↓ 6 callers
Function
msgboxInvokeCallback
(result DialogResult, callback DialogResultCallback)
Msgbox.go:53
↓ 5 callers
Function
Align
Align sets widgets alignment.
Alignment.go:94
↓ 5 callers
Function
Child
Child creates a new ChildWidget.
Widgets.go:72
↓ 5 callers
Method
Close
Close will safely close the master window.
MasterWindow.go:341
↓ 5 callers
Method
Columns
Columns adds a list of column widgets to be used in the table. Columns added with this function will cause the table header to be shown. If the table
TableWidgets.go:189
↓ 5 callers
Function
Image
Image adds an image from giu.Texture.
ImageWidgets.go:34
↓ 5 callers
Function
NewTextureFromRgba
NewTextureFromRgba creates a new texture from image.Image and, when it is done, calls loadCallback(loadedTexture).
Texture.go:35
↓ 5 callers
Method
Pop
Pop allows to manually pop the whole StyleSetter (use after Push!)
StyleSetter.go:336
↓ 5 callers
Function
SetCursorPos
SetCursorPos sets imgui drawing cursor inside of current window.
Utils.go:131
↓ 5 callers
Method
cleanStates
cleanStates removes all states that were not marked as valid during rendering, then reset said flag before new usage should always be called before fi
Context.go:152
↓ 5 callers
Method
getState
()
Markdown.go:33
↓ 5 callers
Function
newInputHandler
()
InputHandler.go:50
↓ 4 callers
Method
AddCircleFilled
AddCircleFilled draws a filled circle.
Canvas.go:108
↓ 4 callers
Function
ArrowButton
ArrowButton creates ArrowButtonWidget.
ClickableWidgets.go:88
↓ 4 callers
Method
AxisLimits
AxisLimits sets X and Y axis limits.
Plot.go:130
↓ 4 callers
Function
CreateContext
CreateContext creates a new giu context.
Context.go:81
↓ 4 callers
Function
Dummy
Dummy creates new DummyWidget.
Widgets.go:595
↓ 4 callers
Method
Event
Event create TreeNode with event handling function. You could detect events (e.g. IsItemClicked IsMouseDoubleClicked etc...) and handle them for TreeN
ClickableWidgets.go:552
↓ 4 callers
Function
GetCursorScreenPos
GetCursorScreenPos returns imgui drawing cursor on the screen.
Utils.go:114
↓ 4 callers
Method
Handle
Handle handles a shortcut
InputHandler.go:43
↓ 4 callers
Method
ID
ID assigns hardcoded ID (baypass GenAutoID mechanism).
ExtraWidgets.go:291
↓ 4 callers
Function
IsKeyPressed
IsKeyPressed returns true if key `key` is pressed.
Events.go:37
↓ 4 callers
Method
LoadSurface
LoadSurface loads a surface using a SurfaceLoader. Parameters: - loader: The SurfaceLoader to use for loading the surface. - commit: A boolean flag i
SurfaceLoaders.go:53
↓ 4 callers
Method
LoadSurface
LoadSurface loads a surface asynchronously using a SurfaceLoader. Parameters: - loader: The SurfaceLoader to use for loading the surface. - commit: A
SurfaceLoaders.go:70
↓ 4 callers
Function
NewViewMatrix
NewViewMatrix creates a new ViewMatrix.
Gizmo.go:319
↓ 4 callers
Method
ServeRGBA
ServeRGBA serves an RGBA image. Returns: - *image.RGBA: The RGBA image. - error: An error if the image could not be served.
SurfaceLoaders.go:22
↓ 4 callers
Method
SetShouldClose
SetShouldClose sets whether master window should be closed.
MasterWindow.go:346
↓ 4 callers
Method
SetSurfaceFromURL
SetSurfaceFromURL loads an image from the specified URL and sets it as the surface of the ReflectiveBoundTexture. Parameters: - url: The URL to load
SurfaceLoaders.go:280
↓ 4 callers
Function
TableRow
TableRow creates a TbleRowWidget. Each widget will be rendered in a separated column. NOTE: if you want to put multiple widgets in one cell, enclose t
TableWidgets.go:29
↓ 4 callers
Function
Update
Update updates giu app it is done by default after each frame. However because frames stops rendering, when no user action is done, it may be necessar
Utils.go:104
↓ 4 callers
Method
Wrapped
Wrapped determines if label is wrapped.
TextWidgets.go:552
↓ 4 callers
Method
buildChild
Build Child panel. If layout is a SplitLayout, set the frame padding to zero.
SplitLayout.go:203
↓ 4 callers
Method
commit
* Return a waranted: * - Initialized * - With proper resources bindings against gpu (free old, bound new) * - Up to date Texture. */ commit update
ReflectiveBoundTexture.go:49
↓ 4 callers
Function
flushDrawCommands
(c *Canvas)
examples/paint/canvas.go:28
↓ 4 callers
Method
getState
returns window state.
Window.go:199
↓ 3 callers
Method
AddRectFilled
AddRectFilled draws a rectangle filled with `col`.
Canvas.go:78
↓ 3 callers
Function
Checkbox
Checkbox creates a new CheckboxWidget.
ClickableWidgets.go:375
↓ 3 callers
Method
Children
Children sets child rows of tree row.
TableWidgets.go:313
↓ 3 callers
Function
CircleButton
CircleButton creates a new CircleButtonWidget.
examples/customwidget/customwidget.go:19
↓ 3 callers
Function
Floodfill
Floodfill fills an area of an image with a given color starting at point (x, y). The fill continues for all adjacent pixels of the same starting color
examples/paint/draw.go:62
↓ 3 callers
Function
GetCursorPos
GetCursorPos gets imgui drawing cursor inside of current window.
Utils.go:125
↓ 3 callers
Function
GetItemSpacing
GetItemSpacing returns current item spacing.
Style.go:247
next →
1–100 of 1,016, ranked by callers