diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 4c2c8a7..8f0a81c 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-09-25T10:45:34","documenter_version":"1.0.1"}} \ No newline at end of file +{"documenter":{"julia_version":"1.9.3","generation_timestamp":"2023-09-25T16:08:35","documenter_version":"1.0.1"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index fce892f..5b8e733 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,34 +1,34 @@ -API Reference · CImGui.jl

API Reference

CImGui.AddCallbackMethod
AddCallback(handle::Ptr{ImDrawList}, callback, callback_data)

Your rendering function must check for UserCallback in ImDrawCmd and call the function instead of rendering triangles.

source
CImGui.AddCircleFunction
AddCircle(handle::Ptr{ImDrawList}, centre, radius, col, num_segments=12, thickness=1.0)
source
CImGui.AddConvexPolyFilledMethod
AddConvexPolyFilled(handle::Ptr{ImDrawList}, points, num_points, col)
Note

Anti-aliased filling requires points to be in clockwise order.

source
CImGui.AddDrawCmdMethod
AddDrawCmd(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.

source
CImGui.AddFontFromFileTTFFunction
AddFontFromFileTTF(self::Ptr{ImFontAtlas}, filename, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
source
CImGui.AddFontFromMemoryCompressedBase85TTFFunction
AddFontFromMemoryCompressedBase85TTF(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.

source
CImGui.AddFontFromMemoryCompressedTTFFunction
AddFontFromMemoryCompressedTTF(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.

source
CImGui.AddFontFromMemoryTTFFunction
AddFontFromMemoryTTF(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.

source
CImGui.AddImageFunction
AddImage(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a=(0,0), uv_b=(1,1), col=0xffffffff)
source
CImGui.AddImageQuadFunction
AddImageQuad(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)
source
CImGui.AddImageRoundedFunction
AddImageRounded(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners=ImDrawFlags_All)
source
CImGui.AddRectFunction
AddRect(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll, thickness=1.0)

Arguments

  • a: upper-left
  • b: lower-right
  • rounding_corners_flags: 4-bits corresponding to which corner to round
source
CImGui.AddRectFilledFunction
AddRectFilled(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll)

Arguments

  • a: upper-left
  • b: lower-right
source
CImGui.AddTextFunction
AddText(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)
source
CImGui.AddTextFunction
AddText(handle::Ptr{ImDrawList}, pos, col, text_begin, text_end=C_NULL)
source
CImGui.AlignTextToFramePaddingMethod
AlignTextToFramePadding()

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).

source
CImGui.AppendFunction
Append(handle::Ptr{ImGuiTextBuffer}, str, str_end=C_NULL)

Text buffer for logging/accumulating text.

source
CImGui.ArrowButtonMethod
ArrowButton(str_id, dir) -> Bool

Return true when the value has been changed or when pressed/selected. Create a square button with an arrow shape.

source
CImGui.BeginFunction
Begin(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.

source
CImGui.BeginFunction
Begin(handle::Ptr{ImGuiListClipper}, items_count, items_height=-1.0)

Automatically called by constructor if you passed items_count or by Step in Step 1.

source
CImGui.BeginChildFunction
BeginChild(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 size
  • x > 0.0: fixed size
  • x < 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.

source
CImGui.BeginChildFrameFunction
BeginChildFrame(id, size, flags=0) -> Bool

Helper to create a child window / scrolling region that looks like a normal widget frame.

source
CImGui.BeginListBoxFunction
BeginListBox(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.

source
CImGui.BeginMenuFunction
BeginMenu(label, enabled=true) -> Bool

Create a sub-menu entry. only call EndMenu() if this returns true!

source
CImGui.BeginMenuBarMethod
BeginMenuBar() -> Bool

Append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).

source
CImGui.BeginPopupContextItemFunction
BeginPopupContextItem(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.

source
CImGui.BeginPopupContextVoidFunction
BeginPopupContextVoid(str_id=C_NULL, popup_flags=1) -> Bool

Helper to open and begin popup when clicked in void (where there are no imgui windows).

source
CImGui.BeginPopupModalFunction
BeginPopupModal(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).

source
CImGui.BeginTabBarFunction
igBeginTabBar(str_id, flags=ImGuiTabBarFlags_(0)) -> Bool

Create and append into a TabBar.

BETA API

API may evolve!

source
CImGui.BeginTabItemFunction
BeginTabItem(label, p_open=C_NULL, flags=ImGuiTabItemFlags_(0)) -> Bool
BETA API

API may evolve!

source
CImGui.BeginTableFunction
BeginTable(str_id, columns_count, flags = ImGuiTableFlags_(0), outer_size = ImVec2(0,0), inner_width = 0.0) -> Bool

Begin a table entry.

source
CImGui.BeginTooltipMethod
BeginTooltip()

Begin/append a tooltip window to create full-featured tooltip (with any kind of items).

source
CImGui.BuildMethod
Build(self::Ptr{ImFontAtlas}) -> Bool

Build pixels data. This is called automatically for you by the GetTexData*** functions.

source
CImGui.BulletMethod
Bullet()

Draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses

source
CImGui.BulletTextMethod
BulletText(formatted_text)

Shortcut for Bullet+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.

source
CImGui.ButtonFunction
Button(label) -> Bool
-Button(label, size) -> Bool

Return true when the value has been changed or when pressed/selected.

source
CImGui.CalcItemWidthMethod
CalcItemWidth() -> Cfloat

Return width of item given pushed settings and current cursor position.

source
CImGui.CalcTextSizeFunction
CalcTextSize(text, text_end=C_NULL, hide_text_after_double_hash=false, wrap_width=-1) -> ImVec2
source
CImGui.ChannelsMergeMethod
ChannelsMerge(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)
source
CImGui.ChannelsSetCurrentMethod
ChannelsSetCurrent(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)
source
CImGui.ChannelsSplitMethod
ChannelsSplit(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)
source
CImGui.CheckboxMethod
Checkbox(label, v) -> Bool

Return true when the value has been changed or when pressed/selected.

source
CImGui.CheckboxFlagsMethod
CheckboxFlags(label, flags, flags_value) -> Bool

Return true when the value has been changed or when pressed/selected.

source
CImGui.ClearFontsMethod
ClearFonts(self::Ptr{ImFontAtlas})

Clear output font data (glyphs storage, UV coordinates).

source
CImGui.ClearInputDataMethod
ClearInputData(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.

source
CImGui.ClearTexDataMethod
ClearTexData(self::Ptr{ImFontAtlas})

Clear output texture data (CPU side). Saves RAM once the texture has been copied to graphics memory.

source
CImGui.ClipperMethod
Clipper() -> 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.AddCallbackMethod
AddCallback(handle::Ptr{ImDrawList}, callback, callback_data)

Your rendering function must check for UserCallback in ImDrawCmd and call the function instead of rendering triangles.

source
CImGui.AddCircleFunction
AddCircle(handle::Ptr{ImDrawList}, centre, radius, col, num_segments=12, thickness=1.0)
source
CImGui.AddConvexPolyFilledMethod
AddConvexPolyFilled(handle::Ptr{ImDrawList}, points, num_points, col)
Note

Anti-aliased filling requires points to be in clockwise order.

source
CImGui.AddDrawCmdMethod
AddDrawCmd(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.

source
CImGui.AddFontFromFileTTFFunction
AddFontFromFileTTF(self::Ptr{ImFontAtlas}, filename, size_pixels, font_cfg=C_NULL, glyph_ranges=C_NULL) -> Ptr{ImFont}
source
CImGui.AddFontFromMemoryCompressedBase85TTFFunction
AddFontFromMemoryCompressedBase85TTF(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.

source
CImGui.AddFontFromMemoryCompressedTTFFunction
AddFontFromMemoryCompressedTTF(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.

source
CImGui.AddFontFromMemoryTTFFunction
AddFontFromMemoryTTF(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.

source
CImGui.AddImageFunction
AddImage(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a=(0,0), uv_b=(1,1), col=0xffffffff)
source
CImGui.AddImageQuadFunction
AddImageQuad(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)
source
CImGui.AddImageRoundedFunction
AddImageRounded(handle::Ptr{ImDrawList}, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners=ImDrawFlags_All)
source
CImGui.AddRectFunction
AddRect(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll, thickness=1.0)

Arguments

  • a: upper-left
  • b: lower-right
  • rounding_corners_flags: 4-bits corresponding to which corner to round
source
CImGui.AddRectFilledFunction
AddRectFilled(handle::Ptr{ImDrawList}, a, b, col, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll)

Arguments

  • a: upper-left
  • b: lower-right
source
CImGui.AddTextFunction
AddText(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)
source
CImGui.AddTextFunction
AddText(handle::Ptr{ImDrawList}, pos, col, text_begin, text_end=C_NULL)
source
CImGui.AlignTextToFramePaddingMethod
AlignTextToFramePadding()

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).

source
CImGui.AppendFunction
Append(handle::Ptr{ImGuiTextBuffer}, str, str_end=C_NULL)

Text buffer for logging/accumulating text.

source
CImGui.ArrowButtonMethod
ArrowButton(str_id, dir) -> Bool

Return true when the value has been changed or when pressed/selected. Create a square button with an arrow shape.

source
CImGui.BeginFunction
Begin(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.

source
CImGui.BeginFunction
Begin(handle::Ptr{ImGuiListClipper}, items_count, items_height=-1.0)

Automatically called by constructor if you passed items_count or by Step in Step 1.

source
CImGui.BeginChildFunction
BeginChild(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 size
  • x > 0.0: fixed size
  • x < 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.

source
CImGui.BeginChildFrameFunction
BeginChildFrame(id, size, flags=0) -> Bool

Helper to create a child window / scrolling region that looks like a normal widget frame.

source
CImGui.BeginListBoxFunction
BeginListBox(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.

source
CImGui.BeginMenuFunction
BeginMenu(label, enabled=true) -> Bool

Create a sub-menu entry. only call EndMenu() if this returns true!

source
CImGui.BeginMenuBarMethod
BeginMenuBar() -> Bool

Append to menu-bar of current window (requires ImGuiWindowFlags_MenuBar flag set on parent window).

source
CImGui.BeginPopupContextItemFunction
BeginPopupContextItem(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.

source
CImGui.BeginPopupContextVoidFunction
BeginPopupContextVoid(str_id=C_NULL, popup_flags=1) -> Bool

Helper to open and begin popup when clicked in void (where there are no imgui windows).

source
CImGui.BeginPopupModalFunction
BeginPopupModal(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).

source
CImGui.BeginTabBarFunction
igBeginTabBar(str_id, flags=ImGuiTabBarFlags_(0)) -> Bool

Create and append into a TabBar.

BETA API

API may evolve!

source
CImGui.BeginTabItemFunction
BeginTabItem(label, p_open=C_NULL, flags=ImGuiTabItemFlags_(0)) -> Bool
BETA API

API may evolve!

source
CImGui.BeginTableFunction
BeginTable(str_id, columns_count, flags = ImGuiTableFlags_(0), outer_size = ImVec2(0,0), inner_width = 0.0) -> Bool

Begin a table entry.

source
CImGui.BeginTooltipMethod
BeginTooltip()

Begin/append a tooltip window to create full-featured tooltip (with any kind of items).

source
CImGui.BuildMethod
Build(self::Ptr{ImFontAtlas}) -> Bool

Build pixels data. This is called automatically for you by the GetTexData*** functions.

source
CImGui.BulletMethod
Bullet()

Draw a small circle and keep the cursor on the same line. advance cursor x position by GetTreeNodeToLabelSpacing(), same distance that TreeNode() uses

source
CImGui.BulletTextMethod
BulletText(formatted_text)

Shortcut for Bullet+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.

source
CImGui.ButtonFunction
Button(label) -> Bool
+Button(label, size) -> Bool

Return true when the value has been changed or when pressed/selected.

source
CImGui.CalcItemWidthMethod
CalcItemWidth() -> Cfloat

Return width of item given pushed settings and current cursor position.

source
CImGui.CalcTextSizeFunction
CalcTextSize(text, text_end=C_NULL, hide_text_after_double_hash=false, wrap_width=-1) -> ImVec2
source
CImGui.ChannelsMergeMethod
ChannelsMerge(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)
source
CImGui.ChannelsSetCurrentMethod
ChannelsSetCurrent(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)
source
CImGui.ChannelsSplitMethod
ChannelsSplit(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)
source
CImGui.CheckboxMethod
Checkbox(label, v) -> Bool

Return true when the value has been changed or when pressed/selected.

source
CImGui.CheckboxFlagsMethod
CheckboxFlags(label, flags, flags_value) -> Bool

Return true when the value has been changed or when pressed/selected.

source
CImGui.ClearFontsMethod
ClearFonts(self::Ptr{ImFontAtlas})

Clear output font data (glyphs storage, UV coordinates).

source
CImGui.ClearInputDataMethod
ClearInputData(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.

source
CImGui.ClearTexDataMethod
ClearTexData(self::Ptr{ImFontAtlas})

Clear output texture data (CPU side). Saves RAM once the texture has been copied to graphics memory.

source
CImGui.ClipperMethod
Clipper() -> 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.
source
CImGui.CloneOutputMethod
CloneOutput(handle::Ptr{ImDrawList}) -> Ptr{ImDrawList}

Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer.

source
CImGui.CloseCurrentPopupMethod
CloseCurrentPopup()

Close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.

source
CImGui.CollapsingHeaderFunction
CollapsingHeader(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.

source
CImGui.CollapsingHeaderFunction
CollapsingHeader(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.

source
CImGui.ColorButtonFunction
ColorButton(desc_id, col, flags=0, size=(0,0))

Display a colored square/button, hover for details, return true when pressed.

source
CImGui.ColorEdit3Function
ColorEdit3(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.

source
CImGui.ColorEdit4Function
ColorEdit4(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.

source
CImGui.ColumnsFunction
Columns(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!)

source
CImGui.ComboFunction
Combo(label, current_item, items_getter::Union{Ptr,Base.CFunction}, data, items_count, popup_max_height_in_items=-1) -> Bool
source
CImGui.ComboFunction
Combo(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.

source
CImGui.ComboFunction
Combo(label, current_item, items_separated_by_zeros, popup_max_height_in_items=-1) -> Bool

Separate items with within a string, end item-list with . e.g. OneTwoThree

source
CImGui.CreateContextMethod
CreateContext() -> Ptr{ImGuiContext}
-CreateContext(shared_font_atlas::Ptr{ImFontAtlas}) -> Ptr{ImGuiContext}

Return a handle of ImGuiContext.

source
CImGui.DestroyContextMethod
DestroyContext()
-DestroyContext(ctx::Ptr{ImGuiContext})

Destroy ImGuiContext. DestroyContext() will destroy current context.

source
CImGui.DragFloatFunction
DragFloat(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

If v_min >= v_max we have no bound.

source
CImGui.DragFloat2Function
DragFloat2(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.DragFloat3Function
DragFloat3(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.DragFloat4Function
DragFloat4(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.DragFloatRange2Function
DragFloatRange2(label, v_current_min, v_current_max, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", format_max=C_NULL, flag=0) -> Bool
source
CImGui.DragIntFunction
DragInt(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)
source
CImGui.DragInt2Function
DragInt2(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)

The expected number of elements to be accessible in v is 2.

source
CImGui.DragInt3Function
DragInt3(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)

The expected number of elements to be accessible in v is 3.

source
CImGui.DragInt4Function
DragInt4(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)

The expected number of elements to be accessible in v is 4.

source
CImGui.DragIntRange2Function
DragIntRange2(label, v_current_min, v_current_max, v_speed=1.0, v_min=0, v_max=0, format="%d", format_max=C_NULL, flag=0)
source
CImGui.DragScalarFunction
DragScalar(label, data_type, v, v_speed, v_min=C_NULL, v_max=C_NULL, format=C_NULL, flags=0)
source
CImGui.DragScalarNFunction
DragScalarN(label, data_type, v, components, v_speed, v_min=C_NULL, v_max=C_NULL, format=C_NULL, flag=0)
source
CImGui.EndMethod
End(handle::Ptr{ImGuiListClipper})

Automatically called on the last call of Step that returns false.

source
CImGui.EndFrameMethod
EndFrame()

Calling this function ends the ImGui frame. This function is automatically called by Render, so you likely don't need to call it yourself directly. If you don't need to render data (skipping rendering), you may call EndFrame but you'll have wasted CPU already! If you don't need to render, better to not create any imgui windows and not call NewFrame at all!

source
CImGui.GetBackgroundDrawListMethod
GetBackgroundDrawList() -> Ptr{ImDrawList}

This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.

source
CImGui.GetColorU32Function
GetColorU32(r, g, b, a) -> ImU32
+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.
source
CImGui.CloneOutputMethod
CloneOutput(handle::Ptr{ImDrawList}) -> Ptr{ImDrawList}

Create a clone of the CmdBuffer/IdxBuffer/VtxBuffer.

source
CImGui.CloseCurrentPopupMethod
CloseCurrentPopup()

Close the popup we have begin-ed into. clicking on a MenuItem or Selectable automatically close the current popup.

source
CImGui.CollapsingHeaderFunction
CollapsingHeader(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.

source
CImGui.CollapsingHeaderFunction
CollapsingHeader(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.

source
CImGui.ColorButtonFunction
ColorButton(desc_id, col, flags=0, size=(0,0))

Display a colored square/button, hover for details, return true when pressed.

source
CImGui.ColorEdit3Function
ColorEdit3(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.

source
CImGui.ColorEdit4Function
ColorEdit4(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.

source
CImGui.ColumnsFunction
Columns(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!)

source
CImGui.ComboFunction
Combo(label, current_item, items_getter::Union{Ptr,Base.CFunction}, data, items_count, popup_max_height_in_items=-1) -> Bool
source
CImGui.ComboFunction
Combo(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.

source
CImGui.ComboFunction
Combo(label, current_item, items_separated_by_zeros, popup_max_height_in_items=-1) -> Bool

Separate items with within a string, end item-list with . e.g. OneTwoThree

source
CImGui.CreateContextMethod
CreateContext() -> Ptr{ImGuiContext}
+CreateContext(shared_font_atlas::Ptr{ImFontAtlas}) -> Ptr{ImGuiContext}

Return a handle of ImGuiContext.

source
CImGui.DestroyContextMethod
DestroyContext()
+DestroyContext(ctx::Ptr{ImGuiContext})

Destroy ImGuiContext. DestroyContext() will destroy current context.

source
CImGui.DragFloatFunction
DragFloat(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

If v_min >= v_max we have no bound.

source
CImGui.DragFloat2Function
DragFloat2(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.DragFloat3Function
DragFloat3(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.DragFloat4Function
DragFloat4(label, v, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.DragFloatRange2Function
DragFloatRange2(label, v_current_min, v_current_max, v_speed=1.0, v_min=0.0, v_max=0.0, format="%.3f", format_max=C_NULL, flag=0) -> Bool
source
CImGui.DragIntFunction
DragInt(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)
source
CImGui.DragInt2Function
DragInt2(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)

The expected number of elements to be accessible in v is 2.

source
CImGui.DragInt3Function
DragInt3(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)

The expected number of elements to be accessible in v is 3.

source
CImGui.DragInt4Function
DragInt4(label, v, v_speed=1.0, v_min=0, v_max=0, format="%d", flag=0)

The expected number of elements to be accessible in v is 4.

source
CImGui.DragIntRange2Function
DragIntRange2(label, v_current_min, v_current_max, v_speed=1.0, v_min=0, v_max=0, format="%d", format_max=C_NULL, flag=0)
source
CImGui.DragScalarFunction
DragScalar(label, data_type, v, v_speed, v_min=C_NULL, v_max=C_NULL, format=C_NULL, flags=0)
source
CImGui.DragScalarNFunction
DragScalarN(label, data_type, v, components, v_speed, v_min=C_NULL, v_max=C_NULL, format=C_NULL, flag=0)
source
CImGui.EndMethod
End(handle::Ptr{ImGuiListClipper})

Automatically called on the last call of Step that returns false.

source
CImGui.EndFrameMethod
EndFrame()

Calling this function ends the ImGui frame. This function is automatically called by Render, so you likely don't need to call it yourself directly. If you don't need to render data (skipping rendering), you may call EndFrame but you'll have wasted CPU already! If you don't need to render, better to not create any imgui windows and not call NewFrame at all!

source
CImGui.GetBackgroundDrawListMethod
GetBackgroundDrawList() -> Ptr{ImDrawList}

This draw list will be the first rendering one. Useful to quickly draw shapes/text behind dear imgui contents.

source
CImGui.GetColorU32Function
GetColorU32(r, g, b, a) -> ImU32
 GetColorU32(col::ImVec4) -> ImU32
 GetColorU32(col::ImU32) -> ImU32
-GetColorU32(idx::Integer, alpha_mul=1.0) -> ImU32

Retrieve given style color with style alpha applied and optional extra alpha multiplier.

source
CImGui.GetColumnOffsetFunction
GetColumnOffset(column_index=-1) -> Cfloat

Get position of column line (in pixels, from the left side of the contents region). Pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. Column 0 is typically 0.0.

source
CImGui.GetColumnWidthFunction
GetColumnWidth(column_index=-1) -> Cfloat

Return column width (in pixels). Pass -1 to use current column.

source
CImGui.GetContentRegionMaxMethod
GetContentRegionMax() -> ImVec2

Return current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates.

source
CImGui.GetCursorScreenPosMethod
GetCursorScreenPos() -> ImVec2

Return cursor position in absolute screen coordinates [0..io.DisplaySize]. This is useful to work with ImDrawList API.

source
CImGui.GetDragDropPayloadMethod
GetDragDropPayload() -> Ptr{ImGuiPayload}

Peek directly into the current payload from anywhere. May return C_NULL.

BETA API

Missing Demo code. API may evolve.

source
CImGui.GetDrawDataMethod
GetDrawData() -> Ptr{ImDrawData}

Return a handle of ImDrawData which is valid after Render and until the next call to NewFrame. This is what you have to render.

Obsolete

This used to be passed to your ImGuiIO.RenderDrawListsFn function.

source
CImGui.GetFontSizeMethod
GetFontSize() -> Cfloat

Get current font size (= height in pixels) of current font with current scale applied.

source
CImGui.GetForegroundDrawListMethod
GetForegroundDrawList() -> Ptr{ImDrawList}

this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.

source
CImGui.GetFrameHeightWithSpacingMethod
GetFrameHeightWithSpacing() -> Cfloat

Return FontSize + ImGuiStyle.FramePadding.y * 2 + ImGuiStyle.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets).

source
CImGui.GetGlyphRangesChineseFullMethod
GetGlyphRangesChineseFull(self::Ptr{ImFontAtlas}) -> Ptr{ImWchar}

Default + Half-Width + Japanese Hiragana/Katakana + full set of about 21000 CJK Unified Ideographs.

source
CImGui.GetGlyphRangesChineseSimplifiedCommonMethod
GetGlyphRangesChineseSimplifiedCommon(self::Ptr{ImFontAtlas}) -> Ptr{ImWchar}

Default + Half-Width + Japanese Hiragana/Katakana + set of 2500 CJK Unified Ideographs for common simplified Chinese.

source
CImGui.GetGlyphRangesJapaneseMethod
GetGlyphRangesJapanese(self::Ptr{ImFontAtlas}) -> Ptr{ImWchar}

Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs.

source
CImGui.GetIDMethod
GetID(str_id::AbstractString) -> ImGuiID
+GetColorU32(idx::Integer, alpha_mul=1.0) -> ImU32

Retrieve given style color with style alpha applied and optional extra alpha multiplier.

source
CImGui.GetColumnOffsetFunction
GetColumnOffset(column_index=-1) -> Cfloat

Get position of column line (in pixels, from the left side of the contents region). Pass -1 to use current column, otherwise 0..GetColumnsCount() inclusive. Column 0 is typically 0.0.

source
CImGui.GetColumnWidthFunction
GetColumnWidth(column_index=-1) -> Cfloat

Return column width (in pixels). Pass -1 to use current column.

source
CImGui.GetContentRegionMaxMethod
GetContentRegionMax() -> ImVec2

Return current content boundaries (typically window boundaries including scrolling, or current column boundaries), in windows coordinates.

source
CImGui.GetCursorScreenPosMethod
GetCursorScreenPos() -> ImVec2

Return cursor position in absolute screen coordinates [0..io.DisplaySize]. This is useful to work with ImDrawList API.

source
CImGui.GetDragDropPayloadMethod
GetDragDropPayload() -> Ptr{ImGuiPayload}

Peek directly into the current payload from anywhere. May return C_NULL.

BETA API

Missing Demo code. API may evolve.

source
CImGui.GetDrawDataMethod
GetDrawData() -> Ptr{ImDrawData}

Return a handle of ImDrawData which is valid after Render and until the next call to NewFrame. This is what you have to render.

Obsolete

This used to be passed to your ImGuiIO.RenderDrawListsFn function.

source
CImGui.GetFontSizeMethod
GetFontSize() -> Cfloat

Get current font size (= height in pixels) of current font with current scale applied.

source
CImGui.GetForegroundDrawListMethod
GetForegroundDrawList() -> Ptr{ImDrawList}

this draw list will be the last rendered one. Useful to quickly draw shapes/text over dear imgui contents.

source
CImGui.GetFrameHeightWithSpacingMethod
GetFrameHeightWithSpacing() -> Cfloat

Return FontSize + ImGuiStyle.FramePadding.y * 2 + ImGuiStyle.ItemSpacing.y (distance in pixels between 2 consecutive lines of framed widgets).

source
CImGui.GetGlyphRangesChineseFullMethod
GetGlyphRangesChineseFull(self::Ptr{ImFontAtlas}) -> Ptr{ImWchar}

Default + Half-Width + Japanese Hiragana/Katakana + full set of about 21000 CJK Unified Ideographs.

source
CImGui.GetGlyphRangesChineseSimplifiedCommonMethod
GetGlyphRangesChineseSimplifiedCommon(self::Ptr{ImFontAtlas}) -> Ptr{ImWchar}

Default + Half-Width + Japanese Hiragana/Katakana + set of 2500 CJK Unified Ideographs for common simplified Chinese.

source
CImGui.GetGlyphRangesJapaneseMethod
GetGlyphRangesJapanese(self::Ptr{ImFontAtlas}) -> Ptr{ImWchar}

Default + Hiragana, Katakana, Half-Width, Selection of 1946 Ideographs.

source
CImGui.GetIDMethod
GetID(str_id::AbstractString) -> ImGuiID
 GetID(str_id_begin::AbstractString, str_id_end::AbstractString) -> ImGuiID
-GetID(ptr_id::Ptr) -> ImGuiID

Calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself.

source
CImGui.GetIOMethod
GetIO() -> Ptr{ImGuiIO}

Return a handle of ImGuiIO which is for accessing the IO structure:

  • mouse/keyboard/gamepad inputs
  • time
  • various configuration options/flags
source
CImGui.GetItemRectMaxMethod
GetItemRectMax() -> ImVec2

Return bounding rectangle of last item, in screen space. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.GetItemRectMinMethod
GetItemRectMin() -> ImVec2

Return bounding rectangle of last item, in screen space. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.GetItemRectSizeMethod
GetItemRectSize() -> ImVec2

Return size of last item, in screen space. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.GetKeyIndexMethod
GetKeyIndex(imgui_key) -> Cint

Map ImGuiKey_* values into user's key index. == io.KeyMap[key]

source
CImGui.GetKeyPressedAmountMethod
GetKeyPressedAmount(key_index, repeat_delay, rate) -> Cint

Uses provided repeat rate/delay. Return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate

source
CImGui.GetMouseCursorMethod
GetMouseCursor() -> ImGuiMouseCursor

Get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render. If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you.

source
CImGui.GetMouseDragDeltaFunction
GetMouseDragDelta(button=0, lock_threshold=-1.0) -> ImVec2

Dragging amount since clicking. if lock_threshold < -1.0f uses io.MouseDraggingThreshold.

source
CImGui.GetMousePosMethod
GetMousePos() -> ImVec2

Shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls.

source
CImGui.GetTexDataAsAlpha8Function
GetTexDataAsAlpha8(self::Ptr{ImFontAtlas}, out_pixels, out_width, out_height, out_bytes_per_pixel=C_NULL)

1 byte per-pixel.

source
CImGui.GetTexDataAsRGBA32Function
GetTexDataAsRGBA32(self::Ptr{ImFontAtlas}, out_pixels, out_width, out_height, out_bytes_per_pixel=C_NULL)

4 bytes-per-pixel.

source
CImGui.GetTreeNodeToLabelSpacingMethod
GetTreeNodeToLabelSpacing()

Horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode.

source
CImGui.GetWindowDrawListMethod
GetWindowDrawList() -> Ptr{ImDrawList}

Return draw list associated to the window, to append your own drawing primitives.

source
CImGui.GetWindowPosMethod
GetWindowPos() -> ImVec2

Return current window position in screen space (useful if you want to do your own drawing via the ImDrawList API.

source
CImGui.ImageFunction
Image(user_texture_id, size, uv0=(0,0), uv1=(1,1), tint_col=(1,1,1,1), border_col=(0,0,0,0))
source
CImGui.ImageButtonFunction
ImageButton(str_id, user_texture_id, size, uv0=(0,0), uv1=(1,1), bg_col=(0,0,0,0), tint_col=(1,1,1,1)) -> Bool
source
CImGui.IndentFunction
Indent()
-Indent(indent_w)

Move content position toward the right, by ImGuiStyle.IndentSpacing or indent_w if indent_w != 0.

source
CImGui.InputFloat2Function
InputFloat2(label, v, format="%.3f", flags=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.InputFloat3Function
InputFloat3(label, v, format="%.3f", flags=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.InputFloat4Function
InputFloat4(label, v, format="%.3f", flags=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.InputInt2Function
InputInt2(label, v, flags=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.InputInt3Function
InputInt3(label, v, flags=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.InputInt4Function
InputInt4(label, v, flags=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.InputScalarFunction
InputScalar(label, data_type, v, step=C_NULL, step_fast=C_NULL, format=C_NULL, flags=0) -> Bool
source
CImGui.InputScalarNFunction
InputScalarN(label, data_type, v, components, step=C_NULL, step_fast=C_NULL, format=C_NULL, flags=0) -> Bool
source
CImGui.InputTextFunction
InputText(label, buf, buf_size, flags=0, callback=C_NULL, user_data=C_NULL) -> Bool
source
CImGui.InvisibleButtonFunction
InvisibleButton(str_id, size, flag = 0) -> Bool

Return true when the value has been changed or when pressed/selected. Flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api along with IsItemActive, IsItemHovered, etc.

source
CImGui.IsAnyItemActiveMethod
IsAnyItemActive() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsAnyItemFocusedMethod
 IsAnyItemFocused() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsAnyItemHoveredMethod
IsAnyItemHovered() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemActiveMethod
IsItemActive() -> Bool

Is the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item. Items that don't interact will always return false) See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemClickedFunction
IsItemClicked() -> Bool
-IsItemClicked(mouse_button=0) -> Bool

Is the last item clicked? (e.g. button/node just clicked on) == IsMouseClicked(mouse_button) && IsItemHovered. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemDeactivatedMethod
IsItemDeactivated() -> Bool

Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that requires continuous editing. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemDeactivatedAfterEditMethod
IsItemDeactivatedAfterEdit() -> Bool

Was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved). Useful for Undo/Redo patterns with widgets that requires continuous editing. Note that you may get false positives (some widgets such as Combo/ListBox/Selectable will return true even when clicking an already selected item). See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemEditedMethod
IsItemEdited() -> Bool

Did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemFocusedMethod
IsItemFocused() -> Bool

Is the last item focused for keyboard/gamepad navigation? See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemHoveredFunction
IsItemHovered(flags=ImGuiHoveredFlags_(0)) -> Bool

Is the last item hovered? (and usable, aka not blocked by a popup, etc.). See the output of CImGui.GetFlags(CImGui.ImGuiHoveredFlags_) for options:

using CImGui, Markdown
-CImGui.ShowFlags(CImGui.ImGuiHoveredFlags_) |> Markdown.parse

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemToggledOpenMethod
IsItemToggledOpen() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemVisibleMethod
IsItemVisible() -> Bool

Is the last item visible? (items may be out of sight because of clipping/scrolling). See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsKeyDownMethod
IsKeyDown(user_key_index) -> Bool

Is key being held. == io.KeysDown[userkeyindex]. note that imgui doesn't know the semantic of each entry of io.KeysDown[]. Use your own indices/enums according to how your backend/engine stored them into io.KeysDown[]!

source
CImGui.IsKeyPressedFunction
IsKeyPressed(user_key_index, repeat=true) -> Bool

Was key pressed (went from !Down to Down). If repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate.

source
CImGui.IsMouseClickedFunction
IsMouseClicked(button, repeat=false) -> Bool

Did mouse button clicked (went from !Down to Down) (0=left, 1=right, 2=middle)

source
CImGui.IsMouseDraggingFunction
IsMouseDragging(button=0, lock_threshold=-1.0) -> Bool

Is mouse dragging. If lock_threshold < -1.0f uses io.MouseDraggingThreshold.

source
CImGui.IsMouseHoveringRectFunction
IsMouseHoveringRect(r_min, r_max, clip=true) -> Bool

Is mouse hovering given bounding rect (in screen space). Clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.

source
CImGui.IsRectVisibleMethod
IsRectVisible(size) -> Bool
-IsRectVisible(x, y) -> Bool

Test if rectangle (of given size, starting from cursor position) is visible / not clipped.

source
CImGui.IsRectVisibleVec2Method
IsRectVisibleVec2(rect_min::ImVec2, rect_max::ImVec2) -> Bool
-IsRectVisibleVec2(rect_min::NTuple{2}, rect_max::NTuple{2}) -> Bool

Test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.

source
CImGui.IsWindowFocusedFunction
IsWindowFocused(flags=0) -> Bool

Is current window focused? or its root/child, depending on flags. See the output of CImGui.GetFlags(CImGui.ImGuiFocusedFlags_) for options:

using CImGui, Markdown
-CImGui.ShowFlags(CImGui.ImGuiFocusedFlags_) |> Markdown.parse
source
CImGui.IsWindowHoveredFunction
IsWindowHovered(flags=0) -> Bool

Is current window hovered (and typically: not blocked by a popup/modal)? See the output of CImGui.GetFlags(CImGui.ImGuiHoveredFlags_) for options:

using CImGui, Markdown
+GetID(ptr_id::Ptr) -> ImGuiID

Calculate unique ID (hash of whole ID stack + given parameter). e.g. if you want to query into ImGuiStorage yourself.

source
CImGui.GetIOMethod
GetIO() -> Ptr{ImGuiIO}

Return a handle of ImGuiIO which is for accessing the IO structure:

  • mouse/keyboard/gamepad inputs
  • time
  • various configuration options/flags
source
CImGui.GetItemRectMaxMethod
GetItemRectMax() -> ImVec2

Return bounding rectangle of last item, in screen space. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.GetItemRectMinMethod
GetItemRectMin() -> ImVec2

Return bounding rectangle of last item, in screen space. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.GetItemRectSizeMethod
GetItemRectSize() -> ImVec2

Return size of last item, in screen space. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.GetKeyIndexMethod
GetKeyIndex(imgui_key) -> Cint

Map ImGuiKey_* values into user's key index. == io.KeyMap[key]

source
CImGui.GetKeyPressedAmountMethod
GetKeyPressedAmount(key_index, repeat_delay, rate) -> Cint

Uses provided repeat rate/delay. Return a count, most often 0 or 1 but might be >1 if RepeatRate is small enough that DeltaTime > RepeatRate

source
CImGui.GetMouseCursorMethod
GetMouseCursor() -> ImGuiMouseCursor

Get desired cursor type, reset in ImGui::NewFrame(), this is updated during the frame. valid before Render. If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you.

source
CImGui.GetMouseDragDeltaFunction
GetMouseDragDelta(button=0, lock_threshold=-1.0) -> ImVec2

Dragging amount since clicking. if lock_threshold < -1.0f uses io.MouseDraggingThreshold.

source
CImGui.GetMousePosMethod
GetMousePos() -> ImVec2

Shortcut to ImGui::GetIO().MousePos provided by user, to be consistent with other calls.

source
CImGui.GetTexDataAsAlpha8Function
GetTexDataAsAlpha8(self::Ptr{ImFontAtlas}, out_pixels, out_width, out_height, out_bytes_per_pixel=C_NULL)

1 byte per-pixel.

source
CImGui.GetTexDataAsRGBA32Function
GetTexDataAsRGBA32(self::Ptr{ImFontAtlas}, out_pixels, out_width, out_height, out_bytes_per_pixel=C_NULL)

4 bytes-per-pixel.

source
CImGui.GetTreeNodeToLabelSpacingMethod
GetTreeNodeToLabelSpacing()

Horizontal distance preceding label when using TreeNode*() or Bullet() == (g.FontSize + style.FramePadding.x*2) for a regular unframed TreeNode.

source
CImGui.GetWindowDrawListMethod
GetWindowDrawList() -> Ptr{ImDrawList}

Return draw list associated to the window, to append your own drawing primitives.

source
CImGui.GetWindowPosMethod
GetWindowPos() -> ImVec2

Return current window position in screen space (useful if you want to do your own drawing via the ImDrawList API.

source
CImGui.ImageFunction
Image(user_texture_id, size, uv0=(0,0), uv1=(1,1), tint_col=(1,1,1,1), border_col=(0,0,0,0))
source
CImGui.ImageButtonFunction
ImageButton(str_id, user_texture_id, size, uv0=(0,0), uv1=(1,1), bg_col=(0,0,0,0), tint_col=(1,1,1,1)) -> Bool
source
CImGui.IndentFunction
Indent()
+Indent(indent_w)

Move content position toward the right, by ImGuiStyle.IndentSpacing or indent_w if indent_w != 0.

source
CImGui.InputFloat2Function
InputFloat2(label, v, format="%.3f", flags=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.InputFloat3Function
InputFloat3(label, v, format="%.3f", flags=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.InputFloat4Function
InputFloat4(label, v, format="%.3f", flags=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.InputInt2Function
InputInt2(label, v, flags=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.InputInt3Function
InputInt3(label, v, flags=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.InputInt4Function
InputInt4(label, v, flags=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.InputScalarFunction
InputScalar(label, data_type, v, step=C_NULL, step_fast=C_NULL, format=C_NULL, flags=0) -> Bool
source
CImGui.InputScalarNFunction
InputScalarN(label, data_type, v, components, step=C_NULL, step_fast=C_NULL, format=C_NULL, flags=0) -> Bool
source
CImGui.InputTextFunction
InputText(label, buf, buf_size, flags=0, callback=C_NULL, user_data=C_NULL) -> Bool
source
CImGui.InvisibleButtonFunction
InvisibleButton(str_id, size, flag = 0) -> Bool

Return true when the value has been changed or when pressed/selected. Flexible button behavior without the visuals, frequently useful to build custom behaviors using the public api along with IsItemActive, IsItemHovered, etc.

source
CImGui.IsAnyItemActiveMethod
IsAnyItemActive() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsAnyItemFocusedMethod
 IsAnyItemFocused() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsAnyItemHoveredMethod
IsAnyItemHovered() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemActiveMethod
IsItemActive() -> Bool

Is the last item active? (e.g. button being held, text field being edited. This will continuously return true while holding mouse button on an item. Items that don't interact will always return false) See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemClickedFunction
IsItemClicked() -> Bool
+IsItemClicked(mouse_button=0) -> Bool

Is the last item clicked? (e.g. button/node just clicked on) == IsMouseClicked(mouse_button) && IsItemHovered. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemDeactivatedMethod
IsItemDeactivated() -> Bool

Was the last item just made inactive (item was previously active). Useful for Undo/Redo patterns with widgets that requires continuous editing. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemDeactivatedAfterEditMethod
IsItemDeactivatedAfterEdit() -> Bool

Was the last item just made inactive and made a value change when it was active? (e.g. Slider/Drag moved). Useful for Undo/Redo patterns with widgets that requires continuous editing. Note that you may get false positives (some widgets such as Combo/ListBox/Selectable will return true even when clicking an already selected item). See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemEditedMethod
IsItemEdited() -> Bool

Did the last item modify its underlying value this frame? or was pressed? This is generally the same as the "bool" return value of many widgets. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemFocusedMethod
IsItemFocused() -> Bool

Is the last item focused for keyboard/gamepad navigation? See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemHoveredFunction
IsItemHovered(flags=ImGuiHoveredFlags_(0)) -> Bool

Is the last item hovered? (and usable, aka not blocked by a popup, etc.). See the output of CImGui.GetFlags(CImGui.ImGuiHoveredFlags_) for options:

using CImGui, Markdown
+CImGui.ShowFlags(CImGui.ImGuiHoveredFlags_) |> Markdown.parse

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemToggledOpenMethod
IsItemToggledOpen() -> Bool

See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsItemVisibleMethod
IsItemVisible() -> Bool

Is the last item visible? (items may be out of sight because of clipping/scrolling). See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.IsKeyDownMethod
IsKeyDown(user_key_index) -> Bool

Is key being held. == io.KeysDown[userkeyindex]. note that imgui doesn't know the semantic of each entry of io.KeysDown[]. Use your own indices/enums according to how your backend/engine stored them into io.KeysDown[]!

source
CImGui.IsKeyPressedFunction
IsKeyPressed(user_key_index, repeat=true) -> Bool

Was key pressed (went from !Down to Down). If repeat=true, uses io.KeyRepeatDelay / KeyRepeatRate.

source
CImGui.IsMouseClickedFunction
IsMouseClicked(button, repeat=false) -> Bool

Did mouse button clicked (went from !Down to Down) (0=left, 1=right, 2=middle)

source
CImGui.IsMouseDraggingFunction
IsMouseDragging(button=0, lock_threshold=-1.0) -> Bool

Is mouse dragging. If lock_threshold < -1.0f uses io.MouseDraggingThreshold.

source
CImGui.IsMouseHoveringRectFunction
IsMouseHoveringRect(r_min, r_max, clip=true) -> Bool

Is mouse hovering given bounding rect (in screen space). Clipped by current clipping settings, but disregarding of other consideration of focus/window ordering/popup-block.

source
CImGui.IsRectVisibleMethod
IsRectVisible(size) -> Bool
+IsRectVisible(x, y) -> Bool

Test if rectangle (of given size, starting from cursor position) is visible / not clipped.

source
CImGui.IsRectVisibleVec2Method
IsRectVisibleVec2(rect_min::ImVec2, rect_max::ImVec2) -> Bool
+IsRectVisibleVec2(rect_min::NTuple{2}, rect_max::NTuple{2}) -> Bool

Test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.

source
CImGui.IsWindowFocusedFunction
IsWindowFocused(flags=0) -> Bool

Is current window focused? or its root/child, depending on flags. See the output of CImGui.GetFlags(CImGui.ImGuiFocusedFlags_) for options:

using CImGui, Markdown
+CImGui.ShowFlags(CImGui.ImGuiFocusedFlags_) |> Markdown.parse
source
CImGui.IsWindowHoveredFunction
IsWindowHovered(flags=0) -> Bool

Is current window hovered (and typically: not blocked by a popup/modal)? See the output of CImGui.GetFlags(CImGui.ImGuiHoveredFlags_) for options:

using CImGui, Markdown
 CImGui.ShowFlags(CImGui.ImGuiHoveredFlags_) |> Markdown.parse
Note

If you are trying to check whether your mouse should be dispatched to imgui or to your app, you should use the ImGuiIO.WantCaptureMouse boolean for that! Please read the FAQ!

FAQ

Q: How can I tell whether to dispatch mouse/keyboard to imgui or to my application?

A: You can read the ImGuiIO.WantCaptureMouse, ImGuiIO.WantCaptureKeyboard and ImGuiIO.WantTextInput flags from the ImGuiIO structure, for example:

if CImGui.Get_WantCaptureMouse(CImGui.GetIO())
     # ...
-end
  • When ImGuiIO.WantCaptureMouse is set, imgui wants to use your mouse state, and you may want to discard/hide the inputs from the rest of your application.
  • When ImGuiIO.WantCaptureKeyboard is set, imgui wants to use your keyboard state, and you may want to discard/hide the inputs from the rest of your application.
  • When ImGuiIO.WantTextInput is set to may want to notify your OS to popup an on-screen keyboard, if available (e.g. on a mobile phone, or console OS).
Note
  1. You should always pass your mouse/keyboard inputs to imgui, even when the ImGuiIO.WantCaptureXXX flag are set false. This is because imgui needs to detect that you clicked in the void to unfocus its own windows.
  2. The ImGuiIO.WantCaptureMouse is more accurate that any attempt to "check if the mouse is hovering a window" (don't do that!). It handle mouse dragging correctly (both dragging that started over your application or over an imgui window) and handle e.g. modal windows blocking inputs. Those flags are updated by NewFrame. Preferably read the flags after calling NewFrame if you can afford it, but reading them before is also perfectly fine, as the bool toggle fairly rarely. If you have on a touch device, you might find use for an early call to UpdateHoveredWindowAndCaptureFlags().
  3. Text input widget releases focus on "Return KeyDown", so the subsequent "Return KeyUp" event that your application receive will typically have ImGuiIO.WantCaptureKeyboard=false. Depending on your application logic it may or not be inconvenient. You might want to track which key-downs were targeted for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.)
source
CImGui.LabelTextMethod
LabelText(label, formatted_text)

Display text+label aligned the same way as value+label widgets.

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.

source
CImGui.ListBoxFunction
ListBox(label, current_item, items, items_count, height_in_items=-1)
-ListBox(label, current_item, items_getter::Ptr{Cvoid}, data::Ptr{Cvoid}, items_count, height_in_items=-1)
source
CImGui.LoadIniSettingsFromDiskMethod
LoadIniSettingsFromDisk(ini_filename)

Call after CreateContext and before the first call to NewFrame. NewFrame automatically calls LoadIniSettingsFromDisk(ImGuiIO.IniFilename).

Tip

The disk functions are automatically called if ImGuiIO.IniFilename != CNULL (default is "imgui.ini"). Set ImGuiIO.IniFilename to CNULL to load/save manually. Read ImGuiIO.WantSaveIniSettings description about handling .ini saving manually.

source
CImGui.LogTextMethod
LogText(formatted_text)

Pass text data straight to log without being displayed.

source
CImGui.LogToClipboardFunction
LogToClipboard(max_depth=-1)

Start logging to OS clipboard.

All text output from interface is captured to clipboard. By default, tree nodes are automatically opened during logging.

source
CImGui.LogToFileFunction
LogToFile(max_depth=-1, filename=C_NULL)

Start logging to file.

All text output from interface is captured to file. By default, tree nodes are automatically opened during logging.

source
CImGui.LogToTTYFunction
LogToTTY(max_depth=-1)

Start logging to tty.

All text output from interface is captured to tty. By default, tree nodes are automatically opened during logging.

source
CImGui.MenuItemFunction
MenuItem(label, shortcut=C_NULL, selected::Bool=false, enabled::Bool=true) -> Bool
-MenuItem(label, shortcut, selected::Ref, enabled::Bool=true) -> Bool

Return true when activated. Shortcuts are displayed for convenience but not processed by ImGui at the moment.

source
CImGui.NextColumnMethod
NextColumn()

Next column, defaults to current row or next row if the current row is finished.

source
CImGui.OpenPopupOnItemClickFunction
OpenPopupOnItemClick(str_id=C_NULL, mouse_button=1) -> Nothing

Helper to open popup when clicked on last item (note: actually triggers on the mouse released event to be consistent with popup behaviors).

source
CImGui.PathFillConvexMethod
PathFillConvex(handle::Ptr{ImDrawList}, col)
Note

Anti-aliased filling requires points to be in clockwise order.

source
CImGui.PathRectFunction
PathRect(handle::Ptr{ImDrawList}, rect_min, rect_max, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll)

Stateful path API, add points then finish with PathFillConvex or PathStroke.

source
CImGui.PlotHistogramFunction
PlotHistogram(label, values, values_count, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=(0,0), stride=sizeof(Cfloat))
-PlotHistogram(label, values_getter::Ptr, data::Ptr, values_count, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=ImVec2(0,0))
source
CImGui.PlotLinesFunction
PlotLines(label, values, values_count::Integer, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=(0,0), stride=sizeof(Cfloat))
-PlotLines(label, values_getter::Ptr, data::Ptr, values_count, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=(0,0))
source
CImGui.PrimQuadUVMethod
PrimQuadUV(handle::Ptr{ImDrawList}, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col)
Note

All primitives needs to be reserved via PrimReserve beforehand!

source
CImGui.PrimRectMethod
PrimRect(handle::Ptr{ImDrawList}, a, b, col)

Axis aligned rectangle (composed of two triangles).

Note

All primitives needs to be reserved via PrimReserve beforehand!

source
CImGui.PushButtonRepeatMethod
PushButtonRepeat(repeat)

In "repeat" mode, Button*() functions return repeated true in a typematic manner (using ImGuiIO.KeyRepeatDelay/ImGuiIO.KeyRepeatRate setting). Note that you can call IsItemActive after any Button() to tell if the button is held in the current frame.

source
CImGui.PushClipRectMethod
PushClipRect(handle::Ptr{ImDrawList}, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect)

Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level PushClipRect to affect logic (hit-testing and widget culling).

source
CImGui.PushIDMethod
PushID(ptr_id::Ptr)
+end
  • When ImGuiIO.WantCaptureMouse is set, imgui wants to use your mouse state, and you may want to discard/hide the inputs from the rest of your application.
  • When ImGuiIO.WantCaptureKeyboard is set, imgui wants to use your keyboard state, and you may want to discard/hide the inputs from the rest of your application.
  • When ImGuiIO.WantTextInput is set to may want to notify your OS to popup an on-screen keyboard, if available (e.g. on a mobile phone, or console OS).
Note
  1. You should always pass your mouse/keyboard inputs to imgui, even when the ImGuiIO.WantCaptureXXX flag are set false. This is because imgui needs to detect that you clicked in the void to unfocus its own windows.
  2. The ImGuiIO.WantCaptureMouse is more accurate that any attempt to "check if the mouse is hovering a window" (don't do that!). It handle mouse dragging correctly (both dragging that started over your application or over an imgui window) and handle e.g. modal windows blocking inputs. Those flags are updated by NewFrame. Preferably read the flags after calling NewFrame if you can afford it, but reading them before is also perfectly fine, as the bool toggle fairly rarely. If you have on a touch device, you might find use for an early call to UpdateHoveredWindowAndCaptureFlags().
  3. Text input widget releases focus on "Return KeyDown", so the subsequent "Return KeyUp" event that your application receive will typically have ImGuiIO.WantCaptureKeyboard=false. Depending on your application logic it may or not be inconvenient. You might want to track which key-downs were targeted for Dear ImGui, e.g. with an array of bool, and filter out the corresponding key-ups.)
source
CImGui.LabelTextMethod
LabelText(label, formatted_text)

Display text+label aligned the same way as value+label widgets.

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.

source
CImGui.ListBoxFunction
ListBox(label, current_item, items, items_count, height_in_items=-1)
+ListBox(label, current_item, items_getter::Ptr{Cvoid}, data::Ptr{Cvoid}, items_count, height_in_items=-1)
source
CImGui.LoadIniSettingsFromDiskMethod
LoadIniSettingsFromDisk(ini_filename)

Call after CreateContext and before the first call to NewFrame. NewFrame automatically calls LoadIniSettingsFromDisk(ImGuiIO.IniFilename).

Tip

The disk functions are automatically called if ImGuiIO.IniFilename != CNULL (default is "imgui.ini"). Set ImGuiIO.IniFilename to CNULL to load/save manually. Read ImGuiIO.WantSaveIniSettings description about handling .ini saving manually.

source
CImGui.LogTextMethod
LogText(formatted_text)

Pass text data straight to log without being displayed.

source
CImGui.LogToClipboardFunction
LogToClipboard(max_depth=-1)

Start logging to OS clipboard.

All text output from interface is captured to clipboard. By default, tree nodes are automatically opened during logging.

source
CImGui.LogToFileFunction
LogToFile(max_depth=-1, filename=C_NULL)

Start logging to file.

All text output from interface is captured to file. By default, tree nodes are automatically opened during logging.

source
CImGui.LogToTTYFunction
LogToTTY(max_depth=-1)

Start logging to tty.

All text output from interface is captured to tty. By default, tree nodes are automatically opened during logging.

source
CImGui.MenuItemFunction
MenuItem(label, shortcut=C_NULL, selected::Bool=false, enabled::Bool=true) -> Bool
+MenuItem(label, shortcut, selected::Ref, enabled::Bool=true) -> Bool

Return true when activated. Shortcuts are displayed for convenience but not processed by ImGui at the moment.

source
CImGui.NextColumnMethod
NextColumn()

Next column, defaults to current row or next row if the current row is finished.

source
CImGui.OpenPopupOnItemClickFunction
OpenPopupOnItemClick(str_id=C_NULL, mouse_button=1) -> Nothing

Helper to open popup when clicked on last item (note: actually triggers on the mouse released event to be consistent with popup behaviors).

source
CImGui.PathFillConvexMethod
PathFillConvex(handle::Ptr{ImDrawList}, col)
Note

Anti-aliased filling requires points to be in clockwise order.

source
CImGui.PathRectFunction
PathRect(handle::Ptr{ImDrawList}, rect_min, rect_max, rounding=0.0, rounding_corners_flags=ImDrawFlags_RoundCornersAll)

Stateful path API, add points then finish with PathFillConvex or PathStroke.

source
CImGui.PlotHistogramFunction
PlotHistogram(label, values, values_count, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=(0,0), stride=sizeof(Cfloat))
+PlotHistogram(label, values_getter::Ptr, data::Ptr, values_count, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=ImVec2(0,0))
source
CImGui.PlotLinesFunction
PlotLines(label, values, values_count::Integer, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=(0,0), stride=sizeof(Cfloat))
+PlotLines(label, values_getter::Ptr, data::Ptr, values_count, values_offset=0, overlay_text=C_NULL, scale_min=FLT_MAX, scale_max=FLT_MAX, graph_size=(0,0))
source
CImGui.PrimQuadUVMethod
PrimQuadUV(handle::Ptr{ImDrawList}, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col)
Note

All primitives needs to be reserved via PrimReserve beforehand!

source
CImGui.PrimRectMethod
PrimRect(handle::Ptr{ImDrawList}, a, b, col)

Axis aligned rectangle (composed of two triangles).

Note

All primitives needs to be reserved via PrimReserve beforehand!

source
CImGui.PushButtonRepeatMethod
PushButtonRepeat(repeat)

In "repeat" mode, Button*() functions return repeated true in a typematic manner (using ImGuiIO.KeyRepeatDelay/ImGuiIO.KeyRepeatRate setting). Note that you can call IsItemActive after any Button() to tell if the button is held in the current frame.

source
CImGui.PushClipRectMethod
PushClipRect(handle::Ptr{ImDrawList}, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect)

Render-level scissoring. This is passed down to your render function but not used for CPU-side coarse clipping. Prefer using higher-level PushClipRect to affect logic (hit-testing and widget culling).

source
CImGui.PushIDMethod
PushID(ptr_id::Ptr)
 PushID(int_id::Integer)
 PushID(str_id::AbstractString)
 PushID(str_id_begin::AbstractString, str_id_end::AbstractString)

Push identifier into the ID stack. IDs are hash of the entire stack!

Note

Read the FAQ for more details about how ID are handled in dear imgui. If you are creating widgets in a loop you most likely want to push a unique identifier (e.g. object pointer, loop index) to uniquely differentiate them. You can also use the "##foobar" syntax within widget label to distinguish them from each others.

FAQ

Q: How can I have multiple widgets with the same label or without a label?

Q: I have multiple widgets with the same label, and only the first one works. Why is that?

A: A primer on labels and the ID Stack...

Dear ImGui internally need to uniquely identify UI elements. Elements that are typically not clickable (such as calls to the Text functions) don't need an ID. Interactive widgets (such as calls to Button buttons) need a unique ID. Unique ID are used internally to track active widgets and occasionally associate state to widgets. Unique ID are implicitly built from the hash of multiple elements that identify the "path" to the UI element.

  • Unique ID are often derived from a string label:
CImGui.Button("OK")          # Label = "OK",     ID = hash of (..., "OK")
@@ -58,20 +58,20 @@
 if CImGui.TreeNode("node")
     CImGui.Button("Click") # Label = "Click",  ID = hash of (..., "node", "Click")
     CImGui.TreePop()
-end
  • When working with trees, ID are used to preserve the open/close state of each tree node. Depending on your use cases you may want to use strings, indices or pointers as ID.
    • e.g. when following a single pointer that may change over time, using a static string as ID will preserve your node open/closed state when the targeted object change.
    • e.g. when displaying a list of objects, using indices or pointers as ID will preserve the node open/closed state differently. See what makes more sense in your situation!
source
CImGui.PushItemWidthMethod
PushItemWidth(item_width)

Push width of items for the common item+label case, pixels:

  • item_width == 0: default to ~2/3 of windows width
  • item_width > 0: width in pixels
  • item_width < 0: align xx pixels to the right of window (so -1.0 always align width to the right side)
source
CImGui.PushTabStopMethod
PushTabStop(allow_keyboard_focus)

Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets.

source
CImGui.PushTextWrapPosFunction
PushTextWrapPos(wrap_pos_x=0.0)

Word-wrapping for Text*() commands:

  • wrap_pos_x < 0: no wrapping
  • wrap_pos_x == 0: wrap to end of window (or column)
  • wrap_pos_x > 0: wrap at wrap_pos_x position in window local space
source
CImGui.RadioButtonMethod
RadioButton(label, active::Bool) -> Bool
+end
  • When working with trees, ID are used to preserve the open/close state of each tree node. Depending on your use cases you may want to use strings, indices or pointers as ID.
    • e.g. when following a single pointer that may change over time, using a static string as ID will preserve your node open/closed state when the targeted object change.
    • e.g. when displaying a list of objects, using indices or pointers as ID will preserve the node open/closed state differently. See what makes more sense in your situation!
source
CImGui.PushItemWidthMethod
PushItemWidth(item_width)

Push width of items for the common item+label case, pixels:

  • item_width == 0: default to ~2/3 of windows width
  • item_width > 0: width in pixels
  • item_width < 0: align xx pixels to the right of window (so -1.0 always align width to the right side)
source
CImGui.PushStyleColorMethod
PushStyleColor(idx, col)
+PushStyleColor(idx, col::Integer)

See also GetStyleColorVec4, TextColored, TextDisabled.

source
CImGui.PushStyleVarMethod
PushStyleVar(idx, val)
+PushStyleVar(idx, val::Real)

See also GetStyle.

source
CImGui.PushTabStopMethod
PushTabStop(allow_keyboard_focus)

Allow focusing using TAB/Shift-TAB, enabled by default but you can disable it for certain widgets.

source
CImGui.PushTextWrapPosFunction
PushTextWrapPos(wrap_pos_x=0.0)

Word-wrapping for Text*() commands:

  • wrap_pos_x < 0: no wrapping
  • wrap_pos_x == 0: wrap to end of window (or column)
  • wrap_pos_x > 0: wrap at wrap_pos_x position in window local space
source
CImGui.PushTextureIDMethod
PushTextureID(handle::Ptr{ImDrawList}, texture_id)
source
CImGui.RadioButtonMethod
RadioButton(label, active::Bool) -> Bool
 RadioButton(label, v::Ref, v_button::Integer) -> Bool

Return true when the value has been changed or when pressed/selected.

Example

if RadioButton("one", my_value==1)
     my_value = 1
-end
source
CImGui.RenderMethod
Render()

Calling this function ends the ImGui frame. This function finalizes the draw data.

Obsolete

Optionally call ImGuiIO.RenderDrawListsFn if set. Nowadays, prefer calling your render function yourself.

source
CImGui.ReserveMethod
Reserve(handle::Ptr{ImGuiTextBuffer})
source
CImGui.ResetMouseDragDeltaFunction
ResetMouseDragDelta(button=0)
source
CImGui.SameLineFunction
SameLine(local_pos_x=0.0, spacing_w=-1.0)

Call this function between widgets or groups to layout them horizontally.

source
CImGui.SaveIniSettingsToDiskMethod
SaveIniSettingsToDisk(ini_filename)
source
CImGui.SaveIniSettingsToMemoryFunction
SaveIniSettingsToMemory(out_ini_size=C_NULL)

Return a zero-terminated string with the .ini data which you can save by your own mean. Call when ImGuiIO.WantSaveIniSettings is set, then save data by your own mean and clear ImGuiIO.WantSaveIniSettings.

source
CImGui.SelectableFunction
Selectable(label, selected::Bool=false, flags=0, size=(0,0)) -> Bool
-Selectable(label, p_selected::Ref, flags=0, sizeImVec2(0,0)) -> Bool

Return true if is clicked, so you can modify your selection state:

  • size.x == 0.0: use remaining width
  • size.x > 0.0: specify width
  • size.y == 0.0: use label height
  • size.y > 0.0: specify height
source
CImGui.SeparatorMethod
Separator()

Separator, generally horizontal. But inside a menu bar or in horizontal layout mode, it becomes a vertical separator.

source
CImGui.SetClipboardTextMethod
SetClipboardText(text)
source
CImGui.SetColorEditOptionsMethod
SetColorEditOptions(flags)

Initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.

source
CImGui.SetColumnOffsetMethod
SetColumnOffset(column_index, offset_x)

Set position of column line (in pixels, from the left side of the contents region). Pass -1 to use current column.

source
CImGui.SetColumnWidthMethod
SetColumnWidth(column_index, width)

Set column width (in pixels). Pass -1 to use current column.

source
CImGui.SetCurrentContextMethod
SetCurrentContext(ctx::Ptr{ImGuiContext})

Set current context to ctx.

source
CImGui.SetCursorPosMethod
SetCursorPos(x, y)
-SetCursorPos(local_pos)
source
CImGui.SetCursorPosXMethod
SetCursorPosX(local_x)
source
CImGui.SetCursorPosYMethod
SetCursorPosX(local_y)
source
CImGui.SetCursorScreenPosMethod
SetCursorScreenPos(pos)
-SetCursorScreenPos(x, y)

Set cursor position in absolute screen coordinates [0..io.DisplaySize].

source
CImGui.SetDragDropPayloadFunction
SetDragDropPayload(type, data, size, cond=ImGuiCond_(1)) -> bool

type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui.

BETA API

Missing Demo code. API may evolve.

source
CImGui.SetItemAllowOverlapMethod
SetItemAllowOverlap()

Allow last item to be overlapped by a subsequent item. Sometimes useful with invisible buttons, selectables, etc. to catch unused area. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.SetItemDefaultFocusMethod
SetItemDefaultFocus()

Make last item the default focused item of a window.

Tip

Prefer using SetItemDefaultFocus over if (IsWindowAppearing()) SetScrollHereY() when applicable to signify "this is the default item").

source
CImGui.SetKeyboardFocusHereFunction
SetKeyboardFocusHere(offset=0)

Focus keyboard on the next widget. Use positive offset to access sub components of a multiple component widget. Use -1 to access previous widget.

Tip

Prefer using SetItemDefaultFocus over if (IsWindowAppearing()) SetScrollHereY() when applicable to signify "this is the default item").

source
CImGui.SetMouseCursorMethod
SetMouseCursor(type)

Set desired cursor type.

source
CImGui.SetNextFrameWantCaptureKeyboardFunction
SetNextFrameWantCaptureKeyboard(capture=true)

Manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application to handle). e.g. force capture keyboard when your widget is being hovered.

source
CImGui.SetNextFrameWantCaptureMouseFunction
CaptureMouseFromApp(capture=true)

Manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application to handle).

source
CImGui.SetNextItemOpenFunction
SetNextItemOpen(is_open, cond=0)

Set next TreeNode/CollapsingHeader open state.

source
CImGui.SetNextItemWidthMethod
SetNextItemWidth(item_width)

Set width of the next common large "item+label" widget.

  • item_width > 0.0: width in pixels
  • item_width < 0.0: align xx pixels to the right of window (so -1.0 always align width to the right side)
source
CImGui.SetNextWindowBgAlphaMethod
SetNextWindowBgAlpha(alpha)

Set next window background color alpha. Helper to easily modify ImGuiCol_WindowBg/ChildBg/PopupBg. You may also use ImGuiWindowFlags_NoBackground.

source
CImGui.SetNextWindowCollapsedFunction
SetNextWindowCollapsed(collapsed, cond=0)

Set next window collapsed state. Call before Begin.

source
CImGui.SetNextWindowContentSizeMethod
SetNextWindowContentSize(size)
-SetNextWindowContentSize(x, y)

Set next window content size (~ enforce the range of scrollbars). Not including window decorations (title bar, menu bar, etc.). Set an axis to 0.0 to leave it automatic. Call before Begin.

source
CImGui.SetNextWindowFocusMethod
SetNextWindowFocus()

Set next window to be focused / front-most. Call before Begin.

source
CImGui.SetNextWindowPosFunction
SetNextWindowPos(pos, cond=0, pivot=(0,0))

Set next window position. Call before Begin. use pivot=(0.5,0.5) to center on given point, etc.

source
CImGui.SetNextWindowSizeFunction
SetNextWindowSize(size, cond=0)

Set next window size. Set axis to 0.0 to force an auto-fit on this axis. Call before Begin.

source
CImGui.SetNextWindowSizeConstraintsFunction
SetNextWindowSizeConstraints(size_min, size_max, custom_callback=C_NULL, custom_callback_data=C_NULL)

Set next window size limits. Use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints.

source
CImGui.SetScrollFromPosXFunction
SetScrollFromPosX(local_y, center_y_ratio=0.5)

Adjust scrolling amount to make given position visible. Generally GetCursorStartPos + offset to compute a valid position.

source
CImGui.SetScrollFromPosYFunction
SetScrollFromPosY(local_y, center_y_ratio=0.5)

Adjust scrolling amount to make given position visible. Generally GetCursorStartPos + offset to compute a valid position.

source
CImGui.SetScrollHereYFunction
SetScrollHereY(center_y_ratio=0.5)

Adjust scrolling amount to make current cursor position visible.

  • center_y_ratio == 0.0: top
  • center_y_ratio == 0.5: center
  • center_y_ratio == 1.0: bottom

When using to make a "default/current item" visible, consider using SetItemDefaultFocus instead.

source
CImGui.SetScrollXMethod
SetScrollX(scroll_x)

Set scrolling amount [0..GetScrollMaxX()].

source
CImGui.SetScrollYMethod
SetScrollY(scroll_y)

Set scrolling amount [0..GetScrollMaxY()].

source
CImGui.SetStateStorageMethod
SetStateStorage(storage)

Replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)

source
CImGui.SetTabItemClosedMethod
SetTabItemClosed(tab_or_docked_window_label)

Notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name.

BETA API

API may evolve!

source
CImGui.SetTexIDMethod
SetTexID(self::Ptr{ImFontAtlas}, id)
source
CImGui.SetTooltipMethod
SetTooltip(formatted_text)

Set a text-only tooltip, typically use with IsItemHovered. Overidde any previous call to SetTooltip.

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.

source
CImGui.SetWindowCollapsedFunction
SetWindowCollapsed(name::AbstractString, collapsed, cond=0)

Set named window collapsed state.

source
CImGui.SetWindowCollapsedFunction
SetWindowCollapsedBool(collapsed, cond=0)

Set current window collapsed state.

Not recommended!

This function is not recommended! Prefer using SetNextWindowCollapsed.

source
CImGui.SetWindowFocusMethod
SetWindowFocus(name::Ptr{Cvoid})
-SetWindowFocus(name::AbstractString)

Set named window to be focused / front-most. Use C_NULL to remove focus.

source
CImGui.SetWindowFocusMethod
SetWindowFocus()

Set current window to be focused / top-most.

Not recommended!

This function is not recommended! Prefer using SetNextWindowFocus.

source
CImGui.SetWindowFontScaleMethod
SetWindowFontScale(scale)

Set font scale. Adjust ImGuiIO.FontGlobalScale if you want to scale all windows.

source
CImGui.SetWindowPosFunction
SetWindowPosStr(name::AbstractString, pos, cond=0)

Set named window position.

source
CImGui.SetWindowPosFunction
SetWindowPos(pos, cond=0)

Set current window position - call within Begin/End.

Not recommended!

This function is not recommended! Prefer using SetNextWindowPos, as this may incur tearing and side-effects.

source
CImGui.SetWindowSizeFunction
SetWindowSizeStr(name::AbstractString, size, cond=0)

Set named window size. Set axis to 0.0 to force an auto-fit on this axis.

source
CImGui.SetWindowSizeFunction
SetWindowSize(size, cond=0)

Set current window size - call within Begin/End. Set to (0,0) to force an auto-fit.

Not recommended!

This function is not recommended! Prefer using SetNextWindowSize, as this may incur tearing and minor side-effects.

source
CImGui.ShowAboutWindowFunction
ShowAboutWindow()
-ShowAboutWindow(p_open=C_NULL)

Create about window. Display Dear ImGui version, credits and build/system information.

source
CImGui.ShowDemoWindowFunction
ShowDemoWindow()
-ShowDemoWindow(p_open=C_NULL)

Create demo/test window. Demonstrate most ImGui features.

source
CImGui.ShowFontSelectorMethod
ShowFontSelector(label)

Add font selector block (not a window), essentially a combo listing the loaded fonts.

source
CImGui.ShowMetricsWindowFunction
ShowMetricsWindow()
-ShowMetricsWindow(p_open=C_NULL)

Create metrics window. Display Dear ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc.

source
CImGui.ShowStyleEditorFunction
ShowStyleEditor()
-ShowStyleEditor(ref=C_NULL)

Add style editor block (not a window). You can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style).

source
CImGui.ShowStyleSelectorMethod
ShowStyleSelector()
-ShowStyleSelector(label)

Add style selector block (not a window), essentially a combo listing the default styles.

source
CImGui.ShowUserGuideMethod
ShowUserGuide()

Add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).

source
CImGui.SizeMethod
Size(handle::Ptr{ImGuiTextBuffer}) -> Cint
source
CImGui.SliderAngleFunction
SliderAngle(label, v_rad, v_degrees_min=-360.0, v_degrees_max=360.0, format="%.0f deg", flags=0) -> Bool
source
CImGui.SliderFloatFunction
SliderFloat(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

Create a slider widget.

Tip

ctrl+click on a slider to input with keyboard. manually input values aren't clamped, can go off-bounds.

Arguments

  • format: adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display
    • "%.3f" -> 1.234
    • "%5.2f secs" -> 01.23 secs
    • "Biscuit: %.0f" -> Biscuit: 1
source
CImGui.SliderFloat2Function
SliderFloat2(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.SliderFloat3Function
SliderFloat3(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.SliderFloat4Function
SliderFloat4(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.SliderIntFunction
SliderInt(label, v, v_min, v_max, format="%d", flags=0) -> Bool
source
CImGui.SliderInt2Function
SliderInt2(label, v, v_min, v_max, format="%d", flags=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.SliderInt3Function
SliderInt3(label, v, v_min, v_max, format="%d", flags=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.SliderInt4Function
SliderInt4(label, v, v_min, v_max, format="%d", flags=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.SliderScalarFunction
SliderScalar(label, data_type, v, v_min, v_max, format=C_NULL, flag=0) -> Bool
source
CImGui.SliderScalarNFunction
SliderScalarN(label, data_type, v, components, v_min, v_max, format=C_NULL, flag=0) -> Bool
source
CImGui.SmallButtonMethod
SmallButton(label) -> Bool

Return true when the value has been changed or when pressed/selected. It creates a button with FramePadding=(0,0) to easily embed within text.

source
CImGui.SpacingMethod
Spacing()

Add vertical spacing.

source
CImGui.StepMethod
Step(handle::Ptr{ImGuiListClipper}) -> Bool

Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.

source
CImGui.StyleColorsClassicMethod
StyleColorsClassic()

Use the classic imgui style.

source
CImGui.StyleColorsDarkMethod
StyleColorsDark()

Use the new, recommended style. This is also the default style.

source
CImGui.StyleColorsLightMethod
StyleColorsLight()

This style is best used with borders and a custom, thicker font.

source
CImGui.TableGetColumnCountMethod
TableGetColumnCount() -> CInt

return number of columns (value passed to BeginTable)

source
CImGui.TableGetColumnFlagsFunction
TableGetColumnFlags(column_n = -1) -> ImGuiTableColumnFlags

Return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column.

source
CImGui.TableGetColumnIndexMethod
TableGetColumnIndex() -> CInt

Return current column index

source
CImGui.TableGetColumnNameFunction
TableGetColumnName(column_n = -1) -> String

return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.

source
CImGui.TableGetRowIndexMethod
TableGetRowIndex() -> CInt

Return current row index.

source
CImGui.TableGetSortSpecsMethod
TableGetSortSpecs() -> Ptr{ImGuiTableSortSpecs}

get latest sort specs for the table (NULL if not sorting).

source
CImGui.TableHeaderMethod
TableHeader(label)

Submit one header cell manually (rarely used)

source
CImGui.TableHeadersRowMethod
TableHeadersRow()

Submit all headers cells based on data provided to TableSetupColumn() + submit context menu

source
CImGui.TableNextColumnMethod
TableNextColumn() -> Bool

Append into the next column (or first column of next row if currently in last column). Return true when column is visible.

source
CImGui.TableNextRowFunction
TableNextRow(row_flags = ImGuiTableRowFlags_(0), min_row_height = 0.0)

Append into the first cell of a new row.

source
CImGui.TableSetBgColorFunction
TableSetBgColor(bg_target, color, column_n = -1)

Change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.

source
CImGui.TableSetColumnIndexMethod
TableSetColumnIndex(column_n) -> Bool

Append into the specified column. Return true when column is visible.

source
CImGui.TableSetupColumnFunction
TableSetupColumn(label, flags = ImGuiTableColumnFlags_(0), init_width_or_weight = 0.0, user_id = ImGuiID(0))

Specify label, resizing policy, default width/weight, id, various other flags etc.

source
CImGui.TableSetupScrollFreezeMethod
TableSetupScrollFreeze(cols, rows)

Lock columns/rows so they stay visible when scrolled.

source
CImGui.TextMethod
Text(formatted_text)

Create a text widget.

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.

source
CImGui.TextBufferMethod
TextBuffer() -> Ptr{ImGuiTextBuffer}

Helper: Growable text buffer for logging/accumulating text

source
CImGui.TextColoredMethod
TextColored(col, formatted_text)

Shortcut for PushStyleColor(ImGuiCol_Text, col); Text(text); PopStyleColor();.

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.

source
CImGui.TextDisabledMethod
TextDisabled(formatted_text)

Shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(text); PopStyleColor();.

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.

source
CImGui.TextUnformattedFunction
TextUnformatted(text, text_end=C_NULL)

Raw text without formatting. Roughly equivalent to Text("%s", text) but:

  1. doesn't require null terminated string if text_end is specified;
  2. it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text.
source
CImGui.TextWrappedMethod
TextWrapped(formatted_text)

Shortcut for PushTextWrapPos(0.0f); Text(text); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize.

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.

source
CImGui.TreeNodeMethod
TreeNode(label::AbstractString) -> Bool

TreeNode functions return true when the node is open, in which case you need to also call TreePop when you are finished displaying the tree node contents.

source
CImGui.TreeNodeMethod
TreeNode(str_id, formatted_text) -> Bool

Helper variation to completely decorelate the id from the displayed string. Read the FAQ in PushID's' doc about why and how to use ID. To align arbitrary text at the same level as a TreeNode you can use Bullet.

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.

source
CImGui.TreeNodeMethod
TreeNodePtr(ptr_id::Ptr, formatted_text) -> Bool

Helper variation to completely decorelate the id from the displayed string. Read the FAQ in PushID's' doc about why and how to use ID. To align arbitrary text at the same level as a TreeNode you can use Bullet.

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.

source
CImGui.TreeNodeExFunction
TreeNodeEx(label, flags=0) -> Bool
source
CImGui.TreeNodeExMethod
TreeNodeEx(str_id, flags, formatted_text) -> Bool
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.

source
CImGui.TreeNodeExMethod
TreeNodeEx(ptr_id::Ptr, flags, formatted_text) -> Bool
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.

source
CImGui.TreePopMethod
TreePop()

Unindent + PopID.

source
CImGui.TreePushFunction
TreePush(ptr_id::Ptr=C_NULL)

Indent + PushID. Already called by TreeNode when returning true, but you can call TreePush/TreePop yourself if desired.

source
CImGui.TreePushMethod
TreePush(str_id)

Indent + PushID. Already called by TreeNode when returning true, but you can call TreePush/TreePop yourself if desired.

source
CImGui.UnindentFunction
Unindent()
-Unindent(indent_w)

Move content position back to the left, by ImGuiStyle.IndentSpacing or indent_w if indent_w != 0.

source
CImGui.VSliderFloatFunction
VSliderFloat(label, size, v, v_min, v_max, format="%.3f", flag=0) -> Bool
source
CImGui.VSliderIntFunction
VSliderInt(label, size, v, v_min, v_max, format="%d", flag=0) -> Bool
source
CImGui.VSliderScalarFunction
VSliderScalar(label, size, data_type, v, v_min, v_max, format=C_NULL, flag=0) -> Bool
source
CImGui.ValueBoolMethod
ValueBool(prefix, b)

Output single value in "name: value" format.

source
CImGui.ValueFloatFunction
ValueFloat(prefix, v, float_format=C_NULL)

Output single value in "name: value" format.

source
CImGui.ValueIntMethod
ValueInt(prefix, v)

Output single value in "name: value" format.

source
CImGui.ValueUintMethod
ValueUint(prefix, v)

Output single value in "name: value" format.

source
+end
source
CImGui.RenderMethod
Render()

Calling this function ends the ImGui frame. This function finalizes the draw data.

Obsolete

Optionally call ImGuiIO.RenderDrawListsFn if set. Nowadays, prefer calling your render function yourself.

source
CImGui.ReserveMethod
Reserve(handle::Ptr{ImGuiTextBuffer})
source
CImGui.ResetMouseDragDeltaFunction
ResetMouseDragDelta(button=0)
source
CImGui.SameLineFunction
SameLine(local_pos_x=0.0, spacing_w=-1.0)

Call this function between widgets or groups to layout them horizontally.

source
CImGui.SaveIniSettingsToDiskMethod
SaveIniSettingsToDisk(ini_filename)
source
CImGui.SaveIniSettingsToMemoryFunction
SaveIniSettingsToMemory(out_ini_size=C_NULL)

Return a zero-terminated string with the .ini data which you can save by your own mean. Call when ImGuiIO.WantSaveIniSettings is set, then save data by your own mean and clear ImGuiIO.WantSaveIniSettings.

source
CImGui.SelectableFunction
Selectable(label, selected::Bool=false, flags=0, size=(0,0)) -> Bool
+Selectable(label, p_selected::Ref, flags=0, sizeImVec2(0,0)) -> Bool

Return true if is clicked, so you can modify your selection state:

  • size.x == 0.0: use remaining width
  • size.x > 0.0: specify width
  • size.y == 0.0: use label height
  • size.y > 0.0: specify height
source
CImGui.SeparatorMethod
Separator()

Separator, generally horizontal. But inside a menu bar or in horizontal layout mode, it becomes a vertical separator.

source
CImGui.SetClipboardTextMethod
SetClipboardText(text)
source
CImGui.SetColorEditOptionsMethod
SetColorEditOptions(flags)

Initialize current options (generally on application startup) if you want to select a default format, picker type, etc. User will be able to change many settings, unless you pass the _NoOptions flag to your calls.

source
CImGui.SetColumnOffsetMethod
SetColumnOffset(column_index, offset_x)

Set position of column line (in pixels, from the left side of the contents region). Pass -1 to use current column.

source
CImGui.SetColumnWidthMethod
SetColumnWidth(column_index, width)

Set column width (in pixels). Pass -1 to use current column.

source
CImGui.SetCurrentContextMethod
SetCurrentContext(ctx::Ptr{ImGuiContext})

Set current context to ctx.

source
CImGui.SetCursorPosMethod
SetCursorPos(x, y)
+SetCursorPos(local_pos)
source
CImGui.SetCursorPosXMethod
SetCursorPosX(local_x)
source
CImGui.SetCursorPosYMethod
SetCursorPosX(local_y)
source
CImGui.SetCursorScreenPosMethod
SetCursorScreenPos(pos)
+SetCursorScreenPos(x, y)

Set cursor position in absolute screen coordinates [0..io.DisplaySize].

source
CImGui.SetDragDropPayloadFunction
SetDragDropPayload(type, data, size, cond=ImGuiCond_(1)) -> bool

type is a user defined string of maximum 32 characters. Strings starting with '_' are reserved for dear imgui internal types. Data is copied and held by imgui.

BETA API

Missing Demo code. API may evolve.

source
CImGui.SetItemAllowOverlapMethod
SetItemAllowOverlap()

Allow last item to be overlapped by a subsequent item. Sometimes useful with invisible buttons, selectables, etc. to catch unused area. See Demo Window under "Widgets->Querying Status" for an interactive visualization of many of those functions.

source
CImGui.SetItemDefaultFocusMethod
SetItemDefaultFocus()

Make last item the default focused item of a window.

Tip

Prefer using SetItemDefaultFocus over if (IsWindowAppearing()) SetScrollHereY() when applicable to signify "this is the default item").

source
CImGui.SetKeyboardFocusHereFunction
SetKeyboardFocusHere(offset=0)

Focus keyboard on the next widget. Use positive offset to access sub components of a multiple component widget. Use -1 to access previous widget.

Tip

Prefer using SetItemDefaultFocus over if (IsWindowAppearing()) SetScrollHereY() when applicable to signify "this is the default item").

source
CImGui.SetMouseCursorMethod
SetMouseCursor(type)

Set desired cursor type.

source
CImGui.SetNextFrameWantCaptureKeyboardFunction
SetNextFrameWantCaptureKeyboard(capture=true)

Manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application to handle). e.g. force capture keyboard when your widget is being hovered.

source
CImGui.SetNextFrameWantCaptureMouseFunction
CaptureMouseFromApp(capture=true)

Manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application to handle).

source
CImGui.SetNextItemOpenFunction
SetNextItemOpen(is_open, cond=0)

Set next TreeNode/CollapsingHeader open state.

source
CImGui.SetNextItemWidthMethod
SetNextItemWidth(item_width)

Set width of the next common large "item+label" widget.

  • item_width > 0.0: width in pixels
  • item_width < 0.0: align xx pixels to the right of window (so -1.0 always align width to the right side)
source
CImGui.SetNextWindowBgAlphaMethod
SetNextWindowBgAlpha(alpha)

Set next window background color alpha. Helper to easily modify ImGuiCol_WindowBg/ChildBg/PopupBg. You may also use ImGuiWindowFlags_NoBackground.

source
CImGui.SetNextWindowCollapsedFunction
SetNextWindowCollapsed(collapsed, cond=0)

Set next window collapsed state. Call before Begin.

source
CImGui.SetNextWindowContentSizeMethod
SetNextWindowContentSize(size)
+SetNextWindowContentSize(x, y)

Set next window content size (~ enforce the range of scrollbars). Not including window decorations (title bar, menu bar, etc.). Set an axis to 0.0 to leave it automatic. Call before Begin.

source
CImGui.SetNextWindowFocusMethod
SetNextWindowFocus()

Set next window to be focused / front-most. Call before Begin.

source
CImGui.SetNextWindowPosFunction
SetNextWindowPos(pos, cond=0, pivot=(0,0))

Set next window position. Call before Begin. use pivot=(0.5,0.5) to center on given point, etc.

source
CImGui.SetNextWindowSizeFunction
SetNextWindowSize(size, cond=0)

Set next window size. Set axis to 0.0 to force an auto-fit on this axis. Call before Begin.

source
CImGui.SetNextWindowSizeConstraintsFunction
SetNextWindowSizeConstraints(size_min, size_max, custom_callback=C_NULL, custom_callback_data=C_NULL)

Set next window size limits. Use -1,-1 on either X/Y axis to preserve the current size. Use callback to apply non-trivial programmatic constraints.

source
CImGui.SetScrollFromPosXFunction
SetScrollFromPosX(local_y, center_y_ratio=0.5)

Adjust scrolling amount to make given position visible. Generally GetCursorStartPos + offset to compute a valid position.

source
CImGui.SetScrollFromPosYFunction
SetScrollFromPosY(local_y, center_y_ratio=0.5)

Adjust scrolling amount to make given position visible. Generally GetCursorStartPos + offset to compute a valid position.

source
CImGui.SetScrollHereYFunction
SetScrollHereY(center_y_ratio=0.5)

Adjust scrolling amount to make current cursor position visible.

  • center_y_ratio == 0.0: top
  • center_y_ratio == 0.5: center
  • center_y_ratio == 1.0: bottom

When using to make a "default/current item" visible, consider using SetItemDefaultFocus instead.

source
CImGui.SetScrollXMethod
SetScrollX(scroll_x)

Set scrolling amount [0..GetScrollMaxX()].

source
CImGui.SetScrollYMethod
SetScrollY(scroll_y)

Set scrolling amount [0..GetScrollMaxY()].

source
CImGui.SetStateStorageMethod
SetStateStorage(storage)

Replace current window storage with our own (if you want to manipulate it yourself, typically clear subsection of it)

source
CImGui.SetTabItemClosedMethod
SetTabItemClosed(tab_or_docked_window_label)

Notify TabBar or Docking system of a closed tab/window ahead (useful to reduce visual flicker on reorderable tab bars). For tab-bar: call after BeginTabBar() and before Tab submissions. Otherwise call with a window name.

BETA API

API may evolve!

source
CImGui.SetTexIDMethod
SetTexID(self::Ptr{ImFontAtlas}, id)
source
CImGui.SetTooltipMethod
SetTooltip(formatted_text)

Set a text-only tooltip, typically use with IsItemHovered. Overidde any previous call to SetTooltip.

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.

source
CImGui.SetWindowCollapsedFunction
SetWindowCollapsed(name::AbstractString, collapsed, cond=0)

Set named window collapsed state.

source
CImGui.SetWindowCollapsedFunction
SetWindowCollapsedBool(collapsed, cond=0)

Set current window collapsed state.

Not recommended!

This function is not recommended! Prefer using SetNextWindowCollapsed.

source
CImGui.SetWindowFocusMethod
SetWindowFocus(name::Ptr{Cvoid})
+SetWindowFocus(name::AbstractString)

Set named window to be focused / front-most. Use C_NULL to remove focus.

source
CImGui.SetWindowFocusMethod
SetWindowFocus()

Set current window to be focused / top-most.

Not recommended!

This function is not recommended! Prefer using SetNextWindowFocus.

source
CImGui.SetWindowFontScaleMethod
SetWindowFontScale(scale)

Set font scale. Adjust ImGuiIO.FontGlobalScale if you want to scale all windows.

source
CImGui.SetWindowPosFunction
SetWindowPosStr(name::AbstractString, pos, cond=0)

Set named window position.

source
CImGui.SetWindowPosFunction
SetWindowPos(pos, cond=0)

Set current window position - call within Begin/End.

Not recommended!

This function is not recommended! Prefer using SetNextWindowPos, as this may incur tearing and side-effects.

source
CImGui.SetWindowSizeFunction
SetWindowSizeStr(name::AbstractString, size, cond=0)

Set named window size. Set axis to 0.0 to force an auto-fit on this axis.

source
CImGui.SetWindowSizeFunction
SetWindowSize(size, cond=0)

Set current window size - call within Begin/End. Set to (0,0) to force an auto-fit.

Not recommended!

This function is not recommended! Prefer using SetNextWindowSize, as this may incur tearing and minor side-effects.

source
CImGui.ShowAboutWindowFunction
ShowAboutWindow()
+ShowAboutWindow(p_open=C_NULL)

Create about window. Display Dear ImGui version, credits and build/system information.

source
CImGui.ShowDemoWindowFunction
ShowDemoWindow()
+ShowDemoWindow(p_open=C_NULL)

Create demo/test window. Demonstrate most ImGui features.

source
CImGui.ShowFontSelectorMethod
ShowFontSelector(label)

Add font selector block (not a window), essentially a combo listing the loaded fonts.

source
CImGui.ShowMetricsWindowFunction
ShowMetricsWindow()
+ShowMetricsWindow(p_open=C_NULL)

Create metrics window. Display Dear ImGui internals: draw commands (with individual draw calls and vertices), window list, basic internal state, etc.

source
CImGui.ShowStyleEditorFunction
ShowStyleEditor()
+ShowStyleEditor(ref=C_NULL)

Add style editor block (not a window). You can pass in a reference ImGuiStyle structure to compare to, revert to and save to (else it uses the default style).

source
CImGui.ShowStyleSelectorMethod
ShowStyleSelector()
+ShowStyleSelector(label)

Add style selector block (not a window), essentially a combo listing the default styles.

source
CImGui.ShowUserGuideMethod
ShowUserGuide()

Add basic help/info block (not a window): how to manipulate ImGui as a end-user (mouse/keyboard controls).

source
CImGui.SizeMethod
Size(handle::Ptr{ImGuiTextBuffer}) -> Cint
source
CImGui.SliderAngleFunction
SliderAngle(label, v_rad, v_degrees_min=-360.0, v_degrees_max=360.0, format="%.0f deg", flags=0) -> Bool
source
CImGui.SliderFloatFunction
SliderFloat(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

Create a slider widget.

Tip

ctrl+click on a slider to input with keyboard. manually input values aren't clamped, can go off-bounds.

Arguments

  • format: adjust format to decorate the value with a prefix or a suffix for in-slider labels or unit display
    • "%.3f" -> 1.234
    • "%5.2f secs" -> 01.23 secs
    • "Biscuit: %.0f" -> Biscuit: 1
source
CImGui.SliderFloat2Function
SliderFloat2(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.SliderFloat3Function
SliderFloat3(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.SliderFloat4Function
SliderFloat4(label, v, v_min, v_max, format="%.3f", flag=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.SliderIntFunction
SliderInt(label, v, v_min, v_max, format="%d", flags=0) -> Bool
source
CImGui.SliderInt2Function
SliderInt2(label, v, v_min, v_max, format="%d", flags=0) -> Bool

The expected number of elements to be accessible in v is 2.

source
CImGui.SliderInt3Function
SliderInt3(label, v, v_min, v_max, format="%d", flags=0) -> Bool

The expected number of elements to be accessible in v is 3.

source
CImGui.SliderInt4Function
SliderInt4(label, v, v_min, v_max, format="%d", flags=0) -> Bool

The expected number of elements to be accessible in v is 4.

source
CImGui.SliderScalarFunction
SliderScalar(label, data_type, v, v_min, v_max, format=C_NULL, flag=0) -> Bool
source
CImGui.SliderScalarNFunction
SliderScalarN(label, data_type, v, components, v_min, v_max, format=C_NULL, flag=0) -> Bool
source
CImGui.SmallButtonMethod
SmallButton(label) -> Bool

Return true when the value has been changed or when pressed/selected. It creates a button with FramePadding=(0,0) to easily embed within text.

source
CImGui.SpacingMethod
Spacing()

Add vertical spacing.

source
CImGui.StepMethod
Step(handle::Ptr{ImGuiListClipper}) -> Bool

Call until it returns false. The DisplayStart/DisplayEnd fields will be set and you can process/draw those items.

source
CImGui.StyleColorsClassicMethod
StyleColorsClassic()

Use the classic imgui style.

source
CImGui.StyleColorsDarkMethod
StyleColorsDark()

Use the new, recommended style. This is also the default style.

source
CImGui.StyleColorsLightMethod
StyleColorsLight()

This style is best used with borders and a custom, thicker font.

source
CImGui.TableGetColumnCountMethod
TableGetColumnCount() -> CInt

return number of columns (value passed to BeginTable)

source
CImGui.TableGetColumnFlagsFunction
TableGetColumnFlags(column_n = -1) -> ImGuiTableColumnFlags

Return column flags so you can query their Enabled/Visible/Sorted/Hovered status flags. Pass -1 to use current column.

source
CImGui.TableGetColumnIndexMethod
TableGetColumnIndex() -> CInt

Return current column index

source
CImGui.TableGetColumnNameFunction
TableGetColumnName(column_n = -1) -> String

return "" if column didn't have a name declared by TableSetupColumn(). Pass -1 to use current column.

source
CImGui.TableGetRowIndexMethod
TableGetRowIndex() -> CInt

Return current row index.

source
CImGui.TableGetSortSpecsMethod
TableGetSortSpecs() -> Ptr{ImGuiTableSortSpecs}

get latest sort specs for the table (NULL if not sorting).

source
CImGui.TableHeaderMethod
TableHeader(label)

Submit one header cell manually (rarely used)

source
CImGui.TableHeadersRowMethod
TableHeadersRow()

Submit all headers cells based on data provided to TableSetupColumn() + submit context menu

source
CImGui.TableNextColumnMethod
TableNextColumn() -> Bool

Append into the next column (or first column of next row if currently in last column). Return true when column is visible.

source
CImGui.TableNextRowFunction
TableNextRow(row_flags = ImGuiTableRowFlags_(0), min_row_height = 0.0)

Append into the first cell of a new row.

source
CImGui.TableSetBgColorFunction
TableSetBgColor(bg_target, color, column_n = -1)

Change the color of a cell, row, or column. See ImGuiTableBgTarget_ flags for details.

source
CImGui.TableSetColumnIndexMethod
TableSetColumnIndex(column_n) -> Bool

Append into the specified column. Return true when column is visible.

source
CImGui.TableSetupColumnFunction
TableSetupColumn(label, flags = ImGuiTableColumnFlags_(0), init_width_or_weight = 0.0, user_id = ImGuiID(0))

Specify label, resizing policy, default width/weight, id, various other flags etc.

source
CImGui.TableSetupScrollFreezeMethod
TableSetupScrollFreeze(cols, rows)

Lock columns/rows so they stay visible when scrolled.

source
CImGui.TextMethod
Text(formatted_text)

Create a text widget.

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.

source
CImGui.TextBufferMethod
TextBuffer() -> Ptr{ImGuiTextBuffer}

Helper: Growable text buffer for logging/accumulating text

source
CImGui.TextColoredMethod
TextColored(col, formatted_text)

Shortcut for PushStyleColor(ImGuiCol_Text, col); Text(text); PopStyleColor();.

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.

source
CImGui.TextDisabledMethod
TextDisabled(formatted_text)

Shortcut for PushStyleColor(ImGuiCol_Text, style.Colors[ImGuiCol_TextDisabled]); Text(text); PopStyleColor();.

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.

source
CImGui.TextUnformattedFunction
TextUnformatted(text, text_end=C_NULL)

Raw text without formatting. Roughly equivalent to Text("%s", text) but:

  1. doesn't require null terminated string if text_end is specified;
  2. it's faster, no memory copy is done, no buffer size limits, recommended for long chunks of text.
source
CImGui.TextWrappedMethod
TextWrapped(formatted_text)

Shortcut for PushTextWrapPos(0.0f); Text(text); PopTextWrapPos();. Note that this won't work on an auto-resizing window if there's no other widgets to extend the window width, yoy may need to set a size using SetNextWindowSize.

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.

source
CImGui.TreeNodeMethod
TreeNode(label::AbstractString) -> Bool

TreeNode functions return true when the node is open, in which case you need to also call TreePop when you are finished displaying the tree node contents.

source
CImGui.TreeNodeMethod
TreeNode(str_id, formatted_text) -> Bool

Helper variation to completely decorelate the id from the displayed string. Read the FAQ in PushID's' doc about why and how to use ID. To align arbitrary text at the same level as a TreeNode you can use Bullet.

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.

source
CImGui.TreeNodeMethod
TreeNodePtr(ptr_id::Ptr, formatted_text) -> Bool

Helper variation to completely decorelate the id from the displayed string. Read the FAQ in PushID's' doc about why and how to use ID. To align arbitrary text at the same level as a TreeNode you can use Bullet.

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.

source
CImGui.TreeNodeExFunction
TreeNodeEx(label, flags=0) -> Bool
source
CImGui.TreeNodeExMethod
TreeNodeEx(str_id, flags, formatted_text) -> Bool
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.

source
CImGui.TreeNodeExMethod
TreeNodeEx(ptr_id::Ptr, flags, formatted_text) -> Bool
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.

source
CImGui.TreePopMethod
TreePop()

Unindent + PopID.

source
CImGui.TreePushFunction
TreePush(ptr_id::Ptr=C_NULL)

Indent + PushID. Already called by TreeNode when returning true, but you can call TreePush/TreePop yourself if desired.

source
CImGui.TreePushMethod
TreePush(str_id)

Indent + PushID. Already called by TreeNode when returning true, but you can call TreePush/TreePop yourself if desired.

source
CImGui.UnindentFunction
Unindent()
+Unindent(indent_w)

Move content position back to the left, by ImGuiStyle.IndentSpacing or indent_w if indent_w != 0.

source
CImGui.VSliderFloatFunction
VSliderFloat(label, size, v, v_min, v_max, format="%.3f", flag=0) -> Bool
source
CImGui.VSliderIntFunction
VSliderInt(label, size, v, v_min, v_max, format="%d", flag=0) -> Bool
source
CImGui.VSliderScalarFunction
VSliderScalar(label, size, data_type, v, v_min, v_max, format=C_NULL, flag=0) -> Bool
source
CImGui.ValueBoolMethod
ValueBool(prefix, b)

Output single value in "name: value" format.

source
CImGui.ValueFloatFunction
ValueFloat(prefix, v, float_format=C_NULL)

Output single value in "name: value" format.

source
CImGui.ValueIntMethod
ValueInt(prefix, v)

Output single value in "name: value" format.

source
CImGui.ValueUintMethod
ValueUint(prefix, v)

Output single value in "name: value" format.

source
diff --git a/dev/index.html b/dev/index.html index 6c79f0d..cdbdcf8 100644 --- a/dev/index.html +++ b/dev/index.html @@ -16,4 +16,4 @@ CImGui.Button("My Button") && @show "triggered" CImGui.End() end -Task (runnable) @0x00000001136bead0

Usage

The API provided in this package is as close as possible to the original C++ API. When translating C++ code to Julia, please follow the tips below:

As mentioned before, this package aims to provide the same user experience as the original C++ API, so any high-level abstraction should go into a more high-level package. Redux.jl might be of interest to you if you're looking for state management frameworks.

LibCImGui

LibCImGui is a thin wrapper over cimgui. It's one-to-one mapped to the original cimgui APIs. By using CImGui.LibCImGui, all of the ImGui-prefixed types, enums and ig-prefixed functions will be imported into the current namespace. It's mainly for people who prefer to use original cimgui's interface.

Backend

The default backend is based on ModernGL and GLFW which are stable and under actively maintained. Other popular backends like SFML and SDL could be added in the future if someone should invest time to make these packages work in post Julia 1.0 era.

+Task (runnable) @0x00000001136bead0

Usage

The API provided in this package is as close as possible to the original C++ API. When translating C++ code to Julia, please follow the tips below:

As mentioned before, this package aims to provide the same user experience as the original C++ API, so any high-level abstraction should go into a more high-level package. Redux.jl might be of interest to you if you're looking for state management frameworks.

LibCImGui

LibCImGui is a thin wrapper over cimgui. It's one-to-one mapped to the original cimgui APIs. By using CImGui.LibCImGui, all of the ImGui-prefixed types, enums and ig-prefixed functions will be imported into the current namespace. It's mainly for people who prefer to use original cimgui's interface.

Backend

The default backend is based on ModernGL and GLFW which are stable and under actively maintained. Other popular backends like SFML and SDL could be added in the future if someone should invest time to make these packages work in post Julia 1.0 era.