Velaptor.NativeInterop.ImGui.ImGuiInvoker
Velaptor
Velaptor.NativeInterop.ImGui
ImGuiInvoker Class
Invokes ImGuiNET.ImGui functions.
public sealed class ImGuiInvoker :
Velaptor.NativeInterop.ImGui.IImGuiInvoker
Inheritance System.Object → ImGuiInvoker
Implements IImGuiInvoker
Methods
ArrowButton(string, ImGuiDir)
Creates an arrow button.
public bool ArrowButton(string str_id, ImGuiNET.ImGuiDir dir);
Parameters
str_id
System.String
The id of the button.
The direction of the text relative to the button.
Implements ArrowButton(string, ImGuiDir)
Returns
System.Boolean
True if the button has been clicked.
Begin(string, ImGuiWindowFlags)
Creates a new window.
public bool Begin(string name, ImGuiNET.ImGuiWindowFlags flags);
Parameters
name
System.String
The name of the window which becomes the title.
flags
ImGuiNET.ImGuiWindowFlags
Various window options.
Implements Begin(string, ImGuiWindowFlags)
Returns
System.Boolean
True if the window is currently open.
Remarks
Make sure to invoke the End() method after creating a window.
BeginCombo(string, string, ImGuiComboFlags)
Creates a combo box control.
public bool BeginCombo(string label, string preview_value, ImGuiNET.ImGuiComboFlags flags);
Parameters
label
System.String
The label of the combo box.
preview_value
System.String
The preview value of the selected item.
flags
ImGuiNET.ImGuiComboFlags
The combobox options.
Implements BeginCombo(string, string, ImGuiComboFlags)
Returns
System.Boolean
True if an item was chosen.
Button(string)
Creates a button with the given label.
public void Button(string label);
Parameters
label
System.String
The button label.
Implements Button(string)
CalcTextSize(string)
Calculates the size of the given text.
public System.Numerics.Vector2 CalcTextSize(string text);
Parameters
text
System.String
The text to measure.
Implements CalcTextSize(string)
Returns
System.Numerics.Vector2
The size of the text described by the X representing the width and the Y representing the height.
Checkbox(string, bool)
Creates a checkbox with the given label.
public bool Checkbox(string label, ref bool v);
Parameters
label
System.String
The checkbox label.
The state of the checkbox.
Implements Checkbox(string, bool)
Returns
System.Boolean
True if the checkbox state was changed.
End()
Signifies the end of the creation of a window.
public void End();
Implements End()
EndCombo()
Signifies the end of the creation of a combo box.
public void EndCombo();
Implements EndCombo()
Remarks
This method should be called after BeginCombo(string, string, ImGuiComboFlags) if and only if BeginCombo(string, string, ImGuiComboFlags) returns true.
GetCursorPos()
Gets the current position of the cursor.
public System.Numerics.Vector2 GetCursorPos();
Implements GetCursorPos()
Returns
System.Numerics.Vector2
The cursor position.
GetFrameHeightWithSpacing()
Gets the current frame height with spacing.
public float GetFrameHeightWithSpacing();
Implements GetFrameHeightWithSpacing()
Returns
System.Single
The frame height.
GetIO()
Gets the IO object for system and ImGuiNET.ImGui related settings and information.
public ImGuiNET.ImGuiIOPtr GetIO();
Implements GetIO()
Returns
ImGuiNET.ImGuiIOPtr
The config/settings/info object.
GetStyle()
Gets the style object for ImGui.
public ImGuiNET.ImGuiStylePtr GetStyle();
Implements GetStyle()
Returns
ImGuiNET.ImGuiStylePtr
The style object.
GetWindowPos()
Gets the position of a window.
public System.Numerics.Vector2 GetWindowPos();
Implements GetWindowPos()
Returns
System.Numerics.Vector2
The window position.
GetWindowSize()
Gets the size of a window.
public System.Numerics.Vector2 GetWindowSize();
Implements GetWindowSize()
Returns
System.Numerics.Vector2
The size.
Remarks
The size of the text described by the X representing the width and the Y representing the height.
IsItemHovered()
Returns a value indicating whether the mouse is hovering over an item.
public bool IsItemHovered();
Implements IsItemHovered()
Returns
System.Boolean
True if the mouse is hovering over the item.
IsMouseDown(ImGuiMouseButton)
Returns a value indicating whether the given mouse button is in the down state.
public bool IsMouseDown(ImGuiNET.ImGuiMouseButton button);
Parameters
button
ImGuiNET.ImGuiMouseButton
The button to check.
Implements IsMouseDown(ImGuiMouseButton)
Returns
System.Boolean
True if the mouse is in the down state.
IsMouseDragging(ImGuiMouseButton)
Gets a value indicating whether a window is being dragged by the given mouse button.
public bool IsMouseDragging(ImGuiNET.ImGuiMouseButton button);
Parameters
button
ImGuiNET.ImGuiMouseButton
The mouse button.
Implements IsMouseDragging(ImGuiMouseButton)
Returns
System.Boolean
True if the window is being dragged.
IsMouseReleased(ImGuiMouseButton)
Returns a value indicating whether the given mouse button is in the released state.
public bool IsMouseReleased(ImGuiNET.ImGuiMouseButton button);
Parameters
button
ImGuiNET.ImGuiMouseButton
The button to check.
Implements IsMouseReleased(ImGuiMouseButton)
Returns
System.Boolean
True if the mouse is in the up state.
IsWindowFocused()
Gets a value indicating whether a window is focused.
public bool IsWindowFocused();
Implements IsWindowFocused()
Returns
System.Boolean
True if the window is in focus.
PopButtonRepeat()
Stops the button from firing repeatedly when held down.
public void PopButtonRepeat();
Implements PopButtonRepeat()
PopID()
Ends the current scoped ID.
public void PopID();
Implements PopID()
PopStyleColor()
Pops the most recent style color.
public void PopStyleColor();
Implements PopStyleColor()
PopStyleColor(int)
Pops the most recent style colors a total number of times by the given count.
public void PopStyleColor(int count);
Parameters
count
System.Int32
The total number of recent style color pushes to pop.
Implements PopStyleColor(int)
PopStyleVar(int)
Restores previous updated styles back to their original values.
public void PopStyleVar(int count);
Parameters
count
System.Int32
The number of previous applied styles to restore.
Implements PopStyleVar(int)