diff --git a/.gitignore b/.gitignore index 3cdaa1e..93242c6 100644 --- a/.gitignore +++ b/.gitignore @@ -256,4 +256,7 @@ Session.vim *.VC.db # Rider/Jetbrains IDEs -.idea \ No newline at end of file +.idea + +# download dir +deps/ \ No newline at end of file diff --git a/deps/cimgui/linux-x64/cimgui.so b/deps/cimgui/linux-x64/cimgui.so index 4a48f5c..3b4f451 100644 Binary files a/deps/cimgui/linux-x64/cimgui.so and b/deps/cimgui/linux-x64/cimgui.so differ diff --git a/deps/cimgui/osx-x64/cimgui.dylib b/deps/cimgui/osx-x64/cimgui.dylib index 0d827ea..4a32b3c 100644 Binary files a/deps/cimgui/osx-x64/cimgui.dylib and b/deps/cimgui/osx-x64/cimgui.dylib differ diff --git a/deps/cimgui/win-x64/cimgui.dll b/deps/cimgui/win-x64/cimgui.dll index 4da521f..867a9d2 100644 Binary files a/deps/cimgui/win-x64/cimgui.dll and b/deps/cimgui/win-x64/cimgui.dll differ diff --git a/deps/cimgui/win-x86/cimgui.dll b/deps/cimgui/win-x86/cimgui.dll index 007ff7a..650f081 100644 Binary files a/deps/cimgui/win-x86/cimgui.dll and b/deps/cimgui/win-x86/cimgui.dll differ diff --git a/download-native-deps.ps1 b/download-native-deps.ps1 new file mode 100644 index 0000000..3adadb2 --- /dev/null +++ b/download-native-deps.ps1 @@ -0,0 +1,65 @@ +param ( + [Parameter(Mandatory=$true)][string]$tag +) + +Write-Host Downloading native binaries from GitHub Releases... + +if (Test-Path $PSScriptRoot\deps\cimgui\) +{ + Remove-Item $PSScriptRoot\deps\cimgui\ -Force -Recurse | Out-Null +} +New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\linux-x64 | Out-Null +New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\osx-x64 | Out-Null +New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\win-x86 | Out-Null +New-Item -ItemType Directory -Force -Path $PSScriptRoot\deps\cimgui\win-x64 | Out-Null + +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 + +$client = New-Object System.Net.WebClient +$client.DownloadFile( + "https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.win-x86.dll", + "$PSScriptRoot/deps/cimgui/win-x86/cimgui.dll") +if( -not $? ) +{ + $msg = $Error[0].Exception.Message + Write-Error "Couldn't download x86 cimgui.dll. This most likely indicates the Windows native build failed." + exit +} + +Write-Host "- cimgui.dll (x86)" + +$client.DownloadFile( + "https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.win-x64.dll", + "$PSScriptRoot/deps/cimgui/win-x64/$configuration/cimgui.dll") +if( -not $? ) +{ + $msg = $Error[0].Exception.Message + Write-Error "Couldn't download x64 cimgui.dll. This most likely indicates the Windows native build failed." + exit +} + +Write-Host "- cimgui.dll (x64)" + +$client.DownloadFile( + "https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.so", + "$PSScriptRoot/deps/cimgui/linux-x64/cimgui.so") +if( -not $? ) +{ + $msg = $Error[0].Exception.Message + Write-Error "Couldn't download cimgui.so. This most likely indicates the Linux native build failed." + exit +} + +Write-Host - cimgui.so + +$client.DownloadFile( + "https://github.com/mellinoe/imgui.net-nativebuild/releases/download/$tag/cimgui.dylib", + "$PSScriptRoot/deps/cimgui/osx-x64/cimgui.dylib") +if( -not $? ) +{ + $msg = $Error[0].Exception.Message + Write-Error "Couldn't download cimgui.dylib. This most likely indicates the macOS native build failed." + exit +} + +Write-Host - cimgui.dylib diff --git a/src/CodeGenerator/CSharpCodeWriter.cs b/src/CodeGenerator/CSharpCodeWriter.cs new file mode 100644 index 0000000..045b33c --- /dev/null +++ b/src/CodeGenerator/CSharpCodeWriter.cs @@ -0,0 +1,55 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace CodeGenerator +{ + class CSharpCodeWriter : IDisposable + { + private readonly StreamWriter _sw; + private int _indentLevel = 0; + + public CSharpCodeWriter(string outputPath) + { + _sw = File.CreateText(outputPath); + } + + public void Using(string ns) + { + WriteIndented($"using {ns};"); + } + + public void PushBlock(string blockHeader) + { + WriteIndented(blockHeader); + WriteIndented("{"); + _indentLevel += 4; + } + + public void PopBlock() + { + _indentLevel -= 4; + WriteIndented("}"); + } + + public void WriteLine(string text) + { + WriteIndented(text); + } + + private void WriteIndented(string text) + { + for (int i = 0; i < _indentLevel; i++) + { + _sw.Write(' '); + } + _sw.WriteLine(text); + } + + public void Dispose() + { + _sw.Dispose(); + } + } +} diff --git a/src/CodeGenerator/CodeGenerator.csproj b/src/CodeGenerator/CodeGenerator.csproj new file mode 100644 index 0000000..9f05ccc --- /dev/null +++ b/src/CodeGenerator/CodeGenerator.csproj @@ -0,0 +1,17 @@ + + + + Exe + netcoreapp2.1 + + + + + + + + + + + + diff --git a/src/CodeGenerator/Program.cs b/src/CodeGenerator/Program.cs new file mode 100644 index 0000000..0267002 --- /dev/null +++ b/src/CodeGenerator/Program.cs @@ -0,0 +1,1119 @@ +using Newtonsoft.Json; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.RegularExpressions; + +namespace CodeGenerator +{ + class Program + { + private static readonly Dictionary s_wellKnownTypes = new Dictionary() + { + // { "bool", "Bool8" }, + { "bool", "byte" }, + { "unsigned char", "byte" }, + { "char", "byte" }, + { "ImWchar", "ushort" }, + { "unsigned short", "ushort" }, + { "unsigned int", "uint" }, + { "ImVec2", "Vector2" }, + { "ImVec2_Simple", "Vector2" }, + { "ImVec3", "Vector3" }, + { "ImVec4", "Vector4" }, + { "ImVec4_Simple", "Vector4" }, + { "ImColor_Simple", "ImColor" }, + { "ImTextureID", "IntPtr" }, + { "ImGuiID", "uint" }, + { "ImDrawIdx", "ushort" }, + { "ImDrawListSharedData", "IntPtr" }, + { "ImDrawListSharedData*", "IntPtr" }, + { "ImU32", "uint" }, + { "ImDrawCallback", "IntPtr" }, + { "size_t", "uint" }, + { "ImGuiContext*", "IntPtr" }, + { "float[2]", "Vector2*" }, + { "float[3]", "Vector3*" }, + { "float[4]", "Vector4*" }, + { "int[2]", "int*" }, + { "int[3]", "int*" }, + { "int[4]", "int*" }, + { "float&", "float*" }, + { "ImVec2[2]", "Vector2*" }, + { "char* []", "byte**" }, + + // TODO: These shouldn't exist + { "ImVector_ImWchar", "ImVector" }, + { "ImVector_TextRange", "ImVector" }, + { "ImVector_TextRange&", "ImVector*" }, + }; + + private static readonly Dictionary s_wellKnownFieldReplacements = new Dictionary() + { + { "bool", "Bool8" }, + }; + + private static readonly HashSet s_customDefinedTypes = new HashSet() + { + "ImVector", + "ImVec2", + "ImVec4", + "Pair", + }; + + private static readonly Dictionary s_wellKnownDefaultValues = new Dictionary() + { + { "((void *)0)", "null" }, + { "((void*)0)", "null" }, + { "ImVec2(0,0)", "new Vector2()" }, + { "ImVec2(-1,0)", "new Vector2(-1, 0)" }, + { "ImVec2(1,0)", "new Vector2(1, 0)" }, + { "ImVec2(1,1)", "new Vector2(1, 1)" }, + { "ImVec2(0,1)", "new Vector2(0, 1)" }, + { "ImVec4(0,0,0,0)", "new Vector4()" }, + { "ImVec4(1,1,1,1)", "new Vector4(1, 1, 1, 1)" }, + { "ImDrawCornerFlags_All", "(int)ImDrawCornerFlags.All" }, + }; + + private static readonly Dictionary s_identifierReplacements = new Dictionary() + { + { "in", "@in" }, + { "out", "@out" }, + { "ref", "@ref" }, + }; + + private static readonly HashSet s_legalFixedTypes = new HashSet() + { + "byte", + "sbyte", + "char", + "ushort", + "short", + "uint", + "int", + "ulong", + "long", + "float", + "double", + }; + + static void Main(string[] args) + { + string outputPath; + if (args.Length > 0) + { + outputPath = args[0]; + } + else + { + outputPath = AppContext.BaseDirectory; + } + Console.WriteLine($"Outputting generated code files to {outputPath}."); + + JObject typesJson; + using (StreamReader fs = File.OpenText(Path.Combine(AppContext.BaseDirectory, "structs_and_enums.json"))) + using (JsonTextReader jr = new JsonTextReader(fs)) + { + typesJson = JObject.Load(jr); + } + + JObject functionsJson; + using (StreamReader fs = File.OpenText(Path.Combine(AppContext.BaseDirectory, "definitions.json"))) + using (JsonTextReader jr = new JsonTextReader(fs)) + { + functionsJson = JObject.Load(jr); + } + + EnumDefinition[] enums = typesJson["enums"].Select(jt => + { + JProperty jp = (JProperty)jt; + string name = jp.Name; + EnumMember[] elements = jp.Values().Select(v => + { + return new EnumMember(v["name"].ToString(), v["value"].ToString()); + }).ToArray(); + return new EnumDefinition(name, elements); + }).ToArray(); + + TypeDefinition[] types = typesJson["structs"].Select(jt => + { + JProperty jp = (JProperty)jt; + string name = jp.Name; + TypeReference[] fields = jp.Values().Select(v => + { + return new TypeReference(v["name"].ToString(), v["type"].ToString(), enums); + }).ToArray(); + return new TypeDefinition(name, fields); + }).ToArray(); + + FunctionDefinition[] functions = functionsJson.Children().Select(jt => + { + JProperty jp = (JProperty)jt; + string name = jp.Name; + if (name.Contains("GetMousePos")) + { + + } + + bool hasNonUdtVariants = jp.Values().Any(val => val["ov_cimguiname"]?.ToString().EndsWith("nonUDT") ?? false); + + OverloadDefinition[] overloads = jp.Values().Select(val => + { + string ov_cimguiname = val["ov_cimguiname"]?.ToString(); + string cimguiname = val["cimguiname"].ToString(); + string friendlyName = val["funcname"].ToString(); + + string exportedName = ov_cimguiname; + if (exportedName == null) + { + exportedName = cimguiname; + } + + if (hasNonUdtVariants && !exportedName.EndsWith("nonUDT2")) + { + return null; + } + + string selfTypeName = null; + int underscoreIndex = exportedName.IndexOf('_'); + if (underscoreIndex > 0 && !exportedName.StartsWith("ig")) // Hack to exclude some weirdly-named non-instance functions. + { + selfTypeName = exportedName.Substring(0, underscoreIndex); + } + + List parameters = new List(); + if (selfTypeName != null) + { + parameters.Add(new TypeReference("self", selfTypeName + "*", enums)); + } + + foreach (JToken p in val["argsT"]) + { + string pType = p["type"].ToString(); + string pName = p["name"].ToString(); + parameters.Add(new TypeReference(pName, pType, enums)); + } + + Dictionary defaultValues = new Dictionary(); + foreach (JToken dv in val["defaults"]) + { + JProperty dvProp = (JProperty)dv; + defaultValues.Add(dvProp.Name, dvProp.Value.ToString()); + } + string returnType = val["ret"]?.ToString() ?? "void"; + string comment = null; + + string structName = val["stname"].ToString(); + + return new OverloadDefinition( + exportedName, + friendlyName, + parameters.ToArray(), + defaultValues, + returnType, + structName, + comment, + enums); + }).Where(od => od != null).ToArray(); + + return new FunctionDefinition(name, overloads); + }).ToArray(); + + foreach (EnumDefinition ed in enums) + { + using (CSharpCodeWriter writer = new CSharpCodeWriter(Path.Combine(outputPath, ed.FriendlyName + ".gen.cs"))) + { + writer.PushBlock("namespace ImGuiNET"); + if (ed.FriendlyName.Contains("Flags")) + { + writer.WriteLine("[System.Flags]"); + } + writer.PushBlock($"public enum {ed.FriendlyName}"); + foreach (EnumMember member in ed.Members) + { + string sanitizedName = ed.SanitizeNames(member.Name); + string sanitizedValue = ed.SanitizeNames(member.Value); + writer.WriteLine($"{sanitizedName} = {sanitizedValue},"); + } + writer.PopBlock(); + writer.PopBlock(); + } + } + + foreach (TypeDefinition td in types) + { + if (s_customDefinedTypes.Contains(td.Name)) { continue; } + + using (CSharpCodeWriter writer = new CSharpCodeWriter(Path.Combine(outputPath, td.Name + ".gen.cs"))) + { + writer.Using("System"); + writer.Using("System.Numerics"); + writer.Using("System.Runtime.CompilerServices"); + writer.Using("System.Text"); + writer.WriteLine(string.Empty); + writer.PushBlock("namespace ImGuiNET"); + + writer.PushBlock($"public unsafe partial struct {td.Name}"); + foreach (TypeReference field in td.Fields) + { + string typeStr = GetTypeString(field.Type, field.IsFunctionPointer); + + if (field.ArraySize != 0) + { + if (s_legalFixedTypes.Contains(typeStr)) + { + writer.WriteLine($"public fixed {typeStr} {field.Name}[{field.ArraySize}];"); + } + else + { + for (int i = 0; i < field.ArraySize; i++) + { + writer.WriteLine($"public {typeStr} {field.Name}_{i};"); + } + } + } + else + { + writer.WriteLine($"public {typeStr} {field.Name};"); + } + } + writer.PopBlock(); + + string ptrTypeName = td.Name + "Ptr"; + writer.PushBlock($"public unsafe partial struct {ptrTypeName}"); + writer.WriteLine($"public {td.Name}* NativePtr {{ get; }}"); + writer.WriteLine($"public {ptrTypeName}({td.Name}* nativePtr) => NativePtr = nativePtr;"); + writer.WriteLine($"public {ptrTypeName}(IntPtr nativePtr) => NativePtr = ({td.Name}*)nativePtr;"); + writer.WriteLine($"public static implicit operator {ptrTypeName}({td.Name}* nativePtr) => new {ptrTypeName}(nativePtr);"); + writer.WriteLine($"public static implicit operator {td.Name}* ({ptrTypeName} wrappedPtr) => wrappedPtr.NativePtr;"); + writer.WriteLine($"public static implicit operator {ptrTypeName}(IntPtr nativePtr) => new {ptrTypeName}(nativePtr);"); + + foreach (TypeReference field in td.Fields) + { + string typeStr = GetTypeString(field.Type, field.IsFunctionPointer); + string rawType = typeStr; + + if (s_wellKnownFieldReplacements.TryGetValue(field.Type, out string wellKnownFieldType)) + { + typeStr = wellKnownFieldType; + } + + if (field.ArraySize != 0) + { + string addrTarget = s_legalFixedTypes.Contains(rawType) ? $"NativePtr->{field.Name}" : $"&NativePtr->{field.Name}_0"; + writer.WriteLine($"public RangeAccessor<{typeStr}> {field.Name} => new RangeAccessor<{typeStr}>({addrTarget}, {field.ArraySize});"); + } + else if (typeStr.Contains("ImVector")) + { + string vectorElementType = GetImVectorElementType(typeStr); + + if (s_wellKnownTypes.TryGetValue(vectorElementType, out string wellKnown)) + { + vectorElementType = wellKnown; + } + + if (GetWrappedType(vectorElementType + "*", out string wrappedElementType)) + { + writer.WriteLine($"public ImPtrVector<{wrappedElementType}> {field.Name} => new ImPtrVector<{wrappedElementType}>(NativePtr->{field.Name}, Unsafe.SizeOf<{vectorElementType}>());"); + } + else + { + if (GetWrappedType(vectorElementType, out wrappedElementType)) + { + vectorElementType = wrappedElementType; + } + writer.WriteLine($"public ImVector<{vectorElementType}> {field.Name} => new ImVector<{vectorElementType}>(NativePtr->{field.Name});"); + } + } + else + { + if (typeStr.Contains("*") && !typeStr.Contains("ImVector")) + { + if (GetWrappedType(typeStr, out string wrappedTypeName)) + { + writer.WriteLine($"public {wrappedTypeName} {field.Name} => new {wrappedTypeName}(NativePtr->{field.Name});"); + } + else if (typeStr == "byte*" && IsStringFieldName(field.Name)) + { + writer.WriteLine($"public NullTerminatedString {field.Name} => new NullTerminatedString(NativePtr->{field.Name});"); + } + else + { + writer.WriteLine($"public IntPtr {field.Name} {{ get => (IntPtr)NativePtr->{field.Name}; set => NativePtr->{field.Name} = ({typeStr})value; }}"); + } + } + else + { + writer.WriteLine($"public ref {typeStr} {field.Name} => ref Unsafe.AsRef<{typeStr}>(&NativePtr->{field.Name});"); + } + } + } + + foreach (FunctionDefinition fd in functions) + { + foreach (OverloadDefinition overload in fd.Overloads) + { + if (overload.StructName != td.Name) + { + continue; + } + + if (overload.FriendlyName == overload.StructName) + { + continue; + } + + string exportedName = overload.ExportedName; + if (exportedName.StartsWith("ig")) + { + exportedName = exportedName.Substring(2, exportedName.Length - 2); + } + if (exportedName.Contains("~")) { continue; } + if (overload.Parameters.Any(tr => tr.Type.Contains('('))) { continue; } // TODO: Parse function pointer parameters. + + bool hasVaList = false; + for (int i = 0; i < overload.Parameters.Length; i++) + { + TypeReference p = overload.Parameters[i]; + string paramType = GetTypeString(p.Type, p.IsFunctionPointer); + if (p.Name == "...") { continue; } + + if (paramType == "va_list") + { + hasVaList = true; + break; + } + } + if (hasVaList) { continue; } + + KeyValuePair[] orderedDefaults = overload.DefaultValues.OrderByDescending( + kvp => GetIndex(overload.Parameters, kvp.Key)).ToArray(); + + for (int i = overload.DefaultValues.Count; i >= 0; i--) + { + Dictionary defaults = new Dictionary(); + for (int j = 0; j < i; j++) + { + defaults.Add(orderedDefaults[j].Key, orderedDefaults[j].Value); + } + EmitOverload(writer, overload, defaults, "NativePtr"); + } + } + } + writer.PopBlock(); + + writer.PopBlock(); + } + } + + using (CSharpCodeWriter writer = new CSharpCodeWriter(Path.Combine(outputPath, "ImGuiNative.gen.cs"))) + { + writer.Using("System"); + writer.Using("System.Numerics"); + writer.Using("System.Runtime.InteropServices"); + writer.WriteLine(string.Empty); + writer.PushBlock("namespace ImGuiNET"); + writer.PushBlock("public static unsafe partial class ImGuiNative"); + foreach (FunctionDefinition fd in functions) + { + foreach (OverloadDefinition overload in fd.Overloads) + { + string exportedName = overload.ExportedName; + if (exportedName.Contains("~")) { continue; } + if (overload.Parameters.Any(tr => tr.Type.Contains('('))) { continue; } // TODO: Parse function pointer parameters. + + string ret = GetTypeString(overload.ReturnType, false); + + bool hasVaList = false; + List paramParts = new List(); + for (int i = 0; i < overload.Parameters.Length; i++) + { + TypeReference p = overload.Parameters[i]; + string paramType = GetTypeString(p.Type, p.IsFunctionPointer); + if (p.ArraySize != 0) + { + paramType = paramType + "*"; + } + + if (p.Name == "...") { continue; } + + paramParts.Add($"{paramType} {CorrectIdentifier(p.Name)}"); + + if (paramType == "va_list") + { + hasVaList = true; + break; + } + } + + if (hasVaList) { continue; } + + string parameters = string.Join(", ", paramParts); + + bool isUdtVariant = exportedName.Contains("nonUDT"); + string methodName = isUdtVariant + ? exportedName.Substring(0, exportedName.IndexOf("_nonUDT")) + : exportedName; + + if (isUdtVariant) + { + writer.WriteLine($"[DllImport(\"cimgui\", EntryPoint = \"{exportedName}\")]"); + + } + else + { + writer.WriteLine("[DllImport(\"cimgui\")]"); + } + writer.WriteLine($"public static extern {ret} {methodName}({parameters});"); + } + } + writer.PopBlock(); + writer.PopBlock(); + } + + using (CSharpCodeWriter writer = new CSharpCodeWriter(Path.Combine(outputPath, "ImGui.gen.cs"))) + { + writer.Using("System"); + writer.Using("System.Numerics"); + writer.Using("System.Runtime.InteropServices"); + writer.Using("System.Text"); + writer.WriteLine(string.Empty); + writer.PushBlock("namespace ImGuiNET"); + writer.PushBlock("public static unsafe partial class ImGui"); + foreach (FunctionDefinition fd in functions) + { + foreach (OverloadDefinition overload in fd.Overloads) + { + string exportedName = overload.ExportedName; + if (exportedName.StartsWith("ig")) + { + exportedName = exportedName.Substring(2, exportedName.Length - 2); + } + if (exportedName.Contains("~")) { continue; } + if (overload.Parameters.Any(tr => tr.Type.Contains('('))) { continue; } // TODO: Parse function pointer parameters. + + bool hasVaList = false; + for (int i = 0; i < overload.Parameters.Length; i++) + { + TypeReference p = overload.Parameters[i]; + string paramType = GetTypeString(p.Type, p.IsFunctionPointer); + if (p.Name == "...") { continue; } + + if (paramType == "va_list") + { + hasVaList = true; + break; + } + } + if (hasVaList) { continue; } + + KeyValuePair[] orderedDefaults = overload.DefaultValues.OrderByDescending( + kvp => GetIndex(overload.Parameters, kvp.Key)).ToArray(); + + for (int i = overload.DefaultValues.Count; i >= 0; i--) + { + if (overload.IsMemberFunction) { continue; } + Dictionary defaults = new Dictionary(); + for (int j = 0; j < i; j++) + { + defaults.Add(orderedDefaults[j].Key, orderedDefaults[j].Value); + } + EmitOverload(writer, overload, defaults, null); + } + } + } + writer.PopBlock(); + writer.PopBlock(); + } + } + + private static bool IsStringFieldName(string name) + { + return Regex.IsMatch(name, ".*Filename.*") + || Regex.IsMatch(name, ".*Name"); + } + + private static string GetImVectorElementType(string typeStr) + { + int start = typeStr.IndexOf('<') + 1; + int end = typeStr.IndexOf('>'); + int length = end - start; + return typeStr.Substring(start, length); + } + + private static int GetIndex(TypeReference[] parameters, string key) + { + for (int i = 0; i < parameters.Length; i++) + { + if (key == parameters[i].Name) { return i; } + } + + throw new InvalidOperationException(); + } + + private static void EmitOverload( + CSharpCodeWriter writer, + OverloadDefinition overload, + Dictionary defaultValues, + string selfName) + { + if (overload.Parameters.Where(tr => tr.Name.EndsWith("_begin") || tr.Name.EndsWith("_end")) + .Any(tr => !defaultValues.ContainsKey(tr.Name))) + { + return; + } + + Debug.Assert(!overload.IsMemberFunction || selfName != null); + + string nativeRet = GetTypeString(overload.ReturnType, false); + bool isWrappedType = GetWrappedType(nativeRet, out string safeRet); + if (!isWrappedType) + { + safeRet = GetSafeType(overload.ReturnType); + } + + List invocationArgs = new List(); + MarshalledParameter[] marshalledParameters = new MarshalledParameter[overload.Parameters.Length]; + List preCallLines = new List(); + List postCallLines = new List(); + List byRefParams = new List(); + + for (int i = 0; i < overload.Parameters.Length; i++) + { + if (i == 0 && selfName != null) { continue; } + + TypeReference tr = overload.Parameters[i]; + if (tr.Name == "...") { continue; } + + string correctedIdentifier = CorrectIdentifier(tr.Name); + string nativeTypeName = GetTypeString(tr.Type, tr.IsFunctionPointer); + + if (tr.Type == "char*") + { + string textToEncode = correctedIdentifier; + bool hasDefault = false; + if (defaultValues.TryGetValue(tr.Name, out string defaultStrVal)) + { + hasDefault = true; + if (!CorrectDefaultValue(defaultStrVal, tr, out string correctedDefault)) + { + correctedDefault = defaultStrVal; + } + + textToEncode = correctedDefault; + } + + string nativeArgName = "native_" + tr.Name; + marshalledParameters[i] = new MarshalledParameter("string", false, nativeArgName, hasDefault); + + if (textToEncode == "null") + { + preCallLines.Add($"byte* {nativeArgName} = null;"); + } + else + { + preCallLines.Add($"int {correctedIdentifier}_byteCount = Encoding.UTF8.GetByteCount({textToEncode});"); + preCallLines.Add($"byte* {nativeArgName} = stackalloc byte[{correctedIdentifier}_byteCount + 1];"); + preCallLines.Add($"fixed (char* {correctedIdentifier}_ptr = {textToEncode})"); + preCallLines.Add("{"); + preCallLines.Add($" int {nativeArgName}_offset = Encoding.UTF8.GetBytes({correctedIdentifier}_ptr, {textToEncode}.Length, {nativeArgName}, {correctedIdentifier}_byteCount);"); + preCallLines.Add($" {nativeArgName}[{nativeArgName}_offset] = 0;"); + preCallLines.Add("}"); + } + } + else if (tr.Type == "char* []") + { + string nativeArgName = "native_" + tr.Name; + marshalledParameters[i] = new MarshalledParameter("string[]", false, nativeArgName, false); + + preCallLines.Add($"int* {correctedIdentifier}_byteCounts = stackalloc int[{correctedIdentifier}.Length];"); + + preCallLines.Add($"int {correctedIdentifier}_byteCount = 0;"); + preCallLines.Add($"for (int i = 0; i < {correctedIdentifier}.Length; i++)"); + preCallLines.Add("{"); + preCallLines.Add($" string s = {correctedIdentifier}[i];"); + preCallLines.Add($" {correctedIdentifier}_byteCounts[i] = Encoding.UTF8.GetByteCount(s);"); + preCallLines.Add($" {correctedIdentifier}_byteCount += {correctedIdentifier}_byteCounts[i] + 1;"); + preCallLines.Add("}"); + + preCallLines.Add($"byte* {nativeArgName}_data = stackalloc byte[{correctedIdentifier}_byteCount];"); + + preCallLines.Add("int offset = 0;"); + preCallLines.Add($"for (int i = 0; i < {correctedIdentifier}.Length; i++)"); + preCallLines.Add("{"); + preCallLines.Add($" string s = {correctedIdentifier}[i];"); + preCallLines.Add($" fixed (char* sPtr = s)"); + preCallLines.Add(" {"); + preCallLines.Add($" offset += Encoding.UTF8.GetBytes(sPtr, s.Length, {nativeArgName}_data + offset, {correctedIdentifier}_byteCounts[i]);"); + preCallLines.Add($" offset += 1;"); + preCallLines.Add($" {nativeArgName}_data[offset] = 0;"); + preCallLines.Add(" }"); + preCallLines.Add("}"); + + preCallLines.Add($"byte** {nativeArgName} = stackalloc byte*[{correctedIdentifier}.Length];"); + preCallLines.Add("offset = 0;"); + preCallLines.Add($"for (int i = 0; i < {correctedIdentifier}.Length; i++)"); + preCallLines.Add("{"); + preCallLines.Add($" {nativeArgName}[i] = &{nativeArgName}_data[offset];"); + preCallLines.Add($" offset += {correctedIdentifier}_byteCounts[i] + 1;"); + preCallLines.Add("}"); + } + else if (defaultValues.TryGetValue(tr.Name, out string defaultVal)) + { + if (!CorrectDefaultValue(defaultVal, tr, out string correctedDefault)) + { + correctedDefault = defaultVal; + } + marshalledParameters[i] = new MarshalledParameter(nativeTypeName, false, correctedIdentifier, true); + preCallLines.Add($"{nativeTypeName} {correctedIdentifier} = {correctedDefault};"); + } + else if (tr.Type == "bool") + { + string nativeArgName = "native_" + tr.Name; + marshalledParameters[i] = new MarshalledParameter("bool", false, nativeArgName, false); + preCallLines.Add($"byte {nativeArgName} = {tr.Name} ? (byte)1 : (byte)0;"); + } + else if (tr.Type == "bool*") + { + string nativeArgName = "native_" + tr.Name; + marshalledParameters[i] = new MarshalledParameter("ref bool", false, nativeArgName, false); + preCallLines.Add($"byte {nativeArgName}_val = {correctedIdentifier} ? (byte)1 : (byte)0;"); + preCallLines.Add($"byte* {nativeArgName} = &{nativeArgName}_val;"); + postCallLines.Add($"{correctedIdentifier} = {nativeArgName}_val != 0;"); + } + else if (tr.Type == "void*") + { + string nativeArgName = "native_" + tr.Name; + marshalledParameters[i] = new MarshalledParameter("IntPtr", false, nativeArgName, false); + preCallLines.Add($"void* {nativeArgName} = {correctedIdentifier}.ToPointer();"); + } + else if (GetWrappedType(tr.Type, out string wrappedParamType) + && !s_wellKnownTypes.ContainsKey(tr.Type) + && !s_wellKnownTypes.ContainsKey(tr.Type.Substring(0, tr.Type.Length - 1))) + { + marshalledParameters[i] = new MarshalledParameter(wrappedParamType, false, "native_" + tr.Name, false); + string nativeArgName = "native_" + tr.Name; + marshalledParameters[i] = new MarshalledParameter(wrappedParamType, false, nativeArgName, false); + preCallLines.Add($"{tr.Type} {nativeArgName} = {correctedIdentifier}.NativePtr;"); + } + else if ((tr.Type.EndsWith("*") || tr.Type.Contains("[") || tr.Type.EndsWith("&")) && tr.Type != "void*" && tr.Type != "ImGuiContext*") + { + string nonPtrType; + if (tr.Type.Contains("[")) + { + string wellKnown = s_wellKnownTypes[tr.Type]; + nonPtrType = GetTypeString(wellKnown.Substring(0, wellKnown.Length - 1), false); + } + else + { + nonPtrType = GetTypeString(tr.Type.Substring(0, tr.Type.Length - 1), false); + } + string nativeArgName = "native_" + tr.Name; + bool isOutParam = tr.Name.Contains("out_"); + string direction = isOutParam ? "out" : "ref"; + marshalledParameters[i] = new MarshalledParameter($"{direction} {nonPtrType}", true, nativeArgName, false); + marshalledParameters[i].PinTarget = CorrectIdentifier(tr.Name); + } + else + { + marshalledParameters[i] = new MarshalledParameter(nativeTypeName, false, correctedIdentifier, false); + } + + if (!marshalledParameters[i].HasDefaultValue) + { + invocationArgs.Add($"{marshalledParameters[i].MarshalledType} {correctedIdentifier}"); + } + } + + string invocationList = string.Join(", ", invocationArgs); + string friendlyName = overload.FriendlyName; + + string staticPortion = selfName == null ? "static " : string.Empty; + writer.PushBlock($"public {staticPortion}{safeRet} {friendlyName}({invocationList})"); + foreach (string line in preCallLines) + { + writer.WriteLine(line); + } + + List nativeInvocationArgs = new List(); + + if (selfName != null) + { + nativeInvocationArgs.Add(selfName); + } + + for (int i = 0; i < marshalledParameters.Length; i++) + { + TypeReference tr = overload.Parameters[i]; + MarshalledParameter mp = marshalledParameters[i]; + if (mp == null) { continue; } + if (mp.IsPinned) + { + string nativePinType = GetTypeString(tr.Type, false); + writer.PushBlock($"fixed ({nativePinType} native_{tr.Name} = &{mp.PinTarget})"); + } + + nativeInvocationArgs.Add(mp.VarName); + } + + string nativeInvocationStr = string.Join(", ", nativeInvocationArgs); + string ret = safeRet == "void" ? string.Empty : $"{nativeRet} ret = "; + + string targetName = overload.ExportedName; + if (targetName.Contains("nonUDT")) + { + targetName = targetName.Substring(0, targetName.IndexOf("_nonUDT")); + } + + writer.WriteLine($"{ret}ImGuiNative.{targetName}({nativeInvocationStr});"); + + foreach (string line in postCallLines) + { + writer.WriteLine(line); + } + + if (safeRet != "void") + { + if (safeRet == "bool") + { + writer.WriteLine("return ret != 0;"); + } + else if (overload.ReturnType == "char*") + { + writer.WriteLine("return Util.StringFromPtr(ret);"); + } + else if (overload.ReturnType == "void*") + { + writer.WriteLine("return (IntPtr)ret;"); + } + else + { + string retVal = isWrappedType ? $"new {safeRet}(ret)" : "ret"; + writer.WriteLine($"return {retVal};"); + } + } + + for (int i = 0; i < marshalledParameters.Length; i++) + { + MarshalledParameter mp = marshalledParameters[i]; + if (mp == null) { continue; } + if (mp.IsPinned) + { + writer.PopBlock(); + } + } + + writer.PopBlock(); + } + + private static string GetSafeType(string nativeRet) + { + if (nativeRet == "bool") + { + return "bool"; + } + else if (nativeRet == "char*") + { + return "string"; + } + else if (nativeRet == "void*") + { + return "IntPtr"; + } + + return GetTypeString(nativeRet, false); + } + + private static string GetSafeType(TypeReference typeRef) + { + return typeRef.Type; + } + + private static bool GetWrappedType(string nativeType, out string wrappedType) + { + if (nativeType.StartsWith("Im") && nativeType.EndsWith("*")) + { + int pointerLevel = nativeType.Length - nativeType.IndexOf('*'); + if (pointerLevel > 1) + { + wrappedType = null; + return false; // TODO + } + string nonPtrType = nativeType.Substring(0, nativeType.Length - pointerLevel); + + if (s_wellKnownTypes.ContainsKey(nonPtrType)) + { + wrappedType = null; + return false; + } + + wrappedType = nonPtrType + "Ptr"; + + return true; + } + else + { + wrappedType = null; + return false; + } + } + + private static bool CorrectDefaultValue(string defaultVal, TypeReference tr, out string correctedDefault) + { + if (tr.Type == "ImGuiContext*") + { + correctedDefault = "IntPtr.Zero"; + return true; + } + + if (s_wellKnownDefaultValues.TryGetValue(defaultVal, out correctedDefault)) { return true; } + + if (tr.Type == "bool") + { + correctedDefault = bool.Parse(defaultVal) ? "1" : "0"; + return true; + } + + if (defaultVal.Contains("%")) { correctedDefault = null; return false; } + + correctedDefault = defaultVal; + return true; + } + + private static string GetTypeString(string typeName, bool isFunctionPointer) + { + int pointerLevel = 0; + if (typeName.EndsWith("**")) { pointerLevel = 2; } + else if (typeName.EndsWith("*")) { pointerLevel = 1; } + + if (!s_wellKnownTypes.TryGetValue(typeName, out string typeStr)) + { + if (s_wellKnownTypes.TryGetValue(typeName.Substring(0, typeName.Length - pointerLevel), out typeStr)) + { + typeStr = typeStr + new string('*', pointerLevel); + } + else if (!s_wellKnownTypes.TryGetValue(typeName, out typeStr)) + { + typeStr = typeName; + if (isFunctionPointer) { typeStr = "IntPtr"; } + } + } + + return typeStr; + } + + private static string CorrectIdentifier(string identifier) + { + if (s_identifierReplacements.TryGetValue(identifier, out string replacement)) + { + return replacement; + } + else + { + return identifier; + } + } + } + + class EnumDefinition + { + private readonly Dictionary _sanitizedNames; + + public string Name { get; } + public string FriendlyName { get; } + public EnumMember[] Members { get; } + + public EnumDefinition(string name, EnumMember[] elements) + { + Name = name; + if (Name.EndsWith('_')) + { + FriendlyName = Name.Substring(0, Name.Length - 1); + } + else + { + FriendlyName = Name; + } + Members = elements; + + _sanitizedNames = new Dictionary(); + foreach (EnumMember el in elements) + { + _sanitizedNames.Add(el.Name, SanitizeMemberName(el.Name)); + } + } + + public string SanitizeNames(string text) + { + foreach (KeyValuePair kvp in _sanitizedNames) + { + text = text.Replace(kvp.Key, kvp.Value); + } + + return text; + } + + private string SanitizeMemberName(string memberName) + { + string ret = memberName; + if (memberName.StartsWith(Name)) + { + ret = memberName.Substring(Name.Length); + } + + if (ret.EndsWith('_')) + { + ret = ret.Substring(0, ret.Length - 1); + } + + return ret; + } + } + + class EnumMember + { + public EnumMember(string name, string value) + { + Name = name; + Value = value; + } + + public string Name { get; } + public string Value { get; } + } + + class TypeDefinition + { + public string Name { get; } + public TypeReference[] Fields { get; } + + public TypeDefinition(string name, TypeReference[] fields) + { + Name = name; + Fields = fields; + } + } + + class TypeReference + { + public string Name { get; } + public string Type { get; } + public int ArraySize { get; } + public bool IsFunctionPointer { get; } + + public TypeReference(string name, string type, EnumDefinition[] enums) + { + Name = name; + Type = type.Replace("const", string.Empty).Trim(); + int startBracket = name.IndexOf('['); + if (startBracket != -1) + { + int endBracket = name.IndexOf(']'); + string sizePart = name.Substring(startBracket + 1, endBracket - startBracket - 1); + ArraySize = ParseSizeString(sizePart, enums); + Name = Name.Substring(0, startBracket); + } + + IsFunctionPointer = Type.IndexOf('(') != -1; + } + + private int ParseSizeString(string sizePart, EnumDefinition[] enums) + { + int plusStart = sizePart.IndexOf('+'); + if (plusStart != -1) + { + string first = sizePart.Substring(0, plusStart); + string second = sizePart.Substring(plusStart, sizePart.Length - plusStart); + int firstVal = int.Parse(first); + int secondVal = int.Parse(second); + return firstVal + secondVal; + } + + if (!int.TryParse(sizePart, out int ret)) + { + foreach (EnumDefinition ed in enums) + { + if (sizePart.StartsWith(ed.Name)) + { + foreach (EnumMember member in ed.Members) + { + if (member.Name == sizePart) + { + return int.Parse(member.Value); + } + } + } + } + + ret = -1; + } + + return ret; + } + } + + class FunctionDefinition + { + public string Name { get; } + public OverloadDefinition[] Overloads { get; } + + public FunctionDefinition(string name, OverloadDefinition[] overloads) + { + Name = name; + Overloads = overloads; + } + } + + class OverloadDefinition + { + public string ExportedName { get; } + public string FriendlyName { get; } + public TypeReference[] Parameters { get; } + public Dictionary DefaultValues { get; } + public string ReturnType { get; } + public string StructName { get; } + public bool IsMemberFunction { get; } + public string Comment { get; } + + public OverloadDefinition( + string exportedName, + string friendlyName, + TypeReference[] parameters, + Dictionary defaultValues, + string returnType, + string structName, + string comment, + EnumDefinition[] enums) + { + ExportedName = exportedName; + FriendlyName = friendlyName; + Parameters = parameters; + DefaultValues = defaultValues; + ReturnType = returnType.Replace("const", string.Empty).Replace("inline", string.Empty).Trim(); + StructName = structName; + IsMemberFunction = structName != "ImGui"; + Comment = comment; + } + } + + class MarshalledParameter + { + public MarshalledParameter(string marshalledType, bool isPinned, string varName, bool hasDefaultValue) + { + MarshalledType = marshalledType; + IsPinned = isPinned; + VarName = varName; + HasDefaultValue = hasDefaultValue; + } + + public string MarshalledType { get; } + public bool IsPinned { get; } + public string VarName { get; } + public bool HasDefaultValue { get; } + public string PinTarget { get; internal set; } + } +} diff --git a/src/CodeGenerator/Properties/launchSettings.json b/src/CodeGenerator/Properties/launchSettings.json new file mode 100644 index 0000000..b0543eb --- /dev/null +++ b/src/CodeGenerator/Properties/launchSettings.json @@ -0,0 +1,8 @@ +{ + "profiles": { + "CodeGenerator": { + "commandName": "Project", + "commandLineArgs": "E:\\projects\\imgui.net\\src\\ImGui.NET\\Generated" + } + } +} \ No newline at end of file diff --git a/src/CodeGenerator/definitions.json b/src/CodeGenerator/definitions.json new file mode 100644 index 0000000..830e5b9 --- /dev/null +++ b/src/CodeGenerator/definitions.json @@ -0,0 +1,13452 @@ +{ + "igGetFrameHeight": [ + { + "funcname": "GetFrameHeight", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetFrameHeight" + } + ], + "igCreateContext": [ + { + "funcname": "CreateContext", + "args": "(ImFontAtlas* shared_font_atlas)", + "ret": "ImGuiContext*", + "comment": "", + "call_args": "(shared_font_atlas)", + "argsoriginal": "(ImFontAtlas* shared_font_atlas=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImFontAtlas*", + "name": "shared_font_atlas" + } + ], + "defaults": { "shared_font_atlas": "((void*)0)" }, + "signature": "(ImFontAtlas*)", + "cimguiname": "igCreateContext" + } + ], + "igTextUnformatted": [ + { + "funcname": "TextUnformatted", + "args": "(const char* text,const char* text_end)", + "ret": "void", + "comment": "", + "call_args": "(text,text_end)", + "argsoriginal": "(const char* text,const char* text_end=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + } + ], + "defaults": { "text_end": "((void*)0)" }, + "signature": "(const char*,const char*)", + "cimguiname": "igTextUnformatted" + } + ], + "igPopFont": [ + { + "funcname": "PopFont", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igPopFont" + } + ], + "igCombo": [ + { + "funcname": "Combo", + "args": "(const char* label,int* current_item,const char* const items[],int items_count,int popup_max_height_in_items)", + "ret": "bool", + "comment": "", + "call_args": "(label,current_item,items,items_count,popup_max_height_in_items)", + "argsoriginal": "(const char* label,int* current_item,const char* const items[],int items_count,int popup_max_height_in_items=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "current_item" + }, + { + "type": "const char* const[]", + "name": "items" + }, + { + "type": "int", + "name": "items_count" + }, + { + "type": "int", + "name": "popup_max_height_in_items" + } + ], + "ov_cimguiname": "igCombo", + "defaults": { "popup_max_height_in_items": "-1" }, + "signature": "(const char*,int*,const char* const[],int,int)", + "cimguiname": "igCombo" + }, + { + "funcname": "Combo", + "args": "(const char* label,int* current_item,const char* items_separated_by_zeros,int popup_max_height_in_items)", + "ret": "bool", + "comment": "", + "call_args": "(label,current_item,items_separated_by_zeros,popup_max_height_in_items)", + "argsoriginal": "(const char* label,int* current_item,const char* items_separated_by_zeros,int popup_max_height_in_items=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "current_item" + }, + { + "type": "const char*", + "name": "items_separated_by_zeros" + }, + { + "type": "int", + "name": "popup_max_height_in_items" + } + ], + "ov_cimguiname": "igComboStr", + "defaults": { "popup_max_height_in_items": "-1" }, + "signature": "(const char*,int*,const char*,int)", + "cimguiname": "igCombo" + }, + { + "funcname": "Combo", + "args": "(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int popup_max_height_in_items)", + "ret": "bool", + "comment": "", + "call_args": "(label,current_item,items_getter,data,items_count,popup_max_height_in_items)", + "argsoriginal": "(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int popup_max_height_in_items=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "current_item" + }, + { + "type": "bool(*)(void* data,int idx,const char** out_text)", + "signature": "(void* data,int idx,const char** out_text)", + "name": "items_getter", + "ret": "bool" + }, + { + "type": "void*", + "name": "data" + }, + { + "type": "int", + "name": "items_count" + }, + { + "type": "int", + "name": "popup_max_height_in_items" + } + ], + "ov_cimguiname": "igComboFnPtr", + "defaults": { "popup_max_height_in_items": "-1" }, + "signature": "(const char*,int*,bool(*)(void*,int,const char**),void*,int,int)", + "cimguiname": "igCombo" + } + ], + "igCaptureKeyboardFromApp": [ + { + "funcname": "CaptureKeyboardFromApp", + "args": "(bool capture)", + "ret": "void", + "comment": "", + "call_args": "(capture)", + "argsoriginal": "(bool capture=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "bool", + "name": "capture" + } + ], + "defaults": { "capture": "true" }, + "signature": "(bool)", + "cimguiname": "igCaptureKeyboardFromApp" + } + ], + "igIsWindowFocused": [ + { + "funcname": "IsWindowFocused", + "args": "(ImGuiFocusedFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(flags)", + "argsoriginal": "(ImGuiFocusedFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiFocusedFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(ImGuiFocusedFlags)", + "cimguiname": "igIsWindowFocused" + } + ], + "igRender": [ + { + "funcname": "Render", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igRender" + } + ], + "ImDrawList_ChannelsSetCurrent": [ + { + "funcname": "ChannelsSetCurrent", + "args": "(int channel_index)", + "ret": "void", + "comment": "", + "call_args": "(channel_index)", + "argsoriginal": "(int channel_index)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "int", + "name": "channel_index" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "ImDrawList_ChannelsSetCurrent" + } + ], + "igDragFloat4": [ + { + "funcname": "DragFloat4", + "args": "(const char* label,float v[4],float v_speed,float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float v[4],float v_speed=1.0f,float v_min=0.0f,float v_max=0.0f,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[4]", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0.0f", + "power": "1.0f", + "v_max": "0.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[4],float,float,float,const char*,float)", + "cimguiname": "igDragFloat4" + } + ], + "ImDrawList_ChannelsSplit": [ + { + "funcname": "ChannelsSplit", + "args": "(int channels_count)", + "ret": "void", + "comment": "", + "call_args": "(channels_count)", + "argsoriginal": "(int channels_count)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "int", + "name": "channels_count" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "ImDrawList_ChannelsSplit" + } + ], + "igIsMousePosValid": [ + { + "funcname": "IsMousePosValid", + "args": "(const ImVec2* mouse_pos)", + "ret": "bool", + "comment": "", + "call_args": "(mouse_pos)", + "argsoriginal": "(const ImVec2* mouse_pos=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2*", + "name": "mouse_pos" + } + ], + "defaults": { "mouse_pos": "((void*)0)" }, + "signature": "(const ImVec2*)", + "cimguiname": "igIsMousePosValid" + } + ], + "igGetCursorScreenPos": [ + { + "funcname": "GetCursorScreenPos", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetCursorScreenPos" + }, + { + "funcname": "GetCursorScreenPos", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetCursorScreenPos", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetCursorScreenPos_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetCursorScreenPos", + "funcname": "GetCursorScreenPos", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetCursorScreenPos_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igDebugCheckVersionAndDataLayout": [ + { + "funcname": "DebugCheckVersionAndDataLayout", + "args": "(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert)", + "ret": "bool", + "comment": "", + "call_args": "(version_str,sz_io,sz_style,sz_vec2,sz_vec4,sz_drawvert)", + "argsoriginal": "(const char* version_str,size_t sz_io,size_t sz_style,size_t sz_vec2,size_t sz_vec4,size_t sz_drawvert)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "version_str" + }, + { + "type": "size_t", + "name": "sz_io" + }, + { + "type": "size_t", + "name": "sz_style" + }, + { + "type": "size_t", + "name": "sz_vec2" + }, + { + "type": "size_t", + "name": "sz_vec4" + }, + { + "type": "size_t", + "name": "sz_drawvert" + } + ], + "defaults": [], + "signature": "(const char*,size_t,size_t,size_t,size_t,size_t)", + "cimguiname": "igDebugCheckVersionAndDataLayout" + } + ], + "igSetScrollHere": [ + { + "funcname": "SetScrollHere", + "args": "(float center_y_ratio)", + "ret": "void", + "comment": "", + "call_args": "(center_y_ratio)", + "argsoriginal": "(float center_y_ratio=0.5f)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "center_y_ratio" + } + ], + "defaults": { "center_y_ratio": "0.5f" }, + "signature": "(float)", + "cimguiname": "igSetScrollHere" + } + ], + "igSetScrollY": [ + { + "funcname": "SetScrollY", + "args": "(float scroll_y)", + "ret": "void", + "comment": "", + "call_args": "(scroll_y)", + "argsoriginal": "(float scroll_y)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "scroll_y" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "igSetScrollY" + } + ], + "igSetColorEditOptions": [ + { + "funcname": "SetColorEditOptions", + "args": "(ImGuiColorEditFlags flags)", + "ret": "void", + "comment": "", + "call_args": "(flags)", + "argsoriginal": "(ImGuiColorEditFlags flags)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiColorEditFlags", + "name": "flags" + } + ], + "defaults": [], + "signature": "(ImGuiColorEditFlags)", + "cimguiname": "igSetColorEditOptions" + } + ], + "igSetScrollFromPosY": [ + { + "funcname": "SetScrollFromPosY", + "args": "(float pos_y,float center_y_ratio)", + "ret": "void", + "comment": "", + "call_args": "(pos_y,center_y_ratio)", + "argsoriginal": "(float pos_y,float center_y_ratio=0.5f)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "pos_y" + }, + { + "type": "float", + "name": "center_y_ratio" + } + ], + "defaults": { "center_y_ratio": "0.5f" }, + "signature": "(float,float)", + "cimguiname": "igSetScrollFromPosY" + } + ], + "igGetStyleColorVec4": [ + { + "funcname": "GetStyleColorVec4", + "args": "(ImGuiCol idx)", + "ret": "const ImVec4*", + "comment": "", + "call_args": "(idx)", + "argsoriginal": "(ImGuiCol idx)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiCol", + "name": "idx" + } + ], + "retref": "&", + "defaults": [], + "signature": "(ImGuiCol)", + "cimguiname": "igGetStyleColorVec4" + } + ], + "igIsMouseHoveringRect": [ + { + "funcname": "IsMouseHoveringRect", + "args": "(const ImVec2 r_min,const ImVec2 r_max,bool clip)", + "ret": "bool", + "comment": "", + "call_args": "(r_min,r_max,clip)", + "argsoriginal": "(const ImVec2& r_min,const ImVec2& r_max,bool clip=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "r_min" + }, + { + "type": "const ImVec2", + "name": "r_max" + }, + { + "type": "bool", + "name": "clip" + } + ], + "defaults": { "clip": "true" }, + "signature": "(const ImVec2,const ImVec2,bool)", + "cimguiname": "igIsMouseHoveringRect" + } + ], + "ImVec4_ImVec4": [ + { + "funcname": "ImVec4", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImVec4", + "argsT": [], + "comment": "", + "ov_cimguiname": "ImVec4_ImVec4", + "defaults": [], + "signature": "()", + "cimguiname": "ImVec4_ImVec4" + }, + { + "funcname": "ImVec4", + "args": "(float _x,float _y,float _z,float _w)", + "call_args": "(_x,_y,_z,_w)", + "argsoriginal": "(float _x,float _y,float _z,float _w)", + "stname": "ImVec4", + "argsT": [ + { + "type": "float", + "name": "_x" + }, + { + "type": "float", + "name": "_y" + }, + { + "type": "float", + "name": "_z" + }, + { + "type": "float", + "name": "_w" + } + ], + "comment": "", + "ov_cimguiname": "ImVec4_ImVec4Float", + "defaults": [], + "signature": "(float,float,float,float)", + "cimguiname": "ImVec4_ImVec4" + } + ], + "ImColor_SetHSV": [ + { + "funcname": "SetHSV", + "args": "(float h,float s,float v,float a)", + "ret": "void", + "comment": "", + "call_args": "(h,s,v,a)", + "argsoriginal": "(float h,float s,float v,float a=1.0f)", + "stname": "ImColor", + "argsT": [ + { + "type": "float", + "name": "h" + }, + { + "type": "float", + "name": "s" + }, + { + "type": "float", + "name": "v" + }, + { + "type": "float", + "name": "a" + } + ], + "defaults": { "a": "1.0f" }, + "signature": "(float,float,float,float)", + "cimguiname": "ImColor_SetHSV" + } + ], + "igDragFloat3": [ + { + "funcname": "DragFloat3", + "args": "(const char* label,float v[3],float v_speed,float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float v[3],float v_speed=1.0f,float v_min=0.0f,float v_max=0.0f,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[3]", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0.0f", + "power": "1.0f", + "v_max": "0.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[3],float,float,float,const char*,float)", + "cimguiname": "igDragFloat3" + } + ], + "ImDrawList_AddPolyline": [ + { + "funcname": "AddPolyline", + "args": "(const ImVec2* points,const int num_points,ImU32 col,bool closed,float thickness)", + "ret": "void", + "comment": "", + "call_args": "(points,num_points,col,closed,thickness)", + "argsoriginal": "(const ImVec2* points,const int num_points,ImU32 col,bool closed,float thickness)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2*", + "name": "points" + }, + { + "type": "const int", + "name": "num_points" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "bool", + "name": "closed" + }, + { + "type": "float", + "name": "thickness" + } + ], + "defaults": [], + "signature": "(const ImVec2*,const int,ImU32,bool,float)", + "cimguiname": "ImDrawList_AddPolyline" + } + ], + "igValue": [ + { + "funcname": "Value", + "args": "(const char* prefix,bool b)", + "ret": "void", + "comment": "", + "call_args": "(prefix,b)", + "argsoriginal": "(const char* prefix,bool b)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "prefix" + }, + { + "type": "bool", + "name": "b" + } + ], + "ov_cimguiname": "igValueBool", + "defaults": [], + "signature": "(const char*,bool)", + "cimguiname": "igValue" + }, + { + "funcname": "Value", + "args": "(const char* prefix,int v)", + "ret": "void", + "comment": "", + "call_args": "(prefix,v)", + "argsoriginal": "(const char* prefix,int v)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "prefix" + }, + { + "type": "int", + "name": "v" + } + ], + "ov_cimguiname": "igValueInt", + "defaults": [], + "signature": "(const char*,int)", + "cimguiname": "igValue" + }, + { + "funcname": "Value", + "args": "(const char* prefix,unsigned int v)", + "ret": "void", + "comment": "", + "call_args": "(prefix,v)", + "argsoriginal": "(const char* prefix,unsigned int v)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "prefix" + }, + { + "type": "unsigned int", + "name": "v" + } + ], + "ov_cimguiname": "igValueUint", + "defaults": [], + "signature": "(const char*,unsigned int)", + "cimguiname": "igValue" + }, + { + "funcname": "Value", + "args": "(const char* prefix,float v,const char* float_format)", + "ret": "void", + "comment": "", + "call_args": "(prefix,v,float_format)", + "argsoriginal": "(const char* prefix,float v,const char* float_format=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "prefix" + }, + { + "type": "float", + "name": "v" + }, + { + "type": "const char*", + "name": "float_format" + } + ], + "ov_cimguiname": "igValueFloat", + "defaults": { "float_format": "((void*)0)" }, + "signature": "(const char*,float,const char*)", + "cimguiname": "igValue" + } + ], + "ImGuiTextFilter_Build": [ + { + "funcname": "Build", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextFilter", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextFilter_Build" + } + ], + "igGetItemRectMax": [ + { + "funcname": "GetItemRectMax", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetItemRectMax" + }, + { + "funcname": "GetItemRectMax", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetItemRectMax", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetItemRectMax_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetItemRectMax", + "funcname": "GetItemRectMax", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetItemRectMax_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igIsItemDeactivated": [ + { + "funcname": "IsItemDeactivated", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsItemDeactivated" + } + ], + "igPushStyleVar": [ + { + "funcname": "PushStyleVar", + "args": "(ImGuiStyleVar idx,float val)", + "ret": "void", + "comment": "", + "call_args": "(idx,val)", + "argsoriginal": "(ImGuiStyleVar idx,float val)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiStyleVar", + "name": "idx" + }, + { + "type": "float", + "name": "val" + } + ], + "ov_cimguiname": "igPushStyleVarFloat", + "defaults": [], + "signature": "(ImGuiStyleVar,float)", + "cimguiname": "igPushStyleVar" + }, + { + "funcname": "PushStyleVar", + "args": "(ImGuiStyleVar idx,const ImVec2 val)", + "ret": "void", + "comment": "", + "call_args": "(idx,val)", + "argsoriginal": "(ImGuiStyleVar idx,const ImVec2& val)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiStyleVar", + "name": "idx" + }, + { + "type": "const ImVec2", + "name": "val" + } + ], + "ov_cimguiname": "igPushStyleVarVec2", + "defaults": [], + "signature": "(ImGuiStyleVar,const ImVec2)", + "cimguiname": "igPushStyleVar" + } + ], + "igSaveIniSettingsToMemory": [ + { + "funcname": "SaveIniSettingsToMemory", + "args": "(size_t* out_ini_size)", + "ret": "const char*", + "comment": "", + "call_args": "(out_ini_size)", + "argsoriginal": "(size_t* out_ini_size=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "size_t*", + "name": "out_ini_size" + } + ], + "defaults": { "out_ini_size": "((void*)0)" }, + "signature": "(size_t*)", + "cimguiname": "igSaveIniSettingsToMemory" + } + ], + "igDragIntRange2": [ + { + "funcname": "DragIntRange2", + "args": "(const char* label,int* v_current_min,int* v_current_max,float v_speed,int v_min,int v_max,const char* format,const char* format_max)", + "ret": "bool", + "comment": "", + "call_args": "(label,v_current_min,v_current_max,v_speed,v_min,v_max,format,format_max)", + "argsoriginal": "(const char* label,int* v_current_min,int* v_current_max,float v_speed=1.0f,int v_min=0,int v_max=0,const char* format=\"%d\",const char* format_max=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "v_current_min" + }, + { + "type": "int*", + "name": "v_current_max" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "const char*", + "name": "format_max" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0", + "format_max": "((void*)0)", + "v_max": "0", + "format": "\"%d\"" + }, + "signature": "(const char*,int*,int*,float,int,int,const char*,const char*)", + "cimguiname": "igDragIntRange2" + } + ], + "igUnindent": [ + { + "funcname": "Unindent", + "args": "(float indent_w)", + "ret": "void", + "comment": "", + "call_args": "(indent_w)", + "argsoriginal": "(float indent_w=0.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "indent_w" + } + ], + "defaults": { "indent_w": "0.0f" }, + "signature": "(float)", + "cimguiname": "igUnindent" + } + ], + "ImFontAtlas_AddFontFromMemoryCompressedBase85TTF": [ + { + "funcname": "AddFontFromMemoryCompressedBase85TTF", + "args": "(const char* compressed_font_data_base85,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges)", + "ret": "ImFont*", + "comment": "", + "call_args": "(compressed_font_data_base85,size_pixels,font_cfg,glyph_ranges)", + "argsoriginal": "(const char* compressed_font_data_base85,float size_pixels,const ImFontConfig* font_cfg=((void*)0),const ImWchar* glyph_ranges=((void*)0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "const char*", + "name": "compressed_font_data_base85" + }, + { + "type": "float", + "name": "size_pixels" + }, + { + "type": "const ImFontConfig*", + "name": "font_cfg" + }, + { + "type": "const ImWchar*", + "name": "glyph_ranges" + } + ], + "defaults": { + "glyph_ranges": "((void*)0)", + "font_cfg": "((void*)0)" + }, + "signature": "(const char*,float,const ImFontConfig*,const ImWchar*)", + "cimguiname": "ImFontAtlas_AddFontFromMemoryCompressedBase85TTF" + } + ], + "igPopAllowKeyboardFocus": [ + { + "funcname": "PopAllowKeyboardFocus", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igPopAllowKeyboardFocus" + } + ], + "igLoadIniSettingsFromDisk": [ + { + "funcname": "LoadIniSettingsFromDisk", + "args": "(const char* ini_filename)", + "ret": "void", + "comment": "", + "call_args": "(ini_filename)", + "argsoriginal": "(const char* ini_filename)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "ini_filename" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igLoadIniSettingsFromDisk" + } + ], + "igGetCursorStartPos": [ + { + "funcname": "GetCursorStartPos", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetCursorStartPos" + }, + { + "funcname": "GetCursorStartPos", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetCursorStartPos", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetCursorStartPos_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetCursorStartPos", + "funcname": "GetCursorStartPos", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetCursorStartPos_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igSetCursorScreenPos": [ + { + "funcname": "SetCursorScreenPos", + "args": "(const ImVec2 screen_pos)", + "ret": "void", + "comment": "", + "call_args": "(screen_pos)", + "argsoriginal": "(const ImVec2& screen_pos)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "screen_pos" + } + ], + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "igSetCursorScreenPos" + } + ], + "igInputInt4": [ + { + "funcname": "InputInt4", + "args": "(const char* label,int v[4],ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,extra_flags)", + "argsoriginal": "(const char* label,int v[4],ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[4]", + "name": "v" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { "extra_flags": "0" }, + "signature": "(const char*,int[4],ImGuiInputTextFlags)", + "cimguiname": "igInputInt4" + } + ], + "ImFont_AddRemapChar": [ + { + "funcname": "AddRemapChar", + "args": "(ImWchar dst,ImWchar src,bool overwrite_dst)", + "ret": "void", + "comment": "", + "call_args": "(dst,src,overwrite_dst)", + "argsoriginal": "(ImWchar dst,ImWchar src,bool overwrite_dst=true)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImWchar", + "name": "dst" + }, + { + "type": "ImWchar", + "name": "src" + }, + { + "type": "bool", + "name": "overwrite_dst" + } + ], + "defaults": { "overwrite_dst": "true" }, + "signature": "(ImWchar,ImWchar,bool)", + "cimguiname": "ImFont_AddRemapChar" + } + ], + "ImFont_AddGlyph": [ + { + "funcname": "AddGlyph", + "args": "(ImWchar c,float x0,float y0,float x1,float y1,float u0,float v0,float u1,float v1,float advance_x)", + "ret": "void", + "comment": "", + "call_args": "(c,x0,y0,x1,y1,u0,v0,u1,v1,advance_x)", + "argsoriginal": "(ImWchar c,float x0,float y0,float x1,float y1,float u0,float v0,float u1,float v1,float advance_x)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImWchar", + "name": "c" + }, + { + "type": "float", + "name": "x0" + }, + { + "type": "float", + "name": "y0" + }, + { + "type": "float", + "name": "x1" + }, + { + "type": "float", + "name": "y1" + }, + { + "type": "float", + "name": "u0" + }, + { + "type": "float", + "name": "v0" + }, + { + "type": "float", + "name": "u1" + }, + { + "type": "float", + "name": "v1" + }, + { + "type": "float", + "name": "advance_x" + } + ], + "defaults": [], + "signature": "(ImWchar,float,float,float,float,float,float,float,float,float)", + "cimguiname": "ImFont_AddGlyph" + } + ], + "igIsRectVisible": [ + { + "funcname": "IsRectVisible", + "args": "(const ImVec2 size)", + "ret": "bool", + "comment": "", + "call_args": "(size)", + "argsoriginal": "(const ImVec2& size)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "size" + } + ], + "ov_cimguiname": "igIsRectVisible", + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "igIsRectVisible" + }, + { + "funcname": "IsRectVisible", + "args": "(const ImVec2 rect_min,const ImVec2 rect_max)", + "ret": "bool", + "comment": "", + "call_args": "(rect_min,rect_max)", + "argsoriginal": "(const ImVec2& rect_min,const ImVec2& rect_max)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "rect_min" + }, + { + "type": "const ImVec2", + "name": "rect_max" + } + ], + "ov_cimguiname": "igIsRectVisibleVec2", + "defaults": [], + "signature": "(const ImVec2,const ImVec2)", + "cimguiname": "igIsRectVisible" + } + ], + "ImFont_GrowIndex": [ + { + "funcname": "GrowIndex", + "args": "(int new_size)", + "ret": "void", + "comment": "", + "call_args": "(new_size)", + "argsoriginal": "(int new_size)", + "stname": "ImFont", + "argsT": [ + { + "type": "int", + "name": "new_size" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "ImFont_GrowIndex" + } + ], + "ImFontAtlas_Build": [ + { + "funcname": "Build", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_Build" + } + ], + "igLabelText": [ + { + "isvararg": "...)", + "funcname": "LabelText", + "args": "(const char* label,const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(label,fmt,...)", + "argsoriginal": "(const char* label,const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,const char*,...)", + "cimguiname": "igLabelText" + } + ], + "ImFont_RenderText": [ + { + "funcname": "RenderText", + "args": "(ImDrawList* draw_list,float size,ImVec2 pos,ImU32 col,const ImVec4 clip_rect,const char* text_begin,const char* text_end,float wrap_width,bool cpu_fine_clip)", + "ret": "void", + "comment": "", + "call_args": "(draw_list,size,pos,col,clip_rect,text_begin,text_end,wrap_width,cpu_fine_clip)", + "argsoriginal": "(ImDrawList* draw_list,float size,ImVec2 pos,ImU32 col,const ImVec4& clip_rect,const char* text_begin,const char* text_end,float wrap_width=0.0f,bool cpu_fine_clip=false)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImDrawList*", + "name": "draw_list" + }, + { + "type": "float", + "name": "size" + }, + { + "type": "ImVec2", + "name": "pos" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "const ImVec4", + "name": "clip_rect" + }, + { + "type": "const char*", + "name": "text_begin" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "float", + "name": "wrap_width" + }, + { + "type": "bool", + "name": "cpu_fine_clip" + } + ], + "defaults": { + "wrap_width": "0.0f", + "cpu_fine_clip": "false" + }, + "signature": "(ImDrawList*,float,ImVec2,ImU32,const ImVec4,const char*,const char*,float,bool)", + "cimguiname": "ImFont_RenderText" + } + ], + "igLogFinish": [ + { + "funcname": "LogFinish", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igLogFinish" + } + ], + "igIsKeyPressed": [ + { + "funcname": "IsKeyPressed", + "args": "(int user_key_index,bool repeat)", + "ret": "bool", + "comment": "", + "call_args": "(user_key_index,repeat)", + "argsoriginal": "(int user_key_index,bool repeat=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "user_key_index" + }, + { + "type": "bool", + "name": "repeat" + } + ], + "defaults": { "repeat": "true" }, + "signature": "(int,bool)", + "cimguiname": "igIsKeyPressed" + } + ], + "igGetColumnOffset": [ + { + "funcname": "GetColumnOffset", + "args": "(int column_index)", + "ret": "float", + "comment": "", + "call_args": "(column_index)", + "argsoriginal": "(int column_index=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "column_index" + } + ], + "defaults": { "column_index": "-1" }, + "signature": "(int)", + "cimguiname": "igGetColumnOffset" + } + ], + "ImDrawList_PopClipRect": [ + { + "funcname": "PopClipRect", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_PopClipRect" + } + ], + "ImFont_FindGlyphNoFallback": [ + { + "funcname": "FindGlyphNoFallback", + "args": "(ImWchar c)", + "ret": "const ImFontGlyph*", + "comment": "", + "call_args": "(c)", + "argsoriginal": "(ImWchar c)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImWchar", + "name": "c" + } + ], + "defaults": [], + "signature": "(ImWchar)", + "cimguiname": "ImFont_FindGlyphNoFallback" + } + ], + "igSetNextWindowCollapsed": [ + { + "funcname": "SetNextWindowCollapsed", + "args": "(bool collapsed,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(collapsed,cond)", + "argsoriginal": "(bool collapsed,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "bool", + "name": "collapsed" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "defaults": { "cond": "0" }, + "signature": "(bool,ImGuiCond)", + "cimguiname": "igSetNextWindowCollapsed" + } + ], + "igGetCurrentContext": [ + { + "funcname": "GetCurrentContext", + "args": "()", + "ret": "ImGuiContext*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetCurrentContext" + } + ], + "igSmallButton": [ + { + "funcname": "SmallButton", + "args": "(const char* label)", + "ret": "bool", + "comment": "", + "call_args": "(label)", + "argsoriginal": "(const char* label)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igSmallButton" + } + ], + "igOpenPopupOnItemClick": [ + { + "funcname": "OpenPopupOnItemClick", + "args": "(const char* str_id,int mouse_button)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,mouse_button)", + "argsoriginal": "(const char* str_id=((void*)0),int mouse_button=1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "int", + "name": "mouse_button" + } + ], + "defaults": { + "mouse_button": "1", + "str_id": "((void*)0)" + }, + "signature": "(const char*,int)", + "cimguiname": "igOpenPopupOnItemClick" + } + ], + "igIsAnyMouseDown": [ + { + "funcname": "IsAnyMouseDown", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsAnyMouseDown" + } + ], + "ImFont_CalcWordWrapPositionA": [ + { + "funcname": "CalcWordWrapPositionA", + "args": "(float scale,const char* text,const char* text_end,float wrap_width)", + "ret": "const char*", + "comment": "", + "call_args": "(scale,text,text_end,wrap_width)", + "argsoriginal": "(float scale,const char* text,const char* text_end,float wrap_width)", + "stname": "ImFont", + "argsT": [ + { + "type": "float", + "name": "scale" + }, + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "float", + "name": "wrap_width" + } + ], + "defaults": [], + "signature": "(float,const char*,const char*,float)", + "cimguiname": "ImFont_CalcWordWrapPositionA" + } + ], + "ImFont_CalcTextSizeA": [ + { + "funcname": "CalcTextSizeA", + "args": "(float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining)", + "ret": "ImVec2", + "comment": "", + "call_args": "(size,max_width,wrap_width,text_begin,text_end,remaining)", + "argsoriginal": "(float size,float max_width,float wrap_width,const char* text_begin,const char* text_end=((void*)0),const char** remaining=((void*)0))", + "stname": "ImFont", + "argsT": [ + { + "type": "float", + "name": "size" + }, + { + "type": "float", + "name": "max_width" + }, + { + "type": "float", + "name": "wrap_width" + }, + { + "type": "const char*", + "name": "text_begin" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "const char**", + "name": "remaining" + } + ], + "defaults": { + "text_end": "((void*)0)", + "remaining": "((void*)0)" + }, + "signature": "(float,float,float,const char*,const char*,const char**)", + "cimguiname": "ImFont_CalcTextSizeA" + }, + { + "funcname": "CalcTextSizeA", + "args": "(ImVec2 *pOut,float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining)", + "ret": "void", + "cimguiname": "ImFont_CalcTextSizeA", + "nonUDT": 1, + "call_args": "(size,max_width,wrap_width,text_begin,text_end,remaining)", + "argsoriginal": "(float size,float max_width,float wrap_width,const char* text_begin,const char* text_end=((void*)0),const char** remaining=((void*)0))", + "stname": "ImFont", + "signature": "(float,float,float,const char*,const char*,const char**)", + "ov_cimguiname": "ImFont_CalcTextSizeA_nonUDT", + "comment": "", + "defaults": { + "text_end": "((void*)0)", + "remaining": "((void*)0)" + }, + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + }, + { + "type": "float", + "name": "size" + }, + { + "type": "float", + "name": "max_width" + }, + { + "type": "float", + "name": "wrap_width" + }, + { + "type": "const char*", + "name": "text_begin" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "const char**", + "name": "remaining" + } + ] + }, + { + "cimguiname": "ImFont_CalcTextSizeA", + "funcname": "CalcTextSizeA", + "args": "(float size,float max_width,float wrap_width,const char* text_begin,const char* text_end,const char** remaining)", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "(float,float,float,const char*,const char*,const char**)", + "call_args": "(size,max_width,wrap_width,text_begin,text_end,remaining)", + "argsoriginal": "(float size,float max_width,float wrap_width,const char* text_begin,const char* text_end=((void*)0),const char** remaining=((void*)0))", + "stname": "ImFont", + "retorig": "ImVec2", + "ov_cimguiname": "ImFont_CalcTextSizeA_nonUDT2", + "comment": "", + "defaults": { + "text_end": "((void*)0)", + "remaining": "((void*)0)" + }, + "argsT": [ + { + "type": "float", + "name": "size" + }, + { + "type": "float", + "name": "max_width" + }, + { + "type": "float", + "name": "wrap_width" + }, + { + "type": "const char*", + "name": "text_begin" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "const char**", + "name": "remaining" + } + ] + } + ], + "GlyphRangesBuilder_SetBit": [ + { + "funcname": "SetBit", + "args": "(int n)", + "ret": "void", + "comment": "", + "call_args": "(n)", + "argsoriginal": "(int n)", + "stname": "GlyphRangesBuilder", + "argsT": [ + { + "type": "int", + "name": "n" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "GlyphRangesBuilder_SetBit" + } + ], + "ImFont_IsLoaded": [ + { + "funcname": "IsLoaded", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFont", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFont_IsLoaded" + } + ], + "ImFont_GetCharAdvance": [ + { + "funcname": "GetCharAdvance", + "args": "(ImWchar c)", + "ret": "float", + "comment": "", + "call_args": "(c)", + "argsoriginal": "(ImWchar c)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImWchar", + "name": "c" + } + ], + "defaults": [], + "signature": "(ImWchar)", + "cimguiname": "ImFont_GetCharAdvance" + } + ], + "igImageButton": [ + { + "funcname": "ImageButton", + "args": "(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,int frame_padding,const ImVec4 bg_col,const ImVec4 tint_col)", + "ret": "bool", + "comment": "", + "call_args": "(user_texture_id,size,uv0,uv1,frame_padding,bg_col,tint_col)", + "argsoriginal": "(ImTextureID user_texture_id,const ImVec2& size,const ImVec2& uv0=ImVec2(0,0),const ImVec2& uv1=ImVec2(1,1),int frame_padding=-1,const ImVec4& bg_col=ImVec4(0,0,0,0),const ImVec4& tint_col=ImVec4(1,1,1,1))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImTextureID", + "name": "user_texture_id" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "const ImVec2", + "name": "uv0" + }, + { + "type": "const ImVec2", + "name": "uv1" + }, + { + "type": "int", + "name": "frame_padding" + }, + { + "type": "const ImVec4", + "name": "bg_col" + }, + { + "type": "const ImVec4", + "name": "tint_col" + } + ], + "defaults": { + "uv1": "ImVec2(1,1)", + "bg_col": "ImVec4(0,0,0,0)", + "uv0": "ImVec2(0,0)", + "frame_padding": "-1", + "tint_col": "ImVec4(1,1,1,1)" + }, + "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,int,const ImVec4,const ImVec4)", + "cimguiname": "igImageButton" + } + ], + "ImFont_SetFallbackChar": [ + { + "funcname": "SetFallbackChar", + "args": "(ImWchar c)", + "ret": "void", + "comment": "", + "call_args": "(c)", + "argsoriginal": "(ImWchar c)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImWchar", + "name": "c" + } + ], + "defaults": [], + "signature": "(ImWchar)", + "cimguiname": "ImFont_SetFallbackChar" + } + ], + "igEndFrame": [ + { + "funcname": "EndFrame", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndFrame" + } + ], + "igSliderFloat2": [ + { + "funcname": "SliderFloat2", + "args": "(const char* label,float v[2],float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float v[2],float v_min,float v_max,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[2]", + "name": "v" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[2],float,float,const char*,float)", + "cimguiname": "igSliderFloat2" + } + ], + "ImFont_RenderChar": [ + { + "funcname": "RenderChar", + "args": "(ImDrawList* draw_list,float size,ImVec2 pos,ImU32 col,unsigned short c)", + "ret": "void", + "comment": "", + "call_args": "(draw_list,size,pos,col,c)", + "argsoriginal": "(ImDrawList* draw_list,float size,ImVec2 pos,ImU32 col,unsigned short c)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImDrawList*", + "name": "draw_list" + }, + { + "type": "float", + "name": "size" + }, + { + "type": "ImVec2", + "name": "pos" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "unsigned short", + "name": "c" + } + ], + "defaults": [], + "signature": "(ImDrawList*,float,ImVec2,ImU32,unsigned short)", + "cimguiname": "ImFont_RenderChar" + } + ], + "igRadioButton": [ + { + "funcname": "RadioButton", + "args": "(const char* label,bool active)", + "ret": "bool", + "comment": "", + "call_args": "(label,active)", + "argsoriginal": "(const char* label,bool active)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "bool", + "name": "active" + } + ], + "ov_cimguiname": "igRadioButtonBool", + "defaults": [], + "signature": "(const char*,bool)", + "cimguiname": "igRadioButton" + }, + { + "funcname": "RadioButton", + "args": "(const char* label,int* v,int v_button)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_button)", + "argsoriginal": "(const char* label,int* v,int v_button)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "v" + }, + { + "type": "int", + "name": "v_button" + } + ], + "ov_cimguiname": "igRadioButtonIntPtr", + "defaults": [], + "signature": "(const char*,int*,int)", + "cimguiname": "igRadioButton" + } + ], + "ImDrawList_PushClipRect": [ + { + "funcname": "PushClipRect", + "args": "(ImVec2 clip_rect_min,ImVec2 clip_rect_max,bool intersect_with_current_clip_rect)", + "ret": "void", + "comment": "", + "call_args": "(clip_rect_min,clip_rect_max,intersect_with_current_clip_rect)", + "argsoriginal": "(ImVec2 clip_rect_min,ImVec2 clip_rect_max,bool intersect_with_current_clip_rect=false)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImVec2", + "name": "clip_rect_min" + }, + { + "type": "ImVec2", + "name": "clip_rect_max" + }, + { + "type": "bool", + "name": "intersect_with_current_clip_rect" + } + ], + "defaults": { "intersect_with_current_clip_rect": "false" }, + "signature": "(ImVec2,ImVec2,bool)", + "cimguiname": "ImDrawList_PushClipRect" + } + ], + "ImFont_FindGlyph": [ + { + "funcname": "FindGlyph", + "args": "(ImWchar c)", + "ret": "const ImFontGlyph*", + "comment": "", + "call_args": "(c)", + "argsoriginal": "(ImWchar c)", + "stname": "ImFont", + "argsT": [ + { + "type": "ImWchar", + "name": "c" + } + ], + "defaults": [], + "signature": "(ImWchar)", + "cimguiname": "ImFont_FindGlyph" + } + ], + "igIsItemDeactivatedAfterEdit": [ + { + "funcname": "IsItemDeactivatedAfterEdit", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsItemDeactivatedAfterEdit" + } + ], + "igGetWindowDrawList": [ + { + "funcname": "GetWindowDrawList", + "args": "()", + "ret": "ImDrawList*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowDrawList" + } + ], + "ImFontAtlas_AddFont": [ + { + "funcname": "AddFont", + "args": "(const ImFontConfig* font_cfg)", + "ret": "ImFont*", + "comment": "", + "call_args": "(font_cfg)", + "argsoriginal": "(const ImFontConfig* font_cfg)", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "const ImFontConfig*", + "name": "font_cfg" + } + ], + "defaults": [], + "signature": "(const ImFontConfig*)", + "cimguiname": "ImFontAtlas_AddFont" + } + ], + "ImDrawList_PathBezierCurveTo": [ + { + "funcname": "PathBezierCurveTo", + "args": "(const ImVec2 p1,const ImVec2 p2,const ImVec2 p3,int num_segments)", + "ret": "void", + "comment": "", + "call_args": "(p1,p2,p3,num_segments)", + "argsoriginal": "(const ImVec2& p1,const ImVec2& p2,const ImVec2& p3,int num_segments=0)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "p1" + }, + { + "type": "const ImVec2", + "name": "p2" + }, + { + "type": "const ImVec2", + "name": "p3" + }, + { + "type": "int", + "name": "num_segments" + } + ], + "defaults": { "num_segments": "0" }, + "signature": "(const ImVec2,const ImVec2,const ImVec2,int)", + "cimguiname": "ImDrawList_PathBezierCurveTo" + } + ], + "ImGuiPayload_Clear": [ + { + "funcname": "Clear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiPayload", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiPayload_Clear" + } + ], + "igNewLine": [ + { + "funcname": "NewLine", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igNewLine" + } + ], + "igIsItemFocused": [ + { + "funcname": "IsItemFocused", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsItemFocused" + } + ], + "igLoadIniSettingsFromMemory": [ + { + "funcname": "LoadIniSettingsFromMemory", + "args": "(const char* ini_data,size_t ini_size)", + "ret": "void", + "comment": "", + "call_args": "(ini_data,ini_size)", + "argsoriginal": "(const char* ini_data,size_t ini_size=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "ini_data" + }, + { + "type": "size_t", + "name": "ini_size" + } + ], + "defaults": { "ini_size": "0" }, + "signature": "(const char*,size_t)", + "cimguiname": "igLoadIniSettingsFromMemory" + } + ], + "igSliderInt2": [ + { + "funcname": "SliderInt2", + "args": "(const char* label,int v[2],int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format)", + "argsoriginal": "(const char* label,int v[2],int v_min,int v_max,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[2]", + "name": "v" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { "format": "\"%d\"" }, + "signature": "(const char*,int[2],int,int,const char*)", + "cimguiname": "igSliderInt2" + } + ], + "ImFont_~ImFont": [ + { + "funcname": "~ImFont", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFont", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImFont_~ImFont" + } + ], + "igSetWindowSize": [ + { + "funcname": "SetWindowSize", + "args": "(const ImVec2 size,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(size,cond)", + "argsoriginal": "(const ImVec2& size,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "ov_cimguiname": "igSetWindowSizeVec2", + "defaults": { "cond": "0" }, + "signature": "(const ImVec2,ImGuiCond)", + "cimguiname": "igSetWindowSize" + }, + { + "funcname": "SetWindowSize", + "args": "(const char* name,const ImVec2 size,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(name,size,cond)", + "argsoriginal": "(const char* name,const ImVec2& size,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "name" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "ov_cimguiname": "igSetWindowSizeStr", + "defaults": { "cond": "0" }, + "signature": "(const char*,const ImVec2,ImGuiCond)", + "cimguiname": "igSetWindowSize" + } + ], + "igInputFloat": [ + { + "funcname": "InputFloat", + "args": "(const char* label,float* v,float step,float step_fast,const char* format,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,step,step_fast,format,extra_flags)", + "argsoriginal": "(const char* label,float* v,float step=0.0f,float step_fast=0.0f,const char* format=\"%.3f\",ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float*", + "name": "v" + }, + { + "type": "float", + "name": "step" + }, + { + "type": "float", + "name": "step_fast" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "step": "0.0f", + "format": "\"%.3f\"", + "step_fast": "0.0f", + "extra_flags": "0" + }, + "signature": "(const char*,float*,float,float,const char*,ImGuiInputTextFlags)", + "cimguiname": "igInputFloat" + } + ], + "ImFont_ImFont": [ + { + "funcname": "ImFont", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFont", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImFont_ImFont" + } + ], + "ImGuiStorage_SetFloat": [ + { + "funcname": "SetFloat", + "args": "(ImGuiID key,float val)", + "ret": "void", + "comment": "", + "call_args": "(key,val)", + "argsoriginal": "(ImGuiID key,float val)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "float", + "name": "val" + } + ], + "defaults": [], + "signature": "(ImGuiID,float)", + "cimguiname": "ImGuiStorage_SetFloat" + } + ], + "igColorConvertRGBtoHSV": [ + { + "funcname": "ColorConvertRGBtoHSV", + "args": "(float r,float g,float b,float out_h,float out_s,float out_v)", + "ret": "void", + "comment": "", + "call_args": "(r,g,b,out_h,out_s,out_v)", + "argsoriginal": "(float r,float g,float b,float& out_h,float& out_s,float& out_v)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "r" + }, + { + "type": "float", + "name": "g" + }, + { + "type": "float", + "name": "b" + }, + { + "type": "float&", + "name": "out_h" + }, + { + "type": "float&", + "name": "out_s" + }, + { + "type": "float&", + "name": "out_v" + } + ], + "defaults": [], + "signature": "(float,float,float,float,float,float)", + "cimguiname": "igColorConvertRGBtoHSV" + } + ], + "igBeginMenuBar": [ + { + "funcname": "BeginMenuBar", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igBeginMenuBar" + } + ], + "igTextColoredV": [ + { + "funcname": "TextColoredV", + "args": "(const ImVec4 col,const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(col,fmt,args)", + "argsoriginal": "(const ImVec4& col,const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec4", + "name": "col" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const ImVec4,const char*,va_list)", + "cimguiname": "igTextColoredV" + } + ], + "igIsPopupOpen": [ + { + "funcname": "IsPopupOpen", + "args": "(const char* str_id)", + "ret": "bool", + "comment": "", + "call_args": "(str_id)", + "argsoriginal": "(const char* str_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igIsPopupOpen" + } + ], + "igIsItemVisible": [ + { + "funcname": "IsItemVisible", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsItemVisible" + } + ], + "ImFontAtlas_CalcCustomRectUV": [ + { + "funcname": "CalcCustomRectUV", + "args": "(const CustomRect* rect,ImVec2* out_uv_min,ImVec2* out_uv_max)", + "ret": "void", + "comment": "", + "call_args": "(rect,out_uv_min,out_uv_max)", + "argsoriginal": "(const CustomRect* rect,ImVec2* out_uv_min,ImVec2* out_uv_max)", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "const CustomRect*", + "name": "rect" + }, + { + "type": "ImVec2*", + "name": "out_uv_min" + }, + { + "type": "ImVec2*", + "name": "out_uv_max" + } + ], + "defaults": [], + "signature": "(const CustomRect*,ImVec2*,ImVec2*)", + "cimguiname": "ImFontAtlas_CalcCustomRectUV" + } + ], + "igTextWrappedV": [ + { + "funcname": "TextWrappedV", + "args": "(const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(fmt,args)", + "argsoriginal": "(const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const char*,va_list)", + "cimguiname": "igTextWrappedV" + } + ], + "ImFontAtlas_GetCustomRectByIndex": [ + { + "funcname": "GetCustomRectByIndex", + "args": "(int index)", + "ret": "const CustomRect*", + "comment": "", + "call_args": "(index)", + "argsoriginal": "(int index)", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "int", + "name": "index" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "ImFontAtlas_GetCustomRectByIndex" + } + ], + "GlyphRangesBuilder_AddText": [ + { + "funcname": "AddText", + "args": "(const char* text,const char* text_end)", + "ret": "void", + "comment": "", + "call_args": "(text,text_end)", + "argsoriginal": "(const char* text,const char* text_end=((void*)0))", + "stname": "GlyphRangesBuilder", + "argsT": [ + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + } + ], + "defaults": { "text_end": "((void*)0)" }, + "signature": "(const char*,const char*)", + "cimguiname": "GlyphRangesBuilder_AddText" + } + ], + "ImDrawList_UpdateTextureID": [ + { + "funcname": "UpdateTextureID", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_UpdateTextureID" + } + ], + "igSetNextWindowSize": [ + { + "funcname": "SetNextWindowSize", + "args": "(const ImVec2 size,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(size,cond)", + "argsoriginal": "(const ImVec2& size,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "defaults": { "cond": "0" }, + "signature": "(const ImVec2,ImGuiCond)", + "cimguiname": "igSetNextWindowSize" + } + ], + "ImFontAtlas_AddCustomRectRegular": [ + { + "funcname": "AddCustomRectRegular", + "args": "(unsigned int id,int width,int height)", + "ret": "int", + "comment": "", + "call_args": "(id,width,height)", + "argsoriginal": "(unsigned int id,int width,int height)", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "unsigned int", + "name": "id" + }, + { + "type": "int", + "name": "width" + }, + { + "type": "int", + "name": "height" + } + ], + "defaults": [], + "signature": "(unsigned int,int,int)", + "cimguiname": "ImFontAtlas_AddCustomRectRegular" + } + ], + "igSetWindowCollapsed": [ + { + "funcname": "SetWindowCollapsed", + "args": "(bool collapsed,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(collapsed,cond)", + "argsoriginal": "(bool collapsed,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "bool", + "name": "collapsed" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "ov_cimguiname": "igSetWindowCollapsedBool", + "defaults": { "cond": "0" }, + "signature": "(bool,ImGuiCond)", + "cimguiname": "igSetWindowCollapsed" + }, + { + "funcname": "SetWindowCollapsed", + "args": "(const char* name,bool collapsed,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(name,collapsed,cond)", + "argsoriginal": "(const char* name,bool collapsed,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "name" + }, + { + "type": "bool", + "name": "collapsed" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "ov_cimguiname": "igSetWindowCollapsedStr", + "defaults": { "cond": "0" }, + "signature": "(const char*,bool,ImGuiCond)", + "cimguiname": "igSetWindowCollapsed" + } + ], + "igGetMouseDragDelta": [ + { + "funcname": "GetMouseDragDelta", + "args": "(int button,float lock_threshold)", + "ret": "ImVec2", + "comment": "", + "call_args": "(button,lock_threshold)", + "argsoriginal": "(int button=0,float lock_threshold=-1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "button" + }, + { + "type": "float", + "name": "lock_threshold" + } + ], + "defaults": { + "lock_threshold": "-1.0f", + "button": "0" + }, + "signature": "(int,float)", + "cimguiname": "igGetMouseDragDelta" + }, + { + "funcname": "GetMouseDragDelta", + "args": "(ImVec2 *pOut,int button,float lock_threshold)", + "ret": "void", + "cimguiname": "igGetMouseDragDelta", + "nonUDT": 1, + "call_args": "(button,lock_threshold)", + "argsoriginal": "(int button=0,float lock_threshold=-1.0f)", + "stname": "ImGui", + "signature": "(int,float)", + "ov_cimguiname": "igGetMouseDragDelta_nonUDT", + "comment": "", + "defaults": { + "lock_threshold": "-1.0f", + "button": "0" + }, + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + }, + { + "type": "int", + "name": "button" + }, + { + "type": "float", + "name": "lock_threshold" + } + ] + }, + { + "cimguiname": "igGetMouseDragDelta", + "funcname": "GetMouseDragDelta", + "args": "(int button,float lock_threshold)", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "(int,float)", + "call_args": "(button,lock_threshold)", + "argsoriginal": "(int button=0,float lock_threshold=-1.0f)", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetMouseDragDelta_nonUDT2", + "comment": "", + "defaults": { + "lock_threshold": "-1.0f", + "button": "0" + }, + "argsT": [ + { + "type": "int", + "name": "button" + }, + { + "type": "float", + "name": "lock_threshold" + } + ] + } + ], + "igAcceptDragDropPayload": [ + { + "funcname": "AcceptDragDropPayload", + "args": "(const char* type,ImGuiDragDropFlags flags)", + "ret": "const ImGuiPayload*", + "comment": "", + "call_args": "(type,flags)", + "argsoriginal": "(const char* type,ImGuiDragDropFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "type" + }, + { + "type": "ImGuiDragDropFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(const char*,ImGuiDragDropFlags)", + "cimguiname": "igAcceptDragDropPayload" + } + ], + "igBeginDragDropSource": [ + { + "funcname": "BeginDragDropSource", + "args": "(ImGuiDragDropFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(flags)", + "argsoriginal": "(ImGuiDragDropFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiDragDropFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(ImGuiDragDropFlags)", + "cimguiname": "igBeginDragDropSource" + } + ], + "CustomRect_IsPacked": [ + { + "funcname": "IsPacked", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "CustomRect", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "CustomRect_IsPacked" + } + ], + "igPlotLines": [ + { + "funcname": "PlotLines", + "args": "(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride)", + "ret": "void", + "comment": "", + "call_args": "(label,values,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size,stride)", + "argsoriginal": "(const char* label,const float* values,int values_count,int values_offset=0,const char* overlay_text=((void*)0),float scale_min=3.40282347e+38F,float scale_max=3.40282347e+38F,ImVec2 graph_size=ImVec2(0,0),int stride=sizeof(float))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const float*", + "name": "values" + }, + { + "type": "int", + "name": "values_count" + }, + { + "type": "int", + "name": "values_offset" + }, + { + "type": "const char*", + "name": "overlay_text" + }, + { + "type": "float", + "name": "scale_min" + }, + { + "type": "float", + "name": "scale_max" + }, + { + "type": "ImVec2", + "name": "graph_size" + }, + { + "type": "int", + "name": "stride" + } + ], + "ov_cimguiname": "igPlotLines", + "defaults": { + "overlay_text": "((void*)0)", + "values_offset": "0", + "scale_max": "3.40282347e+38F", + "scale_min": "3.40282347e+38F", + "stride": "sizeof(float)", + "graph_size": "ImVec2(0,0)" + }, + "signature": "(const char*,const float*,int,int,const char*,float,float,ImVec2,int)", + "cimguiname": "igPlotLines" + }, + { + "funcname": "PlotLines", + "args": "(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size)", + "ret": "void", + "comment": "", + "call_args": "(label,values_getter,data,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size)", + "argsoriginal": "(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset=0,const char* overlay_text=((void*)0),float scale_min=3.40282347e+38F,float scale_max=3.40282347e+38F,ImVec2 graph_size=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float(*)(void* data,int idx)", + "signature": "(void* data,int idx)", + "name": "values_getter", + "ret": "float" + }, + { + "type": "void*", + "name": "data" + }, + { + "type": "int", + "name": "values_count" + }, + { + "type": "int", + "name": "values_offset" + }, + { + "type": "const char*", + "name": "overlay_text" + }, + { + "type": "float", + "name": "scale_min" + }, + { + "type": "float", + "name": "scale_max" + }, + { + "type": "ImVec2", + "name": "graph_size" + } + ], + "ov_cimguiname": "igPlotLinesFnPtr", + "defaults": { + "overlay_text": "((void*)0)", + "values_offset": "0", + "scale_max": "3.40282347e+38F", + "scale_min": "3.40282347e+38F", + "graph_size": "ImVec2(0,0)" + }, + "signature": "(const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)", + "cimguiname": "igPlotLines" + } + ], + "ImFontAtlas_IsBuilt": [ + { + "funcname": "IsBuilt", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_IsBuilt" + } + ], + "ImVec2_ImVec2": [ + { + "funcname": "ImVec2", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImVec2", + "argsT": [], + "comment": "", + "ov_cimguiname": "ImVec2_ImVec2", + "defaults": [], + "signature": "()", + "cimguiname": "ImVec2_ImVec2" + }, + { + "funcname": "ImVec2", + "args": "(float _x,float _y)", + "call_args": "(_x,_y)", + "argsoriginal": "(float _x,float _y)", + "stname": "ImVec2", + "argsT": [ + { + "type": "float", + "name": "_x" + }, + { + "type": "float", + "name": "_y" + } + ], + "comment": "", + "ov_cimguiname": "ImVec2_ImVec2Float", + "defaults": [], + "signature": "(float,float)", + "cimguiname": "ImVec2_ImVec2" + } + ], + "ImGuiPayload_ImGuiPayload": [ + { + "funcname": "ImGuiPayload", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiPayload", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiPayload_ImGuiPayload" + } + ], + "ImDrawList_Clear": [ + { + "funcname": "Clear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_Clear" + } + ], + "GlyphRangesBuilder_AddRanges": [ + { + "funcname": "AddRanges", + "args": "(const ImWchar* ranges)", + "ret": "void", + "comment": "", + "call_args": "(ranges)", + "argsoriginal": "(const ImWchar* ranges)", + "stname": "GlyphRangesBuilder", + "argsT": [ + { + "type": "const ImWchar*", + "name": "ranges" + } + ], + "defaults": [], + "signature": "(const ImWchar*)", + "cimguiname": "GlyphRangesBuilder_AddRanges" + } + ], + "igGetFrameCount": [ + { + "funcname": "GetFrameCount", + "args": "()", + "ret": "int", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetFrameCount" + } + ], + "ImFont_GetDebugName": [ + { + "funcname": "GetDebugName", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFont", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFont_GetDebugName" + } + ], + "igListBoxFooter": [ + { + "funcname": "ListBoxFooter", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igListBoxFooter" + } + ], + "igPopClipRect": [ + { + "funcname": "PopClipRect", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igPopClipRect" + } + ], + "ImDrawList_AddBezierCurve": [ + { + "funcname": "AddBezierCurve", + "args": "(const ImVec2 pos0,const ImVec2 cp0,const ImVec2 cp1,const ImVec2 pos1,ImU32 col,float thickness,int num_segments)", + "ret": "void", + "comment": "", + "call_args": "(pos0,cp0,cp1,pos1,col,thickness,num_segments)", + "argsoriginal": "(const ImVec2& pos0,const ImVec2& cp0,const ImVec2& cp1,const ImVec2& pos1,ImU32 col,float thickness,int num_segments=0)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos0" + }, + { + "type": "const ImVec2", + "name": "cp0" + }, + { + "type": "const ImVec2", + "name": "cp1" + }, + { + "type": "const ImVec2", + "name": "pos1" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "float", + "name": "thickness" + }, + { + "type": "int", + "name": "num_segments" + } + ], + "defaults": { "num_segments": "0" }, + "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32,float,int)", + "cimguiname": "ImDrawList_AddBezierCurve" + } + ], + "GlyphRangesBuilder_GlyphRangesBuilder": [ + { + "funcname": "GlyphRangesBuilder", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "GlyphRangesBuilder", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "GlyphRangesBuilder_GlyphRangesBuilder" + } + ], + "igGetWindowSize": [ + { + "funcname": "GetWindowSize", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowSize" + }, + { + "funcname": "GetWindowSize", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetWindowSize", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetWindowSize_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetWindowSize", + "funcname": "GetWindowSize", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetWindowSize_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "ImFontAtlas_GetGlyphRangesThai": [ + { + "funcname": "GetGlyphRangesThai", + "args": "()", + "ret": "const ImWchar*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_GetGlyphRangesThai" + } + ], + "igCheckboxFlags": [ + { + "funcname": "CheckboxFlags", + "args": "(const char* label,unsigned int* flags,unsigned int flags_value)", + "ret": "bool", + "comment": "", + "call_args": "(label,flags,flags_value)", + "argsoriginal": "(const char* label,unsigned int* flags,unsigned int flags_value)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "unsigned int*", + "name": "flags" + }, + { + "type": "unsigned int", + "name": "flags_value" + } + ], + "defaults": [], + "signature": "(const char*,unsigned int*,unsigned int)", + "cimguiname": "igCheckboxFlags" + } + ], + "ImFontAtlas_GetGlyphRangesCyrillic": [ + { + "funcname": "GetGlyphRangesCyrillic", + "args": "()", + "ret": "const ImWchar*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_GetGlyphRangesCyrillic" + } + ], + "igIsWindowHovered": [ + { + "funcname": "IsWindowHovered", + "args": "(ImGuiHoveredFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(flags)", + "argsoriginal": "(ImGuiHoveredFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiHoveredFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(ImGuiHoveredFlags)", + "cimguiname": "igIsWindowHovered" + } + ], + "ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon": [ + { + "funcname": "GetGlyphRangesChineseSimplifiedCommon", + "args": "()", + "ret": "const ImWchar*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon" + } + ], + "igPlotHistogram": [ + { + "funcname": "PlotHistogram", + "args": "(const char* label,const float* values,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size,int stride)", + "ret": "void", + "comment": "", + "call_args": "(label,values,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size,stride)", + "argsoriginal": "(const char* label,const float* values,int values_count,int values_offset=0,const char* overlay_text=((void*)0),float scale_min=3.40282347e+38F,float scale_max=3.40282347e+38F,ImVec2 graph_size=ImVec2(0,0),int stride=sizeof(float))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const float*", + "name": "values" + }, + { + "type": "int", + "name": "values_count" + }, + { + "type": "int", + "name": "values_offset" + }, + { + "type": "const char*", + "name": "overlay_text" + }, + { + "type": "float", + "name": "scale_min" + }, + { + "type": "float", + "name": "scale_max" + }, + { + "type": "ImVec2", + "name": "graph_size" + }, + { + "type": "int", + "name": "stride" + } + ], + "ov_cimguiname": "igPlotHistogramFloatPtr", + "defaults": { + "overlay_text": "((void*)0)", + "values_offset": "0", + "scale_max": "3.40282347e+38F", + "scale_min": "3.40282347e+38F", + "stride": "sizeof(float)", + "graph_size": "ImVec2(0,0)" + }, + "signature": "(const char*,const float*,int,int,const char*,float,float,ImVec2,int)", + "cimguiname": "igPlotHistogram" + }, + { + "funcname": "PlotHistogram", + "args": "(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset,const char* overlay_text,float scale_min,float scale_max,ImVec2 graph_size)", + "ret": "void", + "comment": "", + "call_args": "(label,values_getter,data,values_count,values_offset,overlay_text,scale_min,scale_max,graph_size)", + "argsoriginal": "(const char* label,float(*values_getter)(void* data,int idx),void* data,int values_count,int values_offset=0,const char* overlay_text=((void*)0),float scale_min=3.40282347e+38F,float scale_max=3.40282347e+38F,ImVec2 graph_size=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float(*)(void* data,int idx)", + "signature": "(void* data,int idx)", + "name": "values_getter", + "ret": "float" + }, + { + "type": "void*", + "name": "data" + }, + { + "type": "int", + "name": "values_count" + }, + { + "type": "int", + "name": "values_offset" + }, + { + "type": "const char*", + "name": "overlay_text" + }, + { + "type": "float", + "name": "scale_min" + }, + { + "type": "float", + "name": "scale_max" + }, + { + "type": "ImVec2", + "name": "graph_size" + } + ], + "ov_cimguiname": "igPlotHistogramFnPtr", + "defaults": { + "overlay_text": "((void*)0)", + "values_offset": "0", + "scale_max": "3.40282347e+38F", + "scale_min": "3.40282347e+38F", + "graph_size": "ImVec2(0,0)" + }, + "signature": "(const char*,float(*)(void*,int),void*,int,int,const char*,float,float,ImVec2)", + "cimguiname": "igPlotHistogram" + } + ], + "igBeginPopupContextVoid": [ + { + "funcname": "BeginPopupContextVoid", + "args": "(const char* str_id,int mouse_button)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,mouse_button)", + "argsoriginal": "(const char* str_id=((void*)0),int mouse_button=1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "int", + "name": "mouse_button" + } + ], + "defaults": { + "mouse_button": "1", + "str_id": "((void*)0)" + }, + "signature": "(const char*,int)", + "cimguiname": "igBeginPopupContextVoid" + } + ], + "ImFontAtlas_GetGlyphRangesChineseFull": [ + { + "funcname": "GetGlyphRangesChineseFull", + "args": "()", + "ret": "const ImWchar*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_GetGlyphRangesChineseFull" + } + ], + "igShowStyleEditor": [ + { + "funcname": "ShowStyleEditor", + "args": "(ImGuiStyle* ref)", + "ret": "void", + "comment": "", + "call_args": "(ref)", + "argsoriginal": "(ImGuiStyle* ref=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiStyle*", + "name": "ref" + } + ], + "defaults": { "ref": "((void*)0)" }, + "signature": "(ImGuiStyle*)", + "cimguiname": "igShowStyleEditor" + } + ], + "igCheckbox": [ + { + "funcname": "Checkbox", + "args": "(const char* label,bool* v)", + "ret": "bool", + "comment": "", + "call_args": "(label,v)", + "argsoriginal": "(const char* label,bool* v)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "bool*", + "name": "v" + } + ], + "defaults": [], + "signature": "(const char*,bool*)", + "cimguiname": "igCheckbox" + } + ], + "igGetWindowPos": [ + { + "funcname": "GetWindowPos", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowPos" + }, + { + "funcname": "GetWindowPos", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetWindowPos", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetWindowPos_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetWindowPos", + "funcname": "GetWindowPos", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetWindowPos_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "ImFontAtlas_~ImFontAtlas": [ + { + "funcname": "~ImFontAtlas", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_~ImFontAtlas" + } + ], + "ImGuiInputTextCallbackData_ImGuiInputTextCallbackData": [ + { + "funcname": "ImGuiInputTextCallbackData", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiInputTextCallbackData", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiInputTextCallbackData_ImGuiInputTextCallbackData" + } + ], + "igSetNextWindowContentSize": [ + { + "funcname": "SetNextWindowContentSize", + "args": "(const ImVec2 size)", + "ret": "void", + "comment": "", + "call_args": "(size)", + "argsoriginal": "(const ImVec2& size)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "size" + } + ], + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "igSetNextWindowContentSize" + } + ], + "igTextColored": [ + { + "isvararg": "...)", + "funcname": "TextColored", + "args": "(const ImVec4 col,const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(col,fmt,...)", + "argsoriginal": "(const ImVec4& col,const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec4", + "name": "col" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const ImVec4,const char*,...)", + "cimguiname": "igTextColored" + } + ], + "igLogToFile": [ + { + "funcname": "LogToFile", + "args": "(int max_depth,const char* filename)", + "ret": "void", + "comment": "", + "call_args": "(max_depth,filename)", + "argsoriginal": "(int max_depth=-1,const char* filename=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "max_depth" + }, + { + "type": "const char*", + "name": "filename" + } + ], + "defaults": { + "filename": "((void*)0)", + "max_depth": "-1" + }, + "signature": "(int,const char*)", + "cimguiname": "igLogToFile" + } + ], + "igButton": [ + { + "funcname": "Button", + "args": "(const char* label,const ImVec2 size)", + "ret": "bool", + "comment": "", + "call_args": "(label,size)", + "argsoriginal": "(const char* label,const ImVec2& size=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const ImVec2", + "name": "size" + } + ], + "defaults": { "size": "ImVec2(0,0)" }, + "signature": "(const char*,const ImVec2)", + "cimguiname": "igButton" + } + ], + "igIsItemEdited": [ + { + "funcname": "IsItemEdited", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsItemEdited" + } + ], + "igTreeNodeExV": [ + { + "funcname": "TreeNodeExV", + "args": "(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,flags,fmt,args)", + "argsoriginal": "(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "ImGuiTreeNodeFlags", + "name": "flags" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "ov_cimguiname": "igTreeNodeExVStr", + "defaults": [], + "signature": "(const char*,ImGuiTreeNodeFlags,const char*,va_list)", + "cimguiname": "igTreeNodeExV" + }, + { + "funcname": "TreeNodeExV", + "args": "(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args)", + "ret": "bool", + "comment": "", + "call_args": "(ptr_id,flags,fmt,args)", + "argsoriginal": "(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const void*", + "name": "ptr_id" + }, + { + "type": "ImGuiTreeNodeFlags", + "name": "flags" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "ov_cimguiname": "igTreeNodeExVPtr", + "defaults": [], + "signature": "(const void*,ImGuiTreeNodeFlags,const char*,va_list)", + "cimguiname": "igTreeNodeExV" + } + ], + "ImDrawList_PushTextureID": [ + { + "funcname": "PushTextureID", + "args": "(ImTextureID texture_id)", + "ret": "void", + "comment": "", + "call_args": "(texture_id)", + "argsoriginal": "(ImTextureID texture_id)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImTextureID", + "name": "texture_id" + } + ], + "defaults": [], + "signature": "(ImTextureID)", + "cimguiname": "ImDrawList_PushTextureID" + } + ], + "igTreeAdvanceToLabelPos": [ + { + "funcname": "TreeAdvanceToLabelPos", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igTreeAdvanceToLabelPos" + } + ], + "ImGuiInputTextCallbackData_DeleteChars": [ + { + "funcname": "DeleteChars", + "args": "(int pos,int bytes_count)", + "ret": "void", + "comment": "", + "call_args": "(pos,bytes_count)", + "argsoriginal": "(int pos,int bytes_count)", + "stname": "ImGuiInputTextCallbackData", + "argsT": [ + { + "type": "int", + "name": "pos" + }, + { + "type": "int", + "name": "bytes_count" + } + ], + "defaults": [], + "signature": "(int,int)", + "cimguiname": "ImGuiInputTextCallbackData_DeleteChars" + } + ], + "igDragInt2": [ + { + "funcname": "DragInt2", + "args": "(const char* label,int v[2],float v_speed,int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format)", + "argsoriginal": "(const char* label,int v[2],float v_speed=1.0f,int v_min=0,int v_max=0,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[2]", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0", + "format": "\"%d\"", + "v_max": "0" + }, + "signature": "(const char*,int[2],float,int,int,const char*)", + "cimguiname": "igDragInt2" + } + ], + "ImFontAtlas_GetGlyphRangesDefault": [ + { + "funcname": "GetGlyphRangesDefault", + "args": "()", + "ret": "const ImWchar*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_GetGlyphRangesDefault" + } + ], + "igIsAnyItemActive": [ + { + "funcname": "IsAnyItemActive", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsAnyItemActive" + } + ], + "ImFontAtlas_SetTexID": [ + { + "funcname": "SetTexID", + "args": "(ImTextureID id)", + "ret": "void", + "comment": "", + "call_args": "(id)", + "argsoriginal": "(ImTextureID id)", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "ImTextureID", + "name": "id" + } + ], + "defaults": [], + "signature": "(ImTextureID)", + "cimguiname": "ImFontAtlas_SetTexID" + } + ], + "igMenuItem": [ + { + "funcname": "MenuItem", + "args": "(const char* label,const char* shortcut,bool selected,bool enabled)", + "ret": "bool", + "comment": "", + "call_args": "(label,shortcut,selected,enabled)", + "argsoriginal": "(const char* label,const char* shortcut=((void*)0),bool selected=false,bool enabled=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const char*", + "name": "shortcut" + }, + { + "type": "bool", + "name": "selected" + }, + { + "type": "bool", + "name": "enabled" + } + ], + "ov_cimguiname": "igMenuItemBool", + "defaults": { + "enabled": "true", + "shortcut": "((void*)0)", + "selected": "false" + }, + "signature": "(const char*,const char*,bool,bool)", + "cimguiname": "igMenuItem" + }, + { + "funcname": "MenuItem", + "args": "(const char* label,const char* shortcut,bool* p_selected,bool enabled)", + "ret": "bool", + "comment": "", + "call_args": "(label,shortcut,p_selected,enabled)", + "argsoriginal": "(const char* label,const char* shortcut,bool* p_selected,bool enabled=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const char*", + "name": "shortcut" + }, + { + "type": "bool*", + "name": "p_selected" + }, + { + "type": "bool", + "name": "enabled" + } + ], + "ov_cimguiname": "igMenuItemBoolPtr", + "defaults": { "enabled": "true" }, + "signature": "(const char*,const char*,bool*,bool)", + "cimguiname": "igMenuItem" + } + ], + "igSliderFloat4": [ + { + "funcname": "SliderFloat4", + "args": "(const char* label,float v[4],float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float v[4],float v_min,float v_max,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[4]", + "name": "v" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[4],float,float,const char*,float)", + "cimguiname": "igSliderFloat4" + } + ], + "igGetCursorPosX": [ + { + "funcname": "GetCursorPosX", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetCursorPosX" + } + ], + "ImFontAtlas_ClearTexData": [ + { + "funcname": "ClearTexData", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_ClearTexData" + } + ], + "ImFontAtlas_ClearFonts": [ + { + "funcname": "ClearFonts", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_ClearFonts" + } + ], + "igGetColumnsCount": [ + { + "funcname": "GetColumnsCount", + "args": "()", + "ret": "int", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetColumnsCount" + } + ], + "igPopButtonRepeat": [ + { + "funcname": "PopButtonRepeat", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igPopButtonRepeat" + } + ], + "igDragScalarN": [ + { + "funcname": "DragScalarN", + "args": "(const char* label,ImGuiDataType data_type,void* v,int components,float v_speed,const void* v_min,const void* v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,data_type,v,components,v_speed,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,ImGuiDataType data_type,void* v,int components,float v_speed,const void* v_min=((void*)0),const void* v_max=((void*)0),const char* format=((void*)0),float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiDataType", + "name": "data_type" + }, + { + "type": "void*", + "name": "v" + }, + { + "type": "int", + "name": "components" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "const void*", + "name": "v_min" + }, + { + "type": "const void*", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "v_max": "((void*)0)", + "v_min": "((void*)0)", + "format": "((void*)0)", + "power": "1.0f" + }, + "signature": "(const char*,ImGuiDataType,void*,int,float,const void*,const void*,const char*,float)", + "cimguiname": "igDragScalarN" + } + ], + "ImGuiPayload_IsPreview": [ + { + "funcname": "IsPreview", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiPayload", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiPayload_IsPreview" + } + ], + "igSpacing": [ + { + "funcname": "Spacing", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igSpacing" + } + ], + "ImFontAtlas_Clear": [ + { + "funcname": "Clear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_Clear" + } + ], + "igIsAnyItemFocused": [ + { + "funcname": "IsAnyItemFocused", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsAnyItemFocused" + } + ], + "ImDrawList_AddRectFilled": [ + { + "funcname": "AddRectFilled", + "args": "(const ImVec2 a,const ImVec2 b,ImU32 col,float rounding,int rounding_corners_flags)", + "ret": "void", + "comment": "", + "call_args": "(a,b,col,rounding,rounding_corners_flags)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,ImU32 col,float rounding=0.0f,int rounding_corners_flags=ImDrawCornerFlags_All)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "float", + "name": "rounding" + }, + { + "type": "int", + "name": "rounding_corners_flags" + } + ], + "defaults": { + "rounding": "0.0f", + "rounding_corners_flags": "ImDrawCornerFlags_All" + }, + "signature": "(const ImVec2,const ImVec2,ImU32,float,int)", + "cimguiname": "ImDrawList_AddRectFilled" + } + ], + "ImFontAtlas_AddFontFromMemoryCompressedTTF": [ + { + "funcname": "AddFontFromMemoryCompressedTTF", + "args": "(const void* compressed_font_data,int compressed_font_size,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges)", + "ret": "ImFont*", + "comment": "", + "call_args": "(compressed_font_data,compressed_font_size,size_pixels,font_cfg,glyph_ranges)", + "argsoriginal": "(const void* compressed_font_data,int compressed_font_size,float size_pixels,const ImFontConfig* font_cfg=((void*)0),const ImWchar* glyph_ranges=((void*)0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "const void*", + "name": "compressed_font_data" + }, + { + "type": "int", + "name": "compressed_font_size" + }, + { + "type": "float", + "name": "size_pixels" + }, + { + "type": "const ImFontConfig*", + "name": "font_cfg" + }, + { + "type": "const ImWchar*", + "name": "glyph_ranges" + } + ], + "defaults": { + "glyph_ranges": "((void*)0)", + "font_cfg": "((void*)0)" + }, + "signature": "(const void*,int,float,const ImFontConfig*,const ImWchar*)", + "cimguiname": "ImFontAtlas_AddFontFromMemoryCompressedTTF" + } + ], + "igMemFree": [ + { + "funcname": "MemFree", + "args": "(void* ptr)", + "ret": "void", + "comment": "", + "call_args": "(ptr)", + "argsoriginal": "(void* ptr)", + "stname": "ImGui", + "argsT": [ + { + "type": "void*", + "name": "ptr" + } + ], + "defaults": [], + "signature": "(void*)", + "cimguiname": "igMemFree" + } + ], + "igGetFontTexUvWhitePixel": [ + { + "funcname": "GetFontTexUvWhitePixel", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetFontTexUvWhitePixel" + }, + { + "funcname": "GetFontTexUvWhitePixel", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetFontTexUvWhitePixel", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetFontTexUvWhitePixel_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetFontTexUvWhitePixel", + "funcname": "GetFontTexUvWhitePixel", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetFontTexUvWhitePixel_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "ImDrawList_AddDrawCmd": [ + { + "funcname": "AddDrawCmd", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_AddDrawCmd" + } + ], + "igIsItemClicked": [ + { + "funcname": "IsItemClicked", + "args": "(int mouse_button)", + "ret": "bool", + "comment": "", + "call_args": "(mouse_button)", + "argsoriginal": "(int mouse_button=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "mouse_button" + } + ], + "defaults": { "mouse_button": "0" }, + "signature": "(int)", + "cimguiname": "igIsItemClicked" + } + ], + "ImFontAtlas_AddFontFromMemoryTTF": [ + { + "funcname": "AddFontFromMemoryTTF", + "args": "(void* font_data,int font_size,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges)", + "ret": "ImFont*", + "comment": "", + "call_args": "(font_data,font_size,size_pixels,font_cfg,glyph_ranges)", + "argsoriginal": "(void* font_data,int font_size,float size_pixels,const ImFontConfig* font_cfg=((void*)0),const ImWchar* glyph_ranges=((void*)0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "void*", + "name": "font_data" + }, + { + "type": "int", + "name": "font_size" + }, + { + "type": "float", + "name": "size_pixels" + }, + { + "type": "const ImFontConfig*", + "name": "font_cfg" + }, + { + "type": "const ImWchar*", + "name": "glyph_ranges" + } + ], + "defaults": { + "glyph_ranges": "((void*)0)", + "font_cfg": "((void*)0)" + }, + "signature": "(void*,int,float,const ImFontConfig*,const ImWchar*)", + "cimguiname": "ImFontAtlas_AddFontFromMemoryTTF" + } + ], + "ImFontAtlas_AddFontFromFileTTF": [ + { + "funcname": "AddFontFromFileTTF", + "args": "(const char* filename,float size_pixels,const ImFontConfig* font_cfg,const ImWchar* glyph_ranges)", + "ret": "ImFont*", + "comment": "", + "call_args": "(filename,size_pixels,font_cfg,glyph_ranges)", + "argsoriginal": "(const char* filename,float size_pixels,const ImFontConfig* font_cfg=((void*)0),const ImWchar* glyph_ranges=((void*)0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "const char*", + "name": "filename" + }, + { + "type": "float", + "name": "size_pixels" + }, + { + "type": "const ImFontConfig*", + "name": "font_cfg" + }, + { + "type": "const ImWchar*", + "name": "glyph_ranges" + } + ], + "defaults": { + "glyph_ranges": "((void*)0)", + "font_cfg": "((void*)0)" + }, + "signature": "(const char*,float,const ImFontConfig*,const ImWchar*)", + "cimguiname": "ImFontAtlas_AddFontFromFileTTF" + } + ], + "igProgressBar": [ + { + "funcname": "ProgressBar", + "args": "(float fraction,const ImVec2 size_arg,const char* overlay)", + "ret": "void", + "comment": "", + "call_args": "(fraction,size_arg,overlay)", + "argsoriginal": "(float fraction,const ImVec2& size_arg=ImVec2(-1,0),const char* overlay=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "fraction" + }, + { + "type": "const ImVec2", + "name": "size_arg" + }, + { + "type": "const char*", + "name": "overlay" + } + ], + "defaults": { + "size_arg": "ImVec2(-1,0)", + "overlay": "((void*)0)" + }, + "signature": "(float,const ImVec2,const char*)", + "cimguiname": "igProgressBar" + } + ], + "ImFontAtlas_AddFontDefault": [ + { + "funcname": "AddFontDefault", + "args": "(const ImFontConfig* font_cfg)", + "ret": "ImFont*", + "comment": "", + "call_args": "(font_cfg)", + "argsoriginal": "(const ImFontConfig* font_cfg=((void*)0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "const ImFontConfig*", + "name": "font_cfg" + } + ], + "defaults": { "font_cfg": "((void*)0)" }, + "signature": "(const ImFontConfig*)", + "cimguiname": "ImFontAtlas_AddFontDefault" + } + ], + "igSetNextWindowBgAlpha": [ + { + "funcname": "SetNextWindowBgAlpha", + "args": "(float alpha)", + "ret": "void", + "comment": "", + "call_args": "(alpha)", + "argsoriginal": "(float alpha)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "alpha" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "igSetNextWindowBgAlpha" + } + ], + "igBeginPopup": [ + { + "funcname": "BeginPopup", + "args": "(const char* str_id,ImGuiWindowFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,flags)", + "argsoriginal": "(const char* str_id,ImGuiWindowFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "ImGuiWindowFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(const char*,ImGuiWindowFlags)", + "cimguiname": "igBeginPopup" + } + ], + "ImFont_BuildLookupTable": [ + { + "funcname": "BuildLookupTable", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFont", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFont_BuildLookupTable" + } + ], + "igGetScrollX": [ + { + "funcname": "GetScrollX", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetScrollX" + } + ], + "igGetKeyIndex": [ + { + "funcname": "GetKeyIndex", + "args": "(ImGuiKey imgui_key)", + "ret": "int", + "comment": "", + "call_args": "(imgui_key)", + "argsoriginal": "(ImGuiKey imgui_key)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiKey", + "name": "imgui_key" + } + ], + "defaults": [], + "signature": "(ImGuiKey)", + "cimguiname": "igGetKeyIndex" + } + ], + "igGetOverlayDrawList": [ + { + "funcname": "GetOverlayDrawList", + "args": "()", + "ret": "ImDrawList*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetOverlayDrawList" + } + ], + "igGetID": [ + { + "funcname": "GetID", + "args": "(const char* str_id)", + "ret": "ImGuiID", + "comment": "", + "call_args": "(str_id)", + "argsoriginal": "(const char* str_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + } + ], + "ov_cimguiname": "igGetIDStr", + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igGetID" + }, + { + "funcname": "GetID", + "args": "(const char* str_id_begin,const char* str_id_end)", + "ret": "ImGuiID", + "comment": "", + "call_args": "(str_id_begin,str_id_end)", + "argsoriginal": "(const char* str_id_begin,const char* str_id_end)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id_begin" + }, + { + "type": "const char*", + "name": "str_id_end" + } + ], + "ov_cimguiname": "igGetIDStrStr", + "defaults": [], + "signature": "(const char*,const char*)", + "cimguiname": "igGetID" + }, + { + "funcname": "GetID", + "args": "(const void* ptr_id)", + "ret": "ImGuiID", + "comment": "", + "call_args": "(ptr_id)", + "argsoriginal": "(const void* ptr_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "const void*", + "name": "ptr_id" + } + ], + "ov_cimguiname": "igGetIDPtr", + "defaults": [], + "signature": "(const void*)", + "cimguiname": "igGetID" + } + ], + "ImFontAtlas_GetGlyphRangesJapanese": [ + { + "funcname": "GetGlyphRangesJapanese", + "args": "()", + "ret": "const ImWchar*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_GetGlyphRangesJapanese" + } + ], + "igListBoxHeader": [ + { + "funcname": "ListBoxHeader", + "args": "(const char* label,const ImVec2 size)", + "ret": "bool", + "comment": "", + "call_args": "(label,size)", + "argsoriginal": "(const char* label,const ImVec2& size=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const ImVec2", + "name": "size" + } + ], + "ov_cimguiname": "igListBoxHeaderVec2", + "defaults": { "size": "ImVec2(0,0)" }, + "signature": "(const char*,const ImVec2)", + "cimguiname": "igListBoxHeader" + }, + { + "funcname": "ListBoxHeader", + "args": "(const char* label,int items_count,int height_in_items)", + "ret": "bool", + "comment": "", + "call_args": "(label,items_count,height_in_items)", + "argsoriginal": "(const char* label,int items_count,int height_in_items=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int", + "name": "items_count" + }, + { + "type": "int", + "name": "height_in_items" + } + ], + "ov_cimguiname": "igListBoxHeaderInt", + "defaults": { "height_in_items": "-1" }, + "signature": "(const char*,int,int)", + "cimguiname": "igListBoxHeader" + } + ], + "ImFontConfig_ImFontConfig": [ + { + "funcname": "ImFontConfig", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontConfig", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImFontConfig_ImFontConfig" + } + ], + "igIsMouseReleased": [ + { + "funcname": "IsMouseReleased", + "args": "(int button)", + "ret": "bool", + "comment": "", + "call_args": "(button)", + "argsoriginal": "(int button)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "button" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "igIsMouseReleased" + } + ], + "ImDrawData_ScaleClipRects": [ + { + "funcname": "ScaleClipRects", + "args": "(const ImVec2 sc)", + "ret": "void", + "comment": "", + "call_args": "(sc)", + "argsoriginal": "(const ImVec2& sc)", + "stname": "ImDrawData", + "argsT": [ + { + "type": "const ImVec2", + "name": "sc" + } + ], + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "ImDrawData_ScaleClipRects" + } + ], + "igGetItemRectMin": [ + { + "funcname": "GetItemRectMin", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetItemRectMin" + }, + { + "funcname": "GetItemRectMin", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetItemRectMin", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetItemRectMin_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetItemRectMin", + "funcname": "GetItemRectMin", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetItemRectMin_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "ImDrawData_DeIndexAllBuffers": [ + { + "funcname": "DeIndexAllBuffers", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawData", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawData_DeIndexAllBuffers" + } + ], + "igLogText": [ + { + "isvararg": "...)", + "funcname": "LogText", + "args": "(const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(fmt,...)", + "argsoriginal": "(const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,...)", + "cimguiname": "igLogText" + } + ], + "ImDrawData_Clear": [ + { + "funcname": "Clear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawData", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawData_Clear" + } + ], + "ImGuiStorage_GetVoidPtr": [ + { + "funcname": "GetVoidPtr", + "args": "(ImGuiID key)", + "ret": "void*", + "comment": "", + "call_args": "(key)", + "argsoriginal": "(ImGuiID key)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + } + ], + "defaults": [], + "signature": "(ImGuiID)", + "cimguiname": "ImGuiStorage_GetVoidPtr" + } + ], + "ImDrawData_~ImDrawData": [ + { + "funcname": "~ImDrawData", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawData", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawData_~ImDrawData" + } + ], + "igTextWrapped": [ + { + "isvararg": "...)", + "funcname": "TextWrapped", + "args": "(const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(fmt,...)", + "argsoriginal": "(const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,...)", + "cimguiname": "igTextWrapped" + } + ], + "ImDrawList_UpdateClipRect": [ + { + "funcname": "UpdateClipRect", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_UpdateClipRect" + } + ], + "ImDrawList_PrimVtx": [ + { + "funcname": "PrimVtx", + "args": "(const ImVec2 pos,const ImVec2 uv,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(pos,uv,col)", + "argsoriginal": "(const ImVec2& pos,const ImVec2& uv,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos" + }, + { + "type": "const ImVec2", + "name": "uv" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_PrimVtx" + } + ], + "igEndGroup": [ + { + "funcname": "EndGroup", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndGroup" + } + ], + "igGetFont": [ + { + "funcname": "GetFont", + "args": "()", + "ret": "ImFont*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetFont" + } + ], + "igTreePush": [ + { + "funcname": "TreePush", + "args": "(const char* str_id)", + "ret": "void", + "comment": "", + "call_args": "(str_id)", + "argsoriginal": "(const char* str_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + } + ], + "ov_cimguiname": "igTreePushStr", + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igTreePush" + }, + { + "funcname": "TreePush", + "args": "(const void* ptr_id)", + "ret": "void", + "comment": "", + "call_args": "(ptr_id)", + "argsoriginal": "(const void* ptr_id=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const void*", + "name": "ptr_id" + } + ], + "ov_cimguiname": "igTreePushPtr", + "defaults": { "ptr_id": "((void*)0)" }, + "signature": "(const void*)", + "cimguiname": "igTreePush" + } + ], + "igTextDisabled": [ + { + "isvararg": "...)", + "funcname": "TextDisabled", + "args": "(const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(fmt,...)", + "argsoriginal": "(const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,...)", + "cimguiname": "igTextDisabled" + } + ], + "ImDrawList_PrimRect": [ + { + "funcname": "PrimRect", + "args": "(const ImVec2 a,const ImVec2 b,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(a,b,col)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_PrimRect" + } + ], + "ImDrawList_AddQuad": [ + { + "funcname": "AddQuad", + "args": "(const ImVec2 a,const ImVec2 b,const ImVec2 c,const ImVec2 d,ImU32 col,float thickness)", + "ret": "void", + "comment": "", + "call_args": "(a,b,c,d,col,thickness)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,const ImVec2& c,const ImVec2& d,ImU32 col,float thickness=1.0f)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "c" + }, + { + "type": "const ImVec2", + "name": "d" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "float", + "name": "thickness" + } + ], + "defaults": { "thickness": "1.0f" }, + "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32,float)", + "cimguiname": "ImDrawList_AddQuad" + } + ], + "ImDrawList_ClearFreeMemory": [ + { + "funcname": "ClearFreeMemory", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_ClearFreeMemory" + } + ], + "igSetNextTreeNodeOpen": [ + { + "funcname": "SetNextTreeNodeOpen", + "args": "(bool is_open,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(is_open,cond)", + "argsoriginal": "(bool is_open,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "bool", + "name": "is_open" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "defaults": { "cond": "0" }, + "signature": "(bool,ImGuiCond)", + "cimguiname": "igSetNextTreeNodeOpen" + } + ], + "igLogToTTY": [ + { + "funcname": "LogToTTY", + "args": "(int max_depth)", + "ret": "void", + "comment": "", + "call_args": "(max_depth)", + "argsoriginal": "(int max_depth=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "max_depth" + } + ], + "defaults": { "max_depth": "-1" }, + "signature": "(int)", + "cimguiname": "igLogToTTY" + } + ], + "GlyphRangesBuilder_BuildRanges": [ + { + "funcname": "BuildRanges", + "args": "(ImVector_ImWchar* out_ranges)", + "ret": "void", + "comment": "", + "call_args": "(out_ranges)", + "argsoriginal": "(ImVector* out_ranges)", + "stname": "GlyphRangesBuilder", + "argsT": [ + { + "type": "ImVector_ImWchar*", + "name": "out_ranges" + } + ], + "defaults": [], + "signature": "(ImVector_ImWchar*)", + "cimguiname": "GlyphRangesBuilder_BuildRanges" + } + ], + "igSetTooltipV": [ + { + "funcname": "SetTooltipV", + "args": "(const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(fmt,args)", + "argsoriginal": "(const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const char*,va_list)", + "cimguiname": "igSetTooltipV" + } + ], + "ImDrawList_CloneOutput": [ + { + "funcname": "CloneOutput", + "args": "()", + "ret": "ImDrawList*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_CloneOutput" + } + ], + "igGetIO": [ + { + "funcname": "GetIO", + "args": "()", + "ret": "ImGuiIO*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "retref": "&", + "defaults": [], + "signature": "()", + "cimguiname": "igGetIO" + } + ], + "igDragInt4": [ + { + "funcname": "DragInt4", + "args": "(const char* label,int v[4],float v_speed,int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format)", + "argsoriginal": "(const char* label,int v[4],float v_speed=1.0f,int v_min=0,int v_max=0,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[4]", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0", + "format": "\"%d\"", + "v_max": "0" + }, + "signature": "(const char*,int[4],float,int,int,const char*)", + "cimguiname": "igDragInt4" + } + ], + "igNextColumn": [ + { + "funcname": "NextColumn", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igNextColumn" + } + ], + "ImDrawList_AddRect": [ + { + "funcname": "AddRect", + "args": "(const ImVec2 a,const ImVec2 b,ImU32 col,float rounding,int rounding_corners_flags,float thickness)", + "ret": "void", + "comment": "", + "call_args": "(a,b,col,rounding,rounding_corners_flags,thickness)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,ImU32 col,float rounding=0.0f,int rounding_corners_flags=ImDrawCornerFlags_All,float thickness=1.0f)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "float", + "name": "rounding" + }, + { + "type": "int", + "name": "rounding_corners_flags" + }, + { + "type": "float", + "name": "thickness" + } + ], + "defaults": { + "rounding": "0.0f", + "thickness": "1.0f", + "rounding_corners_flags": "ImDrawCornerFlags_All" + }, + "signature": "(const ImVec2,const ImVec2,ImU32,float,int,float)", + "cimguiname": "ImDrawList_AddRect" + } + ], + "TextRange_split": [ + { + "funcname": "split", + "args": "(char separator,ImVector_TextRange* out)", + "ret": "void", + "comment": "", + "call_args": "(separator,out)", + "argsoriginal": "(char separator,ImVector* out)", + "stname": "TextRange", + "argsT": [ + { + "type": "char", + "name": "separator" + }, + { + "type": "ImVector_TextRange*", + "name": "out" + } + ], + "defaults": [], + "signature": "(char,ImVector_TextRange*)", + "cimguiname": "TextRange_split" + } + ], + "igSetCursorPos": [ + { + "funcname": "SetCursorPos", + "args": "(const ImVec2 local_pos)", + "ret": "void", + "comment": "", + "call_args": "(local_pos)", + "argsoriginal": "(const ImVec2& local_pos)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "local_pos" + } + ], + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "igSetCursorPos" + } + ], + "igBeginPopupModal": [ + { + "funcname": "BeginPopupModal", + "args": "(const char* name,bool* p_open,ImGuiWindowFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(name,p_open,flags)", + "argsoriginal": "(const char* name,bool* p_open=((void*)0),ImGuiWindowFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "name" + }, + { + "type": "bool*", + "name": "p_open" + }, + { + "type": "ImGuiWindowFlags", + "name": "flags" + } + ], + "defaults": { + "p_open": "((void*)0)", + "flags": "0" + }, + "signature": "(const char*,bool*,ImGuiWindowFlags)", + "cimguiname": "igBeginPopupModal" + } + ], + "igSliderInt4": [ + { + "funcname": "SliderInt4", + "args": "(const char* label,int v[4],int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format)", + "argsoriginal": "(const char* label,int v[4],int v_min,int v_max,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[4]", + "name": "v" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { "format": "\"%d\"" }, + "signature": "(const char*,int[4],int,int,const char*)", + "cimguiname": "igSliderInt4" + } + ], + "ImDrawList_AddCallback": [ + { + "funcname": "AddCallback", + "args": "(ImDrawCallback callback,void* callback_data)", + "ret": "void", + "comment": "", + "call_args": "(callback,callback_data)", + "argsoriginal": "(ImDrawCallback callback,void* callback_data)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImDrawCallback", + "name": "callback" + }, + { + "type": "void*", + "name": "callback_data" + } + ], + "defaults": [], + "signature": "(ImDrawCallback,void*)", + "cimguiname": "ImDrawList_AddCallback" + } + ], + "igShowMetricsWindow": [ + { + "funcname": "ShowMetricsWindow", + "args": "(bool* p_open)", + "ret": "void", + "comment": "", + "call_args": "(p_open)", + "argsoriginal": "(bool* p_open=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "bool*", + "name": "p_open" + } + ], + "defaults": { "p_open": "((void*)0)" }, + "signature": "(bool*)", + "cimguiname": "igShowMetricsWindow" + } + ], + "igGetScrollMaxY": [ + { + "funcname": "GetScrollMaxY", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetScrollMaxY" + } + ], + "igBeginTooltip": [ + { + "funcname": "BeginTooltip", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igBeginTooltip" + } + ], + "igSetScrollX": [ + { + "funcname": "SetScrollX", + "args": "(float scroll_x)", + "ret": "void", + "comment": "", + "call_args": "(scroll_x)", + "argsoriginal": "(float scroll_x)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "scroll_x" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "igSetScrollX" + } + ], + "igGetDrawData": [ + { + "funcname": "GetDrawData", + "args": "()", + "ret": "ImDrawData*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetDrawData" + } + ], + "igGetTextLineHeight": [ + { + "funcname": "GetTextLineHeight", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetTextLineHeight" + } + ], + "igSeparator": [ + { + "funcname": "Separator", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igSeparator" + } + ], + "igBeginChild": [ + { + "funcname": "BeginChild", + "args": "(const char* str_id,const ImVec2 size,bool border,ImGuiWindowFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,size,border,flags)", + "argsoriginal": "(const char* str_id,const ImVec2& size=ImVec2(0,0),bool border=false,ImGuiWindowFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "bool", + "name": "border" + }, + { + "type": "ImGuiWindowFlags", + "name": "flags" + } + ], + "ov_cimguiname": "igBeginChild", + "defaults": { + "border": "false", + "size": "ImVec2(0,0)", + "flags": "0" + }, + "signature": "(const char*,const ImVec2,bool,ImGuiWindowFlags)", + "cimguiname": "igBeginChild" + }, + { + "funcname": "BeginChild", + "args": "(ImGuiID id,const ImVec2 size,bool border,ImGuiWindowFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(id,size,border,flags)", + "argsoriginal": "(ImGuiID id,const ImVec2& size=ImVec2(0,0),bool border=false,ImGuiWindowFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiID", + "name": "id" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "bool", + "name": "border" + }, + { + "type": "ImGuiWindowFlags", + "name": "flags" + } + ], + "ov_cimguiname": "igBeginChildID", + "defaults": { + "border": "false", + "size": "ImVec2(0,0)", + "flags": "0" + }, + "signature": "(ImGuiID,const ImVec2,bool,ImGuiWindowFlags)", + "cimguiname": "igBeginChild" + } + ], + "ImDrawList_PathRect": [ + { + "funcname": "PathRect", + "args": "(const ImVec2 rect_min,const ImVec2 rect_max,float rounding,int rounding_corners_flags)", + "ret": "void", + "comment": "", + "call_args": "(rect_min,rect_max,rounding,rounding_corners_flags)", + "argsoriginal": "(const ImVec2& rect_min,const ImVec2& rect_max,float rounding=0.0f,int rounding_corners_flags=ImDrawCornerFlags_All)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "rect_min" + }, + { + "type": "const ImVec2", + "name": "rect_max" + }, + { + "type": "float", + "name": "rounding" + }, + { + "type": "int", + "name": "rounding_corners_flags" + } + ], + "defaults": { + "rounding": "0.0f", + "rounding_corners_flags": "ImDrawCornerFlags_All" + }, + "signature": "(const ImVec2,const ImVec2,float,int)", + "cimguiname": "ImDrawList_PathRect" + } + ], + "igIsMouseClicked": [ + { + "funcname": "IsMouseClicked", + "args": "(int button,bool repeat)", + "ret": "bool", + "comment": "", + "call_args": "(button,repeat)", + "argsoriginal": "(int button,bool repeat=false)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "button" + }, + { + "type": "bool", + "name": "repeat" + } + ], + "defaults": { "repeat": "false" }, + "signature": "(int,bool)", + "cimguiname": "igIsMouseClicked" + } + ], + "igCalcItemWidth": [ + { + "funcname": "CalcItemWidth", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igCalcItemWidth" + } + ], + "ImGuiTextBuffer_appendfv": [ + { + "funcname": "appendfv", + "args": "(const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(fmt,args)", + "argsoriginal": "(const char* fmt,va_list args)", + "stname": "ImGuiTextBuffer", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const char*,va_list)", + "cimguiname": "ImGuiTextBuffer_appendfv" + } + ], + "ImDrawList_PathArcToFast": [ + { + "funcname": "PathArcToFast", + "args": "(const ImVec2 centre,float radius,int a_min_of_12,int a_max_of_12)", + "ret": "void", + "comment": "", + "call_args": "(centre,radius,a_min_of_12,a_max_of_12)", + "argsoriginal": "(const ImVec2& centre,float radius,int a_min_of_12,int a_max_of_12)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "centre" + }, + { + "type": "float", + "name": "radius" + }, + { + "type": "int", + "name": "a_min_of_12" + }, + { + "type": "int", + "name": "a_max_of_12" + } + ], + "defaults": [], + "signature": "(const ImVec2,float,int,int)", + "cimguiname": "ImDrawList_PathArcToFast" + } + ], + "igEndChildFrame": [ + { + "funcname": "EndChildFrame", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndChildFrame" + } + ], + "igIndent": [ + { + "funcname": "Indent", + "args": "(float indent_w)", + "ret": "void", + "comment": "", + "call_args": "(indent_w)", + "argsoriginal": "(float indent_w=0.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "indent_w" + } + ], + "defaults": { "indent_w": "0.0f" }, + "signature": "(float)", + "cimguiname": "igIndent" + } + ], + "igSetDragDropPayload": [ + { + "funcname": "SetDragDropPayload", + "args": "(const char* type,const void* data,size_t size,ImGuiCond cond)", + "ret": "bool", + "comment": "", + "call_args": "(type,data,size,cond)", + "argsoriginal": "(const char* type,const void* data,size_t size,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "type" + }, + { + "type": "const void*", + "name": "data" + }, + { + "type": "size_t", + "name": "size" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "defaults": { "cond": "0" }, + "signature": "(const char*,const void*,size_t,ImGuiCond)", + "cimguiname": "igSetDragDropPayload" + } + ], + "GlyphRangesBuilder_GetBit": [ + { + "funcname": "GetBit", + "args": "(int n)", + "ret": "bool", + "comment": "", + "call_args": "(n)", + "argsoriginal": "(int n)", + "stname": "GlyphRangesBuilder", + "argsT": [ + { + "type": "int", + "name": "n" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "GlyphRangesBuilder_GetBit" + } + ], + "ImGuiTextFilter_Draw": [ + { + "funcname": "Draw", + "args": "(const char* label,float width)", + "ret": "bool", + "comment": "", + "call_args": "(label,width)", + "argsoriginal": "(const char* label=\"Filter(inc,-exc)\",float width=0.0f)", + "stname": "ImGuiTextFilter", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float", + "name": "width" + } + ], + "defaults": { + "label": "\"Filter(inc,-exc)\"", + "width": "0.0f" + }, + "signature": "(const char*,float)", + "cimguiname": "ImGuiTextFilter_Draw" + } + ], + "igShowDemoWindow": [ + { + "funcname": "ShowDemoWindow", + "args": "(bool* p_open)", + "ret": "void", + "comment": "", + "call_args": "(p_open)", + "argsoriginal": "(bool* p_open=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "bool*", + "name": "p_open" + } + ], + "defaults": { "p_open": "((void*)0)" }, + "signature": "(bool*)", + "cimguiname": "igShowDemoWindow" + } + ], + "ImDrawList_PathStroke": [ + { + "funcname": "PathStroke", + "args": "(ImU32 col,bool closed,float thickness)", + "ret": "void", + "comment": "", + "call_args": "(col,closed,thickness)", + "argsoriginal": "(ImU32 col,bool closed,float thickness=1.0f)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImU32", + "name": "col" + }, + { + "type": "bool", + "name": "closed" + }, + { + "type": "float", + "name": "thickness" + } + ], + "defaults": { "thickness": "1.0f" }, + "signature": "(ImU32,bool,float)", + "cimguiname": "ImDrawList_PathStroke" + } + ], + "ImDrawList_PathFillConvex": [ + { + "funcname": "PathFillConvex", + "args": "(ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(col)", + "argsoriginal": "(ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(ImU32)", + "cimguiname": "ImDrawList_PathFillConvex" + } + ], + "ImDrawList_PathLineToMergeDuplicate": [ + { + "funcname": "PathLineToMergeDuplicate", + "args": "(const ImVec2 pos)", + "ret": "void", + "comment": "", + "call_args": "(pos)", + "argsoriginal": "(const ImVec2& pos)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos" + } + ], + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "ImDrawList_PathLineToMergeDuplicate" + } + ], + "igEndMenu": [ + { + "funcname": "EndMenu", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndMenu" + } + ], + "igColorButton": [ + { + "funcname": "ColorButton", + "args": "(const char* desc_id,const ImVec4 col,ImGuiColorEditFlags flags,ImVec2 size)", + "ret": "bool", + "comment": "", + "call_args": "(desc_id,col,flags,size)", + "argsoriginal": "(const char* desc_id,const ImVec4& col,ImGuiColorEditFlags flags=0,ImVec2 size=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "desc_id" + }, + { + "type": "const ImVec4", + "name": "col" + }, + { + "type": "ImGuiColorEditFlags", + "name": "flags" + }, + { + "type": "ImVec2", + "name": "size" + } + ], + "defaults": { + "size": "ImVec2(0,0)", + "flags": "0" + }, + "signature": "(const char*,const ImVec4,ImGuiColorEditFlags,ImVec2)", + "cimguiname": "igColorButton" + } + ], + "ImFontAtlas_GetTexDataAsAlpha8": [ + { + "funcname": "GetTexDataAsAlpha8", + "args": "(unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel)", + "ret": "void", + "comment": "", + "call_args": "(out_pixels,out_width,out_height,out_bytes_per_pixel)", + "argsoriginal": "(unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel=((void*)0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "unsigned char**", + "name": "out_pixels" + }, + { + "type": "int*", + "name": "out_width" + }, + { + "type": "int*", + "name": "out_height" + }, + { + "type": "int*", + "name": "out_bytes_per_pixel" + } + ], + "defaults": { "out_bytes_per_pixel": "((void*)0)" }, + "signature": "(unsigned char**,int*,int*,int*)", + "cimguiname": "ImFontAtlas_GetTexDataAsAlpha8" + } + ], + "igIsKeyReleased": [ + { + "funcname": "IsKeyReleased", + "args": "(int user_key_index)", + "ret": "bool", + "comment": "", + "call_args": "(user_key_index)", + "argsoriginal": "(int user_key_index)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "user_key_index" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "igIsKeyReleased" + } + ], + "igSetClipboardText": [ + { + "funcname": "SetClipboardText", + "args": "(const char* text)", + "ret": "void", + "comment": "", + "call_args": "(text)", + "argsoriginal": "(const char* text)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "text" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igSetClipboardText" + } + ], + "ImDrawList_PathArcTo": [ + { + "funcname": "PathArcTo", + "args": "(const ImVec2 centre,float radius,float a_min,float a_max,int num_segments)", + "ret": "void", + "comment": "", + "call_args": "(centre,radius,a_min,a_max,num_segments)", + "argsoriginal": "(const ImVec2& centre,float radius,float a_min,float a_max,int num_segments=10)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "centre" + }, + { + "type": "float", + "name": "radius" + }, + { + "type": "float", + "name": "a_min" + }, + { + "type": "float", + "name": "a_max" + }, + { + "type": "int", + "name": "num_segments" + } + ], + "defaults": { "num_segments": "10" }, + "signature": "(const ImVec2,float,float,float,int)", + "cimguiname": "ImDrawList_PathArcTo" + } + ], + "ImDrawList_AddConvexPolyFilled": [ + { + "funcname": "AddConvexPolyFilled", + "args": "(const ImVec2* points,const int num_points,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(points,num_points,col)", + "argsoriginal": "(const ImVec2* points,const int num_points,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2*", + "name": "points" + }, + { + "type": "const int", + "name": "num_points" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2*,const int,ImU32)", + "cimguiname": "ImDrawList_AddConvexPolyFilled" + } + ], + "igIsWindowCollapsed": [ + { + "funcname": "IsWindowCollapsed", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsWindowCollapsed" + } + ], + "igShowFontSelector": [ + { + "funcname": "ShowFontSelector", + "args": "(const char* label)", + "ret": "void", + "comment": "", + "call_args": "(label)", + "argsoriginal": "(const char* label)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igShowFontSelector" + } + ], + "ImDrawList_AddImageQuad": [ + { + "funcname": "AddImageQuad", + "args": "(ImTextureID user_texture_id,const ImVec2 a,const ImVec2 b,const ImVec2 c,const ImVec2 d,const ImVec2 uv_a,const ImVec2 uv_b,const ImVec2 uv_c,const ImVec2 uv_d,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(user_texture_id,a,b,c,d,uv_a,uv_b,uv_c,uv_d,col)", + "argsoriginal": "(ImTextureID user_texture_id,const ImVec2& a,const ImVec2& b,const ImVec2& c,const ImVec2& d,const ImVec2& uv_a=ImVec2(0,0),const ImVec2& uv_b=ImVec2(1,0),const ImVec2& uv_c=ImVec2(1,1),const ImVec2& uv_d=ImVec2(0,1),ImU32 col=0xFFFFFFFF)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImTextureID", + "name": "user_texture_id" + }, + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "c" + }, + { + "type": "const ImVec2", + "name": "d" + }, + { + "type": "const ImVec2", + "name": "uv_a" + }, + { + "type": "const ImVec2", + "name": "uv_b" + }, + { + "type": "const ImVec2", + "name": "uv_c" + }, + { + "type": "const ImVec2", + "name": "uv_d" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": { + "uv_c": "ImVec2(1,1)", + "uv_a": "ImVec2(0,0)", + "col": "0xFFFFFFFF", + "uv_b": "ImVec2(1,0)", + "uv_d": "ImVec2(0,1)" + }, + "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_AddImageQuad" + } + ], + "igSetNextWindowFocus": [ + { + "funcname": "SetNextWindowFocus", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igSetNextWindowFocus" + } + ], + "igSameLine": [ + { + "funcname": "SameLine", + "args": "(float pos_x,float spacing_w)", + "ret": "void", + "comment": "", + "call_args": "(pos_x,spacing_w)", + "argsoriginal": "(float pos_x=0.0f,float spacing_w=-1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "pos_x" + }, + { + "type": "float", + "name": "spacing_w" + } + ], + "defaults": { + "pos_x": "0.0f", + "spacing_w": "-1.0f" + }, + "signature": "(float,float)", + "cimguiname": "igSameLine" + } + ], + "igBegin": [ + { + "funcname": "Begin", + "args": "(const char* name,bool* p_open,ImGuiWindowFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(name,p_open,flags)", + "argsoriginal": "(const char* name,bool* p_open=((void*)0),ImGuiWindowFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "name" + }, + { + "type": "bool*", + "name": "p_open" + }, + { + "type": "ImGuiWindowFlags", + "name": "flags" + } + ], + "defaults": { + "p_open": "((void*)0)", + "flags": "0" + }, + "signature": "(const char*,bool*,ImGuiWindowFlags)", + "cimguiname": "igBegin" + } + ], + "igColorEdit3": [ + { + "funcname": "ColorEdit3", + "args": "(const char* label,float col[3],ImGuiColorEditFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,col,flags)", + "argsoriginal": "(const char* label,float col[3],ImGuiColorEditFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[3]", + "name": "col" + }, + { + "type": "ImGuiColorEditFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(const char*,float[3],ImGuiColorEditFlags)", + "cimguiname": "igColorEdit3" + } + ], + "ImDrawList_AddImage": [ + { + "funcname": "AddImage", + "args": "(ImTextureID user_texture_id,const ImVec2 a,const ImVec2 b,const ImVec2 uv_a,const ImVec2 uv_b,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(user_texture_id,a,b,uv_a,uv_b,col)", + "argsoriginal": "(ImTextureID user_texture_id,const ImVec2& a,const ImVec2& b,const ImVec2& uv_a=ImVec2(0,0),const ImVec2& uv_b=ImVec2(1,1),ImU32 col=0xFFFFFFFF)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImTextureID", + "name": "user_texture_id" + }, + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "uv_a" + }, + { + "type": "const ImVec2", + "name": "uv_b" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": { + "uv_b": "ImVec2(1,1)", + "uv_a": "ImVec2(0,0)", + "col": "0xFFFFFFFF" + }, + "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_AddImage" + } + ], + "ImGuiIO_AddInputCharactersUTF8": [ + { + "funcname": "AddInputCharactersUTF8", + "args": "(const char* utf8_chars)", + "ret": "void", + "comment": "", + "call_args": "(utf8_chars)", + "argsoriginal": "(const char* utf8_chars)", + "stname": "ImGuiIO", + "argsT": [ + { + "type": "const char*", + "name": "utf8_chars" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "ImGuiIO_AddInputCharactersUTF8" + } + ], + "ImDrawList_AddText": [ + { + "funcname": "AddText", + "args": "(const ImVec2 pos,ImU32 col,const char* text_begin,const char* text_end)", + "ret": "void", + "comment": "", + "call_args": "(pos,col,text_begin,text_end)", + "argsoriginal": "(const ImVec2& pos,ImU32 col,const char* text_begin,const char* text_end=((void*)0))", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "const char*", + "name": "text_begin" + }, + { + "type": "const char*", + "name": "text_end" + } + ], + "ov_cimguiname": "ImDrawList_AddText", + "defaults": { "text_end": "((void*)0)" }, + "signature": "(const ImVec2,ImU32,const char*,const char*)", + "cimguiname": "ImDrawList_AddText" + }, + { + "funcname": "AddText", + "args": "(const ImFont* font,float font_size,const ImVec2 pos,ImU32 col,const char* text_begin,const char* text_end,float wrap_width,const ImVec4* cpu_fine_clip_rect)", + "ret": "void", + "comment": "", + "call_args": "(font,font_size,pos,col,text_begin,text_end,wrap_width,cpu_fine_clip_rect)", + "argsoriginal": "(const ImFont* font,float font_size,const ImVec2& pos,ImU32 col,const char* text_begin,const char* text_end=((void*)0),float wrap_width=0.0f,const ImVec4* cpu_fine_clip_rect=((void*)0))", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImFont*", + "name": "font" + }, + { + "type": "float", + "name": "font_size" + }, + { + "type": "const ImVec2", + "name": "pos" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "const char*", + "name": "text_begin" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "float", + "name": "wrap_width" + }, + { + "type": "const ImVec4*", + "name": "cpu_fine_clip_rect" + } + ], + "ov_cimguiname": "ImDrawList_AddTextFontPtr", + "defaults": { + "text_end": "((void*)0)", + "cpu_fine_clip_rect": "((void*)0)", + "wrap_width": "0.0f" + }, + "signature": "(const ImFont*,float,const ImVec2,ImU32,const char*,const char*,float,const ImVec4*)", + "cimguiname": "ImDrawList_AddText" + } + ], + "ImDrawList_AddCircleFilled": [ + { + "funcname": "AddCircleFilled", + "args": "(const ImVec2 centre,float radius,ImU32 col,int num_segments)", + "ret": "void", + "comment": "", + "call_args": "(centre,radius,col,num_segments)", + "argsoriginal": "(const ImVec2& centre,float radius,ImU32 col,int num_segments=12)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "centre" + }, + { + "type": "float", + "name": "radius" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "int", + "name": "num_segments" + } + ], + "defaults": { "num_segments": "12" }, + "signature": "(const ImVec2,float,ImU32,int)", + "cimguiname": "ImDrawList_AddCircleFilled" + } + ], + "igInputFloat2": [ + { + "funcname": "InputFloat2", + "args": "(const char* label,float v[2],const char* format,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,format,extra_flags)", + "argsoriginal": "(const char* label,float v[2],const char* format=\"%.3f\",ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[2]", + "name": "v" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "extra_flags": "0", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[2],const char*,ImGuiInputTextFlags)", + "cimguiname": "igInputFloat2" + } + ], + "igPushButtonRepeat": [ + { + "funcname": "PushButtonRepeat", + "args": "(bool repeat)", + "ret": "void", + "comment": "", + "call_args": "(repeat)", + "argsoriginal": "(bool repeat)", + "stname": "ImGui", + "argsT": [ + { + "type": "bool", + "name": "repeat" + } + ], + "defaults": [], + "signature": "(bool)", + "cimguiname": "igPushButtonRepeat" + } + ], + "igPopItemWidth": [ + { + "funcname": "PopItemWidth", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igPopItemWidth" + } + ], + "ImDrawList_AddCircle": [ + { + "funcname": "AddCircle", + "args": "(const ImVec2 centre,float radius,ImU32 col,int num_segments,float thickness)", + "ret": "void", + "comment": "", + "call_args": "(centre,radius,col,num_segments,thickness)", + "argsoriginal": "(const ImVec2& centre,float radius,ImU32 col,int num_segments=12,float thickness=1.0f)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "centre" + }, + { + "type": "float", + "name": "radius" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "int", + "name": "num_segments" + }, + { + "type": "float", + "name": "thickness" + } + ], + "defaults": { + "num_segments": "12", + "thickness": "1.0f" + }, + "signature": "(const ImVec2,float,ImU32,int,float)", + "cimguiname": "ImDrawList_AddCircle" + } + ], + "ImDrawList_AddTriangleFilled": [ + { + "funcname": "AddTriangleFilled", + "args": "(const ImVec2 a,const ImVec2 b,const ImVec2 c,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(a,b,c,col)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,const ImVec2& c,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "c" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_AddTriangleFilled" + } + ], + "ImDrawList_AddTriangle": [ + { + "funcname": "AddTriangle", + "args": "(const ImVec2 a,const ImVec2 b,const ImVec2 c,ImU32 col,float thickness)", + "ret": "void", + "comment": "", + "call_args": "(a,b,c,col,thickness)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,const ImVec2& c,ImU32 col,float thickness=1.0f)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "c" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "float", + "name": "thickness" + } + ], + "defaults": { "thickness": "1.0f" }, + "signature": "(const ImVec2,const ImVec2,const ImVec2,ImU32,float)", + "cimguiname": "ImDrawList_AddTriangle" + } + ], + "ImDrawList_AddQuadFilled": [ + { + "funcname": "AddQuadFilled", + "args": "(const ImVec2 a,const ImVec2 b,const ImVec2 c,const ImVec2 d,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(a,b,c,d,col)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,const ImVec2& c,const ImVec2& d,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "c" + }, + { + "type": "const ImVec2", + "name": "d" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_AddQuadFilled" + } + ], + "igGetFontSize": [ + { + "funcname": "GetFontSize", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetFontSize" + } + ], + "igInputDouble": [ + { + "funcname": "InputDouble", + "args": "(const char* label,double* v,double step,double step_fast,const char* format,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,step,step_fast,format,extra_flags)", + "argsoriginal": "(const char* label,double* v,double step=0.0f,double step_fast=0.0f,const char* format=\"%.6f\",ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "double*", + "name": "v" + }, + { + "type": "double", + "name": "step" + }, + { + "type": "double", + "name": "step_fast" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "step": "0.0f", + "format": "\"%.6f\"", + "step_fast": "0.0f", + "extra_flags": "0" + }, + "signature": "(const char*,double*,double,double,const char*,ImGuiInputTextFlags)", + "cimguiname": "igInputDouble" + } + ], + "ImDrawList_PrimReserve": [ + { + "funcname": "PrimReserve", + "args": "(int idx_count,int vtx_count)", + "ret": "void", + "comment": "", + "call_args": "(idx_count,vtx_count)", + "argsoriginal": "(int idx_count,int vtx_count)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "int", + "name": "idx_count" + }, + { + "type": "int", + "name": "vtx_count" + } + ], + "defaults": [], + "signature": "(int,int)", + "cimguiname": "ImDrawList_PrimReserve" + } + ], + "ImDrawList_AddRectFilledMultiColor": [ + { + "funcname": "AddRectFilledMultiColor", + "args": "(const ImVec2 a,const ImVec2 b,ImU32 col_upr_left,ImU32 col_upr_right,ImU32 col_bot_right,ImU32 col_bot_left)", + "ret": "void", + "comment": "", + "call_args": "(a,b,col_upr_left,col_upr_right,col_bot_right,col_bot_left)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,ImU32 col_upr_left,ImU32 col_upr_right,ImU32 col_bot_right,ImU32 col_bot_left)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "ImU32", + "name": "col_upr_left" + }, + { + "type": "ImU32", + "name": "col_upr_right" + }, + { + "type": "ImU32", + "name": "col_bot_right" + }, + { + "type": "ImU32", + "name": "col_bot_left" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,ImU32,ImU32,ImU32,ImU32)", + "cimguiname": "ImDrawList_AddRectFilledMultiColor" + } + ], + "igEndPopup": [ + { + "funcname": "EndPopup", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndPopup" + } + ], + "ImFontAtlas_ClearInputData": [ + { + "funcname": "ClearInputData", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_ClearInputData" + } + ], + "ImDrawList_AddLine": [ + { + "funcname": "AddLine", + "args": "(const ImVec2 a,const ImVec2 b,ImU32 col,float thickness)", + "ret": "void", + "comment": "", + "call_args": "(a,b,col,thickness)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,ImU32 col,float thickness=1.0f)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "float", + "name": "thickness" + } + ], + "defaults": { "thickness": "1.0f" }, + "signature": "(const ImVec2,const ImVec2,ImU32,float)", + "cimguiname": "ImDrawList_AddLine" + } + ], + "igInputTextMultiline": [ + { + "funcname": "InputTextMultiline", + "args": "(const char* label,char* buf,size_t buf_size,const ImVec2 size,ImGuiInputTextFlags flags,ImGuiInputTextCallback callback,void* user_data)", + "ret": "bool", + "comment": "", + "call_args": "(label,buf,buf_size,size,flags,callback,user_data)", + "argsoriginal": "(const char* label,char* buf,size_t buf_size,const ImVec2& size=ImVec2(0,0),ImGuiInputTextFlags flags=0,ImGuiInputTextCallback callback=((void*)0),void* user_data=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "char*", + "name": "buf" + }, + { + "type": "size_t", + "name": "buf_size" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "ImGuiInputTextFlags", + "name": "flags" + }, + { + "type": "ImGuiInputTextCallback", + "name": "callback" + }, + { + "type": "void*", + "name": "user_data" + } + ], + "defaults": { + "callback": "((void*)0)", + "user_data": "((void*)0)", + "size": "ImVec2(0,0)", + "flags": "0" + }, + "signature": "(const char*,char*,size_t,const ImVec2,ImGuiInputTextFlags,ImGuiInputTextCallback,void*)", + "cimguiname": "igInputTextMultiline" + } + ], + "igSelectable": [ + { + "funcname": "Selectable", + "args": "(const char* label,bool selected,ImGuiSelectableFlags flags,const ImVec2 size)", + "ret": "bool", + "comment": "", + "call_args": "(label,selected,flags,size)", + "argsoriginal": "(const char* label,bool selected=false,ImGuiSelectableFlags flags=0,const ImVec2& size=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "bool", + "name": "selected" + }, + { + "type": "ImGuiSelectableFlags", + "name": "flags" + }, + { + "type": "const ImVec2", + "name": "size" + } + ], + "ov_cimguiname": "igSelectable", + "defaults": { + "selected": "false", + "size": "ImVec2(0,0)", + "flags": "0" + }, + "signature": "(const char*,bool,ImGuiSelectableFlags,const ImVec2)", + "cimguiname": "igSelectable" + }, + { + "funcname": "Selectable", + "args": "(const char* label,bool* p_selected,ImGuiSelectableFlags flags,const ImVec2 size)", + "ret": "bool", + "comment": "", + "call_args": "(label,p_selected,flags,size)", + "argsoriginal": "(const char* label,bool* p_selected,ImGuiSelectableFlags flags=0,const ImVec2& size=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "bool*", + "name": "p_selected" + }, + { + "type": "ImGuiSelectableFlags", + "name": "flags" + }, + { + "type": "const ImVec2", + "name": "size" + } + ], + "ov_cimguiname": "igSelectableBoolPtr", + "defaults": { + "size": "ImVec2(0,0)", + "flags": "0" + }, + "signature": "(const char*,bool*,ImGuiSelectableFlags,const ImVec2)", + "cimguiname": "igSelectable" + } + ], + "igListBox": [ + { + "funcname": "ListBox", + "args": "(const char* label,int* current_item,const char* const items[],int items_count,int height_in_items)", + "ret": "bool", + "comment": "", + "call_args": "(label,current_item,items,items_count,height_in_items)", + "argsoriginal": "(const char* label,int* current_item,const char* const items[],int items_count,int height_in_items=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "current_item" + }, + { + "type": "const char* const[]", + "name": "items" + }, + { + "type": "int", + "name": "items_count" + }, + { + "type": "int", + "name": "height_in_items" + } + ], + "ov_cimguiname": "igListBoxStr_arr", + "defaults": { "height_in_items": "-1" }, + "signature": "(const char*,int*,const char* const[],int,int)", + "cimguiname": "igListBox" + }, + { + "funcname": "ListBox", + "args": "(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items)", + "ret": "bool", + "comment": "", + "call_args": "(label,current_item,items_getter,data,items_count,height_in_items)", + "argsoriginal": "(const char* label,int* current_item,bool(*items_getter)(void* data,int idx,const char** out_text),void* data,int items_count,int height_in_items=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "current_item" + }, + { + "type": "bool(*)(void* data,int idx,const char** out_text)", + "signature": "(void* data,int idx,const char** out_text)", + "name": "items_getter", + "ret": "bool" + }, + { + "type": "void*", + "name": "data" + }, + { + "type": "int", + "name": "items_count" + }, + { + "type": "int", + "name": "height_in_items" + } + ], + "ov_cimguiname": "igListBoxFnPtr", + "defaults": { "height_in_items": "-1" }, + "signature": "(const char*,int*,bool(*)(void*,int,const char**),void*,int,int)", + "cimguiname": "igListBox" + } + ], + "igGetCursorPos": [ + { + "funcname": "GetCursorPos", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetCursorPos" + }, + { + "funcname": "GetCursorPos", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetCursorPos", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetCursorPos_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetCursorPos", + "funcname": "GetCursorPos", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetCursorPos_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "ImDrawList_GetClipRectMin": [ + { + "funcname": "GetClipRectMin", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_GetClipRectMin" + }, + { + "funcname": "GetClipRectMin", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "ImDrawList_GetClipRectMin", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "signature": "()", + "ov_cimguiname": "ImDrawList_GetClipRectMin_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "ImDrawList_GetClipRectMin", + "funcname": "GetClipRectMin", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "retorig": "ImVec2", + "ov_cimguiname": "ImDrawList_GetClipRectMin_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "ImDrawList_PopTextureID": [ + { + "funcname": "PopTextureID", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_PopTextureID" + } + ], + "igInputFloat4": [ + { + "funcname": "InputFloat4", + "args": "(const char* label,float v[4],const char* format,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,format,extra_flags)", + "argsoriginal": "(const char* label,float v[4],const char* format=\"%.3f\",ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[4]", + "name": "v" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "extra_flags": "0", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[4],const char*,ImGuiInputTextFlags)", + "cimguiname": "igInputFloat4" + } + ], + "igSetCursorPosY": [ + { + "funcname": "SetCursorPosY", + "args": "(float y)", + "ret": "void", + "comment": "", + "call_args": "(y)", + "argsoriginal": "(float y)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "y" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "igSetCursorPosY" + } + ], + "igGetVersion": [ + { + "funcname": "GetVersion", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetVersion" + } + ], + "igEndCombo": [ + { + "funcname": "EndCombo", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndCombo" + } + ], + "ImDrawList_~ImDrawList": [ + { + "funcname": "~ImDrawList", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_~ImDrawList" + } + ], + "igPushID": [ + { + "funcname": "PushID", + "args": "(const char* str_id)", + "ret": "void", + "comment": "", + "call_args": "(str_id)", + "argsoriginal": "(const char* str_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + } + ], + "ov_cimguiname": "igPushIDStr", + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igPushID" + }, + { + "funcname": "PushID", + "args": "(const char* str_id_begin,const char* str_id_end)", + "ret": "void", + "comment": "", + "call_args": "(str_id_begin,str_id_end)", + "argsoriginal": "(const char* str_id_begin,const char* str_id_end)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id_begin" + }, + { + "type": "const char*", + "name": "str_id_end" + } + ], + "ov_cimguiname": "igPushIDRange", + "defaults": [], + "signature": "(const char*,const char*)", + "cimguiname": "igPushID" + }, + { + "funcname": "PushID", + "args": "(const void* ptr_id)", + "ret": "void", + "comment": "", + "call_args": "(ptr_id)", + "argsoriginal": "(const void* ptr_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "const void*", + "name": "ptr_id" + } + ], + "ov_cimguiname": "igPushIDPtr", + "defaults": [], + "signature": "(const void*)", + "cimguiname": "igPushID" + }, + { + "funcname": "PushID", + "args": "(int int_id)", + "ret": "void", + "comment": "", + "call_args": "(int_id)", + "argsoriginal": "(int int_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "int_id" + } + ], + "ov_cimguiname": "igPushIDInt", + "defaults": [], + "signature": "(int)", + "cimguiname": "igPushID" + } + ], + "ImDrawList_ImDrawList": [ + { + "funcname": "ImDrawList", + "args": "(const ImDrawListSharedData* shared_data)", + "call_args": "(shared_data)", + "argsoriginal": "(const ImDrawListSharedData* shared_data)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImDrawListSharedData*", + "name": "shared_data" + } + ], + "comment": "", + "defaults": [], + "signature": "(const ImDrawListSharedData*)", + "cimguiname": "ImDrawList_ImDrawList" + } + ], + "ImDrawCmd_ImDrawCmd": [ + { + "funcname": "ImDrawCmd", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawCmd", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawCmd_ImDrawCmd" + } + ], + "ImGuiListClipper_End": [ + { + "funcname": "End", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiListClipper", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiListClipper_End" + } + ], + "igAlignTextToFramePadding": [ + { + "funcname": "AlignTextToFramePadding", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igAlignTextToFramePadding" + } + ], + "igPopStyleColor": [ + { + "funcname": "PopStyleColor", + "args": "(int count)", + "ret": "void", + "comment": "", + "call_args": "(count)", + "argsoriginal": "(int count=1)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "count" + } + ], + "defaults": { "count": "1" }, + "signature": "(int)", + "cimguiname": "igPopStyleColor" + } + ], + "ImGuiListClipper_Begin": [ + { + "funcname": "Begin", + "args": "(int items_count,float items_height)", + "ret": "void", + "comment": "", + "call_args": "(items_count,items_height)", + "argsoriginal": "(int items_count,float items_height=-1.0f)", + "stname": "ImGuiListClipper", + "argsT": [ + { + "type": "int", + "name": "items_count" + }, + { + "type": "float", + "name": "items_height" + } + ], + "defaults": { "items_height": "-1.0f" }, + "signature": "(int,float)", + "cimguiname": "ImGuiListClipper_Begin" + } + ], + "igText": [ + { + "isvararg": "...)", + "funcname": "Text", + "args": "(const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(fmt,...)", + "argsoriginal": "(const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,...)", + "cimguiname": "igText" + } + ], + "ImGuiListClipper_Step": [ + { + "funcname": "Step", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiListClipper", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiListClipper_Step" + } + ], + "igGetTextLineHeightWithSpacing": [ + { + "funcname": "GetTextLineHeightWithSpacing", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetTextLineHeightWithSpacing" + } + ], + "ImGuiListClipper_~ImGuiListClipper": [ + { + "funcname": "~ImGuiListClipper", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiListClipper", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiListClipper_~ImGuiListClipper" + } + ], + "ImGuiStorage_GetFloatRef": [ + { + "funcname": "GetFloatRef", + "args": "(ImGuiID key,float default_val)", + "ret": "float*", + "comment": "", + "call_args": "(key,default_val)", + "argsoriginal": "(ImGuiID key,float default_val=0.0f)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "float", + "name": "default_val" + } + ], + "defaults": { "default_val": "0.0f" }, + "signature": "(ImGuiID,float)", + "cimguiname": "ImGuiStorage_GetFloatRef" + } + ], + "igEndTooltip": [ + { + "funcname": "EndTooltip", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndTooltip" + } + ], + "ImGuiListClipper_ImGuiListClipper": [ + { + "funcname": "ImGuiListClipper", + "args": "(int items_count,float items_height)", + "call_args": "(items_count,items_height)", + "argsoriginal": "(int items_count=-1,float items_height=-1.0f)", + "stname": "ImGuiListClipper", + "argsT": [ + { + "type": "int", + "name": "items_count" + }, + { + "type": "float", + "name": "items_height" + } + ], + "comment": "", + "defaults": { + "items_height": "-1.0f", + "items_count": "-1" + }, + "signature": "(int,float)", + "cimguiname": "ImGuiListClipper_ImGuiListClipper" + } + ], + "igDragInt": [ + { + "funcname": "DragInt", + "args": "(const char* label,int* v,float v_speed,int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format)", + "argsoriginal": "(const char* label,int* v,float v_speed=1.0f,int v_min=0,int v_max=0,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0", + "format": "\"%d\"", + "v_max": "0" + }, + "signature": "(const char*,int*,float,int,int,const char*)", + "cimguiname": "igDragInt" + } + ], + "igSliderFloat": [ + { + "funcname": "SliderFloat", + "args": "(const char* label,float* v,float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float* v,float v_min,float v_max,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float*", + "name": "v" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float*,float,float,const char*,float)", + "cimguiname": "igSliderFloat" + } + ], + "igColorConvertFloat4ToU32": [ + { + "funcname": "ColorConvertFloat4ToU32", + "args": "(const ImVec4 in)", + "ret": "ImU32", + "comment": "", + "call_args": "(in)", + "argsoriginal": "(const ImVec4& in)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec4", + "name": "in" + } + ], + "defaults": [], + "signature": "(const ImVec4)", + "cimguiname": "igColorConvertFloat4ToU32" + } + ], + "ImGuiIO_ClearInputCharacters": [ + { + "funcname": "ClearInputCharacters", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiIO", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiIO_ClearInputCharacters" + } + ], + "igPushClipRect": [ + { + "funcname": "PushClipRect", + "args": "(const ImVec2 clip_rect_min,const ImVec2 clip_rect_max,bool intersect_with_current_clip_rect)", + "ret": "void", + "comment": "", + "call_args": "(clip_rect_min,clip_rect_max,intersect_with_current_clip_rect)", + "argsoriginal": "(const ImVec2& clip_rect_min,const ImVec2& clip_rect_max,bool intersect_with_current_clip_rect)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "clip_rect_min" + }, + { + "type": "const ImVec2", + "name": "clip_rect_max" + }, + { + "type": "bool", + "name": "intersect_with_current_clip_rect" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,bool)", + "cimguiname": "igPushClipRect" + } + ], + "igSetColumnWidth": [ + { + "funcname": "SetColumnWidth", + "args": "(int column_index,float width)", + "ret": "void", + "comment": "", + "call_args": "(column_index,width)", + "argsoriginal": "(int column_index,float width)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "column_index" + }, + { + "type": "float", + "name": "width" + } + ], + "defaults": [], + "signature": "(int,float)", + "cimguiname": "igSetColumnWidth" + } + ], + "ImGuiPayload_IsDataType": [ + { + "funcname": "IsDataType", + "args": "(const char* type)", + "ret": "bool", + "comment": "", + "call_args": "(type)", + "argsoriginal": "(const char* type)", + "stname": "ImGuiPayload", + "argsT": [ + { + "type": "const char*", + "name": "type" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "ImGuiPayload_IsDataType" + } + ], + "igBeginMainMenuBar": [ + { + "funcname": "BeginMainMenuBar", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igBeginMainMenuBar" + } + ], + "CustomRect_CustomRect": [ + { + "funcname": "CustomRect", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "CustomRect", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "CustomRect_CustomRect" + } + ], + "ImGuiInputTextCallbackData_HasSelection": [ + { + "funcname": "HasSelection", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiInputTextCallbackData", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiInputTextCallbackData_HasSelection" + } + ], + "ImGuiInputTextCallbackData_InsertChars": [ + { + "funcname": "InsertChars", + "args": "(int pos,const char* text,const char* text_end)", + "ret": "void", + "comment": "", + "call_args": "(pos,text,text_end)", + "argsoriginal": "(int pos,const char* text,const char* text_end=((void*)0))", + "stname": "ImGuiInputTextCallbackData", + "argsT": [ + { + "type": "int", + "name": "pos" + }, + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + } + ], + "defaults": { "text_end": "((void*)0)" }, + "signature": "(int,const char*,const char*)", + "cimguiname": "ImGuiInputTextCallbackData_InsertChars" + } + ], + "ImFontAtlas_GetMouseCursorTexData": [ + { + "funcname": "GetMouseCursorTexData", + "args": "(ImGuiMouseCursor cursor,ImVec2* out_offset,ImVec2* out_size,ImVec2 out_uv_border[2],ImVec2 out_uv_fill[2])", + "ret": "bool", + "comment": "", + "call_args": "(cursor,out_offset,out_size,out_uv_border,out_uv_fill)", + "argsoriginal": "(ImGuiMouseCursor cursor,ImVec2* out_offset,ImVec2* out_size,ImVec2 out_uv_border[2],ImVec2 out_uv_fill[2])", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "ImGuiMouseCursor", + "name": "cursor" + }, + { + "type": "ImVec2*", + "name": "out_offset" + }, + { + "type": "ImVec2*", + "name": "out_size" + }, + { + "type": "ImVec2[2]", + "name": "out_uv_border" + }, + { + "type": "ImVec2[2]", + "name": "out_uv_fill" + } + ], + "defaults": [], + "signature": "(ImGuiMouseCursor,ImVec2*,ImVec2*,ImVec2[2],ImVec2[2])", + "cimguiname": "ImFontAtlas_GetMouseCursorTexData" + } + ], + "igVSliderScalar": [ + { + "funcname": "VSliderScalar", + "args": "(const char* label,const ImVec2 size,ImGuiDataType data_type,void* v,const void* v_min,const void* v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,size,data_type,v,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,const ImVec2& size,ImGuiDataType data_type,void* v,const void* v_min,const void* v_max,const char* format=((void*)0),float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "ImGuiDataType", + "name": "data_type" + }, + { + "type": "void*", + "name": "v" + }, + { + "type": "const void*", + "name": "v_min" + }, + { + "type": "const void*", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "((void*)0)" + }, + "signature": "(const char*,const ImVec2,ImGuiDataType,void*,const void*,const void*,const char*,float)", + "cimguiname": "igVSliderScalar" + } + ], + "ImGuiStorage_SetAllInt": [ + { + "funcname": "SetAllInt", + "args": "(int val)", + "ret": "void", + "comment": "", + "call_args": "(val)", + "argsoriginal": "(int val)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "int", + "name": "val" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "ImGuiStorage_SetAllInt" + } + ], + "ImGuiStorage_GetVoidPtrRef": [ + { + "funcname": "GetVoidPtrRef", + "args": "(ImGuiID key,void* default_val)", + "ret": "void**", + "comment": "", + "call_args": "(key,default_val)", + "argsoriginal": "(ImGuiID key,void* default_val=((void*)0))", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "void*", + "name": "default_val" + } + ], + "defaults": { "default_val": "((void*)0)" }, + "signature": "(ImGuiID,void*)", + "cimguiname": "ImGuiStorage_GetVoidPtrRef" + } + ], + "igStyleColorsLight": [ + { + "funcname": "StyleColorsLight", + "args": "(ImGuiStyle* dst)", + "ret": "void", + "comment": "", + "call_args": "(dst)", + "argsoriginal": "(ImGuiStyle* dst=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiStyle*", + "name": "dst" + } + ], + "defaults": { "dst": "((void*)0)" }, + "signature": "(ImGuiStyle*)", + "cimguiname": "igStyleColorsLight" + } + ], + "igSliderFloat3": [ + { + "funcname": "SliderFloat3", + "args": "(const char* label,float v[3],float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float v[3],float v_min,float v_max,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[3]", + "name": "v" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[3],float,float,const char*,float)", + "cimguiname": "igSliderFloat3" + } + ], + "igSetAllocatorFunctions": [ + { + "funcname": "SetAllocatorFunctions", + "args": "(void*(*alloc_func)(size_t sz,void* user_data),void(*free_func)(void* ptr,void* user_data),void* user_data)", + "ret": "void", + "comment": "", + "call_args": "(alloc_func,free_func,user_data)", + "argsoriginal": "(void*(*alloc_func)(size_t sz,void* user_data),void(*free_func)(void* ptr,void* user_data),void* user_data=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "void*(*)(size_t sz,void* user_data)", + "signature": "(size_t sz,void* user_data)", + "name": "alloc_func", + "ret": "void*" + }, + { + "type": "void(*)(void* ptr,void* user_data)", + "signature": "(void* ptr,void* user_data)", + "name": "free_func", + "ret": "void" + }, + { + "type": "void*", + "name": "user_data" + } + ], + "defaults": { "user_data": "((void*)0)" }, + "signature": "(void*(*)(size_t,void*),void(*)(void*,void*),void*)", + "cimguiname": "igSetAllocatorFunctions" + } + ], + "igDragFloat": [ + { + "funcname": "DragFloat", + "args": "(const char* label,float* v,float v_speed,float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float* v,float v_speed=1.0f,float v_min=0.0f,float v_max=0.0f,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float*", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0.0f", + "power": "1.0f", + "v_max": "0.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float*,float,float,float,const char*,float)", + "cimguiname": "igDragFloat" + } + ], + "ImGuiStorage_GetBoolRef": [ + { + "funcname": "GetBoolRef", + "args": "(ImGuiID key,bool default_val)", + "ret": "bool*", + "comment": "", + "call_args": "(key,default_val)", + "argsoriginal": "(ImGuiID key,bool default_val=false)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "bool", + "name": "default_val" + } + ], + "defaults": { "default_val": "false" }, + "signature": "(ImGuiID,bool)", + "cimguiname": "ImGuiStorage_GetBoolRef" + } + ], + "igGetWindowHeight": [ + { + "funcname": "GetWindowHeight", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowHeight" + } + ], + "igGetMousePosOnOpeningCurrentPopup": [ + { + "funcname": "GetMousePosOnOpeningCurrentPopup", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetMousePosOnOpeningCurrentPopup" + }, + { + "funcname": "GetMousePosOnOpeningCurrentPopup", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetMousePosOnOpeningCurrentPopup", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetMousePosOnOpeningCurrentPopup_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetMousePosOnOpeningCurrentPopup", + "funcname": "GetMousePosOnOpeningCurrentPopup", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetMousePosOnOpeningCurrentPopup_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "ImGuiStorage_GetIntRef": [ + { + "funcname": "GetIntRef", + "args": "(ImGuiID key,int default_val)", + "ret": "int*", + "comment": "", + "call_args": "(key,default_val)", + "argsoriginal": "(ImGuiID key,int default_val=0)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "int", + "name": "default_val" + } + ], + "defaults": { "default_val": "0" }, + "signature": "(ImGuiID,int)", + "cimguiname": "ImGuiStorage_GetIntRef" + } + ], + "igCalcListClipping": [ + { + "funcname": "CalcListClipping", + "args": "(int items_count,float items_height,int* out_items_display_start,int* out_items_display_end)", + "ret": "void", + "comment": "", + "call_args": "(items_count,items_height,out_items_display_start,out_items_display_end)", + "argsoriginal": "(int items_count,float items_height,int* out_items_display_start,int* out_items_display_end)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "items_count" + }, + { + "type": "float", + "name": "items_height" + }, + { + "type": "int*", + "name": "out_items_display_start" + }, + { + "type": "int*", + "name": "out_items_display_end" + } + ], + "defaults": [], + "signature": "(int,float,int*,int*)", + "cimguiname": "igCalcListClipping" + } + ], + "ImGuiStorage_SetVoidPtr": [ + { + "funcname": "SetVoidPtr", + "args": "(ImGuiID key,void* val)", + "ret": "void", + "comment": "", + "call_args": "(key,val)", + "argsoriginal": "(ImGuiID key,void* val)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "void*", + "name": "val" + } + ], + "defaults": [], + "signature": "(ImGuiID,void*)", + "cimguiname": "ImGuiStorage_SetVoidPtr" + } + ], + "igEndDragDropSource": [ + { + "funcname": "EndDragDropSource", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndDragDropSource" + } + ], + "ImGuiStorage_BuildSortByKey": [ + { + "funcname": "BuildSortByKey", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiStorage", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiStorage_BuildSortByKey" + } + ], + "ImGuiStorage_GetFloat": [ + { + "funcname": "GetFloat", + "args": "(ImGuiID key,float default_val)", + "ret": "float", + "comment": "", + "call_args": "(key,default_val)", + "argsoriginal": "(ImGuiID key,float default_val=0.0f)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "float", + "name": "default_val" + } + ], + "defaults": { "default_val": "0.0f" }, + "signature": "(ImGuiID,float)", + "cimguiname": "ImGuiStorage_GetFloat" + } + ], + "ImGuiStorage_SetBool": [ + { + "funcname": "SetBool", + "args": "(ImGuiID key,bool val)", + "ret": "void", + "comment": "", + "call_args": "(key,val)", + "argsoriginal": "(ImGuiID key,bool val)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "bool", + "name": "val" + } + ], + "defaults": [], + "signature": "(ImGuiID,bool)", + "cimguiname": "ImGuiStorage_SetBool" + } + ], + "ImGuiStorage_GetBool": [ + { + "funcname": "GetBool", + "args": "(ImGuiID key,bool default_val)", + "ret": "bool", + "comment": "", + "call_args": "(key,default_val)", + "argsoriginal": "(ImGuiID key,bool default_val=false)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "bool", + "name": "default_val" + } + ], + "defaults": { "default_val": "false" }, + "signature": "(ImGuiID,bool)", + "cimguiname": "ImGuiStorage_GetBool" + } + ], + "igLabelTextV": [ + { + "funcname": "LabelTextV", + "args": "(const char* label,const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(label,fmt,args)", + "argsoriginal": "(const char* label,const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const char*,const char*,va_list)", + "cimguiname": "igLabelTextV" + } + ], + "igGetFrameHeightWithSpacing": [ + { + "funcname": "GetFrameHeightWithSpacing", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetFrameHeightWithSpacing" + } + ], + "ImGuiStorage_SetInt": [ + { + "funcname": "SetInt", + "args": "(ImGuiID key,int val)", + "ret": "void", + "comment": "", + "call_args": "(key,val)", + "argsoriginal": "(ImGuiID key,int val)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "int", + "name": "val" + } + ], + "defaults": [], + "signature": "(ImGuiID,int)", + "cimguiname": "ImGuiStorage_SetInt" + } + ], + "igCloseCurrentPopup": [ + { + "funcname": "CloseCurrentPopup", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igCloseCurrentPopup" + } + ], + "ImGuiTextBuffer_clear": [ + { + "funcname": "clear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextBuffer", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextBuffer_clear" + } + ], + "igBeginGroup": [ + { + "funcname": "BeginGroup", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igBeginGroup" + } + ], + "ImGuiStorage_Clear": [ + { + "funcname": "Clear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiStorage", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiStorage_Clear" + } + ], + "Pair_Pair": [ + { + "funcname": "Pair", + "args": "(ImGuiID _key,int _val_i)", + "call_args": "(_key,_val_i)", + "argsoriginal": "(ImGuiID _key,int _val_i)", + "stname": "Pair", + "argsT": [ + { + "type": "ImGuiID", + "name": "_key" + }, + { + "type": "int", + "name": "_val_i" + } + ], + "comment": "", + "ov_cimguiname": "Pair_PairInt", + "defaults": [], + "signature": "(ImGuiID,int)", + "cimguiname": "Pair_Pair" + }, + { + "funcname": "Pair", + "args": "(ImGuiID _key,float _val_f)", + "call_args": "(_key,_val_f)", + "argsoriginal": "(ImGuiID _key,float _val_f)", + "stname": "Pair", + "argsT": [ + { + "type": "ImGuiID", + "name": "_key" + }, + { + "type": "float", + "name": "_val_f" + } + ], + "comment": "", + "ov_cimguiname": "Pair_PairFloat", + "defaults": [], + "signature": "(ImGuiID,float)", + "cimguiname": "Pair_Pair" + }, + { + "funcname": "Pair", + "args": "(ImGuiID _key,void* _val_p)", + "call_args": "(_key,_val_p)", + "argsoriginal": "(ImGuiID _key,void* _val_p)", + "stname": "Pair", + "argsT": [ + { + "type": "ImGuiID", + "name": "_key" + }, + { + "type": "void*", + "name": "_val_p" + } + ], + "comment": "", + "ov_cimguiname": "Pair_PairPtr", + "defaults": [], + "signature": "(ImGuiID,void*)", + "cimguiname": "Pair_Pair" + } + ], + "ImGuiTextBuffer_appendf": [ + { + "isvararg": "...)", + "funcname": "appendf", + "args": "(const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(fmt,...)", + "argsoriginal": "(const char* fmt,...)", + "stname": "ImGuiTextBuffer", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,...)", + "cimguiname": "ImGuiTextBuffer_appendf" + } + ], + "ImGuiTextBuffer_c_str": [ + { + "funcname": "c_str", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextBuffer", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextBuffer_c_str" + } + ], + "ImGuiTextBuffer_reserve": [ + { + "funcname": "reserve", + "args": "(int capacity)", + "ret": "void", + "comment": "", + "call_args": "(capacity)", + "argsoriginal": "(int capacity)", + "stname": "ImGuiTextBuffer", + "argsT": [ + { + "type": "int", + "name": "capacity" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "ImGuiTextBuffer_reserve" + } + ], + "ImGuiTextBuffer_empty": [ + { + "funcname": "empty", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextBuffer", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextBuffer_empty" + } + ], + "igSliderScalar": [ + { + "funcname": "SliderScalar", + "args": "(const char* label,ImGuiDataType data_type,void* v,const void* v_min,const void* v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,data_type,v,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,ImGuiDataType data_type,void* v,const void* v_min,const void* v_max,const char* format=((void*)0),float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiDataType", + "name": "data_type" + }, + { + "type": "void*", + "name": "v" + }, + { + "type": "const void*", + "name": "v_min" + }, + { + "type": "const void*", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "((void*)0)" + }, + "signature": "(const char*,ImGuiDataType,void*,const void*,const void*,const char*,float)", + "cimguiname": "igSliderScalar" + } + ], + "igBeginCombo": [ + { + "funcname": "BeginCombo", + "args": "(const char* label,const char* preview_value,ImGuiComboFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,preview_value,flags)", + "argsoriginal": "(const char* label,const char* preview_value,ImGuiComboFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const char*", + "name": "preview_value" + }, + { + "type": "ImGuiComboFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(const char*,const char*,ImGuiComboFlags)", + "cimguiname": "igBeginCombo" + } + ], + "ImGuiTextBuffer_size": [ + { + "funcname": "size", + "args": "()", + "ret": "int", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextBuffer", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextBuffer_size" + } + ], + "igBeginMenu": [ + { + "funcname": "BeginMenu", + "args": "(const char* label,bool enabled)", + "ret": "bool", + "comment": "", + "call_args": "(label,enabled)", + "argsoriginal": "(const char* label,bool enabled=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "bool", + "name": "enabled" + } + ], + "defaults": { "enabled": "true" }, + "signature": "(const char*,bool)", + "cimguiname": "igBeginMenu" + } + ], + "igIsItemHovered": [ + { + "funcname": "IsItemHovered", + "args": "(ImGuiHoveredFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(flags)", + "argsoriginal": "(ImGuiHoveredFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiHoveredFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(ImGuiHoveredFlags)", + "cimguiname": "igIsItemHovered" + } + ], + "ImDrawList_PrimWriteVtx": [ + { + "funcname": "PrimWriteVtx", + "args": "(const ImVec2 pos,const ImVec2 uv,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(pos,uv,col)", + "argsoriginal": "(const ImVec2& pos,const ImVec2& uv,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos" + }, + { + "type": "const ImVec2", + "name": "uv" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_PrimWriteVtx" + } + ], + "igBullet": [ + { + "funcname": "Bullet", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igBullet" + } + ], + "igInputText": [ + { + "funcname": "InputText", + "args": "(const char* label,char* buf,size_t buf_size,ImGuiInputTextFlags flags,ImGuiInputTextCallback callback,void* user_data)", + "ret": "bool", + "comment": "", + "call_args": "(label,buf,buf_size,flags,callback,user_data)", + "argsoriginal": "(const char* label,char* buf,size_t buf_size,ImGuiInputTextFlags flags=0,ImGuiInputTextCallback callback=((void*)0),void* user_data=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "char*", + "name": "buf" + }, + { + "type": "size_t", + "name": "buf_size" + }, + { + "type": "ImGuiInputTextFlags", + "name": "flags" + }, + { + "type": "ImGuiInputTextCallback", + "name": "callback" + }, + { + "type": "void*", + "name": "user_data" + } + ], + "defaults": { + "callback": "((void*)0)", + "user_data": "((void*)0)", + "flags": "0" + }, + "signature": "(const char*,char*,size_t,ImGuiInputTextFlags,ImGuiInputTextCallback,void*)", + "cimguiname": "igInputText" + } + ], + "igInputInt3": [ + { + "funcname": "InputInt3", + "args": "(const char* label,int v[3],ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,extra_flags)", + "argsoriginal": "(const char* label,int v[3],ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[3]", + "name": "v" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { "extra_flags": "0" }, + "signature": "(const char*,int[3],ImGuiInputTextFlags)", + "cimguiname": "igInputInt3" + } + ], + "ImGuiIO_ImGuiIO": [ + { + "funcname": "ImGuiIO", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiIO", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiIO_ImGuiIO" + } + ], + "igStyleColorsDark": [ + { + "funcname": "StyleColorsDark", + "args": "(ImGuiStyle* dst)", + "ret": "void", + "comment": "", + "call_args": "(dst)", + "argsoriginal": "(ImGuiStyle* dst=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiStyle*", + "name": "dst" + } + ], + "defaults": { "dst": "((void*)0)" }, + "signature": "(ImGuiStyle*)", + "cimguiname": "igStyleColorsDark" + } + ], + "igInputInt": [ + { + "funcname": "InputInt", + "args": "(const char* label,int* v,int step,int step_fast,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,step,step_fast,extra_flags)", + "argsoriginal": "(const char* label,int* v,int step=1,int step_fast=100,ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "v" + }, + { + "type": "int", + "name": "step" + }, + { + "type": "int", + "name": "step_fast" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "step": "1", + "extra_flags": "0", + "step_fast": "100" + }, + "signature": "(const char*,int*,int,int,ImGuiInputTextFlags)", + "cimguiname": "igInputInt" + } + ], + "igSetWindowFontScale": [ + { + "funcname": "SetWindowFontScale", + "args": "(float scale)", + "ret": "void", + "comment": "", + "call_args": "(scale)", + "argsoriginal": "(float scale)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "scale" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "igSetWindowFontScale" + } + ], + "igSliderInt": [ + { + "funcname": "SliderInt", + "args": "(const char* label,int* v,int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format)", + "argsoriginal": "(const char* label,int* v,int v_min,int v_max,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int*", + "name": "v" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { "format": "\"%d\"" }, + "signature": "(const char*,int*,int,int,const char*)", + "cimguiname": "igSliderInt" + } + ], + "TextRange_end": [ + { + "funcname": "end", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "TextRange", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "TextRange_end" + } + ], + "TextRange_begin": [ + { + "funcname": "begin", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "TextRange", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "TextRange_begin" + } + ], + "igSetNextWindowPos": [ + { + "funcname": "SetNextWindowPos", + "args": "(const ImVec2 pos,ImGuiCond cond,const ImVec2 pivot)", + "ret": "void", + "comment": "", + "call_args": "(pos,cond,pivot)", + "argsoriginal": "(const ImVec2& pos,ImGuiCond cond=0,const ImVec2& pivot=ImVec2(0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos" + }, + { + "type": "ImGuiCond", + "name": "cond" + }, + { + "type": "const ImVec2", + "name": "pivot" + } + ], + "defaults": { + "cond": "0", + "pivot": "ImVec2(0,0)" + }, + "signature": "(const ImVec2,ImGuiCond,const ImVec2)", + "cimguiname": "igSetNextWindowPos" + } + ], + "igDragInt3": [ + { + "funcname": "DragInt3", + "args": "(const char* label,int v[3],float v_speed,int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format)", + "argsoriginal": "(const char* label,int v[3],float v_speed=1.0f,int v_min=0,int v_max=0,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[3]", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0", + "format": "\"%d\"", + "v_max": "0" + }, + "signature": "(const char*,int[3],float,int,int,const char*)", + "cimguiname": "igDragInt3" + } + ], + "igOpenPopup": [ + { + "funcname": "OpenPopup", + "args": "(const char* str_id)", + "ret": "void", + "comment": "", + "call_args": "(str_id)", + "argsoriginal": "(const char* str_id)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igOpenPopup" + } + ], + "TextRange_TextRange": [ + { + "funcname": "TextRange", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "TextRange", + "argsT": [], + "comment": "", + "ov_cimguiname": "TextRange_TextRange", + "defaults": [], + "signature": "()", + "cimguiname": "TextRange_TextRange" + }, + { + "funcname": "TextRange", + "args": "(const char* _b,const char* _e)", + "call_args": "(_b,_e)", + "argsoriginal": "(const char* _b,const char* _e)", + "stname": "TextRange", + "argsT": [ + { + "type": "const char*", + "name": "_b" + }, + { + "type": "const char*", + "name": "_e" + } + ], + "comment": "", + "ov_cimguiname": "TextRange_TextRangeStr", + "defaults": [], + "signature": "(const char*,const char*)", + "cimguiname": "TextRange_TextRange" + } + ], + "ImDrawList_GetClipRectMax": [ + { + "funcname": "GetClipRectMax", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_GetClipRectMax" + }, + { + "funcname": "GetClipRectMax", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "ImDrawList_GetClipRectMax", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "signature": "()", + "ov_cimguiname": "ImDrawList_GetClipRectMax_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "ImDrawList_GetClipRectMax", + "funcname": "GetClipRectMax", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "retorig": "ImVec2", + "ov_cimguiname": "ImDrawList_GetClipRectMax_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igCalcTextSize": [ + { + "funcname": "CalcTextSize", + "args": "(const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width)", + "ret": "ImVec2", + "comment": "", + "call_args": "(text,text_end,hide_text_after_double_hash,wrap_width)", + "argsoriginal": "(const char* text,const char* text_end=((void*)0),bool hide_text_after_double_hash=false,float wrap_width=-1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "bool", + "name": "hide_text_after_double_hash" + }, + { + "type": "float", + "name": "wrap_width" + } + ], + "defaults": { + "text_end": "((void*)0)", + "wrap_width": "-1.0f", + "hide_text_after_double_hash": "false" + }, + "signature": "(const char*,const char*,bool,float)", + "cimguiname": "igCalcTextSize" + }, + { + "funcname": "CalcTextSize", + "args": "(ImVec2 *pOut,const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width)", + "ret": "void", + "cimguiname": "igCalcTextSize", + "nonUDT": 1, + "call_args": "(text,text_end,hide_text_after_double_hash,wrap_width)", + "argsoriginal": "(const char* text,const char* text_end=((void*)0),bool hide_text_after_double_hash=false,float wrap_width=-1.0f)", + "stname": "ImGui", + "signature": "(const char*,const char*,bool,float)", + "ov_cimguiname": "igCalcTextSize_nonUDT", + "comment": "", + "defaults": { + "text_end": "((void*)0)", + "wrap_width": "-1.0f", + "hide_text_after_double_hash": "false" + }, + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + }, + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "bool", + "name": "hide_text_after_double_hash" + }, + { + "type": "float", + "name": "wrap_width" + } + ] + }, + { + "cimguiname": "igCalcTextSize", + "funcname": "CalcTextSize", + "args": "(const char* text,const char* text_end,bool hide_text_after_double_hash,float wrap_width)", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "(const char*,const char*,bool,float)", + "call_args": "(text,text_end,hide_text_after_double_hash,wrap_width)", + "argsoriginal": "(const char* text,const char* text_end=((void*)0),bool hide_text_after_double_hash=false,float wrap_width=-1.0f)", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igCalcTextSize_nonUDT2", + "comment": "", + "defaults": { + "text_end": "((void*)0)", + "wrap_width": "-1.0f", + "hide_text_after_double_hash": "false" + }, + "argsT": [ + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + }, + { + "type": "bool", + "name": "hide_text_after_double_hash" + }, + { + "type": "float", + "name": "wrap_width" + } + ] + } + ], + "igGetDrawListSharedData": [ + { + "funcname": "GetDrawListSharedData", + "args": "()", + "ret": "ImDrawListSharedData*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetDrawListSharedData" + } + ], + "igColumns": [ + { + "funcname": "Columns", + "args": "(int count,const char* id,bool border)", + "ret": "void", + "comment": "", + "call_args": "(count,id,border)", + "argsoriginal": "(int count=1,const char* id=((void*)0),bool border=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "count" + }, + { + "type": "const char*", + "name": "id" + }, + { + "type": "bool", + "name": "border" + } + ], + "defaults": { + "border": "true", + "count": "1", + "id": "((void*)0)" + }, + "signature": "(int,const char*,bool)", + "cimguiname": "igColumns" + } + ], + "igIsItemActive": [ + { + "funcname": "IsItemActive", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsItemActive" + } + ], + "ImGuiTextFilter_ImGuiTextFilter": [ + { + "funcname": "ImGuiTextFilter", + "args": "(const char* default_filter)", + "call_args": "(default_filter)", + "argsoriginal": "(const char* default_filter=\"\")", + "stname": "ImGuiTextFilter", + "argsT": [ + { + "type": "const char*", + "name": "default_filter" + } + ], + "comment": "", + "defaults": { "default_filter": "\"\"" }, + "signature": "(const char*)", + "cimguiname": "ImGuiTextFilter_ImGuiTextFilter" + } + ], + "ImGuiOnceUponAFrame_ImGuiOnceUponAFrame": [ + { + "funcname": "ImGuiOnceUponAFrame", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiOnceUponAFrame", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiOnceUponAFrame_ImGuiOnceUponAFrame" + } + ], + "igBeginDragDropTarget": [ + { + "funcname": "BeginDragDropTarget", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igBeginDragDropTarget" + } + ], + "TextRange_empty": [ + { + "funcname": "empty", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "TextRange", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "TextRange_empty" + } + ], + "ImGuiPayload_IsDelivery": [ + { + "funcname": "IsDelivery", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiPayload", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiPayload_IsDelivery" + } + ], + "ImGuiIO_AddInputCharacter": [ + { + "funcname": "AddInputCharacter", + "args": "(ImWchar c)", + "ret": "void", + "comment": "", + "call_args": "(c)", + "argsoriginal": "(ImWchar c)", + "stname": "ImGuiIO", + "argsT": [ + { + "type": "ImWchar", + "name": "c" + } + ], + "defaults": [], + "signature": "(ImWchar)", + "cimguiname": "ImGuiIO_AddInputCharacter" + } + ], + "ImDrawList_AddImageRounded": [ + { + "funcname": "AddImageRounded", + "args": "(ImTextureID user_texture_id,const ImVec2 a,const ImVec2 b,const ImVec2 uv_a,const ImVec2 uv_b,ImU32 col,float rounding,int rounding_corners)", + "ret": "void", + "comment": "", + "call_args": "(user_texture_id,a,b,uv_a,uv_b,col,rounding,rounding_corners)", + "argsoriginal": "(ImTextureID user_texture_id,const ImVec2& a,const ImVec2& b,const ImVec2& uv_a,const ImVec2& uv_b,ImU32 col,float rounding,int rounding_corners=ImDrawCornerFlags_All)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImTextureID", + "name": "user_texture_id" + }, + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "uv_a" + }, + { + "type": "const ImVec2", + "name": "uv_b" + }, + { + "type": "ImU32", + "name": "col" + }, + { + "type": "float", + "name": "rounding" + }, + { + "type": "int", + "name": "rounding_corners" + } + ], + "defaults": { "rounding_corners": "ImDrawCornerFlags_All" }, + "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32,float,int)", + "cimguiname": "ImDrawList_AddImageRounded" + } + ], + "ImGuiStyle_ImGuiStyle": [ + { + "funcname": "ImGuiStyle", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiStyle", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiStyle_ImGuiStyle" + } + ], + "igColorPicker3": [ + { + "funcname": "ColorPicker3", + "args": "(const char* label,float col[3],ImGuiColorEditFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,col,flags)", + "argsoriginal": "(const char* label,float col[3],ImGuiColorEditFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[3]", + "name": "col" + }, + { + "type": "ImGuiColorEditFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(const char*,float[3],ImGuiColorEditFlags)", + "cimguiname": "igColorPicker3" + } + ], + "igGetContentRegionMax": [ + { + "funcname": "GetContentRegionMax", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetContentRegionMax" + }, + { + "funcname": "GetContentRegionMax", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetContentRegionMax", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetContentRegionMax_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetContentRegionMax", + "funcname": "GetContentRegionMax", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetContentRegionMax_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igBeginChildFrame": [ + { + "funcname": "BeginChildFrame", + "args": "(ImGuiID id,const ImVec2 size,ImGuiWindowFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(id,size,flags)", + "argsoriginal": "(ImGuiID id,const ImVec2& size,ImGuiWindowFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiID", + "name": "id" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "ImGuiWindowFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(ImGuiID,const ImVec2,ImGuiWindowFlags)", + "cimguiname": "igBeginChildFrame" + } + ], + "igSaveIniSettingsToDisk": [ + { + "funcname": "SaveIniSettingsToDisk", + "args": "(const char* ini_filename)", + "ret": "void", + "comment": "", + "call_args": "(ini_filename)", + "argsoriginal": "(const char* ini_filename)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "ini_filename" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igSaveIniSettingsToDisk" + } + ], + "ImFont_ClearOutputData": [ + { + "funcname": "ClearOutputData", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFont", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFont_ClearOutputData" + } + ], + "igGetClipboardText": [ + { + "funcname": "GetClipboardText", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetClipboardText" + } + ], + "ImDrawList_PrimQuadUV": [ + { + "funcname": "PrimQuadUV", + "args": "(const ImVec2 a,const ImVec2 b,const ImVec2 c,const ImVec2 d,const ImVec2 uv_a,const ImVec2 uv_b,const ImVec2 uv_c,const ImVec2 uv_d,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(a,b,c,d,uv_a,uv_b,uv_c,uv_d,col)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,const ImVec2& c,const ImVec2& d,const ImVec2& uv_a,const ImVec2& uv_b,const ImVec2& uv_c,const ImVec2& uv_d,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "c" + }, + { + "type": "const ImVec2", + "name": "d" + }, + { + "type": "const ImVec2", + "name": "uv_a" + }, + { + "type": "const ImVec2", + "name": "uv_b" + }, + { + "type": "const ImVec2", + "name": "uv_c" + }, + { + "type": "const ImVec2", + "name": "uv_d" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_PrimQuadUV" + } + ], + "igEndDragDropTarget": [ + { + "funcname": "EndDragDropTarget", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndDragDropTarget" + } + ], + "ImFontAtlas_GetGlyphRangesKorean": [ + { + "funcname": "GetGlyphRangesKorean", + "args": "()", + "ret": "const ImWchar*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_GetGlyphRangesKorean" + } + ], + "igGetKeyPressedAmount": [ + { + "funcname": "GetKeyPressedAmount", + "args": "(int key_index,float repeat_delay,float rate)", + "ret": "int", + "comment": "", + "call_args": "(key_index,repeat_delay,rate)", + "argsoriginal": "(int key_index,float repeat_delay,float rate)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "key_index" + }, + { + "type": "float", + "name": "repeat_delay" + }, + { + "type": "float", + "name": "rate" + } + ], + "defaults": [], + "signature": "(int,float,float)", + "cimguiname": "igGetKeyPressedAmount" + } + ], + "ImFontAtlas_GetTexDataAsRGBA32": [ + { + "funcname": "GetTexDataAsRGBA32", + "args": "(unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel)", + "ret": "void", + "comment": "", + "call_args": "(out_pixels,out_width,out_height,out_bytes_per_pixel)", + "argsoriginal": "(unsigned char** out_pixels,int* out_width,int* out_height,int* out_bytes_per_pixel=((void*)0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "unsigned char**", + "name": "out_pixels" + }, + { + "type": "int*", + "name": "out_width" + }, + { + "type": "int*", + "name": "out_height" + }, + { + "type": "int*", + "name": "out_bytes_per_pixel" + } + ], + "defaults": { "out_bytes_per_pixel": "((void*)0)" }, + "signature": "(unsigned char**,int*,int*,int*)", + "cimguiname": "ImFontAtlas_GetTexDataAsRGBA32" + } + ], + "igNewFrame": [ + { + "funcname": "NewFrame", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igNewFrame" + } + ], + "igResetMouseDragDelta": [ + { + "funcname": "ResetMouseDragDelta", + "args": "(int button)", + "ret": "void", + "comment": "", + "call_args": "(button)", + "argsoriginal": "(int button=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "button" + } + ], + "defaults": { "button": "0" }, + "signature": "(int)", + "cimguiname": "igResetMouseDragDelta" + } + ], + "igGetTreeNodeToLabelSpacing": [ + { + "funcname": "GetTreeNodeToLabelSpacing", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetTreeNodeToLabelSpacing" + } + ], + "igGetMousePos": [ + { + "funcname": "GetMousePos", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetMousePos" + }, + { + "funcname": "GetMousePos", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetMousePos", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetMousePos_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetMousePos", + "funcname": "GetMousePos", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetMousePos_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "GlyphRangesBuilder_AddChar": [ + { + "funcname": "AddChar", + "args": "(ImWchar c)", + "ret": "void", + "comment": "", + "call_args": "(c)", + "argsoriginal": "(ImWchar c)", + "stname": "GlyphRangesBuilder", + "argsT": [ + { + "type": "ImWchar", + "name": "c" + } + ], + "defaults": [], + "signature": "(ImWchar)", + "cimguiname": "GlyphRangesBuilder_AddChar" + } + ], + "igPopID": [ + { + "funcname": "PopID", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igPopID" + } + ], + "igIsMouseDoubleClicked": [ + { + "funcname": "IsMouseDoubleClicked", + "args": "(int button)", + "ret": "bool", + "comment": "", + "call_args": "(button)", + "argsoriginal": "(int button)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "button" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "igIsMouseDoubleClicked" + } + ], + "igStyleColorsClassic": [ + { + "funcname": "StyleColorsClassic", + "args": "(ImGuiStyle* dst)", + "ret": "void", + "comment": "", + "call_args": "(dst)", + "argsoriginal": "(ImGuiStyle* dst=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiStyle*", + "name": "dst" + } + ], + "defaults": { "dst": "((void*)0)" }, + "signature": "(ImGuiStyle*)", + "cimguiname": "igStyleColorsClassic" + } + ], + "ImGuiTextFilter_IsActive": [ + { + "funcname": "IsActive", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextFilter", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextFilter_IsActive" + } + ], + "ImDrawList_PathClear": [ + { + "funcname": "PathClear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_PathClear" + } + ], + "igSetWindowFocus": [ + { + "funcname": "SetWindowFocus", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "ov_cimguiname": "igSetWindowFocus", + "defaults": [], + "signature": "()", + "cimguiname": "igSetWindowFocus" + }, + { + "funcname": "SetWindowFocus", + "args": "(const char* name)", + "ret": "void", + "comment": "", + "call_args": "(name)", + "argsoriginal": "(const char* name)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "name" + } + ], + "ov_cimguiname": "igSetWindowFocusStr", + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igSetWindowFocus" + } + ], + "igColorConvertHSVtoRGB": [ + { + "funcname": "ColorConvertHSVtoRGB", + "args": "(float h,float s,float v,float out_r,float out_g,float out_b)", + "ret": "void", + "comment": "", + "call_args": "(h,s,v,out_r,out_g,out_b)", + "argsoriginal": "(float h,float s,float v,float& out_r,float& out_g,float& out_b)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "h" + }, + { + "type": "float", + "name": "s" + }, + { + "type": "float", + "name": "v" + }, + { + "type": "float&", + "name": "out_r" + }, + { + "type": "float&", + "name": "out_g" + }, + { + "type": "float&", + "name": "out_b" + } + ], + "defaults": [], + "signature": "(float,float,float,float,float,float)", + "cimguiname": "igColorConvertHSVtoRGB" + } + ], + "ImColor_ImColor": [ + { + "funcname": "ImColor", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImColor", + "argsT": [], + "comment": "", + "ov_cimguiname": "ImColor_ImColor", + "defaults": [], + "signature": "()", + "cimguiname": "ImColor_ImColor" + }, + { + "funcname": "ImColor", + "args": "(int r,int g,int b,int a)", + "call_args": "(r,g,b,a)", + "argsoriginal": "(int r,int g,int b,int a=255)", + "stname": "ImColor", + "argsT": [ + { + "type": "int", + "name": "r" + }, + { + "type": "int", + "name": "g" + }, + { + "type": "int", + "name": "b" + }, + { + "type": "int", + "name": "a" + } + ], + "comment": "", + "ov_cimguiname": "ImColor_ImColorInt", + "defaults": { "a": "255" }, + "signature": "(int,int,int,int)", + "cimguiname": "ImColor_ImColor" + }, + { + "funcname": "ImColor", + "args": "(ImU32 rgba)", + "call_args": "(rgba)", + "argsoriginal": "(ImU32 rgba)", + "stname": "ImColor", + "argsT": [ + { + "type": "ImU32", + "name": "rgba" + } + ], + "comment": "", + "ov_cimguiname": "ImColor_ImColorU32", + "defaults": [], + "signature": "(ImU32)", + "cimguiname": "ImColor_ImColor" + }, + { + "funcname": "ImColor", + "args": "(float r,float g,float b,float a)", + "call_args": "(r,g,b,a)", + "argsoriginal": "(float r,float g,float b,float a=1.0f)", + "stname": "ImColor", + "argsT": [ + { + "type": "float", + "name": "r" + }, + { + "type": "float", + "name": "g" + }, + { + "type": "float", + "name": "b" + }, + { + "type": "float", + "name": "a" + } + ], + "comment": "", + "ov_cimguiname": "ImColor_ImColorFloat", + "defaults": { "a": "1.0f" }, + "signature": "(float,float,float,float)", + "cimguiname": "ImColor_ImColor" + }, + { + "funcname": "ImColor", + "args": "(const ImVec4 col)", + "call_args": "(col)", + "argsoriginal": "(const ImVec4& col)", + "stname": "ImColor", + "argsT": [ + { + "type": "const ImVec4", + "name": "col" + } + ], + "comment": "", + "ov_cimguiname": "ImColor_ImColorVec4", + "defaults": [], + "signature": "(const ImVec4)", + "cimguiname": "ImColor_ImColor" + } + ], + "igVSliderFloat": [ + { + "funcname": "VSliderFloat", + "args": "(const char* label,const ImVec2 size,float* v,float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,size,v,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,const ImVec2& size,float* v,float v_min,float v_max,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "float*", + "name": "v" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,const ImVec2,float*,float,float,const char*,float)", + "cimguiname": "igVSliderFloat" + } + ], + "igColorConvertU32ToFloat4": [ + { + "funcname": "ColorConvertU32ToFloat4", + "args": "(ImU32 in)", + "ret": "ImVec4", + "comment": "", + "call_args": "(in)", + "argsoriginal": "(ImU32 in)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImU32", + "name": "in" + } + ], + "defaults": [], + "signature": "(ImU32)", + "cimguiname": "igColorConvertU32ToFloat4" + }, + { + "funcname": "ColorConvertU32ToFloat4", + "args": "(ImVec4 *pOut,ImU32 in)", + "ret": "void", + "cimguiname": "igColorConvertU32ToFloat4", + "nonUDT": 1, + "call_args": "(in)", + "argsoriginal": "(ImU32 in)", + "stname": "ImGui", + "signature": "(ImU32)", + "ov_cimguiname": "igColorConvertU32ToFloat4_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec4*", + "name": "pOut" + }, + { + "type": "ImU32", + "name": "in" + } + ] + }, + { + "cimguiname": "igColorConvertU32ToFloat4", + "funcname": "ColorConvertU32ToFloat4", + "args": "(ImU32 in)", + "ret": "ImVec4_Simple", + "nonUDT": 2, + "signature": "(ImU32)", + "call_args": "(in)", + "argsoriginal": "(ImU32 in)", + "stname": "ImGui", + "retorig": "ImVec4", + "ov_cimguiname": "igColorConvertU32ToFloat4_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImU32", + "name": "in" + } + ] + } + ], + "igPopTextWrapPos": [ + { + "funcname": "PopTextWrapPos", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igPopTextWrapPos" + } + ], + "ImGuiTextFilter_Clear": [ + { + "funcname": "Clear", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextFilter", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextFilter_Clear" + } + ], + "igGetStateStorage": [ + { + "funcname": "GetStateStorage", + "args": "()", + "ret": "ImGuiStorage*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetStateStorage" + } + ], + "igGetColumnWidth": [ + { + "funcname": "GetColumnWidth", + "args": "(int column_index)", + "ret": "float", + "comment": "", + "call_args": "(column_index)", + "argsoriginal": "(int column_index=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "column_index" + } + ], + "defaults": { "column_index": "-1" }, + "signature": "(int)", + "cimguiname": "igGetColumnWidth" + } + ], + "igEndMenuBar": [ + { + "funcname": "EndMenuBar", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndMenuBar" + } + ], + "igSetStateStorage": [ + { + "funcname": "SetStateStorage", + "args": "(ImGuiStorage* storage)", + "ret": "void", + "comment": "", + "call_args": "(storage)", + "argsoriginal": "(ImGuiStorage* storage)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiStorage*", + "name": "storage" + } + ], + "defaults": [], + "signature": "(ImGuiStorage*)", + "cimguiname": "igSetStateStorage" + } + ], + "igGetStyleColorName": [ + { + "funcname": "GetStyleColorName", + "args": "(ImGuiCol idx)", + "ret": "const char*", + "comment": "", + "call_args": "(idx)", + "argsoriginal": "(ImGuiCol idx)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiCol", + "name": "idx" + } + ], + "defaults": [], + "signature": "(ImGuiCol)", + "cimguiname": "igGetStyleColorName" + } + ], + "igIsMouseDragging": [ + { + "funcname": "IsMouseDragging", + "args": "(int button,float lock_threshold)", + "ret": "bool", + "comment": "", + "call_args": "(button,lock_threshold)", + "argsoriginal": "(int button=0,float lock_threshold=-1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "button" + }, + { + "type": "float", + "name": "lock_threshold" + } + ], + "defaults": { + "lock_threshold": "-1.0f", + "button": "0" + }, + "signature": "(int,float)", + "cimguiname": "igIsMouseDragging" + } + ], + "ImDrawList_PrimWriteIdx": [ + { + "funcname": "PrimWriteIdx", + "args": "(ImDrawIdx idx)", + "ret": "void", + "comment": "", + "call_args": "(idx)", + "argsoriginal": "(ImDrawIdx idx)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "ImDrawIdx", + "name": "idx" + } + ], + "defaults": [], + "signature": "(ImDrawIdx)", + "cimguiname": "ImDrawList_PrimWriteIdx" + } + ], + "ImGuiStyle_ScaleAllSizes": [ + { + "funcname": "ScaleAllSizes", + "args": "(float scale_factor)", + "ret": "void", + "comment": "", + "call_args": "(scale_factor)", + "argsoriginal": "(float scale_factor)", + "stname": "ImGuiStyle", + "argsT": [ + { + "type": "float", + "name": "scale_factor" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "ImGuiStyle_ScaleAllSizes" + } + ], + "igPushStyleColor": [ + { + "funcname": "PushStyleColor", + "args": "(ImGuiCol idx,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(idx,col)", + "argsoriginal": "(ImGuiCol idx,ImU32 col)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiCol", + "name": "idx" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "ov_cimguiname": "igPushStyleColorU32", + "defaults": [], + "signature": "(ImGuiCol,ImU32)", + "cimguiname": "igPushStyleColor" + }, + { + "funcname": "PushStyleColor", + "args": "(ImGuiCol idx,const ImVec4 col)", + "ret": "void", + "comment": "", + "call_args": "(idx,col)", + "argsoriginal": "(ImGuiCol idx,const ImVec4& col)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiCol", + "name": "idx" + }, + { + "type": "const ImVec4", + "name": "col" + } + ], + "ov_cimguiname": "igPushStyleColor", + "defaults": [], + "signature": "(ImGuiCol,const ImVec4)", + "cimguiname": "igPushStyleColor" + } + ], + "igMemAlloc": [ + { + "funcname": "MemAlloc", + "args": "(size_t size)", + "ret": "void*", + "comment": "", + "call_args": "(size)", + "argsoriginal": "(size_t size)", + "stname": "ImGui", + "argsT": [ + { + "type": "size_t", + "name": "size" + } + ], + "defaults": [], + "signature": "(size_t)", + "cimguiname": "igMemAlloc" + } + ], + "igSetCurrentContext": [ + { + "funcname": "SetCurrentContext", + "args": "(ImGuiContext* ctx)", + "ret": "void", + "comment": "", + "call_args": "(ctx)", + "argsoriginal": "(ImGuiContext* ctx)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiContext*", + "name": "ctx" + } + ], + "defaults": [], + "signature": "(ImGuiContext*)", + "cimguiname": "igSetCurrentContext" + } + ], + "igPushItemWidth": [ + { + "funcname": "PushItemWidth", + "args": "(float item_width)", + "ret": "void", + "comment": "", + "call_args": "(item_width)", + "argsoriginal": "(float item_width)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "item_width" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "igPushItemWidth" + } + ], + "igIsWindowAppearing": [ + { + "funcname": "IsWindowAppearing", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsWindowAppearing" + } + ], + "igGetStyle": [ + { + "funcname": "GetStyle", + "args": "()", + "ret": "ImGuiStyle*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "retref": "&", + "defaults": [], + "signature": "()", + "cimguiname": "igGetStyle" + } + ], + "igSetItemAllowOverlap": [ + { + "funcname": "SetItemAllowOverlap", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igSetItemAllowOverlap" + } + ], + "igEndChild": [ + { + "funcname": "EndChild", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndChild" + } + ], + "igCollapsingHeader": [ + { + "funcname": "CollapsingHeader", + "args": "(const char* label,ImGuiTreeNodeFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,flags)", + "argsoriginal": "(const char* label,ImGuiTreeNodeFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiTreeNodeFlags", + "name": "flags" + } + ], + "ov_cimguiname": "igCollapsingHeader", + "defaults": { "flags": "0" }, + "signature": "(const char*,ImGuiTreeNodeFlags)", + "cimguiname": "igCollapsingHeader" + }, + { + "funcname": "CollapsingHeader", + "args": "(const char* label,bool* p_open,ImGuiTreeNodeFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,p_open,flags)", + "argsoriginal": "(const char* label,bool* p_open,ImGuiTreeNodeFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "bool*", + "name": "p_open" + }, + { + "type": "ImGuiTreeNodeFlags", + "name": "flags" + } + ], + "ov_cimguiname": "igCollapsingHeaderBoolPtr", + "defaults": { "flags": "0" }, + "signature": "(const char*,bool*,ImGuiTreeNodeFlags)", + "cimguiname": "igCollapsingHeader" + } + ], + "igTextDisabledV": [ + { + "funcname": "TextDisabledV", + "args": "(const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(fmt,args)", + "argsoriginal": "(const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const char*,va_list)", + "cimguiname": "igTextDisabledV" + } + ], + "igDragFloatRange2": [ + { + "funcname": "DragFloatRange2", + "args": "(const char* label,float* v_current_min,float* v_current_max,float v_speed,float v_min,float v_max,const char* format,const char* format_max,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v_current_min,v_current_max,v_speed,v_min,v_max,format,format_max,power)", + "argsoriginal": "(const char* label,float* v_current_min,float* v_current_max,float v_speed=1.0f,float v_min=0.0f,float v_max=0.0f,const char* format=\"%.3f\",const char* format_max=((void*)0),float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float*", + "name": "v_current_min" + }, + { + "type": "float*", + "name": "v_current_max" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "const char*", + "name": "format_max" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0.0f", + "power": "1.0f", + "format_max": "((void*)0)", + "v_max": "0.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float*,float*,float,float,float,const char*,const char*,float)", + "cimguiname": "igDragFloatRange2" + } + ], + "igSetMouseCursor": [ + { + "funcname": "SetMouseCursor", + "args": "(ImGuiMouseCursor type)", + "ret": "void", + "comment": "", + "call_args": "(type)", + "argsoriginal": "(ImGuiMouseCursor type)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiMouseCursor", + "name": "type" + } + ], + "defaults": [], + "signature": "(ImGuiMouseCursor)", + "cimguiname": "igSetMouseCursor" + } + ], + "igGetWindowContentRegionMax": [ + { + "funcname": "GetWindowContentRegionMax", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowContentRegionMax" + }, + { + "funcname": "GetWindowContentRegionMax", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetWindowContentRegionMax", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetWindowContentRegionMax_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetWindowContentRegionMax", + "funcname": "GetWindowContentRegionMax", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetWindowContentRegionMax_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igInputScalar": [ + { + "funcname": "InputScalar", + "args": "(const char* label,ImGuiDataType data_type,void* v,const void* step,const void* step_fast,const char* format,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,data_type,v,step,step_fast,format,extra_flags)", + "argsoriginal": "(const char* label,ImGuiDataType data_type,void* v,const void* step=((void*)0),const void* step_fast=((void*)0),const char* format=((void*)0),ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiDataType", + "name": "data_type" + }, + { + "type": "void*", + "name": "v" + }, + { + "type": "const void*", + "name": "step" + }, + { + "type": "const void*", + "name": "step_fast" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "step": "((void*)0)", + "format": "((void*)0)", + "step_fast": "((void*)0)", + "extra_flags": "0" + }, + "signature": "(const char*,ImGuiDataType,void*,const void*,const void*,const char*,ImGuiInputTextFlags)", + "cimguiname": "igInputScalar" + } + ], + "ImDrawList_PushClipRectFullScreen": [ + { + "funcname": "PushClipRectFullScreen", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_PushClipRectFullScreen" + } + ], + "igGetColorU32": [ + { + "funcname": "GetColorU32", + "args": "(ImGuiCol idx,float alpha_mul)", + "ret": "ImU32", + "comment": "", + "call_args": "(idx,alpha_mul)", + "argsoriginal": "(ImGuiCol idx,float alpha_mul=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiCol", + "name": "idx" + }, + { + "type": "float", + "name": "alpha_mul" + } + ], + "ov_cimguiname": "igGetColorU32", + "defaults": { "alpha_mul": "1.0f" }, + "signature": "(ImGuiCol,float)", + "cimguiname": "igGetColorU32" + }, + { + "funcname": "GetColorU32", + "args": "(const ImVec4 col)", + "ret": "ImU32", + "comment": "", + "call_args": "(col)", + "argsoriginal": "(const ImVec4& col)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec4", + "name": "col" + } + ], + "ov_cimguiname": "igGetColorU32Vec4", + "defaults": [], + "signature": "(const ImVec4)", + "cimguiname": "igGetColorU32" + }, + { + "funcname": "GetColorU32", + "args": "(ImU32 col)", + "ret": "ImU32", + "comment": "", + "call_args": "(col)", + "argsoriginal": "(ImU32 col)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImU32", + "name": "col" + } + ], + "ov_cimguiname": "igGetColorU32U32", + "defaults": [], + "signature": "(ImU32)", + "cimguiname": "igGetColorU32" + } + ], + "igGetTime": [ + { + "funcname": "GetTime", + "args": "()", + "ret": "double", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetTime" + } + ], + "ImDrawList_ChannelsMerge": [ + { + "funcname": "ChannelsMerge", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawList", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawList_ChannelsMerge" + } + ], + "igGetColumnIndex": [ + { + "funcname": "GetColumnIndex", + "args": "()", + "ret": "int", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetColumnIndex" + } + ], + "igBeginPopupContextItem": [ + { + "funcname": "BeginPopupContextItem", + "args": "(const char* str_id,int mouse_button)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,mouse_button)", + "argsoriginal": "(const char* str_id=((void*)0),int mouse_button=1)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "int", + "name": "mouse_button" + } + ], + "defaults": { + "mouse_button": "1", + "str_id": "((void*)0)" + }, + "signature": "(const char*,int)", + "cimguiname": "igBeginPopupContextItem" + } + ], + "igSetCursorPosX": [ + { + "funcname": "SetCursorPosX", + "args": "(float x)", + "ret": "void", + "comment": "", + "call_args": "(x)", + "argsoriginal": "(float x)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "x" + } + ], + "defaults": [], + "signature": "(float)", + "cimguiname": "igSetCursorPosX" + } + ], + "igGetItemRectSize": [ + { + "funcname": "GetItemRectSize", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetItemRectSize" + }, + { + "funcname": "GetItemRectSize", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetItemRectSize", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetItemRectSize_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetItemRectSize", + "funcname": "GetItemRectSize", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetItemRectSize_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igArrowButton": [ + { + "funcname": "ArrowButton", + "args": "(const char* str_id,ImGuiDir dir)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,dir)", + "argsoriginal": "(const char* str_id,ImGuiDir dir)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "ImGuiDir", + "name": "dir" + } + ], + "defaults": [], + "signature": "(const char*,ImGuiDir)", + "cimguiname": "igArrowButton" + } + ], + "igGetMouseCursor": [ + { + "funcname": "GetMouseCursor", + "args": "()", + "ret": "ImGuiMouseCursor", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetMouseCursor" + } + ], + "igPushAllowKeyboardFocus": [ + { + "funcname": "PushAllowKeyboardFocus", + "args": "(bool allow_keyboard_focus)", + "ret": "void", + "comment": "", + "call_args": "(allow_keyboard_focus)", + "argsoriginal": "(bool allow_keyboard_focus)", + "stname": "ImGui", + "argsT": [ + { + "type": "bool", + "name": "allow_keyboard_focus" + } + ], + "defaults": [], + "signature": "(bool)", + "cimguiname": "igPushAllowKeyboardFocus" + } + ], + "igGetScrollY": [ + { + "funcname": "GetScrollY", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetScrollY" + } + ], + "igSetColumnOffset": [ + { + "funcname": "SetColumnOffset", + "args": "(int column_index,float offset_x)", + "ret": "void", + "comment": "", + "call_args": "(column_index,offset_x)", + "argsoriginal": "(int column_index,float offset_x)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "column_index" + }, + { + "type": "float", + "name": "offset_x" + } + ], + "defaults": [], + "signature": "(int,float)", + "cimguiname": "igSetColumnOffset" + } + ], + "ImGuiTextBuffer_begin": [ + { + "funcname": "begin", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextBuffer", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextBuffer_begin" + } + ], + "igSetWindowPos": [ + { + "funcname": "SetWindowPos", + "args": "(const ImVec2 pos,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(pos,cond)", + "argsoriginal": "(const ImVec2& pos,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "ov_cimguiname": "igSetWindowPosVec2", + "defaults": { "cond": "0" }, + "signature": "(const ImVec2,ImGuiCond)", + "cimguiname": "igSetWindowPos" + }, + { + "funcname": "SetWindowPos", + "args": "(const char* name,const ImVec2 pos,ImGuiCond cond)", + "ret": "void", + "comment": "", + "call_args": "(name,pos,cond)", + "argsoriginal": "(const char* name,const ImVec2& pos,ImGuiCond cond=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "name" + }, + { + "type": "const ImVec2", + "name": "pos" + }, + { + "type": "ImGuiCond", + "name": "cond" + } + ], + "ov_cimguiname": "igSetWindowPosStr", + "defaults": { "cond": "0" }, + "signature": "(const char*,const ImVec2,ImGuiCond)", + "cimguiname": "igSetWindowPos" + } + ], + "igSetKeyboardFocusHere": [ + { + "funcname": "SetKeyboardFocusHere", + "args": "(int offset)", + "ret": "void", + "comment": "", + "call_args": "(offset)", + "argsoriginal": "(int offset=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "offset" + } + ], + "defaults": { "offset": "0" }, + "signature": "(int)", + "cimguiname": "igSetKeyboardFocusHere" + } + ], + "igGetCursorPosY": [ + { + "funcname": "GetCursorPosY", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetCursorPosY" + } + ], + "ImFontAtlas_AddCustomRectFontGlyph": [ + { + "funcname": "AddCustomRectFontGlyph", + "args": "(ImFont* font,ImWchar id,int width,int height,float advance_x,const ImVec2 offset)", + "ret": "int", + "comment": "", + "call_args": "(font,id,width,height,advance_x,offset)", + "argsoriginal": "(ImFont* font,ImWchar id,int width,int height,float advance_x,const ImVec2& offset=ImVec2(0,0))", + "stname": "ImFontAtlas", + "argsT": [ + { + "type": "ImFont*", + "name": "font" + }, + { + "type": "ImWchar", + "name": "id" + }, + { + "type": "int", + "name": "width" + }, + { + "type": "int", + "name": "height" + }, + { + "type": "float", + "name": "advance_x" + }, + { + "type": "const ImVec2", + "name": "offset" + } + ], + "defaults": { "offset": "ImVec2(0,0)" }, + "signature": "(ImFont*,ImWchar,int,int,float,const ImVec2)", + "cimguiname": "ImFontAtlas_AddCustomRectFontGlyph" + } + ], + "igEndMainMenuBar": [ + { + "funcname": "EndMainMenuBar", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEndMainMenuBar" + } + ], + "igBulletTextV": [ + { + "funcname": "BulletTextV", + "args": "(const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(fmt,args)", + "argsoriginal": "(const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const char*,va_list)", + "cimguiname": "igBulletTextV" + } + ], + "igGetContentRegionAvailWidth": [ + { + "funcname": "GetContentRegionAvailWidth", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetContentRegionAvailWidth" + } + ], + "igTextV": [ + { + "funcname": "TextV", + "args": "(const char* fmt,va_list args)", + "ret": "void", + "comment": "", + "call_args": "(fmt,args)", + "argsoriginal": "(const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "defaults": [], + "signature": "(const char*,va_list)", + "cimguiname": "igTextV" + } + ], + "igIsKeyDown": [ + { + "funcname": "IsKeyDown", + "args": "(int user_key_index)", + "ret": "bool", + "comment": "", + "call_args": "(user_key_index)", + "argsoriginal": "(int user_key_index)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "user_key_index" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "igIsKeyDown" + } + ], + "igIsMouseDown": [ + { + "funcname": "IsMouseDown", + "args": "(int button)", + "ret": "bool", + "comment": "", + "call_args": "(button)", + "argsoriginal": "(int button)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "button" + } + ], + "defaults": [], + "signature": "(int)", + "cimguiname": "igIsMouseDown" + } + ], + "igGetWindowContentRegionMin": [ + { + "funcname": "GetWindowContentRegionMin", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowContentRegionMin" + }, + { + "funcname": "GetWindowContentRegionMin", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetWindowContentRegionMin", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetWindowContentRegionMin_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetWindowContentRegionMin", + "funcname": "GetWindowContentRegionMin", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetWindowContentRegionMin_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igLogButtons": [ + { + "funcname": "LogButtons", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igLogButtons" + } + ], + "igGetWindowContentRegionWidth": [ + { + "funcname": "GetWindowContentRegionWidth", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowContentRegionWidth" + } + ], + "igSliderAngle": [ + { + "funcname": "SliderAngle", + "args": "(const char* label,float* v_rad,float v_degrees_min,float v_degrees_max)", + "ret": "bool", + "comment": "", + "call_args": "(label,v_rad,v_degrees_min,v_degrees_max)", + "argsoriginal": "(const char* label,float* v_rad,float v_degrees_min=-360.0f,float v_degrees_max=+360.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float*", + "name": "v_rad" + }, + { + "type": "float", + "name": "v_degrees_min" + }, + { + "type": "float", + "name": "v_degrees_max" + } + ], + "defaults": { + "v_degrees_min": "-360.0f", + "v_degrees_max": "+360.0f" + }, + "signature": "(const char*,float*,float,float)", + "cimguiname": "igSliderAngle" + } + ], + "igTreeNodeEx": [ + { + "funcname": "TreeNodeEx", + "args": "(const char* label,ImGuiTreeNodeFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,flags)", + "argsoriginal": "(const char* label,ImGuiTreeNodeFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiTreeNodeFlags", + "name": "flags" + } + ], + "ov_cimguiname": "igTreeNodeExStr", + "defaults": { "flags": "0" }, + "signature": "(const char*,ImGuiTreeNodeFlags)", + "cimguiname": "igTreeNodeEx" + }, + { + "isvararg": "...)", + "funcname": "TreeNodeEx", + "args": "(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,...)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,flags,fmt,...)", + "argsoriginal": "(const char* str_id,ImGuiTreeNodeFlags flags,const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "ImGuiTreeNodeFlags", + "name": "flags" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "ov_cimguiname": "igTreeNodeExStrStr", + "defaults": [], + "signature": "(const char*,ImGuiTreeNodeFlags,const char*,...)", + "cimguiname": "igTreeNodeEx" + }, + { + "isvararg": "...)", + "funcname": "TreeNodeEx", + "args": "(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,...)", + "ret": "bool", + "comment": "", + "call_args": "(ptr_id,flags,fmt,...)", + "argsoriginal": "(const void* ptr_id,ImGuiTreeNodeFlags flags,const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const void*", + "name": "ptr_id" + }, + { + "type": "ImGuiTreeNodeFlags", + "name": "flags" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "ov_cimguiname": "igTreeNodeExPtr", + "defaults": [], + "signature": "(const void*,ImGuiTreeNodeFlags,const char*,...)", + "cimguiname": "igTreeNodeEx" + } + ], + "igGetWindowWidth": [ + { + "funcname": "GetWindowWidth", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetWindowWidth" + } + ], + "igPushTextWrapPos": [ + { + "funcname": "PushTextWrapPos", + "args": "(float wrap_pos_x)", + "ret": "void", + "comment": "", + "call_args": "(wrap_pos_x)", + "argsoriginal": "(float wrap_pos_x=0.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "float", + "name": "wrap_pos_x" + } + ], + "defaults": { "wrap_pos_x": "0.0f" }, + "signature": "(float)", + "cimguiname": "igPushTextWrapPos" + } + ], + "ImGuiStorage_GetInt": [ + { + "funcname": "GetInt", + "args": "(ImGuiID key,int default_val)", + "ret": "int", + "comment": "", + "call_args": "(key,default_val)", + "argsoriginal": "(ImGuiID key,int default_val=0)", + "stname": "ImGuiStorage", + "argsT": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "int", + "name": "default_val" + } + ], + "defaults": { "default_val": "0" }, + "signature": "(ImGuiID,int)", + "cimguiname": "ImGuiStorage_GetInt" + } + ], + "igSliderInt3": [ + { + "funcname": "SliderInt3", + "args": "(const char* label,int v[3],int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_min,v_max,format)", + "argsoriginal": "(const char* label,int v[3],int v_min,int v_max,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[3]", + "name": "v" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { "format": "\"%d\"" }, + "signature": "(const char*,int[3],int,int,const char*)", + "cimguiname": "igSliderInt3" + } + ], + "igShowUserGuide": [ + { + "funcname": "ShowUserGuide", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igShowUserGuide" + } + ], + "igSliderScalarN": [ + { + "funcname": "SliderScalarN", + "args": "(const char* label,ImGuiDataType data_type,void* v,int components,const void* v_min,const void* v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,data_type,v,components,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,ImGuiDataType data_type,void* v,int components,const void* v_min,const void* v_max,const char* format=((void*)0),float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiDataType", + "name": "data_type" + }, + { + "type": "void*", + "name": "v" + }, + { + "type": "int", + "name": "components" + }, + { + "type": "const void*", + "name": "v_min" + }, + { + "type": "const void*", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "power": "1.0f", + "format": "((void*)0)" + }, + "signature": "(const char*,ImGuiDataType,void*,int,const void*,const void*,const char*,float)", + "cimguiname": "igSliderScalarN" + } + ], + "ImColor_HSV": [ + { + "funcname": "HSV", + "args": "(float h,float s,float v,float a)", + "ret": "ImColor", + "comment": "", + "call_args": "(h,s,v,a)", + "argsoriginal": "(float h,float s,float v,float a=1.0f)", + "stname": "ImColor", + "argsT": [ + { + "type": "float", + "name": "h" + }, + { + "type": "float", + "name": "s" + }, + { + "type": "float", + "name": "v" + }, + { + "type": "float", + "name": "a" + } + ], + "defaults": { "a": "1.0f" }, + "signature": "(float,float,float,float)", + "cimguiname": "ImColor_HSV" + }, + { + "funcname": "HSV", + "args": "(ImColor *pOut,float h,float s,float v,float a)", + "ret": "void", + "cimguiname": "ImColor_HSV", + "nonUDT": 1, + "call_args": "(h,s,v,a)", + "argsoriginal": "(float h,float s,float v,float a=1.0f)", + "stname": "ImColor", + "signature": "(float,float,float,float)", + "ov_cimguiname": "ImColor_HSV_nonUDT", + "comment": "", + "defaults": { "a": "1.0f" }, + "argsT": [ + { + "type": "ImColor*", + "name": "pOut" + }, + { + "type": "float", + "name": "h" + }, + { + "type": "float", + "name": "s" + }, + { + "type": "float", + "name": "v" + }, + { + "type": "float", + "name": "a" + } + ] + }, + { + "cimguiname": "ImColor_HSV", + "funcname": "HSV", + "args": "(float h,float s,float v,float a)", + "ret": "ImColor_Simple", + "nonUDT": 2, + "signature": "(float,float,float,float)", + "call_args": "(h,s,v,a)", + "argsoriginal": "(float h,float s,float v,float a=1.0f)", + "stname": "ImColor", + "retorig": "ImColor", + "ov_cimguiname": "ImColor_HSV_nonUDT2", + "comment": "", + "defaults": { "a": "1.0f" }, + "argsT": [ + { + "type": "float", + "name": "h" + }, + { + "type": "float", + "name": "s" + }, + { + "type": "float", + "name": "v" + }, + { + "type": "float", + "name": "a" + } + ] + } + ], + "ImDrawList_PathLineTo": [ + { + "funcname": "PathLineTo", + "args": "(const ImVec2 pos)", + "ret": "void", + "comment": "", + "call_args": "(pos)", + "argsoriginal": "(const ImVec2& pos)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "pos" + } + ], + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "ImDrawList_PathLineTo" + } + ], + "igImage": [ + { + "funcname": "Image", + "args": "(ImTextureID user_texture_id,const ImVec2 size,const ImVec2 uv0,const ImVec2 uv1,const ImVec4 tint_col,const ImVec4 border_col)", + "ret": "void", + "comment": "", + "call_args": "(user_texture_id,size,uv0,uv1,tint_col,border_col)", + "argsoriginal": "(ImTextureID user_texture_id,const ImVec2& size,const ImVec2& uv0=ImVec2(0,0),const ImVec2& uv1=ImVec2(1,1),const ImVec4& tint_col=ImVec4(1,1,1,1),const ImVec4& border_col=ImVec4(0,0,0,0))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImTextureID", + "name": "user_texture_id" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "const ImVec2", + "name": "uv0" + }, + { + "type": "const ImVec2", + "name": "uv1" + }, + { + "type": "const ImVec4", + "name": "tint_col" + }, + { + "type": "const ImVec4", + "name": "border_col" + } + ], + "defaults": { + "uv1": "ImVec2(1,1)", + "tint_col": "ImVec4(1,1,1,1)", + "uv0": "ImVec2(0,0)", + "border_col": "ImVec4(0,0,0,0)" + }, + "signature": "(ImTextureID,const ImVec2,const ImVec2,const ImVec2,const ImVec4,const ImVec4)", + "cimguiname": "igImage" + } + ], + "igSetNextWindowSizeConstraints": [ + { + "funcname": "SetNextWindowSizeConstraints", + "args": "(const ImVec2 size_min,const ImVec2 size_max,ImGuiSizeCallback custom_callback,void* custom_callback_data)", + "ret": "void", + "comment": "", + "call_args": "(size_min,size_max,custom_callback,custom_callback_data)", + "argsoriginal": "(const ImVec2& size_min,const ImVec2& size_max,ImGuiSizeCallback custom_callback=((void*)0),void* custom_callback_data=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "size_min" + }, + { + "type": "const ImVec2", + "name": "size_max" + }, + { + "type": "ImGuiSizeCallback", + "name": "custom_callback" + }, + { + "type": "void*", + "name": "custom_callback_data" + } + ], + "defaults": { + "custom_callback": "((void*)0)", + "custom_callback_data": "((void*)0)" + }, + "signature": "(const ImVec2,const ImVec2,ImGuiSizeCallback,void*)", + "cimguiname": "igSetNextWindowSizeConstraints" + } + ], + "igDummy": [ + { + "funcname": "Dummy", + "args": "(const ImVec2 size)", + "ret": "void", + "comment": "", + "call_args": "(size)", + "argsoriginal": "(const ImVec2& size)", + "stname": "ImGui", + "argsT": [ + { + "type": "const ImVec2", + "name": "size" + } + ], + "defaults": [], + "signature": "(const ImVec2)", + "cimguiname": "igDummy" + } + ], + "igVSliderInt": [ + { + "funcname": "VSliderInt", + "args": "(const char* label,const ImVec2 size,int* v,int v_min,int v_max,const char* format)", + "ret": "bool", + "comment": "", + "call_args": "(label,size,v,v_min,v_max,format)", + "argsoriginal": "(const char* label,const ImVec2& size,int* v,int v_min,int v_max,const char* format=\"%d\")", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "const ImVec2", + "name": "size" + }, + { + "type": "int*", + "name": "v" + }, + { + "type": "int", + "name": "v_min" + }, + { + "type": "int", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + } + ], + "defaults": { "format": "\"%d\"" }, + "signature": "(const char*,const ImVec2,int*,int,int,const char*)", + "cimguiname": "igVSliderInt" + } + ], + "ImGuiTextBuffer_ImGuiTextBuffer": [ + { + "funcname": "ImGuiTextBuffer", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextBuffer", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextBuffer_ImGuiTextBuffer" + } + ], + "igBulletText": [ + { + "isvararg": "...)", + "funcname": "BulletText", + "args": "(const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(fmt,...)", + "argsoriginal": "(const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,...)", + "cimguiname": "igBulletText" + } + ], + "igColorEdit4": [ + { + "funcname": "ColorEdit4", + "args": "(const char* label,float col[4],ImGuiColorEditFlags flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,col,flags)", + "argsoriginal": "(const char* label,float col[4],ImGuiColorEditFlags flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[4]", + "name": "col" + }, + { + "type": "ImGuiColorEditFlags", + "name": "flags" + } + ], + "defaults": { "flags": "0" }, + "signature": "(const char*,float[4],ImGuiColorEditFlags)", + "cimguiname": "igColorEdit4" + } + ], + "igColorPicker4": [ + { + "funcname": "ColorPicker4", + "args": "(const char* label,float col[4],ImGuiColorEditFlags flags,const float* ref_col)", + "ret": "bool", + "comment": "", + "call_args": "(label,col,flags,ref_col)", + "argsoriginal": "(const char* label,float col[4],ImGuiColorEditFlags flags=0,const float* ref_col=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[4]", + "name": "col" + }, + { + "type": "ImGuiColorEditFlags", + "name": "flags" + }, + { + "type": "const float*", + "name": "ref_col" + } + ], + "defaults": { + "ref_col": "((void*)0)", + "flags": "0" + }, + "signature": "(const char*,float[4],ImGuiColorEditFlags,const float*)", + "cimguiname": "igColorPicker4" + } + ], + "ImDrawList_PrimRectUV": [ + { + "funcname": "PrimRectUV", + "args": "(const ImVec2 a,const ImVec2 b,const ImVec2 uv_a,const ImVec2 uv_b,ImU32 col)", + "ret": "void", + "comment": "", + "call_args": "(a,b,uv_a,uv_b,col)", + "argsoriginal": "(const ImVec2& a,const ImVec2& b,const ImVec2& uv_a,const ImVec2& uv_b,ImU32 col)", + "stname": "ImDrawList", + "argsT": [ + { + "type": "const ImVec2", + "name": "a" + }, + { + "type": "const ImVec2", + "name": "b" + }, + { + "type": "const ImVec2", + "name": "uv_a" + }, + { + "type": "const ImVec2", + "name": "uv_b" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "defaults": [], + "signature": "(const ImVec2,const ImVec2,const ImVec2,const ImVec2,ImU32)", + "cimguiname": "ImDrawList_PrimRectUV" + } + ], + "igInvisibleButton": [ + { + "funcname": "InvisibleButton", + "args": "(const char* str_id,const ImVec2 size)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,size)", + "argsoriginal": "(const char* str_id,const ImVec2& size)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "const ImVec2", + "name": "size" + } + ], + "defaults": [], + "signature": "(const char*,const ImVec2)", + "cimguiname": "igInvisibleButton" + } + ], + "igLogToClipboard": [ + { + "funcname": "LogToClipboard", + "args": "(int max_depth)", + "ret": "void", + "comment": "", + "call_args": "(max_depth)", + "argsoriginal": "(int max_depth=-1)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "max_depth" + } + ], + "defaults": { "max_depth": "-1" }, + "signature": "(int)", + "cimguiname": "igLogToClipboard" + } + ], + "igBeginPopupContextWindow": [ + { + "funcname": "BeginPopupContextWindow", + "args": "(const char* str_id,int mouse_button,bool also_over_items)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,mouse_button,also_over_items)", + "argsoriginal": "(const char* str_id=((void*)0),int mouse_button=1,bool also_over_items=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "int", + "name": "mouse_button" + }, + { + "type": "bool", + "name": "also_over_items" + } + ], + "defaults": { + "str_id": "((void*)0)", + "mouse_button": "1", + "also_over_items": "true" + }, + "signature": "(const char*,int,bool)", + "cimguiname": "igBeginPopupContextWindow" + } + ], + "ImFontAtlas_ImFontAtlas": [ + { + "funcname": "ImFontAtlas", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImFontAtlas", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImFontAtlas_ImFontAtlas" + } + ], + "igDragScalar": [ + { + "funcname": "DragScalar", + "args": "(const char* label,ImGuiDataType data_type,void* v,float v_speed,const void* v_min,const void* v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,data_type,v,v_speed,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,ImGuiDataType data_type,void* v,float v_speed,const void* v_min=((void*)0),const void* v_max=((void*)0),const char* format=((void*)0),float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiDataType", + "name": "data_type" + }, + { + "type": "void*", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "const void*", + "name": "v_min" + }, + { + "type": "const void*", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "v_max": "((void*)0)", + "v_min": "((void*)0)", + "format": "((void*)0)", + "power": "1.0f" + }, + "signature": "(const char*,ImGuiDataType,void*,float,const void*,const void*,const char*,float)", + "cimguiname": "igDragScalar" + } + ], + "igSetItemDefaultFocus": [ + { + "funcname": "SetItemDefaultFocus", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igSetItemDefaultFocus" + } + ], + "igCaptureMouseFromApp": [ + { + "funcname": "CaptureMouseFromApp", + "args": "(bool capture)", + "ret": "void", + "comment": "", + "call_args": "(capture)", + "argsoriginal": "(bool capture=true)", + "stname": "ImGui", + "argsT": [ + { + "type": "bool", + "name": "capture" + } + ], + "defaults": { "capture": "true" }, + "signature": "(bool)", + "cimguiname": "igCaptureMouseFromApp" + } + ], + "igIsAnyItemHovered": [ + { + "funcname": "IsAnyItemHovered", + "args": "()", + "ret": "bool", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igIsAnyItemHovered" + } + ], + "igPushFont": [ + { + "funcname": "PushFont", + "args": "(ImFont* font)", + "ret": "void", + "comment": "", + "call_args": "(font)", + "argsoriginal": "(ImFont* font)", + "stname": "ImGui", + "argsT": [ + { + "type": "ImFont*", + "name": "font" + } + ], + "defaults": [], + "signature": "(ImFont*)", + "cimguiname": "igPushFont" + } + ], + "igInputInt2": [ + { + "funcname": "InputInt2", + "args": "(const char* label,int v[2],ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,extra_flags)", + "argsoriginal": "(const char* label,int v[2],ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "int[2]", + "name": "v" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { "extra_flags": "0" }, + "signature": "(const char*,int[2],ImGuiInputTextFlags)", + "cimguiname": "igInputInt2" + } + ], + "igTreePop": [ + { + "funcname": "TreePop", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igTreePop" + } + ], + "igEnd": [ + { + "funcname": "End", + "args": "()", + "ret": "void", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igEnd" + } + ], + "ImDrawData_ImDrawData": [ + { + "funcname": "ImDrawData", + "args": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImDrawData", + "argsT": [], + "comment": "", + "defaults": [], + "signature": "()", + "cimguiname": "ImDrawData_ImDrawData" + } + ], + "igDestroyContext": [ + { + "funcname": "DestroyContext", + "args": "(ImGuiContext* ctx)", + "ret": "void", + "comment": "", + "call_args": "(ctx)", + "argsoriginal": "(ImGuiContext* ctx=((void*)0))", + "stname": "ImGui", + "argsT": [ + { + "type": "ImGuiContext*", + "name": "ctx" + } + ], + "defaults": { "ctx": "((void*)0)" }, + "signature": "(ImGuiContext*)", + "cimguiname": "igDestroyContext" + } + ], + "ImGuiTextBuffer_end": [ + { + "funcname": "end", + "args": "()", + "ret": "const char*", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGuiTextBuffer", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "ImGuiTextBuffer_end" + } + ], + "igPopStyleVar": [ + { + "funcname": "PopStyleVar", + "args": "(int count)", + "ret": "void", + "comment": "", + "call_args": "(count)", + "argsoriginal": "(int count=1)", + "stname": "ImGui", + "argsT": [ + { + "type": "int", + "name": "count" + } + ], + "defaults": { "count": "1" }, + "signature": "(int)", + "cimguiname": "igPopStyleVar" + } + ], + "ImGuiTextFilter_PassFilter": [ + { + "funcname": "PassFilter", + "args": "(const char* text,const char* text_end)", + "ret": "bool", + "comment": "", + "call_args": "(text,text_end)", + "argsoriginal": "(const char* text,const char* text_end=((void*)0))", + "stname": "ImGuiTextFilter", + "argsT": [ + { + "type": "const char*", + "name": "text" + }, + { + "type": "const char*", + "name": "text_end" + } + ], + "defaults": { "text_end": "((void*)0)" }, + "signature": "(const char*,const char*)", + "cimguiname": "ImGuiTextFilter_PassFilter" + } + ], + "igShowStyleSelector": [ + { + "funcname": "ShowStyleSelector", + "args": "(const char* label)", + "ret": "bool", + "comment": "", + "call_args": "(label)", + "argsoriginal": "(const char* label)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + } + ], + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igShowStyleSelector" + } + ], + "igInputScalarN": [ + { + "funcname": "InputScalarN", + "args": "(const char* label,ImGuiDataType data_type,void* v,int components,const void* step,const void* step_fast,const char* format,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,data_type,v,components,step,step_fast,format,extra_flags)", + "argsoriginal": "(const char* label,ImGuiDataType data_type,void* v,int components,const void* step=((void*)0),const void* step_fast=((void*)0),const char* format=((void*)0),ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "ImGuiDataType", + "name": "data_type" + }, + { + "type": "void*", + "name": "v" + }, + { + "type": "int", + "name": "components" + }, + { + "type": "const void*", + "name": "step" + }, + { + "type": "const void*", + "name": "step_fast" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "step": "((void*)0)", + "format": "((void*)0)", + "step_fast": "((void*)0)", + "extra_flags": "0" + }, + "signature": "(const char*,ImGuiDataType,void*,int,const void*,const void*,const char*,ImGuiInputTextFlags)", + "cimguiname": "igInputScalarN" + } + ], + "igTreeNode": [ + { + "funcname": "TreeNode", + "args": "(const char* label)", + "ret": "bool", + "comment": "", + "call_args": "(label)", + "argsoriginal": "(const char* label)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + } + ], + "ov_cimguiname": "igTreeNodeStr", + "defaults": [], + "signature": "(const char*)", + "cimguiname": "igTreeNode" + }, + { + "isvararg": "...)", + "funcname": "TreeNode", + "args": "(const char* str_id,const char* fmt,...)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,fmt,...)", + "argsoriginal": "(const char* str_id,const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "ov_cimguiname": "igTreeNodeStrStr", + "defaults": [], + "signature": "(const char*,const char*,...)", + "cimguiname": "igTreeNode" + }, + { + "isvararg": "...)", + "funcname": "TreeNode", + "args": "(const void* ptr_id,const char* fmt,...)", + "ret": "bool", + "comment": "", + "call_args": "(ptr_id,fmt,...)", + "argsoriginal": "(const void* ptr_id,const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const void*", + "name": "ptr_id" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "ov_cimguiname": "igTreeNodePtr", + "defaults": [], + "signature": "(const void*,const char*,...)", + "cimguiname": "igTreeNode" + } + ], + "igTreeNodeV": [ + { + "funcname": "TreeNodeV", + "args": "(const char* str_id,const char* fmt,va_list args)", + "ret": "bool", + "comment": "", + "call_args": "(str_id,fmt,args)", + "argsoriginal": "(const char* str_id,const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "str_id" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "ov_cimguiname": "igTreeNodeVStr", + "defaults": [], + "signature": "(const char*,const char*,va_list)", + "cimguiname": "igTreeNodeV" + }, + { + "funcname": "TreeNodeV", + "args": "(const void* ptr_id,const char* fmt,va_list args)", + "ret": "bool", + "comment": "", + "call_args": "(ptr_id,fmt,args)", + "argsoriginal": "(const void* ptr_id,const char* fmt,va_list args)", + "stname": "ImGui", + "argsT": [ + { + "type": "const void*", + "name": "ptr_id" + }, + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "va_list", + "name": "args" + } + ], + "ov_cimguiname": "igTreeNodeVPtr", + "defaults": [], + "signature": "(const void*,const char*,va_list)", + "cimguiname": "igTreeNodeV" + } + ], + "igGetScrollMaxX": [ + { + "funcname": "GetScrollMaxX", + "args": "()", + "ret": "float", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetScrollMaxX" + } + ], + "igSetTooltip": [ + { + "isvararg": "...)", + "funcname": "SetTooltip", + "args": "(const char* fmt,...)", + "ret": "void", + "comment": "", + "call_args": "(fmt,...)", + "argsoriginal": "(const char* fmt,...)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "fmt" + }, + { + "type": "...", + "name": "..." + } + ], + "defaults": [], + "signature": "(const char*,...)", + "cimguiname": "igSetTooltip" + } + ], + "igGetContentRegionAvail": [ + { + "funcname": "GetContentRegionAvail", + "args": "()", + "ret": "ImVec2", + "comment": "", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "argsT": [], + "defaults": [], + "signature": "()", + "cimguiname": "igGetContentRegionAvail" + }, + { + "funcname": "GetContentRegionAvail", + "args": "(ImVec2 *pOut)", + "ret": "void", + "cimguiname": "igGetContentRegionAvail", + "nonUDT": 1, + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "signature": "()", + "ov_cimguiname": "igGetContentRegionAvail_nonUDT", + "comment": "", + "defaults": [], + "argsT": [ + { + "type": "ImVec2*", + "name": "pOut" + } + ] + }, + { + "cimguiname": "igGetContentRegionAvail", + "funcname": "GetContentRegionAvail", + "args": "()", + "ret": "ImVec2_Simple", + "nonUDT": 2, + "signature": "()", + "call_args": "()", + "argsoriginal": "()", + "stname": "ImGui", + "retorig": "ImVec2", + "ov_cimguiname": "igGetContentRegionAvail_nonUDT2", + "comment": "", + "defaults": [], + "argsT": [] + } + ], + "igInputFloat3": [ + { + "funcname": "InputFloat3", + "args": "(const char* label,float v[3],const char* format,ImGuiInputTextFlags extra_flags)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,format,extra_flags)", + "argsoriginal": "(const char* label,float v[3],const char* format=\"%.3f\",ImGuiInputTextFlags extra_flags=0)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[3]", + "name": "v" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "ImGuiInputTextFlags", + "name": "extra_flags" + } + ], + "defaults": { + "extra_flags": "0", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[3],const char*,ImGuiInputTextFlags)", + "cimguiname": "igInputFloat3" + } + ], + "igDragFloat2": [ + { + "funcname": "DragFloat2", + "args": "(const char* label,float v[2],float v_speed,float v_min,float v_max,const char* format,float power)", + "ret": "bool", + "comment": "", + "call_args": "(label,v,v_speed,v_min,v_max,format,power)", + "argsoriginal": "(const char* label,float v[2],float v_speed=1.0f,float v_min=0.0f,float v_max=0.0f,const char* format=\"%.3f\",float power=1.0f)", + "stname": "ImGui", + "argsT": [ + { + "type": "const char*", + "name": "label" + }, + { + "type": "float[2]", + "name": "v" + }, + { + "type": "float", + "name": "v_speed" + }, + { + "type": "float", + "name": "v_min" + }, + { + "type": "float", + "name": "v_max" + }, + { + "type": "const char*", + "name": "format" + }, + { + "type": "float", + "name": "power" + } + ], + "defaults": { + "v_speed": "1.0f", + "v_min": "0.0f", + "power": "1.0f", + "v_max": "0.0f", + "format": "\"%.3f\"" + }, + "signature": "(const char*,float[2],float,float,float,const char*,float)", + "cimguiname": "igDragFloat2" + } + ] +} \ No newline at end of file diff --git a/src/CodeGenerator/structs_and_enums.json b/src/CodeGenerator/structs_and_enums.json new file mode 100644 index 0000000..ba60df1 --- /dev/null +++ b/src/CodeGenerator/structs_and_enums.json @@ -0,0 +1,2564 @@ +{ + "enums": { + "ImGuiComboFlags_": [ + { + "calc_value": 0, + "name": "ImGuiComboFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiComboFlags_PopupAlignLeft", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiComboFlags_HeightSmall", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiComboFlags_HeightRegular", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiComboFlags_HeightLarge", + "value": "1 << 3" + }, + { + "calc_value": 16, + "name": "ImGuiComboFlags_HeightLargest", + "value": "1 << 4" + }, + { + "calc_value": 32, + "name": "ImGuiComboFlags_NoArrowButton", + "value": "1 << 5" + }, + { + "calc_value": 64, + "name": "ImGuiComboFlags_NoPreview", + "value": "1 << 6" + }, + { + "calc_value": 30, + "name": "ImGuiComboFlags_HeightMask_", + "value": "ImGuiComboFlags_HeightSmall | ImGuiComboFlags_HeightRegular | ImGuiComboFlags_HeightLarge | ImGuiComboFlags_HeightLargest" + } + ], + "ImGuiTreeNodeFlags_": [ + { + "calc_value": 0, + "name": "ImGuiTreeNodeFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiTreeNodeFlags_Selected", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiTreeNodeFlags_Framed", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiTreeNodeFlags_AllowItemOverlap", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiTreeNodeFlags_NoTreePushOnOpen", + "value": "1 << 3" + }, + { + "calc_value": 16, + "name": "ImGuiTreeNodeFlags_NoAutoOpenOnLog", + "value": "1 << 4" + }, + { + "calc_value": 32, + "name": "ImGuiTreeNodeFlags_DefaultOpen", + "value": "1 << 5" + }, + { + "calc_value": 64, + "name": "ImGuiTreeNodeFlags_OpenOnDoubleClick", + "value": "1 << 6" + }, + { + "calc_value": 128, + "name": "ImGuiTreeNodeFlags_OpenOnArrow", + "value": "1 << 7" + }, + { + "calc_value": 256, + "name": "ImGuiTreeNodeFlags_Leaf", + "value": "1 << 8" + }, + { + "calc_value": 512, + "name": "ImGuiTreeNodeFlags_Bullet", + "value": "1 << 9" + }, + { + "calc_value": 1024, + "name": "ImGuiTreeNodeFlags_FramePadding", + "value": "1 << 10" + }, + { + "calc_value": 8192, + "name": "ImGuiTreeNodeFlags_NavLeftJumpsBackHere", + "value": "1 << 13" + }, + { + "calc_value": 26, + "name": "ImGuiTreeNodeFlags_CollapsingHeader", + "value": "ImGuiTreeNodeFlags_Framed | ImGuiTreeNodeFlags_NoTreePushOnOpen | ImGuiTreeNodeFlags_NoAutoOpenOnLog" + } + ], + "ImGuiStyleVar_": [ + { + "calc_value": 0, + "name": "ImGuiStyleVar_Alpha", + "value": 0 + }, + { + "calc_value": 1, + "name": "ImGuiStyleVar_WindowPadding", + "value": 1 + }, + { + "calc_value": 2, + "name": "ImGuiStyleVar_WindowRounding", + "value": 2 + }, + { + "calc_value": 3, + "name": "ImGuiStyleVar_WindowBorderSize", + "value": 3 + }, + { + "calc_value": 4, + "name": "ImGuiStyleVar_WindowMinSize", + "value": 4 + }, + { + "calc_value": 5, + "name": "ImGuiStyleVar_WindowTitleAlign", + "value": 5 + }, + { + "calc_value": 6, + "name": "ImGuiStyleVar_ChildRounding", + "value": 6 + }, + { + "calc_value": 7, + "name": "ImGuiStyleVar_ChildBorderSize", + "value": 7 + }, + { + "calc_value": 8, + "name": "ImGuiStyleVar_PopupRounding", + "value": 8 + }, + { + "calc_value": 9, + "name": "ImGuiStyleVar_PopupBorderSize", + "value": 9 + }, + { + "calc_value": 10, + "name": "ImGuiStyleVar_FramePadding", + "value": 10 + }, + { + "calc_value": 11, + "name": "ImGuiStyleVar_FrameRounding", + "value": 11 + }, + { + "calc_value": 12, + "name": "ImGuiStyleVar_FrameBorderSize", + "value": 12 + }, + { + "calc_value": 13, + "name": "ImGuiStyleVar_ItemSpacing", + "value": 13 + }, + { + "calc_value": 14, + "name": "ImGuiStyleVar_ItemInnerSpacing", + "value": 14 + }, + { + "calc_value": 15, + "name": "ImGuiStyleVar_IndentSpacing", + "value": 15 + }, + { + "calc_value": 16, + "name": "ImGuiStyleVar_ScrollbarSize", + "value": 16 + }, + { + "calc_value": 17, + "name": "ImGuiStyleVar_ScrollbarRounding", + "value": 17 + }, + { + "calc_value": 18, + "name": "ImGuiStyleVar_GrabMinSize", + "value": 18 + }, + { + "calc_value": 19, + "name": "ImGuiStyleVar_GrabRounding", + "value": 19 + }, + { + "calc_value": 20, + "name": "ImGuiStyleVar_ButtonTextAlign", + "value": 20 + }, + { + "calc_value": 21, + "name": "ImGuiStyleVar_COUNT", + "value": 21 + } + ], + "ImGuiCol_": [ + { + "calc_value": 0, + "name": "ImGuiCol_Text", + "value": 0 + }, + { + "calc_value": 1, + "name": "ImGuiCol_TextDisabled", + "value": 1 + }, + { + "calc_value": 2, + "name": "ImGuiCol_WindowBg", + "value": 2 + }, + { + "calc_value": 3, + "name": "ImGuiCol_ChildBg", + "value": 3 + }, + { + "calc_value": 4, + "name": "ImGuiCol_PopupBg", + "value": 4 + }, + { + "calc_value": 5, + "name": "ImGuiCol_Border", + "value": 5 + }, + { + "calc_value": 6, + "name": "ImGuiCol_BorderShadow", + "value": 6 + }, + { + "calc_value": 7, + "name": "ImGuiCol_FrameBg", + "value": 7 + }, + { + "calc_value": 8, + "name": "ImGuiCol_FrameBgHovered", + "value": 8 + }, + { + "calc_value": 9, + "name": "ImGuiCol_FrameBgActive", + "value": 9 + }, + { + "calc_value": 10, + "name": "ImGuiCol_TitleBg", + "value": 10 + }, + { + "calc_value": 11, + "name": "ImGuiCol_TitleBgActive", + "value": 11 + }, + { + "calc_value": 12, + "name": "ImGuiCol_TitleBgCollapsed", + "value": 12 + }, + { + "calc_value": 13, + "name": "ImGuiCol_MenuBarBg", + "value": 13 + }, + { + "calc_value": 14, + "name": "ImGuiCol_ScrollbarBg", + "value": 14 + }, + { + "calc_value": 15, + "name": "ImGuiCol_ScrollbarGrab", + "value": 15 + }, + { + "calc_value": 16, + "name": "ImGuiCol_ScrollbarGrabHovered", + "value": 16 + }, + { + "calc_value": 17, + "name": "ImGuiCol_ScrollbarGrabActive", + "value": 17 + }, + { + "calc_value": 18, + "name": "ImGuiCol_CheckMark", + "value": 18 + }, + { + "calc_value": 19, + "name": "ImGuiCol_SliderGrab", + "value": 19 + }, + { + "calc_value": 20, + "name": "ImGuiCol_SliderGrabActive", + "value": 20 + }, + { + "calc_value": 21, + "name": "ImGuiCol_Button", + "value": 21 + }, + { + "calc_value": 22, + "name": "ImGuiCol_ButtonHovered", + "value": 22 + }, + { + "calc_value": 23, + "name": "ImGuiCol_ButtonActive", + "value": 23 + }, + { + "calc_value": 24, + "name": "ImGuiCol_Header", + "value": 24 + }, + { + "calc_value": 25, + "name": "ImGuiCol_HeaderHovered", + "value": 25 + }, + { + "calc_value": 26, + "name": "ImGuiCol_HeaderActive", + "value": 26 + }, + { + "calc_value": 27, + "name": "ImGuiCol_Separator", + "value": 27 + }, + { + "calc_value": 28, + "name": "ImGuiCol_SeparatorHovered", + "value": 28 + }, + { + "calc_value": 29, + "name": "ImGuiCol_SeparatorActive", + "value": 29 + }, + { + "calc_value": 30, + "name": "ImGuiCol_ResizeGrip", + "value": 30 + }, + { + "calc_value": 31, + "name": "ImGuiCol_ResizeGripHovered", + "value": 31 + }, + { + "calc_value": 32, + "name": "ImGuiCol_ResizeGripActive", + "value": 32 + }, + { + "calc_value": 33, + "name": "ImGuiCol_PlotLines", + "value": 33 + }, + { + "calc_value": 34, + "name": "ImGuiCol_PlotLinesHovered", + "value": 34 + }, + { + "calc_value": 35, + "name": "ImGuiCol_PlotHistogram", + "value": 35 + }, + { + "calc_value": 36, + "name": "ImGuiCol_PlotHistogramHovered", + "value": 36 + }, + { + "calc_value": 37, + "name": "ImGuiCol_TextSelectedBg", + "value": 37 + }, + { + "calc_value": 38, + "name": "ImGuiCol_DragDropTarget", + "value": 38 + }, + { + "calc_value": 39, + "name": "ImGuiCol_NavHighlight", + "value": 39 + }, + { + "calc_value": 40, + "name": "ImGuiCol_NavWindowingHighlight", + "value": 40 + }, + { + "calc_value": 41, + "name": "ImGuiCol_NavWindowingDimBg", + "value": 41 + }, + { + "calc_value": 42, + "name": "ImGuiCol_ModalWindowDimBg", + "value": 42 + }, + { + "calc_value": 43, + "name": "ImGuiCol_COUNT", + "value": 43 + } + ], + "ImGuiWindowFlags_": [ + { + "calc_value": 0, + "name": "ImGuiWindowFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiWindowFlags_NoTitleBar", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiWindowFlags_NoResize", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiWindowFlags_NoMove", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiWindowFlags_NoScrollbar", + "value": "1 << 3" + }, + { + "calc_value": 16, + "name": "ImGuiWindowFlags_NoScrollWithMouse", + "value": "1 << 4" + }, + { + "calc_value": 32, + "name": "ImGuiWindowFlags_NoCollapse", + "value": "1 << 5" + }, + { + "calc_value": 64, + "name": "ImGuiWindowFlags_AlwaysAutoResize", + "value": "1 << 6" + }, + { + "calc_value": 256, + "name": "ImGuiWindowFlags_NoSavedSettings", + "value": "1 << 8" + }, + { + "calc_value": 512, + "name": "ImGuiWindowFlags_NoInputs", + "value": "1 << 9" + }, + { + "calc_value": 1024, + "name": "ImGuiWindowFlags_MenuBar", + "value": "1 << 10" + }, + { + "calc_value": 2048, + "name": "ImGuiWindowFlags_HorizontalScrollbar", + "value": "1 << 11" + }, + { + "calc_value": 4096, + "name": "ImGuiWindowFlags_NoFocusOnAppearing", + "value": "1 << 12" + }, + { + "calc_value": 8192, + "name": "ImGuiWindowFlags_NoBringToFrontOnFocus", + "value": "1 << 13" + }, + { + "calc_value": 16384, + "name": "ImGuiWindowFlags_AlwaysVerticalScrollbar", + "value": "1 << 14" + }, + { + "calc_value": 32768, + "name": "ImGuiWindowFlags_AlwaysHorizontalScrollbar", + "value": "1<< 15" + }, + { + "calc_value": 65536, + "name": "ImGuiWindowFlags_AlwaysUseWindowPadding", + "value": "1 << 16" + }, + { + "calc_value": 262144, + "name": "ImGuiWindowFlags_NoNavInputs", + "value": "1 << 18" + }, + { + "calc_value": 524288, + "name": "ImGuiWindowFlags_NoNavFocus", + "value": "1 << 19" + }, + { + "calc_value": 786432, + "name": "ImGuiWindowFlags_NoNav", + "value": "ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus" + }, + { + "calc_value": 8388608, + "name": "ImGuiWindowFlags_NavFlattened", + "value": "1 << 23" + }, + { + "calc_value": 16777216, + "name": "ImGuiWindowFlags_ChildWindow", + "value": "1 << 24" + }, + { + "calc_value": 33554432, + "name": "ImGuiWindowFlags_Tooltip", + "value": "1 << 25" + }, + { + "calc_value": 67108864, + "name": "ImGuiWindowFlags_Popup", + "value": "1 << 26" + }, + { + "calc_value": 134217728, + "name": "ImGuiWindowFlags_Modal", + "value": "1 << 27" + }, + { + "calc_value": 268435456, + "name": "ImGuiWindowFlags_ChildMenu", + "value": "1 << 28" + } + ], + "ImGuiNavInput_": [ + { + "calc_value": 0, + "name": "ImGuiNavInput_Activate", + "value": 0 + }, + { + "calc_value": 1, + "name": "ImGuiNavInput_Cancel", + "value": 1 + }, + { + "calc_value": 2, + "name": "ImGuiNavInput_Input", + "value": 2 + }, + { + "calc_value": 3, + "name": "ImGuiNavInput_Menu", + "value": 3 + }, + { + "calc_value": 4, + "name": "ImGuiNavInput_DpadLeft", + "value": 4 + }, + { + "calc_value": 5, + "name": "ImGuiNavInput_DpadRight", + "value": 5 + }, + { + "calc_value": 6, + "name": "ImGuiNavInput_DpadUp", + "value": 6 + }, + { + "calc_value": 7, + "name": "ImGuiNavInput_DpadDown", + "value": 7 + }, + { + "calc_value": 8, + "name": "ImGuiNavInput_LStickLeft", + "value": 8 + }, + { + "calc_value": 9, + "name": "ImGuiNavInput_LStickRight", + "value": 9 + }, + { + "calc_value": 10, + "name": "ImGuiNavInput_LStickUp", + "value": 10 + }, + { + "calc_value": 11, + "name": "ImGuiNavInput_LStickDown", + "value": 11 + }, + { + "calc_value": 12, + "name": "ImGuiNavInput_FocusPrev", + "value": 12 + }, + { + "calc_value": 13, + "name": "ImGuiNavInput_FocusNext", + "value": 13 + }, + { + "calc_value": 14, + "name": "ImGuiNavInput_TweakSlow", + "value": 14 + }, + { + "calc_value": 15, + "name": "ImGuiNavInput_TweakFast", + "value": 15 + }, + { + "calc_value": 16, + "name": "ImGuiNavInput_KeyMenu_", + "value": 16 + }, + { + "calc_value": 17, + "name": "ImGuiNavInput_KeyLeft_", + "value": 17 + }, + { + "calc_value": 18, + "name": "ImGuiNavInput_KeyRight_", + "value": 18 + }, + { + "calc_value": 19, + "name": "ImGuiNavInput_KeyUp_", + "value": 19 + }, + { + "calc_value": 20, + "name": "ImGuiNavInput_KeyDown_", + "value": 20 + }, + { + "calc_value": 21, + "name": "ImGuiNavInput_COUNT", + "value": 21 + }, + { + "calc_value": 16, + "name": "ImGuiNavInput_InternalStart_", + "value": "ImGuiNavInput_KeyMenu_" + } + ], + "ImGuiFocusedFlags_": [ + { + "calc_value": 0, + "name": "ImGuiFocusedFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiFocusedFlags_ChildWindows", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiFocusedFlags_RootWindow", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiFocusedFlags_AnyWindow", + "value": "1 << 2" + }, + { + "calc_value": 3, + "name": "ImGuiFocusedFlags_RootAndChildWindows", + "value": "ImGuiFocusedFlags_RootWindow | ImGuiFocusedFlags_ChildWindows" + } + ], + "ImGuiSelectableFlags_": [ + { + "calc_value": 0, + "name": "ImGuiSelectableFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiSelectableFlags_DontClosePopups", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiSelectableFlags_SpanAllColumns", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiSelectableFlags_AllowDoubleClick", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiSelectableFlags_Disabled", + "value": "1 << 3" + } + ], + "ImGuiKey_": [ + { + "calc_value": 0, + "name": "ImGuiKey_Tab", + "value": 0 + }, + { + "calc_value": 1, + "name": "ImGuiKey_LeftArrow", + "value": 1 + }, + { + "calc_value": 2, + "name": "ImGuiKey_RightArrow", + "value": 2 + }, + { + "calc_value": 3, + "name": "ImGuiKey_UpArrow", + "value": 3 + }, + { + "calc_value": 4, + "name": "ImGuiKey_DownArrow", + "value": 4 + }, + { + "calc_value": 5, + "name": "ImGuiKey_PageUp", + "value": 5 + }, + { + "calc_value": 6, + "name": "ImGuiKey_PageDown", + "value": 6 + }, + { + "calc_value": 7, + "name": "ImGuiKey_Home", + "value": 7 + }, + { + "calc_value": 8, + "name": "ImGuiKey_End", + "value": 8 + }, + { + "calc_value": 9, + "name": "ImGuiKey_Insert", + "value": 9 + }, + { + "calc_value": 10, + "name": "ImGuiKey_Delete", + "value": 10 + }, + { + "calc_value": 11, + "name": "ImGuiKey_Backspace", + "value": 11 + }, + { + "calc_value": 12, + "name": "ImGuiKey_Space", + "value": 12 + }, + { + "calc_value": 13, + "name": "ImGuiKey_Enter", + "value": 13 + }, + { + "calc_value": 14, + "name": "ImGuiKey_Escape", + "value": 14 + }, + { + "calc_value": 15, + "name": "ImGuiKey_A", + "value": 15 + }, + { + "calc_value": 16, + "name": "ImGuiKey_C", + "value": 16 + }, + { + "calc_value": 17, + "name": "ImGuiKey_V", + "value": 17 + }, + { + "calc_value": 18, + "name": "ImGuiKey_X", + "value": 18 + }, + { + "calc_value": 19, + "name": "ImGuiKey_Y", + "value": 19 + }, + { + "calc_value": 20, + "name": "ImGuiKey_Z", + "value": 20 + }, + { + "calc_value": 21, + "name": "ImGuiKey_COUNT", + "value": 21 + } + ], + "ImFontAtlasFlags_": [ + { + "calc_value": 0, + "name": "ImFontAtlasFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImFontAtlasFlags_NoPowerOfTwoHeight", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImFontAtlasFlags_NoMouseCursors", + "value": "1 << 1" + } + ], + "ImGuiConfigFlags_": [ + { + "calc_value": 1, + "name": "ImGuiConfigFlags_NavEnableKeyboard", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiConfigFlags_NavEnableGamepad", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiConfigFlags_NavEnableSetMousePos", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiConfigFlags_NavNoCaptureKeyboard", + "value": "1 << 3" + }, + { + "calc_value": 16, + "name": "ImGuiConfigFlags_NoMouse", + "value": "1 << 4" + }, + { + "calc_value": 32, + "name": "ImGuiConfigFlags_NoMouseCursorChange", + "value": "1 << 5" + }, + { + "calc_value": 1048576, + "name": "ImGuiConfigFlags_IsSRGB", + "value": "1 << 20" + }, + { + "calc_value": 2097152, + "name": "ImGuiConfigFlags_IsTouchScreen", + "value": "1 << 21" + } + ], + "ImDrawCornerFlags_": [ + { + "calc_value": 1, + "name": "ImDrawCornerFlags_TopLeft", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImDrawCornerFlags_TopRight", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImDrawCornerFlags_BotLeft", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImDrawCornerFlags_BotRight", + "value": "1 << 3" + }, + { + "calc_value": 3, + "name": "ImDrawCornerFlags_Top", + "value": "ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_TopRight" + }, + { + "calc_value": 12, + "name": "ImDrawCornerFlags_Bot", + "value": "ImDrawCornerFlags_BotLeft | ImDrawCornerFlags_BotRight" + }, + { + "calc_value": 5, + "name": "ImDrawCornerFlags_Left", + "value": "ImDrawCornerFlags_TopLeft | ImDrawCornerFlags_BotLeft" + }, + { + "calc_value": 10, + "name": "ImDrawCornerFlags_Right", + "value": "ImDrawCornerFlags_TopRight | ImDrawCornerFlags_BotRight" + }, + { + "calc_value": 15, + "name": "ImDrawCornerFlags_All", + "value": "0xF" + } + ], + "ImGuiDragDropFlags_": [ + { + "calc_value": 0, + "name": "ImGuiDragDropFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiDragDropFlags_SourceNoPreviewTooltip", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiDragDropFlags_SourceNoDisableHover", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiDragDropFlags_SourceNoHoldToOpenOthers", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiDragDropFlags_SourceAllowNullID", + "value": "1 << 3" + }, + { + "calc_value": 16, + "name": "ImGuiDragDropFlags_SourceExtern", + "value": "1 << 4" + }, + { + "calc_value": 32, + "name": "ImGuiDragDropFlags_SourceAutoExpirePayload", + "value": "1 << 5" + }, + { + "calc_value": 1024, + "name": "ImGuiDragDropFlags_AcceptBeforeDelivery", + "value": "1 << 10" + }, + { + "calc_value": 2048, + "name": "ImGuiDragDropFlags_AcceptNoDrawDefaultRect", + "value": "1 << 11" + }, + { + "calc_value": 4096, + "name": "ImGuiDragDropFlags_AcceptNoPreviewTooltip", + "value": "1 << 12" + }, + { + "calc_value": 3072, + "name": "ImGuiDragDropFlags_AcceptPeekOnly", + "value": "ImGuiDragDropFlags_AcceptBeforeDelivery | ImGuiDragDropFlags_AcceptNoDrawDefaultRect" + } + ], + "ImGuiCond_": [ + { + "calc_value": 1, + "name": "ImGuiCond_Always", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiCond_Once", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiCond_FirstUseEver", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiCond_Appearing", + "value": "1 << 3" + } + ], + "ImGuiInputTextFlags_": [ + { + "calc_value": 0, + "name": "ImGuiInputTextFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiInputTextFlags_CharsDecimal", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiInputTextFlags_CharsHexadecimal", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiInputTextFlags_CharsUppercase", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiInputTextFlags_CharsNoBlank", + "value": "1 << 3" + }, + { + "calc_value": 16, + "name": "ImGuiInputTextFlags_AutoSelectAll", + "value": "1 << 4" + }, + { + "calc_value": 32, + "name": "ImGuiInputTextFlags_EnterReturnsTrue", + "value": "1 << 5" + }, + { + "calc_value": 64, + "name": "ImGuiInputTextFlags_CallbackCompletion", + "value": "1 << 6" + }, + { + "calc_value": 128, + "name": "ImGuiInputTextFlags_CallbackHistory", + "value": "1 << 7" + }, + { + "calc_value": 256, + "name": "ImGuiInputTextFlags_CallbackAlways", + "value": "1 << 8" + }, + { + "calc_value": 512, + "name": "ImGuiInputTextFlags_CallbackCharFilter", + "value": "1 << 9" + }, + { + "calc_value": 1024, + "name": "ImGuiInputTextFlags_AllowTabInput", + "value": "1 << 10" + }, + { + "calc_value": 2048, + "name": "ImGuiInputTextFlags_CtrlEnterForNewLine", + "value": "1 << 11" + }, + { + "calc_value": 4096, + "name": "ImGuiInputTextFlags_NoHorizontalScroll", + "value": "1 << 12" + }, + { + "calc_value": 8192, + "name": "ImGuiInputTextFlags_AlwaysInsertMode", + "value": "1 << 13" + }, + { + "calc_value": 16384, + "name": "ImGuiInputTextFlags_ReadOnly", + "value": "1 << 14" + }, + { + "calc_value": 32768, + "name": "ImGuiInputTextFlags_Password", + "value": "1 << 15" + }, + { + "calc_value": 65536, + "name": "ImGuiInputTextFlags_NoUndoRedo", + "value": "1 << 16" + }, + { + "calc_value": 131072, + "name": "ImGuiInputTextFlags_CharsScientific", + "value": "1 << 17" + }, + { + "calc_value": 262144, + "name": "ImGuiInputTextFlags_CallbackResize", + "value": "1 << 18" + }, + { + "calc_value": 1048576, + "name": "ImGuiInputTextFlags_Multiline", + "value": "1 << 20" + } + ], + "ImGuiMouseCursor_": [ + { + "calc_value": -1, + "name": "ImGuiMouseCursor_None", + "value": "-1" + }, + { + "calc_value": 0, + "name": "ImGuiMouseCursor_Arrow", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiMouseCursor_TextInput", + "value": 1 + }, + { + "calc_value": 2, + "name": "ImGuiMouseCursor_ResizeAll", + "value": 2 + }, + { + "calc_value": 3, + "name": "ImGuiMouseCursor_ResizeNS", + "value": 3 + }, + { + "calc_value": 4, + "name": "ImGuiMouseCursor_ResizeEW", + "value": 4 + }, + { + "calc_value": 5, + "name": "ImGuiMouseCursor_ResizeNESW", + "value": 5 + }, + { + "calc_value": 6, + "name": "ImGuiMouseCursor_ResizeNWSE", + "value": 6 + }, + { + "calc_value": 7, + "name": "ImGuiMouseCursor_Hand", + "value": 7 + }, + { + "calc_value": 8, + "name": "ImGuiMouseCursor_COUNT", + "value": 8 + } + ], + "ImGuiColorEditFlags_": [ + { + "calc_value": 0, + "name": "ImGuiColorEditFlags_None", + "value": "0" + }, + { + "calc_value": 2, + "name": "ImGuiColorEditFlags_NoAlpha", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiColorEditFlags_NoPicker", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiColorEditFlags_NoOptions", + "value": "1 << 3" + }, + { + "calc_value": 16, + "name": "ImGuiColorEditFlags_NoSmallPreview", + "value": "1 << 4" + }, + { + "calc_value": 32, + "name": "ImGuiColorEditFlags_NoInputs", + "value": "1 << 5" + }, + { + "calc_value": 64, + "name": "ImGuiColorEditFlags_NoTooltip", + "value": "1 << 6" + }, + { + "calc_value": 128, + "name": "ImGuiColorEditFlags_NoLabel", + "value": "1 << 7" + }, + { + "calc_value": 256, + "name": "ImGuiColorEditFlags_NoSidePreview", + "value": "1 << 8" + }, + { + "calc_value": 512, + "name": "ImGuiColorEditFlags_NoDragDrop", + "value": "1 << 9" + }, + { + "calc_value": 65536, + "name": "ImGuiColorEditFlags_AlphaBar", + "value": "1 << 16" + }, + { + "calc_value": 131072, + "name": "ImGuiColorEditFlags_AlphaPreview", + "value": "1 << 17" + }, + { + "calc_value": 262144, + "name": "ImGuiColorEditFlags_AlphaPreviewHalf", + "value": "1 << 18" + }, + { + "calc_value": 524288, + "name": "ImGuiColorEditFlags_HDR", + "value": "1 << 19" + }, + { + "calc_value": 1048576, + "name": "ImGuiColorEditFlags_RGB", + "value": "1 << 20" + }, + { + "calc_value": 2097152, + "name": "ImGuiColorEditFlags_HSV", + "value": "1 << 21" + }, + { + "calc_value": 4194304, + "name": "ImGuiColorEditFlags_HEX", + "value": "1 << 22" + }, + { + "calc_value": 8388608, + "name": "ImGuiColorEditFlags_Uint8", + "value": "1 << 23" + }, + { + "calc_value": 16777216, + "name": "ImGuiColorEditFlags_Float", + "value": "1 << 24" + }, + { + "calc_value": 33554432, + "name": "ImGuiColorEditFlags_PickerHueBar", + "value": "1 << 25" + }, + { + "calc_value": 67108864, + "name": "ImGuiColorEditFlags_PickerHueWheel", + "value": "1 << 26" + }, + { + "calc_value": 7340032, + "name": "ImGuiColorEditFlags__InputsMask", + "value": "ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_HSV|ImGuiColorEditFlags_HEX" + }, + { + "calc_value": 25165824, + "name": "ImGuiColorEditFlags__DataTypeMask", + "value": "ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_Float" + }, + { + "calc_value": 100663296, + "name": "ImGuiColorEditFlags__PickerMask", + "value": "ImGuiColorEditFlags_PickerHueWheel|ImGuiColorEditFlags_PickerHueBar" + }, + { + "calc_value": 42991616, + "name": "ImGuiColorEditFlags__OptionsDefault", + "value": "ImGuiColorEditFlags_Uint8|ImGuiColorEditFlags_RGB|ImGuiColorEditFlags_PickerHueBar" + } + ], + "ImGuiHoveredFlags_": [ + { + "calc_value": 0, + "name": "ImGuiHoveredFlags_None", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiHoveredFlags_ChildWindows", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiHoveredFlags_RootWindow", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiHoveredFlags_AnyWindow", + "value": "1 << 2" + }, + { + "calc_value": 8, + "name": "ImGuiHoveredFlags_AllowWhenBlockedByPopup", + "value": "1 << 3" + }, + { + "calc_value": 32, + "name": "ImGuiHoveredFlags_AllowWhenBlockedByActiveItem", + "value": "1 << 5" + }, + { + "calc_value": 64, + "name": "ImGuiHoveredFlags_AllowWhenOverlapped", + "value": "1 << 6" + }, + { + "calc_value": 128, + "name": "ImGuiHoveredFlags_AllowWhenDisabled", + "value": "1 << 7" + }, + { + "calc_value": 104, + "name": "ImGuiHoveredFlags_RectOnly", + "value": "ImGuiHoveredFlags_AllowWhenBlockedByPopup | ImGuiHoveredFlags_AllowWhenBlockedByActiveItem | ImGuiHoveredFlags_AllowWhenOverlapped" + }, + { + "calc_value": 3, + "name": "ImGuiHoveredFlags_RootAndChildWindows", + "value": "ImGuiHoveredFlags_RootWindow | ImGuiHoveredFlags_ChildWindows" + } + ], + "ImGuiDir_": [ + { + "calc_value": -1, + "name": "ImGuiDir_None", + "value": "-1" + }, + { + "calc_value": 0, + "name": "ImGuiDir_Left", + "value": "0" + }, + { + "calc_value": 1, + "name": "ImGuiDir_Right", + "value": "1" + }, + { + "calc_value": 2, + "name": "ImGuiDir_Up", + "value": "2" + }, + { + "calc_value": 3, + "name": "ImGuiDir_Down", + "value": "3" + }, + { + "calc_value": 4, + "name": "ImGuiDir_COUNT", + "value": 4 + } + ], + "ImDrawListFlags_": [ + { + "calc_value": 1, + "name": "ImDrawListFlags_AntiAliasedLines", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImDrawListFlags_AntiAliasedFill", + "value": "1 << 1" + } + ], + "ImGuiDataType_": [ + { + "calc_value": 0, + "name": "ImGuiDataType_S32", + "value": 0 + }, + { + "calc_value": 1, + "name": "ImGuiDataType_U32", + "value": 1 + }, + { + "calc_value": 2, + "name": "ImGuiDataType_S64", + "value": 2 + }, + { + "calc_value": 3, + "name": "ImGuiDataType_U64", + "value": 3 + }, + { + "calc_value": 4, + "name": "ImGuiDataType_Float", + "value": 4 + }, + { + "calc_value": 5, + "name": "ImGuiDataType_Double", + "value": 5 + }, + { + "calc_value": 6, + "name": "ImGuiDataType_COUNT", + "value": 6 + } + ], + "ImGuiBackendFlags_": [ + { + "calc_value": 1, + "name": "ImGuiBackendFlags_HasGamepad", + "value": "1 << 0" + }, + { + "calc_value": 2, + "name": "ImGuiBackendFlags_HasMouseCursors", + "value": "1 << 1" + }, + { + "calc_value": 4, + "name": "ImGuiBackendFlags_HasSetMousePos", + "value": "1 << 2" + } + ] + }, + "structs": { + "ImDrawVert": [ + { + "type": "ImVec2", + "name": "pos" + }, + { + "type": "ImVec2", + "name": "uv" + }, + { + "type": "ImU32", + "name": "col" + } + ], + "ImDrawList": [ + { + "type": "ImVector/**/", + "name": "CmdBuffer" + }, + { + "type": "ImVector/**/", + "name": "IdxBuffer" + }, + { + "type": "ImVector/**/", + "name": "VtxBuffer" + }, + { + "type": "ImDrawListFlags", + "name": "Flags" + }, + { + "type": "const ImDrawListSharedData*", + "name": "_Data" + }, + { + "type": "const char*", + "name": "_OwnerName" + }, + { + "type": "unsigned int", + "name": "_VtxCurrentIdx" + }, + { + "type": "ImDrawVert*", + "name": "_VtxWritePtr" + }, + { + "type": "ImDrawIdx*", + "name": "_IdxWritePtr" + }, + { + "type": "ImVector/**/", + "name": "_ClipRectStack" + }, + { + "type": "ImVector/**/", + "name": "_TextureIdStack" + }, + { + "type": "ImVector/**/", + "name": "_Path" + }, + { + "type": "int", + "name": "_ChannelsCurrent" + }, + { + "type": "int", + "name": "_ChannelsCount" + }, + { + "type": "ImVector/**/", + "name": "_Channels" + } + ], + "Pair": [ + { + "type": "ImGuiID", + "name": "key" + }, + { + "type": "union { int val_i; float val_f; void* val_p;", + "name": "}" + } + ], + "ImFont": [ + { + "type": "float", + "name": "FontSize" + }, + { + "type": "float", + "name": "Scale" + }, + { + "type": "ImVec2", + "name": "DisplayOffset" + }, + { + "type": "ImVector/**/", + "name": "Glyphs" + }, + { + "type": "ImVector/**/", + "name": "IndexAdvanceX" + }, + { + "type": "ImVector/**/", + "name": "IndexLookup" + }, + { + "type": "const ImFontGlyph*", + "name": "FallbackGlyph" + }, + { + "type": "float", + "name": "FallbackAdvanceX" + }, + { + "type": "ImWchar", + "name": "FallbackChar" + }, + { + "type": "short", + "name": "ConfigDataCount" + }, + { + "type": "ImFontConfig*", + "name": "ConfigData" + }, + { + "type": "ImFontAtlas*", + "name": "ContainerAtlas" + }, + { + "type": "float", + "name": "Ascent" + }, + { + "type": "float", + "name": "Descent" + }, + { + "type": "bool", + "name": "DirtyLookupTables" + }, + { + "type": "int", + "name": "MetricsTotalSurface" + } + ], + "ImGuiListClipper": [ + { + "type": "float", + "name": "StartPosY" + }, + { + "type": "float", + "name": "ItemsHeight" + }, + { + "type": "int", + "name": "ItemsCount" + }, + { + "type": "int", + "name": "StepNo" + }, + { + "type": "int", + "name": "DisplayStart" + }, + { + "type": "int", + "name": "DisplayEnd" + } + ], + "CustomRect": [ + { + "type": "unsigned int", + "name": "ID" + }, + { + "type": "unsigned short", + "name": "Width" + }, + { + "type": "unsigned short", + "name": "Height" + }, + { + "type": "unsigned short", + "name": "X" + }, + { + "type": "unsigned short", + "name": "Y" + }, + { + "type": "float", + "name": "GlyphAdvanceX" + }, + { + "type": "ImVec2", + "name": "GlyphOffset" + }, + { + "type": "ImFont*", + "name": "Font" + } + ], + "ImVec4": [ + { + "type": "float", + "name": "x" + }, + { + "type": "float", + "name": "y" + }, + { + "type": "float", + "name": "z" + }, + { + "type": "float", + "name": "w" + } + ], + "GlyphRangesBuilder": [ + { + "type": "ImVector/**/", + "name": "UsedChars" + } + ], + "ImGuiStorage": [ + { + "type": "ImVector/**/", + "name": "Data" + } + ], + "ImFontAtlas": [ + { + "type": "bool", + "name": "Locked" + }, + { + "type": "ImFontAtlasFlags", + "name": "Flags" + }, + { + "type": "ImTextureID", + "name": "TexID" + }, + { + "type": "int", + "name": "TexDesiredWidth" + }, + { + "type": "int", + "name": "TexGlyphPadding" + }, + { + "type": "unsigned char*", + "name": "TexPixelsAlpha8" + }, + { + "type": "unsigned int*", + "name": "TexPixelsRGBA32" + }, + { + "type": "int", + "name": "TexWidth" + }, + { + "type": "int", + "name": "TexHeight" + }, + { + "type": "ImVec2", + "name": "TexUvScale" + }, + { + "type": "ImVec2", + "name": "TexUvWhitePixel" + }, + { + "type": "ImVector/**/", + "name": "Fonts" + }, + { + "type": "ImVector/**/", + "name": "CustomRects" + }, + { + "type": "ImVector/**/", + "name": "ConfigData" + }, + { + "type": "int", + "name": "CustomRectIds[1]", + "size": 1 + } + ], + "ImFontGlyph": [ + { + "type": "ImWchar", + "name": "Codepoint" + }, + { + "type": "float", + "name": "AdvanceX" + }, + { + "type": "float", + "name": "X0" + }, + { + "type": "float", + "name": "Y0" + }, + { + "type": "float", + "name": "X1" + }, + { + "type": "float", + "name": "Y1" + }, + { + "type": "float", + "name": "U0" + }, + { + "type": "float", + "name": "V0" + }, + { + "type": "float", + "name": "U1" + }, + { + "type": "float", + "name": "V1" + } + ], + "ImFontConfig": [ + { + "type": "void*", + "name": "FontData" + }, + { + "type": "int", + "name": "FontDataSize" + }, + { + "type": "bool", + "name": "FontDataOwnedByAtlas" + }, + { + "type": "int", + "name": "FontNo" + }, + { + "type": "float", + "name": "SizePixels" + }, + { + "type": "int", + "name": "OversampleH" + }, + { + "type": "int", + "name": "OversampleV" + }, + { + "type": "bool", + "name": "PixelSnapH" + }, + { + "type": "ImVec2", + "name": "GlyphExtraSpacing" + }, + { + "type": "ImVec2", + "name": "GlyphOffset" + }, + { + "type": "const ImWchar*", + "name": "GlyphRanges" + }, + { + "type": "float", + "name": "GlyphMinAdvanceX" + }, + { + "type": "float", + "name": "GlyphMaxAdvanceX" + }, + { + "type": "bool", + "name": "MergeMode" + }, + { + "type": "unsigned int", + "name": "RasterizerFlags" + }, + { + "type": "float", + "name": "RasterizerMultiply" + }, + { + "type": "char", + "name": "Name[40]", + "size": 40 + }, + { + "type": "ImFont*", + "name": "DstFont" + } + ], + "ImDrawData": [ + { + "type": "bool", + "name": "Valid" + }, + { + "type": "ImDrawList**", + "name": "CmdLists" + }, + { + "type": "int", + "name": "CmdListsCount" + }, + { + "type": "int", + "name": "TotalIdxCount" + }, + { + "type": "int", + "name": "TotalVtxCount" + }, + { + "type": "ImVec2", + "name": "DisplayPos" + }, + { + "type": "ImVec2", + "name": "DisplaySize" + } + ], + "ImGuiTextBuffer": [ + { + "type": "ImVector/**/", + "name": "Buf" + } + ], + "ImGuiStyle": [ + { + "type": "float", + "name": "Alpha" + }, + { + "type": "ImVec2", + "name": "WindowPadding" + }, + { + "type": "float", + "name": "WindowRounding" + }, + { + "type": "float", + "name": "WindowBorderSize" + }, + { + "type": "ImVec2", + "name": "WindowMinSize" + }, + { + "type": "ImVec2", + "name": "WindowTitleAlign" + }, + { + "type": "float", + "name": "ChildRounding" + }, + { + "type": "float", + "name": "ChildBorderSize" + }, + { + "type": "float", + "name": "PopupRounding" + }, + { + "type": "float", + "name": "PopupBorderSize" + }, + { + "type": "ImVec2", + "name": "FramePadding" + }, + { + "type": "float", + "name": "FrameRounding" + }, + { + "type": "float", + "name": "FrameBorderSize" + }, + { + "type": "ImVec2", + "name": "ItemSpacing" + }, + { + "type": "ImVec2", + "name": "ItemInnerSpacing" + }, + { + "type": "ImVec2", + "name": "TouchExtraPadding" + }, + { + "type": "float", + "name": "IndentSpacing" + }, + { + "type": "float", + "name": "ColumnsMinSpacing" + }, + { + "type": "float", + "name": "ScrollbarSize" + }, + { + "type": "float", + "name": "ScrollbarRounding" + }, + { + "type": "float", + "name": "GrabMinSize" + }, + { + "type": "float", + "name": "GrabRounding" + }, + { + "type": "ImVec2", + "name": "ButtonTextAlign" + }, + { + "type": "ImVec2", + "name": "DisplayWindowPadding" + }, + { + "type": "ImVec2", + "name": "DisplaySafeAreaPadding" + }, + { + "type": "float", + "name": "MouseCursorScale" + }, + { + "type": "bool", + "name": "AntiAliasedLines" + }, + { + "type": "bool", + "name": "AntiAliasedFill" + }, + { + "type": "float", + "name": "CurveTessellationTol" + }, + { + "type": "ImVec4", + "name": "Colors[ImGuiCol_COUNT]", + "size": 43 + } + ], + "ImDrawChannel": [ + { + "type": "ImVector/**/", + "name": "CmdBuffer" + }, + { + "type": "ImVector/**/", + "name": "IdxBuffer" + } + ], + "ImDrawCmd": [ + { + "type": "unsigned int", + "name": "ElemCount" + }, + { + "type": "ImVec4", + "name": "ClipRect" + }, + { + "type": "ImTextureID", + "name": "TextureId" + }, + { + "type": "ImDrawCallback", + "name": "UserCallback" + }, + { + "type": "void*", + "name": "UserCallbackData" + } + ], + "TextRange": [ + { + "type": "const char*", + "name": "b" + }, + { + "type": "const char*", + "name": "e" + } + ], + "ImGuiOnceUponAFrame": [ + { + "type": "int", + "name": "RefFrame" + } + ], + "ImVector": [], + "ImGuiIO": [ + { + "type": "ImGuiConfigFlags", + "name": "ConfigFlags" + }, + { + "type": "ImGuiBackendFlags", + "name": "BackendFlags" + }, + { + "type": "ImVec2", + "name": "DisplaySize" + }, + { + "type": "float", + "name": "DeltaTime" + }, + { + "type": "float", + "name": "IniSavingRate" + }, + { + "type": "const char*", + "name": "IniFilename" + }, + { + "type": "const char*", + "name": "LogFilename" + }, + { + "type": "float", + "name": "MouseDoubleClickTime" + }, + { + "type": "float", + "name": "MouseDoubleClickMaxDist" + }, + { + "type": "float", + "name": "MouseDragThreshold" + }, + { + "type": "int", + "name": "KeyMap[ImGuiKey_COUNT]", + "size": 21 + }, + { + "type": "float", + "name": "KeyRepeatDelay" + }, + { + "type": "float", + "name": "KeyRepeatRate" + }, + { + "type": "void*", + "name": "UserData" + }, + { + "type": "ImFontAtlas*", + "name": "Fonts" + }, + { + "type": "float", + "name": "FontGlobalScale" + }, + { + "type": "bool", + "name": "FontAllowUserScaling" + }, + { + "type": "ImFont*", + "name": "FontDefault" + }, + { + "type": "ImVec2", + "name": "DisplayFramebufferScale" + }, + { + "type": "ImVec2", + "name": "DisplayVisibleMin" + }, + { + "type": "ImVec2", + "name": "DisplayVisibleMax" + }, + { + "type": "bool", + "name": "MouseDrawCursor" + }, + { + "type": "bool", + "name": "ConfigMacOSXBehaviors" + }, + { + "type": "bool", + "name": "ConfigInputTextCursorBlink" + }, + { + "type": "bool", + "name": "ConfigResizeWindowsFromEdges" + }, + { + "type": "const char*(*)(void* user_data)", + "name": "GetClipboardTextFn" + }, + { + "type": "void(*)(void* user_data,const char* text)", + "name": "SetClipboardTextFn" + }, + { + "type": "void*", + "name": "ClipboardUserData" + }, + { + "type": "void(*)(int x,int y)", + "name": "ImeSetInputScreenPosFn" + }, + { + "type": "void*", + "name": "ImeWindowHandle" + }, + { + "type": "void*", + "name": "RenderDrawListsFnUnused" + }, + { + "type": "ImVec2", + "name": "MousePos" + }, + { + "type": "bool", + "name": "MouseDown[5]", + "size": 5 + }, + { + "type": "float", + "name": "MouseWheel" + }, + { + "type": "float", + "name": "MouseWheelH" + }, + { + "type": "bool", + "name": "KeyCtrl" + }, + { + "type": "bool", + "name": "KeyShift" + }, + { + "type": "bool", + "name": "KeyAlt" + }, + { + "type": "bool", + "name": "KeySuper" + }, + { + "type": "bool", + "name": "KeysDown[512]", + "size": 512 + }, + { + "type": "ImWchar", + "name": "InputCharacters[16+1]", + "size": 17 + }, + { + "type": "float", + "name": "NavInputs[ImGuiNavInput_COUNT]", + "size": 21 + }, + { + "type": "bool", + "name": "WantCaptureMouse" + }, + { + "type": "bool", + "name": "WantCaptureKeyboard" + }, + { + "type": "bool", + "name": "WantTextInput" + }, + { + "type": "bool", + "name": "WantSetMousePos" + }, + { + "type": "bool", + "name": "WantSaveIniSettings" + }, + { + "type": "bool", + "name": "NavActive" + }, + { + "type": "bool", + "name": "NavVisible" + }, + { + "type": "float", + "name": "Framerate" + }, + { + "type": "int", + "name": "MetricsRenderVertices" + }, + { + "type": "int", + "name": "MetricsRenderIndices" + }, + { + "type": "int", + "name": "MetricsRenderWindows" + }, + { + "type": "int", + "name": "MetricsActiveWindows" + }, + { + "type": "int", + "name": "MetricsActiveAllocations" + }, + { + "type": "ImVec2", + "name": "MouseDelta" + }, + { + "type": "ImVec2", + "name": "MousePosPrev" + }, + { + "type": "ImVec2", + "name": "MouseClickedPos[5]", + "size": 5 + }, + { + "type": "double", + "name": "MouseClickedTime[5]", + "size": 5 + }, + { + "type": "bool", + "name": "MouseClicked[5]", + "size": 5 + }, + { + "type": "bool", + "name": "MouseDoubleClicked[5]", + "size": 5 + }, + { + "type": "bool", + "name": "MouseReleased[5]", + "size": 5 + }, + { + "type": "bool", + "name": "MouseDownOwned[5]", + "size": 5 + }, + { + "type": "float", + "name": "MouseDownDuration[5]", + "size": 5 + }, + { + "type": "float", + "name": "MouseDownDurationPrev[5]", + "size": 5 + }, + { + "type": "ImVec2", + "name": "MouseDragMaxDistanceAbs[5]", + "size": 5 + }, + { + "type": "float", + "name": "MouseDragMaxDistanceSqr[5]", + "size": 5 + }, + { + "type": "float", + "name": "KeysDownDuration[512]", + "size": 512 + }, + { + "type": "float", + "name": "KeysDownDurationPrev[512]", + "size": 512 + }, + { + "type": "float", + "name": "NavInputsDownDuration[ImGuiNavInput_COUNT]", + "size": 21 + }, + { + "type": "float", + "name": "NavInputsDownDurationPrev[ImGuiNavInput_COUNT]", + "size": 21 + } + ], + "ImGuiPayload": [ + { + "type": "void*", + "name": "Data" + }, + { + "type": "int", + "name": "DataSize" + }, + { + "type": "ImGuiID", + "name": "SourceId" + }, + { + "type": "ImGuiID", + "name": "SourceParentId" + }, + { + "type": "int", + "name": "DataFrameCount" + }, + { + "type": "char", + "name": "DataType[32+1]", + "size": 33 + }, + { + "type": "bool", + "name": "Preview" + }, + { + "type": "bool", + "name": "Delivery" + } + ], + "ImColor": [ + { + "type": "ImVec4", + "name": "Value" + } + ], + "ImGuiSizeCallbackData": [ + { + "type": "void*", + "name": "UserData" + }, + { + "type": "ImVec2", + "name": "Pos" + }, + { + "type": "ImVec2", + "name": "CurrentSize" + }, + { + "type": "ImVec2", + "name": "DesiredSize" + } + ], + "ImGuiTextFilter": [ + { + "type": "char", + "name": "InputBuf[256]", + "size": 256 + }, + { + "type": "ImVector/**/", + "name": "Filters" + }, + { + "type": "int", + "name": "CountGrep" + } + ], + "ImGuiInputTextCallbackData": [ + { + "type": "ImGuiInputTextFlags", + "name": "EventFlag" + }, + { + "type": "ImGuiInputTextFlags", + "name": "Flags" + }, + { + "type": "void*", + "name": "UserData" + }, + { + "type": "ImWchar", + "name": "EventChar" + }, + { + "type": "ImGuiKey", + "name": "EventKey" + }, + { + "type": "char*", + "name": "Buf" + }, + { + "type": "int", + "name": "BufTextLen" + }, + { + "type": "int", + "name": "BufSize" + }, + { + "type": "bool", + "name": "BufDirty" + }, + { + "type": "int", + "name": "CursorPos" + }, + { + "type": "int", + "name": "SelectionStart" + }, + { + "type": "int", + "name": "SelectionEnd" + } + ], + "ImVec2": [ + { + "type": "float", + "name": "x" + }, + { + "type": "float", + "name": "y" + } + ] + } +} \ No newline at end of file diff --git a/src/ImGui.NET.SampleProgram.XNA/DrawVertDeclaration.cs b/src/ImGui.NET.SampleProgram.XNA/DrawVertDeclaration.cs index 633d640..d846e7d 100644 --- a/src/ImGui.NET.SampleProgram.XNA/DrawVertDeclaration.cs +++ b/src/ImGui.NET.SampleProgram.XNA/DrawVertDeclaration.cs @@ -10,7 +10,7 @@ namespace ImGuiNET.SampleProgram.XNA static DrawVertDeclaration() { - unsafe { Size = sizeof(DrawVert); } + unsafe { Size = sizeof(ImDrawVert); } Declaration = new VertexDeclaration( Size, diff --git a/src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs b/src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs index aaba78a..199b753 100644 --- a/src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs +++ b/src/ImGui.NET.SampleProgram.XNA/ImGuiRenderer.cs @@ -41,6 +41,9 @@ namespace ImGuiNET.SampleProgram.XNA public ImGuiRenderer(Game game) { + var context = ImGui.CreateContext(); + ImGui.SetCurrentContext(context); + _game = game ?? throw new ArgumentNullException(nameof(game)); _graphicsDevice = game.GraphicsDevice; @@ -64,18 +67,18 @@ namespace ImGuiNET.SampleProgram.XNA /// /// Creates a texture and loads the font data from ImGui. Should be called when the is initialized but before any rendering is done /// - public virtual void RebuildFontAtlas() + public virtual unsafe void RebuildFontAtlas() { // Get font texture from ImGui var io = ImGui.GetIO(); - var texData = io.FontAtlas.GetTexDataAsRGBA32(); + io.Fonts.GetTexDataAsRGBA32(out byte* pixelData, out int width, out int height, out int bytesPerPixel); // Copy the data to a managed array - var pixels = new byte[texData.Width * texData.Height * texData.BytesPerPixel]; - unsafe { Marshal.Copy(new IntPtr(texData.Pixels), pixels, 0, pixels.Length); } + var pixels = new byte[width * height * bytesPerPixel]; + unsafe { Marshal.Copy(new IntPtr(pixelData), pixels, 0, pixels.Length); } // Create and register the texture as an XNA texture - var tex2d = new Texture2D(_graphicsDevice, texData.Width, texData.Height, false, SurfaceFormat.Color); + var tex2d = new Texture2D(_graphicsDevice, width, height, false, SurfaceFormat.Color); tex2d.SetData(pixels); // Should a texture already have been build previously, unbind it first so it can be deallocated @@ -85,8 +88,8 @@ namespace ImGuiNET.SampleProgram.XNA _fontTextureId = BindTexture(tex2d); // Let ImGui know where to find the texture - io.FontAtlas.SetTexID(_fontTextureId.Value); - io.FontAtlas.ClearTexData(); // Clears CPU side texture data + io.Fonts.SetTexID(_fontTextureId.Value); + io.Fonts.ClearTexData(); // Clears CPU side texture data } /// @@ -142,32 +145,32 @@ namespace ImGuiNET.SampleProgram.XNA { var io = ImGui.GetIO(); - _keys.Add(io.KeyMap[GuiKey.Tab] = (int)Keys.Tab); - _keys.Add(io.KeyMap[GuiKey.LeftArrow] = (int)Keys.Left); - _keys.Add(io.KeyMap[GuiKey.RightArrow] = (int)Keys.Right); - _keys.Add(io.KeyMap[GuiKey.UpArrow] = (int)Keys.Up); - _keys.Add(io.KeyMap[GuiKey.DownArrow] = (int)Keys.Down); - _keys.Add(io.KeyMap[GuiKey.PageUp] = (int)Keys.PageUp); - _keys.Add(io.KeyMap[GuiKey.PageDown] = (int)Keys.PageDown); - _keys.Add(io.KeyMap[GuiKey.Home] = (int)Keys.Home); - _keys.Add(io.KeyMap[GuiKey.End] = (int)Keys.End); - _keys.Add(io.KeyMap[GuiKey.Delete] = (int)Keys.Delete); - _keys.Add(io.KeyMap[GuiKey.Backspace] = (int)Keys.Back); - _keys.Add(io.KeyMap[GuiKey.Enter] = (int)Keys.Enter); - _keys.Add(io.KeyMap[GuiKey.Escape] = (int)Keys.Escape); - _keys.Add(io.KeyMap[GuiKey.A] = (int)Keys.A); - _keys.Add(io.KeyMap[GuiKey.C] = (int)Keys.C); - _keys.Add(io.KeyMap[GuiKey.V] = (int)Keys.V); - _keys.Add(io.KeyMap[GuiKey.X] = (int)Keys.X); - _keys.Add(io.KeyMap[GuiKey.Y] = (int)Keys.Y); - _keys.Add(io.KeyMap[GuiKey.Z] = (int)Keys.Z); + _keys.Add(io.KeyMap[(int)ImGuiKey.Tab] = (int)Keys.Tab); + _keys.Add(io.KeyMap[(int)ImGuiKey.LeftArrow] = (int)Keys.Left); + _keys.Add(io.KeyMap[(int)ImGuiKey.RightArrow] = (int)Keys.Right); + _keys.Add(io.KeyMap[(int)ImGuiKey.UpArrow] = (int)Keys.Up); + _keys.Add(io.KeyMap[(int)ImGuiKey.DownArrow] = (int)Keys.Down); + _keys.Add(io.KeyMap[(int)ImGuiKey.PageUp] = (int)Keys.PageUp); + _keys.Add(io.KeyMap[(int)ImGuiKey.PageDown] = (int)Keys.PageDown); + _keys.Add(io.KeyMap[(int)ImGuiKey.Home] = (int)Keys.Home); + _keys.Add(io.KeyMap[(int)ImGuiKey.End] = (int)Keys.End); + _keys.Add(io.KeyMap[(int)ImGuiKey.Delete] = (int)Keys.Delete); + _keys.Add(io.KeyMap[(int)ImGuiKey.Backspace] = (int)Keys.Back); + _keys.Add(io.KeyMap[(int)ImGuiKey.Enter] = (int)Keys.Enter); + _keys.Add(io.KeyMap[(int)ImGuiKey.Escape] = (int)Keys.Escape); + _keys.Add(io.KeyMap[(int)ImGuiKey.A] = (int)Keys.A); + _keys.Add(io.KeyMap[(int)ImGuiKey.C] = (int)Keys.C); + _keys.Add(io.KeyMap[(int)ImGuiKey.V] = (int)Keys.V); + _keys.Add(io.KeyMap[(int)ImGuiKey.X] = (int)Keys.X); + _keys.Add(io.KeyMap[(int)ImGuiKey.Y] = (int)Keys.Y); + _keys.Add(io.KeyMap[(int)ImGuiKey.Z] = (int)Keys.Z); // MonoGame-specific ////////////////////// _game.Window.TextInput += (s, a) => { if (a.Character == '\t') return; - ImGui.AddInputCharacter(a.Character); + io.AddInputCharacter(a.Character); }; /////////////////////////////////////////// @@ -180,7 +183,7 @@ namespace ImGuiNET.SampleProgram.XNA //}; /////////////////////////////////////////// - ImGui.GetIO().FontAtlas.AddDefaultFont(); + ImGui.GetIO().Fonts.AddFontDefault(); } /// @@ -225,15 +228,15 @@ namespace ImGuiNET.SampleProgram.XNA io.KeysDown[_keys[i]] = keyboard.IsKeyDown((Keys)_keys[i]); } - io.ShiftPressed = keyboard.IsKeyDown(Keys.LeftShift) || keyboard.IsKeyDown(Keys.RightShift); - io.CtrlPressed = keyboard.IsKeyDown(Keys.LeftControl) || keyboard.IsKeyDown(Keys.RightControl); - io.AltPressed = keyboard.IsKeyDown(Keys.LeftAlt) || keyboard.IsKeyDown(Keys.RightAlt); - io.SuperPressed = keyboard.IsKeyDown(Keys.LeftWindows) || keyboard.IsKeyDown(Keys.RightWindows); + io.KeyShift = keyboard.IsKeyDown(Keys.LeftShift) || keyboard.IsKeyDown(Keys.RightShift); + io.KeyCtrl = keyboard.IsKeyDown(Keys.LeftControl) || keyboard.IsKeyDown(Keys.RightControl); + io.KeyAlt = keyboard.IsKeyDown(Keys.LeftAlt) || keyboard.IsKeyDown(Keys.RightAlt); + io.KeySuper = keyboard.IsKeyDown(Keys.LeftWindows) || keyboard.IsKeyDown(Keys.RightWindows); io.DisplaySize = new System.Numerics.Vector2(_graphicsDevice.PresentationParameters.BackBufferWidth, _graphicsDevice.PresentationParameters.BackBufferHeight); io.DisplayFramebufferScale = new System.Numerics.Vector2(1f, 1f); - io.MousePosition = new System.Numerics.Vector2(mouse.X, mouse.Y); + io.MousePos = new System.Numerics.Vector2(mouse.X, mouse.Y); io.MouseDown[0] = mouse.LeftButton == ButtonState.Pressed; io.MouseDown[1] = mouse.RightButton == ButtonState.Pressed; @@ -251,7 +254,7 @@ namespace ImGuiNET.SampleProgram.XNA /// /// Gets the geometry as set up by ImGui and sends it to the graphics device /// - private unsafe void RenderDrawData(DrawData* drawData) + private void RenderDrawData(ImDrawDataPtr drawData) { // Setup render state: alpha-blending enabled, no face culling, no depth testing, scissor enabled, vertex/texcoord/color pointers var lastViewport = _graphicsDevice.Viewport; @@ -263,7 +266,7 @@ namespace ImGuiNET.SampleProgram.XNA _graphicsDevice.DepthStencilState = DepthStencilState.DepthRead; // Handle cases of screen coordinates != from framebuffer coordinates (e.g. retina displays) - ImGui.ScaleClipRects(drawData, ImGui.GetIO().DisplayFramebufferScale); + drawData.ScaleClipRects(ImGui.GetIO().DisplayFramebufferScale); // Setup projection _graphicsDevice.Viewport = new Viewport(0, 0, _graphicsDevice.PresentationParameters.BackBufferWidth, _graphicsDevice.PresentationParameters.BackBufferHeight); @@ -277,23 +280,28 @@ namespace ImGuiNET.SampleProgram.XNA _graphicsDevice.ScissorRectangle = lastScissorBox; } - private unsafe void UpdateBuffers(DrawData* drawData) + private unsafe void UpdateBuffers(ImDrawDataPtr drawData) { + if (drawData.TotalVtxCount == 0) + { + return; + } + // Expand buffers if we need more room - if (drawData->TotalVtxCount > _vertexBufferSize) + if (drawData.TotalVtxCount > _vertexBufferSize) { _vertexBuffer?.Dispose(); - _vertexBufferSize = (int)(drawData->TotalVtxCount * 1.5f); + _vertexBufferSize = (int)(drawData.TotalVtxCount * 1.5f); _vertexBuffer = new VertexBuffer(_graphicsDevice, DrawVertDeclaration.Declaration, _vertexBufferSize, BufferUsage.None); _vertexData = new byte[_vertexBufferSize * DrawVertDeclaration.Size]; } - if (drawData->TotalIdxCount > _indexBufferSize) + if (drawData.TotalIdxCount > _indexBufferSize) { _indexBuffer?.Dispose(); - _indexBufferSize = (int)(drawData->TotalIdxCount * 1.5f); + _indexBufferSize = (int)(drawData.TotalIdxCount * 1.5f); _indexBuffer = new IndexBuffer(_graphicsDevice, IndexElementSize.SixteenBits, _indexBufferSize, BufferUsage.None); _indexData = new byte[_indexBufferSize * sizeof(ushort)]; } @@ -302,27 +310,27 @@ namespace ImGuiNET.SampleProgram.XNA int vtxOffset = 0; int idxOffset = 0; - for (int n = 0; n < drawData->CmdListsCount; n++) + for (int n = 0; n < drawData.CmdListsCount; n++) { - var cmdList = drawData->CmdLists[n]; + ImDrawListPtr cmdList = drawData.CmdListsRange[n]; fixed (void* vtxDstPtr = &_vertexData[vtxOffset * DrawVertDeclaration.Size]) fixed (void* idxDstPtr = &_indexData[idxOffset * sizeof(ushort)]) { - Buffer.MemoryCopy(cmdList->VtxBuffer.Data, vtxDstPtr, _vertexData.Length, cmdList->VtxBuffer.Size * DrawVertDeclaration.Size); - Buffer.MemoryCopy(cmdList->IdxBuffer.Data, idxDstPtr, _indexData.Length, cmdList->IdxBuffer.Size * sizeof(ushort)); + Buffer.MemoryCopy((void*)cmdList.VtxBuffer.Data, vtxDstPtr, _vertexData.Length, cmdList.VtxBuffer.Size * DrawVertDeclaration.Size); + Buffer.MemoryCopy((void*)cmdList.IdxBuffer.Data, idxDstPtr, _indexData.Length, cmdList.IdxBuffer.Size * sizeof(ushort)); } - vtxOffset += cmdList->VtxBuffer.Size; - idxOffset += cmdList->IdxBuffer.Size; + vtxOffset += cmdList.VtxBuffer.Size; + idxOffset += cmdList.IdxBuffer.Size; } // Copy the managed byte arrays to the gpu vertex- and index buffers - _vertexBuffer.SetData(_vertexData, 0, drawData->TotalVtxCount * DrawVertDeclaration.Size); - _indexBuffer.SetData(_indexData, 0, drawData->TotalIdxCount * sizeof(ushort)); + _vertexBuffer.SetData(_vertexData, 0, drawData.TotalVtxCount * DrawVertDeclaration.Size); + _indexBuffer.SetData(_indexData, 0, drawData.TotalIdxCount * sizeof(ushort)); } - private unsafe void RenderCommandLists(DrawData* drawData) + private unsafe void RenderCommandLists(ImDrawDataPtr drawData) { _graphicsDevice.SetVertexBuffer(_vertexBuffer); _graphicsDevice.Indices = _indexBuffer; @@ -330,24 +338,27 @@ namespace ImGuiNET.SampleProgram.XNA int vtxOffset = 0; int idxOffset = 0; - for (int n = 0; n < drawData->CmdListsCount; n++) + for (int n = 0; n < drawData.CmdListsCount; n++) { - var cmdList = drawData->CmdLists[n]; + ImDrawListPtr cmdList = drawData.CmdListsRange[n]; - for (int cmdi = 0; cmdi < cmdList->CmdBuffer.Size; cmdi++) + for (int cmdi = 0; cmdi < cmdList.CmdBuffer.Size; cmdi++) { - var drawCmd = &(((DrawCmd*)cmdList->CmdBuffer.Data)[cmdi]); + ImDrawCmdPtr drawCmd = cmdList.CmdBuffer[cmdi]; - if (!_loadedTextures.ContainsKey(drawCmd->TextureId)) throw new InvalidOperationException($"Could not find a texture with id '{drawCmd->TextureId}', please check your bindings"); + if (!_loadedTextures.ContainsKey(drawCmd.TextureId)) + { + throw new InvalidOperationException($"Could not find a texture with id '{drawCmd.TextureId}', please check your bindings"); + } _graphicsDevice.ScissorRectangle = new Rectangle( - (int)drawCmd->ClipRect.X, - (int)drawCmd->ClipRect.Y, - (int)(drawCmd->ClipRect.Z - drawCmd->ClipRect.X), - (int)(drawCmd->ClipRect.W - drawCmd->ClipRect.Y) + (int)drawCmd.ClipRect.X, + (int)drawCmd.ClipRect.Y, + (int)(drawCmd.ClipRect.Z - drawCmd.ClipRect.X), + (int)(drawCmd.ClipRect.W - drawCmd.ClipRect.Y) ); - var effect = UpdateEffect(_loadedTextures[drawCmd->TextureId]); + var effect = UpdateEffect(_loadedTextures[drawCmd.TextureId]); foreach (var pass in effect.CurrentTechnique.Passes) { @@ -358,17 +369,17 @@ namespace ImGuiNET.SampleProgram.XNA primitiveType: PrimitiveType.TriangleList, baseVertex: vtxOffset, minVertexIndex: 0, - numVertices: cmdList->VtxBuffer.Size, + numVertices: cmdList.VtxBuffer.Size, startIndex: idxOffset, - primitiveCount: (int)drawCmd->ElemCount / 3 + primitiveCount: (int)drawCmd.ElemCount / 3 ); #pragma warning restore CS0618 } - idxOffset += (int)drawCmd->ElemCount; + idxOffset += (int)drawCmd.ElemCount; } - vtxOffset += cmdList->VtxBuffer.Size; + vtxOffset += cmdList.VtxBuffer.Size; } } diff --git a/src/ImGui.NET.SampleProgram.XNA/SampleGame.cs b/src/ImGui.NET.SampleProgram.XNA/SampleGame.cs index 0596007..4a6a365 100644 --- a/src/ImGui.NET.SampleProgram.XNA/SampleGame.cs +++ b/src/ImGui.NET.SampleProgram.XNA/SampleGame.cs @@ -78,13 +78,13 @@ namespace ImGuiNET.SampleProgram.XNA // Tip: if we don't call ImGui.Begin()/ImGui.End() the widgets appears in a window automatically called "Debug" { ImGui.Text("Hello, world!"); - ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, null, 1f); + ImGui.SliderFloat("float", ref f, 0.0f, 1.0f, string.Empty, 1f); ImGui.ColorEdit3("clear color", ref clear_color); if (ImGui.Button("Test Window")) show_test_window = !show_test_window; if (ImGui.Button("Another Window")) show_another_window = !show_another_window; ImGui.Text(string.Format("Application average {0:F3} ms/frame ({1:F1} FPS)", 1000f / ImGui.GetIO().Framerate, ImGui.GetIO().Framerate)); - ImGui.InputText("Text input", _textBuffer, 100, InputTextFlags.Default, null); + ImGui.InputText("Text input", _textBuffer, 100); ImGui.Text("Texture sample"); ImGui.Image(_imGuiTexture, new Num.Vector2(300, 150), Num.Vector2.Zero, Num.Vector2.One, Num.Vector4.One, Num.Vector4.One); // Here, the previously loaded texture is used @@ -93,17 +93,17 @@ namespace ImGuiNET.SampleProgram.XNA // 2. Show another simple window, this time using an explicit Begin/End pair if (show_another_window) { - ImGui.SetNextWindowSize(new Num.Vector2(200, 100), Condition.FirstUseEver); - ImGui.BeginWindow("Another Window", ref show_another_window, WindowFlags.Default); + ImGui.SetNextWindowSize(new Num.Vector2(200, 100), ImGuiCond.FirstUseEver); + ImGui.Begin("Another Window", ref show_another_window); ImGui.Text("Hello"); - ImGui.EndWindow(); + ImGui.End(); } // 3. Show the ImGui test window. Most of the sample code is in ImGui.ShowTestWindow() if (show_test_window) { - ImGui.SetNextWindowPos(new Num.Vector2(650, 20), Condition.FirstUseEver); - ImGuiNative.igShowDemoWindow(ref show_test_window); + ImGui.SetNextWindowPos(new Num.Vector2(650, 20), ImGuiCond.FirstUseEver); + ImGui.ShowDemoWindow(ref show_test_window); } } diff --git a/src/ImGui.NET.SampleProgram/ImGuiController.cs b/src/ImGui.NET.SampleProgram/ImGuiController.cs index f081f03..acd2189 100644 --- a/src/ImGui.NET.SampleProgram/ImGuiController.cs +++ b/src/ImGui.NET.SampleProgram/ImGuiController.cs @@ -4,6 +4,7 @@ using System.Numerics; using System.Reflection; using System.IO; using Veldrid; +using System.Runtime.CompilerServices; namespace ImGuiNET { @@ -34,6 +35,7 @@ namespace ImGuiNET private bool _controlDown; private bool _shiftDown; private bool _altDown; + private bool _winKeyDown; private int _windowWidth; private int _windowHeight; @@ -49,7 +51,7 @@ namespace ImGuiNET private int _lastAssignedID = 100; /// - /// Constructs a new ImGuiRenderer. + /// Constructs a new ImGuiController. /// public ImGuiController(GraphicsDevice gd, OutputDescription outputDescription, int width, int height) { @@ -57,10 +59,13 @@ namespace ImGuiNET _windowWidth = width; _windowHeight = height; - ImGui.GetIO().FontAtlas.AddDefaultFont(); + IntPtr context = ImGui.CreateContext(); + ImGui.SetCurrentContext(context); + + ImGui.GetIO().Fonts.AddFontDefault(); CreateDeviceResources(gd, outputDescription); - SetOpenTKKeyMappings(); + SetKeyMappings(); SetPerFrameImGuiData(1f / 60f); @@ -241,16 +246,17 @@ namespace ImGuiNET /// public unsafe void RecreateFontDeviceTexture(GraphicsDevice gd) { - IO io = ImGui.GetIO(); + ImGuiIOPtr io = ImGui.GetIO(); // Build - FontTextureData textureData = io.FontAtlas.GetTexDataAsRGBA32(); - + byte* pixels; + int width, height, bytesPerPixel; + io.Fonts.GetTexDataAsRGBA32(out pixels, out width, out height, out bytesPerPixel); // Store our identifier - io.FontAtlas.SetTexID(_fontAtlasID); + io.Fonts.SetTexID(_fontAtlasID); _fontTexture = gd.ResourceFactory.CreateTexture(TextureDescription.Texture2D( - (uint)textureData.Width, - (uint)textureData.Height, + (uint)width, + (uint)height, 1, 1, PixelFormat.R8_G8_B8_A8_UNorm, @@ -258,19 +264,19 @@ namespace ImGuiNET _fontTexture.Name = "ImGui.NET Font Texture"; gd.UpdateTexture( _fontTexture, - (IntPtr)textureData.Pixels, - (uint)(textureData.BytesPerPixel * textureData.Width * textureData.Height), + (IntPtr)pixels, + (uint)(bytesPerPixel * width * height), 0, 0, 0, - (uint)textureData.Width, - (uint)textureData.Height, + (uint)width, + (uint)height, 1, 0, 0); _fontTextureView = gd.ResourceFactory.CreateTextureView(_fontTexture); - io.FontAtlas.ClearTexData(); + io.Fonts.ClearTexData(); } /// @@ -279,7 +285,7 @@ namespace ImGuiNET /// or index data has increased beyond the capacity of the existing buffers. /// A is needed to submit drawing and resource update commands. /// - public unsafe void Render(GraphicsDevice gd, CommandList cl) + public void Render(GraphicsDevice gd, CommandList cl) { if (_frameBegun) { @@ -310,9 +316,9 @@ namespace ImGuiNET /// Sets per-frame data based on the associated window. /// This is called by Update(float). /// - private unsafe void SetPerFrameImGuiData(float deltaSeconds) + private void SetPerFrameImGuiData(float deltaSeconds) { - IO io = ImGui.GetIO(); + ImGuiIOPtr io = ImGui.GetIO(); io.DisplaySize = new Vector2( _windowWidth / _scaleFactor.X, _windowHeight / _scaleFactor.Y); @@ -320,13 +326,13 @@ namespace ImGuiNET io.DeltaTime = deltaSeconds; // DeltaTime is in seconds. } - private unsafe void UpdateImGuiInput(InputSnapshot snapshot) + private void UpdateImGuiInput(InputSnapshot snapshot) { - IO io = ImGui.GetIO(); + var io = ImGui.GetIO(); Vector2 mousePosition = snapshot.MousePosition; - io.MousePosition = mousePosition; + io.MousePos = mousePosition; io.MouseDown[0] = snapshot.IsMouseDown(MouseButton.Left); io.MouseDown[1] = snapshot.IsMouseDown(MouseButton.Right); io.MouseDown[2] = snapshot.IsMouseDown(MouseButton.Middle); @@ -334,13 +340,13 @@ namespace ImGuiNET float delta = snapshot.WheelDelta; io.MouseWheel = delta; - ImGui.GetIO().MouseWheel = delta; + io.MouseWheel = delta; IReadOnlyList keyCharPresses = snapshot.KeyCharPresses; for (int i = 0; i < keyCharPresses.Count; i++) { char c = keyCharPresses[i]; - ImGui.AddInputCharacter(c); + io.AddInputCharacter(c); } IReadOnlyList keyEvents = snapshot.KeyEvents; @@ -360,143 +366,145 @@ namespace ImGuiNET { _altDown = keyEvent.Down; } + if (keyEvent.Key == Key.WinLeft) + { + _winKeyDown = keyEvent.Down; + } } - io.CtrlPressed = _controlDown; - io.AltPressed = _altDown; - io.ShiftPressed = _shiftDown; + io.KeyCtrl = _controlDown; + io.KeyAlt = _altDown; + io.KeyShift = _shiftDown; + io.KeySuper = _winKeyDown; } - private static unsafe void SetOpenTKKeyMappings() + private static void SetKeyMappings() { - IO io = ImGui.GetIO(); - io.KeyMap[GuiKey.Tab] = (int)Key.Tab; - io.KeyMap[GuiKey.LeftArrow] = (int)Key.Left; - io.KeyMap[GuiKey.RightArrow] = (int)Key.Right; - io.KeyMap[GuiKey.UpArrow] = (int)Key.Up; - io.KeyMap[GuiKey.DownArrow] = (int)Key.Down; - io.KeyMap[GuiKey.PageUp] = (int)Key.PageUp; - io.KeyMap[GuiKey.PageDown] = (int)Key.PageDown; - io.KeyMap[GuiKey.Home] = (int)Key.Home; - io.KeyMap[GuiKey.End] = (int)Key.End; - io.KeyMap[GuiKey.Delete] = (int)Key.Delete; - io.KeyMap[GuiKey.Backspace] = (int)Key.BackSpace; - io.KeyMap[GuiKey.Enter] = (int)Key.Enter; - io.KeyMap[GuiKey.Escape] = (int)Key.Escape; - io.KeyMap[GuiKey.A] = (int)Key.A; - io.KeyMap[GuiKey.C] = (int)Key.C; - io.KeyMap[GuiKey.V] = (int)Key.V; - io.KeyMap[GuiKey.X] = (int)Key.X; - io.KeyMap[GuiKey.Y] = (int)Key.Y; - io.KeyMap[GuiKey.Z] = (int)Key.Z; + ImGuiIOPtr io = ImGui.GetIO(); + io.KeyMap[(int)ImGuiKey.Tab] = (int)Key.Tab; + io.KeyMap[(int)ImGuiKey.LeftArrow] = (int)Key.Left; + io.KeyMap[(int)ImGuiKey.RightArrow] = (int)Key.Right; + io.KeyMap[(int)ImGuiKey.UpArrow] = (int)Key.Up; + io.KeyMap[(int)ImGuiKey.DownArrow] = (int)Key.Down; + io.KeyMap[(int)ImGuiKey.PageUp] = (int)Key.PageUp; + io.KeyMap[(int)ImGuiKey.PageDown] = (int)Key.PageDown; + io.KeyMap[(int)ImGuiKey.Home] = (int)Key.Home; + io.KeyMap[(int)ImGuiKey.End] = (int)Key.End; + io.KeyMap[(int)ImGuiKey.Delete] = (int)Key.Delete; + io.KeyMap[(int)ImGuiKey.Backspace] = (int)Key.BackSpace; + io.KeyMap[(int)ImGuiKey.Enter] = (int)Key.Enter; + io.KeyMap[(int)ImGuiKey.Escape] = (int)Key.Escape; + io.KeyMap[(int)ImGuiKey.A] = (int)Key.A; + io.KeyMap[(int)ImGuiKey.C] = (int)Key.C; + io.KeyMap[(int)ImGuiKey.V] = (int)Key.V; + io.KeyMap[(int)ImGuiKey.X] = (int)Key.X; + io.KeyMap[(int)ImGuiKey.Y] = (int)Key.Y; + io.KeyMap[(int)ImGuiKey.Z] = (int)Key.Z; } - private unsafe void RenderImDrawData(DrawData* draw_data, GraphicsDevice gd, CommandList cl) + private void RenderImDrawData(ImDrawDataPtr draw_data, GraphicsDevice gd, CommandList cl) { uint vertexOffsetInVertices = 0; uint indexOffsetInElements = 0; - if (draw_data->CmdListsCount == 0) + if (draw_data.CmdListsCount == 0) { return; } - uint totalVBSize = (uint)(draw_data->TotalVtxCount * sizeof(DrawVert)); + uint totalVBSize = (uint)(draw_data.TotalVtxCount * Unsafe.SizeOf()); if (totalVBSize > _vertexBuffer.SizeInBytes) { gd.DisposeWhenIdle(_vertexBuffer); _vertexBuffer = gd.ResourceFactory.CreateBuffer(new BufferDescription((uint)(totalVBSize * 1.5f), BufferUsage.VertexBuffer | BufferUsage.Dynamic)); } - uint totalIBSize = (uint)(draw_data->TotalIdxCount * sizeof(ushort)); + uint totalIBSize = (uint)(draw_data.TotalIdxCount * sizeof(ushort)); if (totalIBSize > _indexBuffer.SizeInBytes) { gd.DisposeWhenIdle(_indexBuffer); _indexBuffer = gd.ResourceFactory.CreateBuffer(new BufferDescription((uint)(totalIBSize * 1.5f), BufferUsage.IndexBuffer | BufferUsage.Dynamic)); } - for (int i = 0; i < draw_data->CmdListsCount; i++) + for (int i = 0; i < draw_data.CmdListsCount; i++) { - NativeDrawList* cmd_list = draw_data->CmdLists[i]; + ImDrawListPtr cmd_list = draw_data.CmdListsRange[i]; cl.UpdateBuffer( _vertexBuffer, - vertexOffsetInVertices * (uint)sizeof(DrawVert), - (IntPtr)cmd_list->VtxBuffer.Data, - (uint)(cmd_list->VtxBuffer.Size * sizeof(DrawVert))); + vertexOffsetInVertices * (uint)Unsafe.SizeOf(), + cmd_list.VtxBuffer.Data, + (uint)(cmd_list.VtxBuffer.Size * Unsafe.SizeOf())); cl.UpdateBuffer( _indexBuffer, - indexOffsetInElements * (uint)sizeof(ushort), - (IntPtr)cmd_list->IdxBuffer.Data, - (uint)(cmd_list->IdxBuffer.Size * sizeof(ushort))); + indexOffsetInElements * sizeof(ushort), + cmd_list.IdxBuffer.Data, + (uint)(cmd_list.IdxBuffer.Size * sizeof(ushort))); - vertexOffsetInVertices += (uint)cmd_list->VtxBuffer.Size; - indexOffsetInElements += (uint)cmd_list->IdxBuffer.Size; + vertexOffsetInVertices += (uint)cmd_list.VtxBuffer.Size; + indexOffsetInElements += (uint)cmd_list.IdxBuffer.Size; } // Setup orthographic projection matrix into our constant buffer - { - IO io = ImGui.GetIO(); + ImGuiIOPtr io = ImGui.GetIO(); + Matrix4x4 mvp = Matrix4x4.CreateOrthographicOffCenter( + 0f, + io.DisplaySize.X, + io.DisplaySize.Y, + 0.0f, + -1.0f, + 1.0f); - Matrix4x4 mvp = Matrix4x4.CreateOrthographicOffCenter( - 0f, - io.DisplaySize.X, - io.DisplaySize.Y, - 0.0f, - -1.0f, - 1.0f); - - _gd.UpdateBuffer(_projMatrixBuffer, 0, ref mvp); - } + _gd.UpdateBuffer(_projMatrixBuffer, 0, ref mvp); cl.SetVertexBuffer(0, _vertexBuffer); cl.SetIndexBuffer(_indexBuffer, IndexFormat.UInt16); cl.SetPipeline(_pipeline); cl.SetGraphicsResourceSet(0, _mainResourceSet); - ImGui.ScaleClipRects(draw_data, ImGui.GetIO().DisplayFramebufferScale); + draw_data.ScaleClipRects(io.DisplayFramebufferScale); // Render command lists int vtx_offset = 0; int idx_offset = 0; - for (int n = 0; n < draw_data->CmdListsCount; n++) + for (int n = 0; n < draw_data.CmdListsCount; n++) { - NativeDrawList* cmd_list = draw_data->CmdLists[n]; - for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++) + ImDrawListPtr cmd_list = draw_data.CmdListsRange[n]; + for (int cmd_i = 0; cmd_i < cmd_list.CmdBuffer.Size; cmd_i++) { - DrawCmd* pcmd = &(((DrawCmd*)cmd_list->CmdBuffer.Data)[cmd_i]); - if (pcmd->UserCallback != IntPtr.Zero) + ImDrawCmdPtr pcmd = cmd_list.CmdBuffer[cmd_i]; + if (pcmd.UserCallback != IntPtr.Zero) { throw new NotImplementedException(); } else { - if (pcmd->TextureId != IntPtr.Zero) + if (pcmd.TextureId != IntPtr.Zero) { - if (pcmd->TextureId == _fontAtlasID) + if (pcmd.TextureId == _fontAtlasID) { cl.SetGraphicsResourceSet(1, _fontTextureResourceSet); } else { - cl.SetGraphicsResourceSet(1, GetImageResourceSet(pcmd->TextureId)); + cl.SetGraphicsResourceSet(1, GetImageResourceSet(pcmd.TextureId)); } } cl.SetScissorRect( 0, - (uint)pcmd->ClipRect.X, - (uint)pcmd->ClipRect.Y, - (uint)(pcmd->ClipRect.Z - pcmd->ClipRect.X), - (uint)(pcmd->ClipRect.W - pcmd->ClipRect.Y)); + (uint)pcmd.ClipRect.X, + (uint)pcmd.ClipRect.Y, + (uint)(pcmd.ClipRect.Z - pcmd.ClipRect.X), + (uint)(pcmd.ClipRect.W - pcmd.ClipRect.Y)); - cl.DrawIndexed(pcmd->ElemCount, 1, (uint)idx_offset, vtx_offset, 0); + cl.DrawIndexed(pcmd.ElemCount, 1, (uint)idx_offset, vtx_offset, 0); } - idx_offset += (int)pcmd->ElemCount; + idx_offset += (int)pcmd.ElemCount; } - vtx_offset += cmd_list->VtxBuffer.Size; + vtx_offset += cmd_list.VtxBuffer.Size; } } diff --git a/src/ImGui.NET.SampleProgram/MemoryEditor.cs b/src/ImGui.NET.SampleProgram/MemoryEditor.cs index 5522518..5d265cc 100644 --- a/src/ImGui.NET.SampleProgram/MemoryEditor.cs +++ b/src/ImGui.NET.SampleProgram/MemoryEditor.cs @@ -57,10 +57,10 @@ namespace ImGuiNET public unsafe void Draw(string title, byte[] mem_data, int mem_size, int base_display_addr = 0) { - ImGui.SetNextWindowSize(new Vector2(500, 350), Condition.FirstUseEver); - if (!ImGui.BeginWindow(title)) + ImGui.SetNextWindowSize(new Vector2(500, 350), ImGuiCond.FirstUseEver); + if (!ImGui.Begin(title)) { - ImGui.EndWindow(); + ImGui.End(); return; } @@ -70,17 +70,17 @@ namespace ImGuiNET ImGuiNative.igSetNextWindowContentSize(new Vector2(0.0f, line_total_count * line_height)); ImGui.BeginChild("##scrolling", new Vector2(0, -ImGuiNative.igGetFrameHeightWithSpacing()), false, 0); - ImGui.PushStyleVar(StyleVar.FramePadding, new Vector2(0, 0)); - ImGui.PushStyleVar(StyleVar.ItemSpacing, new Vector2(0, 0)); + ImGui.PushStyleVar(ImGuiStyleVar.FramePadding, new Vector2(0, 0)); + ImGui.PushStyleVar(ImGuiStyleVar.ItemSpacing, new Vector2(0, 0)); int addr_digits_count = 0; for (int n = base_display_addr + mem_size - 1; n > 0; n >>= 4) addr_digits_count++; - float glyph_width = ImGui.GetTextSize("F").X; + float glyph_width = ImGui.CalcTextSize("F").X; float cell_width = glyph_width * 3; // "FF " we include trailing space in the width to easily catch clicks everywhere - var clipper = new ImGuiListClipper(line_total_count, line_height); + var clipper = new ImGuiListClipper2(line_total_count, line_height); int visible_start_addr = clipper.DisplayStart * Rows; int visible_end_addr = clipper.DisplayEnd * Rows; @@ -93,10 +93,10 @@ namespace ImGuiNET if (DataEditingAddr != -1) { - if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(GuiKey.UpArrow)) && DataEditingAddr >= Rows) { DataEditingAddr -= Rows; DataEditingTakeFocus = true; } - else if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(GuiKey.DownArrow)) && DataEditingAddr < mem_size - Rows) { DataEditingAddr += Rows; DataEditingTakeFocus = true; } - else if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(GuiKey.LeftArrow)) && DataEditingAddr > 0) { DataEditingAddr -= 1; DataEditingTakeFocus = true; } - else if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(GuiKey.RightArrow)) && DataEditingAddr < mem_size - 1) { DataEditingAddr += 1; DataEditingTakeFocus = true; } + if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(ImGuiKey.UpArrow)) && DataEditingAddr >= Rows) { DataEditingAddr -= Rows; DataEditingTakeFocus = true; } + else if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(ImGuiKey.DownArrow)) && DataEditingAddr < mem_size - Rows) { DataEditingAddr += Rows; DataEditingTakeFocus = true; } + else if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(ImGuiKey.LeftArrow)) && DataEditingAddr > 0) { DataEditingAddr -= 1; DataEditingTakeFocus = true; } + else if (ImGui.IsKeyPressed(ImGui.GetKeyIndex(ImGuiKey.RightArrow)) && DataEditingAddr < mem_size - 1) { DataEditingAddr += 1; DataEditingTakeFocus = true; } } if ((DataEditingAddr / Rows) != (data_editing_addr_backup / Rows)) { @@ -125,10 +125,11 @@ namespace ImGuiNET ImGui.PushID(addr); // FIXME: We should have a way to retrieve the text edit cursor position more easily in the API, this is rather tedious. - TextEditCallback callback = (data) => + ImGuiInputTextCallback callback = (data) => { int* p_cursor_pos = (int*)data->UserData; - if (!data->HasSelection()) + + if (ImGuiNative.ImGuiInputTextCallbackData_HasSelection(data) == 0) *p_cursor_pos = data->CursorPos; return 0; }; @@ -140,12 +141,13 @@ namespace ImGuiNET ReplaceChars(DataInput, FixedHex(mem_data[addr], 2)); ReplaceChars(AddrInput, FixedHex(base_display_addr + addr, addr_digits_count)); } - ImGui.PushItemWidth(ImGui.GetTextSize("FF").X); + ImGui.PushItemWidth(ImGui.CalcTextSize("FF").X); + + var flags = ImGuiInputTextFlags.CharsHexadecimal | ImGuiInputTextFlags.EnterReturnsTrue | ImGuiInputTextFlags.AutoSelectAll | ImGuiInputTextFlags.NoHorizontalScroll | ImGuiInputTextFlags.AlwaysInsertMode | ImGuiInputTextFlags.CallbackAlways; - var flags = InputTextFlags.CharsHexadecimal | InputTextFlags.EnterReturnsTrue | InputTextFlags.AutoSelectAll | InputTextFlags.NoHorizontalScroll | InputTextFlags.AlwaysInsertMode | InputTextFlags.CallbackAlways; - if (ImGui.InputText("##data", DataInput, 32, flags, callback, new IntPtr(&cursor_pos))) + if (ImGui.InputText("##data", DataInput, 32, flags, callback, &cursor_pos)) data_write = data_next = true; - else if (!DataEditingTakeFocus && !ImGui.IsLastItemActive()) + else if (!DataEditingTakeFocus && !ImGui.IsItemActive()) DataEditingAddr = -1; DataEditingTakeFocus = false; @@ -163,7 +165,7 @@ namespace ImGuiNET else { ImGui.Text(FixedHex(mem_data[addr], 2)); - if (AllowEdits && ImGui.IsItemHovered(HoveredFlags.Default) && ImGui.IsMouseClicked(0)) + if (AllowEdits && ImGui.IsItemHovered() && ImGui.IsMouseClicked(0)) { DataEditingTakeFocus = true; DataEditingAddr = addr; @@ -200,7 +202,7 @@ namespace ImGuiNET ImGuiNative.igAlignTextToFramePadding(); ImGui.PushItemWidth(50); - ImGuiNative.igPushAllowKeyboardFocus(false); + ImGui.PushAllowKeyboardFocus(true); int rows_backup = Rows; if (ImGui.DragInt("##rows", ref Rows, 0.2f, 4, 32, "%.0f rows")) { @@ -209,14 +211,14 @@ namespace ImGuiNET new_window_size.X += (Rows - rows_backup) * (cell_width + glyph_width); ImGui.SetWindowSize(new_window_size); } - ImGuiNative.igPopAllowKeyboardFocus(); + ImGui.PopAllowKeyboardFocus(); ImGui.PopItemWidth(); ImGui.SameLine(); ImGui.Text(string.Format(" Range {0}..{1} ", FixedHex(base_display_addr, addr_digits_count), FixedHex(base_display_addr + mem_size - 1, addr_digits_count))); ImGui.SameLine(); ImGui.PushItemWidth(70); - if (ImGui.InputText("##addr", AddrInput, 32, InputTextFlags.CharsHexadecimal | InputTextFlags.EnterReturnsTrue, null)) + if (ImGui.InputText("##addr", AddrInput, 32, ImGuiInputTextFlags.CharsHexadecimal | ImGuiInputTextFlags.EnterReturnsTrue, null)) { int goto_addr; if (TryHexParse(AddrInput, out goto_addr)) @@ -225,7 +227,7 @@ namespace ImGuiNET if (goto_addr >= 0 && goto_addr < mem_size) { ImGui.BeginChild("##scrolling"); - ImGuiNative.igSetScrollFromPosY(ImGui.GetCursorStartPos().Y + (goto_addr / Rows) * ImGuiNative.igGetTextLineHeight()); + ImGui.SetScrollFromPosY(ImGui.GetCursorStartPos().Y + (goto_addr / Rows) * ImGuiNative.igGetTextLineHeight()); ImGui.EndChild(); DataEditingAddr = goto_addr; DataEditingTakeFocus = true; @@ -234,25 +236,25 @@ namespace ImGuiNET } ImGui.PopItemWidth(); - ImGui.EndWindow(); + ImGui.End(); } } //Not a proper translation, because ImGuiListClipper uses imgui's internal api. //Thus SetCursorPosYAndSetupDummyPrevLine isn't reimplemented, but SetCursorPosY + SetNextWindowContentSize seems to be working well instead. //TODO expose clipper through newer cimgui version - internal class ImGuiListClipper + internal class ImGuiListClipper2 { public float StartPosY; public float ItemsHeight; public int ItemsCount, StepNo, DisplayStart, DisplayEnd; - public ImGuiListClipper(int items_count = -1, float items_height = -1.0f) + public ImGuiListClipper2(int items_count = -1, float items_height = -1.0f) { Begin(items_count, items_height); } - public void Begin(int count, float items_height = -1.0f) + public unsafe void Begin(int count, float items_height = -1.0f) { StartPosY = ImGuiNative.igGetCursorPosY(); ItemsHeight = items_height; @@ -261,7 +263,10 @@ namespace ImGuiNET DisplayEnd = DisplayStart = -1; if (ItemsHeight > 0.0f) { - ImGui.CalcListClipping(ItemsCount, ItemsHeight, ref DisplayStart, ref DisplayEnd); // calculate how many to clip/display + int dispStart, dispEnd; + ImGuiNative.igCalcListClipping(ItemsCount, ItemsHeight, &dispStart, &dispEnd); + DisplayStart = dispStart; + DisplayEnd = dispEnd; if (DisplayStart > 0) //SetCursorPosYAndSetupDummyPrevLine(StartPosY + DisplayStart * ItemsHeight, ItemsHeight); // advance cursor ImGuiNative.igSetCursorPosY(StartPosY + DisplayStart * ItemsHeight); diff --git a/src/ImGui.NET.SampleProgram/Program.cs b/src/ImGui.NET.SampleProgram/Program.cs index 2a8c47f..4ef47e3 100644 --- a/src/ImGui.NET.SampleProgram/Program.cs +++ b/src/ImGui.NET.SampleProgram/Program.cs @@ -5,6 +5,8 @@ using Veldrid; using Veldrid.Sdl2; using Veldrid.StartupUtilities; +using static ImGuiNET.ImGuiNative; + namespace ImGuiNET { class Program @@ -18,12 +20,15 @@ namespace ImGuiNET // UI state private static float _f = 0.0f; private static int _counter = 0; + private static int _dragInt = 0; private static Vector3 _clearColor = new Vector3(0.45f, 0.55f, 0.6f); private static bool _showDemoWindow = true; private static bool _showAnotherWindow = false; private static bool _showMemoryEditor = false; private static byte[] _memoryEditorData; + static void SetThing(out float i, float val) { i = val; } + static void Main(string[] args) { // Create window, GraphicsDevice, and all resources necessary for the demo. @@ -69,7 +74,7 @@ namespace ImGuiNET _gd.Dispose(); } - private static void SubmitUI() + private static unsafe void SubmitUI() { // Demo code adapted from the official Dear ImGui demo program: // https://github.com/ocornut/imgui/blob/master/examples/example_win32_directx11/main.cpp#L172 @@ -79,28 +84,32 @@ namespace ImGuiNET { ImGui.Text("Hello, world!"); // Display some text (you can use a format string too) ImGui.SliderFloat("float", ref _f, 0, 1, _f.ToString("0.000"), 1); // Edit 1 float using a slider from 0.0f to 1.0f - ImGui.ColorEdit3("clear color", ref _clearColor); // Edit 3 floats representing a color + //ImGui.ColorEdit3("clear color", ref _clearColor); // Edit 3 floats representing a color + + ImGui.Text($"Mouse position: {ImGui.GetMousePos()}"); ImGui.Checkbox("Demo Window", ref _showDemoWindow); // Edit bools storing our windows open/close state ImGui.Checkbox("Another Window", ref _showAnotherWindow); ImGui.Checkbox("Memory Editor", ref _showMemoryEditor); - if (ImGui.Button("Button")) // Buttons return true when clicked (NB: most widgets return true when edited/activated) _counter++; - ImGui.SameLine(); + ImGui.SameLine(0, -1); ImGui.Text($"counter = {_counter}"); - ImGui.Text($"Application average {1000.0f / ImGui.GetIO().Framerate:0.##} ms/frame ({ImGui.GetIO().Framerate:0.#} FPS)"); + ImGui.DragInt("Draggable Int", ref _dragInt); + + float framerate = ImGui.GetIO().Framerate; + ImGui.Text($"Application average {1000.0f / framerate:0.##} ms/frame ({framerate:0.#} FPS)"); } // 2. Show another simple window. In most cases you will use an explicit Begin/End pair to name your windows. if (_showAnotherWindow) { - ImGui.BeginWindow("Another Window", ref _showAnotherWindow, WindowFlags.Default); + ImGui.Begin("Another Window", ref _showAnotherWindow); ImGui.Text("Hello from another window!"); if (ImGui.Button("Close Me")) _showAnotherWindow = false; - ImGui.EndWindow(); + ImGui.End(); } // 3. Show the ImGui demo window. Most of the sample code is in ImGui.ShowDemoWindow(). Read its code to learn more about Dear ImGui! @@ -108,10 +117,13 @@ namespace ImGuiNET { // Normally user code doesn't need/want to call this because positions are saved in .ini file anyway. // Here we just want to make the demo initial state a bit more friendly! - ImGui.SetNextWindowPos(new Vector2(650, 20), Condition.FirstUseEver); - ImGuiNative.igShowDemoWindow(ref _showDemoWindow); + ImGui.SetNextWindowPos(new Vector2(650, 20), ImGuiCond.FirstUseEver); + ImGui.ShowDemoWindow(ref _showDemoWindow); } + ImGuiIOPtr io = ImGui.GetIO(); + SetThing(out io.DeltaTime, 2f); + if (_showMemoryEditor) { _memoryEditor.Draw("Memory Editor", _memoryEditorData, _memoryEditorData.Length); diff --git a/src/ImGui.NET.sln b/src/ImGui.NET.sln index 1a34b50..e3857dc 100644 --- a/src/ImGui.NET.sln +++ b/src/ImGui.NET.sln @@ -1,4 +1,4 @@ -Microsoft Visual Studio Solution File, Format Version 12.00 +Microsoft Visual Studio Solution File, Format Version 12.00 # Visual Studio 15 VisualStudioVersion = 15.0.27130.2036 MinimumVisualStudioVersion = 10.0.40219.1 @@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImGui.NET.SampleProgram", " EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ImGui.NET.SampleProgram.XNA", "ImGui.NET.SampleProgram.XNA\ImGui.NET.SampleProgram.XNA.csproj", "{3024336E-9A19-475F-A95D-60A60C0B1C0D}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodeGenerator", "CodeGenerator\CodeGenerator.csproj", "{62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -54,6 +56,18 @@ Global {3024336E-9A19-475F-A95D-60A60C0B1C0D}.Release|x64.Build.0 = Release|Any CPU {3024336E-9A19-475F-A95D-60A60C0B1C0D}.Release|x86.ActiveCfg = Release|Any CPU {3024336E-9A19-475F-A95D-60A60C0B1C0D}.Release|x86.Build.0 = Release|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Debug|Any CPU.Build.0 = Debug|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Debug|x64.ActiveCfg = Debug|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Debug|x64.Build.0 = Debug|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Debug|x86.ActiveCfg = Debug|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Debug|x86.Build.0 = Debug|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Release|Any CPU.ActiveCfg = Release|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Release|Any CPU.Build.0 = Release|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Release|x64.ActiveCfg = Release|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Release|x64.Build.0 = Release|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Release|x86.ActiveCfg = Release|Any CPU + {62A4CFE3-C5F5-45F5-AD18-3F7E6739BD09}.Release|x86.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/ImGui.NET/Bool8.cs b/src/ImGui.NET/Bool8.cs new file mode 100644 index 0000000..2258c2e --- /dev/null +++ b/src/ImGui.NET/Bool8.cs @@ -0,0 +1,21 @@ +namespace ImGuiNET +{ + public struct Bool8 + { + public readonly byte Value; + public static implicit operator bool(Bool8 b8) => b8.Value != 0; + public static implicit operator Bool8(bool b) => new Bool8(b); + + public Bool8(bool value) + { + Value = value ? (byte)1 : (byte)0; + } + + public Bool8(byte value) + { + Value = value; + } + + public override string ToString() => string.Format("{0} [{1}]", (bool)this, Value); + } +} diff --git a/src/ImGui.NET/ColorEditFlags.cs b/src/ImGui.NET/ColorEditFlags.cs deleted file mode 100644 index e55bbb5..0000000 --- a/src/ImGui.NET/ColorEditFlags.cs +++ /dev/null @@ -1,29 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Enumeration for ColorEdit3() / ColorEdit4() / ColorPicker3() / ColorPicker4() / ColorButton() - /// - public enum ColorEditFlags : int - { - Default = 0, - NoAlpha = 1 << 1, - NoPicker = 1 << 2, - NoOptions = 1 << 3, - NoSmallPreview = 1 << 4, - NoInputs = 1 << 5, - NoTooltip = 1 << 6, - NoLabel = 1 << 7, - NoSidePreview = 1 << 8, - AlphaBar = 1 << 9, - AlphaPreview = 1 << 10, - AlphaPreviewHalf = 1 << 11, - HDR = 1 << 12, - RGB = 1 << 13, - HSV = 1 << 14, - HEX = 1 << 15, - Uint8 = 1 << 16, - Float = 1 << 17, - PickerHueBar = 1 << 18, - PickerHueWheel = 1 << 19, - } -} diff --git a/src/ImGui.NET/ColorTarget.cs b/src/ImGui.NET/ColorTarget.cs deleted file mode 100644 index 26303d8..0000000 --- a/src/ImGui.NET/ColorTarget.cs +++ /dev/null @@ -1,59 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Enumeration for PushStyleColor() / PopStyleColor() - /// - public enum ColorTarget - { - Text, - TextDisabled, - WindowBg, - ChildBg, - PopupBg, - Border, - BorderShadow, - /// - /// Background of checkbox, radio button, plot, slider, text input - /// - FrameBg, - FrameBgHovered, - FrameBgActive, - TitleBg, - TitleBgCollapsed, - TitleBgActive, - MenuBarBg, - ScrollbarBg, - ScrollbarGrab, - ScrollbarGrabHovered, - ScrollbarGrabActive, - CheckMark, - SliderGrab, - SliderGrabActive, - Button, - ButtonHovered, - ButtonActive, - Header, - HeaderHovered, - HeaderActive, - Separator, - SeparatorHovered, - SeparatorActive, - ResizeGrip, - ResizeGripHovered, - ResizeGripActive, - CloseButton, - CloseButtonHovered, - CloseButtonActive, - PlotLines, - PlotLinesHovered, - PlotHistogram, - PlotHistogramHovered, - TextSelectedBg, - /// - /// darken entire screen when a modal window is active - /// - ModalWindowDarkening, - DragDropTarget, - Count, - }; -} diff --git a/src/ImGui.NET/ComboFlags.cs b/src/ImGui.NET/ComboFlags.cs deleted file mode 100644 index 7a49d8a..0000000 --- a/src/ImGui.NET/ComboFlags.cs +++ /dev/null @@ -1,27 +0,0 @@ -namespace ImGuiNET -{ - public enum ComboFlags - { - /// - /// Align the popup toward the left by default - /// - PopupAlignLeft = 1 << 0, - /// - /// Max ~4 items visible. Tip: If you want your combo popup to be a specific size you can use SetNextWindowSizeConstraints() prior to calling BeginCombo() - /// - HeightSmall = 1 << 1, - /// - /// Max ~8 items visible (default) - /// - HeightRegular = 1 << 2, - /// - /// Max ~20 items visible - /// - HeightLarge = 1 << 3, - /// - /// As many fitting items as possible - /// - HeightLargest = 1 << 4, - HeightMask_ = HeightSmall | HeightRegular | HeightLarge | HeightLargest - } -} diff --git a/src/ImGui.NET/Condition.cs b/src/ImGui.NET/Condition.cs deleted file mode 100644 index 1b8da55..0000000 --- a/src/ImGui.NET/Condition.cs +++ /dev/null @@ -1,26 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Condition flags for ImGui::SetWindow***(), SetNextWindow***(), SetNextTreeNode***() functions. - /// All those functions treat 0 as a shortcut to Always. - /// - public enum Condition - { - /// - /// Set the variable. - /// - Always = 1 << 0, - /// - /// Only set the variable on the first call per runtime session - /// - Once = 1 << 1, - /// - /// Only set the variable if the window doesn't exist in the .ini file - /// - FirstUseEver = 1 << 2, - /// - /// Only set the variable if the window is appearing after being inactive (or the first time) - /// - Appearing = 1 << 3 - } -} diff --git a/src/ImGui.NET/DragDropFlags.cs b/src/ImGui.NET/DragDropFlags.cs deleted file mode 100644 index 8d0b6c4..0000000 --- a/src/ImGui.NET/DragDropFlags.cs +++ /dev/null @@ -1,43 +0,0 @@ -namespace ImGuiNET -{ - public enum DragDropFlags - { - // BeginDragDropSource() flags - - /// - /// By default, a successful call to BeginDragDropSource opens a tooltip so you can display a preview or description of the source contents. This flag disable this behavior. - /// - SourceNoPreviewTooltip = 1 << 0, - /// - /// By default, when dragging we clear data so that IsItemHovered() will return true, to avoid subsequent user code submitting tooltips. This flag disable this behavior so you can still call IsItemHovered() on the source item. - /// - SourceNoDisableHover = 1 << 1, - /// - /// Disable the behavior that allows to open tree nodes and collapsing header by holding over them while dragging a source item. - /// - SourceNoHoldToOpenOthers = 1 << 2, - /// - /// Allow items such as Text(), Image() that have no unique identifier to be used as drag source, by manufacturing a temporary identifier based on their window-relative position. This is extremely unusual within the dear imgui ecosystem and so we made it explicit. - /// - SourceAllowNullID = 1 << 3, - /// - /// External source (from outside of imgui), won't attempt to read current item/window info. Will always return true. Only one Extern source can be active simultaneously. - /// - SourceExtern = 1 << 4, - - // AcceptDragDropPayload() flags - - /// - /// AcceptDragDropPayload() will returns true even before the mouse button is released. You can then call IsDelivery() to test if the payload needs to be delivered. - /// - AcceptBeforeDelivery = 1 << 10, - /// - /// Do not draw the default highlight rectangle when hovering over target. - /// - AcceptNoDrawDefaultRect = 1 << 11, - /// - /// For peeking ahead and inspecting the payload before delivery. - /// - AcceptPeekOnly = AcceptBeforeDelivery | AcceptNoDrawDefaultRect - } -} diff --git a/src/ImGui.NET/DrawCmd.cs b/src/ImGui.NET/DrawCmd.cs deleted file mode 100644 index 13f5db5..0000000 --- a/src/ImGui.NET/DrawCmd.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Numerics; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - /// - /// Typically, 1 command = 1 gpu draw call (unless command is a callback) - /// - [StructLayout(LayoutKind.Sequential)] - public unsafe struct DrawCmd - { - /// - /// Number of indices (multiple of 3) to be rendered as triangles. - /// Vertices are stored in the callee ImDrawList's vtx_buffer[] array, indices in idx_buffer[]. - /// - public uint ElemCount; - /// - /// Clipping rectangle (x1, y1, x2, y2) - /// - public Vector4 ClipRect; - /// - /// User-provided texture ID. Set by user in ImfontAtlas::SetTexID() for fonts or passed to Image*() functions. - /// Ignore if never using images or multiple fonts atlas. - /// - public IntPtr TextureId; - /// - /// If != NULL, call the function instead of rendering the vertices. clip_rect and texture_id will be set normally. - /// - public IntPtr UserCallback; - /// - /// The draw callback code can access this. - /// - public IntPtr UserCallbackData; - }; -} diff --git a/src/ImGui.NET/DrawData.cs b/src/ImGui.NET/DrawData.cs deleted file mode 100644 index 9d26d51..0000000 --- a/src/ImGui.NET/DrawData.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - /// - /// All draw data to render an ImGui frame - /// - [StructLayout(LayoutKind.Sequential)] - public unsafe struct DrawData - { - /// - /// Only valid after Render() is called and before the next NewFrame() is called. - /// - public byte Valid; - public NativeDrawList** CmdLists; - public int CmdListsCount; - /// - /// For convenience, sum of all cmd_lists vtx_buffer.Size - /// - public int TotalVtxCount; - /// - /// For convenience, sum of all cmd_lists idx_buffer.Size - /// - public int TotalIdxCount; - }; -} diff --git a/src/ImGui.NET/DrawList.cs b/src/ImGui.NET/DrawList.cs deleted file mode 100644 index 1b2736c..0000000 --- a/src/ImGui.NET/DrawList.cs +++ /dev/null @@ -1,190 +0,0 @@ -using System; -using System.Buffers; -using System.Numerics; -using System.Runtime.InteropServices; -using System.Text; - -namespace ImGuiNET -{ - public unsafe struct DrawList - { - private readonly NativeDrawList* _nativeDrawList; - public DrawList(NativeDrawList* nativeDrawList) - { - _nativeDrawList = nativeDrawList; - } - - public static DrawList GetForCurrentWindow() - { - return new DrawList(ImGuiNative.igGetWindowDrawList()); - } - - public void AddLine(Vector2 a, Vector2 b, uint color, float thickness) - { - ImGuiNative.ImDrawList_AddLine(_nativeDrawList, a, b, color, thickness); - } - - public void AddRect(Vector2 a, Vector2 b, uint color, float rounding, int rounding_corners, float thickness) - { - ImGuiNative.ImDrawList_AddRect(_nativeDrawList, a, b, color, rounding, rounding_corners, thickness); - } - - public void AddRectFilled(Vector2 a, Vector2 b, uint color, float rounding, int rounding_corners = ~0) - { - ImGuiNative.ImDrawList_AddRectFilled(_nativeDrawList, a, b, color, rounding, rounding_corners); - } - - public void AddRectFilledMultiColor( - Vector2 a, - Vector2 b, - uint colorUpperLeft, - uint colorUpperRight, - uint colorBottomRight, - uint colorBottomLeft) - { - ImGuiNative.ImDrawList_AddRectFilledMultiColor( - _nativeDrawList, - a, - b, - colorUpperLeft, - colorUpperRight, - colorBottomRight, - colorBottomLeft); - } - - public void AddCircle(Vector2 center, float radius, uint color, int numSegments, float thickness) - { - ImGuiNative.ImDrawList_AddCircle(_nativeDrawList, center, radius, color, numSegments, thickness); - } - - public unsafe void AddText(Vector2 position, string text, uint color) - { - // Consider using stack allocation if a newer version of Encoding is used (with byte* overloads). - int bytes = Encoding.UTF8.GetByteCount(text); - byte[] tempBytes = ArrayPool.Shared.Rent(bytes); - Encoding.UTF8.GetBytes(text, 0, text.Length, tempBytes, 0); - fixed (byte* bytePtr = &tempBytes[0]) - { - ImGuiNative.ImDrawList_AddText(_nativeDrawList, position, color, bytePtr, bytePtr + bytes); - } - ArrayPool.Shared.Return(tempBytes); - } - - public unsafe void AddImageRounded( - IntPtr userTextureID, - Vector2 a, - Vector2 b, - Vector2 uvA, - Vector2 uvB, - uint color, - float rounding, - int roundingCorners) - { - ImGuiNative.ImDrawList_AddImageRounded( - _nativeDrawList, - userTextureID.ToPointer(), - a, - b, - uvA, - uvB, - color, - rounding, - roundingCorners); - } - - public void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentClipRect) - { - ImGuiNative.ImDrawList_PushClipRect(_nativeDrawList, min, max, intersectWithCurrentClipRect ? (byte)1 : (byte)0); - } - - public void PushClipRectFullScreen() - { - ImGuiNative.ImDrawList_PushClipRectFullScreen(_nativeDrawList); - } - - public void PopClipRect() - { - ImGuiNative.ImDrawList_PopClipRect(_nativeDrawList); - } - - public void AddDrawCmd() - { - ImGuiNative.ImDrawList_AddDrawCmd(_nativeDrawList); - } - } - - /// - /// Draw command list - /// This is the low-level list of polygons that ImGui functions are filling. At the end of the frame, all command lists are passed to your ImGuiIO::RenderDrawListFn function for rendering. - /// At the moment, each ImGui window contains its own ImDrawList but they could potentially be merged in the future. - /// If you want to add custom rendering within a window, you can use ImGui::GetWindowDrawList() to access the current draw list and add your own primitives. - /// You can interleave normal ImGui:: calls and adding primitives to the current draw list. - /// All positions are in screen coordinates (0,0=top-left, 1 pixel per unit). Primitives are always added to the list and not culled (culling is done at render time and at a higher-level by ImGui:: functions). - /// - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativeDrawList - { - // This is what you have to render - - /// - /// ImVector(ImDrawCmd). - /// Commands. Typically 1 command = 1 gpu draw call. - /// - public ImVector CmdBuffer; - /// - /// ImVector(ImDrawIdx). - /// Index buffer. Each command consume ImDrawCmd::ElemCount of those - /// - public ImVector IdxBuffer; - /// - /// ImVector(ImDrawVert) - /// - public ImVector VtxBuffer; - - // [Internal, used while building lists] - /// - /// Pointer to owner window's name (if any) for debugging - /// - public IntPtr _OwnerName; - /// - /// [Internal] == VtxBuffer.Size - /// - public uint _VtxCurrentIdx; - - /// - /// [Internal] point within VtxBuffer.Data after each add command (to avoid using the ImVector operators too much) - /// - public IntPtr _VtxWritePtr; - /// - /// [Internal] point within IdxBuffer.Data after each add command (to avoid using the ImVector operators too much) - /// - public IntPtr _IdxWritePtr; - - /// - /// [Internal] - /// - public ImVector _ClipRectStack; - /// - /// [Internal] - /// - public ImVector _TextureIdStack; - /// - /// [Internal] current path building - /// - public ImVector _Path; - - /// - /// [Internal] current channel number (0) - /// - public int _ChannelsCurrent; - /// - /// [Internal] number of active channels (1+) - /// - public int _ChannelsCount; - - /// - /// [Internal] draw channels for columns API (not resized down so _ChannelsCount may be smaller than _Channels.Size) - /// - public ImVector _Channels; - } -} diff --git a/src/ImGui.NET/DrawVert.cs b/src/ImGui.NET/DrawVert.cs deleted file mode 100644 index ba2d0c4..0000000 --- a/src/ImGui.NET/DrawVert.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System.Numerics; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct DrawVert - { - public Vector2 pos; - public Vector2 uv; - public uint col; - - public const int PosOffset = 0; - public const int UVOffset = 8; - public const int ColOffset = 16; - }; -} diff --git a/src/ImGui.NET/FocusedFlags.cs b/src/ImGui.NET/FocusedFlags.cs deleted file mode 100644 index e3a018d..0000000 --- a/src/ImGui.NET/FocusedFlags.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ImGuiNET -{ - // Flags for ImGui::IsWindowFocused() - public enum FocusedFlags - { - ChildWindows = 1 << 0, // IsWindowFocused(): Return true if any children of the window is focused - RootWindow = 1 << 1, // IsWindowFocused(): Test from root window (top most parent of the current hierarchy) - RootAndChildWindows = RootWindow | ChildWindows - } -} diff --git a/src/ImGui.NET/Font.cs b/src/ImGui.NET/Font.cs deleted file mode 100644 index 5313abe..0000000 --- a/src/ImGui.NET/Font.cs +++ /dev/null @@ -1,95 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using System.Numerics; - -namespace ImGuiNET -{ - public unsafe class Font - { - public Font(NativeFont* nativePtr) - { - NativeFont = nativePtr; - } - - public NativeFont* NativeFont { get; } - } - - /// - /// Font runtime data and rendering. - /// ImFontAtlas automatically loads a default embedded font for you when you call GetTexDataAsAlpha8() or GetTexDataAsRGBA32(). - /// - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativeFont - { - [StructLayout(LayoutKind.Sequential)] - public struct Glyph - { - public ushort Codepoint; - public float XAdvance; - public float X0, Y0, X1, Y1; - public float U0, V0, U1, V1; // Texture coordinates - }; - - // Members: Hot ~62/78 bytes - /// - /// Height of characters, set during loading (don't change after loading). - /// Default value: [user-set] - /// - public float FontSize; - /// - /// Base font scale, multiplied by the per-window font scale which you can adjust with SetFontScale() - /// Default value: 1.0f. - /// - public float Scale; - /// - /// Offset font rendering by xx pixels. - /// Default value: (0.0f, 1.0f) - /// - public Vector2 DisplayOffset; - /// - /// ImVector(Glyph) - /// - public ImVector Glyphs; - - /// - /// Sparse. Glyphs->XAdvance directly indexable (more cache-friendly that reading from Glyphs, - /// for CalcTextSize functions which are often bottleneck in large UI). - /// - public ImVector IndexXAdvance; - - /// - /// Sparse. Index glyphs by Unicode code-point. - /// - public ImVector IndexLookup; - - /// - /// Equivalent to FindGlyph(FontFallbackChar) - /// - public Glyph* FallbackGlyph; - public float FallbackXAdvance; - - /// - /// Replacement glyph if one isn't found. Only set via SetFallbackChar() - /// Default value: '?' - /// - public ushort FallbackChar; - - // Members: Cold ~18/26 bytes - public int ConfigDataCount; - - /// - /// ImFontConfig*. Pointer within ImFontAtlas->ConfigData - /// - public IntPtr ConfigData; - - /// - /// ImFontAtlas* - /// - public IntPtr ContainerAtlas; // What we has been loaded into - - /// - /// Ascent: distance from top to bottom of e.g. 'A' [0..FontSize] - /// - public float Ascent, Descent; - }; -} diff --git a/src/ImGui.NET/FontAtlas.cs b/src/ImGui.NET/FontAtlas.cs deleted file mode 100644 index 35a0754..0000000 --- a/src/ImGui.NET/FontAtlas.cs +++ /dev/null @@ -1,63 +0,0 @@ -using System.Runtime.InteropServices; -using System; -using System.Numerics; - -namespace ImGuiNET -{ - // Load and rasterize multiple TTF fonts into a same texture. - // Sharing a texture for multiple fonts allows us to reduce the number of draw calls during rendering. - // We also add custom graphic data into the texture that serves for ImGui. - // 1. (Optional) Call AddFont*** functions. If you don't call any, the default font will be loaded for you. - // 2. Call GetTexDataAsAlpha8() or GetTexDataAsRGBA32() to build and retrieve pixels data. - // 3. Upload the pixels data into a texture within your graphics system. - // 4. Call SetTexID(my_tex_id); and pass the pointer/identifier to your texture. This value will be passed back to you during rendering to identify the texture. - // 5. Call ClearTexData() to free textures memory on the heap. - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativeFontAtlas - { - // Members - // (Access texture data via GetTexData*() calls which will setup a default font for you.) - - /// - /// User data to refer to the texture once it has been uploaded to user's graphic systems. - /// It ia passed back to you during rendering. - /// - public void* TexID; - /// - /// 1 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight - /// - public byte* TexPixelsAlpha8; - /// - /// 4 component per pixel, each component is unsigned 8-bit. Total size = TexWidth * TexHeight * 4 - /// - public UIntPtr TexPixelsRGBA32; - /// - /// Texture width calculated during Build(). - /// - public IntPtr TexWidth; - /// - /// Texture height calculated during Build(). - /// - public IntPtr TexHeight; - /// - /// Texture width desired by user before Build(). Must be a power-of-two. - /// If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height. - /// - public IntPtr TexDesiredWidth; - /// - /// Texture coordinates to a white pixel (part of the TexExtraData block) - /// - public Vector2 TexUvWhitePixel; - - /// - /// (ImVector(ImFont*) - /// - public ImVector Fonts; - - // Private - /// - /// ImVector(ImFontConfig). Internal data - /// - public ImVector ConfigData; - } -} diff --git a/src/ImGui.NET/FontConfig.cs b/src/ImGui.NET/FontConfig.cs deleted file mode 100644 index 60a0cec..0000000 --- a/src/ImGui.NET/FontConfig.cs +++ /dev/null @@ -1,87 +0,0 @@ -using System; -using System.Numerics; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct FontConfig - { - /// - /// TTF data - /// - public IntPtr FontData; - /// - /// TTF data size - /// - public int FontDataSize; - /// - /// TTF data ownership taken by the container ImFontAtlas (will delete memory itself). - /// Set to true. - /// - public byte FontDataOwnedByAtlas; - /// - /// 0. - /// Index of font within TTF file - /// - public int FontNo; - /// - /// Size in pixels for rasterizer. - /// - public float SizePixels; - /// - /// Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis. - /// Set to 3. - /// - public int OversampleH; - /// - /// Rasterize at higher quality for sub-pixel positioning. We don't use sub-pixel positions on the Y axis. - /// Set to 1. - /// - public int OversampleV; - /// - /// Align every character to pixel boundary (if enabled, set OversampleH/V to 1). - /// Set to false. - /// - public byte PixelSnapH; - /// - /// Extra spacing (in pixels) between glyphs. - /// Set to (0, 0). - /// - public Vector2 GlyphExtraSpacing; - /// - /// Offset all glyphs from this font input. - /// Set to (0, 0). - /// - public Vector2 GlyphOffset; - /// - /// List of Unicode range (2 value per range, values are inclusive, zero-terminated list). - /// - public char* GlyphRanges; - /// - /// Merge into previous ImFont, so you can combine multiple inputs font into one ImFont (e.g. ASCII font + icons + Japanese glyphs). - /// Set to false. - /// - public byte MergeMode; - /// - /// Settings for custom font rasterizer (e.g. ImGuiFreeType). Leave as zero if you aren't using one. - /// Defaults to 0. - /// - public uint RasterizerFlags; - /// - /// Brighten (>1.0f) or darken (<1.0f) font output. Brightening small fonts may be a good workaround to make them more readable. - /// Defaults to 1.0. - /// - public float RasterizerMultiply; - - // [Internal] - /// - /// [Internal Use Only] Name (strictly for debugging) - /// - public fixed char Name[32]; - /// - /// [Internal Use Only] - /// - public IntPtr DstFont; - }; -} diff --git a/src/ImGui.NET/Generated/CustomRect.gen.cs b/src/ImGui.NET/Generated/CustomRect.gen.cs new file mode 100644 index 0000000..c12a727 --- /dev/null +++ b/src/ImGui.NET/Generated/CustomRect.gen.cs @@ -0,0 +1,41 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct CustomRect + { + public uint ID; + public ushort Width; + public ushort Height; + public ushort X; + public ushort Y; + public float GlyphAdvanceX; + public Vector2 GlyphOffset; + public ImFont* Font; + } + public unsafe partial struct CustomRectPtr + { + public CustomRect* NativePtr { get; } + public CustomRectPtr(CustomRect* nativePtr) => NativePtr = nativePtr; + public CustomRectPtr(IntPtr nativePtr) => NativePtr = (CustomRect*)nativePtr; + public static implicit operator CustomRectPtr(CustomRect* nativePtr) => new CustomRectPtr(nativePtr); + public static implicit operator CustomRect* (CustomRectPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator CustomRectPtr(IntPtr nativePtr) => new CustomRectPtr(nativePtr); + public ref uint ID => ref Unsafe.AsRef(&NativePtr->ID); + public ref ushort Width => ref Unsafe.AsRef(&NativePtr->Width); + public ref ushort Height => ref Unsafe.AsRef(&NativePtr->Height); + public ref ushort X => ref Unsafe.AsRef(&NativePtr->X); + public ref ushort Y => ref Unsafe.AsRef(&NativePtr->Y); + public ref float GlyphAdvanceX => ref Unsafe.AsRef(&NativePtr->GlyphAdvanceX); + public ref Vector2 GlyphOffset => ref Unsafe.AsRef(&NativePtr->GlyphOffset); + public ImFontPtr Font => new ImFontPtr(NativePtr->Font); + public bool IsPacked() + { + byte ret = ImGuiNative.CustomRect_IsPacked(NativePtr); + return ret != 0; + } + } +} diff --git a/src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs b/src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs new file mode 100644 index 0000000..c4cf863 --- /dev/null +++ b/src/ImGui.NET/Generated/GlyphRangesBuilder.gen.cs @@ -0,0 +1,61 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct GlyphRangesBuilder + { + public ImVector/**/ UsedChars; + } + public unsafe partial struct GlyphRangesBuilderPtr + { + public GlyphRangesBuilder* NativePtr { get; } + public GlyphRangesBuilderPtr(GlyphRangesBuilder* nativePtr) => NativePtr = nativePtr; + public GlyphRangesBuilderPtr(IntPtr nativePtr) => NativePtr = (GlyphRangesBuilder*)nativePtr; + public static implicit operator GlyphRangesBuilderPtr(GlyphRangesBuilder* nativePtr) => new GlyphRangesBuilderPtr(nativePtr); + public static implicit operator GlyphRangesBuilder* (GlyphRangesBuilderPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator GlyphRangesBuilderPtr(IntPtr nativePtr) => new GlyphRangesBuilderPtr(nativePtr); + public ImVector UsedChars => new ImVector(NativePtr->UsedChars); + public void SetBit(int n) + { + ImGuiNative.GlyphRangesBuilder_SetBit(NativePtr, n); + } + public void AddText(string text) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text = stackalloc byte[text_byteCount + 1]; + fixed (char* text_ptr = text) + { + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + byte* native_text_end = null; + ImGuiNative.GlyphRangesBuilder_AddText(NativePtr, native_text, native_text_end); + } + public void AddRanges(ref ushort ranges) + { + fixed (ushort* native_ranges = &ranges) + { + ImGuiNative.GlyphRangesBuilder_AddRanges(NativePtr, native_ranges); + } + } + public void BuildRanges(out ImVector out_ranges) + { + fixed (ImVector* native_out_ranges = &out_ranges) + { + ImGuiNative.GlyphRangesBuilder_BuildRanges(NativePtr, native_out_ranges); + } + } + public bool GetBit(int n) + { + byte ret = ImGuiNative.GlyphRangesBuilder_GetBit(NativePtr, n); + return ret != 0; + } + public void AddChar(ushort c) + { + ImGuiNative.GlyphRangesBuilder_AddChar(NativePtr, c); + } + } +} diff --git a/src/ImGui.NET/Generated/ImColor.gen.cs b/src/ImGui.NET/Generated/ImColor.gen.cs new file mode 100644 index 0000000..024e1bd --- /dev/null +++ b/src/ImGui.NET/Generated/ImColor.gen.cs @@ -0,0 +1,42 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImColor + { + public Vector4 Value; + } + public unsafe partial struct ImColorPtr + { + public ImColor* NativePtr { get; } + public ImColorPtr(ImColor* nativePtr) => NativePtr = nativePtr; + public ImColorPtr(IntPtr nativePtr) => NativePtr = (ImColor*)nativePtr; + public static implicit operator ImColorPtr(ImColor* nativePtr) => new ImColorPtr(nativePtr); + public static implicit operator ImColor* (ImColorPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImColorPtr(IntPtr nativePtr) => new ImColorPtr(nativePtr); + public ref Vector4 Value => ref Unsafe.AsRef(&NativePtr->Value); + public void SetHSV(float h, float s, float v) + { + float a = 1.0f; + ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); + } + public void SetHSV(float h, float s, float v, float a) + { + ImGuiNative.ImColor_SetHSV(NativePtr, h, s, v, a); + } + public ImColor HSV(float h, float s, float v) + { + float a = 1.0f; + ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a); + return ret; + } + public ImColor HSV(float h, float s, float v, float a) + { + ImColor ret = ImGuiNative.ImColor_HSV(NativePtr, h, s, v, a); + return ret; + } + } +} diff --git a/src/ImGui.NET/Generated/ImDrawChannel.gen.cs b/src/ImGui.NET/Generated/ImDrawChannel.gen.cs new file mode 100644 index 0000000..d72cc42 --- /dev/null +++ b/src/ImGui.NET/Generated/ImDrawChannel.gen.cs @@ -0,0 +1,24 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawChannel + { + public ImVector/**/ CmdBuffer; + public ImVector/**/ IdxBuffer; + } + public unsafe partial struct ImDrawChannelPtr + { + public ImDrawChannel* NativePtr { get; } + public ImDrawChannelPtr(ImDrawChannel* nativePtr) => NativePtr = nativePtr; + public ImDrawChannelPtr(IntPtr nativePtr) => NativePtr = (ImDrawChannel*)nativePtr; + public static implicit operator ImDrawChannelPtr(ImDrawChannel* nativePtr) => new ImDrawChannelPtr(nativePtr); + public static implicit operator ImDrawChannel* (ImDrawChannelPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawChannelPtr(IntPtr nativePtr) => new ImDrawChannelPtr(nativePtr); + public ImPtrVector CmdBuffer => new ImPtrVector(NativePtr->CmdBuffer, Unsafe.SizeOf()); + public ImVector IdxBuffer => new ImVector(NativePtr->IdxBuffer); + } +} diff --git a/src/ImGui.NET/Generated/ImDrawCmd.gen.cs b/src/ImGui.NET/Generated/ImDrawCmd.gen.cs new file mode 100644 index 0000000..9f0dd14 --- /dev/null +++ b/src/ImGui.NET/Generated/ImDrawCmd.gen.cs @@ -0,0 +1,30 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawCmd + { + public uint ElemCount; + public Vector4 ClipRect; + public IntPtr TextureId; + public IntPtr UserCallback; + public void* UserCallbackData; + } + public unsafe partial struct ImDrawCmdPtr + { + public ImDrawCmd* NativePtr { get; } + public ImDrawCmdPtr(ImDrawCmd* nativePtr) => NativePtr = nativePtr; + public ImDrawCmdPtr(IntPtr nativePtr) => NativePtr = (ImDrawCmd*)nativePtr; + public static implicit operator ImDrawCmdPtr(ImDrawCmd* nativePtr) => new ImDrawCmdPtr(nativePtr); + public static implicit operator ImDrawCmd* (ImDrawCmdPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawCmdPtr(IntPtr nativePtr) => new ImDrawCmdPtr(nativePtr); + public ref uint ElemCount => ref Unsafe.AsRef(&NativePtr->ElemCount); + public ref Vector4 ClipRect => ref Unsafe.AsRef(&NativePtr->ClipRect); + public ref IntPtr TextureId => ref Unsafe.AsRef(&NativePtr->TextureId); + public ref IntPtr UserCallback => ref Unsafe.AsRef(&NativePtr->UserCallback); + public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; } + } +} diff --git a/src/ImGui.NET/Generated/ImDrawCornerFlags.gen.cs b/src/ImGui.NET/Generated/ImDrawCornerFlags.gen.cs new file mode 100644 index 0000000..68953f8 --- /dev/null +++ b/src/ImGui.NET/Generated/ImDrawCornerFlags.gen.cs @@ -0,0 +1,16 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImDrawCornerFlags + { + TopLeft = 1 << 0, + TopRight = 1 << 1, + BotLeft = 1 << 2, + BotRight = 1 << 3, + Top = TopLeft | TopRight, + Bot = BotLeft | BotRight, + Left = TopLeft | BotLeft, + Right = TopRight | BotRight, + All = 0xF, + } +} diff --git a/src/ImGui.NET/Generated/ImDrawData.gen.cs b/src/ImGui.NET/Generated/ImDrawData.gen.cs new file mode 100644 index 0000000..79ed72f --- /dev/null +++ b/src/ImGui.NET/Generated/ImDrawData.gen.cs @@ -0,0 +1,46 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawData + { + public byte Valid; + public ImDrawList** CmdLists; + public int CmdListsCount; + public int TotalIdxCount; + public int TotalVtxCount; + public Vector2 DisplayPos; + public Vector2 DisplaySize; + } + public unsafe partial struct ImDrawDataPtr + { + public ImDrawData* NativePtr { get; } + public ImDrawDataPtr(ImDrawData* nativePtr) => NativePtr = nativePtr; + public ImDrawDataPtr(IntPtr nativePtr) => NativePtr = (ImDrawData*)nativePtr; + public static implicit operator ImDrawDataPtr(ImDrawData* nativePtr) => new ImDrawDataPtr(nativePtr); + public static implicit operator ImDrawData* (ImDrawDataPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawDataPtr(IntPtr nativePtr) => new ImDrawDataPtr(nativePtr); + public ref Bool8 Valid => ref Unsafe.AsRef(&NativePtr->Valid); + public IntPtr CmdLists { get => (IntPtr)NativePtr->CmdLists; set => NativePtr->CmdLists = (ImDrawList**)value; } + public ref int CmdListsCount => ref Unsafe.AsRef(&NativePtr->CmdListsCount); + public ref int TotalIdxCount => ref Unsafe.AsRef(&NativePtr->TotalIdxCount); + public ref int TotalVtxCount => ref Unsafe.AsRef(&NativePtr->TotalVtxCount); + public ref Vector2 DisplayPos => ref Unsafe.AsRef(&NativePtr->DisplayPos); + public ref Vector2 DisplaySize => ref Unsafe.AsRef(&NativePtr->DisplaySize); + public void ScaleClipRects(Vector2 sc) + { + ImGuiNative.ImDrawData_ScaleClipRects(NativePtr, sc); + } + public void DeIndexAllBuffers() + { + ImGuiNative.ImDrawData_DeIndexAllBuffers(NativePtr); + } + public void Clear() + { + ImGuiNative.ImDrawData_Clear(NativePtr); + } + } +} diff --git a/src/ImGui.NET/Generated/ImDrawList.gen.cs b/src/ImGui.NET/Generated/ImDrawList.gen.cs new file mode 100644 index 0000000..07bb2aa --- /dev/null +++ b/src/ImGui.NET/Generated/ImDrawList.gen.cs @@ -0,0 +1,414 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawList + { + public ImVector/**/ CmdBuffer; + public ImVector/**/ IdxBuffer; + public ImVector/**/ VtxBuffer; + public ImDrawListFlags Flags; + public IntPtr _Data; + public byte* _OwnerName; + public uint _VtxCurrentIdx; + public ImDrawVert* _VtxWritePtr; + public ushort* _IdxWritePtr; + public ImVector/**/ _ClipRectStack; + public ImVector/**/ _TextureIdStack; + public ImVector/**/ _Path; + public int _ChannelsCurrent; + public int _ChannelsCount; + public ImVector/**/ _Channels; + } + public unsafe partial struct ImDrawListPtr + { + public ImDrawList* NativePtr { get; } + public ImDrawListPtr(ImDrawList* nativePtr) => NativePtr = nativePtr; + public ImDrawListPtr(IntPtr nativePtr) => NativePtr = (ImDrawList*)nativePtr; + public static implicit operator ImDrawListPtr(ImDrawList* nativePtr) => new ImDrawListPtr(nativePtr); + public static implicit operator ImDrawList* (ImDrawListPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawListPtr(IntPtr nativePtr) => new ImDrawListPtr(nativePtr); + public ImPtrVector CmdBuffer => new ImPtrVector(NativePtr->CmdBuffer, Unsafe.SizeOf()); + public ImVector IdxBuffer => new ImVector(NativePtr->IdxBuffer); + public ImPtrVector VtxBuffer => new ImPtrVector(NativePtr->VtxBuffer, Unsafe.SizeOf()); + public ref ImDrawListFlags Flags => ref Unsafe.AsRef(&NativePtr->Flags); + public ref IntPtr _Data => ref Unsafe.AsRef(&NativePtr->_Data); + public NullTerminatedString _OwnerName => new NullTerminatedString(NativePtr->_OwnerName); + public ref uint _VtxCurrentIdx => ref Unsafe.AsRef(&NativePtr->_VtxCurrentIdx); + public ImDrawVertPtr _VtxWritePtr => new ImDrawVertPtr(NativePtr->_VtxWritePtr); + public IntPtr _IdxWritePtr { get => (IntPtr)NativePtr->_IdxWritePtr; set => NativePtr->_IdxWritePtr = (ushort*)value; } + public ImVector _ClipRectStack => new ImVector(NativePtr->_ClipRectStack); + public ImVector _TextureIdStack => new ImVector(NativePtr->_TextureIdStack); + public ImVector _Path => new ImVector(NativePtr->_Path); + public ref int _ChannelsCurrent => ref Unsafe.AsRef(&NativePtr->_ChannelsCurrent); + public ref int _ChannelsCount => ref Unsafe.AsRef(&NativePtr->_ChannelsCount); + public ImPtrVector _Channels => new ImPtrVector(NativePtr->_Channels, Unsafe.SizeOf()); + public void ChannelsSetCurrent(int channel_index) + { + ImGuiNative.ImDrawList_ChannelsSetCurrent(NativePtr, channel_index); + } + public void ChannelsSplit(int channels_count) + { + ImGuiNative.ImDrawList_ChannelsSplit(NativePtr, channels_count); + } + public void AddPolyline(ref Vector2 points, int num_points, uint col, bool closed, float thickness) + { + byte native_closed = closed ? (byte)1 : (byte)0; + fixed (Vector2* native_points = &points) + { + ImGuiNative.ImDrawList_AddPolyline(NativePtr, native_points, num_points, col, native_closed, thickness); + } + } + public void PopClipRect() + { + ImGuiNative.ImDrawList_PopClipRect(NativePtr); + } + public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) + { + byte intersect_with_current_clip_rect = 0; + ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, intersect_with_current_clip_rect); + } + public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) + { + byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; + ImGuiNative.ImDrawList_PushClipRect(NativePtr, clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); + } + public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3) + { + int num_segments = 0; + ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); + } + public void PathBezierCurveTo(Vector2 p1, Vector2 p2, Vector2 p3, int num_segments) + { + ImGuiNative.ImDrawList_PathBezierCurveTo(NativePtr, p1, p2, p3, num_segments); + } + public void UpdateTextureID() + { + ImGuiNative.ImDrawList_UpdateTextureID(NativePtr); + } + public void Clear() + { + ImGuiNative.ImDrawList_Clear(NativePtr); + } + public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness) + { + int num_segments = 0; + ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); + } + public void AddBezierCurve(Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments) + { + ImGuiNative.ImDrawList_AddBezierCurve(NativePtr, pos0, cp0, cp1, pos1, col, thickness, num_segments); + } + public void PushTextureID(IntPtr texture_id) + { + ImGuiNative.ImDrawList_PushTextureID(NativePtr, texture_id); + } + public void AddRectFilled(Vector2 a, Vector2 b, uint col) + { + float rounding = 0.0f; + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); + } + public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding) + { + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); + } + public void AddRectFilled(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags) + { + ImGuiNative.ImDrawList_AddRectFilled(NativePtr, a, b, col, rounding, rounding_corners_flags); + } + public void AddDrawCmd() + { + ImGuiNative.ImDrawList_AddDrawCmd(NativePtr); + } + public void UpdateClipRect() + { + ImGuiNative.ImDrawList_UpdateClipRect(NativePtr); + } + public void PrimVtx(Vector2 pos, Vector2 uv, uint col) + { + ImGuiNative.ImDrawList_PrimVtx(NativePtr, pos, uv, col); + } + public void PrimRect(Vector2 a, Vector2 b, uint col) + { + ImGuiNative.ImDrawList_PrimRect(NativePtr, a, b, col); + } + public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); + } + public void AddQuad(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness) + { + ImGuiNative.ImDrawList_AddQuad(NativePtr, a, b, c, d, col, thickness); + } + public void ClearFreeMemory() + { + ImGuiNative.ImDrawList_ClearFreeMemory(NativePtr); + } + public ImDrawListPtr CloneOutput() + { + ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput(NativePtr); + return new ImDrawListPtr(ret); + } + public void AddRect(Vector2 a, Vector2 b, uint col) + { + float rounding = 0.0f; + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness); + } + public void AddRect(Vector2 a, Vector2 b, uint col, float rounding) + { + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness); + } + public void AddRect(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness); + } + public void AddRect(Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags, float thickness) + { + ImGuiNative.ImDrawList_AddRect(NativePtr, a, b, col, rounding, rounding_corners_flags, thickness); + } + public void AddCallback(IntPtr callback, IntPtr callback_data) + { + void* native_callback_data = callback_data.ToPointer(); + ImGuiNative.ImDrawList_AddCallback(NativePtr, callback, native_callback_data); + } + public void PathRect(Vector2 rect_min, Vector2 rect_max) + { + float rounding = 0.0f; + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); + } + public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) + { + int rounding_corners_flags = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); + } + public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags) + { + ImGuiNative.ImDrawList_PathRect(NativePtr, rect_min, rect_max, rounding, rounding_corners_flags); + } + public void PathArcToFast(Vector2 centre, float radius, int a_min_of_12, int a_max_of_12) + { + ImGuiNative.ImDrawList_PathArcToFast(NativePtr, centre, radius, a_min_of_12, a_max_of_12); + } + public void PathStroke(uint col, bool closed) + { + byte native_closed = closed ? (byte)1 : (byte)0; + float thickness = 1.0f; + ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); + } + public void PathStroke(uint col, bool closed, float thickness) + { + byte native_closed = closed ? (byte)1 : (byte)0; + ImGuiNative.ImDrawList_PathStroke(NativePtr, col, native_closed, thickness); + } + public void PathFillConvex(uint col) + { + ImGuiNative.ImDrawList_PathFillConvex(NativePtr, col); + } + public void PathLineToMergeDuplicate(Vector2 pos) + { + ImGuiNative.ImDrawList_PathLineToMergeDuplicate(NativePtr, pos); + } + public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max) + { + int num_segments = 10; + ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); + } + public void PathArcTo(Vector2 centre, float radius, float a_min, float a_max, int num_segments) + { + ImGuiNative.ImDrawList_PathArcTo(NativePtr, centre, radius, a_min, a_max, num_segments); + } + public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) + { + fixed (Vector2* native_points = &points) + { + ImGuiNative.ImDrawList_AddConvexPolyFilled(NativePtr, native_points, num_points, col); + } + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d) + { + Vector2 uv_a = new Vector2(); + Vector2 uv_b = new Vector2(1, 0); + Vector2 uv_c = new Vector2(1, 1); + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a) + { + Vector2 uv_b = new Vector2(1, 0); + Vector2 uv_c = new Vector2(1, 1); + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b) + { + Vector2 uv_c = new Vector2(1, 1); + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c) + { + Vector2 uv_d = new Vector2(0, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d) + { + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) + { + ImGuiNative.ImDrawList_AddImageQuad(NativePtr, user_texture_id, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b) + { + Vector2 uv_a = new Vector2(); + Vector2 uv_b = new Vector2(1, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + } + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a) + { + Vector2 uv_b = new Vector2(1, 1); + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + } + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b) + { + uint col = 0xFFFFFFFF; + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + } + public void AddImage(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) + { + ImGuiNative.ImDrawList_AddImage(NativePtr, user_texture_id, a, b, uv_a, uv_b, col); + } + public void AddCircleFilled(Vector2 centre, float radius, uint col) + { + int num_segments = 12; + ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); + } + public void AddCircleFilled(Vector2 centre, float radius, uint col, int num_segments) + { + ImGuiNative.ImDrawList_AddCircleFilled(NativePtr, centre, radius, col, num_segments); + } + public void AddCircle(Vector2 centre, float radius, uint col) + { + int num_segments = 12; + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); + } + public void AddCircle(Vector2 centre, float radius, uint col, int num_segments) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); + } + public void AddCircle(Vector2 centre, float radius, uint col, int num_segments, float thickness) + { + ImGuiNative.ImDrawList_AddCircle(NativePtr, centre, radius, col, num_segments, thickness); + } + public void AddTriangleFilled(Vector2 a, Vector2 b, Vector2 c, uint col) + { + ImGuiNative.ImDrawList_AddTriangleFilled(NativePtr, a, b, c, col); + } + public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); + } + public void AddTriangle(Vector2 a, Vector2 b, Vector2 c, uint col, float thickness) + { + ImGuiNative.ImDrawList_AddTriangle(NativePtr, a, b, c, col, thickness); + } + public void AddQuadFilled(Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col) + { + ImGuiNative.ImDrawList_AddQuadFilled(NativePtr, a, b, c, d, col); + } + public void PrimReserve(int idx_count, int vtx_count) + { + ImGuiNative.ImDrawList_PrimReserve(NativePtr, idx_count, vtx_count); + } + public void AddRectFilledMultiColor(Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) + { + ImGuiNative.ImDrawList_AddRectFilledMultiColor(NativePtr, a, b, col_upr_left, col_upr_right, col_bot_right, col_bot_left); + } + public void AddLine(Vector2 a, Vector2 b, uint col) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); + } + public void AddLine(Vector2 a, Vector2 b, uint col, float thickness) + { + ImGuiNative.ImDrawList_AddLine(NativePtr, a, b, col, thickness); + } + public Vector2 GetClipRectMin() + { + Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMin(NativePtr); + return ret; + } + public void PopTextureID() + { + ImGuiNative.ImDrawList_PopTextureID(NativePtr); + } + public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) + { + ImGuiNative.ImDrawList_PrimWriteVtx(NativePtr, pos, uv, col); + } + public Vector2 GetClipRectMax() + { + Vector2 ret = ImGuiNative.ImDrawList_GetClipRectMax(NativePtr); + return ret; + } + public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding) + { + int rounding_corners = (int)ImDrawCornerFlags.All; + ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); + } + public void AddImageRounded(IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners) + { + ImGuiNative.ImDrawList_AddImageRounded(NativePtr, user_texture_id, a, b, uv_a, uv_b, col, rounding, rounding_corners); + } + public void PrimQuadUV(Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col) + { + ImGuiNative.ImDrawList_PrimQuadUV(NativePtr, a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void PathClear() + { + ImGuiNative.ImDrawList_PathClear(NativePtr); + } + public void PrimWriteIdx(ushort idx) + { + ImGuiNative.ImDrawList_PrimWriteIdx(NativePtr, idx); + } + public void PushClipRectFullScreen() + { + ImGuiNative.ImDrawList_PushClipRectFullScreen(NativePtr); + } + public void ChannelsMerge() + { + ImGuiNative.ImDrawList_ChannelsMerge(NativePtr); + } + public void PathLineTo(Vector2 pos) + { + ImGuiNative.ImDrawList_PathLineTo(NativePtr, pos); + } + public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) + { + ImGuiNative.ImDrawList_PrimRectUV(NativePtr, a, b, uv_a, uv_b, col); + } + } +} diff --git a/src/ImGui.NET/Generated/ImDrawListFlags.gen.cs b/src/ImGui.NET/Generated/ImDrawListFlags.gen.cs new file mode 100644 index 0000000..c5b0884 --- /dev/null +++ b/src/ImGui.NET/Generated/ImDrawListFlags.gen.cs @@ -0,0 +1,9 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImDrawListFlags + { + AntiAliasedLines = 1 << 0, + AntiAliasedFill = 1 << 1, + } +} diff --git a/src/ImGui.NET/Generated/ImDrawVert.gen.cs b/src/ImGui.NET/Generated/ImDrawVert.gen.cs new file mode 100644 index 0000000..6382adf --- /dev/null +++ b/src/ImGui.NET/Generated/ImDrawVert.gen.cs @@ -0,0 +1,26 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawVert + { + public Vector2 pos; + public Vector2 uv; + public uint col; + } + public unsafe partial struct ImDrawVertPtr + { + public ImDrawVert* NativePtr { get; } + public ImDrawVertPtr(ImDrawVert* nativePtr) => NativePtr = nativePtr; + public ImDrawVertPtr(IntPtr nativePtr) => NativePtr = (ImDrawVert*)nativePtr; + public static implicit operator ImDrawVertPtr(ImDrawVert* nativePtr) => new ImDrawVertPtr(nativePtr); + public static implicit operator ImDrawVert* (ImDrawVertPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawVertPtr(IntPtr nativePtr) => new ImDrawVertPtr(nativePtr); + public ref Vector2 pos => ref Unsafe.AsRef(&NativePtr->pos); + public ref Vector2 uv => ref Unsafe.AsRef(&NativePtr->uv); + public ref uint col => ref Unsafe.AsRef(&NativePtr->col); + } +} diff --git a/src/ImGui.NET/Generated/ImFont.gen.cs b/src/ImGui.NET/Generated/ImFont.gen.cs new file mode 100644 index 0000000..5f98225 --- /dev/null +++ b/src/ImGui.NET/Generated/ImFont.gen.cs @@ -0,0 +1,112 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFont + { + public float FontSize; + public float Scale; + public Vector2 DisplayOffset; + public ImVector/**/ Glyphs; + public ImVector/**/ IndexAdvanceX; + public ImVector/**/ IndexLookup; + public ImFontGlyph* FallbackGlyph; + public float FallbackAdvanceX; + public ushort FallbackChar; + public short ConfigDataCount; + public ImFontConfig* ConfigData; + public ImFontAtlas* ContainerAtlas; + public float Ascent; + public float Descent; + public byte DirtyLookupTables; + public int MetricsTotalSurface; + } + public unsafe partial struct ImFontPtr + { + public ImFont* NativePtr { get; } + public ImFontPtr(ImFont* nativePtr) => NativePtr = nativePtr; + public ImFontPtr(IntPtr nativePtr) => NativePtr = (ImFont*)nativePtr; + public static implicit operator ImFontPtr(ImFont* nativePtr) => new ImFontPtr(nativePtr); + public static implicit operator ImFont* (ImFontPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImFontPtr(IntPtr nativePtr) => new ImFontPtr(nativePtr); + public ref float FontSize => ref Unsafe.AsRef(&NativePtr->FontSize); + public ref float Scale => ref Unsafe.AsRef(&NativePtr->Scale); + public ref Vector2 DisplayOffset => ref Unsafe.AsRef(&NativePtr->DisplayOffset); + public ImPtrVector Glyphs => new ImPtrVector(NativePtr->Glyphs, Unsafe.SizeOf()); + public ImVector IndexAdvanceX => new ImVector(NativePtr->IndexAdvanceX); + public ImVector IndexLookup => new ImVector(NativePtr->IndexLookup); + public ImFontGlyphPtr FallbackGlyph => new ImFontGlyphPtr(NativePtr->FallbackGlyph); + public ref float FallbackAdvanceX => ref Unsafe.AsRef(&NativePtr->FallbackAdvanceX); + public ref ushort FallbackChar => ref Unsafe.AsRef(&NativePtr->FallbackChar); + public ref short ConfigDataCount => ref Unsafe.AsRef(&NativePtr->ConfigDataCount); + public ImFontConfigPtr ConfigData => new ImFontConfigPtr(NativePtr->ConfigData); + public ImFontAtlasPtr ContainerAtlas => new ImFontAtlasPtr(NativePtr->ContainerAtlas); + public ref float Ascent => ref Unsafe.AsRef(&NativePtr->Ascent); + public ref float Descent => ref Unsafe.AsRef(&NativePtr->Descent); + public ref Bool8 DirtyLookupTables => ref Unsafe.AsRef(&NativePtr->DirtyLookupTables); + public ref int MetricsTotalSurface => ref Unsafe.AsRef(&NativePtr->MetricsTotalSurface); + public void AddRemapChar(ushort dst, ushort src) + { + byte overwrite_dst = 1; + ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, overwrite_dst); + } + public void AddRemapChar(ushort dst, ushort src, bool overwrite_dst) + { + byte native_overwrite_dst = overwrite_dst ? (byte)1 : (byte)0; + ImGuiNative.ImFont_AddRemapChar(NativePtr, dst, src, native_overwrite_dst); + } + public void AddGlyph(ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) + { + ImGuiNative.ImFont_AddGlyph(NativePtr, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); + } + public void GrowIndex(int new_size) + { + ImGuiNative.ImFont_GrowIndex(NativePtr, new_size); + } + public ImFontGlyphPtr FindGlyphNoFallback(ushort c) + { + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback(NativePtr, c); + return new ImFontGlyphPtr(ret); + } + public bool IsLoaded() + { + byte ret = ImGuiNative.ImFont_IsLoaded(NativePtr); + return ret != 0; + } + public float GetCharAdvance(ushort c) + { + float ret = ImGuiNative.ImFont_GetCharAdvance(NativePtr, c); + return ret; + } + public void SetFallbackChar(ushort c) + { + ImGuiNative.ImFont_SetFallbackChar(NativePtr, c); + } + public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c) + { + ImDrawList* native_draw_list = draw_list.NativePtr; + ImGuiNative.ImFont_RenderChar(NativePtr, native_draw_list, size, pos, col, c); + } + public ImFontGlyphPtr FindGlyph(ushort c) + { + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph(NativePtr, c); + return new ImFontGlyphPtr(ret); + } + public string GetDebugName() + { + byte* ret = ImGuiNative.ImFont_GetDebugName(NativePtr); + return Util.StringFromPtr(ret); + } + public void BuildLookupTable() + { + ImGuiNative.ImFont_BuildLookupTable(NativePtr); + } + public void ClearOutputData() + { + ImGuiNative.ImFont_ClearOutputData(NativePtr); + } + } +} diff --git a/src/ImGui.NET/Generated/ImFontAtlas.gen.cs b/src/ImGui.NET/Generated/ImFontAtlas.gen.cs new file mode 100644 index 0000000..dc430cd --- /dev/null +++ b/src/ImGui.NET/Generated/ImFontAtlas.gen.cs @@ -0,0 +1,386 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFontAtlas + { + public byte Locked; + public ImFontAtlasFlags Flags; + public IntPtr TexID; + public int TexDesiredWidth; + public int TexGlyphPadding; + public byte* TexPixelsAlpha8; + public uint* TexPixelsRGBA32; + public int TexWidth; + public int TexHeight; + public Vector2 TexUvScale; + public Vector2 TexUvWhitePixel; + public ImVector/**/ Fonts; + public ImVector/**/ CustomRects; + public ImVector/**/ ConfigData; + public fixed int CustomRectIds[1]; + } + public unsafe partial struct ImFontAtlasPtr + { + public ImFontAtlas* NativePtr { get; } + public ImFontAtlasPtr(ImFontAtlas* nativePtr) => NativePtr = nativePtr; + public ImFontAtlasPtr(IntPtr nativePtr) => NativePtr = (ImFontAtlas*)nativePtr; + public static implicit operator ImFontAtlasPtr(ImFontAtlas* nativePtr) => new ImFontAtlasPtr(nativePtr); + public static implicit operator ImFontAtlas* (ImFontAtlasPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImFontAtlasPtr(IntPtr nativePtr) => new ImFontAtlasPtr(nativePtr); + public ref Bool8 Locked => ref Unsafe.AsRef(&NativePtr->Locked); + public ref ImFontAtlasFlags Flags => ref Unsafe.AsRef(&NativePtr->Flags); + public ref IntPtr TexID => ref Unsafe.AsRef(&NativePtr->TexID); + public ref int TexDesiredWidth => ref Unsafe.AsRef(&NativePtr->TexDesiredWidth); + public ref int TexGlyphPadding => ref Unsafe.AsRef(&NativePtr->TexGlyphPadding); + public IntPtr TexPixelsAlpha8 { get => (IntPtr)NativePtr->TexPixelsAlpha8; set => NativePtr->TexPixelsAlpha8 = (byte*)value; } + public IntPtr TexPixelsRGBA32 { get => (IntPtr)NativePtr->TexPixelsRGBA32; set => NativePtr->TexPixelsRGBA32 = (uint*)value; } + public ref int TexWidth => ref Unsafe.AsRef(&NativePtr->TexWidth); + public ref int TexHeight => ref Unsafe.AsRef(&NativePtr->TexHeight); + public ref Vector2 TexUvScale => ref Unsafe.AsRef(&NativePtr->TexUvScale); + public ref Vector2 TexUvWhitePixel => ref Unsafe.AsRef(&NativePtr->TexUvWhitePixel); + public ImVector Fonts => new ImVector(NativePtr->Fonts); + public ImVector CustomRects => new ImVector(NativePtr->CustomRects); + public ImPtrVector ConfigData => new ImPtrVector(NativePtr->ConfigData, Unsafe.SizeOf()); + public RangeAccessor CustomRectIds => new RangeAccessor(NativePtr->CustomRectIds, 1); + public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels) + { + int compressed_font_data_base85_byteCount = Encoding.UTF8.GetByteCount(compressed_font_data_base85); + byte* native_compressed_font_data_base85 = stackalloc byte[compressed_font_data_base85_byteCount + 1]; + fixed (char* compressed_font_data_base85_ptr = compressed_font_data_base85) + { + int native_compressed_font_data_base85_offset = Encoding.UTF8.GetBytes(compressed_font_data_base85_ptr, compressed_font_data_base85.Length, native_compressed_font_data_base85, compressed_font_data_base85_byteCount); + native_compressed_font_data_base85[native_compressed_font_data_base85_offset] = 0; + } + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg) + { + int compressed_font_data_base85_byteCount = Encoding.UTF8.GetByteCount(compressed_font_data_base85); + byte* native_compressed_font_data_base85 = stackalloc byte[compressed_font_data_base85_byteCount + 1]; + fixed (char* compressed_font_data_base85_ptr = compressed_font_data_base85) + { + int native_compressed_font_data_base85_offset = Encoding.UTF8.GetBytes(compressed_font_data_base85_ptr, compressed_font_data_base85.Length, native_compressed_font_data_base85, compressed_font_data_base85_byteCount); + native_compressed_font_data_base85[native_compressed_font_data_base85_offset] = 0; + } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, native_font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg, ref ushort glyph_ranges) + { + int compressed_font_data_base85_byteCount = Encoding.UTF8.GetByteCount(compressed_font_data_base85); + byte* native_compressed_font_data_base85 = stackalloc byte[compressed_font_data_base85_byteCount + 1]; + fixed (char* compressed_font_data_base85_ptr = compressed_font_data_base85) + { + int native_compressed_font_data_base85_offset = Encoding.UTF8.GetBytes(compressed_font_data_base85_ptr, compressed_font_data_base85.Length, native_compressed_font_data_base85, compressed_font_data_base85_byteCount); + native_compressed_font_data_base85[native_compressed_font_data_base85_offset] = 0; + } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + fixed (ushort* native_glyph_ranges = &glyph_ranges) + { + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativePtr, native_compressed_font_data_base85, size_pixels, native_font_cfg, native_glyph_ranges); + return new ImFontPtr(ret); + } + } + public bool Build() + { + byte ret = ImGuiNative.ImFontAtlas_Build(NativePtr); + return ret != 0; + } + public ImFontPtr AddFont(ImFontConfigPtr font_cfg) + { + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFont(NativePtr, native_font_cfg); + return new ImFontPtr(ret); + } + public void CalcCustomRectUV(ref CustomRect rect, out Vector2 out_uv_min, out Vector2 out_uv_max) + { + fixed (CustomRect* native_rect = &rect) + { + fixed (Vector2* native_out_uv_min = &out_uv_min) + { + fixed (Vector2* native_out_uv_max = &out_uv_max) + { + ImGuiNative.ImFontAtlas_CalcCustomRectUV(NativePtr, native_rect, native_out_uv_min, native_out_uv_max); + } + } + } + } + public CustomRect* GetCustomRectByIndex(int index) + { + CustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex(NativePtr, index); + return ret; + } + public int AddCustomRectRegular(uint id, int width, int height) + { + int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular(NativePtr, id, width, height); + return ret; + } + public bool IsBuilt() + { + byte ret = ImGuiNative.ImFontAtlas_IsBuilt(NativePtr); + return ret != 0; + } + public ushort* GetGlyphRangesThai() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai(NativePtr); + return ret; + } + public ushort* GetGlyphRangesCyrillic() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic(NativePtr); + return ret; + } + public ushort* GetGlyphRangesChineseSimplifiedCommon() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(NativePtr); + return ret; + } + public ushort* GetGlyphRangesChineseFull() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull(NativePtr); + return ret; + } + public ushort* GetGlyphRangesDefault() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault(NativePtr); + return ret; + } + public void SetTexID(IntPtr id) + { + ImGuiNative.ImFontAtlas_SetTexID(NativePtr, id); + } + public void ClearTexData() + { + ImGuiNative.ImFontAtlas_ClearTexData(NativePtr); + } + public void ClearFonts() + { + ImGuiNative.ImFontAtlas_ClearFonts(NativePtr); + } + public void Clear() + { + ImGuiNative.ImFontAtlas_Clear(NativePtr); + } + public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels) + { + void* native_compressed_font_data = compressed_font_data.ToPointer(); + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg) + { + void* native_compressed_font_data = compressed_font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfigPtr font_cfg, ref ushort glyph_ranges) + { + void* native_compressed_font_data = compressed_font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + fixed (ushort* native_glyph_ranges = &glyph_ranges) + { + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF(NativePtr, native_compressed_font_data, compressed_font_size, size_pixels, native_font_cfg, native_glyph_ranges); + return new ImFontPtr(ret); + } + } + public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels) + { + void* native_font_data = font_data.ToPointer(); + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg) + { + void* native_font_data = font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryTTF(IntPtr font_data, int font_size, float size_pixels, ImFontConfigPtr font_cfg, ref ushort glyph_ranges) + { + void* native_font_data = font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + fixed (ushort* native_glyph_ranges = &glyph_ranges) + { + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(NativePtr, native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges); + return new ImFontPtr(ret); + } + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels) + { + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename = stackalloc byte[filename_byteCount + 1]; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg) + { + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename = stackalloc byte[filename_byteCount + 1]; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, glyph_ranges); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg, ref ushort glyph_ranges) + { + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename = stackalloc byte[filename_byteCount + 1]; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + fixed (ushort* native_glyph_ranges = &glyph_ranges) + { + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(NativePtr, native_filename, size_pixels, native_font_cfg, native_glyph_ranges); + return new ImFontPtr(ret); + } + } + public ImFontPtr AddFontDefault() + { + ImFontConfig* font_cfg = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, font_cfg); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontDefault(ImFontConfigPtr font_cfg) + { + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault(NativePtr, native_font_cfg); + return new ImFontPtr(ret); + } + public ushort* GetGlyphRangesJapanese() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese(NativePtr); + return ret; + } + public void GetTexDataAsAlpha8(out byte* out_pixels, out int out_width, out int out_height) + { + int* out_bytes_per_pixel = null; + fixed (byte** native_out_pixels = &out_pixels) + { + fixed (int* native_out_width = &out_width) + { + fixed (int* native_out_height = &out_height) + { + ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + } + } + } + } + public void GetTexDataAsAlpha8(out byte* out_pixels, out int out_width, out int out_height, out int out_bytes_per_pixel) + { + fixed (byte** native_out_pixels = &out_pixels) + { + fixed (int* native_out_width = &out_width) + { + fixed (int* native_out_height = &out_height) + { + fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel) + { + ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + } + } + } + } + } + public void ClearInputData() + { + ImGuiNative.ImFontAtlas_ClearInputData(NativePtr); + } + public bool GetMouseCursorTexData(ImGuiMouseCursor cursor, out Vector2 out_offset, out Vector2 out_size, out Vector2 out_uv_border, out Vector2 out_uv_fill) + { + fixed (Vector2* native_out_offset = &out_offset) + { + fixed (Vector2* native_out_size = &out_size) + { + fixed (Vector2* native_out_uv_border = &out_uv_border) + { + fixed (Vector2* native_out_uv_fill = &out_uv_fill) + { + byte ret = ImGuiNative.ImFontAtlas_GetMouseCursorTexData(NativePtr, cursor, native_out_offset, native_out_size, native_out_uv_border, native_out_uv_fill); + return ret != 0; + } + } + } + } + } + public ushort* GetGlyphRangesKorean() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean(NativePtr); + return ret; + } + public void GetTexDataAsRGBA32(out byte* out_pixels, out int out_width, out int out_height) + { + int* out_bytes_per_pixel = null; + fixed (byte** native_out_pixels = &out_pixels) + { + fixed (int* native_out_width = &out_width) + { + fixed (int* native_out_height = &out_height) + { + ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + } + } + } + } + public void GetTexDataAsRGBA32(out byte* out_pixels, out int out_width, out int out_height, out int out_bytes_per_pixel) + { + fixed (byte** native_out_pixels = &out_pixels) + { + fixed (int* native_out_width = &out_width) + { + fixed (int* native_out_height = &out_height) + { + fixed (int* native_out_bytes_per_pixel = &out_bytes_per_pixel) + { + ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(NativePtr, native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + } + } + } + } + } + public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x) + { + ImFont* native_font = font.NativePtr; + Vector2 offset = new Vector2(); + int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); + return ret; + } + public int AddCustomRectFontGlyph(ImFontPtr font, ushort id, int width, int height, float advance_x, Vector2 offset) + { + ImFont* native_font = font.NativePtr; + int ret = ImGuiNative.ImFontAtlas_AddCustomRectFontGlyph(NativePtr, native_font, id, width, height, advance_x, offset); + return ret; + } + } +} diff --git a/src/ImGui.NET/Generated/ImFontAtlasFlags.gen.cs b/src/ImGui.NET/Generated/ImFontAtlasFlags.gen.cs new file mode 100644 index 0000000..1a6da21 --- /dev/null +++ b/src/ImGui.NET/Generated/ImFontAtlasFlags.gen.cs @@ -0,0 +1,10 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImFontAtlasFlags + { + None = 0, + NoPowerOfTwoHeight = 1 << 0, + NoMouseCursors = 1 << 1, + } +} diff --git a/src/ImGui.NET/Generated/ImFontConfig.gen.cs b/src/ImGui.NET/Generated/ImFontConfig.gen.cs new file mode 100644 index 0000000..f31b63a --- /dev/null +++ b/src/ImGui.NET/Generated/ImFontConfig.gen.cs @@ -0,0 +1,56 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFontConfig + { + public void* FontData; + public int FontDataSize; + public byte FontDataOwnedByAtlas; + public int FontNo; + public float SizePixels; + public int OversampleH; + public int OversampleV; + public byte PixelSnapH; + public Vector2 GlyphExtraSpacing; + public Vector2 GlyphOffset; + public ushort* GlyphRanges; + public float GlyphMinAdvanceX; + public float GlyphMaxAdvanceX; + public byte MergeMode; + public uint RasterizerFlags; + public float RasterizerMultiply; + public fixed byte Name[40]; + public ImFont* DstFont; + } + public unsafe partial struct ImFontConfigPtr + { + public ImFontConfig* NativePtr { get; } + public ImFontConfigPtr(ImFontConfig* nativePtr) => NativePtr = nativePtr; + public ImFontConfigPtr(IntPtr nativePtr) => NativePtr = (ImFontConfig*)nativePtr; + public static implicit operator ImFontConfigPtr(ImFontConfig* nativePtr) => new ImFontConfigPtr(nativePtr); + public static implicit operator ImFontConfig* (ImFontConfigPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImFontConfigPtr(IntPtr nativePtr) => new ImFontConfigPtr(nativePtr); + public IntPtr FontData { get => (IntPtr)NativePtr->FontData; set => NativePtr->FontData = (void*)value; } + public ref int FontDataSize => ref Unsafe.AsRef(&NativePtr->FontDataSize); + public ref Bool8 FontDataOwnedByAtlas => ref Unsafe.AsRef(&NativePtr->FontDataOwnedByAtlas); + public ref int FontNo => ref Unsafe.AsRef(&NativePtr->FontNo); + public ref float SizePixels => ref Unsafe.AsRef(&NativePtr->SizePixels); + public ref int OversampleH => ref Unsafe.AsRef(&NativePtr->OversampleH); + public ref int OversampleV => ref Unsafe.AsRef(&NativePtr->OversampleV); + public ref Bool8 PixelSnapH => ref Unsafe.AsRef(&NativePtr->PixelSnapH); + public ref Vector2 GlyphExtraSpacing => ref Unsafe.AsRef(&NativePtr->GlyphExtraSpacing); + public ref Vector2 GlyphOffset => ref Unsafe.AsRef(&NativePtr->GlyphOffset); + public IntPtr GlyphRanges { get => (IntPtr)NativePtr->GlyphRanges; set => NativePtr->GlyphRanges = (ushort*)value; } + public ref float GlyphMinAdvanceX => ref Unsafe.AsRef(&NativePtr->GlyphMinAdvanceX); + public ref float GlyphMaxAdvanceX => ref Unsafe.AsRef(&NativePtr->GlyphMaxAdvanceX); + public ref Bool8 MergeMode => ref Unsafe.AsRef(&NativePtr->MergeMode); + public ref uint RasterizerFlags => ref Unsafe.AsRef(&NativePtr->RasterizerFlags); + public ref float RasterizerMultiply => ref Unsafe.AsRef(&NativePtr->RasterizerMultiply); + public RangeAccessor Name => new RangeAccessor(NativePtr->Name, 40); + public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont); + } +} diff --git a/src/ImGui.NET/Generated/ImFontGlyph.gen.cs b/src/ImGui.NET/Generated/ImFontGlyph.gen.cs new file mode 100644 index 0000000..f0c4e8e --- /dev/null +++ b/src/ImGui.NET/Generated/ImFontGlyph.gen.cs @@ -0,0 +1,40 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFontGlyph + { + public ushort Codepoint; + public float AdvanceX; + public float X0; + public float Y0; + public float X1; + public float Y1; + public float U0; + public float V0; + public float U1; + public float V1; + } + public unsafe partial struct ImFontGlyphPtr + { + public ImFontGlyph* NativePtr { get; } + public ImFontGlyphPtr(ImFontGlyph* nativePtr) => NativePtr = nativePtr; + public ImFontGlyphPtr(IntPtr nativePtr) => NativePtr = (ImFontGlyph*)nativePtr; + public static implicit operator ImFontGlyphPtr(ImFontGlyph* nativePtr) => new ImFontGlyphPtr(nativePtr); + public static implicit operator ImFontGlyph* (ImFontGlyphPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImFontGlyphPtr(IntPtr nativePtr) => new ImFontGlyphPtr(nativePtr); + public ref ushort Codepoint => ref Unsafe.AsRef(&NativePtr->Codepoint); + public ref float AdvanceX => ref Unsafe.AsRef(&NativePtr->AdvanceX); + public ref float X0 => ref Unsafe.AsRef(&NativePtr->X0); + public ref float Y0 => ref Unsafe.AsRef(&NativePtr->Y0); + public ref float X1 => ref Unsafe.AsRef(&NativePtr->X1); + public ref float Y1 => ref Unsafe.AsRef(&NativePtr->Y1); + public ref float U0 => ref Unsafe.AsRef(&NativePtr->U0); + public ref float V0 => ref Unsafe.AsRef(&NativePtr->V0); + public ref float U1 => ref Unsafe.AsRef(&NativePtr->U1); + public ref float V1 => ref Unsafe.AsRef(&NativePtr->V1); + } +} diff --git a/src/ImGui.NET/Generated/ImGui.gen.cs b/src/ImGui.NET/Generated/ImGui.gen.cs new file mode 100644 index 0000000..57dcc73 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGui.gen.cs @@ -0,0 +1,6907 @@ +using System; +using System.Numerics; +using System.Runtime.InteropServices; +using System.Text; + +namespace ImGuiNET +{ + public static unsafe partial class ImGui + { + public static float GetFrameHeight() + { + float ret = ImGuiNative.igGetFrameHeight(); + return ret; + } + public static IntPtr CreateContext() + { + ImFontAtlas* shared_font_atlas = null; + IntPtr ret = ImGuiNative.igCreateContext(shared_font_atlas); + return ret; + } + public static IntPtr CreateContext(ImFontAtlasPtr shared_font_atlas) + { + ImFontAtlas* native_shared_font_atlas = shared_font_atlas.NativePtr; + IntPtr ret = ImGuiNative.igCreateContext(native_shared_font_atlas); + return ret; + } + public static void TextUnformatted(string text) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text = stackalloc byte[text_byteCount + 1]; + fixed (char* text_ptr = text) + { + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + byte* native_text_end = null; + ImGuiNative.igTextUnformatted(native_text, native_text_end); + } + public static void PopFont() + { + ImGuiNative.igPopFont(); + } + public static bool Combo(string label, ref int current_item, string[] items, int items_count) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; + } + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + fixed (char* sPtr = s) + { + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + offset += 1; + native_items_data[offset] = 0; + } + } + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) + { + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + int popup_max_height_in_items = -1; + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igCombo(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); + return ret != 0; + } + } + public static bool Combo(string label, ref int current_item, string[] items, int items_count, int popup_max_height_in_items) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; + } + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + fixed (char* sPtr = s) + { + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + offset += 1; + native_items_data[offset] = 0; + } + } + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) + { + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igCombo(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); + return ret != 0; + } + } + public static bool Combo(string label, ref int current_item, string items_separated_by_zeros) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); + byte* native_items_separated_by_zeros = stackalloc byte[items_separated_by_zeros_byteCount + 1]; + fixed (char* items_separated_by_zeros_ptr = items_separated_by_zeros) + { + int native_items_separated_by_zeros_offset = Encoding.UTF8.GetBytes(items_separated_by_zeros_ptr, items_separated_by_zeros.Length, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); + native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; + } + int popup_max_height_in_items = -1; + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igComboStr(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); + return ret != 0; + } + } + public static bool Combo(string label, ref int current_item, string items_separated_by_zeros, int popup_max_height_in_items) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); + byte* native_items_separated_by_zeros = stackalloc byte[items_separated_by_zeros_byteCount + 1]; + fixed (char* items_separated_by_zeros_ptr = items_separated_by_zeros) + { + int native_items_separated_by_zeros_offset = Encoding.UTF8.GetBytes(items_separated_by_zeros_ptr, items_separated_by_zeros.Length, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); + native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; + } + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igComboStr(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); + return ret != 0; + } + } + public static void CaptureKeyboardFromApp() + { + byte capture = 1; + ImGuiNative.igCaptureKeyboardFromApp(capture); + } + public static void CaptureKeyboardFromApp(bool capture) + { + byte native_capture = capture ? (byte)1 : (byte)0; + ImGuiNative.igCaptureKeyboardFromApp(native_capture); + } + public static bool IsWindowFocused() + { + ImGuiFocusedFlags flags = 0; + byte ret = ImGuiNative.igIsWindowFocused(flags); + return ret != 0; + } + public static bool IsWindowFocused(ImGuiFocusedFlags flags) + { + byte ret = ImGuiNative.igIsWindowFocused(flags); + return ret != 0; + } + public static void Render() + { + ImGuiNative.igRender(); + } + public static bool DragFloat4(string label, ref Vector4 v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool IsMousePosValid() + { + Vector2* mouse_pos = null; + byte ret = ImGuiNative.igIsMousePosValid(mouse_pos); + return ret != 0; + } + public static bool IsMousePosValid(ref Vector2 mouse_pos) + { + fixed (Vector2* native_mouse_pos = &mouse_pos) + { + byte ret = ImGuiNative.igIsMousePosValid(native_mouse_pos); + return ret != 0; + } + } + public static Vector2 GetCursorScreenPos() + { + Vector2 ret = ImGuiNative.igGetCursorScreenPos(); + return ret; + } + public static bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert) + { + int version_str_byteCount = Encoding.UTF8.GetByteCount(version_str); + byte* native_version_str = stackalloc byte[version_str_byteCount + 1]; + fixed (char* version_str_ptr = version_str) + { + int native_version_str_offset = Encoding.UTF8.GetBytes(version_str_ptr, version_str.Length, native_version_str, version_str_byteCount); + native_version_str[native_version_str_offset] = 0; + } + byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert); + return ret != 0; + } + public static void SetScrollHere() + { + float center_y_ratio = 0.5f; + ImGuiNative.igSetScrollHere(center_y_ratio); + } + public static void SetScrollHere(float center_y_ratio) + { + ImGuiNative.igSetScrollHere(center_y_ratio); + } + public static void SetScrollY(float scroll_y) + { + ImGuiNative.igSetScrollY(scroll_y); + } + public static void SetColorEditOptions(ImGuiColorEditFlags flags) + { + ImGuiNative.igSetColorEditOptions(flags); + } + public static void SetScrollFromPosY(float pos_y) + { + float center_y_ratio = 0.5f; + ImGuiNative.igSetScrollFromPosY(pos_y, center_y_ratio); + } + public static void SetScrollFromPosY(float pos_y, float center_y_ratio) + { + ImGuiNative.igSetScrollFromPosY(pos_y, center_y_ratio); + } + public static Vector4* GetStyleColorVec4(ImGuiCol idx) + { + Vector4* ret = ImGuiNative.igGetStyleColorVec4(idx); + return ret; + } + public static bool IsMouseHoveringRect(Vector2 r_min, Vector2 r_max) + { + byte clip = 1; + byte ret = ImGuiNative.igIsMouseHoveringRect(r_min, r_max, clip); + return ret != 0; + } + public static bool IsMouseHoveringRect(Vector2 r_min, Vector2 r_max, bool clip) + { + byte native_clip = clip ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsMouseHoveringRect(r_min, r_max, native_clip); + return ret != 0; + } + public static bool DragFloat3(string label, ref Vector3 v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static void Value(string prefix, bool b) + { + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix = stackalloc byte[prefix_byteCount + 1]; + fixed (char* prefix_ptr = prefix) + { + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + byte native_b = b ? (byte)1 : (byte)0; + ImGuiNative.igValueBool(native_prefix, native_b); + } + public static void Value(string prefix, int v) + { + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix = stackalloc byte[prefix_byteCount + 1]; + fixed (char* prefix_ptr = prefix) + { + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + ImGuiNative.igValueInt(native_prefix, v); + } + public static void Value(string prefix, uint v) + { + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix = stackalloc byte[prefix_byteCount + 1]; + fixed (char* prefix_ptr = prefix) + { + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + ImGuiNative.igValueUint(native_prefix, v); + } + public static void Value(string prefix, float v) + { + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix = stackalloc byte[prefix_byteCount + 1]; + fixed (char* prefix_ptr = prefix) + { + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + byte* native_float_format = null; + ImGuiNative.igValueFloat(native_prefix, v, native_float_format); + } + public static void Value(string prefix, float v, string float_format) + { + int prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + byte* native_prefix = stackalloc byte[prefix_byteCount + 1]; + fixed (char* prefix_ptr = prefix) + { + int native_prefix_offset = Encoding.UTF8.GetBytes(prefix_ptr, prefix.Length, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + int float_format_byteCount = Encoding.UTF8.GetByteCount(float_format); + byte* native_float_format = stackalloc byte[float_format_byteCount + 1]; + fixed (char* float_format_ptr = float_format) + { + int native_float_format_offset = Encoding.UTF8.GetBytes(float_format_ptr, float_format.Length, native_float_format, float_format_byteCount); + native_float_format[native_float_format_offset] = 0; + } + ImGuiNative.igValueFloat(native_prefix, v, native_float_format); + } + public static Vector2 GetItemRectMax() + { + Vector2 ret = ImGuiNative.igGetItemRectMax(); + return ret; + } + public static bool IsItemDeactivated() + { + byte ret = ImGuiNative.igIsItemDeactivated(); + return ret != 0; + } + public static void PushStyleVar(ImGuiStyleVar idx, float val) + { + ImGuiNative.igPushStyleVarFloat(idx, val); + } + public static void PushStyleVar(ImGuiStyleVar idx, Vector2 val) + { + ImGuiNative.igPushStyleVarVec2(idx, val); + } + public static string SaveIniSettingsToMemory() + { + uint* out_ini_size = null; + byte* ret = ImGuiNative.igSaveIniSettingsToMemory(out_ini_size); + return Util.StringFromPtr(ret); + } + public static string SaveIniSettingsToMemory(out uint out_ini_size) + { + fixed (uint* native_out_ini_size = &out_ini_size) + { + byte* ret = ImGuiNative.igSaveIniSettingsToMemory(native_out_ini_size); + return Util.StringFromPtr(ret); + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed, int v_min, int v_max, string format, string format_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + byte* native_format_max = stackalloc byte[format_max_byteCount + 1]; + fixed (char* format_max_ptr = format_max) + { + int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + fixed (int* native_v_current_min = &v_current_min) + { + fixed (int* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragIntRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max); + return ret != 0; + } + } + } + public static void Unindent() + { + float indent_w = 0.0f; + ImGuiNative.igUnindent(indent_w); + } + public static void Unindent(float indent_w) + { + ImGuiNative.igUnindent(indent_w); + } + public static void PopAllowKeyboardFocus() + { + ImGuiNative.igPopAllowKeyboardFocus(); + } + public static void LoadIniSettingsFromDisk(string ini_filename) + { + int ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); + byte* native_ini_filename = stackalloc byte[ini_filename_byteCount + 1]; + fixed (char* ini_filename_ptr = ini_filename) + { + int native_ini_filename_offset = Encoding.UTF8.GetBytes(ini_filename_ptr, ini_filename.Length, native_ini_filename, ini_filename_byteCount); + native_ini_filename[native_ini_filename_offset] = 0; + } + ImGuiNative.igLoadIniSettingsFromDisk(native_ini_filename); + } + public static Vector2 GetCursorStartPos() + { + Vector2 ret = ImGuiNative.igGetCursorStartPos(); + return ret; + } + public static void SetCursorScreenPos(Vector2 screen_pos) + { + ImGuiNative.igSetCursorScreenPos(screen_pos); + } + public static bool InputInt4(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt4(native_label, native_v, extra_flags); + return ret != 0; + } + } + public static bool InputInt4(string label, ref int v, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt4(native_label, native_v, extra_flags); + return ret != 0; + } + } + public static bool IsRectVisible(Vector2 size) + { + byte ret = ImGuiNative.igIsRectVisible(size); + return ret != 0; + } + public static bool IsRectVisible(Vector2 rect_min, Vector2 rect_max) + { + byte ret = ImGuiNative.igIsRectVisibleVec2(rect_min, rect_max); + return ret != 0; + } + public static void LabelText(string label, string fmt) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igLabelText(native_label, native_fmt); + } + public static void LogFinish() + { + ImGuiNative.igLogFinish(); + } + public static bool IsKeyPressed(int user_key_index) + { + byte repeat = 1; + byte ret = ImGuiNative.igIsKeyPressed(user_key_index, repeat); + return ret != 0; + } + public static bool IsKeyPressed(int user_key_index, bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsKeyPressed(user_key_index, native_repeat); + return ret != 0; + } + public static float GetColumnOffset() + { + int column_index = -1; + float ret = ImGuiNative.igGetColumnOffset(column_index); + return ret; + } + public static float GetColumnOffset(int column_index) + { + float ret = ImGuiNative.igGetColumnOffset(column_index); + return ret; + } + public static void SetNextWindowCollapsed(bool collapsed) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetNextWindowCollapsed(native_collapsed, cond); + } + public static void SetNextWindowCollapsed(bool collapsed, ImGuiCond cond) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetNextWindowCollapsed(native_collapsed, cond); + } + public static IntPtr GetCurrentContext() + { + IntPtr ret = ImGuiNative.igGetCurrentContext(); + return ret; + } + public static bool SmallButton(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igSmallButton(native_label); + return ret != 0; + } + public static bool OpenPopupOnItemClick() + { + byte* native_str_id = null; + int mouse_button = 1; + byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + return ret != 0; + } + public static bool OpenPopupOnItemClick(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + int mouse_button = 1; + byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + return ret != 0; + } + public static bool OpenPopupOnItemClick(string str_id, int mouse_button) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte ret = ImGuiNative.igOpenPopupOnItemClick(native_str_id, mouse_button); + return ret != 0; + } + public static bool IsAnyMouseDown() + { + byte ret = ImGuiNative.igIsAnyMouseDown(); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size) + { + Vector2 uv0 = new Vector2(); + Vector2 uv1 = new Vector2(1, 1); + int frame_padding = -1; + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0) + { + Vector2 uv1 = new Vector2(1, 1); + int frame_padding = -1; + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1) + { + int frame_padding = -1; + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding) + { + Vector4 bg_col = new Vector4(); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col) + { + Vector4 tint_col = new Vector4(1, 1, 1, 1); + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static bool ImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col, Vector4 tint_col) + { + byte ret = ImGuiNative.igImageButton(user_texture_id, size, uv0, uv1, frame_padding, bg_col, tint_col); + return ret != 0; + } + public static void EndFrame() + { + ImGuiNative.igEndFrame(); + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool RadioButton(string label, bool active) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_active = active ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igRadioButtonBool(native_label, native_active); + return ret != 0; + } + public static bool RadioButton(string label, ref int v, int v_button) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igRadioButtonIntPtr(native_label, native_v, v_button); + return ret != 0; + } + } + public static bool IsItemDeactivatedAfterEdit() + { + byte ret = ImGuiNative.igIsItemDeactivatedAfterEdit(); + return ret != 0; + } + public static ImDrawListPtr GetWindowDrawList() + { + ImDrawList* ret = ImGuiNative.igGetWindowDrawList(); + return new ImDrawListPtr(ret); + } + public static void NewLine() + { + ImGuiNative.igNewLine(); + } + public static bool IsItemFocused() + { + byte ret = ImGuiNative.igIsItemFocused(); + return ret != 0; + } + public static void LoadIniSettingsFromMemory(string ini_data) + { + int ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + byte* native_ini_data = stackalloc byte[ini_data_byteCount + 1]; + fixed (char* ini_data_ptr = ini_data) + { + int native_ini_data_offset = Encoding.UTF8.GetBytes(ini_data_ptr, ini_data.Length, native_ini_data, ini_data_byteCount); + native_ini_data[native_ini_data_offset] = 0; + } + uint ini_size = 0; + ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); + } + public static void LoadIniSettingsFromMemory(string ini_data, uint ini_size) + { + int ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + byte* native_ini_data = stackalloc byte[ini_data_byteCount + 1]; + fixed (char* ini_data_ptr = ini_data) + { + int native_ini_data_offset = Encoding.UTF8.GetBytes(ini_data_ptr, ini_data.Length, native_ini_data, ini_data_byteCount); + native_ini_data[native_ini_data_offset] = 0; + } + ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); + } + public static bool SliderInt2(string label, ref int v, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool SliderInt2(string label, ref int v, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static void SetWindowSize(Vector2 size) + { + ImGuiCond cond = 0; + ImGuiNative.igSetWindowSizeVec2(size, cond); + } + public static void SetWindowSize(Vector2 size, ImGuiCond cond) + { + ImGuiNative.igSetWindowSizeVec2(size, cond); + } + public static void SetWindowSize(string name, Vector2 size) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + ImGuiCond cond = 0; + ImGuiNative.igSetWindowSizeStr(native_name, size, cond); + } + public static void SetWindowSize(string name, Vector2 size, ImGuiCond cond) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + ImGuiNative.igSetWindowSizeStr(native_name, size, cond); + } + public static bool InputFloat(string label, ref float v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float step = 0.0f; + float step_fast = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float step_fast = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step, float step_fast) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step, float step_fast, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step, float step_fast, string format, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static void ColorConvertRGBtoHSV(float r, float g, float b, out float out_h, out float out_s, out float out_v) + { + fixed (float* native_out_h = &out_h) + { + fixed (float* native_out_s = &out_s) + { + fixed (float* native_out_v = &out_v) + { + ImGuiNative.igColorConvertRGBtoHSV(r, g, b, native_out_h, native_out_s, native_out_v); + } + } + } + } + public static bool BeginMenuBar() + { + byte ret = ImGuiNative.igBeginMenuBar(); + return ret != 0; + } + public static bool IsPopupOpen(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte ret = ImGuiNative.igIsPopupOpen(native_str_id); + return ret != 0; + } + public static bool IsItemVisible() + { + byte ret = ImGuiNative.igIsItemVisible(); + return ret != 0; + } + public static void SetNextWindowSize(Vector2 size) + { + ImGuiCond cond = 0; + ImGuiNative.igSetNextWindowSize(size, cond); + } + public static void SetNextWindowSize(Vector2 size, ImGuiCond cond) + { + ImGuiNative.igSetNextWindowSize(size, cond); + } + public static void SetWindowCollapsed(bool collapsed) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); + } + public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetWindowCollapsedBool(native_collapsed, cond); + } + public static void SetWindowCollapsed(string name, bool collapsed) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); + } + public static void SetWindowCollapsed(string name, bool collapsed, ImGuiCond cond) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetWindowCollapsedStr(native_name, native_collapsed, cond); + } + public static Vector2 GetMouseDragDelta() + { + int button = 0; + float lock_threshold = -1.0f; + Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); + return ret; + } + public static Vector2 GetMouseDragDelta(int button) + { + float lock_threshold = -1.0f; + Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); + return ret; + } + public static Vector2 GetMouseDragDelta(int button, float lock_threshold) + { + Vector2 ret = ImGuiNative.igGetMouseDragDelta(button, lock_threshold); + return ret; + } + public static ImGuiPayloadPtr AcceptDragDropPayload(string type) + { + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type = stackalloc byte[type_byteCount + 1]; + fixed (char* type_ptr = type) + { + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + ImGuiDragDropFlags flags = 0; + ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); + return new ImGuiPayloadPtr(ret); + } + public static ImGuiPayloadPtr AcceptDragDropPayload(string type, ImGuiDragDropFlags flags) + { + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type = stackalloc byte[type_byteCount + 1]; + fixed (char* type_ptr = type) + { + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); + return new ImGuiPayloadPtr(ret); + } + public static bool BeginDragDropSource() + { + ImGuiDragDropFlags flags = 0; + byte ret = ImGuiNative.igBeginDragDropSource(flags); + return ret != 0; + } + public static bool BeginDragDropSource(ImGuiDragDropFlags flags) + { + byte ret = ImGuiNative.igBeginDragDropSource(flags); + return ret != 0; + } + public static void PlotLines(string label, ref float values, int values_count) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int values_offset = 0; + byte* native_overlay_text = null; + float scale_min = 3.40282347e+38F; + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte* native_overlay_text = null; + float scale_min = 3.40282347e+38F; + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + float scale_min = 3.40282347e+38F; + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static int GetFrameCount() + { + int ret = ImGuiNative.igGetFrameCount(); + return ret; + } + public static void ListBoxFooter() + { + ImGuiNative.igListBoxFooter(); + } + public static void PopClipRect() + { + ImGuiNative.igPopClipRect(); + } + public static Vector2 GetWindowSize() + { + Vector2 ret = ImGuiNative.igGetWindowSize(); + return ret; + } + public static bool CheckboxFlags(string label, ref uint flags, uint flags_value) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (uint* native_flags = &flags) + { + byte ret = ImGuiNative.igCheckboxFlags(native_label, native_flags, flags_value); + return ret != 0; + } + } + public static bool IsWindowHovered() + { + ImGuiHoveredFlags flags = 0; + byte ret = ImGuiNative.igIsWindowHovered(flags); + return ret != 0; + } + public static bool IsWindowHovered(ImGuiHoveredFlags flags) + { + byte ret = ImGuiNative.igIsWindowHovered(flags); + return ret != 0; + } + public static void PlotHistogram(string label, ref float values, int values_count) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int values_offset = 0; + byte* native_overlay_text = null; + float scale_min = 3.40282347e+38F; + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte* native_overlay_text = null; + float scale_min = 3.40282347e+38F; + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + float scale_min = 3.40282347e+38F; + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + float scale_max = 3.40282347e+38F; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + byte* native_overlay_text = stackalloc byte[overlay_text_byteCount + 1]; + fixed (char* overlay_text_ptr = overlay_text) + { + int native_overlay_text_offset = Encoding.UTF8.GetBytes(overlay_text_ptr, overlay_text.Length, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogramFloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + } + } + public static bool BeginPopupContextVoid() + { + byte* native_str_id = null; + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); + return ret != 0; + } + public static bool BeginPopupContextVoid(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); + return ret != 0; + } + public static bool BeginPopupContextVoid(string str_id, int mouse_button) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, mouse_button); + return ret != 0; + } + public static void ShowStyleEditor() + { + ImGuiStyle* @ref = null; + ImGuiNative.igShowStyleEditor(@ref); + } + public static void ShowStyleEditor(ImGuiStylePtr @ref) + { + ImGuiStyle* native_ref = @ref.NativePtr; + ImGuiNative.igShowStyleEditor(native_ref); + } + public static bool Checkbox(string label, ref bool v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_v_val = v ? (byte)1 : (byte)0; + byte* native_v = &native_v_val; + byte ret = ImGuiNative.igCheckbox(native_label, native_v); + v = native_v_val != 0; + return ret != 0; + } + public static Vector2 GetWindowPos() + { + Vector2 ret = ImGuiNative.igGetWindowPos(); + return ret; + } + public static void SetNextWindowContentSize(Vector2 size) + { + ImGuiNative.igSetNextWindowContentSize(size); + } + public static void TextColored(Vector4 col, string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igTextColored(col, native_fmt); + } + public static void LogToFile() + { + int max_depth = -1; + byte* native_filename = null; + ImGuiNative.igLogToFile(max_depth, native_filename); + } + public static void LogToFile(int max_depth) + { + byte* native_filename = null; + ImGuiNative.igLogToFile(max_depth, native_filename); + } + public static void LogToFile(int max_depth, string filename) + { + int filename_byteCount = Encoding.UTF8.GetByteCount(filename); + byte* native_filename = stackalloc byte[filename_byteCount + 1]; + fixed (char* filename_ptr = filename) + { + int native_filename_offset = Encoding.UTF8.GetBytes(filename_ptr, filename.Length, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + ImGuiNative.igLogToFile(max_depth, native_filename); + } + public static bool Button(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igButton(native_label, size); + return ret != 0; + } + public static bool Button(string label, Vector2 size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igButton(native_label, size); + return ret != 0; + } + public static bool IsItemEdited() + { + byte ret = ImGuiNative.igIsItemEdited(); + return ret != 0; + } + public static void TreeAdvanceToLabelPos() + { + ImGuiNative.igTreeAdvanceToLabelPos(); + } + public static bool DragInt2(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v, float v_speed, int v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool IsAnyItemActive() + { + byte ret = ImGuiNative.igIsAnyItemActive(); + return ret != 0; + } + public static bool MenuItem(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte* native_shortcut = null; + byte selected = 0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); + return ret != 0; + } + public static bool MenuItem(string label, string shortcut) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut = stackalloc byte[shortcut_byteCount + 1]; + fixed (char* shortcut_ptr = shortcut) + { + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + byte selected = 0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, selected, enabled); + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, bool selected) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut = stackalloc byte[shortcut_byteCount + 1]; + fixed (char* shortcut_ptr = shortcut) + { + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + byte native_selected = selected ? (byte)1 : (byte)0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, native_selected, enabled); + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, bool selected, bool enabled) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut = stackalloc byte[shortcut_byteCount + 1]; + fixed (char* shortcut_ptr = shortcut) + { + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + byte native_selected = selected ? (byte)1 : (byte)0; + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igMenuItemBool(native_label, native_shortcut, native_selected, native_enabled); + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, ref bool p_selected) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut = stackalloc byte[shortcut_byteCount + 1]; + fixed (char* shortcut_ptr = shortcut) + { + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItemBoolPtr(native_label, native_shortcut, native_p_selected, enabled); + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, ref bool p_selected, bool enabled) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + byte* native_shortcut = stackalloc byte[shortcut_byteCount + 1]; + fixed (char* shortcut_ptr = shortcut) + { + int native_shortcut_offset = Encoding.UTF8.GetBytes(shortcut_ptr, shortcut.Length, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igMenuItemBoolPtr(native_label, native_shortcut, native_p_selected, native_enabled); + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static float GetCursorPosX() + { + float ret = ImGuiNative.igGetCursorPosX(); + return ret; + } + public static int GetColumnsCount() + { + int ret = ImGuiNative.igGetColumnsCount(); + return ret; + } + public static void PopButtonRepeat() + { + ImGuiNative.igPopButtonRepeat(); + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* v_min = null; + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, v_max, native_format, power); + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, float v_speed, IntPtr v_min, IntPtr v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_v, components, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static void Spacing() + { + ImGuiNative.igSpacing(); + } + public static bool IsAnyItemFocused() + { + byte ret = ImGuiNative.igIsAnyItemFocused(); + return ret != 0; + } + public static void MemFree(IntPtr ptr) + { + void* native_ptr = ptr.ToPointer(); + ImGuiNative.igMemFree(native_ptr); + } + public static Vector2 GetFontTexUvWhitePixel() + { + Vector2 ret = ImGuiNative.igGetFontTexUvWhitePixel(); + return ret; + } + public static bool IsItemClicked() + { + int mouse_button = 0; + byte ret = ImGuiNative.igIsItemClicked(mouse_button); + return ret != 0; + } + public static bool IsItemClicked(int mouse_button) + { + byte ret = ImGuiNative.igIsItemClicked(mouse_button); + return ret != 0; + } + public static void ProgressBar(float fraction) + { + Vector2 size_arg = new Vector2(-1, 0); + byte* native_overlay = null; + ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); + } + public static void ProgressBar(float fraction, Vector2 size_arg) + { + byte* native_overlay = null; + ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); + } + public static void ProgressBar(float fraction, Vector2 size_arg, string overlay) + { + int overlay_byteCount = Encoding.UTF8.GetByteCount(overlay); + byte* native_overlay = stackalloc byte[overlay_byteCount + 1]; + fixed (char* overlay_ptr = overlay) + { + int native_overlay_offset = Encoding.UTF8.GetBytes(overlay_ptr, overlay.Length, native_overlay, overlay_byteCount); + native_overlay[native_overlay_offset] = 0; + } + ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); + } + public static void SetNextWindowBgAlpha(float alpha) + { + ImGuiNative.igSetNextWindowBgAlpha(alpha); + } + public static bool BeginPopup(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); + return ret != 0; + } + public static bool BeginPopup(string str_id, ImGuiWindowFlags flags) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); + return ret != 0; + } + public static float GetScrollX() + { + float ret = ImGuiNative.igGetScrollX(); + return ret; + } + public static int GetKeyIndex(ImGuiKey imgui_key) + { + int ret = ImGuiNative.igGetKeyIndex(imgui_key); + return ret; + } + public static ImDrawListPtr GetOverlayDrawList() + { + ImDrawList* ret = ImGuiNative.igGetOverlayDrawList(); + return new ImDrawListPtr(ret); + } + public static uint GetID(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + uint ret = ImGuiNative.igGetIDStr(native_str_id); + return ret; + } + public static uint GetID(IntPtr ptr_id) + { + void* native_ptr_id = ptr_id.ToPointer(); + uint ret = ImGuiNative.igGetIDPtr(native_ptr_id); + return ret; + } + public static bool ListBoxHeader(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); + return ret != 0; + } + public static bool ListBoxHeader(string label, Vector2 size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igListBoxHeaderVec2(native_label, size); + return ret != 0; + } + public static bool ListBoxHeader(string label, int items_count) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int height_in_items = -1; + byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); + return ret != 0; + } + public static bool ListBoxHeader(string label, int items_count, int height_in_items) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igListBoxHeaderInt(native_label, items_count, height_in_items); + return ret != 0; + } + public static bool IsMouseReleased(int button) + { + byte ret = ImGuiNative.igIsMouseReleased(button); + return ret != 0; + } + public static Vector2 GetItemRectMin() + { + Vector2 ret = ImGuiNative.igGetItemRectMin(); + return ret; + } + public static void LogText(string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igLogText(native_fmt); + } + public static void TextWrapped(string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igTextWrapped(native_fmt); + } + public static void EndGroup() + { + ImGuiNative.igEndGroup(); + } + public static ImFontPtr GetFont() + { + ImFont* ret = ImGuiNative.igGetFont(); + return new ImFontPtr(ret); + } + public static void TreePush(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + ImGuiNative.igTreePushStr(native_str_id); + } + public static void TreePush() + { + void* ptr_id = null; + ImGuiNative.igTreePushPtr(ptr_id); + } + public static void TreePush(IntPtr ptr_id) + { + void* native_ptr_id = ptr_id.ToPointer(); + ImGuiNative.igTreePushPtr(native_ptr_id); + } + public static void TextDisabled(string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igTextDisabled(native_fmt); + } + public static void SetNextTreeNodeOpen(bool is_open) + { + byte native_is_open = is_open ? (byte)1 : (byte)0; + ImGuiCond cond = 0; + ImGuiNative.igSetNextTreeNodeOpen(native_is_open, cond); + } + public static void SetNextTreeNodeOpen(bool is_open, ImGuiCond cond) + { + byte native_is_open = is_open ? (byte)1 : (byte)0; + ImGuiNative.igSetNextTreeNodeOpen(native_is_open, cond); + } + public static void LogToTTY() + { + int max_depth = -1; + ImGuiNative.igLogToTTY(max_depth); + } + public static void LogToTTY(int max_depth) + { + ImGuiNative.igLogToTTY(max_depth); + } + public static ImGuiIOPtr GetIO() + { + ImGuiIO* ret = ImGuiNative.igGetIO(); + return new ImGuiIOPtr(ret); + } + public static bool DragInt4(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed, int v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static void NextColumn() + { + ImGuiNative.igNextColumn(); + } + public static void SetCursorPos(Vector2 local_pos) + { + ImGuiNative.igSetCursorPos(local_pos); + } + public static bool BeginPopupModal(string name) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte* p_open = null; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginPopupModal(native_name, p_open, flags); + return ret != 0; + } + public static bool BeginPopupModal(string name, ref bool p_open) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginPopupModal(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool BeginPopupModal(string name, ref bool p_open, ImGuiWindowFlags flags) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + byte ret = ImGuiNative.igBeginPopupModal(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool SliderInt4(string label, ref int v, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static void ShowMetricsWindow() + { + byte* p_open = null; + ImGuiNative.igShowMetricsWindow(p_open); + } + public static void ShowMetricsWindow(ref bool p_open) + { + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiNative.igShowMetricsWindow(native_p_open); + p_open = native_p_open_val != 0; + } + public static float GetScrollMaxY() + { + float ret = ImGuiNative.igGetScrollMaxY(); + return ret; + } + public static void BeginTooltip() + { + ImGuiNative.igBeginTooltip(); + } + public static void SetScrollX(float scroll_x) + { + ImGuiNative.igSetScrollX(scroll_x); + } + public static ImDrawDataPtr GetDrawData() + { + ImDrawData* ret = ImGuiNative.igGetDrawData(); + return new ImDrawDataPtr(ret); + } + public static float GetTextLineHeight() + { + float ret = ImGuiNative.igGetTextLineHeight(); + return ret; + } + public static void Separator() + { + ImGuiNative.igSeparator(); + } + public static bool BeginChild(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + Vector2 size = new Vector2(); + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, border, flags); + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size, bool border) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte native_border = border ? (byte)1 : (byte)0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size, bool border, ImGuiWindowFlags flags) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte native_border = border ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginChild(native_str_id, size, native_border, flags); + return ret != 0; + } + public static bool BeginChild(uint id) + { + Vector2 size = new Vector2(); + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); + return ret != 0; + } + public static bool BeginChild(uint id, Vector2 size) + { + byte border = 0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildID(id, size, border, flags); + return ret != 0; + } + public static bool BeginChild(uint id, Vector2 size, bool border) + { + byte native_border = border ? (byte)1 : (byte)0; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); + return ret != 0; + } + public static bool BeginChild(uint id, Vector2 size, bool border, ImGuiWindowFlags flags) + { + byte native_border = border ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginChildID(id, size, native_border, flags); + return ret != 0; + } + public static bool IsMouseClicked(int button) + { + byte repeat = 0; + byte ret = ImGuiNative.igIsMouseClicked(button, repeat); + return ret != 0; + } + public static bool IsMouseClicked(int button, bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsMouseClicked(button, native_repeat); + return ret != 0; + } + public static float CalcItemWidth() + { + float ret = ImGuiNative.igCalcItemWidth(); + return ret; + } + public static void EndChildFrame() + { + ImGuiNative.igEndChildFrame(); + } + public static void Indent() + { + float indent_w = 0.0f; + ImGuiNative.igIndent(indent_w); + } + public static void Indent(float indent_w) + { + ImGuiNative.igIndent(indent_w); + } + public static bool SetDragDropPayload(string type, IntPtr data, uint size) + { + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type = stackalloc byte[type_byteCount + 1]; + fixed (char* type_ptr = type) + { + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + void* native_data = data.ToPointer(); + ImGuiCond cond = 0; + byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond); + return ret != 0; + } + public static bool SetDragDropPayload(string type, IntPtr data, uint size, ImGuiCond cond) + { + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type = stackalloc byte[type_byteCount + 1]; + fixed (char* type_ptr = type) + { + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + void* native_data = data.ToPointer(); + byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, size, cond); + return ret != 0; + } + public static void ShowDemoWindow() + { + byte* p_open = null; + ImGuiNative.igShowDemoWindow(p_open); + } + public static void ShowDemoWindow(ref bool p_open) + { + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiNative.igShowDemoWindow(native_p_open); + p_open = native_p_open_val != 0; + } + public static void EndMenu() + { + ImGuiNative.igEndMenu(); + } + public static bool ColorButton(string desc_id, Vector4 col) + { + int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + byte* native_desc_id = stackalloc byte[desc_id_byteCount + 1]; + fixed (char* desc_id_ptr = desc_id) + { + int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; + } + ImGuiColorEditFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + return ret != 0; + } + public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags) + { + int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + byte* native_desc_id = stackalloc byte[desc_id_byteCount + 1]; + fixed (char* desc_id_ptr = desc_id) + { + int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; + } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + return ret != 0; + } + public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) + { + int desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + byte* native_desc_id = stackalloc byte[desc_id_byteCount + 1]; + fixed (char* desc_id_ptr = desc_id) + { + int native_desc_id_offset = Encoding.UTF8.GetBytes(desc_id_ptr, desc_id.Length, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; + } + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + return ret != 0; + } + public static bool IsKeyReleased(int user_key_index) + { + byte ret = ImGuiNative.igIsKeyReleased(user_key_index); + return ret != 0; + } + public static void SetClipboardText(string text) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text = stackalloc byte[text_byteCount + 1]; + fixed (char* text_ptr = text) + { + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + ImGuiNative.igSetClipboardText(native_text); + } + public static bool IsWindowCollapsed() + { + byte ret = ImGuiNative.igIsWindowCollapsed(); + return ret != 0; + } + public static void ShowFontSelector(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiNative.igShowFontSelector(native_label); + } + public static void SetNextWindowFocus() + { + ImGuiNative.igSetNextWindowFocus(); + } + public static void SameLine() + { + float pos_x = 0.0f; + float spacing_w = -1.0f; + ImGuiNative.igSameLine(pos_x, spacing_w); + } + public static void SameLine(float pos_x) + { + float spacing_w = -1.0f; + ImGuiNative.igSameLine(pos_x, spacing_w); + } + public static void SameLine(float pos_x, float spacing_w) + { + ImGuiNative.igSameLine(pos_x, spacing_w); + } + public static bool Begin(string name) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte* p_open = null; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBegin(native_name, p_open, flags); + return ret != 0; + } + public static bool Begin(string name, ref bool p_open) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBegin(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool Begin(string name, ref bool p_open, ImGuiWindowFlags flags) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + byte ret = ImGuiNative.igBegin(native_name, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool ColorEdit3(string label, ref Vector3 col) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiColorEditFlags flags = 0; + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + return ret != 0; + } + } + public static bool ColorEdit3(string label, ref Vector3 col, ImGuiColorEditFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + return ret != 0; + } + } + public static bool InputFloat2(string label, ref Vector2 v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat2(string label, ref Vector2 v, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat2(string label, ref Vector2 v, string format, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static void PushButtonRepeat(bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + ImGuiNative.igPushButtonRepeat(native_repeat); + } + public static void PopItemWidth() + { + ImGuiNative.igPopItemWidth(); + } + public static float GetFontSize() + { + float ret = ImGuiNative.igGetFontSize(); + return ret; + } + public static bool InputDouble(string label, ref double v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + double step = 0.0f; + double step_fast = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.6f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + double step_fast = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.6f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step, double step_fast) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.6f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.6f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step, double step_fast, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step, double step_fast, string format, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + } + public static void EndPopup() + { + ImGuiNative.igEndPopup(); + } + public static bool InputTextMultiline(string label, string buf, uint buf_size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + Vector2 size = new Vector2(); + ImGuiInputTextFlags flags = 0; + ImGuiInputTextCallback callback = null; + void* user_data = null; + byte ret = ImGuiNative.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); + return ret != 0; + } + public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + ImGuiInputTextFlags flags = 0; + ImGuiInputTextCallback callback = null; + void* user_data = null; + byte ret = ImGuiNative.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); + return ret != 0; + } + public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + ImGuiInputTextCallback callback = null; + void* user_data = null; + byte ret = ImGuiNative.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); + return ret != 0; + } + public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + void* user_data = null; + byte ret = ImGuiNative.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, user_data); + return ret != 0; + } + public static bool InputTextMultiline(string label, string buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, IntPtr user_data) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + void* native_user_data = user_data.ToPointer(); + byte ret = ImGuiNative.igInputTextMultiline(native_label, native_buf, buf_size, size, flags, callback, native_user_data); + return ret != 0; + } + public static bool Selectable(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte selected = 0; + ImGuiSelectableFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable(native_label, selected, flags, size); + return ret != 0; + } + public static bool Selectable(string label, bool selected) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_selected = selected ? (byte)1 : (byte)0; + ImGuiSelectableFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); + return ret != 0; + } + public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_selected = selected ? (byte)1 : (byte)0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); + return ret != 0; + } + public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags, Vector2 size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_selected = selected ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igSelectable(native_label, native_selected, flags, size); + return ret != 0; + } + public static bool Selectable(string label, ref bool p_selected) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + ImGuiSelectableFlags flags = 0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags, Vector2 size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + byte ret = ImGuiNative.igSelectableBoolPtr(native_label, native_p_selected, flags, size); + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool ListBox(string label, ref int current_item, string[] items, int items_count) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; + } + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + fixed (char* sPtr = s) + { + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + offset += 1; + native_items_data[offset] = 0; + } + } + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) + { + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + int height_in_items = -1; + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igListBoxStr_arr(native_label, native_current_item, native_items, items_count, height_in_items); + return ret != 0; + } + } + public static bool ListBox(string label, ref int current_item, string[] items, int items_count, int height_in_items) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int* items_byteCounts = stackalloc int[items.Length]; + int items_byteCount = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + items_byteCounts[i] = Encoding.UTF8.GetByteCount(s); + items_byteCount += items_byteCounts[i] + 1; + } + byte* native_items_data = stackalloc byte[items_byteCount]; + int offset = 0; + for (int i = 0; i < items.Length; i++) + { + string s = items[i]; + fixed (char* sPtr = s) + { + offset += Encoding.UTF8.GetBytes(sPtr, s.Length, native_items_data + offset, items_byteCounts[i]); + offset += 1; + native_items_data[offset] = 0; + } + } + byte** native_items = stackalloc byte*[items.Length]; + offset = 0; + for (int i = 0; i < items.Length; i++) + { + native_items[i] = &native_items_data[offset]; + offset += items_byteCounts[i] + 1; + } + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igListBoxStr_arr(native_label, native_current_item, native_items, items_count, height_in_items); + return ret != 0; + } + } + public static Vector2 GetCursorPos() + { + Vector2 ret = ImGuiNative.igGetCursorPos(); + return ret; + } + public static bool InputFloat4(string label, ref Vector4 v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat4(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat4(string label, ref Vector4 v, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat4(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat4(string label, ref Vector4 v, string format, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat4(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static void SetCursorPosY(float y) + { + ImGuiNative.igSetCursorPosY(y); + } + public static string GetVersion() + { + byte* ret = ImGuiNative.igGetVersion(); + return Util.StringFromPtr(ret); + } + public static void EndCombo() + { + ImGuiNative.igEndCombo(); + } + public static void PushID(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + ImGuiNative.igPushIDStr(native_str_id); + } + public static void PushID(IntPtr ptr_id) + { + void* native_ptr_id = ptr_id.ToPointer(); + ImGuiNative.igPushIDPtr(native_ptr_id); + } + public static void PushID(int int_id) + { + ImGuiNative.igPushIDInt(int_id); + } + public static void AlignTextToFramePadding() + { + ImGuiNative.igAlignTextToFramePadding(); + } + public static void PopStyleColor() + { + int count = 1; + ImGuiNative.igPopStyleColor(count); + } + public static void PopStyleColor(int count) + { + ImGuiNative.igPopStyleColor(count); + } + public static void Text(string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igText(native_fmt); + } + public static float GetTextLineHeightWithSpacing() + { + float ret = ImGuiNative.igGetTextLineHeightWithSpacing(); + return ret; + } + public static void EndTooltip() + { + ImGuiNative.igEndTooltip(); + } + public static bool DragInt(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed, int v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool SliderFloat(string label, ref float v, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static uint ColorConvertFloat4ToU32(Vector4 @in) + { + uint ret = ImGuiNative.igColorConvertFloat4ToU32(@in); + return ret; + } + public static void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, bool intersect_with_current_clip_rect) + { + byte native_intersect_with_current_clip_rect = intersect_with_current_clip_rect ? (byte)1 : (byte)0; + ImGuiNative.igPushClipRect(clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); + } + public static void SetColumnWidth(int column_index, float width) + { + ImGuiNative.igSetColumnWidth(column_index, width); + } + public static bool BeginMainMenuBar() + { + byte ret = ImGuiNative.igBeginMainMenuBar(); + return ret != 0; + } + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static void StyleColorsLight() + { + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsLight(dst); + } + public static void StyleColorsLight(ImGuiStylePtr dst) + { + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsLight(native_dst); + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static float GetWindowHeight() + { + float ret = ImGuiNative.igGetWindowHeight(); + return ret; + } + public static Vector2 GetMousePosOnOpeningCurrentPopup() + { + Vector2 ret = ImGuiNative.igGetMousePosOnOpeningCurrentPopup(); + return ret; + } + public static void EndDragDropSource() + { + ImGuiNative.igEndDragDropSource(); + } + public static float GetFrameHeightWithSpacing() + { + float ret = ImGuiNative.igGetFrameHeightWithSpacing(); + return ret; + } + public static void CloseCurrentPopup() + { + ImGuiNative.igCloseCurrentPopup(); + } + public static void BeginGroup() + { + ImGuiNative.igBeginGroup(); + } + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr v_min, IntPtr v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_v, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool BeginCombo(string label, string preview_value) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); + byte* native_preview_value = stackalloc byte[preview_value_byteCount + 1]; + fixed (char* preview_value_ptr = preview_value) + { + int native_preview_value_offset = Encoding.UTF8.GetBytes(preview_value_ptr, preview_value.Length, native_preview_value, preview_value_byteCount); + native_preview_value[native_preview_value_offset] = 0; + } + ImGuiComboFlags flags = 0; + byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); + return ret != 0; + } + public static bool BeginCombo(string label, string preview_value, ImGuiComboFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); + byte* native_preview_value = stackalloc byte[preview_value_byteCount + 1]; + fixed (char* preview_value_ptr = preview_value) + { + int native_preview_value_offset = Encoding.UTF8.GetBytes(preview_value_ptr, preview_value.Length, native_preview_value, preview_value_byteCount); + native_preview_value[native_preview_value_offset] = 0; + } + byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); + return ret != 0; + } + public static bool BeginMenu(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte enabled = 1; + byte ret = ImGuiNative.igBeginMenu(native_label, enabled); + return ret != 0; + } + public static bool BeginMenu(string label, bool enabled) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginMenu(native_label, native_enabled); + return ret != 0; + } + public static bool IsItemHovered() + { + ImGuiHoveredFlags flags = 0; + byte ret = ImGuiNative.igIsItemHovered(flags); + return ret != 0; + } + public static bool IsItemHovered(ImGuiHoveredFlags flags) + { + byte ret = ImGuiNative.igIsItemHovered(flags); + return ret != 0; + } + public static void Bullet() + { + ImGuiNative.igBullet(); + } + public static bool InputText(string label, string buf, uint buf_size) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + ImGuiInputTextFlags flags = 0; + ImGuiInputTextCallback callback = null; + void* user_data = null; + byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, user_data); + return ret != 0; + } + public static bool InputText(string label, string buf, uint buf_size, ImGuiInputTextFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + ImGuiInputTextCallback callback = null; + void* user_data = null; + byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, user_data); + return ret != 0; + } + public static bool InputText(string label, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + void* user_data = null; + byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, user_data); + return ret != 0; + } + public static bool InputText(string label, string buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, IntPtr user_data) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int buf_byteCount = Encoding.UTF8.GetByteCount(buf); + byte* native_buf = stackalloc byte[buf_byteCount + 1]; + fixed (char* buf_ptr = buf) + { + int native_buf_offset = Encoding.UTF8.GetBytes(buf_ptr, buf.Length, native_buf, buf_byteCount); + native_buf[native_buf_offset] = 0; + } + void* native_user_data = user_data.ToPointer(); + byte ret = ImGuiNative.igInputText(native_label, native_buf, buf_size, flags, callback, native_user_data); + return ret != 0; + } + public static bool InputInt3(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt3(native_label, native_v, extra_flags); + return ret != 0; + } + } + public static bool InputInt3(string label, ref int v, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt3(native_label, native_v, extra_flags); + return ret != 0; + } + } + public static void StyleColorsDark() + { + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsDark(dst); + } + public static void StyleColorsDark(ImGuiStylePtr dst) + { + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsDark(native_dst); + } + public static bool InputInt(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int step = 1; + int step_fast = 100; + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); + return ret != 0; + } + } + public static bool InputInt(string label, ref int v, int step) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int step_fast = 100; + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); + return ret != 0; + } + } + public static bool InputInt(string label, ref int v, int step, int step_fast) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); + return ret != 0; + } + } + public static bool InputInt(string label, ref int v, int step, int step_fast, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, extra_flags); + return ret != 0; + } + } + public static void SetWindowFontScale(float scale) + { + ImGuiNative.igSetWindowFontScale(scale); + } + public static bool SliderInt(string label, ref int v, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool SliderInt(string label, ref int v, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static void SetNextWindowPos(Vector2 pos) + { + ImGuiCond cond = 0; + Vector2 pivot = new Vector2(); + ImGuiNative.igSetNextWindowPos(pos, cond, pivot); + } + public static void SetNextWindowPos(Vector2 pos, ImGuiCond cond) + { + Vector2 pivot = new Vector2(); + ImGuiNative.igSetNextWindowPos(pos, cond, pivot); + } + public static void SetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot) + { + ImGuiNative.igSetNextWindowPos(pos, cond, pivot); + } + public static bool DragInt3(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_min = 0; + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed, int v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int v_max = 0; + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format); + return ret != 0; + } + } + public static void OpenPopup(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + ImGuiNative.igOpenPopup(native_str_id); + } + public static Vector2 CalcTextSize(string text) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text = stackalloc byte[text_byteCount + 1]; + fixed (char* text_ptr = text) + { + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + byte* native_text_end = null; + byte hide_text_after_double_hash = 0; + float wrap_width = -1.0f; + Vector2 ret = ImGuiNative.igCalcTextSize(native_text, native_text_end, hide_text_after_double_hash, wrap_width); + return ret; + } + public static IntPtr GetDrawListSharedData() + { + IntPtr ret = ImGuiNative.igGetDrawListSharedData(); + return ret; + } + public static void Columns() + { + int count = 1; + byte* native_id = null; + byte border = 1; + ImGuiNative.igColumns(count, native_id, border); + } + public static void Columns(int count) + { + byte* native_id = null; + byte border = 1; + ImGuiNative.igColumns(count, native_id, border); + } + public static void Columns(int count, string id) + { + int id_byteCount = Encoding.UTF8.GetByteCount(id); + byte* native_id = stackalloc byte[id_byteCount + 1]; + fixed (char* id_ptr = id) + { + int native_id_offset = Encoding.UTF8.GetBytes(id_ptr, id.Length, native_id, id_byteCount); + native_id[native_id_offset] = 0; + } + byte border = 1; + ImGuiNative.igColumns(count, native_id, border); + } + public static void Columns(int count, string id, bool border) + { + int id_byteCount = Encoding.UTF8.GetByteCount(id); + byte* native_id = stackalloc byte[id_byteCount + 1]; + fixed (char* id_ptr = id) + { + int native_id_offset = Encoding.UTF8.GetBytes(id_ptr, id.Length, native_id, id_byteCount); + native_id[native_id_offset] = 0; + } + byte native_border = border ? (byte)1 : (byte)0; + ImGuiNative.igColumns(count, native_id, native_border); + } + public static bool IsItemActive() + { + byte ret = ImGuiNative.igIsItemActive(); + return ret != 0; + } + public static bool BeginDragDropTarget() + { + byte ret = ImGuiNative.igBeginDragDropTarget(); + return ret != 0; + } + public static bool ColorPicker3(string label, ref Vector3 col) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiColorEditFlags flags = 0; + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); + return ret != 0; + } + } + public static bool ColorPicker3(string label, ref Vector3 col, ImGuiColorEditFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); + return ret != 0; + } + } + public static Vector2 GetContentRegionMax() + { + Vector2 ret = ImGuiNative.igGetContentRegionMax(); + return ret; + } + public static bool BeginChildFrame(uint id, Vector2 size) + { + ImGuiWindowFlags flags = 0; + byte ret = ImGuiNative.igBeginChildFrame(id, size, flags); + return ret != 0; + } + public static bool BeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags) + { + byte ret = ImGuiNative.igBeginChildFrame(id, size, flags); + return ret != 0; + } + public static void SaveIniSettingsToDisk(string ini_filename) + { + int ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); + byte* native_ini_filename = stackalloc byte[ini_filename_byteCount + 1]; + fixed (char* ini_filename_ptr = ini_filename) + { + int native_ini_filename_offset = Encoding.UTF8.GetBytes(ini_filename_ptr, ini_filename.Length, native_ini_filename, ini_filename_byteCount); + native_ini_filename[native_ini_filename_offset] = 0; + } + ImGuiNative.igSaveIniSettingsToDisk(native_ini_filename); + } + public static string GetClipboardText() + { + byte* ret = ImGuiNative.igGetClipboardText(); + return Util.StringFromPtr(ret); + } + public static void EndDragDropTarget() + { + ImGuiNative.igEndDragDropTarget(); + } + public static int GetKeyPressedAmount(int key_index, float repeat_delay, float rate) + { + int ret = ImGuiNative.igGetKeyPressedAmount(key_index, repeat_delay, rate); + return ret; + } + public static void NewFrame() + { + ImGuiNative.igNewFrame(); + } + public static void ResetMouseDragDelta() + { + int button = 0; + ImGuiNative.igResetMouseDragDelta(button); + } + public static void ResetMouseDragDelta(int button) + { + ImGuiNative.igResetMouseDragDelta(button); + } + public static float GetTreeNodeToLabelSpacing() + { + float ret = ImGuiNative.igGetTreeNodeToLabelSpacing(); + return ret; + } + public static Vector2 GetMousePos() + { + Vector2 ret = ImGuiNative.igGetMousePos(); + return ret; + } + public static void PopID() + { + ImGuiNative.igPopID(); + } + public static bool IsMouseDoubleClicked(int button) + { + byte ret = ImGuiNative.igIsMouseDoubleClicked(button); + return ret != 0; + } + public static void StyleColorsClassic() + { + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsClassic(dst); + } + public static void StyleColorsClassic(ImGuiStylePtr dst) + { + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsClassic(native_dst); + } + public static void SetWindowFocus() + { + ImGuiNative.igSetWindowFocus(); + } + public static void SetWindowFocus(string name) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + ImGuiNative.igSetWindowFocusStr(native_name); + } + public static void ColorConvertHSVtoRGB(float h, float s, float v, out float out_r, out float out_g, out float out_b) + { + fixed (float* native_out_r = &out_r) + { + fixed (float* native_out_g = &out_g) + { + fixed (float* native_out_b = &out_b) + { + ImGuiNative.igColorConvertHSVtoRGB(h, s, v, native_out_r, native_out_g, native_out_b); + } + } + } + } + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static Vector4 ColorConvertU32ToFloat4(uint @in) + { + Vector4 ret = ImGuiNative.igColorConvertU32ToFloat4(@in); + return ret; + } + public static void PopTextWrapPos() + { + ImGuiNative.igPopTextWrapPos(); + } + public static ImGuiStoragePtr GetStateStorage() + { + ImGuiStorage* ret = ImGuiNative.igGetStateStorage(); + return new ImGuiStoragePtr(ret); + } + public static float GetColumnWidth() + { + int column_index = -1; + float ret = ImGuiNative.igGetColumnWidth(column_index); + return ret; + } + public static float GetColumnWidth(int column_index) + { + float ret = ImGuiNative.igGetColumnWidth(column_index); + return ret; + } + public static void EndMenuBar() + { + ImGuiNative.igEndMenuBar(); + } + public static void SetStateStorage(ImGuiStoragePtr storage) + { + ImGuiStorage* native_storage = storage.NativePtr; + ImGuiNative.igSetStateStorage(native_storage); + } + public static string GetStyleColorName(ImGuiCol idx) + { + byte* ret = ImGuiNative.igGetStyleColorName(idx); + return Util.StringFromPtr(ret); + } + public static bool IsMouseDragging() + { + int button = 0; + float lock_threshold = -1.0f; + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; + } + public static bool IsMouseDragging(int button) + { + float lock_threshold = -1.0f; + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; + } + public static bool IsMouseDragging(int button, float lock_threshold) + { + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; + } + public static void PushStyleColor(ImGuiCol idx, uint col) + { + ImGuiNative.igPushStyleColorU32(idx, col); + } + public static void PushStyleColor(ImGuiCol idx, Vector4 col) + { + ImGuiNative.igPushStyleColor(idx, col); + } + public static IntPtr MemAlloc(uint size) + { + void* ret = ImGuiNative.igMemAlloc(size); + return (IntPtr)ret; + } + public static void SetCurrentContext(IntPtr ctx) + { + ImGuiNative.igSetCurrentContext(ctx); + } + public static void PushItemWidth(float item_width) + { + ImGuiNative.igPushItemWidth(item_width); + } + public static bool IsWindowAppearing() + { + byte ret = ImGuiNative.igIsWindowAppearing(); + return ret != 0; + } + public static ImGuiStylePtr GetStyle() + { + ImGuiStyle* ret = ImGuiNative.igGetStyle(); + return new ImGuiStylePtr(ret); + } + public static void SetItemAllowOverlap() + { + ImGuiNative.igSetItemAllowOverlap(); + } + public static void EndChild() + { + ImGuiNative.igEndChild(); + } + public static bool CollapsingHeader(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiTreeNodeFlags flags = 0; + byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); + return ret != 0; + } + public static bool CollapsingHeader(string label, ImGuiTreeNodeFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igCollapsingHeader(native_label, flags); + return ret != 0; + } + public static bool CollapsingHeader(string label, ref bool p_open) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiTreeNodeFlags flags = 0; + byte ret = ImGuiNative.igCollapsingHeaderBoolPtr(native_label, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool CollapsingHeader(string label, ref bool p_open, ImGuiTreeNodeFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + byte ret = ImGuiNative.igCollapsingHeaderBoolPtr(native_label, native_p_open, flags); + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte* native_format_max = null; + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format, string format_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + byte* native_format_max = stackalloc byte[format_max_byteCount + 1]; + fixed (char* format_max_ptr = format_max) + { + int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + float power = 1.0f; + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed, float v_min, float v_max, string format, string format_max, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + int format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + byte* native_format_max = stackalloc byte[format_max_byteCount + 1]; + fixed (char* format_max_ptr = format_max) + { + int native_format_max_offset = Encoding.UTF8.GetBytes(format_max_ptr, format_max.Length, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + fixed (float* native_v_current_min = &v_current_min) + { + fixed (float* native_v_current_max = &v_current_max) + { + byte ret = ImGuiNative.igDragFloatRange2(native_label, native_v_current_min, native_v_current_max, v_speed, v_min, v_max, native_format, native_format_max, power); + return ret != 0; + } + } + } + public static void SetMouseCursor(ImGuiMouseCursor type) + { + ImGuiNative.igSetMouseCursor(type); + } + public static Vector2 GetWindowContentRegionMax() + { + Vector2 ret = ImGuiNative.igGetWindowContentRegionMax(); + return ret; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* step = null; + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, step, step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* native_step_fast = step_fast.ToPointer(); + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* native_step_fast = step_fast.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr v, IntPtr step, IntPtr step_fast, string format, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* native_step_fast = step_fast.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_v, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static uint GetColorU32(ImGuiCol idx) + { + float alpha_mul = 1.0f; + uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); + return ret; + } + public static uint GetColorU32(ImGuiCol idx, float alpha_mul) + { + uint ret = ImGuiNative.igGetColorU32(idx, alpha_mul); + return ret; + } + public static uint GetColorU32(Vector4 col) + { + uint ret = ImGuiNative.igGetColorU32Vec4(col); + return ret; + } + public static uint GetColorU32(uint col) + { + uint ret = ImGuiNative.igGetColorU32U32(col); + return ret; + } + public static double GetTime() + { + double ret = ImGuiNative.igGetTime(); + return ret; + } + public static int GetColumnIndex() + { + int ret = ImGuiNative.igGetColumnIndex(); + return ret; + } + public static bool BeginPopupContextItem() + { + byte* native_str_id = null; + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + return ret != 0; + } + public static bool BeginPopupContextItem(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + int mouse_button = 1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + return ret != 0; + } + public static bool BeginPopupContextItem(string str_id, int mouse_button) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, mouse_button); + return ret != 0; + } + public static void SetCursorPosX(float x) + { + ImGuiNative.igSetCursorPosX(x); + } + public static Vector2 GetItemRectSize() + { + Vector2 ret = ImGuiNative.igGetItemRectSize(); + return ret; + } + public static bool ArrowButton(string str_id, ImGuiDir dir) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte ret = ImGuiNative.igArrowButton(native_str_id, dir); + return ret != 0; + } + public static ImGuiMouseCursor GetMouseCursor() + { + ImGuiMouseCursor ret = ImGuiNative.igGetMouseCursor(); + return ret; + } + public static void PushAllowKeyboardFocus(bool allow_keyboard_focus) + { + byte native_allow_keyboard_focus = allow_keyboard_focus ? (byte)1 : (byte)0; + ImGuiNative.igPushAllowKeyboardFocus(native_allow_keyboard_focus); + } + public static float GetScrollY() + { + float ret = ImGuiNative.igGetScrollY(); + return ret; + } + public static void SetColumnOffset(int column_index, float offset_x) + { + ImGuiNative.igSetColumnOffset(column_index, offset_x); + } + public static void SetWindowPos(Vector2 pos) + { + ImGuiCond cond = 0; + ImGuiNative.igSetWindowPosVec2(pos, cond); + } + public static void SetWindowPos(Vector2 pos, ImGuiCond cond) + { + ImGuiNative.igSetWindowPosVec2(pos, cond); + } + public static void SetWindowPos(string name, Vector2 pos) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + ImGuiCond cond = 0; + ImGuiNative.igSetWindowPosStr(native_name, pos, cond); + } + public static void SetWindowPos(string name, Vector2 pos, ImGuiCond cond) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + ImGuiNative.igSetWindowPosStr(native_name, pos, cond); + } + public static void SetKeyboardFocusHere() + { + int offset = 0; + ImGuiNative.igSetKeyboardFocusHere(offset); + } + public static void SetKeyboardFocusHere(int offset) + { + ImGuiNative.igSetKeyboardFocusHere(offset); + } + public static float GetCursorPosY() + { + float ret = ImGuiNative.igGetCursorPosY(); + return ret; + } + public static void EndMainMenuBar() + { + ImGuiNative.igEndMainMenuBar(); + } + public static float GetContentRegionAvailWidth() + { + float ret = ImGuiNative.igGetContentRegionAvailWidth(); + return ret; + } + public static bool IsKeyDown(int user_key_index) + { + byte ret = ImGuiNative.igIsKeyDown(user_key_index); + return ret != 0; + } + public static bool IsMouseDown(int button) + { + byte ret = ImGuiNative.igIsMouseDown(button); + return ret != 0; + } + public static Vector2 GetWindowContentRegionMin() + { + Vector2 ret = ImGuiNative.igGetWindowContentRegionMin(); + return ret; + } + public static void LogButtons() + { + ImGuiNative.igLogButtons(); + } + public static float GetWindowContentRegionWidth() + { + float ret = ImGuiNative.igGetWindowContentRegionWidth(); + return ret; + } + public static bool SliderAngle(string label, ref float v_rad) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_degrees_min = -360.0f; + float v_degrees_max = +360.0f; + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max); + return ret != 0; + } + } + public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_degrees_max = +360.0f; + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max); + return ret != 0; + } + } + public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max); + return ret != 0; + } + } + public static bool TreeNodeEx(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiTreeNodeFlags flags = 0; + byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); + return ret != 0; + } + public static bool TreeNodeEx(string label, ImGuiTreeNodeFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igTreeNodeExStr(native_label, flags); + return ret != 0; + } + public static bool TreeNodeEx(string str_id, ImGuiTreeNodeFlags flags, string fmt) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + byte ret = ImGuiNative.igTreeNodeExStrStr(native_str_id, flags, native_fmt); + return ret != 0; + } + public static bool TreeNodeEx(IntPtr ptr_id, ImGuiTreeNodeFlags flags, string fmt) + { + void* native_ptr_id = ptr_id.ToPointer(); + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + byte ret = ImGuiNative.igTreeNodeExPtr(native_ptr_id, flags, native_fmt); + return ret != 0; + } + public static float GetWindowWidth() + { + float ret = ImGuiNative.igGetWindowWidth(); + return ret; + } + public static void PushTextWrapPos() + { + float wrap_pos_x = 0.0f; + ImGuiNative.igPushTextWrapPos(wrap_pos_x); + } + public static void PushTextWrapPos(float wrap_pos_x) + { + ImGuiNative.igPushTextWrapPos(wrap_pos_x); + } + public static bool SliderInt3(string label, ref int v, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool SliderInt3(string label, ref int v, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static void ShowUserGuide() + { + ImGuiNative.igShowUserGuide(); + } + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr v_min, IntPtr v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_v, components, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static void Image(IntPtr user_texture_id, Vector2 size) + { + Vector2 uv0 = new Vector2(); + Vector2 uv1 = new Vector2(1, 1); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0) + { + Vector2 uv1 = new Vector2(1, 1); + Vector4 tint_col = new Vector4(1, 1, 1, 1); + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1) + { + Vector4 tint_col = new Vector4(1, 1, 1, 1); + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col) + { + Vector4 border_col = new Vector4(); + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void Image(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col) + { + ImGuiNative.igImage(user_texture_id, size, uv0, uv1, tint_col, border_col); + } + public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max) + { + ImGuiSizeCallback custom_callback = null; + void* custom_callback_data = null; + ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); + } + public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback) + { + void* custom_callback_data = null; + ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, custom_callback_data); + } + public static void SetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, IntPtr custom_callback_data) + { + void* native_custom_callback_data = custom_callback_data.ToPointer(); + ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, native_custom_callback_data); + } + public static void Dummy(Vector2 size) + { + ImGuiNative.igDummy(size); + } + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%d"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%d") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%d".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format); + return ret != 0; + } + } + public static void BulletText(string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igBulletText(native_fmt); + } + public static bool ColorEdit4(string label, ref Vector4 col) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiColorEditFlags flags = 0; + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + return ret != 0; + } + } + public static bool ColorEdit4(string label, ref Vector4 col, ImGuiColorEditFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + return ret != 0; + } + } + public static bool ColorPicker4(string label, ref Vector4 col) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiColorEditFlags flags = 0; + float* ref_col = null; + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + return ret != 0; + } + } + public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float* ref_col = null; + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + return ret != 0; + } + } + public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags, ref float ref_col) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (Vector4* native_col = &col) + { + fixed (float* native_ref_col = &ref_col) + { + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, native_ref_col); + return ret != 0; + } + } + } + public static bool InvisibleButton(string str_id, Vector2 size) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte ret = ImGuiNative.igInvisibleButton(native_str_id, size); + return ret != 0; + } + public static void LogToClipboard() + { + int max_depth = -1; + ImGuiNative.igLogToClipboard(max_depth); + } + public static void LogToClipboard(int max_depth) + { + ImGuiNative.igLogToClipboard(max_depth); + } + public static bool BeginPopupContextWindow() + { + byte* native_str_id = null; + int mouse_button = 1; + byte also_over_items = 1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); + return ret != 0; + } + public static bool BeginPopupContextWindow(string str_id) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + int mouse_button = 1; + byte also_over_items = 1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); + return ret != 0; + } + public static bool BeginPopupContextWindow(string str_id, int mouse_button) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte also_over_items = 1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, also_over_items); + return ret != 0; + } + public static bool BeginPopupContextWindow(string str_id, int mouse_button, bool also_over_items) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + byte native_also_over_items = also_over_items ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, mouse_button, native_also_over_items); + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* v_min = null; + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* v_max = null; + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, v_max, native_format, power); + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + byte* native_format = null; + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr v, float v_speed, IntPtr v_min, IntPtr v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_v_min = v_min.ToPointer(); + void* native_v_max = v_max.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_v, v_speed, native_v_min, native_v_max, native_format, power); + return ret != 0; + } + public static void SetItemDefaultFocus() + { + ImGuiNative.igSetItemDefaultFocus(); + } + public static void CaptureMouseFromApp() + { + byte capture = 1; + ImGuiNative.igCaptureMouseFromApp(capture); + } + public static void CaptureMouseFromApp(bool capture) + { + byte native_capture = capture ? (byte)1 : (byte)0; + ImGuiNative.igCaptureMouseFromApp(native_capture); + } + public static bool IsAnyItemHovered() + { + byte ret = ImGuiNative.igIsAnyItemHovered(); + return ret != 0; + } + public static void PushFont(ImFontPtr font) + { + ImFont* native_font = font.NativePtr; + ImGuiNative.igPushFont(native_font); + } + public static bool InputInt2(string label, ref int v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt2(native_label, native_v, extra_flags); + return ret != 0; + } + } + public static bool InputInt2(string label, ref int v, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt2(native_label, native_v, extra_flags); + return ret != 0; + } + } + public static void TreePop() + { + ImGuiNative.igTreePop(); + } + public static void End() + { + ImGuiNative.igEnd(); + } + public static void DestroyContext() + { + IntPtr ctx = IntPtr.Zero; + ImGuiNative.igDestroyContext(ctx); + } + public static void DestroyContext(IntPtr ctx) + { + ImGuiNative.igDestroyContext(ctx); + } + public static void PopStyleVar() + { + int count = 1; + ImGuiNative.igPopStyleVar(count); + } + public static void PopStyleVar(int count) + { + ImGuiNative.igPopStyleVar(count); + } + public static bool ShowStyleSelector(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igShowStyleSelector(native_label); + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* step = null; + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, step, step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* native_step_fast = step_fast.ToPointer(); + byte* native_format = null; + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* native_step_fast = step_fast.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr v, int components, IntPtr step, IntPtr step_fast, string format, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + void* native_v = v.ToPointer(); + void* native_step = step.ToPointer(); + void* native_step_fast = step_fast.ToPointer(); + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_v, components, native_step, native_step_fast, native_format, extra_flags); + return ret != 0; + } + public static bool TreeNode(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.igTreeNodeStr(native_label); + return ret != 0; + } + public static bool TreeNode(string str_id, string fmt) + { + int str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + byte* native_str_id = stackalloc byte[str_id_byteCount + 1]; + fixed (char* str_id_ptr = str_id) + { + int native_str_id_offset = Encoding.UTF8.GetBytes(str_id_ptr, str_id.Length, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + byte ret = ImGuiNative.igTreeNodeStrStr(native_str_id, native_fmt); + return ret != 0; + } + public static bool TreeNode(IntPtr ptr_id, string fmt) + { + void* native_ptr_id = ptr_id.ToPointer(); + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + byte ret = ImGuiNative.igTreeNodePtr(native_ptr_id, native_fmt); + return ret != 0; + } + public static float GetScrollMaxX() + { + float ret = ImGuiNative.igGetScrollMaxX(); + return ret; + } + public static void SetTooltip(string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.igSetTooltip(native_fmt); + } + public static Vector2 GetContentRegionAvail() + { + Vector2 ret = ImGuiNative.igGetContentRegionAvail(); + return ret; + } + public static bool InputFloat3(string label, ref Vector3 v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat3(string label, ref Vector3 v, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + ImGuiInputTextFlags extra_flags = 0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static bool InputFloat3(string label, ref Vector3 v, string format, ImGuiInputTextFlags extra_flags) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, extra_flags); + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_min = 0.0f; + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float v_max = 0.0f; + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = "%.3f") + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, "%.3f".Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + float power = 1.0f; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format, float power) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + int format_byteCount = Encoding.UTF8.GetByteCount(format); + byte* native_format = stackalloc byte[format_byteCount + 1]; + fixed (char* format_ptr = format) + { + int native_format_offset = Encoding.UTF8.GetBytes(format_ptr, format.Length, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, power); + return ret != 0; + } + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs new file mode 100644 index 0000000..7373178 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs @@ -0,0 +1,10 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiBackendFlags + { + HasGamepad = 1 << 0, + HasMouseCursors = 1 << 1, + HasSetMousePos = 1 << 2, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiCol.gen.cs b/src/ImGui.NET/Generated/ImGuiCol.gen.cs new file mode 100644 index 0000000..4039d53 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiCol.gen.cs @@ -0,0 +1,50 @@ +namespace ImGuiNET +{ + public enum ImGuiCol + { + Text = 0, + TextDisabled = 1, + WindowBg = 2, + ChildBg = 3, + PopupBg = 4, + Border = 5, + BorderShadow = 6, + FrameBg = 7, + FrameBgHovered = 8, + FrameBgActive = 9, + TitleBg = 10, + TitleBgActive = 11, + TitleBgCollapsed = 12, + MenuBarBg = 13, + ScrollbarBg = 14, + ScrollbarGrab = 15, + ScrollbarGrabHovered = 16, + ScrollbarGrabActive = 17, + CheckMark = 18, + SliderGrab = 19, + SliderGrabActive = 20, + Button = 21, + ButtonHovered = 22, + ButtonActive = 23, + Header = 24, + HeaderHovered = 25, + HeaderActive = 26, + Separator = 27, + SeparatorHovered = 28, + SeparatorActive = 29, + ResizeGrip = 30, + ResizeGripHovered = 31, + ResizeGripActive = 32, + PlotLines = 33, + PlotLinesHovered = 34, + PlotHistogram = 35, + PlotHistogramHovered = 36, + TextSelectedBg = 37, + DragDropTarget = 38, + NavHighlight = 39, + NavWindowingHighlight = 40, + NavWindowingDimBg = 41, + ModalWindowDimBg = 42, + COUNT = 43, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs new file mode 100644 index 0000000..f87d6ea --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs @@ -0,0 +1,32 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiColorEditFlags + { + None = 0, + NoAlpha = 1 << 1, + NoPicker = 1 << 2, + NoOptions = 1 << 3, + NoSmallPreview = 1 << 4, + NoInputs = 1 << 5, + NoTooltip = 1 << 6, + NoLabel = 1 << 7, + NoSidePreview = 1 << 8, + NoDragDrop = 1 << 9, + AlphaBar = 1 << 16, + AlphaPreview = 1 << 17, + AlphaPreviewHalf = 1 << 18, + HDR = 1 << 19, + RGB = 1 << 20, + HSV = 1 << 21, + HEX = 1 << 22, + Uint8 = 1 << 23, + Float = 1 << 24, + PickerHueBar = 1 << 25, + PickerHueWheel = 1 << 26, + _InputsMask = RGB|HSV|HEX, + _DataTypeMask = Uint8|Float, + _PickerMask = PickerHueWheel|PickerHueBar, + _OptionsDefault = Uint8|RGB|PickerHueBar, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiComboFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiComboFlags.gen.cs new file mode 100644 index 0000000..0022750 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiComboFlags.gen.cs @@ -0,0 +1,16 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiComboFlags + { + None = 0, + PopupAlignLeft = 1 << 0, + HeightSmall = 1 << 1, + HeightRegular = 1 << 2, + HeightLarge = 1 << 3, + HeightLargest = 1 << 4, + NoArrowButton = 1 << 5, + NoPreview = 1 << 6, + HeightMask = HeightSmall | HeightRegular | HeightLarge | HeightLargest, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiCond.gen.cs b/src/ImGui.NET/Generated/ImGuiCond.gen.cs new file mode 100644 index 0000000..917c044 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiCond.gen.cs @@ -0,0 +1,10 @@ +namespace ImGuiNET +{ + public enum ImGuiCond + { + Always = 1 << 0, + Once = 1 << 1, + FirstUseEver = 1 << 2, + Appearing = 1 << 3, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs new file mode 100644 index 0000000..81e0a6e --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs @@ -0,0 +1,15 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiConfigFlags + { + NavEnableKeyboard = 1 << 0, + NavEnableGamepad = 1 << 1, + NavEnableSetMousePos = 1 << 2, + NavNoCaptureKeyboard = 1 << 3, + NoMouse = 1 << 4, + NoMouseCursorChange = 1 << 5, + IsSRGB = 1 << 20, + IsTouchScreen = 1 << 21, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiDataType.gen.cs b/src/ImGui.NET/Generated/ImGuiDataType.gen.cs new file mode 100644 index 0000000..57eb378 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiDataType.gen.cs @@ -0,0 +1,13 @@ +namespace ImGuiNET +{ + public enum ImGuiDataType + { + S32 = 0, + U32 = 1, + S64 = 2, + U64 = 3, + Float = 4, + Double = 5, + COUNT = 6, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiDir.gen.cs b/src/ImGui.NET/Generated/ImGuiDir.gen.cs new file mode 100644 index 0000000..f409d80 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiDir.gen.cs @@ -0,0 +1,12 @@ +namespace ImGuiNET +{ + public enum ImGuiDir + { + None = -1, + Left = 0, + Right = 1, + Up = 2, + Down = 3, + COUNT = 4, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiDragDropFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiDragDropFlags.gen.cs new file mode 100644 index 0000000..9e95b50 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiDragDropFlags.gen.cs @@ -0,0 +1,18 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiDragDropFlags + { + None = 0, + SourceNoPreviewTooltip = 1 << 0, + SourceNoDisableHover = 1 << 1, + SourceNoHoldToOpenOthers = 1 << 2, + SourceAllowNullID = 1 << 3, + SourceExtern = 1 << 4, + SourceAutoExpirePayload = 1 << 5, + AcceptBeforeDelivery = 1 << 10, + AcceptNoDrawDefaultRect = 1 << 11, + AcceptNoPreviewTooltip = 1 << 12, + AcceptPeekOnly = AcceptBeforeDelivery | AcceptNoDrawDefaultRect, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiFocusedFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiFocusedFlags.gen.cs new file mode 100644 index 0000000..e9169c1 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiFocusedFlags.gen.cs @@ -0,0 +1,12 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiFocusedFlags + { + None = 0, + ChildWindows = 1 << 0, + RootWindow = 1 << 1, + AnyWindow = 1 << 2, + RootAndChildWindows = RootWindow | ChildWindows, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs new file mode 100644 index 0000000..5e5d5c2 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs @@ -0,0 +1,17 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiHoveredFlags + { + None = 0, + ChildWindows = 1 << 0, + RootWindow = 1 << 1, + AnyWindow = 1 << 2, + AllowWhenBlockedByPopup = 1 << 3, + AllowWhenBlockedByActiveItem = 1 << 5, + AllowWhenOverlapped = 1 << 6, + AllowWhenDisabled = 1 << 7, + RectOnly = AllowWhenBlockedByPopup | AllowWhenBlockedByActiveItem | AllowWhenOverlapped, + RootAndChildWindows = RootWindow | ChildWindows, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiIO.gen.cs b/src/ImGui.NET/Generated/ImGuiIO.gen.cs new file mode 100644 index 0000000..489d033 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiIO.gen.cs @@ -0,0 +1,189 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiIO + { + public ImGuiConfigFlags ConfigFlags; + public ImGuiBackendFlags BackendFlags; + public Vector2 DisplaySize; + public float DeltaTime; + public float IniSavingRate; + public byte* IniFilename; + public byte* LogFilename; + public float MouseDoubleClickTime; + public float MouseDoubleClickMaxDist; + public float MouseDragThreshold; + public fixed int KeyMap[21]; + public float KeyRepeatDelay; + public float KeyRepeatRate; + public void* UserData; + public ImFontAtlas* Fonts; + public float FontGlobalScale; + public byte FontAllowUserScaling; + public ImFont* FontDefault; + public Vector2 DisplayFramebufferScale; + public Vector2 DisplayVisibleMin; + public Vector2 DisplayVisibleMax; + public byte MouseDrawCursor; + public byte ConfigMacOSXBehaviors; + public byte ConfigInputTextCursorBlink; + public byte ConfigResizeWindowsFromEdges; + public IntPtr GetClipboardTextFn; + public IntPtr SetClipboardTextFn; + public void* ClipboardUserData; + public IntPtr ImeSetInputScreenPosFn; + public void* ImeWindowHandle; + public void* RenderDrawListsFnUnused; + public Vector2 MousePos; + public fixed byte MouseDown[5]; + public float MouseWheel; + public float MouseWheelH; + public byte KeyCtrl; + public byte KeyShift; + public byte KeyAlt; + public byte KeySuper; + public fixed byte KeysDown[512]; + public fixed ushort InputCharacters[17]; + public fixed float NavInputs[21]; + public byte WantCaptureMouse; + public byte WantCaptureKeyboard; + public byte WantTextInput; + public byte WantSetMousePos; + public byte WantSaveIniSettings; + public byte NavActive; + public byte NavVisible; + public float Framerate; + public int MetricsRenderVertices; + public int MetricsRenderIndices; + public int MetricsRenderWindows; + public int MetricsActiveWindows; + public int MetricsActiveAllocations; + public Vector2 MouseDelta; + public Vector2 MousePosPrev; + public Vector2 MouseClickedPos_0; + public Vector2 MouseClickedPos_1; + public Vector2 MouseClickedPos_2; + public Vector2 MouseClickedPos_3; + public Vector2 MouseClickedPos_4; + public fixed double MouseClickedTime[5]; + public fixed byte MouseClicked[5]; + public fixed byte MouseDoubleClicked[5]; + public fixed byte MouseReleased[5]; + public fixed byte MouseDownOwned[5]; + public fixed float MouseDownDuration[5]; + public fixed float MouseDownDurationPrev[5]; + public Vector2 MouseDragMaxDistanceAbs_0; + public Vector2 MouseDragMaxDistanceAbs_1; + public Vector2 MouseDragMaxDistanceAbs_2; + public Vector2 MouseDragMaxDistanceAbs_3; + public Vector2 MouseDragMaxDistanceAbs_4; + public fixed float MouseDragMaxDistanceSqr[5]; + public fixed float KeysDownDuration[512]; + public fixed float KeysDownDurationPrev[512]; + public fixed float NavInputsDownDuration[21]; + public fixed float NavInputsDownDurationPrev[21]; + } + public unsafe partial struct ImGuiIOPtr + { + public ImGuiIO* NativePtr { get; } + public ImGuiIOPtr(ImGuiIO* nativePtr) => NativePtr = nativePtr; + public ImGuiIOPtr(IntPtr nativePtr) => NativePtr = (ImGuiIO*)nativePtr; + public static implicit operator ImGuiIOPtr(ImGuiIO* nativePtr) => new ImGuiIOPtr(nativePtr); + public static implicit operator ImGuiIO* (ImGuiIOPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiIOPtr(IntPtr nativePtr) => new ImGuiIOPtr(nativePtr); + public ref ImGuiConfigFlags ConfigFlags => ref Unsafe.AsRef(&NativePtr->ConfigFlags); + public ref ImGuiBackendFlags BackendFlags => ref Unsafe.AsRef(&NativePtr->BackendFlags); + public ref Vector2 DisplaySize => ref Unsafe.AsRef(&NativePtr->DisplaySize); + public ref float DeltaTime => ref Unsafe.AsRef(&NativePtr->DeltaTime); + public ref float IniSavingRate => ref Unsafe.AsRef(&NativePtr->IniSavingRate); + public NullTerminatedString IniFilename => new NullTerminatedString(NativePtr->IniFilename); + public NullTerminatedString LogFilename => new NullTerminatedString(NativePtr->LogFilename); + public ref float MouseDoubleClickTime => ref Unsafe.AsRef(&NativePtr->MouseDoubleClickTime); + public ref float MouseDoubleClickMaxDist => ref Unsafe.AsRef(&NativePtr->MouseDoubleClickMaxDist); + public ref float MouseDragThreshold => ref Unsafe.AsRef(&NativePtr->MouseDragThreshold); + public RangeAccessor KeyMap => new RangeAccessor(NativePtr->KeyMap, 21); + public ref float KeyRepeatDelay => ref Unsafe.AsRef(&NativePtr->KeyRepeatDelay); + public ref float KeyRepeatRate => ref Unsafe.AsRef(&NativePtr->KeyRepeatRate); + public IntPtr UserData { get => (IntPtr)NativePtr->UserData; set => NativePtr->UserData = (void*)value; } + public ImFontAtlasPtr Fonts => new ImFontAtlasPtr(NativePtr->Fonts); + public ref float FontGlobalScale => ref Unsafe.AsRef(&NativePtr->FontGlobalScale); + public ref Bool8 FontAllowUserScaling => ref Unsafe.AsRef(&NativePtr->FontAllowUserScaling); + public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault); + public ref Vector2 DisplayFramebufferScale => ref Unsafe.AsRef(&NativePtr->DisplayFramebufferScale); + public ref Vector2 DisplayVisibleMin => ref Unsafe.AsRef(&NativePtr->DisplayVisibleMin); + public ref Vector2 DisplayVisibleMax => ref Unsafe.AsRef(&NativePtr->DisplayVisibleMax); + public ref Bool8 MouseDrawCursor => ref Unsafe.AsRef(&NativePtr->MouseDrawCursor); + public ref Bool8 ConfigMacOSXBehaviors => ref Unsafe.AsRef(&NativePtr->ConfigMacOSXBehaviors); + public ref Bool8 ConfigInputTextCursorBlink => ref Unsafe.AsRef(&NativePtr->ConfigInputTextCursorBlink); + public ref Bool8 ConfigResizeWindowsFromEdges => ref Unsafe.AsRef(&NativePtr->ConfigResizeWindowsFromEdges); + public ref IntPtr GetClipboardTextFn => ref Unsafe.AsRef(&NativePtr->GetClipboardTextFn); + public ref IntPtr SetClipboardTextFn => ref Unsafe.AsRef(&NativePtr->SetClipboardTextFn); + public IntPtr ClipboardUserData { get => (IntPtr)NativePtr->ClipboardUserData; set => NativePtr->ClipboardUserData = (void*)value; } + public ref IntPtr ImeSetInputScreenPosFn => ref Unsafe.AsRef(&NativePtr->ImeSetInputScreenPosFn); + public IntPtr ImeWindowHandle { get => (IntPtr)NativePtr->ImeWindowHandle; set => NativePtr->ImeWindowHandle = (void*)value; } + public IntPtr RenderDrawListsFnUnused { get => (IntPtr)NativePtr->RenderDrawListsFnUnused; set => NativePtr->RenderDrawListsFnUnused = (void*)value; } + public ref Vector2 MousePos => ref Unsafe.AsRef(&NativePtr->MousePos); + public RangeAccessor MouseDown => new RangeAccessor(NativePtr->MouseDown, 5); + public ref float MouseWheel => ref Unsafe.AsRef(&NativePtr->MouseWheel); + public ref float MouseWheelH => ref Unsafe.AsRef(&NativePtr->MouseWheelH); + public ref Bool8 KeyCtrl => ref Unsafe.AsRef(&NativePtr->KeyCtrl); + public ref Bool8 KeyShift => ref Unsafe.AsRef(&NativePtr->KeyShift); + public ref Bool8 KeyAlt => ref Unsafe.AsRef(&NativePtr->KeyAlt); + public ref Bool8 KeySuper => ref Unsafe.AsRef(&NativePtr->KeySuper); + public RangeAccessor KeysDown => new RangeAccessor(NativePtr->KeysDown, 512); + public RangeAccessor InputCharacters => new RangeAccessor(NativePtr->InputCharacters, 17); + public RangeAccessor NavInputs => new RangeAccessor(NativePtr->NavInputs, 21); + public ref Bool8 WantCaptureMouse => ref Unsafe.AsRef(&NativePtr->WantCaptureMouse); + public ref Bool8 WantCaptureKeyboard => ref Unsafe.AsRef(&NativePtr->WantCaptureKeyboard); + public ref Bool8 WantTextInput => ref Unsafe.AsRef(&NativePtr->WantTextInput); + public ref Bool8 WantSetMousePos => ref Unsafe.AsRef(&NativePtr->WantSetMousePos); + public ref Bool8 WantSaveIniSettings => ref Unsafe.AsRef(&NativePtr->WantSaveIniSettings); + public ref Bool8 NavActive => ref Unsafe.AsRef(&NativePtr->NavActive); + public ref Bool8 NavVisible => ref Unsafe.AsRef(&NativePtr->NavVisible); + public ref float Framerate => ref Unsafe.AsRef(&NativePtr->Framerate); + public ref int MetricsRenderVertices => ref Unsafe.AsRef(&NativePtr->MetricsRenderVertices); + public ref int MetricsRenderIndices => ref Unsafe.AsRef(&NativePtr->MetricsRenderIndices); + public ref int MetricsRenderWindows => ref Unsafe.AsRef(&NativePtr->MetricsRenderWindows); + public ref int MetricsActiveWindows => ref Unsafe.AsRef(&NativePtr->MetricsActiveWindows); + public ref int MetricsActiveAllocations => ref Unsafe.AsRef(&NativePtr->MetricsActiveAllocations); + public ref Vector2 MouseDelta => ref Unsafe.AsRef(&NativePtr->MouseDelta); + public ref Vector2 MousePosPrev => ref Unsafe.AsRef(&NativePtr->MousePosPrev); + public RangeAccessor MouseClickedPos => new RangeAccessor(&NativePtr->MouseClickedPos_0, 5); + public RangeAccessor MouseClickedTime => new RangeAccessor(NativePtr->MouseClickedTime, 5); + public RangeAccessor MouseClicked => new RangeAccessor(NativePtr->MouseClicked, 5); + public RangeAccessor MouseDoubleClicked => new RangeAccessor(NativePtr->MouseDoubleClicked, 5); + public RangeAccessor MouseReleased => new RangeAccessor(NativePtr->MouseReleased, 5); + public RangeAccessor MouseDownOwned => new RangeAccessor(NativePtr->MouseDownOwned, 5); + public RangeAccessor MouseDownDuration => new RangeAccessor(NativePtr->MouseDownDuration, 5); + public RangeAccessor MouseDownDurationPrev => new RangeAccessor(NativePtr->MouseDownDurationPrev, 5); + public RangeAccessor MouseDragMaxDistanceAbs => new RangeAccessor(&NativePtr->MouseDragMaxDistanceAbs_0, 5); + public RangeAccessor MouseDragMaxDistanceSqr => new RangeAccessor(NativePtr->MouseDragMaxDistanceSqr, 5); + public RangeAccessor KeysDownDuration => new RangeAccessor(NativePtr->KeysDownDuration, 512); + public RangeAccessor KeysDownDurationPrev => new RangeAccessor(NativePtr->KeysDownDurationPrev, 512); + public RangeAccessor NavInputsDownDuration => new RangeAccessor(NativePtr->NavInputsDownDuration, 21); + public RangeAccessor NavInputsDownDurationPrev => new RangeAccessor(NativePtr->NavInputsDownDurationPrev, 21); + public void AddInputCharactersUTF8(string utf8_chars) + { + int utf8_chars_byteCount = Encoding.UTF8.GetByteCount(utf8_chars); + byte* native_utf8_chars = stackalloc byte[utf8_chars_byteCount + 1]; + fixed (char* utf8_chars_ptr = utf8_chars) + { + int native_utf8_chars_offset = Encoding.UTF8.GetBytes(utf8_chars_ptr, utf8_chars.Length, native_utf8_chars, utf8_chars_byteCount); + native_utf8_chars[native_utf8_chars_offset] = 0; + } + ImGuiNative.ImGuiIO_AddInputCharactersUTF8(NativePtr, native_utf8_chars); + } + public void ClearInputCharacters() + { + ImGuiNative.ImGuiIO_ClearInputCharacters(NativePtr); + } + public void AddInputCharacter(ushort c) + { + ImGuiNative.ImGuiIO_AddInputCharacter(NativePtr, c); + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs b/src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs new file mode 100644 index 0000000..5dc27f6 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs @@ -0,0 +1,65 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiInputTextCallbackData + { + public ImGuiInputTextFlags EventFlag; + public ImGuiInputTextFlags Flags; + public void* UserData; + public ushort EventChar; + public ImGuiKey EventKey; + public byte* Buf; + public int BufTextLen; + public int BufSize; + public byte BufDirty; + public int CursorPos; + public int SelectionStart; + public int SelectionEnd; + } + public unsafe partial struct ImGuiInputTextCallbackDataPtr + { + public ImGuiInputTextCallbackData* NativePtr { get; } + public ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* nativePtr) => NativePtr = nativePtr; + public ImGuiInputTextCallbackDataPtr(IntPtr nativePtr) => NativePtr = (ImGuiInputTextCallbackData*)nativePtr; + public static implicit operator ImGuiInputTextCallbackDataPtr(ImGuiInputTextCallbackData* nativePtr) => new ImGuiInputTextCallbackDataPtr(nativePtr); + public static implicit operator ImGuiInputTextCallbackData* (ImGuiInputTextCallbackDataPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiInputTextCallbackDataPtr(IntPtr nativePtr) => new ImGuiInputTextCallbackDataPtr(nativePtr); + public ref ImGuiInputTextFlags EventFlag => ref Unsafe.AsRef(&NativePtr->EventFlag); + public ref ImGuiInputTextFlags Flags => ref Unsafe.AsRef(&NativePtr->Flags); + public IntPtr UserData { get => (IntPtr)NativePtr->UserData; set => NativePtr->UserData = (void*)value; } + public ref ushort EventChar => ref Unsafe.AsRef(&NativePtr->EventChar); + public ref ImGuiKey EventKey => ref Unsafe.AsRef(&NativePtr->EventKey); + public IntPtr Buf { get => (IntPtr)NativePtr->Buf; set => NativePtr->Buf = (byte*)value; } + public ref int BufTextLen => ref Unsafe.AsRef(&NativePtr->BufTextLen); + public ref int BufSize => ref Unsafe.AsRef(&NativePtr->BufSize); + public ref Bool8 BufDirty => ref Unsafe.AsRef(&NativePtr->BufDirty); + public ref int CursorPos => ref Unsafe.AsRef(&NativePtr->CursorPos); + public ref int SelectionStart => ref Unsafe.AsRef(&NativePtr->SelectionStart); + public ref int SelectionEnd => ref Unsafe.AsRef(&NativePtr->SelectionEnd); + public void DeleteChars(int pos, int bytes_count) + { + ImGuiNative.ImGuiInputTextCallbackData_DeleteChars(NativePtr, pos, bytes_count); + } + public bool HasSelection() + { + byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection(NativePtr); + return ret != 0; + } + public void InsertChars(int pos, string text) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text = stackalloc byte[text_byteCount + 1]; + fixed (char* text_ptr = text) + { + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + byte* native_text_end = null; + ImGuiNative.ImGuiInputTextCallbackData_InsertChars(NativePtr, pos, native_text, native_text_end); + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiInputTextFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiInputTextFlags.gen.cs new file mode 100644 index 0000000..e7efe52 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiInputTextFlags.gen.cs @@ -0,0 +1,28 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiInputTextFlags + { + None = 0, + CharsDecimal = 1 << 0, + CharsHexadecimal = 1 << 1, + CharsUppercase = 1 << 2, + CharsNoBlank = 1 << 3, + AutoSelectAll = 1 << 4, + EnterReturnsTrue = 1 << 5, + CallbackCompletion = 1 << 6, + CallbackHistory = 1 << 7, + CallbackAlways = 1 << 8, + CallbackCharFilter = 1 << 9, + AllowTabInput = 1 << 10, + CtrlEnterForNewLine = 1 << 11, + NoHorizontalScroll = 1 << 12, + AlwaysInsertMode = 1 << 13, + ReadOnly = 1 << 14, + Password = 1 << 15, + NoUndoRedo = 1 << 16, + CharsScientific = 1 << 17, + CallbackResize = 1 << 18, + Multiline = 1 << 20, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiKey.gen.cs b/src/ImGui.NET/Generated/ImGuiKey.gen.cs new file mode 100644 index 0000000..a351bd4 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiKey.gen.cs @@ -0,0 +1,28 @@ +namespace ImGuiNET +{ + public enum ImGuiKey + { + Tab = 0, + LeftArrow = 1, + RightArrow = 2, + UpArrow = 3, + DownArrow = 4, + PageUp = 5, + PageDown = 6, + Home = 7, + End = 8, + Insert = 9, + Delete = 10, + Backspace = 11, + Space = 12, + Enter = 13, + Escape = 14, + A = 15, + C = 16, + V = 17, + X = 18, + Y = 19, + Z = 20, + COUNT = 21, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs b/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs new file mode 100644 index 0000000..7b7eb01 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiListClipper.gen.cs @@ -0,0 +1,50 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiListClipper + { + public float StartPosY; + public float ItemsHeight; + public int ItemsCount; + public int StepNo; + public int DisplayStart; + public int DisplayEnd; + } + public unsafe partial struct ImGuiListClipperPtr + { + public ImGuiListClipper* NativePtr { get; } + public ImGuiListClipperPtr(ImGuiListClipper* nativePtr) => NativePtr = nativePtr; + public ImGuiListClipperPtr(IntPtr nativePtr) => NativePtr = (ImGuiListClipper*)nativePtr; + public static implicit operator ImGuiListClipperPtr(ImGuiListClipper* nativePtr) => new ImGuiListClipperPtr(nativePtr); + public static implicit operator ImGuiListClipper* (ImGuiListClipperPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiListClipperPtr(IntPtr nativePtr) => new ImGuiListClipperPtr(nativePtr); + public ref float StartPosY => ref Unsafe.AsRef(&NativePtr->StartPosY); + public ref float ItemsHeight => ref Unsafe.AsRef(&NativePtr->ItemsHeight); + public ref int ItemsCount => ref Unsafe.AsRef(&NativePtr->ItemsCount); + public ref int StepNo => ref Unsafe.AsRef(&NativePtr->StepNo); + public ref int DisplayStart => ref Unsafe.AsRef(&NativePtr->DisplayStart); + public ref int DisplayEnd => ref Unsafe.AsRef(&NativePtr->DisplayEnd); + public void End() + { + ImGuiNative.ImGuiListClipper_End(NativePtr); + } + public void Begin(int items_count) + { + float items_height = -1.0f; + ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height); + } + public void Begin(int items_count, float items_height) + { + ImGuiNative.ImGuiListClipper_Begin(NativePtr, items_count, items_height); + } + public bool Step() + { + byte ret = ImGuiNative.ImGuiListClipper_Step(NativePtr); + return ret != 0; + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiMouseCursor.gen.cs b/src/ImGui.NET/Generated/ImGuiMouseCursor.gen.cs new file mode 100644 index 0000000..1f817c4 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiMouseCursor.gen.cs @@ -0,0 +1,16 @@ +namespace ImGuiNET +{ + public enum ImGuiMouseCursor + { + None = -1, + Arrow = 0, + TextInput = 1, + ResizeAll = 2, + ResizeNS = 3, + ResizeEW = 4, + ResizeNESW = 5, + ResizeNWSE = 6, + Hand = 7, + COUNT = 8, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiNative.gen.cs b/src/ImGui.NET/Generated/ImGuiNative.gen.cs new file mode 100644 index 0000000..b88b7fe --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiNative.gen.cs @@ -0,0 +1,1012 @@ +using System; +using System.Numerics; +using System.Runtime.InteropServices; + +namespace ImGuiNET +{ + public static unsafe partial class ImGuiNative + { + [DllImport("cimgui")] + public static extern float igGetFrameHeight(); + [DllImport("cimgui")] + public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas); + [DllImport("cimgui")] + public static extern void igTextUnformatted(byte* text, byte* text_end); + [DllImport("cimgui")] + public static extern void igPopFont(); + [DllImport("cimgui")] + public static extern byte igCombo(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items); + [DllImport("cimgui")] + public static extern byte igComboStr(byte* label, int* current_item, byte* items_separated_by_zeros, int popup_max_height_in_items); + [DllImport("cimgui")] + public static extern void igCaptureKeyboardFromApp(byte capture); + [DllImport("cimgui")] + public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags); + [DllImport("cimgui")] + public static extern void igRender(); + [DllImport("cimgui")] + public static extern void ImDrawList_ChannelsSetCurrent(ImDrawList* self, int channel_index); + [DllImport("cimgui")] + public static extern byte igDragFloat4(byte* label, Vector4* v, float v_speed, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern void ImDrawList_ChannelsSplit(ImDrawList* self, int channels_count); + [DllImport("cimgui")] + public static extern byte igIsMousePosValid(Vector2* mouse_pos); + [DllImport("cimgui", EntryPoint = "igGetCursorScreenPos_nonUDT2")] + public static extern Vector2 igGetCursorScreenPos(); + [DllImport("cimgui")] + public static extern byte igDebugCheckVersionAndDataLayout(byte* version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert); + [DllImport("cimgui")] + public static extern void igSetScrollHere(float center_y_ratio); + [DllImport("cimgui")] + public static extern void igSetScrollY(float scroll_y); + [DllImport("cimgui")] + public static extern void igSetColorEditOptions(ImGuiColorEditFlags flags); + [DllImport("cimgui")] + public static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio); + [DllImport("cimgui")] + public static extern Vector4* igGetStyleColorVec4(ImGuiCol idx); + [DllImport("cimgui")] + public static extern byte igIsMouseHoveringRect(Vector2 r_min, Vector2 r_max, byte clip); + [DllImport("cimgui")] + public static extern void ImVec4_ImVec4(Vector4* self); + [DllImport("cimgui")] + public static extern void ImVec4_ImVec4Float(Vector4* self, float _x, float _y, float _z, float _w); + [DllImport("cimgui")] + public static extern void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a); + [DllImport("cimgui")] + public static extern byte igDragFloat3(byte* label, Vector3* v, float v_speed, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern void ImDrawList_AddPolyline(ImDrawList* self, Vector2* points, int num_points, uint col, byte closed, float thickness); + [DllImport("cimgui")] + public static extern void igValueBool(byte* prefix, byte b); + [DllImport("cimgui")] + public static extern void igValueInt(byte* prefix, int v); + [DllImport("cimgui")] + public static extern void igValueUint(byte* prefix, uint v); + [DllImport("cimgui")] + public static extern void igValueFloat(byte* prefix, float v, byte* float_format); + [DllImport("cimgui")] + public static extern void ImGuiTextFilter_Build(ImGuiTextFilter* self); + [DllImport("cimgui", EntryPoint = "igGetItemRectMax_nonUDT2")] + public static extern Vector2 igGetItemRectMax(); + [DllImport("cimgui")] + public static extern byte igIsItemDeactivated(); + [DllImport("cimgui")] + public static extern void igPushStyleVarFloat(ImGuiStyleVar idx, float val); + [DllImport("cimgui")] + public static extern void igPushStyleVarVec2(ImGuiStyleVar idx, Vector2 val); + [DllImport("cimgui")] + public static extern byte* igSaveIniSettingsToMemory(uint* out_ini_size); + [DllImport("cimgui")] + public static extern byte igDragIntRange2(byte* label, int* v_current_min, int* v_current_max, float v_speed, int v_min, int v_max, byte* format, byte* format_max); + [DllImport("cimgui")] + public static extern void igUnindent(float indent_w); + [DllImport("cimgui")] + public static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* self, byte* compressed_font_data_base85, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + [DllImport("cimgui")] + public static extern void igPopAllowKeyboardFocus(); + [DllImport("cimgui")] + public static extern void igLoadIniSettingsFromDisk(byte* ini_filename); + [DllImport("cimgui", EntryPoint = "igGetCursorStartPos_nonUDT2")] + public static extern Vector2 igGetCursorStartPos(); + [DllImport("cimgui")] + public static extern void igSetCursorScreenPos(Vector2 screen_pos); + [DllImport("cimgui")] + public static extern byte igInputInt4(byte* label, int* v, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void ImFont_AddRemapChar(ImFont* self, ushort dst, ushort src, byte overwrite_dst); + [DllImport("cimgui")] + public static extern void ImFont_AddGlyph(ImFont* self, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x); + [DllImport("cimgui")] + public static extern byte igIsRectVisible(Vector2 size); + [DllImport("cimgui")] + public static extern byte igIsRectVisibleVec2(Vector2 rect_min, Vector2 rect_max); + [DllImport("cimgui")] + public static extern void ImFont_GrowIndex(ImFont* self, int new_size); + [DllImport("cimgui")] + public static extern byte ImFontAtlas_Build(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern void igLabelText(byte* label, byte* fmt); + [DllImport("cimgui")] + public static extern void ImFont_RenderText(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, Vector4 clip_rect, byte* text_begin, byte* text_end, float wrap_width, byte cpu_fine_clip); + [DllImport("cimgui")] + public static extern void igLogFinish(); + [DllImport("cimgui")] + public static extern byte igIsKeyPressed(int user_key_index, byte repeat); + [DllImport("cimgui")] + public static extern float igGetColumnOffset(int column_index); + [DllImport("cimgui")] + public static extern void ImDrawList_PopClipRect(ImDrawList* self); + [DllImport("cimgui")] + public static extern ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self, ushort c); + [DllImport("cimgui")] + public static extern void igSetNextWindowCollapsed(byte collapsed, ImGuiCond cond); + [DllImport("cimgui")] + public static extern IntPtr igGetCurrentContext(); + [DllImport("cimgui")] + public static extern byte igSmallButton(byte* label); + [DllImport("cimgui")] + public static extern byte igOpenPopupOnItemClick(byte* str_id, int mouse_button); + [DllImport("cimgui")] + public static extern byte igIsAnyMouseDown(); + [DllImport("cimgui")] + public static extern byte* ImFont_CalcWordWrapPositionA(ImFont* self, float scale, byte* text, byte* text_end, float wrap_width); + [DllImport("cimgui", EntryPoint = "ImFont_CalcTextSizeA_nonUDT2")] + public static extern Vector2 ImFont_CalcTextSizeA(ImFont* self, float size, float max_width, float wrap_width, byte* text_begin, byte* text_end, byte** remaining); + [DllImport("cimgui")] + public static extern void GlyphRangesBuilder_SetBit(GlyphRangesBuilder* self, int n); + [DllImport("cimgui")] + public static extern byte ImFont_IsLoaded(ImFont* self); + [DllImport("cimgui")] + public static extern float ImFont_GetCharAdvance(ImFont* self, ushort c); + [DllImport("cimgui")] + public static extern byte igImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col, Vector4 tint_col); + [DllImport("cimgui")] + public static extern void ImFont_SetFallbackChar(ImFont* self, ushort c); + [DllImport("cimgui")] + public static extern void igEndFrame(); + [DllImport("cimgui")] + public static extern byte igSliderFloat2(byte* label, Vector2* v, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern void ImFont_RenderChar(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, ushort c); + [DllImport("cimgui")] + public static extern byte igRadioButtonBool(byte* label, byte active); + [DllImport("cimgui")] + public static extern byte igRadioButtonIntPtr(byte* label, int* v, int v_button); + [DllImport("cimgui")] + public static extern void ImDrawList_PushClipRect(ImDrawList* self, Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); + [DllImport("cimgui")] + public static extern ImFontGlyph* ImFont_FindGlyph(ImFont* self, ushort c); + [DllImport("cimgui")] + public static extern byte igIsItemDeactivatedAfterEdit(); + [DllImport("cimgui")] + public static extern ImDrawList* igGetWindowDrawList(); + [DllImport("cimgui")] + public static extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* self, ImFontConfig* font_cfg); + [DllImport("cimgui")] + public static extern void ImDrawList_PathBezierCurveTo(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, int num_segments); + [DllImport("cimgui")] + public static extern void ImGuiPayload_Clear(ImGuiPayload* self); + [DllImport("cimgui")] + public static extern void igNewLine(); + [DllImport("cimgui")] + public static extern byte igIsItemFocused(); + [DllImport("cimgui")] + public static extern void igLoadIniSettingsFromMemory(byte* ini_data, uint ini_size); + [DllImport("cimgui")] + public static extern byte igSliderInt2(byte* label, int* v, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern void igSetWindowSizeVec2(Vector2 size, ImGuiCond cond); + [DllImport("cimgui")] + public static extern void igSetWindowSizeStr(byte* name, Vector2 size, ImGuiCond cond); + [DllImport("cimgui")] + public static extern byte igInputFloat(byte* label, float* v, float step, float step_fast, byte* format, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void ImFont_ImFont(ImFont* self); + [DllImport("cimgui")] + public static extern void ImGuiStorage_SetFloat(ImGuiStorage* self, uint key, float val); + [DllImport("cimgui")] + public static extern void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v); + [DllImport("cimgui")] + public static extern byte igBeginMenuBar(); + [DllImport("cimgui")] + public static extern byte igIsPopupOpen(byte* str_id); + [DllImport("cimgui")] + public static extern byte igIsItemVisible(); + [DllImport("cimgui")] + public static extern void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self, CustomRect* rect, Vector2* out_uv_min, Vector2* out_uv_max); + [DllImport("cimgui")] + public static extern CustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self, int index); + [DllImport("cimgui")] + public static extern void GlyphRangesBuilder_AddText(GlyphRangesBuilder* self, byte* text, byte* text_end); + [DllImport("cimgui")] + public static extern void ImDrawList_UpdateTextureID(ImDrawList* self); + [DllImport("cimgui")] + public static extern void igSetNextWindowSize(Vector2 size, ImGuiCond cond); + [DllImport("cimgui")] + public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, uint id, int width, int height); + [DllImport("cimgui")] + public static extern void igSetWindowCollapsedBool(byte collapsed, ImGuiCond cond); + [DllImport("cimgui")] + public static extern void igSetWindowCollapsedStr(byte* name, byte collapsed, ImGuiCond cond); + [DllImport("cimgui", EntryPoint = "igGetMouseDragDelta_nonUDT2")] + public static extern Vector2 igGetMouseDragDelta(int button, float lock_threshold); + [DllImport("cimgui")] + public static extern ImGuiPayload* igAcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags); + [DllImport("cimgui")] + public static extern byte igBeginDragDropSource(ImGuiDragDropFlags flags); + [DllImport("cimgui")] + public static extern byte CustomRect_IsPacked(CustomRect* self); + [DllImport("cimgui")] + public static extern void igPlotLines(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); + [DllImport("cimgui")] + public static extern byte ImFontAtlas_IsBuilt(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern void ImVec2_ImVec2(Vector2* self); + [DllImport("cimgui")] + public static extern void ImVec2_ImVec2Float(Vector2* self, float _x, float _y); + [DllImport("cimgui")] + public static extern void ImGuiPayload_ImGuiPayload(ImGuiPayload* self); + [DllImport("cimgui")] + public static extern void ImDrawList_Clear(ImDrawList* self); + [DllImport("cimgui")] + public static extern void GlyphRangesBuilder_AddRanges(GlyphRangesBuilder* self, ushort* ranges); + [DllImport("cimgui")] + public static extern int igGetFrameCount(); + [DllImport("cimgui")] + public static extern byte* ImFont_GetDebugName(ImFont* self); + [DllImport("cimgui")] + public static extern void igListBoxFooter(); + [DllImport("cimgui")] + public static extern void igPopClipRect(); + [DllImport("cimgui")] + public static extern void ImDrawList_AddBezierCurve(ImDrawList* self, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments); + [DllImport("cimgui")] + public static extern void GlyphRangesBuilder_GlyphRangesBuilder(GlyphRangesBuilder* self); + [DllImport("cimgui", EntryPoint = "igGetWindowSize_nonUDT2")] + public static extern Vector2 igGetWindowSize(); + [DllImport("cimgui")] + public static extern ushort* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern byte igCheckboxFlags(byte* label, uint* flags, uint flags_value); + [DllImport("cimgui")] + public static extern ushort* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags); + [DllImport("cimgui")] + public static extern ushort* ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern void igPlotHistogramFloatPtr(byte* label, float* values, int values_count, int values_offset, byte* overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); + [DllImport("cimgui")] + public static extern byte igBeginPopupContextVoid(byte* str_id, int mouse_button); + [DllImport("cimgui")] + public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern void igShowStyleEditor(ImGuiStyle* @ref); + [DllImport("cimgui")] + public static extern byte igCheckbox(byte* label, byte* v); + [DllImport("cimgui", EntryPoint = "igGetWindowPos_nonUDT2")] + public static extern Vector2 igGetWindowPos(); + [DllImport("cimgui")] + public static extern void ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(ImGuiInputTextCallbackData* self); + [DllImport("cimgui")] + public static extern void igSetNextWindowContentSize(Vector2 size); + [DllImport("cimgui")] + public static extern void igTextColored(Vector4 col, byte* fmt); + [DllImport("cimgui")] + public static extern void igLogToFile(int max_depth, byte* filename); + [DllImport("cimgui")] + public static extern byte igButton(byte* label, Vector2 size); + [DllImport("cimgui")] + public static extern byte igIsItemEdited(); + [DllImport("cimgui")] + public static extern void ImDrawList_PushTextureID(ImDrawList* self, IntPtr texture_id); + [DllImport("cimgui")] + public static extern void igTreeAdvanceToLabelPos(); + [DllImport("cimgui")] + public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count); + [DllImport("cimgui")] + public static extern byte igDragInt2(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern ushort* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern byte igIsAnyItemActive(); + [DllImport("cimgui")] + public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id); + [DllImport("cimgui")] + public static extern byte igMenuItemBool(byte* label, byte* shortcut, byte selected, byte enabled); + [DllImport("cimgui")] + public static extern byte igMenuItemBoolPtr(byte* label, byte* shortcut, byte* p_selected, byte enabled); + [DllImport("cimgui")] + public static extern byte igSliderFloat4(byte* label, Vector4* v, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern float igGetCursorPosX(); + [DllImport("cimgui")] + public static extern void ImFontAtlas_ClearTexData(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern void ImFontAtlas_ClearFonts(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern int igGetColumnsCount(); + [DllImport("cimgui")] + public static extern void igPopButtonRepeat(); + [DllImport("cimgui")] + public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* v, int components, float v_speed, void* v_min, void* v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self); + [DllImport("cimgui")] + public static extern void igSpacing(); + [DllImport("cimgui")] + public static extern void ImFontAtlas_Clear(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern byte igIsAnyItemFocused(); + [DllImport("cimgui")] + public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags); + [DllImport("cimgui")] + public static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(ImFontAtlas* self, void* compressed_font_data, int compressed_font_size, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + [DllImport("cimgui")] + public static extern void igMemFree(void* ptr); + [DllImport("cimgui", EntryPoint = "igGetFontTexUvWhitePixel_nonUDT2")] + public static extern Vector2 igGetFontTexUvWhitePixel(); + [DllImport("cimgui")] + public static extern void ImDrawList_AddDrawCmd(ImDrawList* self); + [DllImport("cimgui")] + public static extern byte igIsItemClicked(int mouse_button); + [DllImport("cimgui")] + public static extern ImFont* ImFontAtlas_AddFontFromMemoryTTF(ImFontAtlas* self, void* font_data, int font_size, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + [DllImport("cimgui")] + public static extern ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* self, byte* filename, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + [DllImport("cimgui")] + public static extern void igProgressBar(float fraction, Vector2 size_arg, byte* overlay); + [DllImport("cimgui")] + public static extern ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* self, ImFontConfig* font_cfg); + [DllImport("cimgui")] + public static extern void igSetNextWindowBgAlpha(float alpha); + [DllImport("cimgui")] + public static extern byte igBeginPopup(byte* str_id, ImGuiWindowFlags flags); + [DllImport("cimgui")] + public static extern void ImFont_BuildLookupTable(ImFont* self); + [DllImport("cimgui")] + public static extern float igGetScrollX(); + [DllImport("cimgui")] + public static extern int igGetKeyIndex(ImGuiKey imgui_key); + [DllImport("cimgui")] + public static extern ImDrawList* igGetOverlayDrawList(); + [DllImport("cimgui")] + public static extern uint igGetIDStr(byte* str_id); + [DllImport("cimgui")] + public static extern uint igGetIDStrStr(byte* str_id_begin, byte* str_id_end); + [DllImport("cimgui")] + public static extern uint igGetIDPtr(void* ptr_id); + [DllImport("cimgui")] + public static extern ushort* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern byte igListBoxHeaderVec2(byte* label, Vector2 size); + [DllImport("cimgui")] + public static extern byte igListBoxHeaderInt(byte* label, int items_count, int height_in_items); + [DllImport("cimgui")] + public static extern void ImFontConfig_ImFontConfig(ImFontConfig* self); + [DllImport("cimgui")] + public static extern byte igIsMouseReleased(int button); + [DllImport("cimgui")] + public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 sc); + [DllImport("cimgui", EntryPoint = "igGetItemRectMin_nonUDT2")] + public static extern Vector2 igGetItemRectMin(); + [DllImport("cimgui")] + public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self); + [DllImport("cimgui")] + public static extern void igLogText(byte* fmt); + [DllImport("cimgui")] + public static extern void ImDrawData_Clear(ImDrawData* self); + [DllImport("cimgui")] + public static extern void* ImGuiStorage_GetVoidPtr(ImGuiStorage* self, uint key); + [DllImport("cimgui")] + public static extern void igTextWrapped(byte* fmt); + [DllImport("cimgui")] + public static extern void ImDrawList_UpdateClipRect(ImDrawList* self); + [DllImport("cimgui")] + public static extern void ImDrawList_PrimVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); + [DllImport("cimgui")] + public static extern void igEndGroup(); + [DllImport("cimgui")] + public static extern ImFont* igGetFont(); + [DllImport("cimgui")] + public static extern void igTreePushStr(byte* str_id); + [DllImport("cimgui")] + public static extern void igTreePushPtr(void* ptr_id); + [DllImport("cimgui")] + public static extern void igTextDisabled(byte* fmt); + [DllImport("cimgui")] + public static extern void ImDrawList_PrimRect(ImDrawList* self, Vector2 a, Vector2 b, uint col); + [DllImport("cimgui")] + public static extern void ImDrawList_AddQuad(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness); + [DllImport("cimgui")] + public static extern void ImDrawList_ClearFreeMemory(ImDrawList* self); + [DllImport("cimgui")] + public static extern void igSetNextTreeNodeOpen(byte is_open, ImGuiCond cond); + [DllImport("cimgui")] + public static extern void igLogToTTY(int max_depth); + [DllImport("cimgui")] + public static extern void GlyphRangesBuilder_BuildRanges(GlyphRangesBuilder* self, ImVector* out_ranges); + [DllImport("cimgui")] + public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self); + [DllImport("cimgui")] + public static extern ImGuiIO* igGetIO(); + [DllImport("cimgui")] + public static extern byte igDragInt4(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern void igNextColumn(); + [DllImport("cimgui")] + public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags, float thickness); + [DllImport("cimgui")] + public static extern void TextRange_split(TextRange* self, byte separator, ImVector* @out); + [DllImport("cimgui")] + public static extern void igSetCursorPos(Vector2 local_pos); + [DllImport("cimgui")] + public static extern byte igBeginPopupModal(byte* name, byte* p_open, ImGuiWindowFlags flags); + [DllImport("cimgui")] + public static extern byte igSliderInt4(byte* label, int* v, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern void ImDrawList_AddCallback(ImDrawList* self, IntPtr callback, void* callback_data); + [DllImport("cimgui")] + public static extern void igShowMetricsWindow(byte* p_open); + [DllImport("cimgui")] + public static extern float igGetScrollMaxY(); + [DllImport("cimgui")] + public static extern void igBeginTooltip(); + [DllImport("cimgui")] + public static extern void igSetScrollX(float scroll_x); + [DllImport("cimgui")] + public static extern ImDrawData* igGetDrawData(); + [DllImport("cimgui")] + public static extern float igGetTextLineHeight(); + [DllImport("cimgui")] + public static extern void igSeparator(); + [DllImport("cimgui")] + public static extern byte igBeginChild(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags); + [DllImport("cimgui")] + public static extern byte igBeginChildID(uint id, Vector2 size, byte border, ImGuiWindowFlags flags); + [DllImport("cimgui")] + public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags); + [DllImport("cimgui")] + public static extern byte igIsMouseClicked(int button, byte repeat); + [DllImport("cimgui")] + public static extern float igCalcItemWidth(); + [DllImport("cimgui")] + public static extern void ImDrawList_PathArcToFast(ImDrawList* self, Vector2 centre, float radius, int a_min_of_12, int a_max_of_12); + [DllImport("cimgui")] + public static extern void igEndChildFrame(); + [DllImport("cimgui")] + public static extern void igIndent(float indent_w); + [DllImport("cimgui")] + public static extern byte igSetDragDropPayload(byte* type, void* data, uint size, ImGuiCond cond); + [DllImport("cimgui")] + public static extern byte GlyphRangesBuilder_GetBit(GlyphRangesBuilder* self, int n); + [DllImport("cimgui")] + public static extern byte ImGuiTextFilter_Draw(ImGuiTextFilter* self, byte* label, float width); + [DllImport("cimgui")] + public static extern void igShowDemoWindow(byte* p_open); + [DllImport("cimgui")] + public static extern void ImDrawList_PathStroke(ImDrawList* self, uint col, byte closed, float thickness); + [DllImport("cimgui")] + public static extern void ImDrawList_PathFillConvex(ImDrawList* self, uint col); + [DllImport("cimgui")] + public static extern void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self, Vector2 pos); + [DllImport("cimgui")] + public static extern void igEndMenu(); + [DllImport("cimgui")] + public static extern byte igColorButton(byte* desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size); + [DllImport("cimgui")] + public static extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + [DllImport("cimgui")] + public static extern byte igIsKeyReleased(int user_key_index); + [DllImport("cimgui")] + public static extern void igSetClipboardText(byte* text); + [DllImport("cimgui")] + public static extern void ImDrawList_PathArcTo(ImDrawList* self, Vector2 centre, float radius, float a_min, float a_max, int num_segments); + [DllImport("cimgui")] + public static extern void ImDrawList_AddConvexPolyFilled(ImDrawList* self, Vector2* points, int num_points, uint col); + [DllImport("cimgui")] + public static extern byte igIsWindowCollapsed(); + [DllImport("cimgui")] + public static extern void igShowFontSelector(byte* label); + [DllImport("cimgui")] + public static extern void ImDrawList_AddImageQuad(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); + [DllImport("cimgui")] + public static extern void igSetNextWindowFocus(); + [DllImport("cimgui")] + public static extern void igSameLine(float pos_x, float spacing_w); + [DllImport("cimgui")] + public static extern byte igBegin(byte* name, byte* p_open, ImGuiWindowFlags flags); + [DllImport("cimgui")] + public static extern byte igColorEdit3(byte* label, Vector3* col, ImGuiColorEditFlags flags); + [DllImport("cimgui")] + public static extern void ImDrawList_AddImage(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); + [DllImport("cimgui")] + public static extern void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self, byte* utf8_chars); + [DllImport("cimgui")] + public static extern void ImDrawList_AddText(ImDrawList* self, Vector2 pos, uint col, byte* text_begin, byte* text_end); + [DllImport("cimgui")] + public static extern void ImDrawList_AddTextFontPtr(ImDrawList* self, ImFont* font, float font_size, Vector2 pos, uint col, byte* text_begin, byte* text_end, float wrap_width, Vector4* cpu_fine_clip_rect); + [DllImport("cimgui")] + public static extern void ImDrawList_AddCircleFilled(ImDrawList* self, Vector2 centre, float radius, uint col, int num_segments); + [DllImport("cimgui")] + public static extern byte igInputFloat2(byte* label, Vector2* v, byte* format, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void igPushButtonRepeat(byte repeat); + [DllImport("cimgui")] + public static extern void igPopItemWidth(); + [DllImport("cimgui")] + public static extern void ImDrawList_AddCircle(ImDrawList* self, Vector2 centre, float radius, uint col, int num_segments, float thickness); + [DllImport("cimgui")] + public static extern void ImDrawList_AddTriangleFilled(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, uint col); + [DllImport("cimgui")] + public static extern void ImDrawList_AddTriangle(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, uint col, float thickness); + [DllImport("cimgui")] + public static extern void ImDrawList_AddQuadFilled(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col); + [DllImport("cimgui")] + public static extern float igGetFontSize(); + [DllImport("cimgui")] + public static extern byte igInputDouble(byte* label, double* v, double step, double step_fast, byte* format, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void ImDrawList_PrimReserve(ImDrawList* self, int idx_count, int vtx_count); + [DllImport("cimgui")] + public static extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self, Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left); + [DllImport("cimgui")] + public static extern void igEndPopup(); + [DllImport("cimgui")] + public static extern void ImFontAtlas_ClearInputData(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern void ImDrawList_AddLine(ImDrawList* self, Vector2 a, Vector2 b, uint col, float thickness); + [DllImport("cimgui")] + public static extern byte igInputTextMultiline(byte* label, byte* buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); + [DllImport("cimgui")] + public static extern byte igSelectable(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size); + [DllImport("cimgui")] + public static extern byte igSelectableBoolPtr(byte* label, byte* p_selected, ImGuiSelectableFlags flags, Vector2 size); + [DllImport("cimgui")] + public static extern byte igListBoxStr_arr(byte* label, int* current_item, byte** items, int items_count, int height_in_items); + [DllImport("cimgui", EntryPoint = "igGetCursorPos_nonUDT2")] + public static extern Vector2 igGetCursorPos(); + [DllImport("cimgui", EntryPoint = "ImDrawList_GetClipRectMin_nonUDT2")] + public static extern Vector2 ImDrawList_GetClipRectMin(ImDrawList* self); + [DllImport("cimgui")] + public static extern void ImDrawList_PopTextureID(ImDrawList* self); + [DllImport("cimgui")] + public static extern byte igInputFloat4(byte* label, Vector4* v, byte* format, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void igSetCursorPosY(float y); + [DllImport("cimgui")] + public static extern byte* igGetVersion(); + [DllImport("cimgui")] + public static extern void igEndCombo(); + [DllImport("cimgui")] + public static extern void igPushIDStr(byte* str_id); + [DllImport("cimgui")] + public static extern void igPushIDRange(byte* str_id_begin, byte* str_id_end); + [DllImport("cimgui")] + public static extern void igPushIDPtr(void* ptr_id); + [DllImport("cimgui")] + public static extern void igPushIDInt(int int_id); + [DllImport("cimgui")] + public static extern void ImDrawList_ImDrawList(ImDrawList* self, IntPtr shared_data); + [DllImport("cimgui")] + public static extern void ImDrawCmd_ImDrawCmd(ImDrawCmd* self); + [DllImport("cimgui")] + public static extern void ImGuiListClipper_End(ImGuiListClipper* self); + [DllImport("cimgui")] + public static extern void igAlignTextToFramePadding(); + [DllImport("cimgui")] + public static extern void igPopStyleColor(int count); + [DllImport("cimgui")] + public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height); + [DllImport("cimgui")] + public static extern void igText(byte* fmt); + [DllImport("cimgui")] + public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self); + [DllImport("cimgui")] + public static extern float igGetTextLineHeightWithSpacing(); + [DllImport("cimgui")] + public static extern float* ImGuiStorage_GetFloatRef(ImGuiStorage* self, uint key, float default_val); + [DllImport("cimgui")] + public static extern void igEndTooltip(); + [DllImport("cimgui")] + public static extern void ImGuiListClipper_ImGuiListClipper(ImGuiListClipper* self, int items_count, float items_height); + [DllImport("cimgui")] + public static extern byte igDragInt(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern uint igColorConvertFloat4ToU32(Vector4 @in); + [DllImport("cimgui")] + public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); + [DllImport("cimgui")] + public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); + [DllImport("cimgui")] + public static extern void igSetColumnWidth(int column_index, float width); + [DllImport("cimgui")] + public static extern byte ImGuiPayload_IsDataType(ImGuiPayload* self, byte* type); + [DllImport("cimgui")] + public static extern byte igBeginMainMenuBar(); + [DllImport("cimgui")] + public static extern void CustomRect_CustomRect(CustomRect* self); + [DllImport("cimgui")] + public static extern byte ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self); + [DllImport("cimgui")] + public static extern void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self, int pos, byte* text, byte* text_end); + [DllImport("cimgui")] + public static extern byte ImFontAtlas_GetMouseCursorTexData(ImFontAtlas* self, ImGuiMouseCursor cursor, Vector2* out_offset, Vector2* out_size, Vector2* out_uv_border, Vector2* out_uv_fill); + [DllImport("cimgui")] + public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern void ImGuiStorage_SetAllInt(ImGuiStorage* self, int val); + [DllImport("cimgui")] + public static extern void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self, uint key, void* default_val); + [DllImport("cimgui")] + public static extern void igStyleColorsLight(ImGuiStyle* dst); + [DllImport("cimgui")] + public static extern byte igSliderFloat3(byte* label, Vector3* v, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern byte* ImGuiStorage_GetBoolRef(ImGuiStorage* self, uint key, byte default_val); + [DllImport("cimgui")] + public static extern float igGetWindowHeight(); + [DllImport("cimgui", EntryPoint = "igGetMousePosOnOpeningCurrentPopup_nonUDT2")] + public static extern Vector2 igGetMousePosOnOpeningCurrentPopup(); + [DllImport("cimgui")] + public static extern int* ImGuiStorage_GetIntRef(ImGuiStorage* self, uint key, int default_val); + [DllImport("cimgui")] + public static extern void igCalcListClipping(int items_count, float items_height, int* out_items_display_start, int* out_items_display_end); + [DllImport("cimgui")] + public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val); + [DllImport("cimgui")] + public static extern void igEndDragDropSource(); + [DllImport("cimgui")] + public static extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self); + [DllImport("cimgui")] + public static extern float ImGuiStorage_GetFloat(ImGuiStorage* self, uint key, float default_val); + [DllImport("cimgui")] + public static extern void ImGuiStorage_SetBool(ImGuiStorage* self, uint key, byte val); + [DllImport("cimgui")] + public static extern byte ImGuiStorage_GetBool(ImGuiStorage* self, uint key, byte default_val); + [DllImport("cimgui")] + public static extern float igGetFrameHeightWithSpacing(); + [DllImport("cimgui")] + public static extern void ImGuiStorage_SetInt(ImGuiStorage* self, uint key, int val); + [DllImport("cimgui")] + public static extern void igCloseCurrentPopup(); + [DllImport("cimgui")] + public static extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self); + [DllImport("cimgui")] + public static extern void igBeginGroup(); + [DllImport("cimgui")] + public static extern void ImGuiStorage_Clear(ImGuiStorage* self); + [DllImport("cimgui")] + public static extern void Pair_PairInt(Pair* self, uint _key, int _val_i); + [DllImport("cimgui")] + public static extern void Pair_PairFloat(Pair* self, uint _key, float _val_f); + [DllImport("cimgui")] + public static extern void Pair_PairPtr(Pair* self, uint _key, void* _val_p); + [DllImport("cimgui")] + public static extern void ImGuiTextBuffer_appendf(ImGuiTextBuffer* self, byte* fmt); + [DllImport("cimgui")] + public static extern byte* ImGuiTextBuffer_c_str(ImGuiTextBuffer* self); + [DllImport("cimgui")] + public static extern void ImGuiTextBuffer_reserve(ImGuiTextBuffer* self, int capacity); + [DllImport("cimgui")] + public static extern byte ImGuiTextBuffer_empty(ImGuiTextBuffer* self); + [DllImport("cimgui")] + public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* v, void* v_min, void* v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern byte igBeginCombo(byte* label, byte* preview_value, ImGuiComboFlags flags); + [DllImport("cimgui")] + public static extern int ImGuiTextBuffer_size(ImGuiTextBuffer* self); + [DllImport("cimgui")] + public static extern byte igBeginMenu(byte* label, byte enabled); + [DllImport("cimgui")] + public static extern byte igIsItemHovered(ImGuiHoveredFlags flags); + [DllImport("cimgui")] + public static extern void ImDrawList_PrimWriteVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); + [DllImport("cimgui")] + public static extern void igBullet(); + [DllImport("cimgui")] + public static extern byte igInputText(byte* label, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); + [DllImport("cimgui")] + public static extern byte igInputInt3(byte* label, int* v, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void ImGuiIO_ImGuiIO(ImGuiIO* self); + [DllImport("cimgui")] + public static extern void igStyleColorsDark(ImGuiStyle* dst); + [DllImport("cimgui")] + public static extern byte igInputInt(byte* label, int* v, int step, int step_fast, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void igSetWindowFontScale(float scale); + [DllImport("cimgui")] + public static extern byte igSliderInt(byte* label, int* v, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern byte* TextRange_end(TextRange* self); + [DllImport("cimgui")] + public static extern byte* TextRange_begin(TextRange* self); + [DllImport("cimgui")] + public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot); + [DllImport("cimgui")] + public static extern byte igDragInt3(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern void igOpenPopup(byte* str_id); + [DllImport("cimgui")] + public static extern void TextRange_TextRange(TextRange* self); + [DllImport("cimgui")] + public static extern void TextRange_TextRangeStr(TextRange* self, byte* _b, byte* _e); + [DllImport("cimgui", EntryPoint = "ImDrawList_GetClipRectMax_nonUDT2")] + public static extern Vector2 ImDrawList_GetClipRectMax(ImDrawList* self); + [DllImport("cimgui", EntryPoint = "igCalcTextSize_nonUDT2")] + public static extern Vector2 igCalcTextSize(byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width); + [DllImport("cimgui")] + public static extern IntPtr igGetDrawListSharedData(); + [DllImport("cimgui")] + public static extern void igColumns(int count, byte* id, byte border); + [DllImport("cimgui")] + public static extern byte igIsItemActive(); + [DllImport("cimgui")] + public static extern void ImGuiTextFilter_ImGuiTextFilter(ImGuiTextFilter* self, byte* default_filter); + [DllImport("cimgui")] + public static extern void ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(ImGuiOnceUponAFrame* self); + [DllImport("cimgui")] + public static extern byte igBeginDragDropTarget(); + [DllImport("cimgui")] + public static extern byte TextRange_empty(TextRange* self); + [DllImport("cimgui")] + public static extern byte ImGuiPayload_IsDelivery(ImGuiPayload* self); + [DllImport("cimgui")] + public static extern void ImGuiIO_AddInputCharacter(ImGuiIO* self, ushort c); + [DllImport("cimgui")] + public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners); + [DllImport("cimgui")] + public static extern void ImGuiStyle_ImGuiStyle(ImGuiStyle* self); + [DllImport("cimgui")] + public static extern byte igColorPicker3(byte* label, Vector3* col, ImGuiColorEditFlags flags); + [DllImport("cimgui", EntryPoint = "igGetContentRegionMax_nonUDT2")] + public static extern Vector2 igGetContentRegionMax(); + [DllImport("cimgui")] + public static extern byte igBeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags); + [DllImport("cimgui")] + public static extern void igSaveIniSettingsToDisk(byte* ini_filename); + [DllImport("cimgui")] + public static extern void ImFont_ClearOutputData(ImFont* self); + [DllImport("cimgui")] + public static extern byte* igGetClipboardText(); + [DllImport("cimgui")] + public static extern void ImDrawList_PrimQuadUV(ImDrawList* self, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); + [DllImport("cimgui")] + public static extern void igEndDragDropTarget(); + [DllImport("cimgui")] + public static extern ushort* ImFontAtlas_GetGlyphRangesKorean(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate); + [DllImport("cimgui")] + public static extern void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + [DllImport("cimgui")] + public static extern void igNewFrame(); + [DllImport("cimgui")] + public static extern void igResetMouseDragDelta(int button); + [DllImport("cimgui")] + public static extern float igGetTreeNodeToLabelSpacing(); + [DllImport("cimgui", EntryPoint = "igGetMousePos_nonUDT2")] + public static extern Vector2 igGetMousePos(); + [DllImport("cimgui")] + public static extern void GlyphRangesBuilder_AddChar(GlyphRangesBuilder* self, ushort c); + [DllImport("cimgui")] + public static extern void igPopID(); + [DllImport("cimgui")] + public static extern byte igIsMouseDoubleClicked(int button); + [DllImport("cimgui")] + public static extern void igStyleColorsClassic(ImGuiStyle* dst); + [DllImport("cimgui")] + public static extern byte ImGuiTextFilter_IsActive(ImGuiTextFilter* self); + [DllImport("cimgui")] + public static extern void ImDrawList_PathClear(ImDrawList* self); + [DllImport("cimgui")] + public static extern void igSetWindowFocus(); + [DllImport("cimgui")] + public static extern void igSetWindowFocusStr(byte* name); + [DllImport("cimgui")] + public static extern void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b); + [DllImport("cimgui")] + public static extern void ImColor_ImColor(ImColor* self); + [DllImport("cimgui")] + public static extern void ImColor_ImColorInt(ImColor* self, int r, int g, int b, int a); + [DllImport("cimgui")] + public static extern void ImColor_ImColorU32(ImColor* self, uint rgba); + [DllImport("cimgui")] + public static extern void ImColor_ImColorFloat(ImColor* self, float r, float g, float b, float a); + [DllImport("cimgui")] + public static extern void ImColor_ImColorVec4(ImColor* self, Vector4 col); + [DllImport("cimgui")] + public static extern byte igVSliderFloat(byte* label, Vector2 size, float* v, float v_min, float v_max, byte* format, float power); + [DllImport("cimgui", EntryPoint = "igColorConvertU32ToFloat4_nonUDT2")] + public static extern Vector4 igColorConvertU32ToFloat4(uint @in); + [DllImport("cimgui")] + public static extern void igPopTextWrapPos(); + [DllImport("cimgui")] + public static extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self); + [DllImport("cimgui")] + public static extern ImGuiStorage* igGetStateStorage(); + [DllImport("cimgui")] + public static extern float igGetColumnWidth(int column_index); + [DllImport("cimgui")] + public static extern void igEndMenuBar(); + [DllImport("cimgui")] + public static extern void igSetStateStorage(ImGuiStorage* storage); + [DllImport("cimgui")] + public static extern byte* igGetStyleColorName(ImGuiCol idx); + [DllImport("cimgui")] + public static extern byte igIsMouseDragging(int button, float lock_threshold); + [DllImport("cimgui")] + public static extern void ImDrawList_PrimWriteIdx(ImDrawList* self, ushort idx); + [DllImport("cimgui")] + public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor); + [DllImport("cimgui")] + public static extern void igPushStyleColorU32(ImGuiCol idx, uint col); + [DllImport("cimgui")] + public static extern void igPushStyleColor(ImGuiCol idx, Vector4 col); + [DllImport("cimgui")] + public static extern void* igMemAlloc(uint size); + [DllImport("cimgui")] + public static extern void igSetCurrentContext(IntPtr ctx); + [DllImport("cimgui")] + public static extern void igPushItemWidth(float item_width); + [DllImport("cimgui")] + public static extern byte igIsWindowAppearing(); + [DllImport("cimgui")] + public static extern ImGuiStyle* igGetStyle(); + [DllImport("cimgui")] + public static extern void igSetItemAllowOverlap(); + [DllImport("cimgui")] + public static extern void igEndChild(); + [DllImport("cimgui")] + public static extern byte igCollapsingHeader(byte* label, ImGuiTreeNodeFlags flags); + [DllImport("cimgui")] + public static extern byte igCollapsingHeaderBoolPtr(byte* label, byte* p_open, ImGuiTreeNodeFlags flags); + [DllImport("cimgui")] + public static extern byte igDragFloatRange2(byte* label, float* v_current_min, float* v_current_max, float v_speed, float v_min, float v_max, byte* format, byte* format_max, float power); + [DllImport("cimgui")] + public static extern void igSetMouseCursor(ImGuiMouseCursor type); + [DllImport("cimgui", EntryPoint = "igGetWindowContentRegionMax_nonUDT2")] + public static extern Vector2 igGetWindowContentRegionMax(); + [DllImport("cimgui")] + public static extern byte igInputScalar(byte* label, ImGuiDataType data_type, void* v, void* step, void* step_fast, byte* format, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void ImDrawList_PushClipRectFullScreen(ImDrawList* self); + [DllImport("cimgui")] + public static extern uint igGetColorU32(ImGuiCol idx, float alpha_mul); + [DllImport("cimgui")] + public static extern uint igGetColorU32Vec4(Vector4 col); + [DllImport("cimgui")] + public static extern uint igGetColorU32U32(uint col); + [DllImport("cimgui")] + public static extern double igGetTime(); + [DllImport("cimgui")] + public static extern void ImDrawList_ChannelsMerge(ImDrawList* self); + [DllImport("cimgui")] + public static extern int igGetColumnIndex(); + [DllImport("cimgui")] + public static extern byte igBeginPopupContextItem(byte* str_id, int mouse_button); + [DllImport("cimgui")] + public static extern void igSetCursorPosX(float x); + [DllImport("cimgui", EntryPoint = "igGetItemRectSize_nonUDT2")] + public static extern Vector2 igGetItemRectSize(); + [DllImport("cimgui")] + public static extern byte igArrowButton(byte* str_id, ImGuiDir dir); + [DllImport("cimgui")] + public static extern ImGuiMouseCursor igGetMouseCursor(); + [DllImport("cimgui")] + public static extern void igPushAllowKeyboardFocus(byte allow_keyboard_focus); + [DllImport("cimgui")] + public static extern float igGetScrollY(); + [DllImport("cimgui")] + public static extern void igSetColumnOffset(int column_index, float offset_x); + [DllImport("cimgui")] + public static extern byte* ImGuiTextBuffer_begin(ImGuiTextBuffer* self); + [DllImport("cimgui")] + public static extern void igSetWindowPosVec2(Vector2 pos, ImGuiCond cond); + [DllImport("cimgui")] + public static extern void igSetWindowPosStr(byte* name, Vector2 pos, ImGuiCond cond); + [DllImport("cimgui")] + public static extern void igSetKeyboardFocusHere(int offset); + [DllImport("cimgui")] + public static extern float igGetCursorPosY(); + [DllImport("cimgui")] + public static extern int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self, ImFont* font, ushort id, int width, int height, float advance_x, Vector2 offset); + [DllImport("cimgui")] + public static extern void igEndMainMenuBar(); + [DllImport("cimgui")] + public static extern float igGetContentRegionAvailWidth(); + [DllImport("cimgui")] + public static extern byte igIsKeyDown(int user_key_index); + [DllImport("cimgui")] + public static extern byte igIsMouseDown(int button); + [DllImport("cimgui", EntryPoint = "igGetWindowContentRegionMin_nonUDT2")] + public static extern Vector2 igGetWindowContentRegionMin(); + [DllImport("cimgui")] + public static extern void igLogButtons(); + [DllImport("cimgui")] + public static extern float igGetWindowContentRegionWidth(); + [DllImport("cimgui")] + public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max); + [DllImport("cimgui")] + public static extern byte igTreeNodeExStr(byte* label, ImGuiTreeNodeFlags flags); + [DllImport("cimgui")] + public static extern byte igTreeNodeExStrStr(byte* str_id, ImGuiTreeNodeFlags flags, byte* fmt); + [DllImport("cimgui")] + public static extern byte igTreeNodeExPtr(void* ptr_id, ImGuiTreeNodeFlags flags, byte* fmt); + [DllImport("cimgui")] + public static extern float igGetWindowWidth(); + [DllImport("cimgui")] + public static extern void igPushTextWrapPos(float wrap_pos_x); + [DllImport("cimgui")] + public static extern int ImGuiStorage_GetInt(ImGuiStorage* self, uint key, int default_val); + [DllImport("cimgui")] + public static extern byte igSliderInt3(byte* label, int* v, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern void igShowUserGuide(); + [DllImport("cimgui")] + public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* v, int components, void* v_min, void* v_max, byte* format, float power); + [DllImport("cimgui", EntryPoint = "ImColor_HSV_nonUDT2")] + public static extern ImColor ImColor_HSV(ImColor* self, float h, float s, float v, float a); + [DllImport("cimgui")] + public static extern void ImDrawList_PathLineTo(ImDrawList* self, Vector2 pos); + [DllImport("cimgui")] + public static extern void igImage(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col); + [DllImport("cimgui")] + public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data); + [DllImport("cimgui")] + public static extern void igDummy(Vector2 size); + [DllImport("cimgui")] + public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format); + [DllImport("cimgui")] + public static extern void ImGuiTextBuffer_ImGuiTextBuffer(ImGuiTextBuffer* self); + [DllImport("cimgui")] + public static extern void igBulletText(byte* fmt); + [DllImport("cimgui")] + public static extern byte igColorEdit4(byte* label, Vector4* col, ImGuiColorEditFlags flags); + [DllImport("cimgui")] + public static extern byte igColorPicker4(byte* label, Vector4* col, ImGuiColorEditFlags flags, float* ref_col); + [DllImport("cimgui")] + public static extern void ImDrawList_PrimRectUV(ImDrawList* self, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); + [DllImport("cimgui")] + public static extern byte igInvisibleButton(byte* str_id, Vector2 size); + [DllImport("cimgui")] + public static extern void igLogToClipboard(int max_depth); + [DllImport("cimgui")] + public static extern byte igBeginPopupContextWindow(byte* str_id, int mouse_button, byte also_over_items); + [DllImport("cimgui")] + public static extern void ImFontAtlas_ImFontAtlas(ImFontAtlas* self); + [DllImport("cimgui")] + public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* v, float v_speed, void* v_min, void* v_max, byte* format, float power); + [DllImport("cimgui")] + public static extern void igSetItemDefaultFocus(); + [DllImport("cimgui")] + public static extern void igCaptureMouseFromApp(byte capture); + [DllImport("cimgui")] + public static extern byte igIsAnyItemHovered(); + [DllImport("cimgui")] + public static extern void igPushFont(ImFont* font); + [DllImport("cimgui")] + public static extern byte igInputInt2(byte* label, int* v, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern void igTreePop(); + [DllImport("cimgui")] + public static extern void igEnd(); + [DllImport("cimgui")] + public static extern void ImDrawData_ImDrawData(ImDrawData* self); + [DllImport("cimgui")] + public static extern void igDestroyContext(IntPtr ctx); + [DllImport("cimgui")] + public static extern byte* ImGuiTextBuffer_end(ImGuiTextBuffer* self); + [DllImport("cimgui")] + public static extern void igPopStyleVar(int count); + [DllImport("cimgui")] + public static extern byte ImGuiTextFilter_PassFilter(ImGuiTextFilter* self, byte* text, byte* text_end); + [DllImport("cimgui")] + public static extern byte igShowStyleSelector(byte* label); + [DllImport("cimgui")] + public static extern byte igInputScalarN(byte* label, ImGuiDataType data_type, void* v, int components, void* step, void* step_fast, byte* format, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern byte igTreeNodeStr(byte* label); + [DllImport("cimgui")] + public static extern byte igTreeNodeStrStr(byte* str_id, byte* fmt); + [DllImport("cimgui")] + public static extern byte igTreeNodePtr(void* ptr_id, byte* fmt); + [DllImport("cimgui")] + public static extern float igGetScrollMaxX(); + [DllImport("cimgui")] + public static extern void igSetTooltip(byte* fmt); + [DllImport("cimgui", EntryPoint = "igGetContentRegionAvail_nonUDT2")] + public static extern Vector2 igGetContentRegionAvail(); + [DllImport("cimgui")] + public static extern byte igInputFloat3(byte* label, Vector3* v, byte* format, ImGuiInputTextFlags extra_flags); + [DllImport("cimgui")] + public static extern byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, float power); + } +} diff --git a/src/ImGui.NET/Generated/ImGuiNavInput.gen.cs b/src/ImGui.NET/Generated/ImGuiNavInput.gen.cs new file mode 100644 index 0000000..0400d81 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiNavInput.gen.cs @@ -0,0 +1,29 @@ +namespace ImGuiNET +{ + public enum ImGuiNavInput + { + Activate = 0, + Cancel = 1, + Input = 2, + Menu = 3, + DpadLeft = 4, + DpadRight = 5, + DpadUp = 6, + DpadDown = 7, + LStickLeft = 8, + LStickRight = 9, + LStickUp = 10, + LStickDown = 11, + FocusPrev = 12, + FocusNext = 13, + TweakSlow = 14, + TweakFast = 15, + KeyMenu = 16, + KeyLeft = 17, + KeyRight = 18, + KeyUp = 19, + KeyDown = 20, + COUNT = 21, + InternalStart = KeyMenu, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs b/src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs new file mode 100644 index 0000000..e3c648c --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs @@ -0,0 +1,22 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiOnceUponAFrame + { + public int RefFrame; + } + public unsafe partial struct ImGuiOnceUponAFramePtr + { + public ImGuiOnceUponAFrame* NativePtr { get; } + public ImGuiOnceUponAFramePtr(ImGuiOnceUponAFrame* nativePtr) => NativePtr = nativePtr; + public ImGuiOnceUponAFramePtr(IntPtr nativePtr) => NativePtr = (ImGuiOnceUponAFrame*)nativePtr; + public static implicit operator ImGuiOnceUponAFramePtr(ImGuiOnceUponAFrame* nativePtr) => new ImGuiOnceUponAFramePtr(nativePtr); + public static implicit operator ImGuiOnceUponAFrame* (ImGuiOnceUponAFramePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiOnceUponAFramePtr(IntPtr nativePtr) => new ImGuiOnceUponAFramePtr(nativePtr); + public ref int RefFrame => ref Unsafe.AsRef(&NativePtr->RefFrame); + } +} diff --git a/src/ImGui.NET/Generated/ImGuiPayload.gen.cs b/src/ImGui.NET/Generated/ImGuiPayload.gen.cs new file mode 100644 index 0000000..7d05526 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiPayload.gen.cs @@ -0,0 +1,62 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiPayload + { + public void* Data; + public int DataSize; + public uint SourceId; + public uint SourceParentId; + public int DataFrameCount; + public fixed byte DataType[33]; + public byte Preview; + public byte Delivery; + } + public unsafe partial struct ImGuiPayloadPtr + { + public ImGuiPayload* NativePtr { get; } + public ImGuiPayloadPtr(ImGuiPayload* nativePtr) => NativePtr = nativePtr; + public ImGuiPayloadPtr(IntPtr nativePtr) => NativePtr = (ImGuiPayload*)nativePtr; + public static implicit operator ImGuiPayloadPtr(ImGuiPayload* nativePtr) => new ImGuiPayloadPtr(nativePtr); + public static implicit operator ImGuiPayload* (ImGuiPayloadPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiPayloadPtr(IntPtr nativePtr) => new ImGuiPayloadPtr(nativePtr); + public IntPtr Data { get => (IntPtr)NativePtr->Data; set => NativePtr->Data = (void*)value; } + public ref int DataSize => ref Unsafe.AsRef(&NativePtr->DataSize); + public ref uint SourceId => ref Unsafe.AsRef(&NativePtr->SourceId); + public ref uint SourceParentId => ref Unsafe.AsRef(&NativePtr->SourceParentId); + public ref int DataFrameCount => ref Unsafe.AsRef(&NativePtr->DataFrameCount); + public RangeAccessor DataType => new RangeAccessor(NativePtr->DataType, 33); + public ref Bool8 Preview => ref Unsafe.AsRef(&NativePtr->Preview); + public ref Bool8 Delivery => ref Unsafe.AsRef(&NativePtr->Delivery); + public void Clear() + { + ImGuiNative.ImGuiPayload_Clear(NativePtr); + } + public bool IsPreview() + { + byte ret = ImGuiNative.ImGuiPayload_IsPreview(NativePtr); + return ret != 0; + } + public bool IsDataType(string type) + { + int type_byteCount = Encoding.UTF8.GetByteCount(type); + byte* native_type = stackalloc byte[type_byteCount + 1]; + fixed (char* type_ptr = type) + { + int native_type_offset = Encoding.UTF8.GetBytes(type_ptr, type.Length, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + byte ret = ImGuiNative.ImGuiPayload_IsDataType(NativePtr, native_type); + return ret != 0; + } + public bool IsDelivery() + { + byte ret = ImGuiNative.ImGuiPayload_IsDelivery(NativePtr); + return ret != 0; + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiSelectableFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiSelectableFlags.gen.cs new file mode 100644 index 0000000..dff7472 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiSelectableFlags.gen.cs @@ -0,0 +1,12 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiSelectableFlags + { + None = 0, + DontClosePopups = 1 << 0, + SpanAllColumns = 1 << 1, + AllowDoubleClick = 1 << 2, + Disabled = 1 << 3, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiSizeCallbackData.gen.cs b/src/ImGui.NET/Generated/ImGuiSizeCallbackData.gen.cs new file mode 100644 index 0000000..83c3196 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiSizeCallbackData.gen.cs @@ -0,0 +1,28 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiSizeCallbackData + { + public void* UserData; + public Vector2 Pos; + public Vector2 CurrentSize; + public Vector2 DesiredSize; + } + public unsafe partial struct ImGuiSizeCallbackDataPtr + { + public ImGuiSizeCallbackData* NativePtr { get; } + public ImGuiSizeCallbackDataPtr(ImGuiSizeCallbackData* nativePtr) => NativePtr = nativePtr; + public ImGuiSizeCallbackDataPtr(IntPtr nativePtr) => NativePtr = (ImGuiSizeCallbackData*)nativePtr; + public static implicit operator ImGuiSizeCallbackDataPtr(ImGuiSizeCallbackData* nativePtr) => new ImGuiSizeCallbackDataPtr(nativePtr); + public static implicit operator ImGuiSizeCallbackData* (ImGuiSizeCallbackDataPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiSizeCallbackDataPtr(IntPtr nativePtr) => new ImGuiSizeCallbackDataPtr(nativePtr); + public IntPtr UserData { get => (IntPtr)NativePtr->UserData; set => NativePtr->UserData = (void*)value; } + public ref Vector2 Pos => ref Unsafe.AsRef(&NativePtr->Pos); + public ref Vector2 CurrentSize => ref Unsafe.AsRef(&NativePtr->CurrentSize); + public ref Vector2 DesiredSize => ref Unsafe.AsRef(&NativePtr->DesiredSize); + } +} diff --git a/src/ImGui.NET/Generated/ImGuiStorage.gen.cs b/src/ImGui.NET/Generated/ImGuiStorage.gen.cs new file mode 100644 index 0000000..aa1b57d --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiStorage.gen.cs @@ -0,0 +1,137 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiStorage + { + public ImVector/**/ Data; + } + public unsafe partial struct ImGuiStoragePtr + { + public ImGuiStorage* NativePtr { get; } + public ImGuiStoragePtr(ImGuiStorage* nativePtr) => NativePtr = nativePtr; + public ImGuiStoragePtr(IntPtr nativePtr) => NativePtr = (ImGuiStorage*)nativePtr; + public static implicit operator ImGuiStoragePtr(ImGuiStorage* nativePtr) => new ImGuiStoragePtr(nativePtr); + public static implicit operator ImGuiStorage* (ImGuiStoragePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiStoragePtr(IntPtr nativePtr) => new ImGuiStoragePtr(nativePtr); + public ImVector Data => new ImVector(NativePtr->Data); + public void SetFloat(uint key, float val) + { + ImGuiNative.ImGuiStorage_SetFloat(NativePtr, key, val); + } + public IntPtr GetVoidPtr(uint key) + { + void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr(NativePtr, key); + return (IntPtr)ret; + } + public float* GetFloatRef(uint key) + { + float default_val = 0.0f; + float* ret = ImGuiNative.ImGuiStorage_GetFloatRef(NativePtr, key, default_val); + return ret; + } + public float* GetFloatRef(uint key, float default_val) + { + float* ret = ImGuiNative.ImGuiStorage_GetFloatRef(NativePtr, key, default_val); + return ret; + } + public void SetAllInt(int val) + { + ImGuiNative.ImGuiStorage_SetAllInt(NativePtr, val); + } + public void** GetVoidPtrRef(uint key) + { + void* default_val = null; + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, default_val); + return ret; + } + public void** GetVoidPtrRef(uint key, IntPtr default_val) + { + void* native_default_val = default_val.ToPointer(); + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef(NativePtr, key, native_default_val); + return ret; + } + public byte* GetBoolRef(uint key) + { + byte default_val = 0; + byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, default_val); + return ret; + } + public byte* GetBoolRef(uint key, bool default_val) + { + byte native_default_val = default_val ? (byte)1 : (byte)0; + byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef(NativePtr, key, native_default_val); + return ret; + } + public int* GetIntRef(uint key) + { + int default_val = 0; + int* ret = ImGuiNative.ImGuiStorage_GetIntRef(NativePtr, key, default_val); + return ret; + } + public int* GetIntRef(uint key, int default_val) + { + int* ret = ImGuiNative.ImGuiStorage_GetIntRef(NativePtr, key, default_val); + return ret; + } + public void SetVoidPtr(uint key, IntPtr val) + { + void* native_val = val.ToPointer(); + ImGuiNative.ImGuiStorage_SetVoidPtr(NativePtr, key, native_val); + } + public void BuildSortByKey() + { + ImGuiNative.ImGuiStorage_BuildSortByKey(NativePtr); + } + public float GetFloat(uint key) + { + float default_val = 0.0f; + float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); + return ret; + } + public float GetFloat(uint key, float default_val) + { + float ret = ImGuiNative.ImGuiStorage_GetFloat(NativePtr, key, default_val); + return ret; + } + public void SetBool(uint key, bool val) + { + byte native_val = val ? (byte)1 : (byte)0; + ImGuiNative.ImGuiStorage_SetBool(NativePtr, key, native_val); + } + public bool GetBool(uint key) + { + byte default_val = 0; + byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, default_val); + return ret != 0; + } + public bool GetBool(uint key, bool default_val) + { + byte native_default_val = default_val ? (byte)1 : (byte)0; + byte ret = ImGuiNative.ImGuiStorage_GetBool(NativePtr, key, native_default_val); + return ret != 0; + } + public void SetInt(uint key, int val) + { + ImGuiNative.ImGuiStorage_SetInt(NativePtr, key, val); + } + public void Clear() + { + ImGuiNative.ImGuiStorage_Clear(NativePtr); + } + public int GetInt(uint key) + { + int default_val = 0; + int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); + return ret; + } + public int GetInt(uint key, int default_val) + { + int ret = ImGuiNative.ImGuiStorage_GetInt(NativePtr, key, default_val); + return ret; + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiStyle.gen.cs b/src/ImGui.NET/Generated/ImGuiStyle.gen.cs new file mode 100644 index 0000000..b754392 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiStyle.gen.cs @@ -0,0 +1,126 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiStyle + { + public float Alpha; + public Vector2 WindowPadding; + public float WindowRounding; + public float WindowBorderSize; + public Vector2 WindowMinSize; + public Vector2 WindowTitleAlign; + public float ChildRounding; + public float ChildBorderSize; + public float PopupRounding; + public float PopupBorderSize; + public Vector2 FramePadding; + public float FrameRounding; + public float FrameBorderSize; + public Vector2 ItemSpacing; + public Vector2 ItemInnerSpacing; + public Vector2 TouchExtraPadding; + public float IndentSpacing; + public float ColumnsMinSpacing; + public float ScrollbarSize; + public float ScrollbarRounding; + public float GrabMinSize; + public float GrabRounding; + public Vector2 ButtonTextAlign; + public Vector2 DisplayWindowPadding; + public Vector2 DisplaySafeAreaPadding; + public float MouseCursorScale; + public byte AntiAliasedLines; + public byte AntiAliasedFill; + public float CurveTessellationTol; + public Vector4 Colors_0; + public Vector4 Colors_1; + public Vector4 Colors_2; + public Vector4 Colors_3; + public Vector4 Colors_4; + public Vector4 Colors_5; + public Vector4 Colors_6; + public Vector4 Colors_7; + public Vector4 Colors_8; + public Vector4 Colors_9; + public Vector4 Colors_10; + public Vector4 Colors_11; + public Vector4 Colors_12; + public Vector4 Colors_13; + public Vector4 Colors_14; + public Vector4 Colors_15; + public Vector4 Colors_16; + public Vector4 Colors_17; + public Vector4 Colors_18; + public Vector4 Colors_19; + public Vector4 Colors_20; + public Vector4 Colors_21; + public Vector4 Colors_22; + public Vector4 Colors_23; + public Vector4 Colors_24; + public Vector4 Colors_25; + public Vector4 Colors_26; + public Vector4 Colors_27; + public Vector4 Colors_28; + public Vector4 Colors_29; + public Vector4 Colors_30; + public Vector4 Colors_31; + public Vector4 Colors_32; + public Vector4 Colors_33; + public Vector4 Colors_34; + public Vector4 Colors_35; + public Vector4 Colors_36; + public Vector4 Colors_37; + public Vector4 Colors_38; + public Vector4 Colors_39; + public Vector4 Colors_40; + public Vector4 Colors_41; + public Vector4 Colors_42; + } + public unsafe partial struct ImGuiStylePtr + { + public ImGuiStyle* NativePtr { get; } + public ImGuiStylePtr(ImGuiStyle* nativePtr) => NativePtr = nativePtr; + public ImGuiStylePtr(IntPtr nativePtr) => NativePtr = (ImGuiStyle*)nativePtr; + public static implicit operator ImGuiStylePtr(ImGuiStyle* nativePtr) => new ImGuiStylePtr(nativePtr); + public static implicit operator ImGuiStyle* (ImGuiStylePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiStylePtr(IntPtr nativePtr) => new ImGuiStylePtr(nativePtr); + public ref float Alpha => ref Unsafe.AsRef(&NativePtr->Alpha); + public ref Vector2 WindowPadding => ref Unsafe.AsRef(&NativePtr->WindowPadding); + public ref float WindowRounding => ref Unsafe.AsRef(&NativePtr->WindowRounding); + public ref float WindowBorderSize => ref Unsafe.AsRef(&NativePtr->WindowBorderSize); + public ref Vector2 WindowMinSize => ref Unsafe.AsRef(&NativePtr->WindowMinSize); + public ref Vector2 WindowTitleAlign => ref Unsafe.AsRef(&NativePtr->WindowTitleAlign); + public ref float ChildRounding => ref Unsafe.AsRef(&NativePtr->ChildRounding); + public ref float ChildBorderSize => ref Unsafe.AsRef(&NativePtr->ChildBorderSize); + public ref float PopupRounding => ref Unsafe.AsRef(&NativePtr->PopupRounding); + public ref float PopupBorderSize => ref Unsafe.AsRef(&NativePtr->PopupBorderSize); + public ref Vector2 FramePadding => ref Unsafe.AsRef(&NativePtr->FramePadding); + public ref float FrameRounding => ref Unsafe.AsRef(&NativePtr->FrameRounding); + public ref float FrameBorderSize => ref Unsafe.AsRef(&NativePtr->FrameBorderSize); + public ref Vector2 ItemSpacing => ref Unsafe.AsRef(&NativePtr->ItemSpacing); + public ref Vector2 ItemInnerSpacing => ref Unsafe.AsRef(&NativePtr->ItemInnerSpacing); + public ref Vector2 TouchExtraPadding => ref Unsafe.AsRef(&NativePtr->TouchExtraPadding); + public ref float IndentSpacing => ref Unsafe.AsRef(&NativePtr->IndentSpacing); + public ref float ColumnsMinSpacing => ref Unsafe.AsRef(&NativePtr->ColumnsMinSpacing); + public ref float ScrollbarSize => ref Unsafe.AsRef(&NativePtr->ScrollbarSize); + public ref float ScrollbarRounding => ref Unsafe.AsRef(&NativePtr->ScrollbarRounding); + public ref float GrabMinSize => ref Unsafe.AsRef(&NativePtr->GrabMinSize); + public ref float GrabRounding => ref Unsafe.AsRef(&NativePtr->GrabRounding); + public ref Vector2 ButtonTextAlign => ref Unsafe.AsRef(&NativePtr->ButtonTextAlign); + public ref Vector2 DisplayWindowPadding => ref Unsafe.AsRef(&NativePtr->DisplayWindowPadding); + public ref Vector2 DisplaySafeAreaPadding => ref Unsafe.AsRef(&NativePtr->DisplaySafeAreaPadding); + public ref float MouseCursorScale => ref Unsafe.AsRef(&NativePtr->MouseCursorScale); + public ref Bool8 AntiAliasedLines => ref Unsafe.AsRef(&NativePtr->AntiAliasedLines); + public ref Bool8 AntiAliasedFill => ref Unsafe.AsRef(&NativePtr->AntiAliasedFill); + public ref float CurveTessellationTol => ref Unsafe.AsRef(&NativePtr->CurveTessellationTol); + public RangeAccessor Colors => new RangeAccessor(&NativePtr->Colors_0, 43); + public void ScaleAllSizes(float scale_factor) + { + ImGuiNative.ImGuiStyle_ScaleAllSizes(NativePtr, scale_factor); + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiStyleVar.gen.cs b/src/ImGui.NET/Generated/ImGuiStyleVar.gen.cs new file mode 100644 index 0000000..667ae53 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiStyleVar.gen.cs @@ -0,0 +1,28 @@ +namespace ImGuiNET +{ + public enum ImGuiStyleVar + { + Alpha = 0, + WindowPadding = 1, + WindowRounding = 2, + WindowBorderSize = 3, + WindowMinSize = 4, + WindowTitleAlign = 5, + ChildRounding = 6, + ChildBorderSize = 7, + PopupRounding = 8, + PopupBorderSize = 9, + FramePadding = 10, + FrameRounding = 11, + FrameBorderSize = 12, + ItemSpacing = 13, + ItemInnerSpacing = 14, + IndentSpacing = 15, + ScrollbarSize = 16, + ScrollbarRounding = 17, + GrabMinSize = 18, + GrabRounding = 19, + ButtonTextAlign = 20, + COUNT = 21, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs b/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs new file mode 100644 index 0000000..9106bce --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs @@ -0,0 +1,66 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiTextBuffer + { + public ImVector/**/ Buf; + } + public unsafe partial struct ImGuiTextBufferPtr + { + public ImGuiTextBuffer* NativePtr { get; } + public ImGuiTextBufferPtr(ImGuiTextBuffer* nativePtr) => NativePtr = nativePtr; + public ImGuiTextBufferPtr(IntPtr nativePtr) => NativePtr = (ImGuiTextBuffer*)nativePtr; + public static implicit operator ImGuiTextBufferPtr(ImGuiTextBuffer* nativePtr) => new ImGuiTextBufferPtr(nativePtr); + public static implicit operator ImGuiTextBuffer* (ImGuiTextBufferPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiTextBufferPtr(IntPtr nativePtr) => new ImGuiTextBufferPtr(nativePtr); + public ImVector Buf => new ImVector(NativePtr->Buf); + public void clear() + { + ImGuiNative.ImGuiTextBuffer_clear(NativePtr); + } + public void appendf(string fmt) + { + int fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + byte* native_fmt = stackalloc byte[fmt_byteCount + 1]; + fixed (char* fmt_ptr = fmt) + { + int native_fmt_offset = Encoding.UTF8.GetBytes(fmt_ptr, fmt.Length, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + ImGuiNative.ImGuiTextBuffer_appendf(NativePtr, native_fmt); + } + public string c_str() + { + byte* ret = ImGuiNative.ImGuiTextBuffer_c_str(NativePtr); + return Util.StringFromPtr(ret); + } + public void reserve(int capacity) + { + ImGuiNative.ImGuiTextBuffer_reserve(NativePtr, capacity); + } + public bool empty() + { + byte ret = ImGuiNative.ImGuiTextBuffer_empty(NativePtr); + return ret != 0; + } + public int size() + { + int ret = ImGuiNative.ImGuiTextBuffer_size(NativePtr); + return ret; + } + public string begin() + { + byte* ret = ImGuiNative.ImGuiTextBuffer_begin(NativePtr); + return Util.StringFromPtr(ret); + } + public string end() + { + byte* ret = ImGuiNative.ImGuiTextBuffer_end(NativePtr); + return Util.StringFromPtr(ret); + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs b/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs new file mode 100644 index 0000000..21ad0ef --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiTextFilter.gen.cs @@ -0,0 +1,90 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiTextFilter + { + public fixed byte InputBuf[256]; + public ImVector/**/ Filters; + public int CountGrep; + } + public unsafe partial struct ImGuiTextFilterPtr + { + public ImGuiTextFilter* NativePtr { get; } + public ImGuiTextFilterPtr(ImGuiTextFilter* nativePtr) => NativePtr = nativePtr; + public ImGuiTextFilterPtr(IntPtr nativePtr) => NativePtr = (ImGuiTextFilter*)nativePtr; + public static implicit operator ImGuiTextFilterPtr(ImGuiTextFilter* nativePtr) => new ImGuiTextFilterPtr(nativePtr); + public static implicit operator ImGuiTextFilter* (ImGuiTextFilterPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiTextFilterPtr(IntPtr nativePtr) => new ImGuiTextFilterPtr(nativePtr); + public RangeAccessor InputBuf => new RangeAccessor(NativePtr->InputBuf, 256); + public ImVector Filters => new ImVector(NativePtr->Filters); + public ref int CountGrep => ref Unsafe.AsRef(&NativePtr->CountGrep); + public void Build() + { + ImGuiNative.ImGuiTextFilter_Build(NativePtr); + } + public bool Draw() + { + int label_byteCount = Encoding.UTF8.GetByteCount("Filter(inc,-exc)"); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = "Filter(inc,-exc)") + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, "Filter(inc,-exc)".Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float width = 0.0f; + byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width); + return ret != 0; + } + public bool Draw(string label) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + float width = 0.0f; + byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width); + return ret != 0; + } + public bool Draw(string label, float width) + { + int label_byteCount = Encoding.UTF8.GetByteCount(label); + byte* native_label = stackalloc byte[label_byteCount + 1]; + fixed (char* label_ptr = label) + { + int native_label_offset = Encoding.UTF8.GetBytes(label_ptr, label.Length, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + byte ret = ImGuiNative.ImGuiTextFilter_Draw(NativePtr, native_label, width); + return ret != 0; + } + public bool IsActive() + { + byte ret = ImGuiNative.ImGuiTextFilter_IsActive(NativePtr); + return ret != 0; + } + public void Clear() + { + ImGuiNative.ImGuiTextFilter_Clear(NativePtr); + } + public bool PassFilter(string text) + { + int text_byteCount = Encoding.UTF8.GetByteCount(text); + byte* native_text = stackalloc byte[text_byteCount + 1]; + fixed (char* text_ptr = text) + { + int native_text_offset = Encoding.UTF8.GetBytes(text_ptr, text.Length, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + byte* native_text_end = null; + byte ret = ImGuiNative.ImGuiTextFilter_PassFilter(NativePtr, native_text, native_text_end); + return ret != 0; + } + } +} diff --git a/src/ImGui.NET/Generated/ImGuiTreeNodeFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiTreeNodeFlags.gen.cs new file mode 100644 index 0000000..cd9d492 --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiTreeNodeFlags.gen.cs @@ -0,0 +1,21 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTreeNodeFlags + { + None = 0, + Selected = 1 << 0, + Framed = 1 << 1, + AllowItemOverlap = 1 << 2, + NoTreePushOnOpen = 1 << 3, + NoAutoOpenOnLog = 1 << 4, + DefaultOpen = 1 << 5, + OpenOnDoubleClick = 1 << 6, + OpenOnArrow = 1 << 7, + Leaf = 1 << 8, + Bullet = 1 << 9, + FramePadding = 1 << 10, + NavLeftJumpsBackHere = 1 << 13, + CollapsingHeader = Framed | NoTreePushOnOpen | NoAutoOpenOnLog, + } +} diff --git a/src/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs b/src/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs new file mode 100644 index 0000000..52c695f --- /dev/null +++ b/src/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs @@ -0,0 +1,33 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiWindowFlags + { + None = 0, + NoTitleBar = 1 << 0, + NoResize = 1 << 1, + NoMove = 1 << 2, + NoScrollbar = 1 << 3, + NoScrollWithMouse = 1 << 4, + NoCollapse = 1 << 5, + AlwaysAutoResize = 1 << 6, + NoSavedSettings = 1 << 8, + NoInputs = 1 << 9, + MenuBar = 1 << 10, + HorizontalScrollbar = 1 << 11, + NoFocusOnAppearing = 1 << 12, + NoBringToFrontOnFocus = 1 << 13, + AlwaysVerticalScrollbar = 1 << 14, + AlwaysHorizontalScrollbar = 1<< 15, + AlwaysUseWindowPadding = 1 << 16, + NoNavInputs = 1 << 18, + NoNavFocus = 1 << 19, + NoNav = NoNavInputs | NoNavFocus, + NavFlattened = 1 << 23, + ChildWindow = 1 << 24, + Tooltip = 1 << 25, + Popup = 1 << 26, + Modal = 1 << 27, + ChildMenu = 1 << 28, + } +} diff --git a/src/ImGui.NET/Generated/TextRange.gen.cs b/src/ImGui.NET/Generated/TextRange.gen.cs new file mode 100644 index 0000000..6cdd0c7 --- /dev/null +++ b/src/ImGui.NET/Generated/TextRange.gen.cs @@ -0,0 +1,46 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct TextRange + { + public byte* b; + public byte* e; + } + public unsafe partial struct TextRangePtr + { + public TextRange* NativePtr { get; } + public TextRangePtr(TextRange* nativePtr) => NativePtr = nativePtr; + public TextRangePtr(IntPtr nativePtr) => NativePtr = (TextRange*)nativePtr; + public static implicit operator TextRangePtr(TextRange* nativePtr) => new TextRangePtr(nativePtr); + public static implicit operator TextRange* (TextRangePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator TextRangePtr(IntPtr nativePtr) => new TextRangePtr(nativePtr); + public IntPtr b { get => (IntPtr)NativePtr->b; set => NativePtr->b = (byte*)value; } + public IntPtr e { get => (IntPtr)NativePtr->e; set => NativePtr->e = (byte*)value; } + public void split(byte separator, ref ImVector @out) + { + fixed (ImVector* native_out = &@out) + { + ImGuiNative.TextRange_split(NativePtr, separator, native_out); + } + } + public string end() + { + byte* ret = ImGuiNative.TextRange_end(NativePtr); + return Util.StringFromPtr(ret); + } + public string begin() + { + byte* ret = ImGuiNative.TextRange_begin(NativePtr); + return Util.StringFromPtr(ret); + } + public bool empty() + { + byte ret = ImGuiNative.TextRange_empty(NativePtr); + return ret != 0; + } + } +} diff --git a/src/ImGui.NET/GuiKey.cs b/src/ImGui.NET/GuiKey.cs deleted file mode 100644 index ce2ac43..0000000 --- a/src/ImGui.NET/GuiKey.cs +++ /dev/null @@ -1,80 +0,0 @@ -namespace ImGuiNET -{ - /// - /// User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array - /// - public enum GuiKey : int - { - /// - /// for tabbing through fields - /// - Tab, - /// - /// for text edit - /// - LeftArrow, - /// - /// for text edit - /// - RightArrow, - /// - /// for text edit - /// - UpArrow, - /// - /// for text edit - /// - DownArrow, - PageUp, - PageDown, - /// - /// for text edit - /// - Home, - /// - /// for text edit - /// - End, - /// - /// for text edit - /// - Delete, - /// - /// for text edit - /// - Backspace, - /// - /// for text edit - /// - Enter, - /// - /// for text edit - /// - Escape, - /// - /// for text edit CTRL+A: select all - /// - A, - /// - /// for text edit CTRL+C: copy - /// - C, - /// - /// for text edit CTRL+V: paste - /// - V, - /// - /// for text edit CTRL+X: cut - /// - X, - /// - /// for text edit CTRL+Y: redo - /// - Y, - /// - /// for text edit CTRL+Z: undo - /// - Z, - Count - } -} diff --git a/src/ImGui.NET/HoveredFlags.cs b/src/ImGui.NET/HoveredFlags.cs deleted file mode 100644 index c89da3b..0000000 --- a/src/ImGui.NET/HoveredFlags.cs +++ /dev/null @@ -1,15 +0,0 @@ -namespace ImGuiNET -{ - // Flags for ImGui::IsItemHovered(), ImGui::IsWindowHovered() - public enum HoveredFlags - { - Default = 0, // Return true if directly over the item/window, not obstructed by another window, not obstructed by an active popup or modal blocking inputs under them. - ChildWindows = 1 << 0, // IsWindowHovered() only: Return true if any children of the window is hovered - RootWindow = 1 << 1, // IsWindowHovered() only: Test from root window (top most parent of the current hierarchy) - AllowWhenBlockedByPopup = 1 << 2, // Return true even if a popup window is normally blocking access to this item/window - AllowWhenBlockedByActiveItem = 1 << 4, // Return true even if an active item is blocking access to this item/window. Useful for Drag and Drop patterns. - AllowWhenOverlapped = 1 << 5, // Return true even if the position is overlapped by another window - RectOnly = AllowWhenBlockedByPopup | AllowWhenBlockedByActiveItem | AllowWhenOverlapped, - RootAndChildWindows = RootWindow | ChildWindows - } -} diff --git a/src/ImGui.NET/IO.cs b/src/ImGui.NET/IO.cs deleted file mode 100644 index 774586d..0000000 --- a/src/ImGui.NET/IO.cs +++ /dev/null @@ -1,336 +0,0 @@ -using System; -using System.Numerics; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - public unsafe class IO - { - private NativeIO* _nativePtr; - - internal IO(NativeIO* nativePtr) - { - _nativePtr = nativePtr; - MouseDown = new MouseDownStates(nativePtr); - KeyMap = new KeyMap(_nativePtr); - KeysDown = new KeyDownStates(_nativePtr); - FontAtlas = new FontAtlas(_nativePtr->FontAtlas); - } - - public NativeIO* GetNativePointer() => _nativePtr; - - /// - /// Display size, in pixels. For clamping windows positions. - /// Default value: [unset] - /// - public Vector2 DisplaySize - { - get { return _nativePtr->DisplaySize; } - set { _nativePtr->DisplaySize = value; } - } - - /// - /// Time elapsed since last frame, in seconds. - /// Default value: 1.0f / 10.0f. - /// - public float DeltaTime - { - get { return _nativePtr->DeltaTime; } - set { _nativePtr->DeltaTime = value; } - } - - /// - /// For retina display or other situations where window coordinates are different from framebuffer coordinates. - /// User storage only, presently not used by ImGui. - /// Default value: (1.0f, 1.0f). - /// - public Vector2 DisplayFramebufferScale - { - get { return _nativePtr->DisplayFramebufferScale; } - set { _nativePtr->DisplayFramebufferScale = value; } - } - - /// - /// Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.). - /// - public Vector2 MousePosition - { - get { return _nativePtr->MousePos; } - set { _nativePtr->MousePos = value; } - } - - /// - /// Mouse wheel: 1 unit scrolls about 5 lines text. - /// - public float MouseWheel - { - get { return _nativePtr->MouseWheel; } - set { _nativePtr->MouseWheel = value; } - } - - /// - /// Mouse buttons: left, right, middle + extras. - /// ImGui itself mostly only uses left button (BeginPopupContext** are using right button). - /// Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. - /// - public MouseDownStates MouseDown { get; } - - /// - /// Map of indices into the KeysDown[512] entries array. - /// Default values: [unset] - /// - public KeyMap KeyMap { get; } - - /// - /// Keyboard keys that are pressed (in whatever storage order you naturally have access to keyboard data) - /// - public KeyDownStates KeysDown { get; } - - public FontAtlas FontAtlas { get; } - - public bool FontAllowUserScaling - { - get { return _nativePtr->FontAllowUserScaling != 0; } - set { _nativePtr->FontAllowUserScaling = value ? (byte)1 : (byte)0; } - } - - /// - /// Keyboard modifier pressed: Control. - /// - public bool CtrlPressed - { - get { return _nativePtr->KeyCtrl == 1; } - set { _nativePtr->KeyCtrl = value ? (byte)1 : (byte)0; } - } - - /// - /// Keyboard modifier pressed: Shift - /// - public bool ShiftPressed - { - get { return _nativePtr->KeyShift == 1; } - set { _nativePtr->KeyShift = value ? (byte)1 : (byte)0; } - } - - /// - /// Keyboard modifier pressed: Alt - /// - public bool AltPressed - { - get { return _nativePtr->KeyAlt == 1; } - set { _nativePtr->KeyAlt = value ? (byte)1 : (byte)0; } - } - - /// - /// Keyboard modifier pressed: Cmd/Super/Windows - /// - public bool SuperPressed - { - get { return _nativePtr->KeySuper == 1; } - set { _nativePtr->KeySuper = value ? (byte)1 : (byte)0; } - } - - public bool WantCaptureMouse - { - get { return _nativePtr->WantCaptureMouse == 1; } - set { _nativePtr->WantCaptureMouse = value ? (byte)1 : (byte)0; } - } - - public bool WantCaptureKeyboard - { - get { return _nativePtr->WantCaptureKeyboard == 1; } - set { _nativePtr->WantCaptureKeyboard = value ? (byte)1 : (byte)0; } - } - - public bool WantTextInput - { - get { return _nativePtr->WantTextInput == 1; } - set { _nativePtr->WantTextInput = value ? (byte)1 : (byte)0; } - } - - public float Framerate - { - get { return _nativePtr->Framerate; } - set { _nativePtr->Framerate = value; } - } - } - - public unsafe class KeyMap - { - private readonly NativeIO* _nativePtr; - - public KeyMap(NativeIO* nativePtr) - { - _nativePtr = nativePtr; - } - - public int this[GuiKey key] - { - get - { - return _nativePtr->KeyMap[(int)key]; - } - set - { - _nativePtr->KeyMap[(int)key] = value; - } - } - } - - public unsafe class MouseDownStates - { - private readonly NativeIO* _nativePtr; - - public MouseDownStates(NativeIO* nativePtr) - { - _nativePtr = nativePtr; - } - - public bool this[int button] - { - get - { - if (button < 0 || button > 5) - { - throw new ArgumentOutOfRangeException(nameof(button)); - } - - return _nativePtr->MouseDown[button] == 1; - } - set - { - if (button < 0 || button > 5) - { - throw new ArgumentOutOfRangeException(nameof(button)); - } - - byte pressed = value ? (byte)1 : (byte)0; - _nativePtr->MouseDown[button] = pressed; - } - } - } - - public unsafe class KeyDownStates - { - private readonly NativeIO* _nativePtr; - - public KeyDownStates(NativeIO* nativePtr) - { - _nativePtr = nativePtr; - } - - public bool this[int key] - { - get - { - if (key < 0 || key > 512) - { - throw new ArgumentOutOfRangeException(nameof(key)); - } - - return _nativePtr->KeysDown[key] == 1; - } - set - { - if (key < 0 || key > 512) - { - throw new ArgumentOutOfRangeException(nameof(key)); - } - - byte pressed = value ? (byte)1 : (byte)0; - _nativePtr->KeysDown[key] = pressed; - } - } - } - - public unsafe class FontAtlas - { - private readonly NativeFontAtlas* _atlasPtr; - - public FontAtlas(NativeFontAtlas* atlasPtr) - { - _atlasPtr = atlasPtr; - } - - public FontTextureData GetTexDataAsAlpha8() - { - byte* pixels; - int width, height; - int bytesPerPixel; - ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8(_atlasPtr, &pixels, &width, &height, &bytesPerPixel); - - return new FontTextureData(pixels, width, height, bytesPerPixel); - } - - public FontTextureData GetTexDataAsRGBA32() - { - byte* pixels; - int width, height; - int bytesPerPixel; - ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32(_atlasPtr, &pixels, &width, &height, &bytesPerPixel); - - return new FontTextureData(pixels, width, height, bytesPerPixel); - } - - public void SetTexID(int textureID) - { - SetTexID(new IntPtr(textureID)); - } - - public void SetTexID(IntPtr textureID) - { - ImGuiNative.ImFontAtlas_SetTexID(_atlasPtr, textureID.ToPointer()); - } - - public void Clear() - { - ImGuiNative.ImFontAtlas_Clear(_atlasPtr); - } - - public void ClearTexData() - { - ImGuiNative.ImFontAtlas_ClearTexData(_atlasPtr); - } - - public Font AddDefaultFont() - { - NativeFont* nativeFontPtr = ImGuiNative.ImFontAtlas_AddFontDefault(_atlasPtr); - return new Font(nativeFontPtr); - } - - public Font AddFontFromFileTTF(string fileName, float pixelSize) - { - NativeFont* nativeFontPtr = ImGuiNative.ImFontAtlas_AddFontFromFileTTF(_atlasPtr, fileName, pixelSize, IntPtr.Zero, null); - return new Font(nativeFontPtr); - } - - public Font AddFontFromMemoryTTF(IntPtr ttfData, int ttfDataSize, float pixelSize) - { - NativeFont* nativeFontPtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(_atlasPtr, ttfData.ToPointer(), ttfDataSize, pixelSize, IntPtr.Zero, null); - return new Font(nativeFontPtr); - } - - public Font AddFontFromMemoryTTF(IntPtr ttfData, int ttfDataSize, float pixelSize, IntPtr fontConfig) - { - NativeFont* nativeFontPtr = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF(_atlasPtr, ttfData.ToPointer(), ttfDataSize, pixelSize, fontConfig, null); - return new Font(nativeFontPtr); - } - - } - - public unsafe struct FontTextureData - { - public readonly byte* Pixels; - public readonly int Width; - public readonly int Height; - public readonly int BytesPerPixel; - - public FontTextureData(byte* pixels, int width, int height, int bytesPerPixel) - { - Pixels = pixels; - Width = width; - Height = height; - BytesPerPixel = bytesPerPixel; - } - } -} diff --git a/src/ImGui.NET/ImDrawData.Manual.cs b/src/ImGui.NET/ImDrawData.Manual.cs new file mode 100644 index 0000000..ddb5041 --- /dev/null +++ b/src/ImGui.NET/ImDrawData.Manual.cs @@ -0,0 +1,7 @@ +namespace ImGuiNET +{ + public unsafe partial struct ImDrawDataPtr + { + public RangePtrAccessor CmdListsRange => new RangePtrAccessor(CmdLists.ToPointer(), CmdListsCount); + } +} diff --git a/src/ImGui.NET/ImDrawList.Manual.cs b/src/ImGui.NET/ImDrawList.Manual.cs new file mode 100644 index 0000000..4d46536 --- /dev/null +++ b/src/ImGui.NET/ImDrawList.Manual.cs @@ -0,0 +1,37 @@ +using System.Numerics; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawListPtr + { + public void AddText(Vector2 pos, uint col, string text_begin) + { + int text_begin_byteCount = Encoding.UTF8.GetByteCount(text_begin); + byte* native_text_begin = stackalloc byte[text_begin_byteCount + 1]; + fixed (char* text_begin_ptr = text_begin) + { + int native_text_begin_offset = Encoding.UTF8.GetBytes(text_begin_ptr, text_begin.Length, native_text_begin, text_begin_byteCount); + native_text_begin[native_text_begin_offset] = 0; + } + byte* native_text_end = null; + ImGuiNative.ImDrawList_AddText(NativePtr, pos, col, native_text_begin, native_text_end); + } + + public void AddText(ImFontPtr font, float font_size, Vector2 pos, uint col, string text_begin) + { + ImFont* native_font = font.NativePtr; + int text_begin_byteCount = Encoding.UTF8.GetByteCount(text_begin); + byte* native_text_begin = stackalloc byte[text_begin_byteCount + 1]; + fixed (char* text_begin_ptr = text_begin) + { + int native_text_begin_offset = Encoding.UTF8.GetBytes(text_begin_ptr, text_begin.Length, native_text_begin, text_begin_byteCount); + native_text_begin[native_text_begin_offset] = 0; + } + byte* native_text_end = null; + float wrap_width = 0.0f; + Vector4* cpu_fine_clip_rect = null; + ImGuiNative.ImDrawList_AddTextFontPtr(NativePtr, native_font, font_size, pos, col, native_text_begin, native_text_end, wrap_width, cpu_fine_clip_rect); + } + } +} diff --git a/src/ImGui.NET/ImGui.Manual.cs b/src/ImGui.NET/ImGui.Manual.cs new file mode 100644 index 0000000..97063c4 --- /dev/null +++ b/src/ImGui.NET/ImGui.Manual.cs @@ -0,0 +1,122 @@ +using System; +using System.Text; + +namespace ImGuiNET +{ + public static unsafe partial class ImGui + { + public static bool InputText( + string label, + byte[] buf, + uint buf_size) + { + return InputText(label, buf, buf_size, 0, null, IntPtr.Zero); + } + + public static bool InputText( + string label, + byte[] buf, + uint buf_size, + ImGuiInputTextFlags flags) + { + return InputText(label, buf, buf_size, flags, null, IntPtr.Zero); + } + + public static bool InputText( + string label, + byte[] buf, + uint buf_size, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback) + { + return InputText(label, buf, buf_size, flags, callback, IntPtr.Zero); + } + + public static bool InputText( + string label, + byte[] buf, + uint buf_size, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback, + IntPtr user_data) + { + + int labelByteCount = Encoding.UTF8.GetByteCount(label); + byte* labelBytes = stackalloc byte[labelByteCount]; + fixed (char* labelPtr = label) + { + Encoding.UTF8.GetBytes(labelPtr, label.Length, labelBytes, labelByteCount); + } + + fixed (byte* bufPtr = buf) + { + return ImGuiNative.igInputText(labelBytes, bufPtr, buf_size, flags, callback, user_data.ToPointer()) != 0; + } + } + + public static bool InputText( + string label, + IntPtr buf, + uint buf_size) + { + return InputText(label, buf, buf_size, 0, null, IntPtr.Zero); + } + + public static bool InputText( + string label, + IntPtr buf, + uint buf_size, + ImGuiInputTextFlags flags) + { + return InputText(label, buf, buf_size, flags, null, IntPtr.Zero); + } + + public static bool InputText( + string label, + IntPtr buf, + uint buf_size, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback) + { + return InputText(label, buf, buf_size, flags, callback, IntPtr.Zero); + } + + public static bool InputText( + string label, + IntPtr buf, + uint buf_size, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback, + IntPtr user_data) + { + + int labelByteCount = Encoding.UTF8.GetByteCount(label); + byte* labelBytes = stackalloc byte[labelByteCount]; + fixed (char* labelPtr = label) + { + Encoding.UTF8.GetBytes(labelPtr, label.Length, labelBytes, labelByteCount); + } + + return ImGuiNative.igInputText(labelBytes, (byte*)buf.ToPointer(), buf_size, flags, callback, user_data.ToPointer()) != 0; + } + + public static bool Begin(string name, ImGuiWindowFlags flags) + { + int name_byteCount = Encoding.UTF8.GetByteCount(name); + byte* native_name = stackalloc byte[name_byteCount + 1]; + fixed (char* name_ptr = name) + { + int native_name_offset = Encoding.UTF8.GetBytes(name_ptr, name.Length, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + byte* p_open = null; + byte ret = ImGuiNative.igBegin(native_name, p_open, flags); + return ret != 0; + } + + public static bool MenuItem(string label, bool enabled) + { + return MenuItem(label, string.Empty, false, enabled); + } + } +} diff --git a/src/ImGui.NET/ImGui.NET.csproj b/src/ImGui.NET/ImGui.NET.csproj index 9465375..4097b9f 100644 --- a/src/ImGui.NET/ImGui.NET.csproj +++ b/src/ImGui.NET/ImGui.NET.csproj @@ -1,18 +1,17 @@  - A .NET wrapper for the dear ImGui library. - 0.4.7 + A .NET wrapper for the Dear ImGui library. + 1.65.0 Eric Mellino - netstandard1.1 + netstandard2.0 true portable ImGui.NET ImGui.NET - $(AssemblyVersion) + -beta0 + $(AssemblyVersion)$(PackagePrereleaseIdentifier) ImGui ImGui.NET Immediate Mode GUI - True https://github.com/mellinoe/imgui.net - true $(OutputPath)\ImGui.NET.xml ImGuiNET diff --git a/src/ImGui.NET/ImGui.cs b/src/ImGui.NET/ImGui.cs deleted file mode 100644 index 605092b..0000000 --- a/src/ImGui.NET/ImGui.cs +++ /dev/null @@ -1,1301 +0,0 @@ -using System; -using System.Numerics; -using System.Runtime.InteropServices; -using System.Diagnostics; - -namespace ImGuiNET -{ - public static class ImGui - { - public static void NewFrame() - { - ImGuiNative.igNewFrame(); - } - - public static void Render() - { - ImGuiNative.igRender(); - } - - public static void Shutdown() - { - ImGuiNative.igShutdown(); - } - - public static unsafe IO GetIO() => new IO(ImGuiNative.igGetIO()); - - public static unsafe Style GetStyle() => new Style(ImGuiNative.igGetStyle()); - - public static void PushID(string id) - { - ImGuiNative.igPushIDStr(id); - } - - public static void PushID(int id) - { - ImGuiNative.igPushIDInt(id); - } - - public static void PushIDRange(string idBegin, string idEnd) - { - ImGuiNative.igPushIDStrRange(idBegin, idEnd); - } - - public static void PushItemWidth(float width) - { - ImGuiNative.igPushItemWidth(width); - } - - public static void PopItemWidth() - { - ImGuiNative.igPopItemWidth(); - } - - public static void PopID() - { - ImGuiNative.igPopID(); - } - - public static uint GetID(string id) - { - return ImGuiNative.igGetIDStr(id); - } - - public static uint GetID(string idBegin, string idEnd) - { - return ImGuiNative.igGetIDStrRange(idBegin, idEnd); - } - - public static void Text(string message) - { - ImGuiNative.igText(message); - } - - public static void Text(string message, Vector4 color) - { - ImGuiNative.igTextColored(color, message); - } - - public static void TextDisabled(string text) - { - ImGuiNative.igTextDisabled(text); - } - - public static void TextWrapped(string text) - { - ImGuiNative.igTextWrapped(text); - } - - public static unsafe void TextUnformatted(string message) - { - fixed (byte* bytes = System.Text.Encoding.UTF8.GetBytes(message)) - { - ImGuiNative.igTextUnformatted(bytes, null); - } - } - - public static void LabelText(string label, string text) - { - ImGuiNative.igLabelText(label, text); - } - - public static void Bullet() - { - ImGuiNative.igBullet(); - } - - public static void BulletText(string text) - { - ImGuiNative.igBulletText(text); - } - - public static bool InvisibleButton(string id) => InvisibleButton(id, Vector2.Zero); - - public static bool InvisibleButton(string id, Vector2 size) - { - return ImGuiNative.igInvisibleButton(id, size); - } - - public static void Image(IntPtr userTextureID, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tintColor, Vector4 borderColor) - { - ImGuiNative.igImage(userTextureID, size, uv0, uv1, tintColor, borderColor); - } - - public static bool ImageButton( - IntPtr userTextureID, - Vector2 size, - Vector2 uv0, - Vector2 uv1, - int framePadding, - Vector4 backgroundColor, - Vector4 tintColor) - { - return ImGuiNative.igImageButton(userTextureID, size, uv0, uv1, framePadding, backgroundColor, tintColor); - } - - //obsolete! - public static bool CollapsingHeader(string label, string id, bool displayFrame, bool defaultOpen) - { - TreeNodeFlags default_open_flags = TreeNodeFlags.DefaultOpen; - return ImGuiNative.igCollapsingHeader(label, (defaultOpen ? default_open_flags : 0)); - } - - - public static bool CollapsingHeader(string label, TreeNodeFlags flags) - { - return ImGuiNative.igCollapsingHeader(label, flags); - } - - public static bool Checkbox(string label, ref bool value) - { - return ImGuiNative.igCheckbox(label, ref value); - } - - public static unsafe bool RadioButton(string label, ref int target, int buttonValue) - { - int targetCopy = target; - bool result = ImGuiNative.igRadioButton(label, &targetCopy, buttonValue); - target = targetCopy; - return result; - } - - public static bool RadioButtonBool(string label, bool active) - { - return ImGuiNative.igRadioButtonBool(label, active); - } - - public static bool BeginCombo(string label, string previewValue, ComboFlags flags) - => ImGuiNative.igBeginCombo(label, previewValue, flags); - - public static void EndCombo() => ImGuiNative.igEndCombo(); - - public unsafe static bool Combo(string label, ref int current_item, string[] items) - { - return ImGuiNative.igCombo(label, ref current_item, items, items.Length, 5); - } - - public unsafe static bool Combo(string label, ref int current_item, string[] items, int heightInItems) - { - return ImGuiNative.igCombo(label, ref current_item, items, items.Length, heightInItems); - } - - public static bool ColorButton(string desc_id, Vector4 color, ColorEditFlags flags, Vector2 size) - { - return ImGuiNative.igColorButton(desc_id, color, flags, size); - } - - public static unsafe bool ColorEdit3(string label, ref float r, ref float g, ref float b, ColorEditFlags flags = ColorEditFlags.Default) - { - Vector3 localColor = new Vector3(r, g, b); - bool result = ImGuiNative.igColorEdit3(label, &localColor, flags); - if (result) - { - r = localColor.X; - g = localColor.Y; - b = localColor.Z; - } - - return result; - } - - public static unsafe bool ColorEdit3(string label, ref Vector3 color, ColorEditFlags flags = ColorEditFlags.Default) - { - Vector3 localColor = color; - bool result = ImGuiNative.igColorEdit3(label, &localColor, flags); - if (result) - { - color = localColor; - } - - return result; - } - - public static unsafe bool ColorEdit4(string label, ref float r, ref float g, ref float b, ref float a, ColorEditFlags flags = ColorEditFlags.Default) - { - Vector4 localColor = new Vector4(r, g, b, a); - bool result = ImGuiNative.igColorEdit4(label, &localColor, flags); - if (result) - { - r = localColor.X; - g = localColor.Y; - b = localColor.Z; - a = localColor.W; - } - - return result; - } - - public static unsafe bool ColorEdit4(string label, ref Vector4 color, ColorEditFlags flags = ColorEditFlags.Default) - { - Vector4 localColor = color; - bool result = ImGuiNative.igColorEdit4(label, &localColor, flags); - if (result) - { - color = localColor; - } - - return result; - } - - public static unsafe bool ColorPicker3(string label, ref Vector3 color, ColorEditFlags flags = ColorEditFlags.Default) - { - Vector3 localColor = color; - bool result = ImGuiNative.igColorPicker3(label, &localColor, flags); - if (result) - { - color = localColor; - } - return result; - } - - public static unsafe bool ColorPicker4(string label, ref Vector4 color, ColorEditFlags flags = ColorEditFlags.Default) - { - Vector4 localColor = color; - bool result = ImGuiNative.igColorPicker4(label, &localColor, flags); - if (result) - { - color = localColor; - } - return result; - } - - public unsafe static void PlotLines( - string label, - float[] values, - int valuesOffset, - string overlayText, - float scaleMin, - float scaleMax, - Vector2 graphSize, - int stride) - { - fixed (float* valuesBasePtr = values) - { - ImGuiNative.igPlotLines( - label, - valuesBasePtr, - values.Length, - valuesOffset, - overlayText, - scaleMin, - scaleMax, - graphSize, - stride); - } - } - - public static void ShowStyleSelector(string label) - { - ImGuiNative.igShowStyleSelector(label); - } - - public static void ShowFontSelector(string label) - { - ImGuiNative.igShowFontSelector(label); - } - - [Obsolete("This PlotHistogram overload is deprecated. Use the overload accepting a startIndex and count.")] - public unsafe static void PlotHistogram( - string label, - float[] values, - int valuesOffset, - string overlayText, - float scaleMin, - float scaleMax, - Vector2 graphSize, - int stride) - { - fixed (float* valuesBasePtr = values) - { - ImGuiNative.igPlotHistogram( - label, - valuesBasePtr, - values.Length, - valuesOffset, - overlayText, - scaleMin, - scaleMax, - graphSize, - stride); - } - } - - public unsafe static void PlotHistogram( - string label, - float[] values, - int startIndex, - int count, - string overlayText = null, - float scaleMin = float.MaxValue, - float scaleMax = float.MaxValue, - Vector2 graphSize = default(Vector2), - int elementStride = 1) - { - fixed (float* valuesBasePtr = values) - { - ImGuiNative.igPlotHistogram( - label, - valuesBasePtr, - count, - startIndex, - overlayText, - scaleMin, - scaleMax, - graphSize, - elementStride * sizeof(float)); - } - } - - public static bool SliderFloat(string sliderLabel, ref float value, float min, float max, string displayText, float power) - { - return ImGuiNative.igSliderFloat(sliderLabel, ref value, min, max, displayText, power); - } - - public static bool SliderVector2(string label, ref Vector2 value, float min, float max, string displayText, float power) - { - return ImGuiNative.igSliderFloat2(label, ref value, min, max, displayText, power); - } - - public static bool SliderVector3(string label, ref Vector3 value, float min, float max, string displayText, float power) - { - return ImGuiNative.igSliderFloat3(label, ref value, min, max, displayText, power); - } - - public static bool SliderVector4(string label, ref Vector4 value, float min, float max, string displayText, float power) - { - return ImGuiNative.igSliderFloat4(label, ref value, min, max, displayText, power); - } - - public static bool SliderAngle(string label, ref float radians, float minDegrees, float maxDegrees) - { - return ImGuiNative.igSliderAngle(label, ref radians, minDegrees, maxDegrees); - } - - public static bool SliderInt(string sliderLabel, ref int value, int min, int max, string displayText) - { - return ImGuiNative.igSliderInt(sliderLabel, ref value, min, max, displayText); - } - - public static bool SliderInt2(string label, ref Int2 value, int min, int max, string displayText) - { - return ImGuiNative.igSliderInt2(label, ref value, min, max, displayText); - } - - public static bool SliderInt3(string label, ref Int3 value, int min, int max, string displayText) - { - return ImGuiNative.igSliderInt3(label, ref value, min, max, displayText); - } - - public static bool SliderInt4(string label, ref Int4 value, int min, int max, string displayText) - { - return ImGuiNative.igSliderInt4(label, ref value, min, max, displayText); - } - - public static bool DragFloat(string label, ref float value, float min, float max, float dragSpeed = 1f, string displayFormat = "%f", float dragPower = 1f) - { - return ImGuiNative.igDragFloat(label, ref value, dragSpeed, min, max, displayFormat, dragPower); - } - - public static bool DragVector2(string label, ref Vector2 value, float min, float max, float dragSpeed = 1f, string displayFormat = "%f", float dragPower = 1f) - { - return ImGuiNative.igDragFloat2(label, ref value, dragSpeed, min, max, displayFormat, dragPower); - } - - public static bool DragVector3(string label, ref Vector3 value, float min, float max, float dragSpeed = 1f, string displayFormat = "%f", float dragPower = 1f) - { - return ImGuiNative.igDragFloat3(label, ref value, dragSpeed, min, max, displayFormat, dragPower); - } - - public static bool DragVector4(string label, ref Vector4 value, float min, float max, float dragSpeed = 1f, string displayFormat = "%f", float dragPower = 1f) - { - return ImGuiNative.igDragFloat4(label, ref value, dragSpeed, min, max, displayFormat, dragPower); - } - - public static bool DragFloatRange2( - string label, - ref float currentMinValue, - ref float currentMaxValue, - float speed = 1.0f, - float minValueLimit = 0.0f, - float maxValueLimit = 0.0f, - string displayFormat = "%.3f", - string displayFormatMax = null, - float power = 1.0f) - { - return ImGuiNative.igDragFloatRange2(label, ref currentMinValue, ref currentMaxValue, speed, minValueLimit, maxValueLimit, displayFormat, displayFormatMax, power); - } - - public static bool DragInt(string label, ref int value, float speed, int minValue, int maxValue, string displayText) - { - return ImGuiNative.igDragInt(label, ref value, speed, minValue, maxValue, displayText); - } - - public static bool DragInt2(string label, ref Int2 value, float speed, int minValue, int maxValue, string displayText) - { - return ImGuiNative.igDragInt2(label, ref value, speed, minValue, maxValue, displayText); - } - - public static bool DragInt3(string label, ref Int3 value, float speed, int minValue, int maxValue, string displayText) - { - return ImGuiNative.igDragInt3(label, ref value, speed, minValue, maxValue, displayText); - } - - public static bool DragInt4(string label, ref Int4 value, float speed, int minValue, int maxValue, string displayText) - { - return ImGuiNative.igDragInt4(label, ref value, speed, minValue, maxValue, displayText); - } - - public static bool DragIntRange2( - string label, - ref int currentMinValue, - ref int currentMaxValue, - float speed = 1.0f, - int minLimit = 0, - int maxLimit = 0, - string displayFormat = "%.0f", - string displayFormatMax = null) - { - return ImGuiNative.igDragIntRange2( - label, - ref currentMinValue, - ref currentMaxValue, - speed, - minLimit, - maxLimit, - displayFormat, - displayFormatMax); - } - - public static bool Button(string message) - { - return ImGuiNative.igButton(message, Vector2.Zero); - } - - public static bool Button(string message, Vector2 size) - { - return ImGuiNative.igButton(message, size); - } - - public static unsafe void ProgressBar(float fraction, Vector2 size, string overlayText) - { - ImGuiNative.igProgressBar(fraction, &size, overlayText); - } - - public static void SetNextWindowSize(Vector2 size, Condition condition) - { - ImGuiNative.igSetNextWindowSize(size, condition); - } - - public static void SetNextWindowFocus() - { - ImGuiNative.igSetNextWindowFocus(); - } - - public static void SetNextWindowPos(Vector2 position, Condition condition) - { - ImGuiNative.igSetNextWindowPos(position, condition, Vector2.Zero); - } - - public static void SetNextWindowPos(Vector2 position, Condition condition, Vector2 pivot) - { - ImGuiNative.igSetNextWindowPos(position, condition, pivot); - } - - public static void AddInputCharacter(char keyChar) - { - ImGuiNative.ImGuiIO_AddInputCharacter(keyChar); - } - - /// - /// Helper to scale the ClipRect field of each ImDrawCmd. - /// Use if your final output buffer is at a different scale than ImGui expects, - /// or if there is a difference between your window resolution and framebuffer resolution. - /// - /// Pointer to the DrawData to scale. - /// The scale to apply. - public static unsafe void ScaleClipRects(DrawData* drawData, Vector2 scale) - { - for (int i = 0; i < drawData->CmdListsCount; i++) - { - NativeDrawList* cmd_list = drawData->CmdLists[i]; - for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++) - { - DrawCmd* drawCmdList = (DrawCmd*)cmd_list->CmdBuffer.Data; - DrawCmd* cmd = &drawCmdList[cmd_i]; - cmd->ClipRect = new Vector4(cmd->ClipRect.X * scale.X, cmd->ClipRect.Y * scale.Y, cmd->ClipRect.Z * scale.X, cmd->ClipRect.W * scale.Y); - } - } - } - - public static float GetWindowHeight() - { - return ImGuiNative.igGetWindowHeight(); - } - - - public static float GetWindowWidth() - { - return ImGuiNative.igGetWindowWidth(); - } - - public static Vector2 GetWindowSize() - { - Vector2 size; - ImGuiNative.igGetWindowSize(out size); - return size; - } - - public static Vector2 GetWindowPosition() - { - Vector2 pos; - ImGuiNative.igGetWindowPos(out pos); - return pos; - } - - - public static void SetWindowSize(Vector2 size, Condition cond = 0) - { - ImGuiNative.igSetWindowSize(size, cond); - } - - public static bool BeginWindow(string windowTitle) => BeginWindow(windowTitle, WindowFlags.Default); - - public static unsafe bool BeginWindow(string windowTitle, WindowFlags flags) - { - return ImGuiNative.igBegin(windowTitle, null, flags); - } - - public static unsafe bool BeginWindow(string windowTitle, ref bool opened, WindowFlags flags) - { - byte openedLocal = opened ? (byte)1 : (byte)0; - bool ret = ImGuiNative.igBegin(windowTitle, &openedLocal, flags); - opened = openedLocal != 0; - return ret; - } - - public static unsafe bool BeginWindow(string windowTitle, ref bool opened, float backgroundAlpha, WindowFlags flags) - { - byte openedLocal = opened ? (byte)1 : (byte)0; - bool ret = ImGuiNative.igBegin2(windowTitle, &openedLocal, new Vector2(), backgroundAlpha, flags); - opened = openedLocal != 0; - return ret; - } - - public static unsafe bool BeginWindow(string windowTitle, ref bool opened, Vector2 startingSize, WindowFlags flags) - { - byte openedLocal = opened ? (byte)1 : (byte)0; - bool ret = ImGuiNative.igBegin2(windowTitle, &openedLocal, startingSize, 1f, flags); - opened = openedLocal != 0; - return ret; - } - - public static unsafe bool BeginWindow(string windowTitle, ref bool opened, Vector2 startingSize, float backgroundAlpha, WindowFlags flags) - { - byte openedLocal = opened ? (byte)1 : (byte)0; - bool ret = ImGuiNative.igBegin2(windowTitle, &openedLocal, startingSize, backgroundAlpha, flags); - opened = openedLocal != 0; - return ret; - } - - public static bool BeginMenu(string label) - { - return ImGuiNative.igBeginMenu(label, true); - } - - public static bool BeginMenu(string label, bool enabled) - { - return ImGuiNative.igBeginMenu(label, enabled); - } - - public static bool BeginMenuBar() - { - return ImGuiNative.igBeginMenuBar(); - } - - public static void CloseCurrentPopup() - { - ImGuiNative.igCloseCurrentPopup(); - } - - public static void EndMenuBar() - { - ImGuiNative.igEndMenuBar(); - } - - public static void EndMenu() - { - ImGuiNative.igEndMenu(); - } - - public static void Separator() - { - ImGuiNative.igSeparator(); - } - - public static bool MenuItem(string label) - { - return MenuItem(label, string.Empty, false, true); - } - - public static bool MenuItem(string label, string shortcut) - { - return MenuItem(label, shortcut, false, true); - } - - public static bool MenuItem(string label, bool enabled) - { - return MenuItem(label, string.Empty, false, enabled); - } - - public static bool MenuItem(string label, string shortcut, bool selected, bool enabled) - { - return ImGuiNative.igMenuItem(label, shortcut, selected, enabled); - } - - public static unsafe bool InputText(string label, byte[] textBuffer, uint bufferSize, InputTextFlags flags, TextEditCallback textEditCallback) - { - return InputText(label, textBuffer, bufferSize, flags, textEditCallback, IntPtr.Zero); - } - - public static unsafe bool InputText(string label, byte[] textBuffer, uint bufferSize, InputTextFlags flags, TextEditCallback textEditCallback, IntPtr userData) - { - Debug.Assert(bufferSize <= textBuffer.Length); - fixed (byte* ptrBuf = textBuffer) - { - return InputText(label, new IntPtr(ptrBuf), bufferSize, flags, textEditCallback, userData); - } - } - - public static unsafe bool InputText(string label, IntPtr textBuffer, uint bufferSize, InputTextFlags flags, TextEditCallback textEditCallback) - { - return InputText(label, textBuffer, bufferSize, flags, textEditCallback, IntPtr.Zero); - } - - public static unsafe bool InputText(string label, IntPtr textBuffer, uint bufferSize, InputTextFlags flags, TextEditCallback textEditCallback, IntPtr userData) - { - return ImGuiNative.igInputText(label, textBuffer, bufferSize, flags, textEditCallback, userData.ToPointer()); - } - - public static void EndWindow() - { - ImGuiNative.igEnd(); - } - - public static void PushStyleColor(ColorTarget target, Vector4 color) - { - ImGuiNative.igPushStyleColor(target, color); - } - - public static void PopStyleColor() - { - PopStyleColor(1); - } - - public static void PopStyleColor(int numStyles) - { - ImGuiNative.igPopStyleColor(numStyles); - } - - public static void PushStyleVar(StyleVar var, float value) => ImGuiNative.igPushStyleVar(var, value); - public static void PushStyleVar(StyleVar var, Vector2 value) => ImGuiNative.igPushStyleVarVec(var, value); - - public static void PopStyleVar() => ImGuiNative.igPopStyleVar(1); - public static void PopStyleVar(int count) => ImGuiNative.igPopStyleVar(count); - - public static unsafe void InputTextMultiline(string label, IntPtr textBuffer, uint bufferSize, Vector2 size, InputTextFlags flags, TextEditCallback callback) - { - ImGuiNative.igInputTextMultiline(label, textBuffer, bufferSize, size, flags, callback, null); - } - - public static unsafe DrawData* GetDrawData() - { - return ImGuiNative.igGetDrawData(); - } - - public static unsafe void InputTextMultiline(string label, IntPtr textBuffer, uint bufferSize, Vector2 size, InputTextFlags flags, TextEditCallback callback, IntPtr userData) - { - ImGuiNative.igInputTextMultiline(label, textBuffer, bufferSize, size, flags, callback, userData.ToPointer()); - } - - public static bool BeginChildFrame(uint id, Vector2 size, WindowFlags flags) - { - return ImGuiNative.igBeginChildFrame(id, size, flags); - } - - public static void EndChildFrame() - { - ImGuiNative.igEndChildFrame(); - } - - public static unsafe void ColorConvertRGBToHSV(float r, float g, float b, out float h, out float s, out float v) - { - float h2, s2, v2; - ImGuiNative.igColorConvertRGBtoHSV(r, g, b, &h2, &s2, &v2); - h = h2; - s = s2; - v = v2; - } - - public static unsafe void ColorConvertHSVToRGB(float h, float s, float v, out float r, out float g, out float b) - { - float r2, g2, b2; - ImGuiNative.igColorConvertHSVtoRGB(h, s, v, &r2, &g2, &b2); - r = r2; - g = g2; - b = b2; - } - - - public static int GetKeyIndex(GuiKey key) - { - //TODO this got exported by later version of cimgui, call ImGuiNative after upgrading - IO io = GetIO(); - return io.KeyMap[key]; - } - - public static bool IsKeyDown(int keyIndex) - { - return ImGuiNative.igIsKeyDown(keyIndex); - } - - public static bool IsKeyPressed(int keyIndex, bool repeat = true) - { - return ImGuiNative.igIsKeyPressed(keyIndex, repeat); - } - - public static bool IsKeyReleased(int keyIndex) - { - return ImGuiNative.igIsKeyReleased(keyIndex); - } - - public static int GetKeyPressedAmount(int keyIndex, float repeatDelay, float rate) - { - return ImGuiNative.igGetKeyPressedAmount(keyIndex, repeatDelay, rate); - } - - public static bool IsMouseDown(int button) - { - return ImGuiNative.igIsMouseDown(button); - } - - public static bool IsMouseClicked(int button, bool repeat = false) - { - return ImGuiNative.igIsMouseClicked(button, repeat); - } - - public static bool IsMouseDoubleClicked(int button) - { - return ImGuiNative.igIsMouseDoubleClicked(button); - } - - public static bool IsMouseReleased(int button) - { - return ImGuiNative.igIsMouseReleased(button); - } - - public static bool IsAnyWindowHovered() - { - return ImGuiNative.igIsAnyWindowHovered(); - } - - public static bool IsWindowFocused(FocusedFlags flags) - { - return ImGuiNative.igIsWindowFocused(flags); - } - - public static bool IsWindowHovered(HoveredFlags flags) - { - return ImGuiNative.igIsWindowHovered(flags); - } - - public static bool IsMouseHoveringRect(Vector2 minPosition, Vector2 maxPosition, bool clip) - { - return ImGuiNative.igIsMouseHoveringRect(minPosition, maxPosition, clip); - } - - public static unsafe bool IsMousePosValid() - { - return ImGuiNative.igIsMousePosValid(null); - } - - public static unsafe bool IsMousePosValid(Vector2 mousePos) - { - return ImGuiNative.igIsMousePosValid(&mousePos); - } - - public static bool IsMouseDragging(int button, float lockThreshold) - { - return ImGuiNative.igIsMouseDragging(button, lockThreshold); - } - - public static Vector2 GetMousePos() - { - Vector2 retVal; - ImGuiNative.igGetMousePos(out retVal); - return retVal; - } - - public static Vector2 GetMousePosOnOpeningCurrentPopup() - { - Vector2 retVal; - ImGuiNative.igGetMousePosOnOpeningCurrentPopup(out retVal); - return retVal; - } - - public static Vector2 GetMouseDragDelta(int button, float lockThreshold) - { - Vector2 retVal; - ImGuiNative.igGetMouseDragDelta(out retVal, button, lockThreshold); - return retVal; - } - - public static void ResetMouseDragDelta(int button) - { - ImGuiNative.igResetMouseDragDelta(button); - } - - public static MouseCursorKind MouseCursor - { - get - { - return ImGuiNative.igGetMouseCursor(); - } - set - { - ImGuiNative.igSetMouseCursor(value); - } - } - - public static Vector2 GetCursorStartPos() - { - Vector2 retVal; - ImGuiNative.igGetCursorStartPos(out retVal); - return retVal; - } - - public static unsafe Vector2 GetCursorScreenPos() - { - Vector2 retVal; - ImGuiNative.igGetCursorScreenPos(&retVal); - return retVal; - } - - public static void SetCursorScreenPos(Vector2 pos) - { - ImGuiNative.igSetCursorScreenPos(pos); - } - - public static float GetFrameHeightWithSpacing() - { - return ImGuiNative.igGetFrameHeightWithSpacing(); - } - - public static void AlignTextToFramePadding() - { - ImGuiNative.igAlignTextToFramePadding(); - } - - - public static bool BeginChild(string id, bool border = false, WindowFlags flags = 0) - { - return BeginChild(id, new Vector2(0, 0), border, flags); - } - - public static bool BeginChild(string id, Vector2 size, bool border, WindowFlags flags) - { - return ImGuiNative.igBeginChild(id, size, border, flags); - } - - public static bool BeginChild(uint id, Vector2 size, bool border, WindowFlags flags) - { - return ImGuiNative.igBeginChildEx(id, size, border, flags); - } - - public static void EndChild() - { - ImGuiNative.igEndChild(); - } - - public static Vector2 GetContentRegionMax() - { - Vector2 value; - ImGuiNative.igGetContentRegionMax(out value); - return value; - } - - public static Vector2 GetContentRegionAvailable() - { - Vector2 value; - ImGuiNative.igGetContentRegionAvail(out value); - return value; - } - - public static float GetContentRegionAvailableWidth() - { - return ImGuiNative.igGetContentRegionAvailWidth(); - } - - public static Vector2 GetWindowContentRegionMin() - { - Vector2 value; - ImGuiNative.igGetWindowContentRegionMin(out value); - return value; - } - - public static Vector2 GetWindowContentRegionMax() - { - Vector2 value; - ImGuiNative.igGetWindowContentRegionMax(out value); - return value; - } - - public static float GetWindowContentRegionWidth() - { - return ImGuiNative.igGetWindowContentRegionWidth(); - } - - public static bool Selectable(string label) - { - return Selectable(label, false); - } - - public static bool Selectable(string label, bool isSelected) - { - return Selectable(label, isSelected, SelectableFlags.Default); - } - - public static bool BeginMainMenuBar() - { - return ImGuiNative.igBeginMainMenuBar(); - } - - public static bool OpenPopupOnItemClick(string id, int mouseButton) - { - return ImGuiNative.igOpenPopupOnItemClick(id, mouseButton); - } - - public static bool BeginPopup(string id) - { - return ImGuiNative.igBeginPopup(id); - } - - public static void EndMainMenuBar() - { - ImGuiNative.igEndMainMenuBar(); - } - - public static bool SmallButton(string label) - { - return ImGuiNative.igSmallButton(label); - } - - public static bool BeginPopupModal(string name) - { - return BeginPopupModal(name, WindowFlags.Default); - } - - public static bool BeginPopupModal(string name, ref bool opened) - { - return BeginPopupModal(name, ref opened, WindowFlags.Default); - } - - public static unsafe bool BeginPopupModal(string name, WindowFlags extra_flags) - { - return ImGuiNative.igBeginPopupModal(name, null, extra_flags); - } - - public static unsafe bool BeginPopupModal(string name, ref bool p_opened, WindowFlags extra_flags) - { - byte value = p_opened ? (byte)1 : (byte)0; - bool result = ImGuiNative.igBeginPopupModal(name, &value, extra_flags); - - p_opened = value == 1 ? true : false; - return result; - } - - public static bool Selectable(string label, bool isSelected, SelectableFlags flags) - { - return Selectable(label, isSelected, flags, new Vector2()); - } - - public static bool Selectable(string label, bool isSelected, SelectableFlags flags, Vector2 size) - { - return ImGuiNative.igSelectable(label, isSelected, flags, size); - } - - public static bool SelectableEx(string label, ref bool isSelected) - { - return ImGuiNative.igSelectableEx(label, ref isSelected, SelectableFlags.Default, new Vector2()); - } - - public static bool SelectableEx(string label, ref bool isSelected, SelectableFlags flags, Vector2 size) - { - return ImGuiNative.igSelectableEx(label, ref isSelected, flags, size); - } - - public static unsafe Vector2 GetTextSize(string text, float wrapWidth = Int32.MaxValue) - { - Vector2 result; - IntPtr buffer = Marshal.StringToHGlobalAnsi(text); - byte* textStart = (byte*)buffer.ToPointer(); - byte* textEnd = textStart + text.Length; - ImGuiNative.igCalcTextSize(out result, (char*)textStart, (char*)textEnd, false, wrapWidth); - return result; - } - - public static bool BeginPopupContextItem(string id) - { - return BeginPopupContextItem(id, 1); - } - - public static bool BeginPopupContextItem(string id, int mouseButton) - { - return ImGuiNative.igBeginPopupContextItem(id, mouseButton); - } - - public static unsafe void Dummy(float width, float height) - { - Dummy(new Vector2(width, height)); - } - - public static void EndPopup() - { - ImGuiNative.igEndPopup(); - } - - public static bool IsPopupOpen(string id) - { - return ImGuiNative.igIsPopupOpen(id); - } - - public static unsafe void Dummy(Vector2 size) - { - ImGuiNative.igDummy(&size); - } - - public static void Spacing() - { - ImGuiNative.igSpacing(); - } - - public static float GetFrameHeight() => ImGuiNative.igGetFrameHeight(); - - public static void Columns(int count, string id, bool border) - { - ImGuiNative.igColumns(count, id, border); - } - - public static void NextColumn() - { - ImGuiNative.igNextColumn(); - } - - public static int GetColumnIndex() - { - return ImGuiNative.igGetColumnIndex(); - } - - public static float GetColumnOffset(int columnIndex) - { - return ImGuiNative.igGetColumnOffset(columnIndex); - } - - public static void SetColumnOffset(int columnIndex, float offsetX) - { - ImGuiNative.igSetColumnOffset(columnIndex, offsetX); - } - - public static float GetColumnWidth(int columnIndex) - { - return ImGuiNative.igGetColumnWidth(columnIndex); - } - - public static void SetColumnWidth(int columnIndex, float width) - { - ImGuiNative.igSetColumnWidth(columnIndex, width); - } - - public static int GetColumnsCount() - { - return ImGuiNative.igGetColumnsCount(); - } - - public static void OpenPopup(string id) - { - ImGuiNative.igOpenPopup(id); - } - - public static void SameLine(float localPositionX = 0, float spacingW = -1.0f) - { - ImGuiNative.igSameLine(localPositionX, spacingW); - } - - public static bool BeginDragDropSource(DragDropFlags flags, int mouseButton) - => ImGuiNative.igBeginDragDropSource(flags, mouseButton); - - public static unsafe bool SetDragDropPayload(string type, IntPtr data, uint size, Condition cond) - => ImGuiNative.igSetDragDropPayload(type, data.ToPointer(), size, cond); - - public static void EndDragDropSource() => ImGuiNative.igEndDragDropSource(); - - public static bool BeginDragDropTarget() => ImGuiNative.igBeginDragDropTarget(); - - public static unsafe Payload AcceptDragDropPayload(string type, DragDropFlags flags) - => new Payload(ImGuiNative.igAcceptDragDropPayload(type, flags)); - - public static void EndDragDropTarget() => ImGuiNative.igEndDragDropTarget(); - - public static void PushClipRect(Vector2 min, Vector2 max, bool intersectWithCurrentCliRect) - { - ImGuiNative.igPushClipRect(min, max, intersectWithCurrentCliRect ? (byte)1 : (byte)0); - } - - public static void PopClipRect() - { - ImGuiNative.igPopClipRect(); - } - - public static unsafe void StyleColorsClassic(Style style) - { - ImGuiNative.igStyleColorsClassic(style.NativePtr); - } - - public static unsafe void StyleColorsDark(Style style) - { - ImGuiNative.igStyleColorsDark(style.NativePtr); - } - - public static unsafe void StyleColorsLight(Style style) - { - ImGuiNative.igStyleColorsLight(style.NativePtr); - } - - public static bool IsItemHovered(HoveredFlags flags) - { - return ImGuiNative.igIsItemHovered(flags); - } - - public static bool IsLastItemActive() - { - return ImGuiNative.igIsItemActive(); - } - - public static bool IsLastItemVisible() - { - return ImGuiNative.igIsItemVisible(); - } - - public static bool IsAnyItemHovered() - { - return ImGuiNative.igIsAnyItemHovered(); - } - - public static bool IsAnyItemActive() - { - return ImGuiNative.igIsAnyItemActive(); - } - - public static unsafe DrawList GetOverlayDrawList() => new DrawList(ImGuiNative.igGetOverlayDrawList()); - - public static void SetTooltip(string text) - { - ImGuiNative.igSetTooltip(text); - } - - public static void SetNextTreeNodeOpen(bool opened) - { - ImGuiNative.igSetNextTreeNodeOpen(opened, Condition.Always); - } - - public static void SetNextTreeNodeOpen(bool opened, Condition setCondition) - { - ImGuiNative.igSetNextTreeNodeOpen(opened, setCondition); - } - - public static bool TreeNode(string label) - { - return ImGuiNative.igTreeNode(label); - } - - public static bool TreeNodeEx(string label, TreeNodeFlags flags = 0) - { - return ImGuiNative.igTreeNodeEx(label, flags); - } - - public static void TreePop() - { - ImGuiNative.igTreePop(); - } - - public static Vector2 GetLastItemRectSize() - { - Vector2 result; - ImGuiNative.igGetItemRectSize(out result); - return result; - } - - public static Vector2 GetLastItemRectMin() - { - Vector2 result; - ImGuiNative.igGetItemRectMin(out result); - return result; - } - - public static Vector2 GetLastItemRectMax() - { - Vector2 result; - ImGuiNative.igGetItemRectMax(out result); - return result; - } - - public static bool IsWindowAppearing() - { - return ImGuiNative.igIsWindowAppearing(); - } - - public static void SetWindowFontScale(float scale) - { - ImGuiNative.igSetWindowFontScale(scale); - } - - public static void SetScrollHere() - { - ImGuiNative.igSetScrollHere(); - } - - public static void SetItemDefaultFocus() - { - ImGuiNative.igSetItemDefaultFocus(); - } - - public static void SetScrollHere(float centerYRatio) - { - ImGuiNative.igSetScrollHere(centerYRatio); - } - - public static unsafe void PushFont(Font font) - { - ImGuiNative.igPushFont(font.NativeFont); - } - - public static void PopFont() - { - ImGuiNative.igPopFont(); - } - - public static void SetKeyboardFocusHere() - { - ImGuiNative.igSetKeyboardFocusHere(0); - } - - public static void SetKeyboardFocusHere(int offset) - { - ImGuiNative.igSetKeyboardFocusHere(offset); - } - - public static void CalcListClipping(int itemsCount, float itemsHeight, ref int outItemsDisplayStart, ref int outItemsDisplayEnd) - { - ImGuiNative.igCalcListClipping(itemsCount, itemsHeight, ref outItemsDisplayStart, ref outItemsDisplayEnd); - } - } -} diff --git a/src/ImGui.NET/ImGuiNative.cs b/src/ImGui.NET/ImGuiNative.cs deleted file mode 100644 index 16fae61..0000000 --- a/src/ImGui.NET/ImGuiNative.cs +++ /dev/null @@ -1,1060 +0,0 @@ -using System.Runtime.InteropServices; -using System.Numerics; -using System; - -namespace ImGuiNET -{ - /// - /// Contains all of the exported functions from the native (c)imGui module. - /// - public static unsafe class ImGuiNative - { - private const string cimguiLib = "cimgui"; - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeIO* igGetIO(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeStyle* igGetStyle(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern DrawData* igGetDrawData(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igNewFrame(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igNewLine(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igRender(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igShutdown(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowUserGuide(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowStyleEditor(ref NativeStyle @ref); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowDemoWindow(ref bool opened); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowMetricsWindow(ref bool opened); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowStyleSelector(string label); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igShowFontSelector(string label); - - - // Window - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBegin(string name, byte* p_opened, WindowFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBegin2(string name, byte* p_opened, Vector2 size_on_first_use, float bg_alpha, WindowFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBegin(string name, ref bool p_opened, WindowFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBegin2(string name, ref bool p_opened, Vector2 size_on_first_use, float bg_alpha, WindowFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEnd(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginChild(string str_id, Vector2 size, bool border, WindowFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginChildEx(uint id, Vector2 size, bool border, WindowFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndChild(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetContentRegionMax(out Vector2 @out); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetContentRegionAvail(out Vector2 @out); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetContentRegionAvailWidth(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetWindowContentRegionMin(out Vector2 @out); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetWindowContentRegionMax(out Vector2 @out); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetWindowContentRegionWidth(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeDrawList* igGetWindowDrawList(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsWindowAppearing(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFontScale(float scale); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetWindowPos(out Vector2 @out); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetWindowSize(out Vector2 @out); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetWindowWidth(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetWindowHeight(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsWindowCollapsed(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowPos(Vector2 pos, Condition cond, Vector2 pivot); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowSize(Vector2 size, Condition cond); - public delegate void ImGuiSizeConstraintCallback(IntPtr data); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeConstraintCallback custom_callback, void* custom_callback_data); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowContentSize(Vector2 size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowCollapsed(bool collapsed, Condition cond); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextWindowFocus(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowPos(Vector2 pos, Condition cond); //(not recommended) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowSize(Vector2 size, Condition cond); //(not recommended) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowCollapsed(bool collapsed, Condition cond); //(not recommended) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFocus(); //(not recommended) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowPosByName(string name, Vector2 pos, Condition cond); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowSize2(string name, Vector2 size, Condition cond); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowCollapsed2(string name, bool collapsed, Condition cond); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetWindowFocus2(string name); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollX(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollY(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollMaxX(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetScrollMaxY(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollX(float scroll_x); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollY(float scroll_y); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollHere(float center_y_ratio = 0.5f); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetScrollFromPosY(float pos_y, float center_y_ratio = 0.5f); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetItemDefaultFocus(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetKeyboardFocusHere(int offset); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetStateStorage(ref Storage tree); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern Storage* igGetStateStorage(); - - // Parameters stacks (shared) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushFont(NativeFont* font); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopFont(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleColor(ColorTarget idx, Vector4 col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopStyleColor(int count); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleVar(StyleVar idx, float val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushStyleVarVec(StyleVar idx, Vector2 val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopStyleVar(int count); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeFont* igGetFont(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetFontSize(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetFontTexUvWhitePixel(Vector2* pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32(ColorTarget idx, float alpha_mul); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetColorU32Vec(Vector4* col); - - // Parameters stacks (current window) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushItemWidth(float item_width); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopItemWidth(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igCalcItemWidth(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushTextWrapPos(float wrap_pos_x); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopTextWrapPos(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushAllowKeyboardFocus(bool v); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopAllowKeyboardFocus(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushButtonRepeat(bool repeat); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopButtonRepeat(); - - // Layout - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSeparator(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSameLine(float local_pos_x, float spacing_w); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSpacing(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igDummy(Vector2* size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igIndent(float indent_w = 0.0f); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igUnindent(float indent_w = 0.0f); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igBeginGroup(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndGroup(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetCursorPos(Vector2* pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetCursorPosX(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetCursorPosY(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorPos(Vector2 local_pos); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorPosX(float x); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorPosY(float y); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetCursorStartPos(out Vector2 pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetCursorScreenPos(Vector2* pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCursorScreenPos(Vector2 pos); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igAlignTextToFramePadding(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetTextLineHeight(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetTextLineHeightWithSpacing(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetFrameHeight(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetFrameHeightWithSpacing(); - - // Columns - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igColumns(int count, string id, bool border); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igNextColumn(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetColumnIndex(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetColumnOffset(int column_index); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetColumnOffset(int column_index, float offset_x); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetColumnWidth(int column_index); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetColumnWidth(int column_index, float width); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetColumnsCount(); - - - // ID scopes - // If you are creating widgets in a loop you most likely want to push a unique identifier so ImGui can differentiate them - // You can also use "##extra" within your widget name to distinguish them from each others (see 'Programmer Guide') - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDStr(string str_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDStrRange(string str_begin, string str_end); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDPtr(void* ptr_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushIDInt(int int_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopID(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDStr(string str_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDStrRange(string str_begin, string str_end); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern uint igGetIDPtr(void* ptr_id); - - // Widgets - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igText(string fmt); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextColored(Vector4 col, string fmt); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextDisabled(string fmt); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextWrapped(string fmt); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTextUnformatted(byte* text, byte* text_end); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igLabelText(string label, string fmt); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igBullet(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igBulletText(string fmt); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igButton(string label, Vector2 size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSmallButton(string label); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInvisibleButton(string str_id, Vector2 size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igImage(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, Vector4 tint_col, Vector4 border_col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igImageButton(IntPtr user_texture_id, Vector2 size, Vector2 uv0, Vector2 uv1, int frame_padding, Vector4 bg_col, Vector4 tint_col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igCheckbox(string label, ref bool v); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igCheckboxFlags(string label, UIntPtr* flags, uint flags_value); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igRadioButtonBool(string label, bool active); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igRadioButton(string label, int* v, int v_button); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginCombo(string label, string preview_value, ComboFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndCombo(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igCombo(string label, ref int current_item, string[] items, int items_count, int height_in_items); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igCombo2(string label, ref int current_item, string items_separated_by_zeros, int height_in_items); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igCombo3(string label, ref int current_item, ItemSelectedCallback items_getter, IntPtr data, int items_count, int height_in_items); - - public delegate IntPtr ImGuiContextAllocationFunction(UIntPtr size); - public delegate void ImGuiContextFreeFunction(IntPtr ptr); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeContext* igCreateContext(ImGuiContextAllocationFunction malloc_fn, ImGuiContextFreeFunction free_fn); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igDestroyContext(NativeContext* ctx); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeContext* igGetCurrentContext(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetCurrentContext(NativeContext* ctx); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igColorButton(string desc_id, Vector4 col, ColorEditFlags flags, Vector2 size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igColorEdit3(string label, Vector3* col, ColorEditFlags flags = 0); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igColorEdit4(string label, Vector4* col, ColorEditFlags flags = 0); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igColorPicker3(string label, Vector3* col, ColorEditFlags flags = 0); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igColorPicker4(string label, Vector4* col, ColorEditFlags flags = 0, float* ref_col = null); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void SetColorEditOptions(ColorEditFlags flags); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPlotLines(string label, float* values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); - public delegate float ImGuiPlotHistogramValuesGetter(IntPtr data, int idx); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPlotLines2(string label, ImGuiPlotHistogramValuesGetter values_getter, void* data, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPlotHistogram(string label, float* values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size, int stride); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPlotHistogram2(string label, ImGuiPlotHistogramValuesGetter values_getter, void* data, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max, Vector2 graph_size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igProgressBar(float fraction, Vector2* size_arg, string overlay); - // Widgets: Sliders (tip: ctrl+click on a slider to input text) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderFloat(string label, float* v, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderFloat(string label, ref float v, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderInt(string label, ref int v, int v_min, int v_max, string display_format); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderInt2(string label, ref Int2 v, int v_min, int v_max, string display_format); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderInt3(string label, ref Int3 v, int v_min, int v_max, string display_format); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSliderInt4(string label, ref Int4 v, int v_min, int v_max, string display_format); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igVSliderFloat(string label, Vector2 size, float* v, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igVSliderInt(string label, Vector2 size, int* v, int v_min, int v_max, string display_format); - - // Widgets: Drags (tip: ctrl+click on a drag box to input text) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string display_format, float power); // If v_max >= v_max we have no bound - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string display_format, float power); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed = 1.0f, float v_min = 0.0f, float v_max = 0.0f, string display_format = "%.3f", string display_format_max = null, float power = 1.0f); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragInt(string label, ref int v, float v_speed, int v_min, int v_max, string display_format); // If v_max >= v_max we have no bound - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragInt2(string label, ref Int2 v, float v_speed, int v_min, int v_max, string display_format); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragInt3(string label, ref Int3 v, float v_speed, int v_min, int v_max, string display_format); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragInt4(string label, ref Int4 v, float v_speed, int v_min, int v_max, string display_format); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igDragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed = 1.0f, int v_min = 0, int v_max = 0, string display_format = "%.0f", string display_format_max = null); - - - // Widgets: Input - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputText(string label, IntPtr buffer, uint buf_size, InputTextFlags flags, TextEditCallback callback, void* user_data); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputTextMultiline(string label, IntPtr buffer, uint buf_size, Vector2 size, InputTextFlags flags, TextEditCallback callback, void* user_data); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputFloat(string label, float* v, float step, float step_fast, int decimal_precision, InputTextFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputFloat2(string label, Vector2 v, int decimal_precision, InputTextFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputFloat3(string label, Vector3 v, int decimal_precision, InputTextFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputFloat4(string label, Vector4 v, int decimal_precision, InputTextFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputInt(string label, int* v, int step, int step_fast, InputTextFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputInt2(string label, Int2 v, InputTextFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputInt3(string label, Int3 v, InputTextFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igInputInt4(string label, Int4 v, InputTextFlags extra_flags); - - // Widgets: Trees - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igTreeNode(string str_label_id); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igTreeNodeEx(string label, TreeNodeFlags flags = 0); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igTreeNodeStr(string str_id, string fmt); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igTreeNodePtr(void* ptr_id, string fmt); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePushStr(string str_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePushPtr(void* ptr_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreePop(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igTreeAdvanceToLabelPos(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetTreeNodeToLabelSpacing(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetNextTreeNodeOpen(bool opened, Condition cond); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igCollapsingHeader(string label, TreeNodeFlags flags = 0); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igCollapsingHeaderEx(string label, ref bool p_open, TreeNodeFlags flags = 0); - - // Widgets: Selectable / Lists - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSelectable(string label, bool selected, SelectableFlags flags, Vector2 size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSelectableEx(string label, ref bool p_selected, SelectableFlags flags, Vector2 size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igListBox(string label, int* current_item, char** items, int items_count, int height_in_items); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igListBox2(string label, ref int currentItem, ItemSelectedCallback items_getter, IntPtr data, int items_count, int height_in_items); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igListBoxHeader(string label, Vector2 size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igListBoxHeader2(string label, int items_count, int height_in_items); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igListBoxFooter(); - - // Widgets: Value() Helpers. Output single value in "name: value" format (tip: freely declare your own within the ImGui namespace!) - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueBool(string prefix, bool b); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueInt(string prefix, int v); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueUInt(string prefix, uint v); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igValueFloat(string prefix, float v, string float_format); - - // Tooltip - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetTooltip(string fmt); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igBeginTooltip(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndTooltip(); - - // Widgets: Menus - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginMainMenuBar(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndMainMenuBar(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginMenuBar(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndMenuBar(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginMenu(string label, bool enabled); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndMenu(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igMenuItem(string label, string shortcut, bool selected, bool enabled); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igMenuItemPtr(string label, string shortcut, bool* p_selected, bool enabled); - - // Popup - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igOpenPopup(string str_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igOpenPopupOnItemClick(string str_id, int mouse_button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginPopup(string str_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginPopupModal(string name, byte* p_opened, WindowFlags extra_flags); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginPopupContextItem(string str_id, int mouse_button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginPopupContextWindow(string str_id, int mouse_button, bool also_over_items); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginPopupContextVoid(string str_id, int mouse_button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndPopup(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern bool igIsPopupOpen(string str_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igCloseCurrentPopup(); - - // Logging: all text output from interface is redirected to tty/file/clipboard. Tree nodes are automatically opened. - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogToTTY(int max_depth); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogToFile(int max_depth, string filename); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogToClipboard(int max_depth); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogFinish(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igLogButtons(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - //public static extern void igLogText(string fmt, ...); - public static extern void igLogText(string fmt); - - // Drag-drop - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginDragDropSource(DragDropFlags flags, int mouse_button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igSetDragDropPayload(string type, void* data, uint size, Condition cond); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndDragDropSource(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginDragDropTarget(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativePayload* igAcceptDragDropPayload(string type, DragDropFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndDragDropTarget(); - - // Clipping - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igPopClipRect(); - - // Built-in Styles - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igStyleColorsClassic(NativeStyle* dst); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igStyleColorsDark(NativeStyle* dst); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igStyleColorsLight(NativeStyle* dst); - - // Utilities - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsItemHovered(HoveredFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsItemActive(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsItemClicked(int mouse_button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsItemVisible(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsAnyItemHovered(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsAnyItemActive(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetItemRectMin(out Vector2 pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetItemRectMax(out Vector2 pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetItemRectSize(out Vector2 pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetItemAllowOverlap(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsWindowHovered(HoveredFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsWindowFocused(FocusedFlags flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsRectVisible(Vector2 item_size); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsRectVisible2(Vector2* rect_min, Vector2* rect_max); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float igGetTime(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetFrameCount(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeDrawList* igGetOverlayDrawList(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern string igGetStyleColorName(ColorTarget idx); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igCalcItemRectClosestPoint(out Vector2 pOut, Vector2 pos, bool on_edge, float outward); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igCalcTextSize(out Vector2 pOut, char* text, char* text_end, [MarshalAs(UnmanagedType.I1)] bool hide_text_after_double_hash, float wrap_width); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igCalcListClipping(int items_count, float items_height, ref int out_items_display_start, ref int out_items_display_end); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igBeginChildFrame(uint id, Vector2 size, WindowFlags extra_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igEndChildFrame(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igColorConvertU32ToFloat4(Vector4* pOut, uint @in); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern uint igColorConvertFloat4ToU32(Vector4 @in); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetKeyIndex(int imgui_key); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsKeyDown(int user_key_index); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsKeyPressed(int user_key_index, bool repeat); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsKeyReleased(int user_key_index); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int igGetKeyPressedAmount(int key_index, float repeat_delay, float rate); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsMouseDown(int button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsMouseClicked(int button, [MarshalAs(UnmanagedType.I1)] bool repeat); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsMouseDoubleClicked(int button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsMouseReleased(int button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsAnyWindowHovered(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsMousePosValid(Vector2* mousePos); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsMouseHoveringRect(Vector2 pos_min, Vector2 pos_max, bool clip); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool igIsMouseDragging(int button, float lock_threshold); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetMousePos(out Vector2 pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetMousePosOnOpeningCurrentPopup(out Vector2 pOut); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igGetMouseDragDelta(out Vector2 pOut, int button, float lock_threshold); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igResetMouseDragDelta(int button); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern MouseCursorKind igGetMouseCursor(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetMouseCursor(MouseCursorKind type); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igCaptureKeyboardFromApp(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igCaptureMouseFromApp(); - - // Helpers functions to access functions pointers @in ImGui::GetIO() - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void* igMemAlloc(uint sz); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igMemFree(void* ptr); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern string igGetClipboardText(); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void igSetClipboardText(string text); - - // public state access - if you want to share ImGui state between modules (e.g. DLL) or allocate it yourself - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern string igGetVersion(); - /* - CIMGUI_API struct ImGuiContext* igCreateContext(void* (*malloc_fn)(size_t), void (*free_fn)(void*)); - CIMGUI_API void igDestroyContext(struct ImGuiContext* ctx); - CIMGUI_API struct ImGuiContext* igGetCurrentContext(); - CIMGUI_API void igSetCurrentContext(struct ImGuiContext* ctx); - */ - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontConfig_DefaultConstructor(FontConfig* config); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_GetTexDataAsRGBA32(NativeFontAtlas* atlas, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_GetTexDataAsAlpha8(NativeFontAtlas* atlas, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_SetTexID(NativeFontAtlas* atlas, void* id); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeFont* ImFontAtlas_AddFont(NativeFontAtlas* atlas, ref FontConfig font_cfg); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeFont* ImFontAtlas_AddFontDefault(NativeFontAtlas* atlas, IntPtr font_cfg); - public static NativeFont* ImFontAtlas_AddFontDefault(NativeFontAtlas* atlas) { return ImFontAtlas_AddFontDefault(atlas, IntPtr.Zero); } - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeFont* ImFontAtlas_AddFontFromFileTTF(NativeFontAtlas* atlas, string filename, float size_pixels, IntPtr font_cfg, char* glyph_ranges); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeFont* ImFontAtlas_AddFontFromMemoryTTF(NativeFontAtlas* atlas, void* ttf_data, int ttf_size, float size_pixels, IntPtr font_cfg, char* glyph_ranges); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeFont* ImFontAtlas_AddFontFromMemoryCompressedTTF(NativeFontAtlas* atlas, void* compressed_ttf_data, int compressed_ttf_size, float size_pixels, FontConfig* font_cfg, char* glyph_ranges); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern NativeFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(NativeFontAtlas* atlas, string compressed_ttf_data_base85, float size_pixels, FontConfig* font_cfg, char* glyph_ranges); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_ClearTexData(NativeFontAtlas* atlas); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImFontAtlas_Clear(NativeFontAtlas* atlas); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern char* ImFontAtlas_GetGlyphRangesDefault(NativeFontAtlas* atlas); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern char* ImFontAtlas_GetGlyphRangesKorean(NativeFontAtlas* atlas); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern char* ImFontAtlas_GetGlyphRangesJapanese(NativeFontAtlas* atlas); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern char* ImFontAtlas_GetGlyphRangesChinese(NativeFontAtlas* atlas); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern char* ImFontAtlas_GetGlyphRangesCyrillic(NativeFontAtlas* atlas); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern char* ImFontAtlas_GetGlyphRangesThai(NativeFontAtlas* atlas); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiIO_AddInputCharacter(ushort c); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiIO_AddInputCharactersUTF8(string utf8_chars); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiIO_ClearInputCharacters(); - - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int ImDrawList_GetVertexBufferSize(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern DrawVert* ImDrawList_GetVertexPtr(NativeDrawList* list, int n); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int ImDrawList_GetIndexBufferSize(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern ushort* ImDrawList_GetIndexPtr(NativeDrawList* list, int n); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int ImDrawList_GetCmdSize(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern DrawCmd* ImDrawList_GetCmdPtr(NativeDrawList* list, int n); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawData_DeIndexAllBuffers(DrawData* drawData); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawData_ScaleClipRects(DrawData* drawData, Vector2 sc); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_Clear(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ClearFreeMemory(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PushClipRect(NativeDrawList* list, Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PushClipRectFullScreen(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PopClipRect(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PushTextureID(NativeDrawList* list, void* texture_id); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PopTextureID(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddLine(NativeDrawList* list, Vector2 a, Vector2 b, uint col, float thickness); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRect(NativeDrawList* list, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags, float thickness); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRectFilled(NativeDrawList* list, Vector2 a, Vector2 b, uint col, float rounding, int rounding_corners_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddRectFilledMultiColor(NativeDrawList* list, Vector2 a, Vector2 b, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddQuad(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col, float thickness); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddQuadFilled(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, Vector2 d, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddTriangle(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, uint col, float thickness); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddTriangleFilled(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddCircle(NativeDrawList* list, Vector2 centre, float radius, uint col, int num_segments, float thickness); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddCircleFilled(NativeDrawList* list, Vector2 centre, float radius, uint col, int num_segments); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddText(NativeDrawList* list, Vector2 pos, uint col, byte* text_begin, byte* text_end); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddTextExt(NativeDrawList* list, NativeFont* font, float font_size, Vector2 pos, uint col, byte* text_begin, byte* text_end, float wrap_width, Vector4* cpu_fine_clip_rect); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddImage(NativeDrawList* list, void* user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddImageQuad(NativeDrawList* list, void* user_texture_id, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddImageRounded(NativeDrawList* list, void* user_texture_id, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col, float rounding, int rounding_corners); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddPolyline(NativeDrawList* list, Vector2* points, int num_points, uint col, byte closed, float thickness); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddConvexPolyFilled(NativeDrawList* list, Vector2* points, int num_points, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddBezierCurve(NativeDrawList* list, Vector2 pos0, Vector2 cp0, Vector2 cp1, Vector2 pos1, uint col, float thickness, int num_segments); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathClear(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathLineTo(NativeDrawList* list, Vector2 pos); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathLineToMergeDuplicate(NativeDrawList* list, Vector2 pos); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathFillConvex(NativeDrawList* list, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathStroke(NativeDrawList* list, uint col, byte closed, float thickness); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathArcTo(NativeDrawList* list, Vector2 centre, float radius, float a_min, float a_max, int num_segments); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathArcToFast(NativeDrawList* list, Vector2 centre, float radius, int a_min_of_12, int a_max_of_12); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathBezierCurveTo(NativeDrawList* list, Vector2 p1, Vector2 p2, Vector2 p3, int num_segments); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PathRect(NativeDrawList* list, Vector2 rect_min, Vector2 rect_max, float rounding, int rounding_corners_flags); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ChannelsSplit(NativeDrawList* list, int channels_count); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ChannelsMerge(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_ChannelsSetCurrent(NativeDrawList* list, int channel_index); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddCallback(NativeDrawList* list, ImDrawCallback callback, void* callback_data); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_AddDrawCmd(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimReserve(NativeDrawList* list, int idx_count, int vtx_count); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimRect(NativeDrawList* list, Vector2 a, Vector2 b, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimRectUV(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimQuadUV(NativeDrawList* list, Vector2 a, Vector2 b, Vector2 c, Vector2 d, Vector2 uv_a, Vector2 uv_b, Vector2 uv_c, Vector2 uv_d, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimVtx(NativeDrawList* list, Vector2 pos, Vector2 uv, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimWriteVtx(NativeDrawList* list, Vector2 pos, Vector2 uv, uint col); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_PrimWriteIdx(NativeDrawList* list, ushort idx); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_UpdateClipRect(NativeDrawList* list); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImDrawList_UpdateTextureID(NativeDrawList* list); - - // List Clipper - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiListClipper_Begin(void* clipper, int count, float items_height); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiListClipper_End(void* clipper); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - [return: MarshalAs(UnmanagedType.I1)] - public static extern bool ImGuiListClipper_Step(void* clipper); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int ImGuiListClipper_GetDisplayStart(void* clipper); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int ImGuiListClipper_GetDisplayEnd(void* clipper); - - // ImGuiTextFilter - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextFilter_Init(void* filter, char* default_filter); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextFilter_Clear(void* filter); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern bool ImGuiTextFilter_Draw(void* filter, char* label, float width); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern bool ImGuiTextFilter_PassFilter(void* filter, char* text, char* text_end); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern bool ImGuiTextFilter_IsActive(void* filter); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextFilter_Build(void* filter); - - // ImGuiTextEditCallbackData - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextEditCallbackData_DeleteChars(void* data, int pos, int bytes_count); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiTextEditCallbackData_InsertChars(void* data, int pos, char* text, char* text_end); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern bool ImGuiTextEditCallbackData_HasSelection(void* data); - - // ImGuiStorage - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_Init(void* storage); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_Clear(void* storage); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int ImGuiStorage_GetInt(void* storage, uint key, int default_val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetInt(void* storage, uint key, int val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern bool ImGuiStorage_GetBool(void* storage, uint key, bool default_val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetBool(void* storage, uint key, bool val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float ImGuiStorage_GetFloat(void* storage, uint key, float default_val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetFloat(void* storage, uint key, float val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void* ImGuiStorage_GetVoidPtr(void* storage, uint key); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetVoidPtr(void* storage, uint key, void* val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern int* ImGuiStorage_GetIntRef(void* storage, uint key, int default_val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern bool* ImGuiStorage_GetBoolRef(void* storage, uint key, bool default_val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern float* ImGuiStorage_GetFloatRef(void* storage, uint key, float default_val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void** ImGuiStorage_GetVoidPtrRef(void* storage, uint key, void* default_val); - [DllImport(cimguiLib, CallingConvention = CallingConvention.Cdecl)] - public static extern void ImGuiStorage_SetAllInt(void* storage, int val); - } - - public delegate bool ItemSelectedCallback(IntPtr data, int index, string out_text); - public unsafe delegate void ImDrawCallback(DrawList* parent_list, DrawCmd* cmd); -} diff --git a/src/ImGui.NET/ImGuiSizeCallback.cs b/src/ImGui.NET/ImGuiSizeCallback.cs new file mode 100644 index 0000000..b70ebca --- /dev/null +++ b/src/ImGui.NET/ImGuiSizeCallback.cs @@ -0,0 +1,4 @@ +namespace ImGuiNET +{ + public unsafe delegate void ImGuiSizeCallback(ImGuiSizeCallbackData* data); +} diff --git a/src/ImGui.NET/ImGuiTextEditCallback.cs b/src/ImGui.NET/ImGuiTextEditCallback.cs new file mode 100644 index 0000000..04e5500 --- /dev/null +++ b/src/ImGui.NET/ImGuiTextEditCallback.cs @@ -0,0 +1,4 @@ +namespace ImGuiNET +{ + public unsafe delegate int ImGuiInputTextCallback(ImGuiInputTextCallbackData* data); +} diff --git a/src/ImGui.NET/ImRect.cs b/src/ImGui.NET/ImRect.cs deleted file mode 100644 index e6aa639..0000000 --- a/src/ImGui.NET/ImRect.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Numerics; - -namespace ImGuiNET -{ - public struct ImRect - { - public Vector2 Min; - public Vector2 Max; - - public ImRect(Vector2 min, Vector2 max) - { - Min = min; - Max = max; - } - - public bool Contains(Vector2 p) - { - return p.X >= Min.X && p.Y >= Min.Y && p.X < Max.X && p.Y < Max.Y; - } - - public Vector2 GetSize() - { - return Max - Min; - } - } -} diff --git a/src/ImGui.NET/ImVector.cs b/src/ImGui.NET/ImVector.cs index d2a3faa..76411b8 100644 --- a/src/ImGui.NET/ImVector.cs +++ b/src/ImGui.NET/ImVector.cs @@ -1,13 +1,75 @@ -using System.Runtime.InteropServices; +using System; +using System.Runtime.CompilerServices; namespace ImGuiNET { - [StructLayout(LayoutKind.Sequential)] public unsafe struct ImVector { - public int Size; - public int Capacity; - ///T* Data - public void* Data; + public readonly int Size; + public readonly int Capacity; + public readonly IntPtr Data; + + public ref T Ref(int index) + { + return ref Unsafe.AsRef((byte*)Data + index * Unsafe.SizeOf()); + } + + public IntPtr Address(int index) + { + return (IntPtr)((byte*)Data + index * Unsafe.SizeOf()); + } + } + + public unsafe struct ImVector + { + public readonly int Size; + public readonly int Capacity; + public readonly IntPtr Data; + + public ImVector(ImVector vector) + { + Size = vector.Size; + Capacity = vector.Capacity; + Data = vector.Data; + } + + public ImVector(int size, int capacity, IntPtr data) + { + Size = size; + Capacity = capacity; + Data = data; + } + + public ref T this[int index] => ref Unsafe.AsRef((byte*)Data + index * Unsafe.SizeOf()); + } + + public unsafe struct ImPtrVector + { + public readonly int Size; + public readonly int Capacity; + public readonly IntPtr Data; + private readonly int _stride; + + public ImPtrVector(ImVector vector, int stride) + : this(vector.Size, vector.Capacity, vector.Data, stride) + { } + + public ImPtrVector(int size, int capacity, IntPtr data, int stride) + { + Size = size; + Capacity = capacity; + Data = data; + _stride = stride; + } + + public T this[int index] + { + get + { + byte* address = (byte*)Data + index * _stride; + T ret = Unsafe.Read(&address); + return ret; + } + } } } diff --git a/src/ImGui.NET/InputTextFlags.cs b/src/ImGui.NET/InputTextFlags.cs deleted file mode 100644 index 7715ed2..0000000 --- a/src/ImGui.NET/InputTextFlags.cs +++ /dev/null @@ -1,82 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Flags for ImGui.InputText() - /// - public enum InputTextFlags : int - { - Default = 0, - /// - /// Allow 0123456789.+-*/ - /// - CharsDecimal = 1 << 0, - /// - /// Allow 0123456789ABCDEFabcdef - /// - CharsHexadecimal = 1 << 1, - /// - /// Turn a..z into A..Z - /// - CharsUppercase = 1 << 2, - /// - /// Filter out spaces, tabs - /// - CharsNoBlank = 1 << 3, - /// - /// Select entire text when first taking mouse focus - /// - AutoSelectAll = 1 << 4, - /// - /// Return 'true' when Enter is pressed (as opposed to when the value was modified) - /// - EnterReturnsTrue = 1 << 5, - /// - /// Call user function on pressing TAB (for completion handling) - /// - CallbackCompletion = 1 << 6, - /// - /// Call user function on pressing Up/Down arrows (for history handling) - /// - CallbackHistory = 1 << 7, - /// - /// Call user function every time - /// - CallbackAlways = 1 << 8, - /// - /// Call user function to filter character. Modify data->EventChar to replace/filter input, or return 1 to discard character. - /// - CallbackCharFilter = 1 << 9, - /// - /// Pressing TAB input a '\t' character into the text field - /// - AllowTabInput = 1 << 10, - /// - /// In multi-line mode, allow exiting edition by pressing Enter. Ctrl+Enter to add new line (by default adds new lines with Enter). - /// - CtrlEnterForNewLine = 1 << 11, - /// - /// Disable following the cursor horizontally - /// - NoHorizontalScroll = 1 << 12, - /// - /// Insert mode - /// - AlwaysInsertMode = 1 << 13, - /// - /// Read-only mode - /// - ReadOnly = 1 << 14, - /// - /// Password mode, display all characters as '*' - /// - Password, - /// - /// Disable undo/redo. Note that input text owns the text data while active, if you want to provide your own undo/redo stack you need e.g. to call ClearActiveID(). - /// - NoUndoRedo, - /// - /// For internal use by InputTextMultiline() - /// - Multiline = 1 << 20 - } -} diff --git a/src/ImGui.NET/IntStructs.cs b/src/ImGui.NET/IntStructs.cs deleted file mode 100644 index 263cf58..0000000 --- a/src/ImGui.NET/IntStructs.cs +++ /dev/null @@ -1,22 +0,0 @@ -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public struct Int2 - { - public readonly int X, Y; - } - - [StructLayout(LayoutKind.Sequential)] - public struct Int3 - { - public readonly int X, Y, Z; - } - - [StructLayout(LayoutKind.Sequential)] - public struct Int4 - { - public readonly int X, Y, Z, W; - } -} diff --git a/src/ImGui.NET/MouseCursorKind.cs b/src/ImGui.NET/MouseCursorKind.cs deleted file mode 100644 index c9cf067..0000000 --- a/src/ImGui.NET/MouseCursorKind.cs +++ /dev/null @@ -1,34 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Enumeration for GetMouseCursor() - /// - public enum MouseCursorKind - { - Arrow = 0, - /// - /// When hovering over InputText, etc. - /// - TextInput, - /// - /// Unused - /// - Move, - /// - /// Unused - /// - ResizeNS, - /// - /// When hovering over a column - /// - ResizeEW, - /// - /// Unused - /// - ResizeNESW, - /// - /// When hovering over the bottom-right corner of a window - /// - ResizeNWSE, - } -} diff --git a/src/ImGui.NET/NativeContext.cs b/src/ImGui.NET/NativeContext.cs deleted file mode 100644 index de8e5fd..0000000 --- a/src/ImGui.NET/NativeContext.cs +++ /dev/null @@ -1,142 +0,0 @@ -using System; -using System.Numerics; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativeContext - { - public byte Initialized; - public NativeIO IO; - public NativeStyle Style; - public NativeFont* Font; // (Shortcut) == FontStack.empty() ? IO.Font : FontStack.back() - public float FontSize; // (Shortcut) == FontBaseSize * g.CurrentWindow->FontWindowScale == window->FontSize(). Text height for current window. - public float FontBaseSize; // (Shortcut) == IO.FontGlobalScale * Font->Scale * Font->FontSize. Base text height. - public NativeDrawListSharedData DrawListSharedData; - - public float Time; - public int FrameCount; - public int FrameCountEnded; - public int FrameCountRendered; - public ImVector Windows; - public ImVector WindowsSortBuffer; - public ImVector CurrentWindowStack; - public Storage WindowsById; - public int WindowsActiveCount; - public NativeWindow* CurrentWindow; // Being drawn into - public NativeWindow* NavWindow; // Nav/focused window for navigation - public NativeWindow* HoveredWindow; // Will catch mouse inputs - public NativeWindow* HoveredRootWindow; // Will catch mouse inputs (for focus/move only) - public uint HoveredId; // Hovered widget - public byte HoveredIdAllowOverlap; - public uint HoveredIdPreviousFrame; - public float HoveredIdTimer; - public uint ActiveId; // Active widget - public uint ActiveIdPreviousFrame; - public float ActiveIdTimer; - public byte ActiveIdIsAlive; // Active widget has been seen this frame - public byte ActiveIdIsJustActivated; // Set at the time of activation for one frame - public byte ActiveIdAllowOverlap; // Active widget allows another widget to steal active id (generally for overlapping widgets, but not always) - public Vector2 ActiveIdClickOffset; // Clicked offset from upper-left corner, if applicable (currently only set by ButtonBehavior) - public NativeWindow* ActiveIdWindow; - public NativeWindow* MovingWindow; // Track the child window we clicked on to move a window. - public uint MovingWindowMoveId; // == MovingWindow->MoveId - public ImVector ColorModifiers; // Stack for PushStyleColor()/PopStyleColor() - public ImVector StyleModifiers; // Stack for PushStyleVar()/PopStyleVar() - public ImVector FontStack; // Stack for PushFont()/PopFont() - public ImVector OpenPopupStack; // Which popups are open (persistent) - public ImVector CurrentPopupStack; // Which level of BeginPopup() we are in (reset every frame) - - // Storage for SetNexWindow** and SetNextTreeNode*** functions - public Vector2 SetNextWindowPosVal; - public Vector2 SetNextWindowPosPivot; - public Vector2 SetNextWindowSizeVal; - public Vector2 SetNextWindowContentSizeVal; - public byte SetNextWindowCollapsedVal; - public Condition SetNextWindowPosCond; - public Condition SetNextWindowSizeCond; - public Condition SetNextWindowContentSizeCond; - public Condition SetNextWindowCollapsedCond; - public ImRect SetNextWindowSizeConstraintRect; // Valid if 'SetNextWindowSizeConstraint' is true - public IntPtr SetNextWindowSizeConstraintCallback; - public void* SetNextWindowSizeConstraintCallbackUserData; - public byte SetNextWindowSizeConstraint; - public byte SetNextWindowFocus; - public byte SetNextTreeNodeOpenVal; - public Condition SetNextTreeNodeOpenCond; - - // Render - public DrawData RenderDrawData; // Main ImDrawData instance to pass render information to the user - public ImVector RenderDrawLists0; - public ImVector RenderDrawLists1; - public ImVector RenderDrawLists2; - public float ModalWindowDarkeningRatio; - public DrawList OverlayDrawList; // Optional software render of mouse cursors, if io.MouseDrawCursor is set + a few debug overlays - public int MouseCursor; - public fixed byte MouseCursorData[7 * (4 + 8 + 8 + 16 + 16)]; - - // Drag and Drop - public byte DragDropActive; - public int DragDropSourceFlags; - public int DragDropMouseButton; - public NativePayload DragDropPayload; - public ImRect DragDropTargetRect; - public uint DragDropTargetId; - public float DragDropAcceptIdCurrRectSurface; - public uint DragDropAcceptIdCurr; // Target item id (set at the time of accepting the payload) - public uint DragDropAcceptIdPrev; // Target item id from previous frame (we need to store this to allow for overlapping drag and drop targets) - public int DragDropAcceptFrameCount; // Last time a target expressed a desire to accept the source - public ImVector DragDropPayloadBufHeap; // We don't expose the ImVector<> directly - public fixed byte DragDropPayloadBufLocal[8]; - - // Widget state - public ImGuiTextEditState InputTextState; - public NativeFont InputTextPasswordFont; - public uint ScalarAsInputTextId; // Temporary text input when CTRL+clicking on a slider, etc. - public int ColorEditOptions; // Store user options for color edit widgets - public Vector4 ColorPickerRef; - public float DragCurrentValue; // Currently dragged value, always float, not rounded by end-user precision settings - public Vector2 DragLastMouseDelta; - public float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio - public float DragSpeedScaleSlow; - public float DragSpeedScaleFast; - public Vector2 ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage? - public int TooltipOverrideCount; - public ImVector PrivateClipboard; // If no custom clipboard handler is defined - public Vector2 OsImePosRequest, OsImePosSet; // Cursor position request & last passed to the OS Input Method Editor - - // Settings - public float SettingsDirtyTimer; // Save .ini Settings on disk when time reaches zero - public ImVector SettingsWindows; // .ini settings for NativeWindow - public ImVector SettingsHandlers; // List of .ini settings handlers - - // Logging - public byte LogEnabled; - public void* LogFile; // If != NULL log to stdout/ file - public void* LogClipboard; // Else log to clipboard. This is pointer so our GImGui static constructor doesn't call heap allocators. - public int LogStartDepth; - public int LogAutoExpandMaxDepth; - - // Misc - public fixed float FramerateSecPerFrame[120]; // calculate estimate of framerate for user - public int FramerateSecPerFrameIdx; - public float FramerateSecPerFrameAccum; - public int WantCaptureMouseNextFrame; // explicit capture via CaptureInputs() sets those flags - public int WantCaptureKeyboardNextFrame; - public int WantTextInputNextFrame; - public fixed byte TempBuffer[1024 * 3 + 1]; // temporary text buffer - } - - public unsafe struct NativeDrawListSharedData - { - public Vector2 TexUvWhitePixel; // UV of white pixel in the atlas - public NativeFont* Font; // Current/default font (optional, for simplified AddText overload) - public float FontSize; // Current/default font size (optional, for simplified AddText overload) - public float CurveTessellationTol; - public Vector4 ClipRectFullscreen; // Value for PushClipRectFullscreen() - - // Const data - public fixed float CircleVtx12[12 * 2]; - } -} diff --git a/src/ImGui.NET/NativeDrawContext.cs b/src/ImGui.NET/NativeDrawContext.cs deleted file mode 100644 index 477524b..0000000 --- a/src/ImGui.NET/NativeDrawContext.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System.Numerics; - -namespace ImGuiNET -{ - // Transient per-window data, reset at the beginning of the frame - public unsafe struct NativeDrawContext - { - public Vector2 CursorPos; - public Vector2 CursorPosPrevLine; - public Vector2 CursorStartPos; - public Vector2 CursorMaxPos; // Implicitly calculate the size of our contents, always extending. Saved into window->SizeContents at the end of the frame - public float CurrentLineHeight; - public float CurrentLineTextBaseOffset; - public float PrevLineHeight; - public float PrevLineTextBaseOffset; - public float LogLinePosY; - public int TreeDepth; - public uint LastItemId; - public ImRect LastItemRect; - public byte LastItemHoveredAndUsable; // Item rectangle is hovered, and its window is currently interactable with (not blocked by a popup preventing access to the window) - public byte LastItemHoveredRect; // Item rectangle is hovered, but its window may or not be currently interactable with (might be blocked by a popup preventing access to the window) - public byte MenuBarAppending; - public float MenuBarOffsetX; - public ImVector ChildWindows; - public Storage StateStorage; - public int LayoutType; - - // We store the current settings outside of the vectors to increase memory locality (reduce cache misses). The vectors are rarely modified. Also it allows us to not heap allocate for short-lived windows which are not using those settings. - public float ItemWidth; // == ItemWidthStack.back(). 0.0: default, >0.0: width in pixels, <0.0: align xx pixels to the right of window - public float TextWrapPos; // == TextWrapPosStack.back() [empty == -1.0f] - public byte AllowKeyboardFocus; // == AllowKeyboardFocusStack.back() [empty == true] - public byte ButtonRepeat; // == ButtonRepeatStack.back() [empty == false] - public ImVector ItemWidthStack; - public ImVector TextWrapPosStack; - public ImVector AllowKeyboardFocusStack; - public ImVector ButtonRepeatStack; - public ImVector GroupStack; - public ColorEditFlags ColorEditMode; - public fixed int StackSizesBackup[6]; // Store size of various stacks for asserting - - public float IndentX; // Indentation / start position from left of window (increased by TreePush/TreePop, etc.) - public float GroupOffsetX; - public float ColumnsOffsetX; // Offset to the current column (if ColumnsCurrent > 0). - public int ColumnsCurrent; - public int ColumnsCount; - public float ColumnsMinX; - public float ColumnsMaxX; - public float ColumnsStartPosY; - public float ColumnsCellMinY; - public float ColumnsCellMaxY; - public byte ColumnsShowBorders; - public uint ColumnsSetId; - public ImVector ColumnsData; - } -} diff --git a/src/ImGui.NET/NativeIO.cs b/src/ImGui.NET/NativeIO.cs deleted file mode 100644 index f0cf507..0000000 --- a/src/ImGui.NET/NativeIO.cs +++ /dev/null @@ -1,354 +0,0 @@ -using System; -using System.Numerics; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativeIO - { - //------------------------------------------------------------------ - // Settings (fill once) - //------------------------------------------------------------------ - - /// - /// Display size, in pixels. For clamping windows positions. - /// Default value: [unset] - /// - public Vector2 DisplaySize; - /// - /// Time elapsed since last frame, in seconds. - /// Default value: 1.0f / 10.0f. - /// - public float DeltaTime; - /// - /// Maximum time between saving positions/sizes to .ini file, in seconds. - /// Default value: 5.0f. - /// - public float IniSavingRate; - /// - /// Path to .ini file. NULL to disable .ini saving. - /// Default value: "imgui.ini" - /// - public IntPtr IniFilename; - /// - /// Path to .log file (default parameter to ImGui::LogToFile when no file is specified). - /// Default value: "imgui_log.txt" - /// - public IntPtr LogFilename; - /// - /// Time for a double-click, in seconds. - /// Default value: 0.30f. - /// - public float MouseDoubleClickTime; - /// - /// Distance threshold to stay in to validate a double-click, in pixels. - /// Default Value: 6.0f. - /// - public float MouseDoubleClickMaxDist; - /// - /// Distance threshold before considering we are dragging. - /// Default Value: 6.0f. - /// - public float MouseDragThreshold; - - /// - /// Map of indices into the KeysDown[512] entries array. - /// Default values: [unset] - /// - public fixed int KeyMap[(int)GuiKey.Count]; - /// - /// When holding a key/button, time before it starts repeating, in seconds. (for actions where 'repeat' is active). - /// Default value: 0.250f. - /// - public float KeyRepeatDelay; - /// - /// When holding a key/button, rate at which it repeats, in seconds. - /// Default value: 0.020f. - /// - public float KeyRepeatRate; - /// - /// Store your own data for retrieval by callbacks. - /// Default value: IntPtr.Zero. - /// - public IntPtr UserData; - - /// - /// Load and assemble one or more fonts into a single tightly packed texture. Output to Fonts array. - /// Default value: [auto] - /// - public NativeFontAtlas* FontAtlas; - /// - /// Global scale all fonts. - /// Default value: 1.0f. - /// - public float FontGlobalScale; - /// - /// Allow user scaling text of individual window with CTRL+Wheel. - /// Default value: false. - /// - public byte FontAllowUserScaling; - /// - /// Font to use on NewFrame(). Use NULL to uses Fonts->Fonts[0]. - /// Default value: null. - /// - public NativeFont* FontDefault; - /// - /// For retina display or other situations where window coordinates are different from framebuffer coordinates. - /// User storage only, presently not used by ImGui. - /// Default value: (1.0f, 1.0f). - /// - public Vector2 DisplayFramebufferScale; - /// - /// If you use DisplaySize as a virtual space larger than your screen, set DisplayVisibleMin/Max to the visible area. - /// Default value: (0.0f, 0.0f) - /// - public Vector2 DisplayVisibleMin; - /// - /// If the values are the same, we defaults to Min=0.0f) and Max=DisplaySize. - /// Default value: (0.0f, 0.0f). - /// - public Vector2 DisplayVisibleMax; - /// - /// OS X style: Text editing cursor movement using Alt instead of Ctrl, - /// Shortcuts using Cmd/Super instead of Ctrl, - /// Line/Text Start and End using Cmd+Arrows instead of Home/End, - /// Double click selects by word instead of selecting whole text, - /// Multi-selection in lists uses Cmd/Super instead of Ctrl - /// Default value: True on OSX; false otherwise. - /// - public byte OptMacOSXBehaviors; - /// - /// Enable blinking cursor, for users who consider it annoying. - /// Default value: true. - /// - public byte OptCursorBlink; - - //------------------------------------------------------------------ - // User Functions - //------------------------------------------------------------------ - - /// - /// Rendering function, will be called in Render(). - /// Alternatively you can keep this to NULL and call GetDrawData() after Render() to get the same pointer. - /// - public IntPtr RenderDrawListsFn; - - /// - /// Optional: access OS clipboard - /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) - /// - public IntPtr GetClipboardTextFn; - /// - /// Optional: access OS clipboard - /// (default to use native Win32 clipboard on Windows, otherwise uses a private clipboard. Override to access OS clipboard on other architectures) - /// - public IntPtr SetClipboardTextFn; - public IntPtr ClipboardUserData; - - /// - /// Optional: override memory allocations. MemFreeFn() may be called with a NULL pointer. - /// (default to posix malloc/free) - /// - public IntPtr MemAllocFn; - /// - /// Optional: override memory allocations. MemFreeFn() may be called with a NULL pointer. - /// (default to posix malloc/free) - /// - public IntPtr MemFreeFn; - - /// - /// Optional: notify OS Input Method Editor of the screen position of your cursor for text input position (e.g. when using Japanese/Chinese IME in Windows) - /// (default to use native imm32 api on Windows) - /// - public IntPtr ImeSetInputScreenPosFn; - /// - /// (Windows) Set this to your HWND to get automatic IME cursor positioning. - /// - public IntPtr ImeWindowHandle; - - //------------------------------------------------------------------ - // Input - Fill before calling NewFrame() - //------------------------------------------------------------------ - - /// - /// Mouse position, in pixels (set to -1,-1 if no mouse / on another screen, etc.). - /// - public Vector2 MousePos; - /// - /// Mouse buttons: left, right, middle + extras. - /// ImGui itself mostly only uses left button (BeginPopupContext** are using right button). - /// Others buttons allows us to track if the mouse is being used by your application + available to user as a convenience via IsMouse** API. - /// - public fixed byte MouseDown[5]; - /// - /// Mouse wheel: 1 unit scrolls about 5 lines text. - /// - public float MouseWheel; - /// - /// Request ImGui to draw a mouse cursor for you (if you are on a platform without a mouse cursor). - /// - public byte MouseDrawCursor; - /// - /// Keyboard modifier pressed: Control. - /// - public byte KeyCtrl; - /// - /// Keyboard modifier pressed: Shift - /// - public byte KeyShift; - /// - /// Keyboard modifier pressed: Alt - /// - public byte KeyAlt; - /// - /// Keyboard modifier pressed: Cmd/Super/Windows - /// - public byte KeySuper; - /// - /// Keyboard keys that are pressed (in whatever storage order you naturally have access to keyboard data) - /// - public fixed byte KeysDown[512]; - /// - /// List of characters input (translated by user from keypress+keyboard state). - /// Fill using AddInputCharacter() helper. - /// - public fixed ushort InputCharacters[16 + 1]; - - //------------------------------------------------------------------ - // Output - Retrieve after calling NewFrame(), you can use them to discard inputs or hide them from the rest of your application - //------------------------------------------------------------------ - - /// - /// Mouse is hovering a window or widget is active (= ImGui will use your mouse input). - /// - public byte WantCaptureMouse; - /// - /// Widget is active (= ImGui will use your keyboard input). - /// - public byte WantCaptureKeyboard; - /// - /// Some text input widget is active, which will read input characters from the InputCharacters array. - /// - public byte WantTextInput; - /// - /// MousePos has been altered, back-end should reposition mouse on next frame. Set only when 'NavMovesMouse=true'. - /// - public byte WantMoveMouse; - /// - /// Framerate estimation, in frame per second. Rolling average estimation based on IO.DeltaTime over 120 frames. - /// - public float Framerate; - /// - /// Number of active memory allocations. - /// - public int MetricsAllocs; - /// - /// Vertices output during last call to Render(). - /// - public int MetricsRenderVertices; - /// - /// Indices output during last call to Render() = number of triangles * 3 - /// - public int MetricsRenderIndices; - /// - /// Number of visible windows (exclude child windows) - /// - public int MetricsActiveWindows; - /// - /// Mouse delta. Note that this is zero if either current or previous position are negative, - /// so a disappearing/reappearing mouse won't have a huge delta for one frame. - /// - public Vector2 MouseDelta; - - //------------------------------------------------------------------ - // [Internal] ImGui will maintain those fields for you - //------------------------------------------------------------------ - - /// - /// Previous mouse position - /// - public Vector2 MousePosPrev; - /// - /// Position at time of clicking - /// - public Vector2 MouseClickedPos0; - /// - /// Position at time of clicking - /// - public Vector2 MouseClickedPos1; - /// - /// Position at time of clicking - /// - public Vector2 MouseClickedPos2; - /// - /// Position at time of clicking - /// - public Vector2 MouseClickedPos3; - /// - /// Position at time of clicking - /// - public Vector2 MouseClickedPos4; - /// - /// Time of last click (used to figure out double-click) - /// - public fixed float MouseClickedTime[5]; - /// - /// Mouse button went from !Down to Down - /// - public fixed byte MouseClicked[5]; - /// - /// Has mouse button been double-clicked? - /// - public fixed byte MouseDoubleClicked[5]; - /// - /// Mouse button went from Down to !Down - /// - public fixed byte MouseReleased[5]; - /// - /// Track if button was clicked inside a window. - /// We don't request mouse capture from the application if click started outside ImGui bounds. - /// - public fixed byte MouseDownOwned[5]; - /// - /// Duration the mouse button has been down (0.0f == just clicked). - /// - public fixed float MouseDownDuration[5]; - /// - /// Previous time the mouse button has been down - /// - public fixed float MouseDownDurationPrev[5]; - /// - /// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - /// - public Vector2 MouseDragMaxDistanceAbs0; - /// - /// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - /// - public Vector2 MouseDragMaxDistanceAbs1; - /// - /// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - /// - public Vector2 MouseDragMaxDistanceAbs2; - /// - /// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - /// - public Vector2 MouseDragMaxDistanceAbs3; - /// - /// Maximum distance, absolute, on each axis, of how much mouse has traveled from the clicking point - /// - public Vector2 MouseDragMaxDistanceAbs4; - /// - /// Squared maximum distance of how much mouse has traveled from the click point - /// - public fixed float MouseDragMaxDistanceSqr[5]; - /// - /// Duration the keyboard key has been down (0.0f == just pressed) - /// - public fixed float KeysDownDuration[512]; - /// - /// Previous duration the key has been down - /// - public fixed float KeysDownDurationPrev[512]; - } -} \ No newline at end of file diff --git a/src/ImGui.NET/NativePayload.cs b/src/ImGui.NET/NativePayload.cs deleted file mode 100644 index 972e298..0000000 --- a/src/ImGui.NET/NativePayload.cs +++ /dev/null @@ -1,19 +0,0 @@ -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativePayload - { - public void* Data; - public int DataSize; - - // Internal - private uint SourceId; - private uint SourceParentId; - private int DataFrameCount; - private fixed byte DataType[8 + 1]; - private byte Preview; - private byte Delivery; - } -} diff --git a/src/ImGui.NET/NativeSimpleColumns.cs b/src/ImGui.NET/NativeSimpleColumns.cs deleted file mode 100644 index 8690ad4..0000000 --- a/src/ImGui.NET/NativeSimpleColumns.cs +++ /dev/null @@ -1,10 +0,0 @@ -namespace ImGuiNET -{ - public unsafe struct NativeSimpleColumns - { - public int Count; - public float Spacing; - public float Width, NextWidth; - public fixed float Pos[8], NextWidths[8]; - }; -} diff --git a/src/ImGui.NET/NativeStyle.cs b/src/ImGui.NET/NativeStyle.cs deleted file mode 100644 index a0cdcb0..0000000 --- a/src/ImGui.NET/NativeStyle.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System.Runtime.InteropServices; -using System.Numerics; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativeStyle - { - /// - /// Global alpha applies to everything in ImGui. - /// - public float Alpha; - /// - /// Padding within a window. - /// - public Vector2 WindowPadding; - /// - /// Radius of window corners rounding. Set to 0.0f to have rectangular windows. - /// - public float WindowRounding; - /// - /// Thickness of border around windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly) - /// - public float WindowBorderSize; - /// - /// Minimum window size. - /// - public Vector2 WindowMinSize; - /// - /// Alignment for title bar text. - /// - public Vector2 WindowTitleAlign; - /// - /// Radius of child window corners rounding. Set to 0.0f to have rectangular windows. - /// - public float ChildRounding; - /// - /// Thickness of border around child windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly) - /// - public float ChildBorderSize; - /// - /// Radius of popup window corners rounding. - /// - public float PopupRounding; - /// - /// Thickness of border around popup windows. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly) - /// - public float PopupBorderSize; - /// - /// Padding within a framed rectangle (used by most widgets). - /// - public Vector2 FramePadding; - /// - /// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). - /// - public float FrameRounding; - /// - /// Thickness of border around frames. Generally set to 0.0f or 1.0f. (Other values are not well tested and more CPU/GPU costly) - /// - public float FrameBorderSize; - /// - /// Horizontal and vertical spacing between widgets/lines. - /// - public Vector2 ItemSpacing; - /// - /// Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label). - /// - public Vector2 ItemInnerSpacing; - /// - /// Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! - /// - public Vector2 TouchExtraPadding; - /// - /// Horizontal indentation when e.g. entering a tree node - /// - public float IndentSpacing; - /// - /// Minimum horizontal spacing between two columns - /// - public float ColumnsMinSpacing; - /// - /// Width of the vertical scrollbar, Height of the horizontal scrollbar - /// - public float ScrollbarSize; - /// - /// Radius of grab corners for scrollbar - /// - public float ScrollbarRounding; - /// - /// Minimum width/height of a grab box for slider/scrollbar - /// - public float GrabMinSize; - /// - /// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. - /// - public float GrabRounding; - /// - /// Alignment of button text when button is larger than text. Defaults to (0.5f,0.5f) for horizontally+vertically centered. - /// - public Vector2 ButtonTextAlign; - /// - /// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows. - /// - public Vector2 DisplayWindowPadding; - /// - /// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows. - /// - public Vector2 DisplaySafeAreaPadding; - /// - /// Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU. - /// - public byte AntiAliasedLines; - /// - /// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) - /// - public byte AntiAliasedFill; - /// - /// Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. - /// - public float CurveTessellationTol; - public fixed float Colors[(int)ColorTarget.Count * 4]; - }; -} diff --git a/src/ImGui.NET/NativeTestEditState.cs b/src/ImGui.NET/NativeTestEditState.cs deleted file mode 100644 index 996a9e4..0000000 --- a/src/ImGui.NET/NativeTestEditState.cs +++ /dev/null @@ -1,72 +0,0 @@ -namespace ImGuiNET -{ - public unsafe struct ImGuiTextEditState - { - public uint Id; // widget id owning the text state - public ImVector Text; // edit buffer, we need to persist but can't guarantee the persistence of the user-provided buffer. so we copy into own buffer. - public ImVector InitialText; // backup of end-user buffer at the time of focus (in UTF-8, unaltered) - public ImVector TempTextBuffer; - public int CurLenA, CurLenW; // we need to maintain our buffer length in both UTF-8 and wchar format. - public int BufSizeA; // end-user buffer size - public float ScrollX; - public STB_TexteditState StbState; - public float CursorAnim; - public byte CursorFollow; - public byte SelectedAllMouseLock; - } - - public unsafe struct STB_TexteditState - { - ///////////////////// - // - // public data - // - - public int cursor; - // position of the text cursor within the string - - public int select_start; // selection start point - public int select_end; - // selection start and end point in characters; if equal, no selection. - // note that start may be less than or greater than end (e.g. when - // dragging the mouse, start is where the initial click was, and you - // can drag in either direction) - - public byte insert_mode; - // each textfield keeps its own insert mode state. to keep an app-wide - // insert mode, copy this value in/out of the app state - - ///////////////////// - // - // private data - // - public byte cursor_at_end_of_line; // not implemented yet - public byte initialized; - public byte has_preferred_x; - public byte single_line; - public byte padding1, padding2, padding3; - public float preferred_x; // this determines where the cursor up/down tries to seek to along x - public StbUndoState undostate; - } - - public unsafe struct StbUndoState - { - const int STB_TEXTEDIT_UNDOSTATECOUNT = 99; - const int STB_TEXTEDIT_UNDOCHARCOUNT = 999; - - // private data - public fixed byte undo_rec[STB_TEXTEDIT_UNDOSTATECOUNT * (4 + 2 + 2)]; - public fixed int undo_char[STB_TEXTEDIT_UNDOCHARCOUNT]; - public short undo_point, redo_point; - public short undo_char_point, redo_char_point; - } - - public struct StbUndoRecord - { - // private data - public int where; - public short insert_length; - public short delete_length; - public short char_storage; - } -} diff --git a/src/ImGui.NET/NativeWindow.cs b/src/ImGui.NET/NativeWindow.cs deleted file mode 100644 index 5d091cb..0000000 --- a/src/ImGui.NET/NativeWindow.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Numerics; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct NativeWindow - { - public byte* Name; - public uint ID; // == ImHash(Name) - public WindowFlags Flags; // See enum ImGuiWindowFlags_ - public Vector2 PosFloat; - public Vector2 Pos; // Position rounded-up to nearest pixel - public Vector2 Size; // Current size (==SizeFull or collapsed title bar size) - public Vector2 SizeFull; // Size when non collapsed - public Vector2 SizeFullAtLastBegin; // Copy of SizeFull at the end of Begin. This is the reference value we'll use on the next frame to decide if we need scrollbars. - public Vector2 SizeContents; // Size of contents (== extents reach of the drawing cursor) from previous frame. Include decoration, window title, border, menu, etc. - public Vector2 SizeContentsExplicit; // Size of contents explicitly set by the user via SetNextWindowContentSize() - public ImRect ContentsRegionRect; // Maximum visible content position in window coordinates. ~~ (SizeContentsExplicit ? SizeContentsExplicit : Size - ScrollbarSizes) - CursorStartPos, per axis - public Vector2 WindowPadding; // Window padding at the time of begin. - public float WindowRounding; // Window rounding at the time of begin. - public float WindowBorderSize; // Window border size at the time of begin. - public uint MoveId; // == window->GetID("#MOVE") - public Vector2 Scroll; - public Vector2 ScrollTarget; // target scroll position. stored as cursor position with scrolling canceled out, so the highest point is always 0.0f. (FLT_MAX for no change) - public Vector2 ScrollTargetCenterRatio; // 0.0f = scroll so that target position is at top, 0.5f = scroll so that target position is centered - public byte ScrollbarX, ScrollbarY; - public Vector2 ScrollbarSizes; - public byte Active; // Set to true on Begin() - public byte WasActive; - public byte WriteAccessed; // Set to true when any widget access the current window - public byte Collapsed; // Set when collapsing window to become only title-bar - public byte SkipItems; // Set when items can safely be all clipped (e.g. window not visible or collapsed) - public byte Appearing; // Set during the frame where the window is appearing (or re-appearing) - public byte CloseButton; // Set when the window has a close button (p_open != NULL) - public int BeginOrderWithinParent; // Order within immediate parent window, if we are a child window. Otherwise 0. - public int BeginOrderWithinContext; // Order within entire imgui context. This is mostly used for debugging submission order related issues. - public int BeginCount; // Number of Begin() during the current frame (generally 0 or 1, 1+ if appending via multiple Begin/End pairs) - public uint PopupId; // ID in the popup stack when this window is used as a popup/menu (because we use generic Name/ID for recycling) - public int AutoFitFramesX, AutoFitFramesY; - public byte AutoFitOnlyGrows; - public int AutoFitChildAxises; - public int AutoPosLastDirection; - public int HiddenFrames; - public Condition SetWindowPosAllowFlags; // store condition flags for next SetWindowPos() call. - public Condition SetWindowSizeAllowFlags; // store condition flags for next SetWindowSize() call. - public Condition SetWindowCollapsedAllowFlags; // store condition flags for next SetWindowCollapsed() call. - public Vector2 SetWindowPosVal; // store window position when using a non-zero Pivot (position set needs to be processed when we know the window size) - public Vector2 SetWindowPosPivot; // store window pivot for positioning. Vector2(0,0) when positioning from top-left corner; Vector2(0.5f,0.5f) for centering; Vector2(1,1) for bottom right. - - public NativeDrawContext DC; // Temporary per-window data, reset at the beginning of the frame - public ImVector IDStack; // ID stack. ID are hashes seeded with the value at the top of the stack - public ImRect ClipRect; // = DrawList->clip_rect_stack.back(). Scissoring / clipping rectangle. x1, y1, x2, y2. - public ImRect WindowRectClipped; // = WindowRect just after setup in Begin(). == window->Rect() for root window. - public ImRect InnerRect; - public int LastFrameActive; - public float ItemWidthDefault; - public NativeSimpleColumns MenuColumns; // Simplified columns storage for menu items - public Storage StateStorage; - public ImVector ColumnsStorage; - public float FontWindowScale; // Scale multiplier per-window - public NativeDrawList* DrawList; - public NativeWindow* ParentWindow; // If we are a child _or_ popup window, this is pointing to our parent. Otherwise NULL. - public NativeWindow* RootWindow; // Generally point to ourself. If we are a child window, this is pointing to the first non-child parent window. - public NativeWindow* RootNonPopupWindow; // Generally point to ourself. Used to display TitleBgActive color and for selecting which window to use for NavWindowing - - // Navigation / Focus - int FocusIdxAllCounter; // Start at -1 and increase as assigned via FocusItemRegister() - int FocusIdxTabCounter; // (same, but only count widgets which you can Tab through) - int FocusIdxAllRequestCurrent; // Item being requested for focus - int FocusIdxTabRequestCurrent; // Tab-able item being requested for focus - int FocusIdxAllRequestNext; // Item being requested for focus, for next update (relies on layout to be stable between the frame pressing TAB and the next frame) - int FocusIdxTabRequestNext; // " - } -} diff --git a/src/ImGui.NET/NullTerminatedString.cs b/src/ImGui.NET/NullTerminatedString.cs new file mode 100644 index 0000000..d54bae2 --- /dev/null +++ b/src/ImGui.NET/NullTerminatedString.cs @@ -0,0 +1,29 @@ +using System.Text; + +namespace ImGuiNET +{ + public unsafe struct NullTerminatedString + { + public readonly byte* Data; + + public NullTerminatedString(byte* data) + { + Data = data; + } + + public override string ToString() + { + int length = 0; + byte* ptr = Data; + while (*ptr != 0) + { + length += 1; + ptr += 1; + } + + return Encoding.ASCII.GetString(Data, length); + } + + public static implicit operator string(NullTerminatedString nts) => nts.ToString(); + } +} diff --git a/src/ImGui.NET/Pair.cs b/src/ImGui.NET/Pair.cs new file mode 100644 index 0000000..23e0332 --- /dev/null +++ b/src/ImGui.NET/Pair.cs @@ -0,0 +1,22 @@ +using System; +using System.Runtime.InteropServices; + +namespace ImGuiNET +{ + public struct Pair + { + public uint Key; + public UnionValue Value; + } + + [StructLayout(LayoutKind.Explicit)] + public struct UnionValue + { + [FieldOffset(0)] + public int ValueI32; + [FieldOffset(0)] + public float ValueF32; + [FieldOffset(0)] + public IntPtr ValuePtr; + } +} diff --git a/src/ImGui.NET/Payload.cs b/src/ImGui.NET/Payload.cs deleted file mode 100644 index fb220c8..0000000 --- a/src/ImGui.NET/Payload.cs +++ /dev/null @@ -1,13 +0,0 @@ -using System; - -namespace ImGuiNET -{ - public unsafe struct Payload - { - public readonly NativePayload* NativePtr; - public Payload(NativePayload* ptr) => NativePtr = ptr; - - public IntPtr Data => (IntPtr)NativePtr->Data; - public int DataSize => NativePtr->DataSize; - } -} diff --git a/src/ImGui.NET/RangeAccessor.cs b/src/ImGui.NET/RangeAccessor.cs new file mode 100644 index 0000000..cf766c7 --- /dev/null +++ b/src/ImGui.NET/RangeAccessor.cs @@ -0,0 +1,68 @@ +using System; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe struct RangeAccessor where T : struct + { + private static readonly int s_sizeOfT = Unsafe.SizeOf(); + + public readonly void* Data; + public readonly int Count; + + public RangeAccessor(IntPtr data, int count) : this(data.ToPointer(), count) { } + public RangeAccessor(void* data, int count) + { + Data = data; + Count = count; + } + + public ref T this[int index] + { + get + { + if (index < 0 || index >= Count) + { + throw new IndexOutOfRangeException(); + } + + return ref Unsafe.AsRef((byte*)Data + s_sizeOfT * index); + } + } + } + + public unsafe struct RangePtrAccessor where T : struct + { + public readonly void* Data; + public readonly int Count; + + public RangePtrAccessor(IntPtr data, int count) : this(data.ToPointer(), count) { } + public RangePtrAccessor(void* data, int count) + { + Data = data; + Count = count; + } + + public T this[int index] + { + get + { + if (index < 0 || index >= Count) + { + throw new IndexOutOfRangeException(); + } + + return Unsafe.Read((byte*)Data + sizeof(void*) * index); + } + } + } + + public static class RangeAccessorExtensions + { + public static unsafe string GetStringASCII(this RangeAccessor stringAccessor) + { + return Encoding.ASCII.GetString((byte*)stringAccessor.Data, stringAccessor.Count); + } + } +} diff --git a/src/ImGui.NET/SelectableFlags.cs b/src/ImGui.NET/SelectableFlags.cs deleted file mode 100644 index 8b41dca..0000000 --- a/src/ImGui.NET/SelectableFlags.cs +++ /dev/null @@ -1,19 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Flags for ImGui::Selectable() - /// - public enum SelectableFlags - { - // Default: 0 - Default = 0, - /// - /// Clicking this doesn't close parent popup window - /// - DontClosePopups = 1 << 0, - /// - /// Selectable frame can span all columns (text will still fit in current column) - /// - SpanAllColumns = 1 << 1 - } -} diff --git a/src/ImGui.NET/Storage.cs b/src/ImGui.NET/Storage.cs deleted file mode 100644 index c6cefe6..0000000 --- a/src/ImGui.NET/Storage.cs +++ /dev/null @@ -1,50 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct Storage - { - /// - /// A vector of Storage.Pair values. - /// - public ImVector Data; - - [StructLayout(LayoutKind.Sequential)] - public unsafe struct Pair - { - public uint Key; - private OverlappedDataItem _overlappedData; - - public float FloatData - { - get { return _overlappedData.FloatData; } - set { _overlappedData.FloatData = value; } - } - - public int IntData - { - get { return _overlappedData.IntData; } - set { _overlappedData.IntData = value; } - } - - public IntPtr PtrData - { - get { return _overlappedData.PtrData; } - set { _overlappedData.PtrData = value; } - } - } - - [StructLayout(LayoutKind.Explicit)] - private unsafe struct OverlappedDataItem - { - [FieldOffset(0)] - public float FloatData; - [FieldOffset(0)] - public int IntData; - [FieldOffset(0)] - public IntPtr PtrData; - } - } -} diff --git a/src/ImGui.NET/Style.cs b/src/ImGui.NET/Style.cs deleted file mode 100644 index 0a2be46..0000000 --- a/src/ImGui.NET/Style.cs +++ /dev/null @@ -1,232 +0,0 @@ -using System.Numerics; - -namespace ImGuiNET -{ - public unsafe class Style - { - public readonly NativeStyle* NativePtr; - - public Style(NativeStyle* style) - { - NativePtr = style; - } - - /// - /// Global alpha applies to everything in ImGui. - /// - public float Alpha - { - get { return NativePtr->Alpha; } - set { NativePtr->Alpha = value; } - } - - /// - /// Padding within a window. - /// - public Vector2 WindowPadding - { - get { return NativePtr->WindowPadding; } - set { NativePtr->WindowPadding = value; } - } - - /// - /// Minimum window size. - /// - public Vector2 WindowMinSize - { - get { return NativePtr->WindowMinSize; } - set { NativePtr->WindowMinSize = value; } - } - - /// - /// Radius of window corners rounding. Set to 0.0f to have rectangular windows. - /// - public float WindowRounding - { - get { return NativePtr->WindowRounding; } - set { NativePtr->WindowRounding = value; } - } - - /// - /// Alignment for title bar text. - /// - public Vector2 WindowTitleAlign - { - get { return NativePtr->WindowTitleAlign; } - set { NativePtr->WindowTitleAlign = value; } - } - - /// - /// Radius of child window corners rounding. Set to 0.0f to have rectangular windows. - /// - public float ChildWindowRounding - { - get { return NativePtr->ChildRounding; } - set { NativePtr->ChildRounding = value; } - } - - /// - /// Padding within a framed rectangle (used by most widgets). - /// - public Vector2 FramePadding - { - get { return NativePtr->FramePadding; } - set { NativePtr->FramePadding = value; } - } - - /// - /// Radius of frame corners rounding. Set to 0.0f to have rectangular frame (used by most widgets). - /// - public float FrameRounding - { - get { return NativePtr->FrameRounding; } - set { NativePtr->FrameRounding = value; } - } - - /// - /// Horizontal and vertical spacing between widgets/lines. - /// - public Vector2 ItemSpacing - { - get { return NativePtr->ItemSpacing; } - set { NativePtr->ItemSpacing = value; } - } - - /// - /// Horizontal and vertical spacing between within elements of a composed widget (e.g. a slider and its label). - /// - public Vector2 ItemInnerSpacing - { - get { return NativePtr->ItemInnerSpacing; } - set { NativePtr->ItemInnerSpacing = value; } - } - - /// - /// Expand reactive bounding box for touch-based system where touch position is not accurate enough. Unfortunately we don't sort widgets so priority on overlap will always be given to the first widget. So don't grow this too much! - /// - public Vector2 TouchExtraPadding - { - get { return NativePtr->TouchExtraPadding; } - set { NativePtr->TouchExtraPadding = value; } - } - - /// - /// Horizontal indentation when e.g. entering a tree node - /// - public float IndentSpacing - { - get { return NativePtr->IndentSpacing; } - set { NativePtr->IndentSpacing = value; } - } - - /// - /// Minimum horizontal spacing between two columns - /// - public float ColumnsMinSpacing - { - get { return NativePtr->ColumnsMinSpacing; } - set { NativePtr->ColumnsMinSpacing = value; } - } - - /// - /// Width of the vertical scrollbar, Height of the horizontal scrollbar - /// - public float ScrollbarSize - { - get { return NativePtr->ScrollbarSize; } - set { NativePtr->ScrollbarSize = value; } - } - - /// - /// Radius of grab corners for scrollbar - /// - public float ScrollbarRounding - { - get { return NativePtr->ScrollbarRounding; } - set { NativePtr->ScrollbarRounding = value; } - } - - /// - /// Minimum width/height of a grab box for slider/scrollbar - /// - public float GrabMinSize - { - get { return NativePtr->GrabMinSize; } - set { NativePtr->GrabMinSize = value; } - } - - /// - /// Radius of grabs corners rounding. Set to 0.0f to have rectangular slider grabs. - /// - public float GrabRounding - { - get { return NativePtr->GrabRounding; } - set { NativePtr->GrabRounding = value; } - } - - /// - /// Window positions are clamped to be visible within the display area by at least this amount. Only covers regular windows. - /// - public Vector2 DisplayWindowPadding - { - get { return NativePtr->DisplayWindowPadding; } - set { NativePtr->DisplayWindowPadding = value; } - } - - /// - /// If you cannot see the edge of your screen (e.g. on a TV) increase the safe area padding. Covers popups/tooltips as well regular windows. - /// - public Vector2 DisplaySafeAreaPadding - { - get { return NativePtr->DisplaySafeAreaPadding; } - set { NativePtr->DisplaySafeAreaPadding = value; } - } - - /// - /// Enable anti-aliasing on lines/borders. Disable if you are really tight on CPU/GPU. - /// - public bool AntiAliasedLines - { - get { return NativePtr->AntiAliasedLines == 1; } - set { NativePtr->AntiAliasedLines = value ? (byte)1 : (byte)0; } - } - - /// - /// Enable anti-aliasing on filled shapes (rounded rectangles, circles, etc.) - /// - public bool AntiAliasedFill - { - get { return NativePtr->AntiAliasedFill == 1; } - set { NativePtr->AntiAliasedFill = value ? (byte)1 : (byte)0; } - } - - /// - /// Tessellation tolerance. Decrease for highly tessellated curves (higher quality, more polygons), increase to reduce quality. - /// - public float CurveTessellationTolerance - { - get { return NativePtr->CurveTessellationTol; } - set { NativePtr->CurveTessellationTol = value; } - } - - /// - /// Gets the current style color for the given UI element type. - /// - /// The type of UI element. - /// The element's color as currently configured. - public Vector4 GetColor(ColorTarget target) => *(Vector4*)&NativePtr->Colors[(int)target * 4]; - - /// - /// Sets the style color for a particular UI element type. - /// - /// The type of UI element. - /// The new color. - public void SetColor(ColorTarget target, Vector4 value) - { - NativePtr->Colors[(int)target * 4 + 0] = value.X; - NativePtr->Colors[(int)target * 4 + 1] = value.Y; - NativePtr->Colors[(int)target * 4 + 2] = value.Z; - NativePtr->Colors[(int)target * 4 + 3] = value.W; - } - } -} diff --git a/src/ImGui.NET/StyleVar.cs b/src/ImGui.NET/StyleVar.cs deleted file mode 100644 index 23e5498..0000000 --- a/src/ImGui.NET/StyleVar.cs +++ /dev/null @@ -1,78 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Enumeration for PushStyleVar() / PopStyleVar() - /// NB: the enum only refers to fields of ImGuiStyle() which makes sense to be pushed/poped in UI code. Feel free to add others. - /// - public enum StyleVar - { - /// - /// float - /// - Alpha, - /// - /// System.Numerics.Vector2 - /// - WindowPadding, - /// - /// float - /// - WindowRounding, - /// - /// float - /// - WindowBorderSize, - /// - /// System.Numerics.Vector2 - /// - WindowMinSize, - /// - /// float - /// - ChildRounding, - /// - /// float - /// - ChildBorderSize, - /// - /// float - /// - PopupRounding, - /// - /// float - /// - PopupBorderSize, - /// - /// System.Numerics.Vector2 - /// - FramePadding, - /// - /// float - /// - FrameRounding, - /// - /// float - /// - FrameBorderSize, - /// - /// System.Numerics.Vector2 - /// - ItemSpacing, - /// - /// System.Numerics.Vector2 - /// - ItemInnerSpacing, - /// - /// float - /// - IndentSpacing, - /// - /// float - /// - GrabMinSize, - /// - /// System.Numerics.Vector2 - /// - ButtonTextAlign, - }; -} diff --git a/src/ImGui.NET/TextEditCallback.cs b/src/ImGui.NET/TextEditCallback.cs deleted file mode 100644 index 4d35c88..0000000 --- a/src/ImGui.NET/TextEditCallback.cs +++ /dev/null @@ -1,4 +0,0 @@ -namespace ImGuiNET -{ - public unsafe delegate int TextEditCallback(TextEditCallbackData* data); -} diff --git a/src/ImGui.NET/TextEditCallbackData.cs b/src/ImGui.NET/TextEditCallbackData.cs deleted file mode 100644 index b7306d4..0000000 --- a/src/ImGui.NET/TextEditCallbackData.cs +++ /dev/null @@ -1,67 +0,0 @@ -using System; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - [StructLayout(LayoutKind.Sequential)] - public unsafe struct TextEditCallbackData - { - /// - /// One of InputTextFlags.*. Read-only. - /// - public InputTextFlags EventFlag; - /// - /// What user passed to InputText(). Read-only. - /// - public InputTextFlags Flags; - /// - /// What user passed to InputText(). Read-only. - /// - public IntPtr UserData; - private byte _ReadOnly; - /// - /// Read-only mode. Read-only. - /// - public bool ReadOnly { get { return _ReadOnly == 1; } } - - // CharFilter event: - /// - /// Character input. Read-write (replace character or set to zero). - /// - public ushort EventChar; - - // Completion,History,Always events: - /// - /// Key pressed (Up/Down/Tab). Read-only. - /// - public GuiKey EventKey; - /// - /// Current text. Read-write (pointed data only). char* in native code. - /// - public IntPtr Buf; - - public int BufTextLen; - /// - /// Read-only. - /// - public int BufSize; - /// - /// Must set if you modify Buf directly. Write-only. - /// - public byte BufDirty; - /// - /// Read-write. - /// - public int CursorPos; - /// - /// Read-write. (Equal to SelectionEnd when no selection) - /// - public int SelectionStart; - /// - /// Read-write. - /// - public int SelectionEnd; - - public bool HasSelection() { return SelectionStart != SelectionEnd; } - } -} diff --git a/src/ImGui.NET/TextInputBuffer.cs b/src/ImGui.NET/TextInputBuffer.cs deleted file mode 100644 index a5a2fb7..0000000 --- a/src/ImGui.NET/TextInputBuffer.cs +++ /dev/null @@ -1,120 +0,0 @@ -using System; -using System.Diagnostics; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -namespace ImGuiNET -{ - public class TextInputBuffer : IDisposable - { - private uint _length; - - public IntPtr Buffer { get; private set; } - - public uint Length - { - get - { - return _length; - } - set - { - if (value > int.MaxValue) - { - throw new ArgumentOutOfRangeException("Length cannot be greater that Int32.MaxValue."); - } - - Resize((int)value); - } - } - - public TextInputBuffer(int length) - { - if (length < 0) - { - throw new ArgumentOutOfRangeException(nameof(length)); - } - - CreateBuffer(length); - } - - public TextInputBuffer(string initialText) - { - Buffer = Marshal.StringToHGlobalAnsi(initialText); - Length = (uint)initialText.Length; - } - - private unsafe void Resize(int newSize) - { - IntPtr newBuffer = Marshal.AllocHGlobal(newSize); - Unsafe.CopyBlock(newBuffer.ToPointer(), Buffer.ToPointer(), Length); - Marshal.FreeHGlobal(Buffer); - Buffer = newBuffer; - _length = (uint)newSize; - } - - private unsafe void CreateBuffer(int size) - { - Buffer = Marshal.AllocHGlobal(size); - Length = (uint)size; - ClearData(); - } - - public unsafe void ClearData() - { - byte* ptr = (byte*)Buffer.ToPointer(); - for (int i = 0; i < Length; i++) - { - ptr[i] = 0; - } - } - - public void Dispose() - { - if (Buffer != IntPtr.Zero) - { - FreeNativeBuffer(); - } - } - - private void FreeNativeBuffer() - { - Marshal.FreeHGlobal(Buffer); - Buffer = IntPtr.Zero; - _length = 0; - } - - public string StringValue - { - get - { - return Marshal.PtrToStringAnsi(Buffer); - } - set - { - Debug.Assert(value != null); - if (value.Length > Length) // Doesn't fit into current buffer - { - FreeNativeBuffer(); - Buffer = Marshal.StringToHGlobalAnsi(value); - _length = (uint)value.Length; - } - else // Fits in current buffer, just copy data in. - { - IntPtr tempNativeString = Marshal.StringToHGlobalAnsi(value); - uint bytesToCopy = (uint)Math.Min(Length, value.Length); - unsafe - { - Unsafe.CopyBlock(Buffer.ToPointer(), tempNativeString.ToPointer(), bytesToCopy); - byte* endOfData = (byte*)Buffer.ToPointer() + bytesToCopy; - uint bytesToClear = _length - bytesToCopy; - Unsafe.InitBlock(endOfData, 0, bytesToClear); - } - Marshal.FreeHGlobal(tempNativeString); - } - } - } - - public override string ToString() => StringValue; - } -} diff --git a/src/ImGui.NET/TreeNodeFlags.cs b/src/ImGui.NET/TreeNodeFlags.cs deleted file mode 100644 index 5040b99..0000000 --- a/src/ImGui.NET/TreeNodeFlags.cs +++ /dev/null @@ -1,54 +0,0 @@ -using System; - -namespace ImGuiNET -{ - [Flags] - public enum TreeNodeFlags : int - { - /// - /// Draw as selected - /// - Selected = 1 << 0, - /// - /// Full colored frame (e.g. for CollapsingHeader) - /// - Framed = 1 << 1, - /// - /// Hit testing to allow subsequent widgets to overlap this one - /// - AllowItemOverlap = 1 << 2, - /// - /// Don't do a TreePush() when open (e.g. for CollapsingHeader) = no extra indent nor pushing on ID stack - /// - NoTreePushOnOpen = 1 << 3, - /// - /// Don't automatically and temporarily open node when Logging is active (by default logging will automatically open tree nodes) - /// - NoAutoOpenOnLog = 1 << 4, - /// - /// Default node to be open - /// - DefaultOpen = 1 << 5, - /// - /// Need double-click to open node - /// - OpenOnDoubleClick = 1 << 6, - /// - /// Only open when clicking on the arrow part. If ImGuiTreeNodeFlags_OpenOnDoubleClick is also set, single-click arrow or double-click all box to open. - /// - OpenOnArrow = 1 << 7, - /// - /// No collapsing, no arrow (use as a convenience for leaf nodes). - /// - Leaf = 1 << 8, - /// - /// Display a bullet instead of arrow - /// - Bullet = 1 << 9, - /// - /// Use FramePadding (even for an unframed text node) to vertically align text baseline - /// - FramePadding = 1 << 10, - CollapsingHeader = Framed | NoAutoOpenOnLog - }; -} diff --git a/src/ImGui.NET/Util.cs b/src/ImGui.NET/Util.cs new file mode 100644 index 0000000..470d480 --- /dev/null +++ b/src/ImGui.NET/Util.cs @@ -0,0 +1,18 @@ +using System.Text; + +namespace ImGuiNET +{ + internal static class Util + { + public static unsafe string StringFromPtr(byte* ptr) + { + int characters = 0; + while (ptr[characters] != 0) + { + characters++; + } + + return Encoding.UTF8.GetString(ptr, characters); + } + } +} diff --git a/src/ImGui.NET/WindowFlags.cs b/src/ImGui.NET/WindowFlags.cs deleted file mode 100644 index c04fe02..0000000 --- a/src/ImGui.NET/WindowFlags.cs +++ /dev/null @@ -1,80 +0,0 @@ -namespace ImGuiNET -{ - /// - /// Flags for ImGui::Begin() - /// - public enum WindowFlags : int - { - Default = 0, - /// - /// Disable title-bar - /// - NoTitleBar = 1 << 0, - /// - /// Disable user resizing with the lower-right grip - /// - NoResize = 1 << 1, - /// - /// Disable user moving the window - /// - NoMove = 1 << 2, - /// - /// Disable scrollbar (window can still scroll with mouse or programatically) - /// - NoScrollbar = 1 << 3, - /// - /// Disable user scrolling with mouse wheel - /// - NoScrollWithMouse = 1 << 4, - /// - /// Disable user collapsing window by double-clicking on it - /// - NoCollapse = 1 << 5, - /// - /// Resize every window to its content every frame - /// - AlwaysAutoResize = 1 << 6, - /// - /// Never load/save settings in .ini file - /// - NoSavedSettings = 1 << 8, - /// - /// Disable catching mouse or keyboard inputs - /// - NoInputs = 1 << 9, - /// - /// Has a menu-bar - /// - MenuBar = 1 << 10, - /// - /// Enable horizontal scrollbar (off by default). - /// You need to use SetNextWindowContentSize(ImVec2(width,0.0f)); prior to calling Begin() to specify width. - /// - HorizontalScrollbar = 1 << 11, - /// - /// Disable taking focus when transitioning from hidden to visible state - /// - NoFocusOnAppearing = 1 << 12, - /// - /// Disable bringing window to front when taking focus (e.g. clicking on it or programatically giving it focus) - /// - NoBringToFrontOnFocus = 1 << 13, - /// - /// Always show vertical scrollbar (even if ContentSize.y < Size.y) - /// - AlwaysVerticalScrollbar = 1 << 14, - /// - /// Always show horizontal scrollbar (even if ContentSize.x < Size.x) - /// - AlwaysHorizontalScrollbar = 1 << 15, - /// - /// Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient) - /// - AlwaysUseWindowPadding = 1 << 16, - /// - /// Enable resize from any corners and borders. Your back-end needs to honor the different values of io.MouseCursor set by imgui. - /// - ResizeFromAnySide = 1 << 17, - - } -}