ImGui.Core

From GiderosMobile
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

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: Color Editor/Picker
* tip: the ColorEdit* functions have a little color square that can be left-clicked to open a picker, and right-clicked to open an option menu


Widgets: Input with Keyboard
* If you want to use InputText() with std::string or any custom dynamic string type, see misc/cpp/imgui_stdlib.h and comments in imgui_demo.cpp.
* Most of the ImGuiInputTextFlags flags are only useful for InputText() and not for InputFloatX, InputIntX, InputDouble etc.


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:beginTable pushes a Table 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:colorButton displays an ImGui color button
ImGui:colorEdit3 displays an ImGui RGB color edit widget
ImGui:colorEdit4 displays an ImGui RGBA color edit widget
ImGui:colorPicker3 displays an ImGui RGB color picker widget
ImGui:colorPicker4 displays an ImGui RGBA color picker widget
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 an ImGui Frame
ImGui:endTable pops a Table from the stack
ImGui:endWindow pops a 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:inputDouble an ImGui input double field
ImGui:inputFloat an ImGui input float field
ImGui:inputFloat2 two ImGui input float fields
ImGui:inputFloat3 three ImGui input float fields
ImGui:inputFloat4 four ImGui input float fields
ImGui:inputInt an ImGui input int field
ImGui:inputInt2 two ImGui input int fields
ImGui:inputInt3 three ImGui input int fields
ImGui:inputInt4 four ImGui input int fields
ImGui:inputScalar an ImGui input scalar field
ImGui:inputText an ImGui input text field
ImGui:inputTextMultiline an ImGui multiline input text
ImGui:inputTextWithHint an ImGui input text field with hint
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:radioButton ImGui radio button
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:setColorEditOptions sets the color edit options flag

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:vFilledSliderFloat displays an ImGui regular vertical filled float slider
ImGui:vFilledSliderInt displays an ImGui regular vertical filled int slider
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

Backend Flags ImGui.CONST.BackendFlags
Col Flags ImGui.CONST.Col
ColorEdit Flags ImGui.CONST.ColorEditFlags
Combo Flags ImGui.CONST.ComboFlags
Cond ImGui.CONST.Cond
Config Flags ImGui.CONST.ConfigFlags
Corner Flags ImGui.CONST.CornerFlags
Data Type ImGui.CONST.DataType
Dir ImGui.CONST.Dir
DragDrop Flags ImGui.CONST.DragDropFlags
Focused Flags ImGui.CONST.FocusedFlags
Glyph Ranges ImGui.CONST.GlyphRanges
Hovered Flags ImGui.CONST.HoveredFlags
InputText Flags ImGui.CONST.InputTextFlags
Item Flags ImGui.CONST.ItemFlags
Mouse Button ImGui.CONST.MouseButton
Mouse Cursor ImGui.CONST.MouseCursor
Nav Input ImGui.CONST.NavInput
Popup Flags ImGui.CONST.PopupFlags
Selectable Flags ImGui.CONST.SelectableFlags
Slider Flags ImGui.CONST.SliderFlags
Sort Direction ImGui.CONST.SortDirection
Style Var ImGui.CONST.StyleVar
TabBar Flags ImGui.CONST.TabBarFlags
TabItem Flags ImGui.CONST.TabItemFlags
Table Flags ImGui.CONST.TableFlags
TableBg Target ImGui.CONST.TableBgTarget
TableColumn Flags ImGui.CONST.TableColumnFlags
TableRow Flags ImGui.CONST.TableRowFlags
TE ImGui.CONST.TE
TreeNode Flags ImGui.CONST.TreeNodeFlags
Window Flags ImGui.CONST.WindowFlags


Dear ImGui