API Reference
CImGui.AcceptDragDropPayload
— FunctionAcceptDragDropPayload(type, flags=ImGuiDragDropFlags_(0)) -> Ptr{ImGuiPayload}
Missing Demo code. API may evolve.
CImGui.AddBezierCubic
— FunctionAddBezierCubic(handle::Ptr{ImDrawList}, pos0, cp0, cp1, pos1, col, thickness, num_segments=0)
CImGui.AddCallback
— MethodAddCallback(handle::Ptr{ImDrawList}, callback, callback_data)
Your rendering function must check for UserCallback
in ImDrawCmd and call the function instead of rendering triangles.
CImGui.AddCircle
— FunctionAddCircle(handle::Ptr{ImDrawList}, centre, radius, col, num_segments=12, thickness=1.0)
CImGui.AddCircleFilled
— FunctionAddCircleFilled(handle::Ptr{ImDrawList}, centre, radius, col, num_segments=12)
CImGui.AddConvexPolyFilled
— MethodAddConvexPolyFilled(handle::Ptr{ImDrawList}, points, num_points, col)
Anti-aliased filling requires points to be in clockwise order.
CImGui.AddDrawCmd
— MethodAddDrawCmd(handle::Ptr{ImDrawList})
This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible.
CImGui.AddFont
— MethodAddFont(self::Ptr{ImFontAtlas}, font_cfg) -> Ptr{ImFont}
CImGui.AddFontDefault
— FunctionAddFontDefault(self::Ptr{ImFontAtlas}, font_cfg=C_NULL) -> Ptr{ImFont}
CImGui.AddFontFromFileTTF
— FunctionAddFontFromFileTTF(self::Ptr{ImFontAtlas}, filename, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
CImGui.AddFontFromMemoryCompressedBase85TTF
— FunctionAddFontFromMemoryCompressedBase85TTF(self::Ptr{ImFontAtlas}, compressed_font_data_base85, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
'compressedfontdata_base85' still owned by caller.
CImGui.AddFontFromMemoryCompressedTTF
— FunctionAddFontFromMemoryCompressedTTF(self::Ptr{ImFontAtlas}, compressed_font_data, compressed_font_size, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
'compressedfontdata' still owned by caller.
CImGui.AddFontFromMemoryTTF
— FunctionAddFontFromMemoryTTF(self::Ptr{ImFontAtlas}, font_data, font_size, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
Transfer ownership of 'ttfdata' to ImFontAtlas! Will be deleted after destruction of the atlas. Set `fontcfg.FontDataOwnedByAtlas=false` to keep ownership of your data and it won't be freed.
CImGui.AddImage
— FunctionAddImage(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a=(0,0), uv_b=(1,1), col=0xffffffff)
CImGui.AddImageQuad
— FunctionAddImageQuad(handle::Ptr{ImDrawList}, user_texture_id, a, b, c, d, uv_a=(0,0), uv_b=(1,0), uv_c=(1,1), uv_d=(0,1), col=0xffffffff)
CImGui.AddImageRounded
— FunctionAddImageRounded(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners=ImDrawFlags_All)
CImGui.AddInputCharacter
— MethodAddInputCharacter(io::Ptr{ImGuiIO}, c)
Add new character into InputCharacters[]
.
CImGui.AddInputCharactersUTF8
— MethodAddInputCharactersUTF8(io::Ptr{ImGuiIO}, utf8_chars)
Add new characters into InputCharacters[]
from an UTF-8 string.
CImGui.AddLine
— FunctionAddLine(handle::Ptr{ImDrawList}, a, b, col, thickness=1.0)
CImGui.AddPolyline
— MethodAddPolyline(handle::Ptr{ImDrawList}, points, num_points, col, closed, thickness)
CImGui.AddQuad
— FunctionAddQuad(handle::Ptr{ImDrawList}, a, b, c, d, col, thickness=1.0)
CImGui.AddQuadFilled
— MethodAddQuadFilled(handle::Ptr{ImDrawList}, a, b, c, d, col)
CImGui.AddRect
— FunctionAddRect(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll, thickness=1.0)
Arguments
a
: upper-leftb
: lower-rightrounding_corners_flags
: 4-bits corresponding to which corner to round
CImGui.AddRectFilled
— FunctionAddRectFilled(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll)
Arguments
a
: upper-leftb
: lower-right
CImGui.AddRectFilledMultiColor
— MethodAddRectFilledMultiColor(handle::Ptr{ImDrawList}, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left)
CImGui.AddText
— FunctionAddText(handle::Ptr{ImDrawList}, font::Ptr{ImFont}, font_size, pos, col, text_begin, text_end=C_NULL, wrap_width=0.0, cpu_fine_clip_rect=C_NULL)
CImGui.AddText
— FunctionAddText(handle::Ptr{ImDrawList}, pos, col, text_begin, text_end=C_NULL)
CImGui.AddTriangle
— FunctionAddTriangle(handle::Ptr{ImDrawList}, a, b, c, col, thickness=1.0)
CImGui.AddTriangleFilled
— MethodAddTriangleFilled(handle::Ptr{ImDrawList}, a, b, c, col)
CImGui.AlignTextToFramePadding
— MethodAlignTextToFramePadding()
Vertically align upcoming text baseline to FramePadding.y
so that it will align properly to regularly framed items (call if you have text on a line before a framed item).
CImGui.Append
— FunctionAppend(handle::Ptr{ImGuiTextBuffer}, str, str_end=C_NULL)
Text buffer for logging/accumulating text.
CImGui.ArrowButton
— MethodArrowButton(str_id, dir) -> Bool
Return true when the value has been changed or when pressed/selected. Create a square button with an arrow shape.
CImGui.Begin
— FunctionBegin(name, p_open=C_NULL, flags=0) -> Bool
Push window to the stack and start appending to it.
Usage
- you may append multiple times to the same window during the same frame.
- passing
p_open != C_NULL
shows a window-closing widget in the upper-right corner of the window, which clicking will set the boolean to false when clicked. Begin
return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
Always call a matching End
for each Begin
call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu
/EndMenu
, BeginPopup
/EndPopup
, etc.) where the EndXXX
call should only be called if the corresponding BeginXXX
function returned true.
CImGui.Begin
— FunctionBegin(handle::Ptr{ImGuiListClipper}, items_count, items_height=-1.0)
Automatically called by constructor if you passed items_count
or by Step
in Step 1.
CImGui.Begin
— MethodBegin(handle::Ptr{ImGuiTextBuffer}) -> Cstring
CImGui.BeginChild
— FunctionBeginChild(str_id, size=(0,0), border=false, flags=0) -> Bool
-BeginChild(id::Integer, size=(0,0), border=false, flags=0) -> Bool
Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
Return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
For each independent axis of size
:
x == 0.0
: use remaining host window sizex > 0.0
: fixed sizex < 0.0
: use remaining window size minus abs(size)
Each axis can use a different mode, e.g. ImVec2(0,400)
.
Always call a matching EndChild
for each BeginChild
call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu
/EndMenu
, BeginPopup
/EndPopup
, etc.) where the EndXXX
call should only be called if the corresponding BeginXXX
function returned true.
CImGui.BeginChildFrame
— FunctionBeginChildFrame(id, size, flags=0) -> Bool
Helper to create a child window / scrolling region that looks like a normal widget frame.
CImGui.BeginCombo
— FunctionBeginCombo(label, preview_value, flags=0) -> Bool
The new BeginCombo
/EndCombo
api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable
items.
CImGui.BeginDragDropSource
— FunctionBeginDragDropSource(flags=ImGuiDragDropFlags_(0)) -> bool
Call when the current item is active. If this return true, you can call SetDragDropPayload
+ EndDragDropSource
.
Missing Demo code. API may evolve.
CImGui.BeginDragDropTarget
— MethodBeginDragDropTarget() -> bool
Call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload
+ EndDragDropTarget
.
Missing Demo code. API may evolve.
CImGui.BeginGroup
— MethodBeginGroup()
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.
CImGui.BeginListBox
— FunctionBeginListBox(label, size=(0,0))
Use if you want to reimplement ListBox
will custom data or interactions. If the function return true, you can output elements then call EndListBox
afterwards.
CImGui.BeginMainMenuBar
— MethodBeginMainMenuBar() -> Bool
Create and append to a full screen menu-bar.
CImGui.BeginMenu
— FunctionBeginMenu(label, enabled=true) -> Bool
Create a sub-menu entry. only call EndMenu() if this returns true!
CImGui.BeginMenuBar
— MethodBeginMenuBar() -> Bool
Append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar
flag set on parent window).
CImGui.BeginPopup
— FunctionBeginPopup(str_id, flags=0) -> Bool
Return true if the popup is open, and you can start outputting to it.
Only call EndPopup
if BeginPopup
returns true!
CImGui.BeginPopupContextItem
— FunctionBeginPopupContextItem(str_id=C_NULL, flags=1) -> Bool
Helper to open and begin popup when clicked on last item. if you can pass a CNULL strid only if the previous item had an id. If you want to use that on a non-interactive item such as Text
you need to pass in an explicit ID here.
CImGui.BeginPopupContextVoid
— FunctionBeginPopupContextVoid(str_id=C_NULL, popup_flags=1) -> Bool
Helper to open and begin popup when clicked in void (where there are no imgui windows).
CImGui.BeginPopupContextWindow
— FunctionBeginPopupContextWindow(str_id=C_NULL, popup_flags=1) -> Bool
Helper to open and begin popup when clicked on current window.
CImGui.BeginPopupModal
— FunctionBeginPopupModal(name, p_open=C_NULL, flags=0) -> Bool
Modal dialog (regular window with title bar, block interactions behind the modal window, can't close the modal window by clicking outside).
CImGui.BeginTabBar
— FunctionigBeginTabBar(str_id, flags=ImGuiTabBarFlags_(0)) -> Bool
Create and append into a TabBar.
API may evolve!
CImGui.BeginTabItem
— FunctionBeginTabItem(label, p_open=C_NULL, flags=ImGuiTabItemFlags_(0)) -> Bool
API may evolve!
CImGui.BeginTable
— FunctionBeginTable(str_id, columns_count, flags = ImGuiTableFlags_(0), outer_size = ImVec2(0,0), inner_width = 0.0) -> Bool
Begin a table entry.
CImGui.BeginTooltip
— MethodBeginTooltip()
Begin/append a tooltip window to create full-featured tooltip (with any kind of items).
CImGui.Build
— MethodBuild(self::Ptr{ImFontAtlas}) -> Bool
Build pixels data. This is called automatically for you by the GetTexData*** functions.
CImGui.Bullet
— MethodBullet()
Draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
CImGui.BulletText
— MethodBulletText(formatted_text)
Formatting is not supported which means you need to pass a formatted string to this function. It's recommended to use Julia stdlib Printf
's @sprintf
as a workaround when translating C/C++ code to Julia.
CImGui.Button
— FunctionButton(label) -> Bool
-Button(label, size) -> Bool
Return true when the value has been changed or when pressed/selected.
CImGui.C_str
— MethodC_str(handle::Ptr{ImGuiTextBuffer}) -> Cstring
CImGui.CalcItemWidth
— MethodCalcItemWidth() -> Cfloat
Return width of item given pushed settings and current cursor position.
CImGui.CalcTextSize
— FunctionCalcTextSize(text, text_end=C_NULL, hide_text_after_double_hash=false, wrap_width=-1) -> ImVec2
CImGui.ChannelsMerge
— MethodChannelsMerge(handle::Ptr{ImDrawList})
- Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
- Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
CImGui.ChannelsSetCurrent
— MethodChannelsSetCurrent(handle::Ptr{ImDrawList}, channel_index)
- Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
- Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
CImGui.ChannelsSplit
— MethodChannelsSplit(handle::Ptr{ImDrawList}, channels_count)
- Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
- Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
CImGui.Checkbox
— MethodCheckbox(label, v) -> Bool
Return true when the value has been changed or when pressed/selected.
CImGui.CheckboxFlags
— MethodCheckboxFlags(label, flags, flags_value) -> Bool
Return true when the value has been changed or when pressed/selected.
CImGui.Clear
— MethodClear(self::Ptr{ImFontAtlas})
Clear all input and output.
CImGui.Clear
— MethodClear(handle::Ptr{ImGuiTextBuffer})
CImGui.ClearFonts
— MethodClearFonts(self::Ptr{ImFontAtlas})
Clear output font data (glyphs storage, UV coordinates).
CImGui.ClearInputCharacters
— MethodClearInputCharacters(io)
Clear the text input buffer manually.
CImGui.ClearInputData
— MethodClearInputData(self::Ptr{ImFontAtlas})
Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts.
CImGui.ClearTexData
— MethodClearTexData(self::Ptr{ImFontAtlas})
Clear output texture data (CPU side). Saves RAM once the texture has been copied to graphics memory.
CImGui.Clipper
— MethodClipper() -> Ptr{ImGuiListClipper}
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.
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.
Example
clipper = CImGui.Clipper()
+API Reference · CImGui.jl API Reference
CImGui.AcceptDragDropPayload
— FunctionAcceptDragDropPayload(type, flags=ImGuiDragDropFlags_(0)) -> Ptr{ImGuiPayload}
BETA API Missing Demo code. API may evolve.
sourceCImGui.AddBezierCubic
— FunctionAddBezierCubic(handle::Ptr{ImDrawList}, pos0, cp0, cp1, pos1, col, thickness, num_segments=0)
sourceCImGui.AddCallback
— MethodAddCallback(handle::Ptr{ImDrawList}, callback, callback_data)
Your rendering function must check for UserCallback
in ImDrawCmd and call the function instead of rendering triangles.
sourceCImGui.AddCircle
— FunctionAddCircle(handle::Ptr{ImDrawList}, centre, radius, col, num_segments=12, thickness=1.0)
sourceCImGui.AddCircleFilled
— FunctionAddCircleFilled(handle::Ptr{ImDrawList}, centre, radius, col, num_segments=12)
sourceCImGui.AddConvexPolyFilled
— MethodAddConvexPolyFilled(handle::Ptr{ImDrawList}, points, num_points, col)
Note Anti-aliased filling requires points to be in clockwise order.
sourceCImGui.AddDrawCmd
— MethodAddDrawCmd(handle::Ptr{ImDrawList})
This is useful if you need to forcefully create a new draw call (to allow for dependent rendering / blending). Otherwise primitives are merged into the same draw-call as much as possible.
sourceCImGui.AddFont
— MethodAddFont(self::Ptr{ImFontAtlas}, font_cfg) -> Ptr{ImFont}
sourceCImGui.AddFontDefault
— FunctionAddFontDefault(self::Ptr{ImFontAtlas}, font_cfg=C_NULL) -> Ptr{ImFont}
sourceCImGui.AddFontFromFileTTF
— FunctionAddFontFromFileTTF(self::Ptr{ImFontAtlas}, filename, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
sourceCImGui.AddFontFromMemoryCompressedBase85TTF
— FunctionAddFontFromMemoryCompressedBase85TTF(self::Ptr{ImFontAtlas}, compressed_font_data_base85, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
'compressedfontdata_base85' still owned by caller.
sourceCImGui.AddFontFromMemoryCompressedTTF
— FunctionAddFontFromMemoryCompressedTTF(self::Ptr{ImFontAtlas}, compressed_font_data, compressed_font_size, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
'compressedfontdata' still owned by caller.
sourceCImGui.AddFontFromMemoryTTF
— FunctionAddFontFromMemoryTTF(self::Ptr{ImFontAtlas}, font_data, font_size, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
Note Transfer ownership of 'ttfdata' to ImFontAtlas! Will be deleted after destruction of the atlas. Set `fontcfg.FontDataOwnedByAtlas=false` to keep ownership of your data and it won't be freed.
sourceCImGui.AddImage
— FunctionAddImage(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a=(0,0), uv_b=(1,1), col=0xffffffff)
sourceCImGui.AddImageQuad
— FunctionAddImageQuad(handle::Ptr{ImDrawList}, user_texture_id, a, b, c, d, uv_a=(0,0), uv_b=(1,0), uv_c=(1,1), uv_d=(0,1), col=0xffffffff)
sourceCImGui.AddImageRounded
— FunctionAddImageRounded(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners=ImDrawFlags_All)
sourceCImGui.AddInputCharacter
— MethodAddInputCharacter(io::Ptr{ImGuiIO}, c)
Add new character into InputCharacters[]
.
sourceCImGui.AddInputCharactersUTF8
— MethodAddInputCharactersUTF8(io::Ptr{ImGuiIO}, utf8_chars)
Add new characters into InputCharacters[]
from an UTF-8 string.
sourceCImGui.AddLine
— FunctionAddLine(handle::Ptr{ImDrawList}, a, b, col, thickness=1.0)
sourceCImGui.AddPolyline
— MethodAddPolyline(handle::Ptr{ImDrawList}, points, num_points, col, closed, thickness)
sourceCImGui.AddQuad
— FunctionAddQuad(handle::Ptr{ImDrawList}, a, b, c, d, col, thickness=1.0)
sourceCImGui.AddQuadFilled
— MethodAddQuadFilled(handle::Ptr{ImDrawList}, a, b, c, d, col)
sourceCImGui.AddRect
— FunctionAddRect(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll, thickness=1.0)
Arguments
a
: upper-leftb
: lower-rightrounding_corners_flags
: 4-bits corresponding to which corner to round
sourceCImGui.AddRectFilled
— FunctionAddRectFilled(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll)
Arguments
a
: upper-leftb
: lower-right
sourceCImGui.AddRectFilledMultiColor
— MethodAddRectFilledMultiColor(handle::Ptr{ImDrawList}, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left)
sourceCImGui.AddText
— FunctionAddText(handle::Ptr{ImDrawList}, font::Ptr{ImFont}, font_size, pos, col, text_begin, text_end=C_NULL, wrap_width=0.0, cpu_fine_clip_rect=C_NULL)
sourceCImGui.AddText
— FunctionAddText(handle::Ptr{ImDrawList}, pos, col, text_begin, text_end=C_NULL)
sourceCImGui.AddTriangle
— FunctionAddTriangle(handle::Ptr{ImDrawList}, a, b, c, col, thickness=1.0)
sourceCImGui.AddTriangleFilled
— MethodAddTriangleFilled(handle::Ptr{ImDrawList}, a, b, c, col)
sourceCImGui.AlignTextToFramePadding
— MethodAlignTextToFramePadding()
Vertically align upcoming text baseline to FramePadding.y
so that it will align properly to regularly framed items (call if you have text on a line before a framed item).
sourceCImGui.Append
— FunctionAppend(handle::Ptr{ImGuiTextBuffer}, str, str_end=C_NULL)
Text buffer for logging/accumulating text.
sourceCImGui.ArrowButton
— MethodArrowButton(str_id, dir) -> Bool
Return true when the value has been changed or when pressed/selected. Create a square button with an arrow shape.
sourceCImGui.Begin
— FunctionBegin(name, p_open=C_NULL, flags=0) -> Bool
Push window to the stack and start appending to it.
Usage
- you may append multiple times to the same window during the same frame.
- passing
p_open != C_NULL
shows a window-closing widget in the upper-right corner of the window, which clicking will set the boolean to false when clicked. Begin
return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
Note Always call a matching End
for each Begin
call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu
/EndMenu
, BeginPopup
/EndPopup
, etc.) where the EndXXX
call should only be called if the corresponding BeginXXX
function returned true.
sourceCImGui.Begin
— FunctionBegin(handle::Ptr{ImGuiListClipper}, items_count, items_height=-1.0)
Automatically called by constructor if you passed items_count
or by Step
in Step 1.
sourceCImGui.Begin
— MethodBegin(handle::Ptr{ImGuiTextBuffer}) -> Cstring
sourceCImGui.BeginChild
— FunctionBeginChild(str_id, size=(0,0), border=false, flags=0) -> Bool
+BeginChild(id::Integer, size=(0,0), border=false, flags=0) -> Bool
Use child windows to begin into a self-contained independent scrolling/clipping regions within a host window. Child windows can embed their own child.
Return false to indicate the window is collapsed or fully clipped, so you may early out and omit submitting anything to the window.
For each independent axis of size
:
x == 0.0
: use remaining host window sizex > 0.0
: fixed sizex < 0.0
: use remaining window size minus abs(size)
Each axis can use a different mode, e.g. ImVec2(0,400)
.
Note Always call a matching EndChild
for each BeginChild
call, regardless of its return value. This is due to legacy reason and is inconsistent with most other functions (such as BeginMenu
/EndMenu
, BeginPopup
/EndPopup
, etc.) where the EndXXX
call should only be called if the corresponding BeginXXX
function returned true.
sourceCImGui.BeginChildFrame
— FunctionBeginChildFrame(id, size, flags=0) -> Bool
Helper to create a child window / scrolling region that looks like a normal widget frame.
sourceCImGui.BeginCombo
— FunctionBeginCombo(label, preview_value, flags=0) -> Bool
The new BeginCombo
/EndCombo
api allows you to manage your contents and selection state however you want it, by creating e.g. Selectable
items.
sourceCImGui.BeginDragDropSource
— FunctionBeginDragDropSource(flags=ImGuiDragDropFlags_(0)) -> bool
Call when the current item is active. If this return true, you can call SetDragDropPayload
+ EndDragDropSource
.
BETA API Missing Demo code. API may evolve.
sourceCImGui.BeginDragDropTarget
— MethodBeginDragDropTarget() -> bool
Call after submitting an item that may receive a payload. If this returns true, you can call AcceptDragDropPayload
+ EndDragDropTarget
.
BETA API Missing Demo code. API may evolve.
sourceCImGui.BeginGroup
— MethodBeginGroup()
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.
sourceCImGui.BeginListBox
— FunctionBeginListBox(label, size=(0,0))
Use if you want to reimplement ListBox
will custom data or interactions. If the function return true, you can output elements then call EndListBox
afterwards.
sourceCImGui.BeginMainMenuBar
— MethodBeginMainMenuBar() -> Bool
Create and append to a full screen menu-bar.
sourceCImGui.BeginMenu
— FunctionBeginMenu(label, enabled=true) -> Bool
Create a sub-menu entry. only call EndMenu() if this returns true!
sourceCImGui.BeginMenuBar
— MethodBeginMenuBar() -> Bool
Append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar
flag set on parent window).
sourceCImGui.BeginPopup
— FunctionBeginPopup(str_id, flags=0) -> Bool
Return true if the popup is open, and you can start outputting to it.
Note Only call EndPopup
if BeginPopup
returns true!
sourceCImGui.BeginPopupContextItem
— FunctionBeginPopupContextItem(str_id=C_NULL, flags=1) -> Bool
Helper to open and begin popup when clicked on last item. if you can pass a CNULL strid only if the previous item had an id. If you want to use that on a non-interactive item such as Text
you need to pass in an explicit ID here.
sourceCImGui.BeginPopupContextVoid
— FunctionBeginPopupContextVoid(str_id=C_NULL, popup_flags=1) -> Bool
Helper to open and begin popup when clicked in void (where there are no imgui windows).
sourceCImGui.BeginPopupContextWindow
— FunctionBeginPopupContextWindow(str_id=C_NULL, popup_flags=1) -> Bool
Helper to open and begin popup when clicked on current window.
sourceCImGui.BeginPopupModal
— FunctionBeginPopupModal(name, p_open=C_NULL, flags=0) -> Bool
Modal dialog (regular window with title bar, block interactions behind the modal window, can't close the modal window by clicking outside).
sourceCImGui.BeginTabBar
— FunctionigBeginTabBar(str_id, flags=ImGuiTabBarFlags_(0)) -> Bool
Create and append into a TabBar.
BETA API API may evolve!
sourceCImGui.BeginTabItem
— FunctionBeginTabItem(label, p_open=C_NULL, flags=ImGuiTabItemFlags_(0)) -> Bool
BETA API API may evolve!
sourceCImGui.BeginTable
— FunctionBeginTable(str_id, columns_count, flags = ImGuiTableFlags_(0), outer_size = ImVec2(0,0), inner_width = 0.0) -> Bool
Begin a table entry.
sourceCImGui.BeginTooltip
— MethodBeginTooltip()
Begin/append a tooltip window to create full-featured tooltip (with any kind of items).
sourceCImGui.Build
— MethodBuild(self::Ptr{ImFontAtlas}) -> Bool
Build pixels data. This is called automatically for you by the GetTexData*** functions.
sourceCImGui.Bullet
— MethodBullet()
Draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses
sourceCImGui.BulletText
— MethodBulletText(formatted_text)
Limited support Formatting is not supported which means you need to pass a formatted string to this function. It's recommended to use Julia stdlib Printf
's @sprintf
as a workaround when translating C/C++ code to Julia.
sourceCImGui.Button
— FunctionButton(label) -> Bool
+Button(label, size) -> Bool
Return true when the value has been changed or when pressed/selected.
sourceCImGui.C_str
— MethodC_str(handle::Ptr{ImGuiTextBuffer}) -> Cstring
sourceCImGui.CalcItemWidth
— MethodCalcItemWidth() -> Cfloat
Return width of item given pushed settings and current cursor position.
sourceCImGui.CalcTextSize
— FunctionCalcTextSize(text, text_end=C_NULL, hide_text_after_double_hash=false, wrap_width=-1) -> ImVec2
sourceCImGui.ChannelsMerge
— MethodChannelsMerge(handle::Ptr{ImDrawList})
Tip - Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
- Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
sourceCImGui.ChannelsSetCurrent
— MethodChannelsSetCurrent(handle::Ptr{ImDrawList}, channel_index)
Tip - Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
- Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
sourceCImGui.ChannelsSplit
— MethodChannelsSplit(handle::Ptr{ImDrawList}, channels_count)
Tip - Use to simulate layers. By switching channels to can render out-of-order (e.g. submit foreground primitives before background primitives)
- Use to minimize draw calls (e.g. if going back-and-forth between multiple non-overlapping clipping rectangles, prefer to append into separate channels then merge at the end)
sourceCImGui.Checkbox
— MethodCheckbox(label, v) -> Bool
Return true when the value has been changed or when pressed/selected.
sourceCImGui.CheckboxFlags
— MethodCheckboxFlags(label, flags, flags_value) -> Bool
Return true when the value has been changed or when pressed/selected.
sourceCImGui.Clear
— MethodClear(self::Ptr{ImFontAtlas})
Clear all input and output.
sourceCImGui.Clear
— MethodClear(handle::Ptr{ImGuiTextBuffer})
sourceCImGui.ClearFonts
— MethodClearFonts(self::Ptr{ImFontAtlas})
Clear output font data (glyphs storage, UV coordinates).
sourceCImGui.ClearInputCharacters
— MethodClearInputCharacters(io)
Clear the text input buffer manually.
sourceCImGui.ClearInputData
— MethodClearInputData(self::Ptr{ImFontAtlas})
Clear input data (all ImFontConfig structures including sizes, TTF data, glyph ranges, etc.) = all the data used to build the texture and fonts.
sourceCImGui.ClearTexData
— MethodClearTexData(self::Ptr{ImFontAtlas})
Clear output texture data (CPU side). Saves RAM once the texture has been copied to graphics memory.
sourceCImGui.Clipper
— MethodClipper() -> Ptr{ImGuiListClipper}
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.
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.
Example
clipper = CImGui.Clipper()
Begin(clipper, 1000) # we have 1000 elements, evenly spaced.
while CImGui.Step()
dis_start = CImGui.Get(clipper, :DisplayStart)
dis_end = CImGui.Get(clipper, :DisplayEnd)-1
foreach(i->CImGui.Text("line number $i"), dis_start:dis_end)
-end
- 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.
Arguments
items_count
: use -1 to ignore (you can call Begin later). use INT_MAX
if you don't know how many items you have (in which case the cursor won't be advanced in the final step).items_height
: use -1.0 to be calculated automatically on first step. otherwise pass in the distance between your items, typically GetTextLineHeightWithSpacing
or GetFrameHeightWithSpacing
. If you don't specify an items_height
, you NEED to call Step
. If you specify items_height
you may call the old Begin
/End
api directly, but prefer calling Step
.
sourceCImGui.CloneOutput
— MethodCloneOutput(handle::Ptr{ImDrawList}) -> Ptr{ImDrawList}
Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer.
sourceCImGui.CloseCurrentPopup
— MethodCloseCurrentPopup()
Close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.
sourceCImGui.CollapsingHeader
— FunctionCollapsingHeader(label, p_open::Ref, flags=ImGuiTreeNodeFlags_(0)) -> Bool
When p_open
isn't C_NULL
, display an additional small close button on upper right of the header.
sourceCImGui.CollapsingHeader
— FunctionCollapsingHeader(label, flags=ImGuiTreeNodeFlags_(0)) -> Bool
If returning true
the header is open. Doesn't indent nor push on ID stack. User doesn't have to call TreePop
.
sourceCImGui.ColorButton
— FunctionColorButton(desc_id, col, flags=0, size=(0,0))
Display a colored square/button, hover for details, return true when pressed.
sourceCImGui.ColorConvertFloat4ToU32
— MethodColorConvertFloat4ToU32(in) -> ImU32
Convert ImVec4
color to ImU32
. You could use Base.convert(::Type{ImU32}, x::ImVec4)
instead.
sourceCImGui.ColorConvertU32ToFloat4
— MethodColorConvertU32ToFloat4(in) -> ImVec4
Convert ImU32
color to ImVec4
. You could use Base.convert(::Type{ImVec4}, x::ImU32)
instead.
sourceCImGui.ColorEdit3
— FunctionColorEdit3(label, col, flags=0) -> Bool
Tip this function has a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.
sourceCImGui.ColorEdit4
— FunctionColorEdit4(label, col, flags=0) -> Bool
Tip this function has a little colored preview square that can be left-clicked to open a picker, and right-clicked to open an option menu.
sourceCImGui.ColorPicker3
— FunctionColorPicker3(label, col, flags=0)
sourceCImGui.ColorPicker4
— FunctionColorPicker4(label, col, flags=0, ref_col=C_NULL)
sourceCImGui.Columns
— FunctionColumns(count=1, id=C_NULL, border=true)
Work in progress! You can also use SameLine(pos_x)
for simplified columns. The columns API is work-in-progress and rather lacking (columns are arguably the worst part of dear imgui at the moment!)
sourceCImGui.Combo
— FunctionCombo(label, current_item, items_getter::Union{Ptr,Base.CFunction}, data, items_count, popup_max_height_in_items=-1) -> Bool
sourceCImGui.Combo
— FunctionCombo(label, current_item, items::Vector, items_count, popup_max_height_in_items=-1) -> Bool
The old Combo
api are helpers over BeginCombo
/EndCombo
which are kept available for convenience purpose.
sourceCImGui.Combo
— FunctionCombo(label, current_item, items_separated_by_zeros, popup_max_height_in_items=-1) -> Bool
Separate items with