Skip to content

Commit

Permalink
add randomly missing docs in giu
Browse files Browse the repository at this point in the history
  • Loading branch information
gucio321 committed Oct 2, 2024
1 parent cf1dd1a commit e49fd8a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Context.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ type state struct {
data Disposable
}

// GUIContext represents a giu context. (Current context is giu.Context.
// GIUContext represents a giu context. (Current context is giu.Context.
type GIUContext struct {
backend backend.Backend[glfwbackend.GLFWWindowFlags]

Expand Down Expand Up @@ -101,7 +101,7 @@ func (c *GIUContext) IO() *imgui.IO {
// invalidAllState should be called before rendering.
// it ensures all states are marked as invalid for that moment.
func (c *GIUContext) invalidAllState() {
c.state.Range(func(k, v any) bool {
c.state.Range(func(_, v any) bool {
if s, ok := v.(*state); ok {
c.m.Lock()
s.valid = false
Expand Down
3 changes: 2 additions & 1 deletion Plot.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@ import (
"github.com/AllenDang/cimgui-go/implot"
)

// PlotAxis types.
type (
// PlotXAxis allows to chose X axis.
PlotXAxis = implot.PlotAxisEnum
// PlotYAxis allows to chose Y axis.
PlotYAxis = implot.PlotAxisEnum
)

Expand Down
2 changes: 2 additions & 0 deletions SliderWidgets.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func (s *SliderIntWidget) Labelf(format string, args ...any) *SliderIntWidget {
return s.Label(fmt.Sprintf(format, args...))
}

// ID manually sets widget id.
func (s *SliderIntWidget) ID(id ID) *SliderIntWidget {
s.label = id
return s
Expand Down Expand Up @@ -146,6 +147,7 @@ func (vs *VSliderIntWidget) Labelf(format string, args ...any) *VSliderIntWidget
return vs.Label(fmt.Sprintf(format, args...))
}

// ID manually sets widget id.
func (vs *VSliderIntWidget) ID(id ID) *VSliderIntWidget {
vs.label = id
return vs
Expand Down
1 change: 1 addition & 0 deletions StyleSetter.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ func (ss *StyleSetter) To(widgets ...Widget) *StyleSetter {
return ss
}

// Range implements Splitable interface.
func (ss *StyleSetter) Range(rangeFunc func(w Widget)) {
if ss.layout != nil {
var result Layout
Expand Down

0 comments on commit e49fd8a

Please sign in to comment.