Difference between revisions of "ImGui.Core"

From GiderosMobile
Line 54: Line 54:
 
[[ImGui.Core:endFrame|ImGui:endFrame]] ''ends the ImGui frame''<br/><!--GIDEROSMTD:ImGui:endFrame() ends the ImGui frame-->
 
[[ImGui.Core:endFrame|ImGui:endFrame]] ''ends the ImGui frame''<br/><!--GIDEROSMTD:ImGui:endFrame() ends the ImGui frame-->
 
[[ImGui.Core:endWindow|ImGui:endWindow]] ''pops window from the stack''<br/><!--GIDEROSMTD:ImGui:endWindow() pops window from the stack-->
 
[[ImGui.Core:endWindow|ImGui:endWindow]] ''pops window from the stack''<br/><!--GIDEROSMTD:ImGui:endWindow() pops window from the stack-->
 +
[[ImGui.Core:filledSliderAngle|ImGui:filledSliderAngle]] ''displays an ImGui regular filled angle slider''<br/><!--GIDEROSMTD:ImGui:filledSliderAngle(label, mirrorFlag, valueInRad, [min_degrees=-360, max_degrees=360, formatString="%.0f deg", ImGuiSliderFlags=0]) displays an ImGui regular filled angle slider-->
 
[[ImGui.Core:filledSliderFloat|ImGui:filledSliderFloat]] ''displays an ImGui regular filled float slider''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat(label, mirrorFlag, value, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular filled float slider-->
 
[[ImGui.Core:filledSliderFloat|ImGui:filledSliderFloat]] ''displays an ImGui regular filled float slider''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat(label, mirrorFlag, value, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays an ImGui regular filled float slider-->
 
[[ImGui.Core:filledSliderFloat2|ImGui:filledSliderFloat2]] ''displays two ImGui regular filled float sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat2(label, mirrorFlag, value1, value2, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays two ImGui regular filled float sliders-->
 
[[ImGui.Core:filledSliderFloat2|ImGui:filledSliderFloat2]] ''displays two ImGui regular filled float sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat2(label, mirrorFlag, value1, value2, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays two ImGui regular filled float sliders-->
Line 59: Line 60:
 
[[ImGui.Core:filledSliderFloat4|ImGui:filledSliderFloat4]] ''displays four ImGui regular filled float sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat4(label, mirrorFlag, value1, value2, value3, value4, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays four ImGui regular filled float sliders-->
 
[[ImGui.Core:filledSliderFloat4|ImGui:filledSliderFloat4]] ''displays four ImGui regular filled float sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderFloat4(label, mirrorFlag, value1, value2, value3, value4, [min=0, max=0, formatString="%.3f", ImGuiSliderFlags=0]) displays four ImGui regular filled float sliders-->
  
[[ImGui.Core:filledSliderAngle|ImGui:filledSliderAngle]] ''displays an ImGui regular filled angle slider''<br/><!--GIDEROSMTD:ImGui:filledSliderAngle(label, mirrorFlag, valueInRad, [min_degrees=-360, max_degrees=360, formatString="%.0f deg", ImGuiSliderFlags=0]) displays an ImGui regular filled angle slider-->
+
[[ImGui.Core:filledSliderInt|ImGui:filledSliderInt]] ''displays an ImGui regular filled int slider''<br/><!--GIDEROSMTD:ImGui:filledSliderInt(label, mirrorFlag, value, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays an ImGui regular filled int slider-->
 +
[[ImGui.Core:filledSliderInt2|ImGui:filledSliderInt2]] ''displays two ImGui regular filled int sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderInt2(label, mirrorFlag, value1, value2, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays two ImGui regular filled int sliders-->
 +
[[ImGui.Core:filledSliderInt3|ImGui:filledSliderInt3]] ''displays three ImGui regular filled int sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderInt3(label, mirrorFlag, value1, value2, value3, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays three ImGui regular filled int sliders-->
 +
[[ImGui.Core:filledSliderInt4|ImGui:filledSliderInt4]] ''displays four ImGui regular filled int sliders''<br/><!--GIDEROSMTD:ImGui:filledSliderInt4(label, mirrorFlag, value1, value2, value3, value4, [min=0, max=0, formatString="%d", ImGuiSliderFlags=0]) displays four ImGui regular filled int sliders-->
  
 
[[ImGui.Core:getIO|ImGui:getIO]] ''accesses the IO structure (mouse/keyboard/gamepad inputs...)''<br/><!--GIDEROSMTD:ImGui:getIO() accesses the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)-->
 
[[ImGui.Core:getIO|ImGui:getIO]] ''accesses the IO structure (mouse/keyboard/gamepad inputs...)''<br/><!--GIDEROSMTD:ImGui:getIO() accesses the IO structure (mouse/keyboard/gamepad inputs, time, various configuration options/flags)-->

Revision as of 01:37, 1 April 2021

Supported platforms: Platform android.pngPlatform ios.pngPlatform mac.pngPlatform pc.pngPlatform html5.pngPlatform winrt.pngPlatform win32.png
Available since: Gideros 2020.9

Description

This is the ImGui main class.


PLEASE NOTE THE DOCUMENTATION IS WORK IN PROGRESS


Widgets: Regular Sliders
* CTRL+Click on any slider to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
* Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
* Format string may also be set to NULL or use the default format ("%f" or "%d").

If you get a warning converting a float to ImGuiSliderFlags, read https://github.com/ocornut/imgui/issues/3361


Widgets: Drag Sliders
* CTRL+Click on any drag box to turn them into an input box. Manually input values aren't clamped and can go off-bounds.
* For all the Float2/Float3/Float4/Int2/Int3/Int4 versions of every functions, note that a 'float v[X]' function argument is the same as 'float* v', the array syntax is just a way to document the number of elements that are expected to be accessible. You can pass address of your first element out of a contiguous set, e.g. &myvector.x
* Adjust format string to decorate the value with a prefix, a suffix, or adapt the editing and display precision e.g. "%.3f" -> 1.234; "%5.2f secs" -> 01.23 secs; "Biscuit: %.0f" -> Biscuit: 1; etc.
* Format string may also be set to NULL or use the default format ("%f" or "%d").
* Speed are per-pixel of mouse movement (v_speed=0.2f: mouse needs to move by 5 pixels to increase value by 1). For gamepad/keyboard navigation, minimum speed is Max(v_speed, minimum_step_at_given_precision).
* Use v_min < v_max to clamp edits to given limits. Note that CTRL+Click manual input can override those limits.
* Use v_max = FLT_MAX / INT_MAX etc to avoid clamping to a maximum, same with v_min = -FLT_MAX / INT_MIN to avoid clamping to a minimum.
* We use the same sets of flags for DragXXX() and SliderXXX() functions as the features are the same and it makes it easier to swap them.

Methods

ImGui.new initializes ImGui

ImGui:arrowButton displays an ImGui arrow button
ImGui:beginWindow pushes window to the stack and starts appending to it
ImGui:bullet displays an ImGui bullet
ImGui:bulletText displays an ImGui bulleted text
ImGui:button displays an ImGui button
ImGui:checkbox displays an ImGui checkbox
ImGui:combo displays a ImGui combo box
ImGui:dragFloat displays an ImGui drag float slider
ImGui:dragFloat2 displays 2 ImGui drag float sliders
ImGui:dragFloat3 displays 3 ImGui drag float sliders
ImGui:dragFloat4 displays 4 ImGui drag float sliders
ImGui:dragFloatRange2 displays 2 ImGui drag float range sliders
ImGui:dragInt displays an ImGui drag int slider
ImGui:dragInt2 displays 2 ImGui drag int sliders
ImGui:dragInt3 displays 3 ImGui drag int sliders
ImGui:dragInt4 displays 4 ImGui drag int sliders
ImGui:dragIntRange2 displays 2 ImGui drag int range sliders
ImGui:dragScalar displays an ImGui drag scalar slider
ImGui:endFrame ends the ImGui frame
ImGui:endWindow pops window from the stack
ImGui:filledSliderAngle displays an ImGui regular filled angle slider
ImGui:filledSliderFloat displays an ImGui regular filled float slider
ImGui:filledSliderFloat2 displays two ImGui regular filled float sliders
ImGui:filledSliderFloat3 displays three ImGui regular filled float sliders
ImGui:filledSliderFloat4 displays four ImGui regular filled float sliders

ImGui:filledSliderInt displays an ImGui regular filled int slider
ImGui:filledSliderInt2 displays two ImGui regular filled int sliders
ImGui:filledSliderInt3 displays three ImGui regular filled int sliders
ImGui:filledSliderInt4 displays four ImGui regular filled int sliders

ImGui:getIO accesses the IO structure (mouse/keyboard/gamepad inputs...)
ImGui:getStyle accesses the Style structure (colors, sizes)
ImGui:image an ImGui image
ImGui:imageButton displays an ImGui image button
ImGui:imageButtonWithText displays an ImGui image button with some text
ImGui:imageFilled an ImGui filled image
ImGui:invisibleButton an ImGui invisible button
ImGui:labelText displays an ImGui labelled text
ImGui:newFrame starts a new ImGui frame
ImGui:progressBar an ImGui progress bar
ImGui:render ends the ImGui frame, finalizes the draw data
ImGui:scaledImage an ImGui scaled image
ImGui:scaledImageFilled an ImGui scaled image and filled
ImGui:scaledImageButton an ImGui scaled image button
ImGui:scaledImageButtonWithText an ImGui scaled image button and some text
ImGui:setClassicStyle sets a classic color style
ImGui:setDarkStyle sets a dark color style
ImGui:setLightStyle sets a light color style
ImGui:showAboutWindow adds an ImGui About window
ImGui:showDemoWindow adds an ImGui demo window
ImGui:showFontSelector adds a font selector block (not a window)
ImGui:showMetricsWindow adds an ImGui metrics window
ImGui:showStyleEditor adds the style editor block (not a window)
ImGui:showStyleSelector adds a style selector block (not a window)
ImGui:showUserGuide adds basic help/info block (not a window)
ImGui:sliderAngle displays an ImGui regular angle slider
ImGui:sliderFloat displays an ImGui regular float slider
ImGui:sliderFloat2 displays 2 ImGui regular float sliders
ImGui:sliderFloat3 displays 3 ImGui regular float sliders
ImGui:sliderFloat4 displays 4 ImGui regular float sliders
ImGui:sliderInt displays an ImGui regular int slider
ImGui:sliderInt2 displays 2 ImGui regular int sliders
ImGui:sliderInt3 displays 3 ImGui regular int sliders
ImGui:sliderInt4 displays 4 ImGui regular int sliders
ImGui:smallButton displays an ImGui small button
ImGui:text displays an ImGui text
ImGui:textColored displays an ImGui colored text
ImGui:textDisabled displays an ImGui disabled text
ImGui:textWrapped displays an ImGui wrapped text
ImGui:vSliderFloat displays an ImGui regular vertical float slider
ImGui:vSliderInt displays an ImGui regular vertical int slider

Events

ImGui.KeyChar
ImGui.KeyDown
ImGui.KeyUp
ImGui.MouseDown
ImGui.MouseHover
ImGui.MouseMove
ImGui.MouseUp
ImGui.MouseWheel
ImGui.TouchBegin
ImGui.TouchEnd
ImGui.TouchCancel
ImGui.TouchMove

Constants

ImGui._VERSION

Window Flags
ImGui.WindowFlags_AlwaysAutoResize
ImGui.WindowFlags_AlwaysHorizontalScrollbar
ImGui.WindowFlags_AlwaysUseWindowPadding
ImGui.WindowFlags_AlwaysVerticalScrollbar
ImGui.WindowFlags_HorizontalScrollbar
ImGui.WindowFlags_MenuBar
ImGui.WindowFlags_NoBackground
ImGui.WindowFlags_NoBringToFrontOnFocus
ImGui.WindowFlags_NoCollapse
ImGui.WindowFlags_NoDecoration
ImGui.WindowFlags_NoFocusOnAppearing
ImGui.WindowFlags_NoInputs
ImGui.WindowFlags_NoMouseInputs
ImGui.WindowFlags_NoMove
ImGui.WindowFlags_NoNav
ImGui.WindowFlags_NoNavFocus
ImGui.WindowFlags_NoNavInputs
ImGui.WindowFlags_None
ImGui.WindowFlags_NoResize
ImGui.WindowFlags_NoSavedSettings
ImGui.WindowFlags_NoScrollbar
ImGui.WindowFlags_NoScrollWithMouse
ImGui.WindowFlags_NoTitleBar
ImGui.WindowFlags_UnsavedDocument

Col Flags
ImGui.Col_Border
ImGui.Col_BorderShadow
ImGui.Col_Button
ImGui.Col_ButtonActive
ImGui.Col_ButtonHovered
ImGui.Col_CheckMark
ImGui.Col_ChildBg
ImGui.Col_DragDropTarget
ImGui.Col_FrameBg
ImGui.Col_FrameBgActive
ImGui.Col_FrameBgHovered
ImGui.Col_Header
ImGui.Col_HeaderActive
ImGui.Col_HeaderHovered
ImGui.Col_MenuBarBg
ImGui.Col_ModalWindowDimBg
ImGui.Col_NavHighlight
ImGui.Col_NavWindowingDimBg
ImGui.Col_NavWindowingHighlight
ImGui.Col_PlotHistogram
ImGui.Col_PlotHistogramHovered
ImGui.Col_PlotLines
ImGui.Col_PlotLinesHovered
ImGui.Col_PopupBg
ImGui.Col_ResizeGrip
ImGui.Col_ResizeGripActive
ImGui.Col_ResizeGripHovered
ImGui.Col_ScrollbarBg
ImGui.Col_ScrollbarGrab
ImGui.Col_ScrollbarGrabActive
ImGui.Col_ScrollbarGrabHovered
ImGui.Col_Separator
ImGui.Col_SeparatorActive
ImGui.Col_SeparatorHovered
ImGui.Col_SliderGrab
ImGui.Col_SliderGrabActive
ImGui.Col_Tab
ImGui.Col_TabActive
ImGui.Col_TabHovered
ImGui.Col_TableBorderLight
ImGui.Col_TableBorderStrong
ImGui.Col_TableHeaderBg
ImGui.Col_TableRowBg
ImGui.Col_TableRowBgAlt
ImGui.Col_TabUnfocused
ImGui.Col_TabUnfocusedActive
ImGui.Col_Text
ImGui.Col_TextDisabled
ImGui.Col_TextSelectedBg
ImGui.Col_TitleBg
ImGui.Col_TitleBgActive
ImGui.Col_TitleBgCollapsed
ImGui.Col_WindowBg


Dear ImGui