Documentation
¶
Index ¶
- Constants
- Variables
- func Acos01(x float64) float64
- func CharIsSpace(c rune) bool
- func DataTypeApplyOp(op int, output, arg1, arg2 interface{})
- func DataTypeApplyOpFromText(buf []byte, initial_value_buf string, data interface{}, scalar_format string) bool
- func DataTypeFormatString(data interface{}, format string) []byte
- func Decode85(src, dst []byte)
- func Decode85Byte(c byte) uint
- func F32_TO_INT8_UNBOUND(v float64) int
- func GetDefaultCompressedFontDataTTFBase85() []byte
- func GetMinimumStepAtDecimalPrecision(decimal_precision int) float64
- func ImeSetInputScreenPosFn_DefaultImpl(x, y int)
- func InputTextCalcTextLenAndLineCount(text string) int
- func InvLength(lhs f64.Vec2, fail_value float64) float64
- func LineClosestPoint(a, b, p f64.Vec2) f64.Vec2
- func ParseFormatPrecision(format string, default_precision int) int
- func ParseFormatTrimDecorations(format string) string
- func ParseFormatTrimDecorationsLeading(format string) string
- func Rotate(v f64.Vec2, cos_a, sin_a float64) f64.Vec2
- func RoundScalarWithFormat(format string, value float64) float64
- func StrbolW(buf []rune, buf_mid_line, buf_begin int) int
- func TextCountUtf8BytesFromStr(r []rune) int
- func TriangleBarycentricCoords(a, b, c, p f64.Vec2) (out_u, out_v, out_w float64)
- func TriangleClosestPoint(a, b, c, p f64.Vec2) f64.Vec2
- func TriangleContainsPoint(a, b, c, p f64.Vec2) bool
- func UpperPowerOfTwo(v int) int
- type Axis
- type BackendFlags
- type ButtonFlags
- type Col
- type ColMod
- type ColorEditFlags
- type ColumnData
- type ColumnsFlags
- type ColumnsSet
- type ComboFlags
- type Cond
- type ConfigFlags
- type Context
- func (c *Context) AddDrawListToDrawData(out_list *[]*DrawList, draw_list *DrawList)
- func (c *Context) AddWindowSettings(name string) *WindowSettings
- func (c *Context) AddWindowToDrawData(out_render_list *[]*DrawList, window *Window)
- func (c *Context) AddWindowToDrawDataSelectLayer(window *Window)
- func (c *Context) AddWindowToSortedBuffer(out_sorted_windows *[]*Window, window *Window)
- func (c *Context) AlignTextToFramePadding()
- func (c *Context) ArrowButton(str_id string, dir Dir) bool
- func (c *Context) Begin(name string) bool
- func (c *Context) BeginChild(str_id string) bool
- func (c *Context) BeginChildEx(str_id string, size_arg f64.Vec2, border bool, extra_flags WindowFlags) bool
- func (c *Context) BeginChildFrame(id ID, size f64.Vec2, extra_flags WindowFlags) bool
- func (c *Context) BeginChildID(id ID) bool
- func (c *Context) BeginChildIDEx(id ID, size_arg f64.Vec2, border bool, extra_flags WindowFlags) bool
- func (c *Context) BeginColumns(str_id string, columns_count int, flags ColumnsFlags)
- func (c *Context) BeginCombo(label, preview_value string) bool
- func (c *Context) BeginComboEx(label, preview_value string, flags ComboFlags) bool
- func (c *Context) BeginDragDropSource() bool
- func (c *Context) BeginDragDropTarget() bool
- func (c *Context) BeginDragDropTargetCustom(bb f64.Rectangle, id ID) bool
- func (c *Context) BeginEx(name string, p_open *bool, flags WindowFlags) bool
- func (c *Context) BeginGroup()
- func (c *Context) BeginMainMenuBar() bool
- func (c *Context) BeginMenu(label string) bool
- func (c *Context) BeginMenuBar() bool
- func (c *Context) BeginMenuEx(label string, enabled bool) bool
- func (c *Context) BeginPopup(str_id string) bool
- func (c *Context) BeginPopupContextItem() bool
- func (c *Context) BeginPopupContextItemEx(str_id string, mouse_button int) bool
- func (c *Context) BeginPopupContextWindow() bool
- func (c *Context) BeginPopupContextWindowEx(str_id string, mouse_button int, also_over_items bool) bool
- func (c *Context) BeginPopupEx(id ID, extra_flags WindowFlags) bool
- func (c *Context) BeginPopupModal(name string) bool
- func (c *Context) BeginPopupModalEx(name string, p_open *bool, flags WindowFlags) bool
- func (c *Context) BeginPopupWindow(str_id string, flags WindowFlags) bool
- func (c *Context) BeginTooltip()
- func (c *Context) BeginTooltipEx(extra_flags WindowFlags, override_previous_tooltip bool)
- func (c *Context) BringWindowToFront(window *Window)
- func (c *Context) Bullet()
- func (c *Context) BulletText(format string, args ...interface{})
- func (c *Context) Button(label string) bool
- func (c *Context) ButtonBehavior(bb f64.Rectangle, id ID, flags ButtonFlags) (hovered, held, pressed bool)
- func (c *Context) ButtonEx(label string, size_arg f64.Vec2, flags ButtonFlags) bool
- func (c *Context) CalcItemSize(size f64.Vec2, default_x, default_y float64) f64.Vec2
- func (c *Context) CalcItemWidth() float64
- func (c *Context) CalcListClipping(items_count int, items_height float64) (out_items_display_start int, out_items_display_end int)
- func (c *Context) CalcMaxPopupHeightFromItemCount(items_count int) float64
- func (c *Context) CalcNextScrollFromScrollTargetAndClamp(window *Window) f64.Vec2
- func (c *Context) CalcResizePosSizeFromAnyCorner(window *Window, corner_target f64.Vec2, corner_norm f64.Vec2) (out_pos, out_size f64.Vec2)
- func (c *Context) CalcSizeAfterConstraint(window *Window, new_size f64.Vec2) f64.Vec2
- func (c *Context) CalcSizeAutoFit(window *Window, size_contents f64.Vec2) f64.Vec2
- func (c *Context) CalcSizeContents(window *Window) f64.Vec2
- func (c *Context) CalcTextSize(text string) f64.Vec2
- func (c *Context) CalcTextSizeEx(text string, hide_text_after_double_hash bool, wrap_width float64) f64.Vec2
- func (c *Context) CalcTypematicPressedRepeatAmount(t, t_prev, repeat_delay, repeat_rate float64) int
- func (c *Context) CalcWrapWidthForPos(pos f64.Vec2, wrap_pos_x float64) float64
- func (c *Context) CaptureKeyboardFromApp(capture bool)
- func (c *Context) CaptureMouseFromApp(capture bool)
- func (c *Context) Checkbox(label string, v *bool) bool
- func (c *Context) CheckboxFlags(label string, flags *uint, flags_value uint) bool
- func (c *Context) ClearActiveID()
- func (c *Context) ClearDragDrop()
- func (c *Context) CloseButton(id ID, pos f64.Vec2, radius float64) bool
- func (c *Context) CloseCurrentPopup()
- func (c *Context) ClosePopup(id ID)
- func (c *Context) ClosePopupToLevel(remaining int)
- func (c *Context) ClosePopupsOverWindow(ref_window *Window)
- func (c *Context) CollapsingHeader(label string) bool
- func (c *Context) CollapsingHeaderEx(label string, flags TreeNodeFlags) bool
- func (c *Context) CollapsingHeaderOpen(label string, p_open *bool) bool
- func (c *Context) CollapsingHeaderOpenEx(label string, p_open *bool, flags TreeNodeFlags) bool
- func (c *Context) ColorButton(desc_id string, col color.RGBA) bool
- func (c *Context) ColorButtonEx(desc_id string, col color.RGBA, flags ColorEditFlags, size f64.Vec2) bool
- func (c *Context) ColorButtonV(desc_id string, colv f64.Vec4) bool
- func (c *Context) ColorButtonVEx(desc_id string, colv f64.Vec4, flags ColorEditFlags, size f64.Vec2) bool
- func (c *Context) ColorEdit3(label string, col *color.RGBA) bool
- func (c *Context) ColorEdit3Ex(label string, col *color.RGBA, flags ColorEditFlags) bool
- func (c *Context) ColorEdit4(label string, col *color.RGBA) bool
- func (c *Context) ColorEdit4Ex(label string, col *color.RGBA, flags ColorEditFlags) bool
- func (c *Context) ColorEditOptionsPopup(col color.RGBA, flags ColorEditFlags)
- func (c *Context) ColorEditOptionsPopupV(col f64.Vec4, flags ColorEditFlags)
- func (c *Context) ColorEditV3(label string, col *f64.Vec4) bool
- func (c *Context) ColorEditV3Ex(label string, col *f64.Vec4, flags ColorEditFlags) bool
- func (c *Context) ColorEditV4(label string, col *f64.Vec4) bool
- func (c *Context) ColorEditV4Ex(label string, col *f64.Vec4, flags ColorEditFlags) bool
- func (c *Context) ColorPicker3(label string, col *color.RGBA) bool
- func (c *Context) ColorPicker3Ex(label string, col *color.RGBA, flags ColorEditFlags) bool
- func (c *Context) ColorPicker4(label string, col *color.RGBA) bool
- func (c *Context) ColorPicker4Ex(label string, col *color.RGBA, flags ColorEditFlags, ref_col *color.RGBA) bool
- func (c *Context) ColorPickerOptionsPopup(flags ColorEditFlags, ref_col *color.RGBA)
- func (c *Context) ColorPickerOptionsPopupV(flags ColorEditFlags, ref_col *f64.Vec4)
- func (c *Context) ColorPickerV3(label string, col *f64.Vec4) bool
- func (c *Context) ColorPickerV3Ex(label string, col *f64.Vec4, flags ColorEditFlags) bool
- func (c *Context) ColorPickerV4(label string, col *f64.Vec4) bool
- func (c *Context) ColorPickerV4Ex(label string, col *f64.Vec4, flags ColorEditFlags, ref_col *f64.Vec4) bool
- func (c *Context) ColorTooltip(text string, col color.RGBA, flags ColorEditFlags)
- func (c *Context) ColorTooltipV(text string, col f64.Vec4, flags ColorEditFlags)
- func (c *Context) Columns(columns_count int, id string, border bool)
- func (c *Context) ComboItem(label string, current_item *int, items_getter func(idx int) (string, bool), ...) bool
- func (c *Context) ComboItemEx(label string, current_item *int, items_getter func(idx int) (string, bool), ...) bool
- func (c *Context) ComboString(label string, current_item *int, items []string) bool
- func (c *Context) ComboStringEx(label string, current_item *int, items []string, popup_max_height_in_items int) bool
- func (c *Context) CreateNewWindow(name string, size f64.Vec2, flags WindowFlags) *Window
- func (c *Context) DragBehavior(frame_bb f64.Rectangle, id ID, v *float64, v_speed, v_min, v_max float64, ...) bool
- func (c *Context) DragFloat(label string, v *float64) bool
- func (c *Context) DragFloat2(label string, v []float64) bool
- func (c *Context) DragFloat2Ex(label string, v []float64, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) DragFloat3(label string, v []float64) bool
- func (c *Context) DragFloat3Ex(label string, v []float64, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) DragFloat4(label string, v []float64) bool
- func (c *Context) DragFloat4Ex(label string, v []float64, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) DragFloatEx(label string, v *float64, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) DragFloatN(label string, v []float64, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) DragFloatRange2(label string, v_current_min, v_current_max *float64) bool
- func (c *Context) DragFloatRange2Ex(label string, v_current_min, v_current_max *float64, ...) bool
- func (c *Context) DragInt(label string, v *int) bool
- func (c *Context) DragInt2(label string, v []int) bool
- func (c *Context) DragInt2Ex(label string, v []int, v_speed float64, v_min, v_max int, format string) bool
- func (c *Context) DragInt3(label string, v []int) bool
- func (c *Context) DragInt3Ex(label string, v []int, v_speed float64, v_min, v_max int, format string) bool
- func (c *Context) DragInt4(label string, v []int) bool
- func (c *Context) DragInt4Ex(label string, v []int, v_speed float64, v_min, v_max int, format string) bool
- func (c *Context) DragIntEx(label string, v *int, v_speed float64, v_min, v_max int, format string) bool
- func (c *Context) DragIntN(label string, v []int, v_speed float64, v_min, v_max int, format string) bool
- func (c *Context) DragIntRange2(label string, v_current_min, v_current_max *int) bool
- func (c *Context) DragIntRange2Ex(label string, v_current_min, v_current_max *int, v_speed float64, ...) bool
- func (c *Context) DragV2(label string, v *f64.Vec2) bool
- func (c *Context) DragV2Ex(label string, v *f64.Vec2, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) DragV3(label string, v *f64.Vec3) bool
- func (c *Context) DragV3Ex(label string, v *f64.Vec3, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) DragV4(label string, v *f64.Vec4) bool
- func (c *Context) DragV4Ex(label string, v *f64.Vec4, v_speed, v_min, v_max float64, format string, ...) bool
- func (c *Context) Dummy(size f64.Vec2)
- func (c *Context) End()
- func (c *Context) EndChild()
- func (c *Context) EndChildFrame()
- func (c *Context) EndColumns()
- func (c *Context) EndCombo()
- func (c *Context) EndDragDropSource()
- func (c *Context) EndDragDropTarget()
- func (c *Context) EndFrame()
- func (c *Context) EndGroup()
- func (c *Context) EndMainMenuBar()
- func (c *Context) EndMenu()
- func (c *Context) EndMenuBar()
- func (c *Context) EndPopup()
- func (c *Context) EndTooltip()
- func (c *Context) FindAllowedExtentRectForWindow(window *Window) f64.Rectangle
- func (c *Context) FindBestWindowPosForPopup(window *Window) f64.Vec2
- func (c *Context) FindBestWindowPosForPopupEx(ref_pos, size f64.Vec2, last_dir *Dir, r_outer, r_avoid f64.Rectangle, ...) f64.Vec2
- func (c *Context) FindHoveredWindow() *Window
- func (c *Context) FindOrAddColumnsSet(window *Window, id ID) *ColumnsSet
- func (c *Context) FindRenderedTextEnd(text string) int
- func (c *Context) FindSettingsHandler(typ string) *SettingsHandler
- func (c *Context) FindWindowByName(name string) *Window
- func (c *Context) FindWindowIndex(window *Window) int
- func (c *Context) FindWindowNavigable(i_start, i_stop, dir int) *Window
- func (c *Context) FindWindowSettings(name string) *WindowSettings
- func (c *Context) FocusFrontMostActiveWindow(ignore_window *Window)
- func (c *Context) FocusWindow(window *Window)
- func (c *Context) FocusableItemRegister(window *Window, id ID) bool
- func (c *Context) FocusableItemRegisterEx(window *Window, id ID, tab_stop bool) bool
- func (c *Context) FocusableItemUnregister(window *Window)
- func (c *Context) GetBorderRect(window *Window, border_n int, perp_padding, thickness float64) f64.Rectangle
- func (c *Context) GetClipboardText() string
- func (c *Context) GetClipboardTextFn_DefaultImpl() string
- func (c *Context) GetColorFromStyle(idx Col) color.RGBA
- func (c *Context) GetColorFromStyleWithAlpha(idx Col, alpha_mul float64) color.RGBA
- func (c *Context) GetColumnIndex() int
- func (c *Context) GetColumnOffset(column_index int) float64
- func (c *Context) GetColumnWidth() float64
- func (c *Context) GetColumnWidthDx(column_index int) float64
- func (c *Context) GetColumnWidthEx(columns *ColumnsSet, column_index int, before_resize bool) float64
- func (c *Context) GetColumnsCount() int
- func (c *Context) GetColumnsRectHalfWidth() float64
- func (c *Context) GetContentRegionAvail() f64.Vec2
- func (c *Context) GetContentRegionAvailWidth() float64
- func (c *Context) GetContentRegionMax() f64.Vec2
- func (c *Context) GetCurrentWindow() *Window
- func (c *Context) GetCurrentWindowRead() *Window
- func (c *Context) GetCursorPos() f64.Vec2
- func (c *Context) GetCursorPosY() float64
- func (c *Context) GetCursorScreenPos() f64.Vec2
- func (c *Context) GetCursorStartPos() f64.Vec2
- func (c *Context) GetDefaultFont() *Font
- func (c *Context) GetDraggedColumnOffset(columns *ColumnsSet, column_index int) float64
- func (c *Context) GetDrawData() *DrawData
- func (c *Context) GetDrawListSharedData() *DrawListSharedData
- func (c *Context) GetFont() *Font
- func (c *Context) GetFontSize() float64
- func (c *Context) GetFontTexUvWhitePixel() f64.Vec2
- func (c *Context) GetFrameCount() int
- func (c *Context) GetFrameHeight() float64
- func (c *Context) GetFrameHeightWithSpacing() float64
- func (c *Context) GetFrontMostPopupModal() *Window
- func (c *Context) GetID(id ID) ID
- func (c *Context) GetIO() *IO
- func (c *Context) GetItemRectMax() f64.Vec2
- func (c *Context) GetItemRectMin() f64.Vec2
- func (c *Context) GetItemRectSize() f64.Vec2
- func (c *Context) GetKeyPressedAmount(key_index int, repeat_delay, repeat_rate float64) int
- func (c *Context) GetMouseCursor() MouseCursor
- func (c *Context) GetMouseDragDelta(button int, lock_threshold float64) f64.Vec2
- func (c *Context) GetMousePos() f64.Vec2
- func (c *Context) GetNavInputAmount(n NavInput, mode InputReadMode) float64
- func (c *Context) GetNavInputAmount2d(dir_sources NavDirSourceFlags, mode InputReadMode) f64.Vec2
- func (c *Context) GetNavInputAmount2dEx(dir_sources NavDirSourceFlags, mode InputReadMode, ...) f64.Vec2
- func (c *Context) GetOverlayDrawList() *DrawList
- func (c *Context) GetScrollMaxX() float64
- func (c *Context) GetScrollMaxY() float64
- func (c *Context) GetScrollX() float64
- func (c *Context) GetScrollY() float64
- func (c *Context) GetStateStorage() map[ID]interface{}
- func (c *Context) GetStringID(str_id string) ID
- func (c *Context) GetStyle() *Style
- func (c *Context) GetStyleColorName(idx Col) string
- func (c *Context) GetStyleIndex(style *Style, idx StyleVar) interface{}
- func (c *Context) GetTextLineHeight() float64
- func (c *Context) GetTextLineHeightWithSpacing() float64
- func (c *Context) GetTime() float64
- func (c *Context) GetTreeNodeToLabelSpacing() float64
- func (c *Context) GetVersion() string
- func (c *Context) GetViewportRect() f64.Rectangle
- func (c *Context) GetWindowBgColorIdxFromFlags(flags WindowFlags) Col
- func (c *Context) GetWindowContentRegionMax() f64.Vec2
- func (c *Context) GetWindowContentRegionMin() f64.Vec2
- func (c *Context) GetWindowContentRegionWidth() float64
- func (c *Context) GetWindowDrawList() *DrawList
- func (c *Context) GetWindowHeight() float64
- func (c *Context) GetWindowScrollMaxX(window *Window) float64
- func (c *Context) GetWindowScrollMaxY(window *Window) float64
- func (c *Context) GetWindowSize() f64.Vec2
- func (c *Context) GetWindowWidth() float64
- func (c *Context) Image(user_texture_id TextureID, size, uv0, uv1 f64.Vec2, ...)
- func (c *Context) ImageButton(user_texture_id TextureID, size f64.Vec2) bool
- func (c *Context) ImageButtonEx(user_texture_id TextureID, size, uv0, uv1 f64.Vec2, frame_padding int, ...) bool
- func (c *Context) Indent()
- func (c *Context) IndentEx(indent_w float64)
- func (c *Context) Init(shared_font_atlas *FontAtlas)
- func (c *Context) InputFloat(label string, v *float64, step float64) bool
- func (c *Context) InputFloat2(label string, v []float64) bool
- func (c *Context) InputFloat2Ex(label string, v []float64, format string, extra_flags InputTextFlags) bool
- func (c *Context) InputFloat3(label string, v []float64) bool
- func (c *Context) InputFloat3Ex(label string, v []float64, format string, extra_flags InputTextFlags) bool
- func (c *Context) InputFloat4(label string, v []float64) bool
- func (c *Context) InputFloat4Ex(label string, v []float64, format string, extra_flags InputTextFlags) bool
- func (c *Context) InputFloatEx(label string, v *float64, step, step_fast float64, format string, ...) bool
- func (c *Context) InputFloatN(label string, v []float64) bool
- func (c *Context) InputFloatNEx(label string, v []float64, format string, extra_flags InputTextFlags) bool
- func (c *Context) InputInt(label string, v *int) bool
- func (c *Context) InputInt2(label string, v []int) bool
- func (c *Context) InputInt2Ex(label string, v []int, extra_flags InputTextFlags) bool
- func (c *Context) InputInt3(label string, v []int) bool
- func (c *Context) InputInt3Ex(label string, v []int, extra_flags InputTextFlags) bool
- func (c *Context) InputInt4(label string, v []int) bool
- func (c *Context) InputInt4Ex(label string, v []int, extra_flags InputTextFlags) bool
- func (c *Context) InputIntEx(label string, v *int, step, step_fast int, extra_flags InputTextFlags) bool
- func (c *Context) InputIntN(label string, v []int, extra_flags InputTextFlags) bool
- func (c *Context) InputScalarAsWidgetReplacement(bb f64.Rectangle, label string, data interface{}, id ID, format string) bool
- func (c *Context) InputScalarEx(label string, data, step_ptr, step_fast_ptr interface{}, scalar_format string, ...) bool
- func (c *Context) InputText(label string, buf []byte) bool
- func (c *Context) InputTextCalcTextSizeW(text []rune, stop_on_new_line bool) (text_size f64.Vec2, remaining int, out_offset f64.Vec2)
- func (c *Context) InputTextEx(label string, buf []byte, size_arg f64.Vec2, flags InputTextFlags, ...) bool
- func (c *Context) InputTextExCallback(label, buf string, size_arg f64.Vec2, flags InputTextFlags, callback func()) bool
- func (c *Context) InputTextFilterCharacter(p_char *rune, flags InputTextFlags, callback TextEditCallback) bool
- func (c *Context) InputTextMultiline(label string, buf []byte, size f64.Vec2, flags InputTextFlags, ...) bool
- func (c *Context) InputV2(label string, v *f64.Vec2) bool
- func (c *Context) InputV2Ex(label string, v *f64.Vec2, format string, extra_flags InputTextFlags) bool
- func (c *Context) InputV3(label string, v *f64.Vec3) bool
- func (c *Context) InputV3Ex(label string, v *f64.Vec3, format string, extra_flags InputTextFlags) bool
- func (c *Context) InputV4(label string, v *f64.Vec4) bool
- func (c *Context) InputV4Ex(label string, v *f64.Vec4, format string, extra_flags InputTextFlags) bool
- func (c *Context) InvisibleButton(str_id string, size_arg f64.Vec2) bool
- func (c *Context) IsAnyItemFocused() bool
- func (c *Context) IsAnyItemHovered() bool
- func (c *Context) IsClippedEx(bb f64.Rectangle, id ID, clip_even_when_logged bool) bool
- func (c *Context) IsItemActive() bool
- func (c *Context) IsItemClicked(mouse_button int) bool
- func (c *Context) IsItemFocused() bool
- func (c *Context) IsItemHovered() bool
- func (c *Context) IsItemHoveredEx(flags HoveredFlags) bool
- func (c *Context) IsItemVisible() bool
- func (c *Context) IsKeyDown(user_key_index int) bool
- func (c *Context) IsKeyPressed(user_key_index int, repeat bool) bool
- func (c *Context) IsKeyPressedMap(key Key) bool
- func (c *Context) IsKeyPressedMapEx(key Key, repeat bool) bool
- func (c *Context) IsKeyReleased(user_key_index int) bool
- func (c *Context) IsMouseClicked(button int, repeat bool) bool
- func (c *Context) IsMouseDoubleClicked(button int) bool
- func (c *Context) IsMouseDown(button int) bool
- func (c *Context) IsMouseDragging() bool
- func (c *Context) IsMouseDraggingEx(button int, lock_threshold float64) bool
- func (c *Context) IsMouseHoveringRect(r_min, r_max f64.Vec2) bool
- func (c *Context) IsMouseHoveringRectEx(r_min, r_max f64.Vec2, clip bool) bool
- func (c *Context) IsMousePosValid() bool
- func (c *Context) IsMousePosValidEx(mouse_pos *f64.Vec2) bool
- func (c *Context) IsMouseReleased(button int) bool
- func (c *Context) IsNavInputDown(n NavInput) bool
- func (c *Context) IsNavInputPressed(n NavInput, mode InputReadMode) bool
- func (c *Context) IsNavInputPressedAnyOfTwo(n1, n2 NavInput, mode InputReadMode) bool
- func (c *Context) IsPopupOpen(id ID) bool
- func (c *Context) IsPopupOpenID(id ID) bool
- func (c *Context) IsPopupOpenName(str_id string) bool
- func (c *Context) IsRectVisible(rect_min, rect_max f64.Vec2) bool
- func (c *Context) IsWindowChildOf(window, potential_parent *Window) bool
- func (c *Context) IsWindowContentHoverable(window *Window, flags HoveredFlags) bool
- func (c *Context) IsWindowFocused() bool
- func (c *Context) IsWindowFocusedEx(flags FocusedFlags) bool
- func (c *Context) IsWindowHovered() bool
- func (c *Context) IsWindowHoveredEx(flags HoveredFlags) bool
- func (c *Context) IsWindowNavFocusable(window *Window) bool
- func (c *Context) ItemAdd(bb f64.Rectangle, id ID) bool
- func (c *Context) ItemAddEx(bb f64.Rectangle, id ID, nav_bb_arg *f64.Rectangle) bool
- func (c *Context) ItemHoverable(bb f64.Rectangle, id ID) bool
- func (c *Context) ItemSize(size f64.Vec2)
- func (c *Context) ItemSizeBB(bb f64.Rectangle)
- func (c *Context) ItemSizeBBEx(bb f64.Rectangle, text_offset_y float64)
- func (c *Context) ItemSizeEx(size f64.Vec2, text_offset_y float64)
- func (c *Context) KeepAliveID(id ID)
- func (c *Context) LabelText(label, format string, args ...interface{})
- func (c *Context) ListBox(label string, current_item *int, items []string) bool
- func (c *Context) ListBoxEx(label string, current_item *int, items []string, height_in_items int) bool
- func (c *Context) ListBoxFooter()
- func (c *Context) ListBoxHeader(label string, size_arg f64.Vec2) bool
- func (c *Context) ListBoxHeaderItems(label string, items_count, height_in_items int) bool
- func (c *Context) ListBoxItems(label string, current_item *int, items_getter func(idx int) (string, bool), ...) bool
- func (c *Context) LoadIniSettingsFromDisk(filename string) error
- func (c *Context) LoadIniSettingsFromMemory(buf []byte) error
- func (c *Context) LogButtons()
- func (c *Context) LogFinish()
- func (c *Context) LogRenderedText(ref_pos *f64.Vec2, text string)
- func (c *Context) LogText(format string, args ...interface{})
- func (c *Context) LogToClipboard()
- func (c *Context) LogToClipboardEx(max_depth int)
- func (c *Context) LogToFile(max_depth int, filename string)
- func (c *Context) LogToTTY()
- func (c *Context) LogToTTYEx(max_depth int)
- func (c *Context) MarkIniSettingsDirty()
- func (c *Context) MarkIniSettingsDirtyForWindow(window *Window)
- func (c *Context) MenuItem(label string) bool
- func (c *Context) MenuItemEx(label, shortcut string, selected, enabled bool) bool
- func (c *Context) MenuItemSelect(label, shortcut string, p_selected *bool) bool
- func (c *Context) MenuItemSelectEx(label, shortcut string, p_selected *bool, enable bool) bool
- func (c *Context) NavCalcPreferredRefPos() f64.Vec2
- func (c *Context) NavInitWindow(window *Window, force_reinit bool)
- func (c *Context) NavMoveRequestButNoResultYet() bool
- func (c *Context) NavMoveRequestCancel()
- func (c *Context) NavProcessItem(window *Window, nav_bb f64.Rectangle, id ID)
- func (c *Context) NavProcessMoveRequestWrapAround(window *Window)
- func (c *Context) NavRestoreLastChildNavWindow(window *Window) *Window
- func (c *Context) NavRestoreLayer(layer int)
- func (c *Context) NavSaveLastChildNavWindow(child_window *Window)
- func (c *Context) NavScoreItem(result *NavMoveResult, cand f64.Rectangle) bool
- func (c *Context) NavScoreItemDistInterval(a0, a1, b0, b1 float64) float64
- func (c *Context) NavScoreItemGetQuadrant(dx, dy float64) Dir
- func (c *Context) NavScrollToBringItemIntoView(window *Window, item_rect_rel f64.Rectangle)
- func (c *Context) NavUpdate()
- func (c *Context) NavUpdateAnyRequestFlag()
- func (c *Context) NavUpdateWindowing()
- func (c *Context) NavUpdateWindowingHighlightWindow(focus_change_dir int)
- func (c *Context) NewFrame()
- func (c *Context) NewFrameUpdateHoveredWindowAndCaptureFlags()
- func (c *Context) NewLine()
- func (c *Context) NextColumn()
- func (c *Context) OffsetNormToPixels(columns *ColumnsSet, offset_norm float64) float64
- func (c *Context) OpenPopup(str_id string)
- func (c *Context) OpenPopupEx(id ID)
- func (c *Context) OpenPopupOnItemClick(str_id string, mouse_button int) bool
- func (c *Context) PixelsToOffsetNorm(columns *ColumnsSet, offset float64) float64
- func (c *Context) PlotEx(plot_type PlotType, label string, values_getter func(idx int) float64, ...)
- func (c *Context) PlotHistogram(label string, values []float64)
- func (c *Context) PlotHistogramEx(label string, values []float64, values_offset int, overlay_text string, ...)
- func (c *Context) PlotHistogramItem(label string, values_getter func(idx int) float64, values_count int)
- func (c *Context) PlotHistogramItemEx(label string, values_getter func(idx int) float64, ...)
- func (c *Context) PlotLines(label string, values []float64)
- func (c *Context) PlotLinesEx(label string, values []float64, values_offset int, overlay_text string, ...)
- func (c *Context) PlotLinesItem(label string, values_getter func(idx int) float64, values_count int)
- func (c *Context) PlotLinesItemEx(label string, values_getter func(idx int) float64, ...)
- func (c *Context) PopAllowKeyboardFocus()
- func (c *Context) PopButtonRepeat()
- func (c *Context) PopClipRect()
- func (c *Context) PopFont()
- func (c *Context) PopID()
- func (c *Context) PopItemFlag()
- func (c *Context) PopItemWidth()
- func (c *Context) PopStyleColor()
- func (c *Context) PopStyleColorN(count int)
- func (c *Context) PopStyleVar()
- func (c *Context) PopStyleVarN(count int)
- func (c *Context) PopTextWrapPos()
- func (c *Context) ProgressBar(fraction float64)
- func (c *Context) ProgressBarEx(fraction float64, size_arg f64.Vec2, overlay string)
- func (c *Context) PushAllowKeyboardFocus(allow_keyboard_focus bool)
- func (c *Context) PushButtonRepeat(repeat bool)
- func (c *Context) PushClipRect(clip_rect_min, clip_rect_max f64.Vec2, intersect_with_current_clip_rect bool)
- func (c *Context) PushColumnClipRect()
- func (c *Context) PushColumnClipRectEx(column_index int)
- func (c *Context) PushFont(font *Font)
- func (c *Context) PushID(id ID)
- func (c *Context) PushItemFlag(option ItemFlags, enabled bool)
- func (c *Context) PushItemWidth(item_width float64)
- func (c *Context) PushMultiItemsWidths(components int)
- func (c *Context) PushMultiItemsWidthsEx(components int, w_full float64)
- func (c *Context) PushStringID(str_id string)
- func (c *Context) PushStyleColor(idx Col, col color.RGBA)
- func (c *Context) PushStyleColorV4(idx Col, col f64.Vec4)
- func (c *Context) PushStyleVar(idx StyleVar, val interface{})
- func (c *Context) PushTextWrapPos(wrap_pos_x float64)
- func (c *Context) RadioButton(label string, active bool) bool
- func (c *Context) RadioButtonEx(label string, v *int, v_button int) bool
- func (c *Context) Render()
- func (c *Context) RenderArrow(p_min f64.Vec2, dir Dir)
- func (c *Context) RenderArrowEx(p_min f64.Vec2, dir Dir, scale float64)
- func (c *Context) RenderArrowToList(draw_list *DrawList, pos, half_sz f64.Vec2, direction Dir, col color.RGBA)
- func (c *Context) RenderArrowsForVerticalBar(draw_list *DrawList, pos, half_sz f64.Vec2, bar_w float64)
- func (c *Context) RenderBullet(pos f64.Vec2)
- func (c *Context) RenderCheckMark(pos f64.Vec2, col color.RGBA, sz float64)
- func (c *Context) RenderColorRectWithAlphaCheckerboard(p_min, p_max f64.Vec2, fill_col color.RGBA, grid_step float64, ...)
- func (c *Context) RenderColorRectWithAlphaCheckerboardDx(p_min, p_max f64.Vec2, fill_col color.RGBA, grid_step float64, ...)
- func (c *Context) RenderColorRectWithAlphaCheckerboardEx(p_min, p_max f64.Vec2, col color.RGBA, grid_step float64, grid_off f64.Vec2, ...)
- func (c *Context) RenderFrame(p_min, p_max f64.Vec2, col color.RGBA)
- func (c *Context) RenderFrameBorder(p_min, p_max f64.Vec2, rounding float64)
- func (c *Context) RenderFrameEx(p_min, p_max f64.Vec2, fill_col color.RGBA, border bool, rounding float64)
- func (c *Context) RenderNavHighlight(bb f64.Rectangle, id ID)
- func (c *Context) RenderNavHighlightEx(bb f64.Rectangle, id ID, flags NavHighlightFlags)
- func (c *Context) RenderRectFilledRangeH(draw_list *DrawList, rect f64.Rectangle, col color.RGBA, ...)
- func (c *Context) RenderText(pos f64.Vec2, text string)
- func (c *Context) RenderTextClipped(pos_min, pos_max f64.Vec2, text string, text_size_if_known *f64.Vec2)
- func (c *Context) RenderTextClippedEx(pos_min, pos_max f64.Vec2, text string, text_size_if_known *f64.Vec2, ...)
- func (c *Context) RenderTextEx(pos f64.Vec2, text string, hide_text_after_hash bool)
- func (c *Context) RenderTextWrapped(pos f64.Vec2, text string, wrap_width float64)
- func (c *Context) ResetMouseDragDelta(button int)
- func (c *Context) SameLine()
- func (c *Context) SameLineEx(pos_x, spacing_w float64)
- func (c *Context) SaveIniSettingsToDisk(ini_filename string) error
- func (c *Context) SaveIniSettingsToMemory() []byte
- func (c *Context) Scrollbar(direction LayoutType)
- func (c *Context) Selectable(label string) bool
- func (c *Context) SelectableEx(label string, selected bool, flags SelectableFlags, size_arg f64.Vec2) bool
- func (c *Context) SelectableOpen(label string, p_selected *bool) bool
- func (c *Context) SelectableOpenEx(label string, p_selected *bool, flags SelectableFlags, size f64.Vec2) bool
- func (c *Context) Separator()
- func (c *Context) SetActiveID(id ID, window *Window)
- func (c *Context) SetClipboardText(text string)
- func (c *Context) SetClipboardTextFn_DefaultImpl(text string)
- func (c *Context) SetColorEditOptions(flags ColorEditFlags)
- func (c *Context) SetColumnOffset(column_index int, offset float64)
- func (c *Context) SetCurrentFont(font *Font)
- func (c *Context) SetCurrentWindow(window *Window)
- func (c *Context) SetCurrentWindowPos(pos f64.Vec2, cond Cond)
- func (c *Context) SetCurrentWindowSize(size f64.Vec2, cond Cond)
- func (c *Context) SetCursorPosY(y float64)
- func (c *Context) SetCursorPosYAndSetupDummyPrevLine(pos_y, line_height float64)
- func (c *Context) SetCursorScreenPos(screen_pos f64.Vec2)
- func (c *Context) SetDragDropPayload(a interface{})
- func (c *Context) SetFocusID(id ID, window *Window)
- func (c *Context) SetHoveredID(id ID)
- func (c *Context) SetItemAllowOverlap()
- func (c *Context) SetItemDefaultFocus()
- func (c *Context) SetKeyboardFocusHere()
- func (c *Context) SetKeyboardFocusHereEx(offset int)
- func (c *Context) SetMouseCursor(cursor_type MouseCursor)
- func (c *Context) SetNavID(id ID, nav_layer int)
- func (c *Context) SetNavIDAndMoveMouse(id ID, nav_layer int, rect_rel f64.Rectangle)
- func (c *Context) SetNavIDWithRectRel(id ID, nav_layer int, rect_rel f64.Rectangle)
- func (c *Context) SetNextWindowBgAlpha(alpha float64)
- func (c *Context) SetNextWindowContentSize(size f64.Vec2)
- func (c *Context) SetNextWindowPos(pos f64.Vec2, cond Cond, pivot f64.Vec2)
- func (c *Context) SetNextWindowSize(size f64.Vec2, cond Cond)
- func (c *Context) SetNextWindowSizeConstraints(size_min, size_max f64.Vec2, custom_callback func(*SizeCallbackData))
- func (c *Context) SetScrollFromPosY(pos_y, center_y_ratio float64)
- func (c *Context) SetScrollHere()
- func (c *Context) SetScrollHereEx(center_y_ratio float64)
- func (c *Context) SetScrollX(scroll_x float64)
- func (c *Context) SetScrollY(scroll_y float64)
- func (c *Context) SetStateStorage(tree map[ID]interface{})
- func (c *Context) SetTooltip(format string, args ...interface{})
- func (c *Context) SetWindowCollapsed(window *Window, collapsed bool, cond Cond)
- func (c *Context) SetWindowConditionAllowFlags(window *Window, flags Cond, enabled bool)
- func (c *Context) SetWindowFocus()
- func (c *Context) SetWindowFontScale(scale float64)
- func (c *Context) SetWindowPos(window *Window, pos f64.Vec2, cond Cond)
- func (c *Context) SetWindowPosByName(name string, pos f64.Vec2, cond Cond)
- func (c *Context) SetWindowScrollX(window *Window, new_scroll_x float64)
- func (c *Context) SetWindowScrollY(window *Window, new_scroll_y float64)
- func (c *Context) SetWindowSize(window *Window, size f64.Vec2, cond Cond)
- func (c *Context) SetWindowSizeByName(name string, size f64.Vec2, cond Cond)
- func (c *Context) SettingsHandlerWindow_ReadLine(_ *Context, _ *SettingsHandler, entry interface{}, line string)
- func (c *Context) SettingsHandlerWindow_ReadOpen(_ *Context, _ *SettingsHandler, name string) interface{}
- func (c *Context) SettingsHandlerWindow_WriteAll(ctx *Context, handler *SettingsHandler, w io.Writer)
- func (c *Context) SetupDrawData(draw_lists []*DrawList, out_draw_data *DrawData)
- func (c *Context) ShadeVertsLinearColorGradientKeepAlpha(vtx []DrawVert, vert_start, vert_end int, gradient_p0, gradient_p1 f64.Vec2, ...)
- func (c *Context) SliderAngle(label string, v_rad *float64) bool
- func (c *Context) SliderAngleEx(label string, v_rad *float64, v_degrees_min, v_degrees_max float64) bool
- func (c *Context) SliderBehavior(frame_bb f64.Rectangle, id ID, v *float64, v_min, v_max, power float64, ...) bool
- func (c *Context) SliderBehaviorCalcRatioFromValue(v, v_min, v_max, power, linear_zero_pos float64) float64
- func (c *Context) SliderFloat(label string, v *float64, v_min, v_max float64) bool
- func (c *Context) SliderFloat2(label string, v []float64, v_min, v_max float64) bool
- func (c *Context) SliderFloat2Ex(label string, v []float64, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SliderFloat3(label string, v []float64, v_min, v_max float64) bool
- func (c *Context) SliderFloat3Ex(label string, v []float64, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SliderFloat4(label string, v []float64, v_min, v_max float64) bool
- func (c *Context) SliderFloat4Ex(label string, v []float64, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SliderFloatEx(label string, v *float64, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SliderFloatN(label string, v []float64, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SliderInt(label string, v *int, v_min, v_max int) bool
- func (c *Context) SliderInt2(label string, v []int, v_min, v_max int) bool
- func (c *Context) SliderInt2Ex(label string, v []int, v_min, v_max int, format string) bool
- func (c *Context) SliderInt3(label string, v []int, v_min, v_max int) bool
- func (c *Context) SliderInt3Ex(label string, v []int, v_min, v_max int, format string) bool
- func (c *Context) SliderInt4(label string, v []int, v_min, v_max int) bool
- func (c *Context) SliderInt4Ex(label string, v []int, v_min, v_max int, format string) bool
- func (c *Context) SliderIntEx(label string, v *int, v_min, v_max int, format string) bool
- func (c *Context) SliderIntN(label string, v []int, v_min, v_max int, format string) bool
- func (c *Context) SliderV2(label string, v *f64.Vec2, v_min, v_max float64) bool
- func (c *Context) SliderV2Ex(label string, v *f64.Vec2, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SliderV3(label string, v *f64.Vec3, v_min, v_max float64) bool
- func (c *Context) SliderV3Ex(label string, v *f64.Vec3, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SliderV4(label string, v *f64.Vec4, v_min, v_max float64) bool
- func (c *Context) SliderV4Ex(label string, v *f64.Vec4, v_min, v_max float64, format string, power float64) bool
- func (c *Context) SmallButton(label string) bool
- func (c *Context) Spacing()
- func (c *Context) StyleColorsClassic(style *Style)
- func (c *Context) StyleColorsDark(style *Style)
- func (c *Context) StyleColorsLight(style *Style)
- func (c *Context) Text(format string, args ...interface{})
- func (c *Context) TextColored(col color.RGBA, format string, args ...interface{})
- func (c *Context) TextDisabled(format string, args ...interface{})
- func (c *Context) TextUnformatted(text string)
- func (c *Context) TextWrapped(format string, args ...interface{})
- func (c *Context) TreeNode(label string) bool
- func (c *Context) TreeNodeBehavior(id ID, flags TreeNodeFlags, label string) bool
- func (c *Context) TreeNodeBehaviorIsOpen(id ID, flags TreeNodeFlags) bool
- func (c *Context) TreeNodeID(id ID, format string, args ...interface{}) bool
- func (c *Context) TreeNodeIDEx(id ID, flags TreeNodeFlags, format string, args ...interface{}) bool
- func (c *Context) TreeNodeStringID(str_id string, format string, args ...interface{}) bool
- func (c *Context) TreeNodeStringIDEx(str_id string, flags TreeNodeFlags, format string, args ...interface{}) bool
- func (c *Context) TreePop()
- func (c *Context) TreePush(str_id string)
- func (c *Context) TreePushRawID(id ID)
- func (c *Context) Unindent()
- func (c *Context) UnindentEx(indent_w float64)
- func (c *Context) UpdateManualResize(window *Window, size_auto_fit f64.Vec2, border_held *int, ...)
- func (c *Context) UpdateMouseInputs()
- func (c *Context) UpdateMovingWindow()
- func (c *Context) VSliderFloat(label string, size f64.Vec2, v *float64, v_min, v_max float64) bool
- func (c *Context) VSliderFloatEx(label string, size f64.Vec2, v *float64, v_min, v_max float64, format string, ...) bool
- func (c *Context) VSliderInt(label string, size f64.Vec2, v *int, v_min, v_max int) bool
- func (c *Context) VSliderIntEx(label string, size f64.Vec2, v *int, v_min, v_max int, format string) bool
- func (c *Context) VerticalSeparator()
- type CustomRect
- type Dir
- type DragDropFlags
- type DrawChannel
- type DrawCmd
- type DrawContext
- type DrawCornerFlags
- type DrawData
- type DrawDataBuilder
- type DrawIdx
- type DrawList
- func (d *DrawList) AddBezierCurve(pos0, cp0, cp1, pos1 f64.Vec2, col color.RGBA, thickness float64)
- func (d *DrawList) AddBezierCurveEx(pos0, cp0, cp1, pos1 f64.Vec2, col color.RGBA, thickness float64, ...)
- func (d *DrawList) AddCircle(centre f64.Vec2, radius float64, col color.RGBA)
- func (d *DrawList) AddCircleEx(centre f64.Vec2, radius float64, col color.RGBA, num_segments int, ...)
- func (d *DrawList) AddCircleFilled(centre f64.Vec2, radius float64, col color.RGBA)
- func (d *DrawList) AddCircleFilledEx(centre f64.Vec2, radius float64, col color.RGBA, num_segments int)
- func (d *DrawList) AddConvexPolyFilled(points []f64.Vec2, col color.RGBA)
- func (d *DrawList) AddDrawCmd()
- func (d *DrawList) AddImage(user_texture_id TextureID, a, b f64.Vec2)
- func (d *DrawList) AddImageEx(user_texture_id TextureID, a, b, uv_a, uv_b f64.Vec2, col color.RGBA)
- func (d *DrawList) AddImageQuad(user_texture_id TextureID, a, b, c, d_ f64.Vec2)
- func (d *DrawList) AddImageQuadEx(user_texture_id TextureID, a, b, c, d_, uv_a, uv_b, uv_c, uv_d f64.Vec2, ...)
- func (d *DrawList) AddImageRounded(user_texture_id TextureID, a, b, uv_a, uv_b f64.Vec2, col color.RGBA, ...)
- func (d *DrawList) AddImageRoundedEx(user_texture_id TextureID, a, b, uv_a, uv_b f64.Vec2, col color.RGBA, ...)
- func (d *DrawList) AddLine(a, b f64.Vec2, col color.RGBA)
- func (d *DrawList) AddLineEx(a, b f64.Vec2, col color.RGBA, thickness float64)
- func (d *DrawList) AddPolyline(points []f64.Vec2, col color.RGBA, closed bool, thickness float64)
- func (d *DrawList) AddRect(p_min, p_max f64.Vec2, col color.RGBA)
- func (d *DrawList) AddRectDx(p_min, p_max f64.Vec2, col color.RGBA, rounding float64)
- func (d *DrawList) AddRectEx(a, b f64.Vec2, col color.RGBA, rounding float64, ...)
- func (d *DrawList) AddRectFilled(p_min, p_max f64.Vec2, col color.RGBA)
- func (d *DrawList) AddRectFilledEx(a, b f64.Vec2, col color.RGBA, rounding float64, ...)
- func (d *DrawList) AddRectFilledMultiColor(a, c f64.Vec2, ...)
- func (d *DrawList) AddText(pos f64.Vec2, col color.RGBA, text string)
- func (d *DrawList) AddTextEx(font *Font, font_size float64, pos f64.Vec2, col color.RGBA, text string, ...)
- func (d *DrawList) AddTriangle(a, b, c f64.Vec2, col color.RGBA)
- func (d *DrawList) AddTriangleEx(a, b, c f64.Vec2, col color.RGBA, thickness float64)
- func (d *DrawList) AddTriangleFilled(a, b, c f64.Vec2, col color.RGBA)
- func (d *DrawList) ChannelsMerge()
- func (d *DrawList) ChannelsSetCurrent(idx int)
- func (d *DrawList) ChannelsSplit(channels_count int)
- func (d *DrawList) Clear()
- func (d *DrawList) GetCurrentClipRect() f64.Vec4
- func (d *DrawList) GetCurrentTextureId() TextureID
- func (d *DrawList) Init(shared_data *DrawListSharedData)
- func (d *DrawList) PathArcTo(centre f64.Vec2, radius, a_min, a_max float64, num_segments int)
- func (d *DrawList) PathArcToFast(centre f64.Vec2, radius float64, a_min_of_12, a_max_of_12 int)
- func (d *DrawList) PathBezierCurveTo(p2, p3, p4 f64.Vec2, num_segments int)
- func (d *DrawList) PathBezierToCasteljau(path *[]f64.Vec2, x1, y1, x2, y2, x3, y3, x4, y4, tess_tol float64, level int)
- func (d *DrawList) PathClear()
- func (d *DrawList) PathFillConvex(col color.RGBA)
- func (d *DrawList) PathLineTo(pos f64.Vec2)
- func (d *DrawList) PathRect(a, b f64.Vec2, rounding float64, rounding_corners DrawCornerFlags)
- func (d *DrawList) PathStroke(col color.RGBA, closed bool)
- func (d *DrawList) PathStrokeEx(col color.RGBA, closed bool, thickness float64)
- func (d *DrawList) PopClipRect()
- func (d *DrawList) PopTextureID()
- func (d *DrawList) PrimQuadUV(a, b, c, d_, uv_a, uv_b, uv_c, uv_d f64.Vec2, col color.RGBA)
- func (d *DrawList) PrimRect(a, c f64.Vec2, col color.RGBA)
- func (d *DrawList) PrimRectUV(a, c, uv_a, uv_c f64.Vec2, col color.RGBA)
- func (d *DrawList) PrimReserve(idx_count, vtx_count int)
- func (d *DrawList) PrimVtx(pos, uv f64.Vec2, col color.RGBA)
- func (d *DrawList) PrimWriteIdx(idx DrawIdx)
- func (d *DrawList) PrimWriteVtx(pos, uv f64.Vec2, col color.RGBA)
- func (d *DrawList) PushClipRect(cr_min, cr_max f64.Vec2)
- func (d *DrawList) PushClipRectEx(cr_min, cr_max f64.Vec2, intersect_with_current_clip_rect bool)
- func (d *DrawList) PushClipRectFullScreen()
- func (d *DrawList) PushTextureID(texture_id TextureID)
- func (d *DrawList) ShadeVertsLinearUV(vert_start, vert_end int, a, b, uv_a, uv_b f64.Vec2, clamp bool)
- func (d *DrawList) UpdateClipRect()
- func (d *DrawList) UpdateTextureID()
- type DrawListFlags
- type DrawListSharedData
- type DrawVert
- type FocusedFlags
- type Font
- func (f *Font) AddGlyph(codepoint rune, x0, y0, x1, y1, u0, v0, u1, v1, advance_x float64)
- func (f *Font) AddRemapChar(dst, src rune, overwrite_dst bool)
- func (f *Font) BuildLookupTable()
- func (f *Font) CalcTextSizeA(size, max_width, wrap_width float64, text string) (text_size f64.Vec2, remaining int)
- func (f *Font) CalcWordWrapPositionA(scale float64, text string, wrap_width float64) int
- func (f *Font) ClearOutputData()
- func (f *Font) FindGlyph(c rune) *FontGlyph
- func (f *Font) FindGlyphNoFallback(c rune) *FontGlyph
- func (f *Font) GetCharAdvance(c rune) float64
- func (f *Font) GetDebugName() string
- func (f *Font) GrowIndex(new_size int)
- func (f *Font) Init()
- func (f *Font) IsLoaded() bool
- func (f *Font) RenderChar(draw_list *DrawList, size float64, pos f64.Vec2, col color.RGBA, c rune)
- func (f *Font) RenderText(draw_list *DrawList, size float64, pos f64.Vec2, col color.RGBA, ...)
- func (f *Font) SetFallbackChar(c rune)
- type FontAtlas
- func (f *FontAtlas) AddCustomRectRegular(id, width, height uint) int
- func (f *FontAtlas) AddFont(font_cfg *FontConfig) *Font
- func (f *FontAtlas) AddFontDefault(font_cfg_template *FontConfig) *Font
- func (f *FontAtlas) AddFontFromMemoryCompressedBase85TTF(compressed_ttf_data_base85 []byte, size_pixels float64, font_cfg *FontConfig, ...) *Font
- func (f *FontAtlas) AddFontFromMemoryCompressedTTF(compressed_ttf_data []byte, size_pixels float64, font_cfg_template *FontConfig, ...) *Font
- func (f *FontAtlas) AddFontFromMemoryTTF(ttf_data []byte, size_pixels float64, font_cfg_template *FontConfig, ...) *Font
- func (f *FontAtlas) Build() error
- func (f *FontAtlas) BuildFinish()
- func (f *FontAtlas) BuildMultiplyCalcLookupTable(out_table []uint8, in_brighten_factor float64)
- func (f *FontAtlas) BuildMultiplyRectAlpha8(table, pixels []byte, x, y, w, h, stride int)
- func (f *FontAtlas) BuildPackCustomRects(spc *stbtt.PackContext)
- func (f *FontAtlas) BuildRenderDefaultTexData()
- func (f *FontAtlas) BuildSetupFont(font *Font, font_config []FontConfig, ascent, descent float64)
- func (f *FontAtlas) BuildWithStbTruetype() error
- func (f *FontAtlas) CalcCustomRectUV(rect *CustomRect) (out_uv_min, out_uv_max f64.Vec2)
- func (f *FontAtlas) ClearTexData()
- func (f *FontAtlas) FontAtlasBuildRegisterDefaultCustomRects()
- func (f *FontAtlas) GetGlyphRangesDefault() []rune
- func (f *FontAtlas) GetMouseCursorTexData(cursor_type MouseCursor, out_offset, out_size *f64.Vec2, ...) bool
- func (f *FontAtlas) GetTexDataAsAlpha8() (out_pixels []byte, out_width, out_height, out_bytes_per_pixel int)
- func (f *FontAtlas) GetTexDataAsRGBA32() (out_pixels []byte, out_width, out_height, out_bytes_per_pixel int)
- func (f *FontAtlas) Init()
- type FontAtlasFlags
- type FontConfig
- type FontGlyph
- type GroupData
- type HoveredFlags
- type ID
- type IO
- type InputReadMode
- type InputSource
- type InputTextFlags
- type ItemFlags
- type ItemHoveredDataBackup
- type ItemStatusFlags
- type Key
- type LayoutType
- type ListClipper
- type MenuColumns
- type MouseCursor
- type NavDirSourceFlags
- type NavForward
- type NavHighlightFlags
- type NavInput
- type NavMoveResult
- type NextWindowData
- type Payload
- type PlotType
- type PopupPositionPolicy
- type PopupRef
- type ResizeGripDef
- type SelectableFlags
- type SeparatorFlags
- type SettingsHandler
- type SizeCallbackData
- type SliderFlags
- type Style
- type StyleMod
- type StyleVar
- type TextEditCallback
- type TextEditCallbackData
- type TextEditState
- func (t *TextEditState) ClearSelection()
- func (t *TextEditState) CursorAnimReset()
- func (t *TextEditState) CursorClamp()
- func (t *TextEditState) DeleteChars(pos, n int)
- func (t *TextEditState) GetChar(idx int) rune
- func (t *TextEditState) GetWidth(line_start_idx, char_idx int) float64
- func (t *TextEditState) HasSelection() bool
- func (t *TextEditState) Init(ctx *Context)
- func (t *TextEditState) InsertChars(pos int, new_text []rune) bool
- func (t *TextEditState) LayoutRow(r *stbte.TextEditRow, line_start_idx int)
- func (t *TextEditState) Len() int
- func (t *TextEditState) MoveWordLeft(idx int) int
- func (t *TextEditState) MoveWordRight(idx int) int
- func (t *TextEditState) OnKeyPressed(key int)
- func (t *TextEditState) SelectAll()
- type TextFilter
- type TextureID
- type TreeNodeFlags
- type Window
- func (w *Window) CalcFontSize() float64
- func (w *Window) GetID(str string) ID
- func (w *Window) GetIDFromRectangle(r_abs f64.Rectangle) ID
- func (w *Window) GetIDNoKeepAlive(str string) ID
- func (w *Window) GetIntID(n int) ID
- func (w *Window) GetWindowBgColorIdxFromFlags(flags WindowFlags) Col
- func (w *Window) Init(ctx *Context, name string)
- func (w *Window) MenuBarHeight() float64
- func (w *Window) MenuBarRect() f64.Rectangle
- func (w *Window) Rect() f64.Rectangle
- func (w *Window) TitleBarHeight() float64
- func (w *Window) TitleBarRect() f64.Rectangle
- type WindowFlags
- type WindowSettings
Constants ¶
const ( FONT_ATLAS_DEFAULT_TEX_DATA_W_HALF = 90 FONT_ATLAS_DEFAULT_TEX_DATA_H = 27 FONT_ATLAS_DEFAULT_TEX_DATA_ID = 0x80000000 )
A work of art lies ahead! (. = white layer, X = black layer, others are blank) The white texels on the top left are the ones we'll use everywhere in ImGui to render filled shapes.
const ( PlotTypeLines = iota PlotTypeHistogram )
Variables ¶
var FONT_ATLAS_DEFAULT_TEX_CURSOR_DATA = [MouseCursorCOUNT][3]f64.Vec2{ {f64.Vec2{0, 3}, f64.Vec2{12, 19}, f64.Vec2{0, 0}}, {f64.Vec2{13, 0}, f64.Vec2{7, 16}, f64.Vec2{4, 8}}, {f64.Vec2{31, 0}, f64.Vec2{23, 23}, f64.Vec2{11, 11}}, {f64.Vec2{21, 0}, f64.Vec2{9, 23}, f64.Vec2{5, 11}}, {f64.Vec2{55, 18}, f64.Vec2{23, 9}, f64.Vec2{11, 5}}, {f64.Vec2{73, 0}, f64.Vec2{17, 17}, f64.Vec2{9, 9}}, {f64.Vec2{55, 0}, f64.Vec2{17, 17}, f64.Vec2{9, 9}}, }
var FONT_ATLAS_DEFAULT_TEX_DATA_PIXELS = []byte(
"..- -XXXXXXX- X - X -XXXXXXX - XXXXXXX" +
"..- -X.....X- X.X - X.X -X.....X - X.....X" +
"--- -XXX.XXX- X...X - X...X -X....X - X....X" +
"X - X.X - X.....X - X.....X -X...X - X...X" +
"XX - X.X -X.......X- X.......X -X..X.X - X.X..X" +
"X.X - X.X -XXXX.XXXX- XXXX.XXXX -X.X X.X - X.X X.X" +
"X..X - X.X - X.X - X.X -XX X.X - X.X XX" +
"X...X - X.X - X.X - XX X.X XX - X.X - X.X " +
"X....X - X.X - X.X - X.X X.X X.X - X.X - X.X " +
"X.....X - X.X - X.X - X..X X.X X..X - X.X - X.X " +
"X......X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X XX-XX X.X " +
"X.......X - X.X - X.X -X.....................X- X.X X.X-X.X X.X " +
"X........X - X.X - X.X - X...XXXXXX.XXXXXX...X - X.X..X-X..X.X " +
"X.........X -XXX.XXX- X.X - X..X X.X X..X - X...X-X...X " +
"X..........X-X.....X- X.X - X.X X.X X.X - X....X-X....X " +
"X......XXXXX-XXXXXXX- X.X - XX X.X XX - X.....X-X.....X " +
"X...X..X --------- X.X - X.X - XXXXXXX-XXXXXXX " +
"X..X X..X - -XXXX.XXXX- XXXX.XXXX ------------------------------------" +
"X.X X..X - -X.......X- X.......X - XX XX - " +
"XX X..X - - X.....X - X.....X - X.X X.X - " +
" X..X - X...X - X...X - X..X X..X - " +
" XX - X.X - X.X - X...XXXXXXXXXXXXX...X - " +
"------------ - X - X -X.....................X- " +
" ----------------------------------- X...XXXXXXXXXXXXX...X - " +
" - X..X X..X - " +
" - X.X X.X - " +
" - XX XX - ")
Functions ¶
func CharIsSpace ¶
func DataTypeApplyOp ¶
func DataTypeApplyOp(op int, output, arg1, arg2 interface{})
func DataTypeApplyOpFromText ¶
func DataTypeApplyOpFromText(buf []byte, initial_value_buf string, data interface{}, scalar_format string) bool
User can input math operators (e.g. +100) to edit a numerical values. NB: This is _not_ a full expression evaluator. We should probably add one though..
func DataTypeFormatString ¶
func Decode85Byte ¶
func F32_TO_INT8_UNBOUND ¶
func GetDefaultCompressedFontDataTTFBase85 ¶
func GetDefaultCompressedFontDataTTFBase85() []byte
func ImeSetInputScreenPosFn_DefaultImpl ¶
func ImeSetInputScreenPosFn_DefaultImpl(x, y int)
func ParseFormatPrecision ¶
Parse display precision back from the display format string FIXME: This is still used by some navigation code path to infer a minimum tweak step, but we should aim to rework widgets so it isn't needed.
func ParseFormatTrimDecorations ¶
Extract the format out of a format string with leading or trailing decorations
fmt = "blah blah" -> return fmt fmt = "%.3f" -> return fmt fmt = "hello %.3f" -> return fmt + 6 fmt = "%.3f hello" -> return buf written with "%.3f"
func RoundScalarWithFormat ¶
func TriangleContainsPoint ¶
func UpperPowerOfTwo ¶
Types ¶
type BackendFlags ¶
type BackendFlags int
const ( BackendFlagsHasGamepad BackendFlags = 1 << 0 // Back-end supports and has a connected gamepad. BackendFlagsHasMouseCursors BackendFlags = 1 << 1 // Back-end supports reading GetMouseCursor() to change the OS cursor shape. BackendFlagsHasSetMousePos BackendFlags = 1 << 2 // Back-end supports io.WantSetMousePos requests to reposition the OS mouse position (only used if ImGuiConfigFlags_NavEnableSetMousePos is set). )
type ButtonFlags ¶
type ButtonFlags int
const ( ButtonFlagsRepeat ButtonFlags = 1 << 0 // hold to repeat ButtonFlagsPressedOnClickRelease ButtonFlags = 1 << 1 // return true on click + release on same item [DEFAULT if no PressedOn* flag is set] ButtonFlagsPressedOnClick ButtonFlags = 1 << 2 // return true on click (default requires click+release) ButtonFlagsPressedOnRelease ButtonFlags = 1 << 3 // return true on release (default requires click+release) ButtonFlagsPressedOnDoubleClick ButtonFlags = 1 << 4 // return true on double-click (default requires click+release) ButtonFlagsFlattenChildren ButtonFlags = 1 << 5 // allow interactions even if a child window is overlapping ButtonFlagsAllowItemOverlap ButtonFlags = 1 << 6 // require previous frame HoveredId to either match id or be null before being usable use along with SetItemAllowOverlap() ButtonFlagsDontClosePopups ButtonFlags = 1 << 7 // disable automatically closing parent popup on press // [UNUSED] ButtonFlagsDisabled ButtonFlags = 1 << 8 // disable interactions ButtonFlagsAlignTextBaseLine ButtonFlags = 1 << 9 // vertically align button to match text baseline - ButtonEx() only // FIXME: Should be removed and handled by SmallButton() not possible currently because of DC.CursorPosPrevLine ButtonFlagsNoKeyModifiers ButtonFlags = 1 << 10 // disable interaction if a key modifier is held ButtonFlagsNoHoldingActiveID ButtonFlags = 1 << 11 // don't set ActiveId while holding the mouse (ButtonFlagsPressedOnClick only) ButtonFlagsPressedOnDragDropHold ButtonFlags = 1 << 12 // press when held into while we are drag and dropping another item (used by e.g. tree nodes collapsing headers) )
type Col ¶
type Col int
const ( ColText Col = iota ColTextDisabled ColWindowBg // Background of normal windows ColChildBg // Background of child windows ColPopupBg // Background of popups menus tooltips windows ColBorder ColBorderShadow ColFrameBg // Background of checkbox radio button plot slider text input ColFrameBgHovered ColFrameBgActive ColTitleBg ColTitleBgActive ColTitleBgCollapsed ColMenuBarBg ColScrollbarBg ColScrollbarGrab ColScrollbarGrabHovered ColScrollbarGrabActive ColCheckMark ColSliderGrab ColSliderGrabActive ColButton ColButtonHovered ColButtonActive ColHeader ColHeaderHovered ColHeaderActive ColSeparator ColSeparatorHovered ColSeparatorActive ColResizeGrip ColResizeGripHovered ColResizeGripActive ColPlotLines ColPlotLinesHovered ColPlotHistogram ColPlotHistogramHovered ColTextSelectedBg ColModalWindowDarkening // Darken/colorize entire screen behind a modal window, when one is active ColDragDropTarget ColCOUNT )
type ColorEditFlags ¶
type ColorEditFlags int
const ( ColorEditFlagsNoAlpha ColorEditFlags = 1 << 1 // // ColorEdit ColorPicker ColorButton: ignore Alpha component (read 3 components from the input pointer). ColorEditFlagsNoPicker ColorEditFlags = 1 << 2 // // ColorEdit: disable picker when clicking on colored square. ColorEditFlagsNoOptions ColorEditFlags = 1 << 3 // // ColorEdit: disable toggling options menu when right-clicking on inputs/small preview. ColorEditFlagsNoSmallPreview ColorEditFlags = 1 << 4 // // ColorEdit ColorPicker: disable colored square preview next to the inputs. (e.g. to show only the inputs) ColorEditFlagsNoInputs ColorEditFlags = 1 << 5 // // ColorEdit ColorPicker: disable inputs sliders/text widgets (e.g. to show only the small preview colored square). ColorEditFlagsNoTooltip ColorEditFlags = 1 << 6 // // ColorEdit ColorPicker ColorButton: disable tooltip when hovering the preview. ColorEditFlagsNoLabel ColorEditFlags = 1 << 7 // // ColorEdit ColorPicker: disable display of inline text label (the label is still forwarded to the tooltip and picker). ColorEditFlagsNoSidePreview ColorEditFlags = 1 << 8 // // ColorPicker: disable bigger color preview on right side of the picker use small colored square preview instead. // User Options (right-click on widget to change some of them). You can set application defaults using SetColorEditOptions(). The idea is that you probably don't want to override them in most of your calls let the user choose and/or call SetColorEditOptions() during startup. ColorEditFlagsAlphaBar ColorEditFlags = 1 << 9 // // ColorEdit ColorPicker: show vertical alpha bar/gradient in picker. ColorEditFlagsAlphaPreview ColorEditFlags = 1 << 10 // // ColorEdit ColorPicker ColorButton: display preview as a transparent color over a checkerboard instead of opaque. ColorEditFlagsAlphaPreviewHalf ColorEditFlags = 1 << 11 // // ColorEdit ColorPicker ColorButton: display half opaque / half checkerboard instead of opaque. ColorEditFlagsHDR ColorEditFlags = 1 << 12 // // (WIP) ColorEdit: Currently only disable 0.0f..1.0f limits in RGBA edition (note: you probably want to use ColorEditFlagsFloat flag as well). ColorEditFlagsRGB ColorEditFlags = 1 << 13 // [Inputs] // ColorEdit: choose one among RGB/HSV/HEX. ColorPicker: choose any combination using RGB/HSV/HEX. ColorEditFlagsHSV ColorEditFlags = 1 << 14 // [Inputs] // " ColorEditFlagsHEX ColorEditFlags = 1 << 15 // [Inputs] // " ColorEditFlagsUint8 ColorEditFlags = 1 << 16 // [DataType] // ColorEdit ColorPicker ColorButton: _display_ values formatted as 0..255. ColorEditFlagsFloat ColorEditFlags = 1 << 17 // [DataType] // ColorEdit ColorPicker ColorButton: _display_ values formatted as 0.0f..1.0f floats instead of 0..255 integers. No round-trip of value via integers. ColorEditFlagsPickerHueBar ColorEditFlags = 1 << 18 // [PickerMode] // ColorPicker: bar for Hue rectangle for Sat/Value. ColorEditFlagsPickerHueWheel ColorEditFlags = 1 << 19 // [PickerMode] // ColorPicker: wheel for Hue triangle for Sat/Value. // Internals/Masks ColorEditFlags_InputsMask ColorEditFlags = ColorEditFlagsRGB | ColorEditFlagsHSV | ColorEditFlagsHEX ColorEditFlags_DataTypeMask ColorEditFlags = ColorEditFlagsUint8 | ColorEditFlagsFloat ColorEditFlags_PickerMask ColorEditFlags = ColorEditFlagsPickerHueWheel | ColorEditFlagsPickerHueBar ColorEditFlags_OptionsDefault ColorEditFlags = ColorEditFlagsUint8 | ColorEditFlagsRGB | ColorEditFlagsPickerHueBar // Change application default using SetColorEditOptions() )
type ColumnData ¶
type ColumnData struct {
OffsetNorm float64 // Column start offset, normalized 0.0 (far left) -> 1.0 (far right)
OffsetNormBeforeResize float64
Flags ColumnsFlags // Not exposed
ClipRect f64.Rectangle
}
func (*ColumnData) Init ¶
func (c *ColumnData) Init()
type ColumnsFlags ¶
type ColumnsFlags int
const ( // Default: 0 ColumnsFlagsNoBorder ColumnsFlags = 1 << 0 // Disable column dividers ColumnsFlagsNoResize ColumnsFlags = 1 << 1 // Disable resizing columns when clicking on the dividers ColumnsFlagsNoPreserveWidths ColumnsFlags = 1 << 2 // Disable column width preservation when adjusting columns ColumnsFlagsNoForceWithinWindow ColumnsFlags = 1 << 3 // Disable forcing columns to fit within window ColumnsFlagsGrowParentContentsSize ColumnsFlags = 1 << 4 // (WIP) Restore pre-1.51 behavior of extending the parent window contents size but _without affecting the columns width at all_. Will eventually remove. )
type ColumnsSet ¶
type ColumnsSet struct {
ID ID
Flags ColumnsFlags
IsFirstFrame bool
IsBeingResized bool
Current int
Count int
MinX, MaxX float64
LineMinY, LineMaxY float64
StartPosY float64
StartMaxPosX float64 // Backup of CursorMaxPos
CellMinY, CellMaxY float64
Columns []ColumnData
}
func (*ColumnsSet) Clear ¶
func (c *ColumnsSet) Clear()
func (*ColumnsSet) Init ¶
func (c *ColumnsSet) Init()
type ComboFlags ¶
type ComboFlags int
const ( ComboFlagsPopupAlignLeft ComboFlags = 1 << 0 // Align the popup toward the left by default ComboFlagsHeightSmall ComboFlags = 1 << 1 // Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo() ComboFlagsHeightRegular ComboFlags = 1 << 2 // Max ~8 items visible (default) ComboFlagsHeightLarge ComboFlags = 1 << 3 // Max ~20 items visible ComboFlagsHeightLargest ComboFlags = 1 << 4 // As many fitting items as possible ComboFlagsNoArrowButton ComboFlags = 1 << 5 // Display on the preview box without the square arrow button ComboFlagsNoPreview ComboFlags = 1 << 6 // Display only a square arrow button ComboFlagsHeightMask_ ComboFlags = ComboFlagsHeightSmall | ComboFlagsHeightRegular | ComboFlagsHeightLarge | ComboFlagsHeightLargest )
type Cond ¶
type Cond int
const ( CondAlways Cond = 1 << 0 // Set the variable CondOnce Cond = 1 << 1 // Set the variable once per runtime session (only the first call with succeed) CondFirstUseEver Cond = 1 << 2 // Set the variable if the window has no saved data (if doesn't exist in the .ini file) CondAppearing Cond = 1 << 3 // Set the variable if the window is appearing after being hidden/inactive (or the first time) )
type ConfigFlags ¶
type ConfigFlags uint
const ( ConfigFlagsNoMouse ConfigFlags = 1 << 4 // Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information back-end ConfigFlagsNoMouseCursorChange ConfigFlags = 1 << 5 // Instruct back-end to not alter mouse cursor shape and visibility. // User storage (to allow your back-end/engine to communicate to code that may be shared between multiple projects. Those flags are not used by core ImGui) ConfigFlagsIsSRGB ConfigFlags = 1 << 20 // Back-end is SRGB-aware. ConfigFlagsIsTouchScreen ConfigFlags = 1 << 21 // Back-end is using a touch screen instead of a mouse. )
type Context ¶
type Context struct {
Initialized bool
FontAtlasOwnedByContext bool // Io.Fonts-> is owned by the ImGuiContext and will be destructed along with it.
IO IO
Style Style
Font *Font // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back()
FontSize float64 // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window.
FontBaseSize float64 // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height.
Time float64
FrameCount int
FrameCountEnded int
FrameCountRendered int
Windows []*Window
WindowsSortBuffer []*Window
CurrentWindowStack []*Window
WindowsById map[string]*Window
WindowsActiveCount int
CurrentWindow *Window // Being drawn into
HoveredWindow *Window // Will catch mouse inputs
HoveredRootWindow *Window // Will catch mouse inputs (for focus/move only)
HoveredId ID // Hovered widget
HoveredIdAllowOverlap bool
HoveredIdPreviousFrame ID
HoveredIdTimer float64
ActiveId ID // Active widget
ActiveIdPreviousFrame ID
ActiveIdTimer float64
ActiveIdIsAlive bool // Active widget has been seen this frame
ActiveIdIsJustActivated bool // Set at the time of activation for one frame
ActiveIdAllowOverlap bool // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always)
ActiveIdClickOffset f64.Vec2 // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior)
ActiveIdWindow *Window
ActiveIdSource InputSource // Activating with mouse or nav (gamepad/keyboard)
MovingWindow *Window // Track the window we clicked on (in order to preserve focus). The actually window that is moved is generally MovingWindow->RootWindow.
ColorModifiers []ColMod // Stack for PushStyleColor()/PopStyleColor()
StyleModifiers []StyleMod // Stack for PushStyleVar()/PopStyleVar()
FontStack []*Font // Stack for PushFont()/PopFont()
OpenPopupStack []PopupRef // Which popups are open (persistent)
CurrentPopupStack []PopupRef // Which level of BeginPopup() we are in (reset every frame)
NextWindowData NextWindowData // Storage for SetNextWindow** functions
NextTreeNodeOpenVal bool // Storage for SetNextTreeNode** functions
NextTreeNodeOpenCond Cond
// Navigation data (for gamepad/keyboard)
func CreateContext ¶
func CreateContext() *Context
func CreateContextEx ¶
func (*Context) AddDrawListToDrawData ¶
func (*Context) AddWindowSettings ¶
func (c *Context) AddWindowSettings(name string) *WindowSettings
func (*Context) AddWindowToDrawData ¶
func (*Context) AddWindowToDrawDataSelectLayer ¶
func (*Context) AddWindowToSortedBuffer ¶
func (*Context) AlignTextToFramePadding ¶
func (c *Context) AlignTextToFramePadding()
func (*Context) BeginChild ¶
func (*Context) BeginChildEx ¶
func (*Context) BeginChildFrame ¶
func (*Context) BeginChildID ¶
func (*Context) BeginChildIDEx ¶
func (*Context) BeginColumns ¶
func (c *Context) BeginColumns(str_id string, columns_count int, flags ColumnsFlags)
func (*Context) BeginCombo ¶
func (*Context) BeginComboEx ¶
func (c *Context) BeginComboEx(label, preview_value string, flags ComboFlags) bool
func (*Context) BeginDragDropSource ¶
func (*Context) BeginDragDropTarget ¶
We don't use BeginDragDropTargetCustom() and duplicate its code because: 1) we use LastItemRectHoveredRect which handles items that pushes a temporarily clip rectangle in their code. Calling BeginDragDropTargetCustom(LastItemRect) would not handle them. 2) and it's faster. as this code may be very frequently called, we want to early out as fast as we can. Also note how the HoveredWindow test is positioned differently in both functions (in both functions we optimize for the cheapest early out case)
func (*Context) BeginDragDropTargetCustom ¶
func (*Context) BeginEx ¶
func (c *Context) BeginEx(name string, p_open *bool, flags WindowFlags) bool
Push a new ImGui window to add widgets to.
- A default window called "Debug" is automatically stacked at the beginning of every frame so you can use widgets without explicitly calling a Begin/End pair.
- Begin/End can be called multiple times during the frame with the same window name to append content.
- The window name is used as a unique identifier to preserve window information across frames (and save rudimentary information to the .ini file). You can use the "##" or "###" markers to use the same label with different id, or same id with different label. See documentation at the top of this file.
- Return false when window is collapsed, so you can early out in your code. You always need to call ImGui::End() even if false is returned.
- Passing 'bool* p_open' displays a Close button on the upper-right corner of the window, the pointed value will be set to false when the button is pressed.
func (*Context) BeginGroup ¶
func (c *Context) BeginGroup()
Lock horizontal starting position + capture group bounding box into one "item" (so you can use IsItemHovered() or layout primitives such as SameLine() on whole group, etc.)
func (*Context) BeginMainMenuBar ¶
For the main menu bar, which cannot be moved, we honor g.Style.DisplaySafeAreaPadding to ensure text can be visible on a TV set.
func (*Context) BeginMenuBar ¶
func (*Context) BeginPopup ¶
func (*Context) BeginPopupContextItem ¶
func (*Context) BeginPopupContextItemEx ¶
This is a helper to handle the simplest case of associating one named popup to one given widget. You may want to handle this on user side if you have specific needs (e.g. tweaking IsItemHovered() parameters). You can pass a NULL str_id to use the identifier of the last item.
func (*Context) BeginPopupContextWindow ¶
func (*Context) BeginPopupContextWindowEx ¶
func (*Context) BeginPopupEx ¶
func (c *Context) BeginPopupEx(id ID, extra_flags WindowFlags) bool
func (*Context) BeginPopupModal ¶
func (*Context) BeginPopupModalEx ¶
func (c *Context) BeginPopupModalEx(name string, p_open *bool, flags WindowFlags) bool
func (*Context) BeginPopupWindow ¶
func (c *Context) BeginPopupWindow(str_id string, flags WindowFlags) bool
func (*Context) BeginTooltip ¶
func (c *Context) BeginTooltip()
func (*Context) BeginTooltipEx ¶
func (c *Context) BeginTooltipEx(extra_flags WindowFlags, override_previous_tooltip bool)
func (*Context) BringWindowToFront ¶
func (*Context) BulletText ¶
Text with a little bullet aligned to the typical tree node.
func (*Context) ButtonBehavior ¶
func (*Context) CalcItemSize ¶
func (*Context) CalcItemWidth ¶
func (*Context) CalcListClipping ¶
func (c *Context) CalcListClipping(items_count int, items_height float64) (out_items_display_start int, out_items_display_end int)
Helper to calculate coarse clipping of large list of evenly sized items. NB: Prefer using the ImGuiListClipper higher-level helper if you can! Read comments and instructions there on how those use this sort of pattern. NB: 'items_count' is only used to clamp the result, if you don't know your count you can use INT_MAX
func (*Context) CalcMaxPopupHeightFromItemCount ¶
func (*Context) CalcNextScrollFromScrollTargetAndClamp ¶
func (*Context) CalcResizePosSizeFromAnyCorner ¶
func (*Context) CalcSizeAfterConstraint ¶
func (*Context) CalcSizeAutoFit ¶
func (*Context) CalcTextSizeEx ¶
func (c *Context) CalcTextSizeEx(text string, hide_text_after_double_hash bool, wrap_width float64) f64.Vec2
Calculate text size. Text can be multi-line. Optionally ignore text after a ## marker. CalcTextSize("") should return ImVec2(0.0f, GImGui->FontSize)
func (*Context) CalcTypematicPressedRepeatAmount ¶
func (*Context) CalcWrapWidthForPos ¶
func (*Context) CaptureKeyboardFromApp ¶
func (*Context) CaptureMouseFromApp ¶
func (*Context) CheckboxFlags ¶
func (*Context) ClearActiveID ¶
func (c *Context) ClearActiveID()
func (*Context) ClearDragDrop ¶
func (c *Context) ClearDragDrop()
func (*Context) CloseButton ¶
Button to close a window
func (*Context) CloseCurrentPopup ¶
func (c *Context) CloseCurrentPopup()
func (*Context) ClosePopup ¶
func (*Context) ClosePopupToLevel ¶
func (*Context) ClosePopupsOverWindow ¶
func (*Context) CollapsingHeader ¶
func (*Context) CollapsingHeaderEx ¶
func (c *Context) CollapsingHeaderEx(label string, flags TreeNodeFlags) bool
func (*Context) CollapsingHeaderOpen ¶
func (*Context) CollapsingHeaderOpenEx ¶
func (c *Context) CollapsingHeaderOpenEx(label string, p_open *bool, flags TreeNodeFlags) bool
func (*Context) ColorButtonEx ¶
func (*Context) ColorButtonVEx ¶
func (*Context) ColorEdit3Ex ¶
func (*Context) ColorEdit4Ex ¶
func (*Context) ColorEditOptionsPopup ¶
func (c *Context) ColorEditOptionsPopup(col color.RGBA, flags ColorEditFlags)
func (*Context) ColorEditOptionsPopupV ¶
func (c *Context) ColorEditOptionsPopupV(col f64.Vec4, flags ColorEditFlags)
func (*Context) ColorEditV3Ex ¶
func (*Context) ColorEditV4Ex ¶
Edit colors components (each component in 0.0f..1.0f range). See enum ImGuiColorEditFlags_ for available options. e.g. Only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. With typical options: Left-click on colored square to open color picker. Right-click to open option menu. CTRL-Click over input fields to edit them and TAB to go to next item.
func (*Context) ColorPicker3Ex ¶
func (*Context) ColorPicker4Ex ¶
func (*Context) ColorPickerOptionsPopup ¶
func (c *Context) ColorPickerOptionsPopup(flags ColorEditFlags, ref_col *color.RGBA)
func (*Context) ColorPickerOptionsPopupV ¶
func (c *Context) ColorPickerOptionsPopupV(flags ColorEditFlags, ref_col *f64.Vec4)
func (*Context) ColorPickerV3Ex ¶
func (*Context) ColorPickerV4Ex ¶
func (c *Context) ColorPickerV4Ex(label string, col *f64.Vec4, flags ColorEditFlags, ref_col *f64.Vec4) bool
ColorPicker Note: only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set. FIXME: we adjust the big color square height based on item width, which may cause a flickering feedback loop (if automatic height makes a vertical scrollbar appears, affecting automatic width..)
func (*Context) ColorTooltip ¶
func (c *Context) ColorTooltip(text string, col color.RGBA, flags ColorEditFlags)
func (*Context) ColorTooltipV ¶
func (c *Context) ColorTooltipV(text string, col f64.Vec4, flags ColorEditFlags)
Note: only access 3 floats if ImGuiColorEditFlags_NoAlpha flag is set.
func (*Context) Columns ¶
[2018-03: This is currently the only public API, while we are working on making BeginColumns/EndColumns user-facing]
func (*Context) ComboItemEx ¶
func (*Context) ComboString ¶
func (*Context) ComboStringEx ¶
func (*Context) CreateNewWindow ¶
func (*Context) DragBehavior ¶
func (*Context) DragFloat2Ex ¶
func (*Context) DragFloat3Ex ¶
func (*Context) DragFloat4Ex ¶
func (*Context) DragFloatEx ¶
func (*Context) DragFloatN ¶
func (*Context) DragFloatRange2 ¶
func (*Context) DragFloatRange2Ex ¶
func (*Context) DragInt2Ex ¶
func (*Context) DragInt3Ex ¶
func (*Context) DragInt4Ex ¶
func (*Context) DragIntEx ¶
func (c *Context) DragIntEx(label string, v *int, v_speed float64, v_min, v_max int, format string) bool
NB: v_speed is float to allow adjusting the drag speed with more precision
func (*Context) DragIntRange2 ¶
func (*Context) DragIntRange2Ex ¶
func (*Context) EndChildFrame ¶
func (c *Context) EndChildFrame()
func (*Context) EndColumns ¶
func (c *Context) EndColumns()
func (*Context) EndDragDropSource ¶
func (c *Context) EndDragDropSource()
func (*Context) EndDragDropTarget ¶
func (c *Context) EndDragDropTarget()
We don't really use/need this now, but added it for the sake of consistency and because we might need it later.
func (*Context) EndFrame ¶
func (c *Context) EndFrame()
This is normally called by Render(). You may want to call it directly if you want to avoid calling Render() but the gain will be very minimal.
func (*Context) EndMainMenuBar ¶
func (c *Context) EndMainMenuBar()
func (*Context) EndMenuBar ¶
func (c *Context) EndMenuBar()
func (*Context) EndTooltip ¶
func (c *Context) EndTooltip()
func (*Context) FindAllowedExtentRectForWindow ¶
func (*Context) FindBestWindowPosForPopup ¶
func (*Context) FindBestWindowPosForPopupEx ¶
func (c *Context) FindBestWindowPosForPopupEx(ref_pos, size f64.Vec2, last_dir *Dir, r_outer, r_avoid f64.Rectangle, policy PopupPositionPolicy) f64.Vec2
r_avoid = the rectangle to avoid (e.g. for tooltip it is a rectangle around the mouse cursor which we want to avoid. for popups it's a small point around the cursor.) r_outer = the visible area rectangle, minus safe area padding. If our popup size won't fit because of safe area padding we ignore it.
func (*Context) FindHoveredWindow ¶
Find window given position, search front-to-back FIXME: Note that we have a lag here because WindowRectClipped is updated in Begin() so windows moved by user via SetWindowPos() and not SetNextWindowPos() will have that rectangle lagging by a frame at the time FindHoveredWindow() is called, aka before the next Begin(). Moving window thankfully isn't affected.
func (*Context) FindOrAddColumnsSet ¶
func (c *Context) FindOrAddColumnsSet(window *Window, id ID) *ColumnsSet
func (*Context) FindRenderedTextEnd ¶
func (*Context) FindSettingsHandler ¶
func (c *Context) FindSettingsHandler(typ string) *SettingsHandler
func (*Context) FindWindowByName ¶
func (*Context) FindWindowIndex ¶
FIXME-OPT O(N)
func (*Context) FindWindowNavigable ¶
FIXME-OPT O(N)
func (*Context) FindWindowSettings ¶
func (c *Context) FindWindowSettings(name string) *WindowSettings
func (*Context) FocusFrontMostActiveWindow ¶
func (*Context) FocusWindow ¶
Moving window to front of display and set focus (which happens to be back of our sorted list)
func (*Context) FocusableItemRegister ¶
func (*Context) FocusableItemRegisterEx ¶
func (*Context) FocusableItemUnregister ¶
func (*Context) GetBorderRect ¶
func (*Context) GetClipboardText ¶
func (*Context) GetClipboardTextFn_DefaultImpl ¶
func (*Context) GetColorFromStyleWithAlpha ¶
func (*Context) GetColumnIndex ¶
func (*Context) GetColumnOffset ¶
func (*Context) GetColumnWidth ¶
func (*Context) GetColumnWidthDx ¶
func (*Context) GetColumnWidthEx ¶
func (c *Context) GetColumnWidthEx(columns *ColumnsSet, column_index int, before_resize bool) float64
func (*Context) GetColumnsCount ¶
func (*Context) GetColumnsRectHalfWidth ¶
func (*Context) GetContentRegionAvail ¶
func (*Context) GetContentRegionAvailWidth ¶
func (*Context) GetContentRegionMax ¶
func (*Context) GetCurrentWindow ¶
func (*Context) GetCurrentWindowRead ¶
func (*Context) GetCursorPos ¶
User generally sees positions in window coordinates. Internally we store CursorPos in absolute screen coordinates because it is more convenient. Conversion happens as we pass the value to user, but it makes our naming convention confusing because GetCursorPos() == (DC.CursorPos - window.Pos). May want to rename 'DC.CursorPos'.
func (*Context) GetCursorPosY ¶
func (*Context) GetCursorScreenPos ¶
func (*Context) GetCursorStartPos ¶
func (*Context) GetDefaultFont ¶
func (*Context) GetDraggedColumnOffset ¶
func (c *Context) GetDraggedColumnOffset(columns *ColumnsSet, column_index int) float64
func (*Context) GetDrawData ¶
func (*Context) GetDrawListSharedData ¶
func (c *Context) GetDrawListSharedData() *DrawListSharedData
func (*Context) GetFontSize ¶
func (*Context) GetFontTexUvWhitePixel ¶
func (*Context) GetFrameCount ¶
func (*Context) GetFrameHeight ¶
func (*Context) GetFrameHeightWithSpacing ¶
func (*Context) GetFrontMostPopupModal ¶
func (*Context) GetItemRectMax ¶
func (*Context) GetItemRectMin ¶
func (*Context) GetItemRectSize ¶
func (*Context) GetKeyPressedAmount ¶
func (*Context) GetMouseCursor ¶
func (c *Context) GetMouseCursor() MouseCursor
func (*Context) GetMouseDragDelta ¶
func (*Context) GetMousePos ¶
func (*Context) GetNavInputAmount ¶
func (c *Context) GetNavInputAmount(n NavInput, mode InputReadMode) float64
func (*Context) GetNavInputAmount2d ¶
func (c *Context) GetNavInputAmount2d(dir_sources NavDirSourceFlags, mode InputReadMode) f64.Vec2
func (*Context) GetNavInputAmount2dEx ¶
func (c *Context) GetNavInputAmount2dEx(dir_sources NavDirSourceFlags, mode InputReadMode, slow_factor, fast_factor float64) f64.Vec2
func (*Context) GetOverlayDrawList ¶
func (*Context) GetScrollMaxX ¶
func (*Context) GetScrollMaxY ¶
func (*Context) GetScrollX ¶
func (*Context) GetScrollY ¶
func (*Context) GetStateStorage ¶
func (*Context) GetStringID ¶
func (*Context) GetStyleColorName ¶
func (*Context) GetStyleIndex ¶
func (*Context) GetTextLineHeight ¶
func (*Context) GetTextLineHeightWithSpacing ¶
func (*Context) GetTreeNodeToLabelSpacing ¶
func (*Context) GetVersion ¶
func (*Context) GetViewportRect ¶
func (*Context) GetWindowBgColorIdxFromFlags ¶
func (c *Context) GetWindowBgColorIdxFromFlags(flags WindowFlags) Col
func (*Context) GetWindowContentRegionMax ¶
func (*Context) GetWindowContentRegionMin ¶
func (*Context) GetWindowContentRegionWidth ¶
func (*Context) GetWindowDrawList ¶
func (*Context) GetWindowHeight ¶
func (*Context) GetWindowScrollMaxX ¶
func (*Context) GetWindowScrollMaxY ¶
func (*Context) GetWindowSize ¶
func (*Context) GetWindowWidth ¶
func (*Context) ImageButton ¶
func (*Context) ImageButtonEx ¶
func (c *Context) ImageButtonEx(user_texture_id TextureID, size, uv0, uv1 f64.Vec2, frame_padding int, bg_col, tint_col color.RGBA) bool
frame_padding < 0: uses FramePadding from style (default) frame_padding = 0: no framing frame_padding > 0: set framing size The color used are the button colors.
func (*Context) InputFloat ¶
func (*Context) InputFloat2Ex ¶
func (*Context) InputFloat3Ex ¶
func (*Context) InputFloat4Ex ¶
func (*Context) InputFloatEx ¶
func (*Context) InputFloatNEx ¶
func (*Context) InputInt2Ex ¶
func (c *Context) InputInt2Ex(label string, v []int, extra_flags InputTextFlags) bool
func (*Context) InputInt3Ex ¶
func (c *Context) InputInt3Ex(label string, v []int, extra_flags InputTextFlags) bool
func (*Context) InputInt4Ex ¶
func (c *Context) InputInt4Ex(label string, v []int, extra_flags InputTextFlags) bool
func (*Context) InputIntEx ¶
func (*Context) InputIntN ¶
func (c *Context) InputIntN(label string, v []int, extra_flags InputTextFlags) bool
func (*Context) InputScalarAsWidgetReplacement ¶
func (c *Context) InputScalarAsWidgetReplacement(bb f64.Rectangle, label string, data interface{}, id ID, format string) bool
Create text input in place of a slider (when CTRL+Clicking on slider) FIXME: Logic is messy and confusing.
func (*Context) InputScalarEx ¶
func (c *Context) InputScalarEx(label string, data, step_ptr, step_fast_ptr interface{}, scalar_format string, extra_flags InputTextFlags) bool
NB: scalar_format here must be a simple "%xx" format string with no prefix/suffix (unlike the Drag/Slider functions "format" argument)
func (*Context) InputTextCalcTextSizeW ¶
func (*Context) InputTextEx ¶
func (c *Context) InputTextEx(label string, buf []byte, size_arg f64.Vec2, flags InputTextFlags, callback TextEditCallback) bool
Edit a string of text NB: when active, hold on a privately held copy of the text (and apply back to 'buf'). So changing 'buf' while active has no effect. FIXME: Rather messy function partly because we are doing UTF8 > u16 > UTF8 conversions on the go to more easily handle stb_textedit calls. Ideally we should stay in UTF-8 all the time. See https://github.com/nothings/stb/issues/188
func (*Context) InputTextExCallback ¶
func (*Context) InputTextFilterCharacter ¶
func (c *Context) InputTextFilterCharacter(p_char *rune, flags InputTextFlags, callback TextEditCallback) bool
Return false to discard a character.
func (*Context) InputTextMultiline ¶
func (c *Context) InputTextMultiline(label string, buf []byte, size f64.Vec2, flags InputTextFlags, callback TextEditCallback) bool
func (*Context) InvisibleButton ¶
Tip: use ImGui::PushID()/PopID() to push indices or pointers in the ID stack. Then you can keep 'str_id' empty or the same for all your buttons (instead of creating a string based on a non-string id)
func (*Context) IsAnyItemFocused ¶
func (*Context) IsAnyItemHovered ¶
func (*Context) IsClippedEx ¶
func (*Context) IsItemActive ¶
func (*Context) IsItemClicked ¶
func (*Context) IsItemFocused ¶
func (*Context) IsItemHovered ¶
func (*Context) IsItemHoveredEx ¶
func (c *Context) IsItemHoveredEx(flags HoveredFlags) bool
This is roughly matching the behavior of internal-facing ItemHoverable() - we allow hovering to be true when ActiveId==window->MoveID, so that clicking on non-interactive items such as a Text() item still returns true with IsItemHovered() - this should work even for non-interactive items that have no ID, so we cannot use LastItemId
func (*Context) IsItemVisible ¶
func (*Context) IsKeyDown ¶
Note that imgui doesn't know the semantic of each entry of io.KeysDown[]. Use your own indices/enums according to how your back-end/engine stored them into io.KeysDown[]!
func (*Context) IsKeyPressedMap ¶
func (*Context) IsKeyReleased ¶
func (*Context) IsMouseDoubleClicked ¶
func (*Context) IsMouseDown ¶
func (*Context) IsMouseDragging ¶
func (*Context) IsMouseDraggingEx ¶
func (*Context) IsMouseHoveringRect ¶
func (*Context) IsMouseHoveringRectEx ¶
Test if mouse cursor is hovering given rectangle NB- Rectangle is clipped by our current clip setting NB- Expand the rectangle to be generous on imprecise inputs systems (g.Style.TouchExtraPadding)
func (*Context) IsMousePosValid ¶
func (*Context) IsMouseReleased ¶
func (*Context) IsNavInputDown ¶
Equivalent of IsKeyDown() for NavInputs[]
func (*Context) IsNavInputPressed ¶
func (c *Context) IsNavInputPressed(n NavInput, mode InputReadMode) bool
func (*Context) IsNavInputPressedAnyOfTwo ¶
func (c *Context) IsNavInputPressedAnyOfTwo(n1, n2 NavInput, mode InputReadMode) bool
func (*Context) IsPopupOpen ¶
func (*Context) IsPopupOpenID ¶
func (*Context) IsPopupOpenName ¶
func (*Context) IsWindowChildOf ¶
func (*Context) IsWindowContentHoverable ¶
func (c *Context) IsWindowContentHoverable(window *Window, flags HoveredFlags) bool
func (*Context) IsWindowFocused ¶
func (*Context) IsWindowFocusedEx ¶
func (c *Context) IsWindowFocusedEx(flags FocusedFlags) bool
func (*Context) IsWindowHovered ¶
func (*Context) IsWindowHoveredEx ¶
func (c *Context) IsWindowHoveredEx(flags HoveredFlags) bool
func (*Context) IsWindowNavFocusable ¶
func (*Context) ItemAddEx ¶
Declare item bounding box for clipping and interaction. Note that the size can be different than the one provided to ItemSize(). Typically, widgets that spread over available surface declare their minimum size requirement to ItemSize() and then use a larger region for drawing/interaction, which is passed to ItemAdd().
func (*Context) ItemSizeBB ¶
func (*Context) ItemSizeBBEx ¶
func (*Context) KeepAliveID ¶
func (*Context) ListBoxFooter ¶
func (c *Context) ListBoxFooter()
func (*Context) ListBoxHeader ¶
Helper to calculate the size of a listbox and display a label on the right. Tip: To have a list filling the entire window width, PushItemWidth(-1) and pass an empty label "##empty"
func (*Context) ListBoxHeaderItems ¶
func (*Context) ListBoxItems ¶
func (*Context) LoadIniSettingsFromDisk ¶
func (*Context) LoadIniSettingsFromMemory ¶
Zero-tolerance, no error reporting, cheap .ini parsing
func (*Context) LogRenderedText ¶
Internal version that takes a position to decide on newline placement and pad items according to their depth. We split text into individual lines to add current tree level padding
func (*Context) LogToClipboard ¶
func (c *Context) LogToClipboard()
func (*Context) LogToClipboardEx ¶
Start logging ImGui output to clipboard
func (*Context) LogToTTYEx ¶
func (*Context) MarkIniSettingsDirty ¶
func (c *Context) MarkIniSettingsDirty()
func (*Context) MarkIniSettingsDirtyForWindow ¶
func (*Context) MenuItemEx ¶
func (*Context) MenuItemSelect ¶
func (*Context) MenuItemSelectEx ¶
func (*Context) NavCalcPreferredRefPos ¶
func (*Context) NavInitWindow ¶
func (*Context) NavMoveRequestButNoResultYet ¶
func (*Context) NavMoveRequestCancel ¶
func (c *Context) NavMoveRequestCancel()
func (*Context) NavProcessItem ¶
We get there when either NavId == id, or when g.NavAnyRequest is set (which is updated by NavUpdateAnyRequestFlag above)
func (*Context) NavProcessMoveRequestWrapAround ¶
func (*Context) NavRestoreLastChildNavWindow ¶
Call when we are expected to land on Layer 0 after FocusWindow()
func (*Context) NavRestoreLayer ¶
func (*Context) NavSaveLastChildNavWindow ¶
func (*Context) NavScoreItem ¶
func (c *Context) NavScoreItem(result *NavMoveResult, cand f64.Rectangle) bool
Scoring function for directional navigation. Based on https://gist.github.com/rygorous/6981057
func (*Context) NavScoreItemDistInterval ¶
func (*Context) NavScoreItemGetQuadrant ¶
func (*Context) NavScrollToBringItemIntoView ¶
NB: We modify rect_rel by the amount we scrolled for, so it is immediately updated.
func (*Context) NavUpdateAnyRequestFlag ¶
func (c *Context) NavUpdateAnyRequestFlag()
func (*Context) NavUpdateWindowing ¶
func (c *Context) NavUpdateWindowing()
Window management mode (hold to: change focus/move/resize, tap to: toggle menu layer)
func (*Context) NavUpdateWindowingHighlightWindow ¶
func (*Context) NewFrameUpdateHoveredWindowAndCaptureFlags ¶
func (c *Context) NewFrameUpdateHoveredWindowAndCaptureFlags()
func (*Context) NextColumn ¶
func (c *Context) NextColumn()
func (*Context) OffsetNormToPixels ¶
func (c *Context) OffsetNormToPixels(columns *ColumnsSet, offset_norm float64) float64
func (*Context) OpenPopupEx ¶
Mark popup as open (toggle toward open state). Popups are closed when user click outside, or activate a pressable item, or CloseCurrentPopup() is called within a BeginPopup()/EndPopup() block. Popup identifiers are relative to the current ID-stack (so OpenPopup and BeginPopup needs to be at the same level). One open popup per level of the popup hierarchy (NB: when assigning we reset the Window member of ImGuiPopupRef to NULL)
func (*Context) OpenPopupOnItemClick ¶
func (*Context) PixelsToOffsetNorm ¶
func (c *Context) PixelsToOffsetNorm(columns *ColumnsSet, offset float64) float64
func (*Context) PlotHistogram ¶
func (*Context) PlotHistogramEx ¶
func (*Context) PlotHistogramItem ¶
func (*Context) PlotHistogramItemEx ¶
func (*Context) PlotLinesEx ¶
func (*Context) PlotLinesItem ¶
func (*Context) PlotLinesItemEx ¶
func (*Context) PopAllowKeyboardFocus ¶
func (c *Context) PopAllowKeyboardFocus()
func (*Context) PopButtonRepeat ¶
func (c *Context) PopButtonRepeat()
func (*Context) PopClipRect ¶
func (c *Context) PopClipRect()
func (*Context) PopItemFlag ¶
func (c *Context) PopItemFlag()
func (*Context) PopItemWidth ¶
func (c *Context) PopItemWidth()
func (*Context) PopStyleColor ¶
func (c *Context) PopStyleColor()
func (*Context) PopStyleColorN ¶
func (*Context) PopStyleVar ¶
func (c *Context) PopStyleVar()
func (*Context) PopStyleVarN ¶
func (*Context) PopTextWrapPos ¶
func (c *Context) PopTextWrapPos()
func (*Context) ProgressBar ¶
func (*Context) ProgressBarEx ¶
size_arg (for each axis) < 0.0f: align to end, 0.0f: auto, > 0.0f: specified size
func (*Context) PushAllowKeyboardFocus ¶
func (*Context) PushButtonRepeat ¶
func (*Context) PushClipRect ¶
func (c *Context) PushClipRect(clip_rect_min, clip_rect_max f64.Vec2, intersect_with_current_clip_rect bool)
When using this function it is sane to ensure that float are perfectly rounded to integer values, to that e.g. (int)(max.x-min.x) in user's render produce correct result.
func (*Context) PushColumnClipRect ¶
func (c *Context) PushColumnClipRect()
func (*Context) PushColumnClipRectEx ¶
func (*Context) PushItemFlag ¶
func (*Context) PushItemWidth ¶
func (*Context) PushMultiItemsWidths ¶
func (*Context) PushMultiItemsWidthsEx ¶
func (*Context) PushStringID ¶
func (*Context) PushStyleVar ¶
func (*Context) PushTextWrapPos ¶
func (*Context) RadioButtonEx ¶
func (*Context) RenderArrowEx ¶
func (*Context) RenderArrowToList ¶
func (c *Context) RenderArrowToList(draw_list *DrawList, pos, half_sz f64.Vec2, direction Dir, col color.RGBA)
'pos' is position of the arrow tip. half_sz.x is length from base to tip. half_sz.y is length on each side.
func (*Context) RenderArrowsForVerticalBar ¶
func (*Context) RenderBullet ¶
func (*Context) RenderCheckMark ¶
func (*Context) RenderColorRectWithAlphaCheckerboard ¶
func (*Context) RenderColorRectWithAlphaCheckerboardDx ¶
func (*Context) RenderColorRectWithAlphaCheckerboardEx ¶
func (c *Context) RenderColorRectWithAlphaCheckerboardEx(p_min, p_max f64.Vec2, col color.RGBA, grid_step float64, grid_off f64.Vec2, rounding float64, rounding_corners_flags DrawCornerFlags)
NB: This is rather brittle and will show artifact when rounding this enabled if rounded corners overlap multiple cells. Caller currently responsible for avoiding that. I spent a non reasonable amount of time trying to getting this right for ColorButton with rounding+anti-aliasing+ImGuiColorEditFlags_HalfAlphaPreview flag + various grid sizes and offsets, and eventually gave up... probably more reasonable to disable rounding alltogether.
func (*Context) RenderFrame ¶
Render a rectangle shaped with optional rounding and borders
func (*Context) RenderFrameBorder ¶
func (*Context) RenderFrameEx ¶
func (*Context) RenderNavHighlightEx ¶
func (c *Context) RenderNavHighlightEx(bb f64.Rectangle, id ID, flags NavHighlightFlags)
func (*Context) RenderRectFilledRangeH ¶
func (c *Context) RenderRectFilledRangeH(draw_list *DrawList, rect f64.Rectangle, col color.RGBA, x_start_norm, x_end_norm, rounding float64)
FIXME: Cleanup and move code to ImDrawList.
func (*Context) RenderTextClipped ¶
func (*Context) RenderTextClippedEx ¶
func (*Context) RenderTextEx ¶
Internal ImGui functions to render text RenderText***() functions calls ImDrawList::AddText() calls ImBitmapFont::RenderText()
func (*Context) RenderTextWrapped ¶
func (*Context) ResetMouseDragDelta ¶
func (*Context) SameLineEx ¶
Gets back to previous line and continue with horizontal layout
pos_x == 0 : follow right after previous item pos_x != 0 : align to specified x position (relative to window/group left) spacing_w < 0 : use default spacing if pos_x == 0, no spacing if pos_x != 0 spacing_w >= 0 : enforce spacing amount
func (*Context) SaveIniSettingsToDisk ¶
func (*Context) SaveIniSettingsToMemory ¶
func (*Context) Scrollbar ¶
func (c *Context) Scrollbar(direction LayoutType)
Vertical scrollbar The entire piece of code below is rather confusing because: - We handle absolute seeking (when first clicking outside the grab) and relative manipulation (afterward or when clicking inside the grab) - We store values as normalized ratio and in a form that allows the window content to change while we are holding on a scrollbar - We handle both horizontal and vertical scrollbars, which makes the terminology not ideal.
func (*Context) Selectable ¶
func (*Context) SelectableEx ¶
func (c *Context) SelectableEx(label string, selected bool, flags SelectableFlags, size_arg f64.Vec2) bool
Tip: pass an empty label (e.g. "##dummy") then you can use the space to draw other text or image. But you need to make sure the ID is unique, e.g. enclose calls in PushID/PopID.
func (*Context) SelectableOpen ¶
func (*Context) SelectableOpenEx ¶
func (*Context) SetActiveID ¶
func (*Context) SetClipboardText ¶
func (*Context) SetClipboardTextFn_DefaultImpl ¶
func (*Context) SetColorEditOptions ¶
func (c *Context) SetColorEditOptions(flags ColorEditFlags)
func (*Context) SetColumnOffset ¶
func (*Context) SetCurrentFont ¶
func (*Context) SetCurrentWindow ¶
func (*Context) SetCurrentWindowPos ¶
func (*Context) SetCurrentWindowSize ¶
func (*Context) SetCursorPosY ¶
func (*Context) SetCursorPosYAndSetupDummyPrevLine ¶
func (*Context) SetCursorScreenPos ¶
func (*Context) SetDragDropPayload ¶
func (c *Context) SetDragDropPayload(a interface{})
func (*Context) SetFocusID ¶
func (*Context) SetHoveredID ¶
func (*Context) SetItemAllowOverlap ¶
func (c *Context) SetItemAllowOverlap()
Allow last item to be overlapped by a subsequent item. Both may be activated during the same frame before the later one takes priority.
func (*Context) SetItemDefaultFocus ¶
func (c *Context) SetItemDefaultFocus()
func (*Context) SetKeyboardFocusHere ¶
func (c *Context) SetKeyboardFocusHere()
func (*Context) SetKeyboardFocusHereEx ¶
func (*Context) SetMouseCursor ¶
func (c *Context) SetMouseCursor(cursor_type MouseCursor)
func (*Context) SetNavIDAndMoveMouse ¶
func (*Context) SetNavIDWithRectRel ¶
func (*Context) SetNextWindowBgAlpha ¶
func (*Context) SetNextWindowContentSize ¶
func (*Context) SetNextWindowPos ¶
func (*Context) SetNextWindowSizeConstraints ¶
func (c *Context) SetNextWindowSizeConstraints(size_min, size_max f64.Vec2, custom_callback func(*SizeCallbackData))
func (*Context) SetScrollFromPosY ¶
func (*Context) SetScrollHere ¶
func (c *Context) SetScrollHere()
func (*Context) SetScrollHereEx ¶
center_y_ratio: 0.0f top of last item, 0.5f vertical center of last item, 1.0f bottom of last item.
func (*Context) SetScrollX ¶
func (*Context) SetScrollY ¶
func (*Context) SetStateStorage ¶
func (*Context) SetTooltip ¶
func (*Context) SetWindowCollapsed ¶
func (*Context) SetWindowConditionAllowFlags ¶
func (*Context) SetWindowFocus ¶
func (c *Context) SetWindowFocus()
func (*Context) SetWindowFontScale ¶
func (*Context) SetWindowPos ¶
func (*Context) SetWindowPosByName ¶
func (*Context) SetWindowScrollX ¶
func (*Context) SetWindowScrollY ¶
func (*Context) SetWindowSize ¶
func (*Context) SetWindowSizeByName ¶
func (*Context) SettingsHandlerWindow_ReadLine ¶
func (c *Context) SettingsHandlerWindow_ReadLine(_ *Context, _ *SettingsHandler, entry interface{}, line string)
func (*Context) SettingsHandlerWindow_ReadOpen ¶
func (c *Context) SettingsHandlerWindow_ReadOpen(_ *Context, _ *SettingsHandler, name string) interface{}
func (*Context) SettingsHandlerWindow_WriteAll ¶
func (c *Context) SettingsHandlerWindow_WriteAll(ctx *Context, handler *SettingsHandler, w io.Writer)
func (*Context) SetupDrawData ¶
func (*Context) ShadeVertsLinearColorGradientKeepAlpha ¶
func (c *Context) ShadeVertsLinearColorGradientKeepAlpha(vtx []DrawVert, vert_start, vert_end int, gradient_p0, gradient_p1 f64.Vec2, col0, col1 color.RGBA)
Generic linear color gradient, write to RGB fields, leave A untouched.
func (*Context) SliderAngleEx ¶
func (*Context) SliderBehavior ¶
func (*Context) SliderBehaviorCalcRatioFromValue ¶
func (*Context) SliderFloat ¶
func (*Context) SliderFloat2 ¶
func (*Context) SliderFloat2Ex ¶
func (*Context) SliderFloat3 ¶
func (*Context) SliderFloat3Ex ¶
func (*Context) SliderFloat4 ¶
func (*Context) SliderFloat4Ex ¶
func (*Context) SliderFloatEx ¶
func (c *Context) SliderFloatEx(label string, v *float64, v_min, v_max float64, format string, power float64) bool
Use power!=1.0 for logarithmic sliders. Adjust format to decorate the value with a prefix or a suffix.
"%.3f" 1.234 "%5.2f secs" 01.23 secs "Gold: %.0f" Gold: 1
func (*Context) SliderFloatN ¶
func (c *Context) SliderFloatN(label string, v []float64, v_min, v_max float64, format string, power float64) bool
Add multiple sliders on 1 line for compact edition of multiple components
func (*Context) SliderInt2 ¶
func (*Context) SliderInt2Ex ¶
func (*Context) SliderInt3 ¶
func (*Context) SliderInt3Ex ¶
func (*Context) SliderInt4 ¶
func (*Context) SliderInt4Ex ¶
func (*Context) SliderIntEx ¶
func (*Context) SliderIntN ¶
func (*Context) SliderV2Ex ¶
func (*Context) SliderV3Ex ¶
func (*Context) SliderV4Ex ¶
func (*Context) SmallButton ¶
func (*Context) StyleColorsClassic ¶
func (*Context) StyleColorsDark ¶
func (*Context) StyleColorsLight ¶
Those light colors are better suited with a thicker font than the default one + FrameBorder
func (*Context) TextColored ¶
func (*Context) TextDisabled ¶
func (*Context) TextUnformatted ¶
func (*Context) TextWrapped ¶
func (*Context) TreeNodeBehavior ¶
func (c *Context) TreeNodeBehavior(id ID, flags TreeNodeFlags, label string) bool
func (*Context) TreeNodeBehaviorIsOpen ¶
func (c *Context) TreeNodeBehaviorIsOpen(id ID, flags TreeNodeFlags) bool
func (*Context) TreeNodeID ¶
func (*Context) TreeNodeIDEx ¶
func (c *Context) TreeNodeIDEx(id ID, flags TreeNodeFlags, format string, args ...interface{}) bool
func (*Context) TreeNodeStringID ¶
func (*Context) TreeNodeStringIDEx ¶
func (c *Context) TreeNodeStringIDEx(str_id string, flags TreeNodeFlags, format string, args ...interface{}) bool
func (*Context) TreePushRawID ¶
func (*Context) UnindentEx ¶
func (*Context) UpdateManualResize ¶
func (c *Context) UpdateManualResize(window *Window, size_auto_fit f64.Vec2, border_held *int, resize_grip_col []color.RGBA)
Handle resize for: Resize Grips, Borders, Gamepad
func (*Context) UpdateMouseInputs ¶
func (c *Context) UpdateMouseInputs()
func (*Context) UpdateMovingWindow ¶
func (c *Context) UpdateMovingWindow()
func (*Context) VSliderFloat ¶
func (*Context) VSliderFloatEx ¶
func (*Context) VSliderInt ¶
func (*Context) VSliderIntEx ¶
func (*Context) VerticalSeparator ¶
func (c *Context) VerticalSeparator()
type CustomRect ¶
type CustomRect struct {
ID uint // Input // User ID. Use <0x10000 to map into a font glyph, >=0x10000 for other/internal/custom texture data.
Width, Height uint // Input // Desired rectangle dimension
X, Y uint // Output // Packed position in Atlas
GlyphAdvanceX float64 // Input // For custom font glyphs only (ID<0x10000): glyph xadvance
GlyphOffset f64.Vec2 // Input // For custom font glyphs only (ID<0x10000): glyph display offset
Font *Font // Input // For custom font glyphs only (ID<0x10000): target font
}
func (*CustomRect) Init ¶
func (c *CustomRect) Init()
func (*CustomRect) IsPacked ¶
func (c *CustomRect) IsPacked() bool
type DragDropFlags ¶
type DragDropFlags int
const ( // BeginDragDropSource() flags DragDropFlagsSourceNoPreviewTooltip DragDropFlags = 1 << 0 // By default a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior. DragDropFlagsSourceNoDisableHover DragDropFlags = 1 << 1 // By default when dragging we clear data so that IsItemHovered() will return true to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item. DragDropFlagsSourceNoHoldToOpenOthers DragDropFlags = 1 << 2 // Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item. DragDropFlagsSourceAllowNullID DragDropFlags = 1 << 3 // Allow items such as Text() Image() that have no unique identifier to be used as drag source by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit. DragDropFlagsSourceExtern DragDropFlags = 1 << 4 // External source (from outside of imgui) won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously. // AcceptDragDropPayload() flags DragDropFlagsAcceptBeforeDelivery DragDropFlags = 1 << 10 // AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered. DragDropFlagsAcceptNoDrawDefaultRect DragDropFlags = 1 << 11 // Do not draw the default highlight rectangle when hovering over target. DragDropFlagsAcceptPeekOnly DragDropFlags = DragDropFlagsAcceptBeforeDelivery | DragDropFlagsAcceptNoDrawDefaultRect // For peeking ahead and inspecting the payload before delivery. )
type DrawChannel ¶
func (*DrawChannel) Init ¶
func (d *DrawChannel) Init()
type DrawCmd ¶
type DrawCmd struct {
ElemCount int // Number of indices (multiple of 3) to be rendered as triangles. Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[].
ClipRect f64.Vec4 // Clipping rectangle (x1, y1, x2, y2)
TextureId TextureID // User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. Ignore if never using images or multiple fonts atlas.
UserCallback func(cmd_list *DrawList) // If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally.
UserCallbackData interface{} // The draw callback code can access this.
}
type DrawContext ¶
type DrawContext struct {
CursorPos f64.Vec2
CursorPosPrevLine f64.Vec2
CursorStartPos f64.Vec2
CursorMaxPos f64.Vec2 // Used to implicitly calculate the size of our contents, always growing during the frame. Turned into window->SizeContents at the beginning of next frame
CurrentLineHeight float64
CurrentLineTextBaseOffset float64
PrevLineHeight float64
PrevLineTextBaseOffset float64
LogLinePosY float64
TreeDepth int
TreeDepthMayJumpToParentOnPop uint32 // Store a copy of !g.NavIdIsAlive for TreeDepth 0..31
LastItemId ID
LastItemStatusFlags ItemStatusFlags
LastItemRect f64.Rectangle // Interaction rect
LastItemDisplayRect f64.Rectangle // End-user display rect (only valid if LastItemStatusFlags & ImGuiItemStatusFlags_HasDisplayRect)
MenuBarAppending bool // FIXME: Remove this
MenuBarOffset f64.Vec2 // MenuBarOffset.x is sort of equivalent of a per-layer CursorPos.x, saved/restored as we switch to the menu bar. The only situation when MenuBarOffset.y is > 0 if when (SafeAreaPadding.y > FramePadding.y), often used on TVs.
ChildWindows []*Window
StateStorage map[ID]interface{}
LayoutType LayoutType
ParentLayoutType LayoutType // Layout type of parent window at the time of Begin()
// We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings.
ItemFlags ItemFlags // == ItemFlagsStack.back() [empty == ImGuiItemFlags_Default]
ItemWidth float64 // == ItemWidthStack.back(). 0.0: default, >0.0: width in pixels, <0.0: align xx pixels to the right of window
TextWrapPos float64 // == TextWrapPosStack.back() [empty == -1.0f]
ItemFlagsStack []ItemFlags
ItemWidthStack []float64
TextWrapPosStack []float64
GroupStack []GroupData
StackSizesBackup [6]int // Store size of various stacks for asserting
IndentX float64 // Indentation / start position from left of window (increased by TreePush/TreePop, etc.)
GroupOffsetX float64
ColumnsOffsetX float64 // Offset to the current column (if ColumnsCurrent > 0). FIXME: This and the above should be a stack to allow use cases like Tree->Column->Tree. Need revamp columns API.
ColumnsSet *ColumnsSet // Current columns set
}
type DrawCornerFlags ¶
type DrawCornerFlags int
const ( DrawCornerFlagsTopLeft DrawCornerFlags = 1 << 0 // 0x1 DrawCornerFlagsTopRight DrawCornerFlags = 1 << 1 // 0x2 DrawCornerFlagsBotLeft DrawCornerFlags = 1 << 2 // 0x4 DrawCornerFlagsBotRight DrawCornerFlags = 1 << 3 // 0x8 DrawCornerFlagsTop DrawCornerFlags = DrawCornerFlagsTopLeft | DrawCornerFlagsTopRight // 0x3 DrawCornerFlagsBot DrawCornerFlags = DrawCornerFlagsBotLeft | DrawCornerFlagsBotRight // 0xC DrawCornerFlagsLeft DrawCornerFlags = DrawCornerFlagsTopLeft | DrawCornerFlagsBotLeft // 0x5 DrawCornerFlagsRight DrawCornerFlags = DrawCornerFlagsTopRight | DrawCornerFlagsBotRight // 0xA DrawCornerFlagsAll DrawCornerFlags = 0xF // In your function calls you may use ~0 (= all bits sets) instead of DrawCornerFlags_All, as a convenience )
type DrawData ¶
type DrawData struct {
Valid bool // Only valid after Render() is called and before the next NewFrame() is called.
CmdLists []*DrawList
CmdListsCount int
TotalVtxCount int // For convenience, sum of all cmd_lists vtx_buffer.Size
TotalIdxCount int // For convenience, sum of all cmd_lists idx_buffer.Size
}
func (*DrawData) ScaleClipRects ¶
Helper to scale the ClipRect field of each ImDrawCmd. Use if your final output buffer is at a different scale than ImGui expects, or if there is a difference between your window resolution and framebuffer resolution.
type DrawDataBuilder ¶
type DrawDataBuilder struct {
Layers [2][]*DrawList
}
func (*DrawDataBuilder) Clear ¶
func (d *DrawDataBuilder) Clear()
func (*DrawDataBuilder) FlattenIntoSingleLayer ¶
func (d *DrawDataBuilder) FlattenIntoSingleLayer()
type DrawList ¶
type DrawList struct {
ID ID
// This is what you have to render
CmdBuffer []DrawCmd // Draw commands. Typically 1 command = 1 GPU draw call, unless the command is a callback.
IdxBuffer []DrawIdx // Index buffer. Each command consume ImDrawCmd::ElemCount of those
VtxBuffer []DrawVert // Vertex buffer.
// [Internal, used while building lists]
Flags DrawListFlags // Flags, you may poke into these to adjust anti-aliasing settings per-primitive.
Data *DrawListSharedData // Pointer to shared draw data (you can use ImGui::GetDrawListSharedData() to get the one from current ImGui context)
OwnerName string // Pointer to owner window's name for debugging
VtxCurrentIdx int // [Internal] == VtxBuffer.Size
VtxWritePtr int // [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
IdxWritePtr int // [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector<> operators too much)
ClipRectStack []f64.Vec4 // [Internal]
TextureIdStack []TextureID // [Internal]
Path []f64.Vec2 // [Internal] current path building ChannelsCurrent int // [Internal] current channel number (0)
ChannelsCurrent int // [Internal] current channel number (0)
ChannelsCount int // [Internal] number of active channels (1+)
Channels []DrawChannel // [Internal] draw channels for columns API (not resized down so ChannelsCount may be smaller than Channels.Size)
}
func NewDrawList ¶
func NewDrawList(shared_data *DrawListSharedData) *DrawList
func (*DrawList) AddBezierCurve ¶
func (*DrawList) AddBezierCurveEx ¶
func (*DrawList) AddCircleEx ¶
func (*DrawList) AddCircleFilled ¶
func (*DrawList) AddCircleFilledEx ¶
func (*DrawList) AddConvexPolyFilled ¶
func (*DrawList) AddDrawCmd ¶
func (d *DrawList) AddDrawCmd()
func (*DrawList) AddImageEx ¶
func (*DrawList) AddImageQuad ¶
func (*DrawList) AddImageQuadEx ¶
func (*DrawList) AddImageRounded ¶
func (*DrawList) AddImageRoundedEx ¶
func (*DrawList) AddPolyline ¶
func (*DrawList) AddRect ¶
a: upper-left, b: lower-right. we don't render 1 px sized rectangles properly.
func (*DrawList) AddRectFilled ¶
func (*DrawList) AddRectFilledEx ¶
func (*DrawList) AddRectFilledMultiColor ¶
func (*DrawList) AddTriangleEx ¶
func (*DrawList) AddTriangleFilled ¶
func (*DrawList) ChannelsMerge ¶
func (d *DrawList) ChannelsMerge()
func (*DrawList) ChannelsSetCurrent ¶
func (*DrawList) ChannelsSplit ¶
func (*DrawList) GetCurrentClipRect ¶
func (*DrawList) GetCurrentTextureId ¶
func (*DrawList) Init ¶
func (d *DrawList) Init(shared_data *DrawListSharedData)
func (*DrawList) PathArcToFast ¶
func (*DrawList) PathBezierCurveTo ¶
func (*DrawList) PathBezierToCasteljau ¶
func (*DrawList) PathFillConvex ¶
func (*DrawList) PathLineTo ¶
func (*DrawList) PathRect ¶
func (d *DrawList) PathRect(a, b f64.Vec2, rounding float64, rounding_corners DrawCornerFlags)
func (*DrawList) PathStrokeEx ¶
func (*DrawList) PopClipRect ¶
func (d *DrawList) PopClipRect()
func (*DrawList) PopTextureID ¶
func (d *DrawList) PopTextureID()
func (*DrawList) PrimQuadUV ¶
func (*DrawList) PrimRectUV ¶
func (*DrawList) PrimReserve ¶
NB: this can be called with negative count for removing primitives (as long as the result does not underflow)
func (*DrawList) PrimWriteIdx ¶
func (*DrawList) PushClipRect ¶
func (*DrawList) PushClipRectEx ¶
func (*DrawList) PushClipRectFullScreen ¶
func (d *DrawList) PushClipRectFullScreen()
func (*DrawList) PushTextureID ¶
func (*DrawList) ShadeVertsLinearUV ¶
func (*DrawList) UpdateClipRect ¶
func (d *DrawList) UpdateClipRect()
Our scheme may appears a bit unusual, basically we want the most-common calls AddLine AddRect etc. to not have to perform any check so we always have a command ready in the stack.
func (*DrawList) UpdateTextureID ¶
func (d *DrawList) UpdateTextureID()
type DrawListFlags ¶
type DrawListFlags int
const ( DrawListFlagsAntiAliasedLines DrawListFlags = 1 << 0 DrawListFlagsAntiAliasedFill DrawListFlags = 1 << 1 )
type DrawListSharedData ¶
type DrawListSharedData struct {
// FIXME: Bake rounded corners fill/borders in atlas
CircleVtx12 [12]f64.Vec2
}
func (*DrawListSharedData) Init ¶
func (d *DrawListSharedData) Init()
type FocusedFlags ¶
type FocusedFlags uint
const ( FocusedFlagsChildWindows FocusedFlags = 1 << 0 // IsWindowFocused(): Return true if any children of the window is focused FocusedFlagsRootWindow FocusedFlags = 1 << 1 // IsWindowFocused(): Test from root window (top most parent of the current hierarchy) FocusedFlagsAnyWindow FocusedFlags = 1 << 2 // IsWindowFocused(): Return true if any window is focused FocusedFlagsRootAndChildWindows FocusedFlags = FocusedFlagsRootWindow | FocusedFlagsChildWindows )
type Font ¶
type Font struct {
ID ID
// Members: Hot ~62/78 bytes
FontSize float64 // <user set> // Height of characters, set during loading (don't change after loading)
Scale float64 // = 1.f // Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale()
DisplayOffset f64.Vec2 // = (0.f,1.f) // Offset font rendering by xx pixels
Glyphs []FontGlyph // // All glyphs.
IndexAdvanceX []float64 // // Sparse. Glyphs->AdvanceX in a directly indexable way (more cache-friendly, for CalcTextSize functions which are often bottleneck in large UI).
IndexLookup []int // // Sparse. Index glyphs by Unicode code-point.
FallbackGlyph *FontGlyph // == FindGlyph(FontFallbackChar)
FallbackAdvanceX float64 // == FallbackGlyph->AdvanceX
FallbackChar rune // = '?' // Replacement glyph if one isn't found. Only set via SetFallbackChar()
// Members: Cold ~18/26 bytes
ConfigDataCount int // ~ 1 // Number of ImFontConfig involved in creating this font. Bigger than 1 when merging multiple font sources into one ImFont.
ConfigData []FontConfig // // Pointer within ContainerAtlas->ConfigData
ContainerAtlas *FontAtlas // // What we has been loaded into
Ascent, Descent float64 // // Ascent: distance from top to bottom of e.g. 'A' [0..FontSize]
DirtyLookupTables bool
MetricsTotalSurface int // // Total surface in pixels to get an idea of the font rasterization/texture cost (not exact, we approximate the cost of padding between glyphs)
}
func (*Font) AddRemapChar ¶
func (*Font) BuildLookupTable ¶
func (f *Font) BuildLookupTable()
func (*Font) CalcTextSizeA ¶
func (*Font) CalcWordWrapPositionA ¶
func (*Font) ClearOutputData ¶
func (f *Font) ClearOutputData()
func (*Font) FindGlyphNoFallback ¶
func (*Font) GetCharAdvance ¶
func (*Font) GetDebugName ¶
func (*Font) RenderChar ¶
func (*Font) RenderText ¶
func (*Font) SetFallbackChar ¶
type FontAtlas ¶
type FontAtlas struct {
Flags FontAtlasFlags // Build flags (see ImFontAtlasFlags_)
TexID TextureID // User data to refer to the texture once it has been uploaded to user's graphic systems. It is passed back to you during rendering via the ImDrawCmd structure.
TexDesiredWidth int // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
TexGlyphPadding int // Padding between glyphs within texture in pixels. Defaults to 1.
// [Internal]
// NB: Access texture data via GetTexData*() calls! Which will setup a default font for you.
TexPixelsAlpha8 []uint8 // 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight
TexPixelsRGBA32 []uint8 // 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4
TexWidth int // Texture width calculated during Build().
TexHeight int // Texture height calculated during Build().
TexUvScale f64.Vec2 // = (1.0f/TexWidth, 1.0f/TexHeight)
TexUvWhitePixel f64.Vec2 // Texture coordinates to a white pixel
Fonts []*Font // Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
CustomRects []CustomRect // Rectangles for packing custom texture data into the atlas.
ConfigData []FontConfig // Internal data
CustomRectIds [1]int // Identifiers of custom texture rectangle used by ImFontAtlas/ImDrawList
}
func NewFontAtlas ¶
func NewFontAtlas() *FontAtlas
func (*FontAtlas) AddCustomRectRegular ¶
func (*FontAtlas) AddFont ¶
func (f *FontAtlas) AddFont(font_cfg *FontConfig) *Font
func (*FontAtlas) AddFontDefault ¶
func (f *FontAtlas) AddFontDefault(font_cfg_template *FontConfig) *Font
Load embedded ProggyClean.ttf at size 13, disable oversampling
func (*FontAtlas) AddFontFromMemoryCompressedBase85TTF ¶
func (*FontAtlas) AddFontFromMemoryCompressedTTF ¶
func (*FontAtlas) AddFontFromMemoryTTF ¶
func (f *FontAtlas) AddFontFromMemoryTTF(ttf_data []byte, size_pixels float64, font_cfg_template *FontConfig, glyph_ranges []rune) *Font
NB: Transfer ownership of 'ttf_data' to ImFontAtlas, unless font_cfg_template->FontDataOwnedByAtlas == false. Owned TTF buffer will be deleted after Build().
func (*FontAtlas) BuildFinish ¶
func (f *FontAtlas) BuildFinish()
func (*FontAtlas) BuildMultiplyCalcLookupTable ¶
func (*FontAtlas) BuildMultiplyRectAlpha8 ¶
func (*FontAtlas) BuildPackCustomRects ¶
func (f *FontAtlas) BuildPackCustomRects(spc *stbtt.PackContext)
func (*FontAtlas) BuildRenderDefaultTexData ¶
func (f *FontAtlas) BuildRenderDefaultTexData()
func (*FontAtlas) BuildSetupFont ¶
func (f *FontAtlas) BuildSetupFont(font *Font, font_config []FontConfig, ascent, descent float64)
func (*FontAtlas) BuildWithStbTruetype ¶
func (*FontAtlas) CalcCustomRectUV ¶
func (f *FontAtlas) CalcCustomRectUV(rect *CustomRect) (out_uv_min, out_uv_max f64.Vec2)
func (*FontAtlas) ClearTexData ¶
func (f *FontAtlas) ClearTexData()
func (*FontAtlas) FontAtlasBuildRegisterDefaultCustomRects ¶
func (f *FontAtlas) FontAtlasBuildRegisterDefaultCustomRects()
func (*FontAtlas) GetGlyphRangesDefault ¶
Retrieve list of range (2 int per range, values are inclusive)
func (*FontAtlas) GetMouseCursorTexData ¶
func (*FontAtlas) GetTexDataAsAlpha8 ¶
func (*FontAtlas) GetTexDataAsRGBA32 ¶
type FontAtlasFlags ¶
type FontAtlasFlags int
const ( FontAtlasFlagsNoPowerOfTwoHeight FontAtlasFlags = 1 << 0 // Don't round the height to next power of two FontAtlasFlagsNoMouseCursors FontAtlasFlags = 1 << 1 // Don't build software mouse cursors into the atlas )
type FontConfig ¶
type FontConfig struct {
FontData []uint8 // // TTF/OTF data
FontDataSize int // // TTF/OTF data size
FontDataOwnedByAtlas bool // true // TTF/OTF data ownership taken by the container ImFontAtlas (will delete memory itself).
FontNo int // 0 // Index of font within TTF/OTF file
SizePixels float64 // // Size in pixels for rasterizer.
OversampleH, OversampleV int // 3, 1 // Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis.
PixelSnapH bool // false // Align every glyph to pixel boundary. Useful e.g. if you are merging a non-pixel aligned font with the default font. If enabled, you can set OversampleH/V to 1.
GlyphExtraSpacing f64.Vec2 // 0, 0 // Extra spacing (in pixels) between glyphs. Only X axis is supported for now.
GlyphOffset f64.Vec2 // 0, 0 // Offset all glyphs from this font input.
GlyphRanges []rune // NULL // Pointer to a user-provided list of Unicode range (2 value per range, values are inclusive, zero-terminated list). THE ARRAY DATA NEEDS TO PERSIST AS LONG AS THE FONT IS ALIVE.
MergeMode bool // false // Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). You may want to use GlyphOffset.y when merge font of different heights.
RasterizerFlags uint // 0x00 // Settings for custom font rasterizer (e.g. ImGuiFreeType). Leave as zero if you aren't using one.
RasterizerMultiply float64 // 1.0f // Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable.
// [Internal]
Name string // Name (strictly to ease debugging)
DstFont *Font
}
func (*FontConfig) Init ¶
func (f *FontConfig) Init()
type HoveredFlags ¶
type HoveredFlags int
const ( HoveredFlagsDefault HoveredFlags = 0 // Return true if directly over the item/window not obstructed by another window not obstructed by an active popup or modal blocking inputs under them. HoveredFlagsChildWindows HoveredFlags = 1 << 0 // IsWindowHovered() only: Return true if any children of the window is hovered HoveredFlagsRootWindow HoveredFlags = 1 << 1 // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) HoveredFlagsAnyWindow HoveredFlags = 1 << 2 // IsWindowHovered() only: Return true if any window is hovered HoveredFlagsAllowWhenBlockedByPopup HoveredFlags = 1 << 3 // Return true even if a popup window is normally blocking access to this item/window //HoveredFlagsAllowWhenBlockedByModal HoveredFlags= 1 << 4 // Return true even if a modal popup window is normally blocking access to this item/window. FIXME-TODO: Unavailable yet. HoveredFlagsAllowWhenBlockedByActiveItem HoveredFlags = 1 << 5 // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. HoveredFlagsAllowWhenOverlapped HoveredFlags = 1 << 6 // Return true even if the position is overlapped by another window HoveredFlagsRectOnly HoveredFlags = HoveredFlagsAllowWhenBlockedByPopup | HoveredFlagsAllowWhenBlockedByActiveItem | HoveredFlagsAllowWhenOverlapped HoveredFlagsRootAndChildWindows HoveredFlags = HoveredFlagsRootWindow | HoveredFlagsChildWindows )
type IO ¶
type IO struct {
//------------------------------------------------------------------
// Settings (fill once) // Default value:
//------------------------------------------------------------------
Ctx *Context
ConfigFlags ConfigFlags // = 0 // See ImGuiConfigFlags_ enum. Gamepad/keyboard navigation options, etc.
BackendFlags BackendFlags // = 0 // See ImGuiConfigFlags_ enum. Set by user/application. Gamepad/keyboard navigation options, etc.
DisplaySize f64.Vec2 // <unset> // Display size, in pixels. For clamping windows positions.
DeltaTime float64 // = 1.0f/60.0f // Time elapsed since last frame, in seconds.
IniSavingRate float64 // = 5.0f // Maximum time between saving positions/sizes to .ini file, in seconds.
IniFilename string // = "imgui.ini" // Path to .ini file. NULL to disable .ini saving.
LogFilename string // = "imgui_log.txt" // Path to .log file (default parameter to ImGui::LogToFile when no file is specified).
MouseDoubleClickTime float64 // = 0.30f // Time for a double-click, in seconds.
MouseDoubleClickMaxDist float64 // = 6.0f // Distance threshold to stay in to validate a double-click, in pixels.
MouseDragThreshold float64 // = 6.0f // Distance threshold before considering we are dragging.
KeyMap [KeyCOUNT]int // <unset> // Map of indices into the KeysDown[512] entries array which represent your "native" keyboard state.
KeyRepeatDelay float64 // = 0.250f // When holding a key/button, time before it starts repeating, in seconds (for buttons in Repeat mode, etc.).
KeyRepeatRate float64 // = 0.050f // When holding a key/button, rate at which it repeats, in seconds.
UserData interface{} // = NULL // Store your own data for retrieval by callbacks.
Fonts *FontAtlas // <auto> // Load and assemble one or more fonts into a single tightly packed texture. Output to Fonts array.
FontGlobalScale float64 // = 1.0f // Global scale all fonts
FontAllowUserScaling bool // = false // Allow user scaling text of individual window with CTRL+Wheel.
FontDefault *Font // = NULL // Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0].
DisplayFramebufferScale f64.Vec2 // = (1.0f,1.0f) // For retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui.
DisplayVisibleMin f64.Vec2 // <unset> (0.0f,0.0f) // If you use DisplaySize as a virtual space larger than your screen, set DisplayVisibleMin/Max to the visible area.
DisplayVisibleMax f64.Vec2 // <unset> (0.0f,0.0f) // If the values are the same, we defaults to Min=(0.0f) and Max=DisplaySize
// Advanced/subtle behaviors
OptMacOSXBehaviors bool // = defined(__APPLE__) // OS X style: Text editing cursor movement using Alt instead of Ctrl, Shortcuts using Cmd/Super instead of Ctrl, Line/Text Start and End using Cmd+Arrows instead of Home/End, Double click selects by word instead of selecting whole text, Multi-selection in lists uses Cmd/Super instead of Ctrl
OptCursorBlink bool // = true // Enable blinking cursor, for users who consider it annoying.
// Optional: access OS clipboard
// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures)
GetClipboardTextFn func() string
SetClipboardTextFn func(text string)
ClipboardUserData interface{}
// Optional: notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME in Windows)
// (default to use native imm32 api on Windows)
ImeSetInputScreenPosFn func(x, y int)
ImeWindowHandle interface{} // (Windows) Set this to your HWND to get automatic IME cursor positioning.
MousePos f64.Vec2 // Mouse position, in pixels. Set to ImVec2(-FLT_MAX,-FLT_MAX) if mouse is unavailable (on another screen, etc.)
MouseDown [5]bool // Mouse buttons: left, right, middle + extras. ImGui itself mostly only uses left button (BeginPopupContext** are using right button). Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API.
MouseWheel float64 // Mouse wheel Vertical: 1 unit scrolls about 5 lines text.
MouseWheelH float64 // Mouse wheel Horizontal. Most users don't have a mouse with an horizontal wheel, may not be filled by all back-ends.
MouseDrawCursor bool // Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor).
KeyCtrl bool // Keyboard modifier pressed: Control
KeyShift bool // Keyboard modifier pressed: Shift
KeyAlt bool // Keyboard modifier pressed: Alt
KeySuper bool // Keyboard modifier pressed: Cmd/Super/Windows
KeysDown [512]bool // Keyboard keys that are pressed (ideally left in the "native" order your engine has access to keyboard keys, so you can use your own defines/enums for keys).
InputCharacters [16 + 1]rune // List of characters input (translated by user from keypress+keyboard state). Fill using AddInputCharacter() helper.
WantCaptureMouse bool // When io.WantCaptureMouse is true, imgui will use the mouse inputs, do not dispatch them to your main game/application. (e.g. unclicked mouse is hovering over an imgui window, widget is active, mouse was clicked over an imgui window, etc.).
WantCaptureKeyboard bool // When io.WantCaptureKeyboard is true, imgui will use the keyboard inputs, do not dispatch them to your main game/application. (e.g. InputText active, or an imgui window is focused and navigation is enabled, etc.).
WantTextInput bool // Mobile/console: when io.WantTextInput is true, you may display an on-screen keyboard. This is set by ImGui when it wants textual keyboard input to happen (e.g. when a InputText widget is active).
WantSetMousePos bool // MousePos has been altered, back-end should reposition mouse on next frame. Set only when ImGuiConfigFlags_NavMoveMouse flag is enabled.
Framerate float64 // Application framerate estimation, in frame per second. Solely for convenience. Rolling average estimation based on IO.DeltaTime over 120 frames
MetricsRenderVertices int // Vertices output during last call to Render()
MetricsRenderIndices int // Indices output during last call to Render() = number of triangles * 3
MetricsActiveWindows int // Number of visible root windows (exclude child windows)
MouseDelta f64.Vec2 // Mouse delta. Note that this is zero if either current or previous position are invalid (-FLT_MAX,-FLT_MAX), so a disappearing/reappearing mouse won't have a huge delta.
MousePosPrev f64.Vec2 // Previous mouse position temporary storage (nb: not for public use, set to MousePos in NewFrame())
MouseClickedPos [5]f64.Vec2 // Position at time of clicking
MouseClickedTime [5]float64 // Time of last click (used to figure out double-click)
MouseClicked [5]bool // Mouse button went from !Down to Down
MouseDoubleClicked [5]bool // Has mouse button been double-clicked?
MouseReleased [5]bool // Mouse button went from Down to !Down
MouseDownOwned [5]bool // Track if button was clicked inside a window. We don't request mouse capture from the application if click started outside ImGui bounds.
MouseDownDuration [5]float64 // Duration the mouse button has been down (0.0f == just clicked)
MouseDownDurationPrev [5]float64 // Previous time the mouse button has been down
MouseDragMaxDistanceAbs [5]f64.Vec2 // Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point
MouseDragMaxDistanceSqr [5]float64 // Squared maximum distance of how much mouse has traveled from the clicking point
KeysDownDuration [512]float64 // Duration the keyboard key has been down (0.0f == just pressed)
KeysDownDurationPrev [512]float64 // Previous duration the key has been down
}
type InputReadMode ¶
type InputReadMode int
const ( InputReadModeDown InputReadMode = iota InputReadModePressed InputReadModeReleased InputReadModeRepeat InputReadModeRepeatSlow InputReadModeRepeatFast )
type InputSource ¶
type InputSource int
const ( InputSourceNone InputSource = iota InputSourceMouse InputSourceCOUNT )
type InputTextFlags ¶
type InputTextFlags int
const ( 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 when the value was modified) InputTextFlagsCallbackCompletion InputTextFlags = 1 << 6 // Call user function on pressing TAB (for completion handling) InputTextFlagsCallbackHistory InputTextFlags = 1 << 7 // Call user function on pressing Up/Down arrows (for history handling) InputTextFlagsCallbackAlways InputTextFlags = 1 << 8 // Call user function every time. User code may query cursor position modify text buffer. InputTextFlagsCallbackCharFilter InputTextFlags = 1 << 9 // Call user function to filter character. Modify data->EventChar to replace/filter input or return 1 to discard character. 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 InputTextFlagsAlwaysInsertMode InputTextFlags = 1 << 13 // Insert 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) // [Internal] InputTextFlagsMultiline InputTextFlags = 1 << 20 // For internal use by InputTextMultiline() )
type ItemFlags ¶
type ItemFlags int
const ( ItemFlagsAllowKeyboardFocus ItemFlags = 1 << 0 // true ItemFlagsButtonRepeat ItemFlags = 1 << 1 // false // Button() will return true multiple times based on io.KeyRepeatDelay and io.KeyRepeatRate settings. ItemFlagsDisabled ItemFlags = 1 << 2 // false // FIXME-WIP: Disable interactions but doesn't affect visuals. Should be: grey out and disable interactions with widgets that affect data + view widgets (WIP) ItemFlagsSelectableDontClosePopup ItemFlags = 1 << 5 // false // MenuItem/Selectable() automatically closes current Popup window ItemFlagsDefault_ ItemFlags = ItemFlagsAllowKeyboardFocus )
type ItemHoveredDataBackup ¶
type ItemHoveredDataBackup struct {
LastItemId ID
LastItemStatusFlags ItemStatusFlags
LastItemRect f64.Rectangle
LastItemDisplayRect f64.Rectangle
}
func (*ItemHoveredDataBackup) Backup ¶
func (b *ItemHoveredDataBackup) Backup(c *Context)
func (*ItemHoveredDataBackup) Restore ¶
func (b *ItemHoveredDataBackup) Restore(c *Context)
type ItemStatusFlags ¶
type ItemStatusFlags int
const ( ItemStatusFlagsHoveredRect ItemStatusFlags = 1 << 0 ItemStatusFlagsHasDisplayRect ItemStatusFlags = 1 << 1 )
type Key ¶
type Key int
const ( KeyTab Key = iota KeyLeftArrow KeyRightArrow KeyUpArrow KeyDownArrow KeyPageUp KeyPageDown KeyHome KeyEnd KeyInsert KeyDelete KeyBackspace KeySpace KeyEnter KeyEscape KeyA // for text edit CTRL+A: select all KeyC // for text edit CTRL+C: copy KeyV // for text edit CTRL+V: paste KeyX // for text edit CTRL+X: cut KeyY // for text edit CTRL+Y: redo KeyZ // for text edit CTRL+Z: undo KeyCOUNT )
type LayoutType ¶
type LayoutType int
const ( LayoutTypeVertical LayoutType = iota LayoutTypeHorizontal )
type ListClipper ¶
type ListClipper struct {
Ctx *Context
StartPosY float64
ItemsHeight float64
ItemsCount, StepNo, DisplayStart, DisplayEnd int
}
Helper: Manually clip large list of items. If you are submitting lots of evenly spaced items and you have a random access to the list, you can perform coarse clipping based on visibility to save yourself from processing those items at all. The clipper calculates the range of visible items and advance the cursor to compensate for the non-visible items we have skipped. ImGui already clip items based on their bounds but it needs to measure text size to do so. Coarse clipping before submission makes this cost and your own data fetching/submission cost null. Usage:
ImGuiListClipper clipper(1000); // we have 1000 elements, evenly spaced.
while (clipper.Step())
for (int i = clipper.DisplayStart; i < clipper.DisplayEnd; i++)
ImGui::Text("line number %d", i);
- Step 0: the clipper let you process the first element, regardless of it being visible or not, so we can measure the element height (step skipped if we passed a known height as second arg to constructor). - Step 1: the clipper infer height from first element, calculate the actual range of elements to display, and position the cursor before the first element. - (Step 2: dummy step only required if an explicit items_height was passed to constructor or Begin() and user call Step(). Does nothing and switch to Step 3.) - Step 3: the clipper validate that we have reached the expected Y position (corresponding to element DisplayEnd), advance the cursor to the end of the list and then returns 'false' to end the loop.
func (*ListClipper) Begin ¶
func (l *ListClipper) Begin(items_count int, items_height float64)
func (*ListClipper) End ¶
func (l *ListClipper) End()
func (*ListClipper) Init ¶
func (l *ListClipper) Init(ctx *Context, items_count int, items_height float64)
func (*ListClipper) Step ¶
func (l *ListClipper) Step() bool
type MenuColumns ¶
type MenuColumns struct {
Count int
Spacing float64
Width, NextWidth float64
Pos, NextWidths [4]float64
}
func (*MenuColumns) DeclColumns ¶
func (m *MenuColumns) DeclColumns(w0, w1, w2 float64) float64
type MouseCursor ¶
type MouseCursor int
const ( MouseCursorNone MouseCursor = -1 + iota MouseCursorArrow MouseCursorTextInput // When hovering over InputText, etc. MouseCursorResizeAll // Unused MouseCursorResizeNS // When hovering over an horizontal border MouseCursorResizeEW // When hovering over a vertical border or a column MouseCursorResizeNESW // When hovering over the bottom-left corner of a window MouseCursorResizeNWSE // When hovering over the bottom-right corner of a window MouseCursorCOUNT )
type NavInput ¶
type NavInput int
const ( // Gamepad Mapping // [Internal] Don't use directly! This is used internally to differentiate keyboard from gamepad inputs for behaviors that require to differentiate them. // Keyboard behavior that have no corresponding gamepad mapping (e.g. CTRL+TAB) will be directly reading from io.KeysDown[] instead of io.NavInputs[]. )
type NavMoveResult ¶
type NavMoveResult struct {
}
func (*NavMoveResult) Clear ¶
func (n *NavMoveResult) Clear()
type NextWindowData ¶
type NextWindowData struct {
PosCond Cond
SizeCond Cond
ContentSizeCond Cond
CollapsedCond Cond
SizeConstraintCond Cond
FocusCond Cond
BgAlphaCond Cond
PosVal f64.Vec2
PosPivotVal f64.Vec2
SizeVal f64.Vec2
ContentSizeVal f64.Vec2
CollapsedVal bool
SizeConstraintRect f64.Rectangle
SizeCallback func(*SizeCallbackData)
BgAlphaVal float64
MenuBarOffsetMinVal f64.Vec2 // This is not exposed publicly, so we don't clear it.
}
func (*NextWindowData) Clear ¶
func (n *NextWindowData) Clear()
func (*NextWindowData) Init ¶
func (n *NextWindowData) Init()
type Payload ¶
type Payload struct {
Data interface{}
SourceId ID // Source item id
SourceParentId ID // Source parent id (if available)
DataFrameCount int // Data timestamp
Preview bool // Set when AcceptDragDropPayload() was called and mouse has been hovering the target item (nb: handle overlapping drag targets)
Delivery bool // Set when AcceptDragDropPayload() was called and mouse button is released over the target item.
}
type PopupPositionPolicy ¶
type PopupPositionPolicy int
const ( PopupPositionPolicyDefault PopupPositionPolicy = iota PopupPositionPolicyComboBox )
type PopupRef ¶
type PopupRef struct {
PopupId ID // Set on OpenPopup()
Window *Window // Resolved on BeginPopup() - may stay unresolved if user never calls OpenPopup()
ParentWindow *Window // Set on OpenPopup()
OpenFrameCount int // Set on OpenPopup()
OpenParentId ID // Set on OpenPopup(), we need this to differenciate multiple menu sets from each others (e.g. inside menu bar vs loose menu items)
OpenPopupPos f64.Vec2 // Set on OpenPopup(), preferred popup position (typically == OpenMousePos when using mouse)
OpenMousePos f64.Vec2 // Set on OpenPopup(), copy of mouse position at the time of opening popup
}
type ResizeGripDef ¶
type SelectableFlags ¶
type SelectableFlags int
const ( SelectableFlagsDontClosePopups SelectableFlags = 1 << 0 // Clicking this don't close parent popup window SelectableFlagsSpanAllColumns SelectableFlags = 1 << 1 // Selectable frame can span all columns (text will still fit in current column) SelectableFlagsAllowDoubleClick SelectableFlags = 1 << 2 // Generate press events on double clicks too // NB: need to be in sync with last value of ImGuiSelectableFlags_ SelectableFlagsMenu SelectableFlags = 1 << 3 // -> PressedOnClick SelectableFlagsMenuItem SelectableFlags = 1 << 4 // -> PressedOnRelease SelectableFlagsDisabled SelectableFlags = 1 << 5 SelectableFlagsDrawFillAvailWidth SelectableFlags = 1 << 6 )
type SeparatorFlags ¶
type SeparatorFlags int
const ( SeparatorFlagsHorizontal SeparatorFlags = 1 << 0 // Axis default to current layout type, so generally Horizontal unless e.g. in a menu bar SeparatorFlagsVertical SeparatorFlags = 1 << 1 )
type SettingsHandler ¶
type SettingsHandler struct {
TypeName string // Short description stored in .ini file. Disallowed characters: '[' ']'
ReadOpenFn func(ctx *Context, handler *SettingsHandler, name string) interface{}
ReadLineFn func(ctx *Context, handler *SettingsHandler, entry interface{}, line string)
WriteAllFn func(ctx *Context, handler *SettingsHandler, out_buf io.Writer)
}
type SizeCallbackData ¶
type SizeCallbackData struct {
Pos f64.Vec2 // Read-only. Window position, for reference.
CurrentSize f64.Vec2 // Read-only. Current window size.
DesiredSize f64.Vec2 // Read-write. Desired size, based on user's mouse position. Write to this field to restrain resizing.
}
Resizing callback data to apply custom constraint. As enabled by SetNextWindowSizeConstraints(). Callback is called during the next Begin(). NB: For basic min/max size constraint on each axis you don't need to use the callback! The SetNextWindowSizeConstraints() parameters are enough.
type Style ¶
type Style struct {
Alpha float64 // Global alpha applies to everything in ImGui.
WindowPadding f64.Vec2 // Padding within a window.
WindowRounding float64 // Radius of window corners rounding. Set to 0.0f to have rectangular windows.
WindowBorderSize float64 // Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
WindowMinSize f64.Vec2 // Minimum window size. This is a global setting. If you want to constraint individual windows, use SetNextWindowSizeConstraints().
WindowTitleAlign f64.Vec2 // Alignment for title bar text. Defaults to (0.0,0.5f) for left-aligned,vertically centered.
ChildRounding float64 // Radius of child window corners rounding. Set to 0.0f to have rectangular windows.
ChildBorderSize float64 // Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
PopupRounding float64 // Radius of popup window corners rounding.
PopupBorderSize float64 // Thickness of border around popup windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
FramePadding f64.Vec2 // Padding within a framed rectangle (used by most widgets).
FrameRounding float64 // Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets).
FrameBorderSize float64 // Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly).
ItemSpacing f64.Vec2 // Horizontal and vertical spacing between widgets/lines.
ItemInnerSpacing f64.Vec2 // Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label).
TouchExtraPadding f64.Vec2 // Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much!
IndentSpacing float64 // Horizontal indentation when e.g. entering a tree node. Generally == (FontSize + FramePadding.x*2).
ColumnsMinSpacing float64 // Minimum horizontal spacing between two columns.
ScrollbarSize float64 // Width of the vertical scrollbar, Height of the horizontal scrollbar.
ScrollbarRounding float64 // Radius of grab corners for scrollbar.
GrabMinSize float64 // Minimum width/height of a grab box for slider/scrollbar.
GrabRounding float64 // Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs.
ButtonTextAlign f64.Vec2 // Alignment of button text when button is larger than text. Defaults to (0.5,0.5f) for horizontally+vertically centered.
DisplayWindowPadding f64.Vec2 // Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows.
DisplaySafeAreaPadding f64.Vec2 // If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows. NB: Prefer configuring your TV sets correctly!
MouseCursorScale float64 // Scale software rendered mouse cursor (when io.MouseDrawCursor is enabled). May be removed later.
AntiAliasedLines bool // Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU.
AntiAliasedFill bool // Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.)
CurveTessellationTol float64 // Tessellation tolerance when using PathBezierCurveTo() without a specific number of segments. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality.
Colors [ColCOUNT]f64.Vec4
}
type StyleVar ¶
type StyleVar int
Enumeration for PushStyleVar() / PopStyleVar() to temporarily modify the ImGuiStyle structure. NB: the enum only refers to fields of ImGuiStyle which makes sense to be pushed/popped inside UI code. During initialization, feel free to just poke into ImGuiStyle directly. NB: if changing this enum, you need to update the associated internal table GStyleVarInfo[] accordingly. This is where we link enum values to members offset/type.
const ( // Enum name ......................// Member in ImGuiStyle structure (see ImGuiStyle for descriptions) StyleVarAlpha StyleVar = iota // float Alpha StyleVarWindowPadding // ImVec2 WindowPadding StyleVarWindowRounding // float WindowRounding StyleVarWindowBorderSize // float WindowBorderSize StyleVarWindowMinSize // ImVec2 WindowMinSize StyleVarWindowTitleAlign // ImVec2 WindowTitleAlign StyleVarChildRounding // float ChildRounding StyleVarChildBorderSize // float ChildBorderSize StyleVarPopupRounding // float PopupRounding StyleVarPopupBorderSize // float PopupBorderSize StyleVarFramePadding // ImVec2 FramePadding StyleVarFrameRounding // float FrameRounding StyleVarFrameBorderSize // float FrameBorderSize StyleVarItemSpacing // ImVec2 ItemSpacing StyleVarItemInnerSpacing // ImVec2 ItemInnerSpacing StyleVarIndentSpacing // float IndentSpacing StyleVarScrollbarSize // float ScrollbarSize StyleVarScrollbarRounding // float ScrollbarRounding StyleVarGrabMinSize // float GrabMinSize StyleVarGrabRounding // float GrabRounding StyleVarButtonTextAlign // ImVec2 ButtonTextAlign StyleVarCOUNT )
type TextEditCallback ¶
type TextEditCallback func(*TextEditCallbackData) int
type TextEditCallbackData ¶
type TextEditCallbackData struct {
EventFlag InputTextFlags // One of ImGuiInputTextFlags_Callback* // Read-only
Flags InputTextFlags // What user passed to InputText() // Read-only
ReadOnly bool // Read-only mode // Read-only
// CharFilter event:
EventChar rune // Character input // Read-write (replace character or set to zero)
// Completion,History,Always events:
// If you modify the buffer contents make sure you update 'BufTextLen' and set 'BufDirty' to true.
EventKey Key // Key pressed (Up/Down/TAB) // Read-only
Buf []byte // Current text buffer // Read-write (pointed data only, can't replace the actual pointer)
BufDirty bool // Set if you modify Buf/BufTextLen!! // Write
CursorPos int // // Read-write
SelectionStart int // // Read-write (== to SelectionEnd when no selection)
SelectionEnd int // // Read-write
}
Shared state of InputText(), passed to callback when a ImGuiInputTextFlags_Callback* flag is used and the corresponding callback is triggered.
type TextEditState ¶
type TextEditState struct {
Ctx *Context
Id ID // widget id owning the text state
Text []rune // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer.
InitialText []byte // backup of end-user buffer at the time of focus (in UTF-8, unaltered)
CurLenA, CurLenW int // we need to maintain our buffer length in both UTF-8 and wchar format.
BufSizeA int // end-user buffer size
ScrollX float64
StbState stbte.State
CursorAnim float64
CursorFollow bool
SelectedAllMouseLock bool
}
func (*TextEditState) ClearSelection ¶
func (t *TextEditState) ClearSelection()
func (*TextEditState) CursorAnimReset ¶
func (t *TextEditState) CursorAnimReset()
func (*TextEditState) CursorClamp ¶
func (t *TextEditState) CursorClamp()
func (*TextEditState) DeleteChars ¶
func (t *TextEditState) DeleteChars(pos, n int)
func (*TextEditState) GetChar ¶
func (t *TextEditState) GetChar(idx int) rune
func (*TextEditState) GetWidth ¶
func (t *TextEditState) GetWidth(line_start_idx, char_idx int) float64
func (*TextEditState) HasSelection ¶
func (t *TextEditState) HasSelection() bool
func (*TextEditState) Init ¶
func (t *TextEditState) Init(ctx *Context)
func (*TextEditState) InsertChars ¶
func (t *TextEditState) InsertChars(pos int, new_text []rune) bool
func (*TextEditState) LayoutRow ¶
func (t *TextEditState) LayoutRow(r *stbte.TextEditRow, line_start_idx int)
func (*TextEditState) Len ¶
func (t *TextEditState) Len() int
func (*TextEditState) MoveWordLeft ¶
func (t *TextEditState) MoveWordLeft(idx int) int
func (*TextEditState) MoveWordRight ¶
func (t *TextEditState) MoveWordRight(idx int) int
func (*TextEditState) OnKeyPressed ¶
func (t *TextEditState) OnKeyPressed(key int)
func (*TextEditState) SelectAll ¶
func (t *TextEditState) SelectAll()
type TextFilter ¶
Helper: Parse and apply text filters. In format "aaaaa[,bbbb][,ccccc]"
func (*TextFilter) Build ¶
func (t *TextFilter) Build()
func (*TextFilter) Draw ¶
func (t *TextFilter) Draw() bool
func (*TextFilter) Init ¶
func (t *TextFilter) Init(ctx *Context, default_filter string)
func (*TextFilter) IsActive ¶
func (t *TextFilter) IsActive() bool
func (*TextFilter) PassFilter ¶
func (t *TextFilter) PassFilter(text string) bool
type TreeNodeFlags ¶
type TreeNodeFlags int
const ( TreeNodeFlagsSelected TreeNodeFlags = 1 << 0 // Draw as selected TreeNodeFlagsFramed TreeNodeFlags = 1 << 1 // Full colored frame (e.g. for CollapsingHeader) TreeNodeFlagsAllowItemOverlap TreeNodeFlags = 1 << 2 // Hit testing to allow subsequent widgets to overlap this one TreeNodeFlagsNoTreePushOnOpen TreeNodeFlags = 1 << 3 // Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack TreeNodeFlagsNoAutoOpenOnLog TreeNodeFlags = 1 << 4 // Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) TreeNodeFlagsDefaultOpen TreeNodeFlags = 1 << 5 // Default node to be open TreeNodeFlagsOpenOnDoubleClick TreeNodeFlags = 1 << 6 // Need double-click to open node TreeNodeFlagsOpenOnArrow TreeNodeFlags = 1 << 7 // Only open when clicking on the arrow part. If TreeNodeFlagsOpenOnDoubleClick is also set single-click arrow or double-click all box to open. TreeNodeFlagsLeaf TreeNodeFlags = 1 << 8 // No collapsing no arrow (use as a convenience for leaf nodes). TreeNodeFlagsBullet TreeNodeFlags = 1 << 9 // Display a bullet instead of arrow TreeNodeFlagsFramePadding TreeNodeFlags = 1 << 10 // Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height. Equivalent to calling AlignTextToFramePadding(). //ImGuITreeNodeFlags_SpanAllAvailWidth TreeNodeFlags = 1 << 11 // FIXME: TODO: Extend hit box horizontally even if not framed //TreeNodeFlagsNoScrollOnOpen TreeNodeFlags = 1 << 12 // FIXME: TODO: Disable automatic scroll on TreePop() if node got just open and contents is not visible TreeNodeFlagsCollapsingHeader TreeNodeFlags = TreeNodeFlagsFramed | TreeNodeFlagsNoAutoOpenOnLog )
type Window ¶
type Window struct {
Ctx *Context
Name string
ID ID // == ImHash(Name)
Flags WindowFlags // See enum ImGuiWindowFlags_
Pos f64.Vec2 // Position rounded-up to nearest pixel
Size f64.Vec2 // Current size (==SizeFull or collapsed title bar size)
SizeFull f64.Vec2 // Size when non collapsed
SizeFullAtLastBegin f64.Vec2 // Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars.
SizeContents f64.Vec2 // Size of contents (== extents reach of the drawing cursor) from previous frame. Include decoration, window title, border, menu, etc.
SizeContentsExplicit f64.Vec2 // Size of contents explicitly set by the user via SetNextWindowContentSize()
ContentsRegionRect f64.Rectangle // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis
WindowPadding f64.Vec2 // Window padding at the time of begin.
WindowRounding float64 // Window rounding at the time of begin.
WindowBorderSize float64 // Window border size at the time of begin.
MoveId ID // == window->GetID("#MOVE")
ChildId ID // Id of corresponding item in parent window (for child windows)
Scroll f64.Vec2
ScrollTarget f64.Vec2 // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change)
ScrollTargetCenterRatio f64.Vec2 // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered
ScrollbarSizes f64.Vec2
ScrollbarX, ScrollbarY bool
Active bool // Set to true on Begin(), unless Collapsed
WasActive bool
WriteAccessed bool // Set to true when any widget access the current window
Collapsed bool // Set when collapsing window to become only title-bar
CollapseToggleWanted bool
SkipItems bool // Set when items can safely be all clipped (e.g. window not visible or collapsed)
Appearing bool // Set during the frame where the window is appearing (or re-appearing)
CloseButton bool // Set when the window has a close button (p_open != NULL)
BeginOrderWithinParent int // Order within immediate parent window, if we are a child window. Otherwise 0.
BeginOrderWithinContext int // Order within entire imgui context. This is mostly used for debugging submission order related issues.
BeginCount int // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs)
PopupId ID // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling)
AutoFitFramesX, AutoFitFramesY int
AutoFitOnlyGrows bool
AutoFitChildAxises int
AutoPosLastDirection Dir
HiddenFrames int
SetWindowPosAllowFlags Cond // store acceptable condition flags for SetNextWindowPos() use.
SetWindowSizeAllowFlags Cond // store acceptable condition flags for SetNextWindowSize() use.
SetWindowCollapsedAllowFlags Cond // store acceptable condition flags for SetNextWindowCollapsed() use.
SetWindowPosVal f64.Vec2 // store window position when using a non-zero Pivot (position set needs to be processed when we know the window size)
SetWindowPosPivot f64.Vec2 // store window pivot for positioning. ImVec2(0,0) when positioning from top-left corner; ImVec2(0.5f,0.5f) for centering; ImVec2(1,1) for bottom right.
DC DrawContext // Temporary per-window data, reset at the beginning of the frame
IDStack []ID // ID stack. ID are hashes seeded with the value at the top of the stack
ClipRect f64.Rectangle // = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2.
WindowRectClipped f64.Rectangle // = WindowRect just after setup in Begin(). == window->Rect() for root window.
InnerRect, InnerClipRect f64.Rectangle
LastFrameActive int
ItemWidthDefault float64
MenuColumns MenuColumns // Simplified columns storage for menu items
StateStorage map[ID]interface{}
ColumnsStorage []ColumnsSet
FontWindowScale float64 // User scale multiplier per-window
DrawList *DrawList // == &DrawListInst (for backward compatibility reason with code using imgui_internal.h we keep this a pointer)
DrawListInst DrawList
ParentWindow *Window // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL.
RootWindow *Window // Point to ourself or first ancestor that is not a child window.
RootWindowForTitleBarHighlight *Window // Point to ourself or first ancestor which will display TitleBgActive color when this window is active.
RootWindowForTabbing *Window // Point to ourself or first ancestor which can be CTRL-Tabbed into.
// Navigation / Focus
// FIXME-NAV: Merge all this with the new Nav system, at least the request variables should be moved to ImGuiContext
FocusIdxAllCounter int // Start at -1 and increase as assigned via FocusItemRegister()
FocusIdxTabCounter int // (same, but only count widgets which you can Tab through)
FocusIdxAllRequestCurrent int // Item being requested for focus
FocusIdxTabRequestCurrent int // Tab-able item being requested for focus
FocusIdxAllRequestNext int // Item being requested for focus, for next update (relies on layout to be stable between the frame pressing TAB and the next frame)
FocusIdxTabRequestNext int // "
}
func (*Window) CalcFontSize ¶
func (*Window) GetIDFromRectangle ¶
This is only used in rare/specific situations to manufacture an ID out of nowhere.
func (*Window) GetIDNoKeepAlive ¶
func (*Window) GetWindowBgColorIdxFromFlags ¶
func (w *Window) GetWindowBgColorIdxFromFlags(flags WindowFlags) Col
func (*Window) MenuBarHeight ¶
func (*Window) MenuBarRect ¶
func (*Window) TitleBarHeight ¶
func (*Window) TitleBarRect ¶
type WindowFlags ¶
type WindowFlags int
const ( WindowFlagsNoTitleBar WindowFlags = 1 << 0 // Disable title-bar WindowFlagsNoResize WindowFlags = 1 << 1 // Disable user resizing with the lower-right grip WindowFlagsNoMove WindowFlags = 1 << 2 // Disable user moving the window WindowFlagsNoScrollbar WindowFlags = 1 << 3 // Disable scrollbars (window can still scroll with mouse or programatically) WindowFlagsNoScrollWithMouse WindowFlags = 1 << 4 // Disable user vertically scrolling with mouse wheel. On child window mouse wheel will be forwarded to the parent unless NoScrollbar is also set. WindowFlagsNoCollapse WindowFlags = 1 << 5 // Disable user collapsing window by double-clicking on it WindowFlagsAlwaysAutoResize WindowFlags = 1 << 6 // Resize every window to its content every frame //WindowFlagsShowBorders WindowFlags = 1 << 7 // Show borders around windows and items (OBSOLETE! Use e.g. style.FrameBorderSize=1.0f to enable borders). WindowFlagsNoSavedSettings WindowFlags = 1 << 8 // Never load/save settings in .ini file WindowFlagsNoInputs WindowFlags = 1 << 9 // Disable catching mouse or keyboard inputs hovering test with pass through. WindowFlagsMenuBar WindowFlags = 1 << 10 // Has a menu-bar WindowFlagsHorizontalScrollbar WindowFlags = 1 << 11 // Allow horizontal scrollbar to appear (off by default). You may use SetNextWindowContentSize(ImVec2(width0.0f)); prior to calling Begin() to specify width. Read code in imgui_demo in the "Horizontal Scrolling" section. WindowFlagsNoFocusOnAppearing WindowFlags = 1 << 12 // Disable taking focus when transitioning from hidden to visible state WindowFlagsNoBringToFrontOnFocus WindowFlags = 1 << 13 // Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus) WindowFlagsAlwaysVerticalScrollbar WindowFlags = 1 << 14 // Always show vertical scrollbar (even if ContentSize.y < Size.y) WindowFlagsAlwaysHorizontalScrollbar WindowFlags = 1 << 15 // Always show horizontal scrollbar (even if ContentSize.x < Size.x) WindowFlagsAlwaysUseWindowPadding WindowFlags = 1 << 16 // Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows because more convenient) WindowFlagsResizeFromAnySide WindowFlags = 1 << 17 // (WIP) Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui. // [Internal] WindowFlagsChildWindow WindowFlags = 1 << 24 // Don't use! For internal use by BeginChild() WindowFlagsTooltip WindowFlags = 1 << 25 // Don't use! For internal use by BeginTooltip() WindowFlagsPopup WindowFlags = 1 << 26 // Don't use! For internal use by BeginPopup() WindowFlagsModal WindowFlags = 1 << 27 // Don't use! For internal use by BeginPopupModal() WindowFlagsChildMenu WindowFlags = 1 << 28 // Don't use! For internal use by BeginMenu() )