commit c398732ecd29dc0a757deb8af8c35116eb26ccb7 Author: cosmonaut Date: Thu Mar 3 17:20:00 2022 -0800 initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b57d8dd --- /dev/null +++ b/.gitignore @@ -0,0 +1,347 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. +## +## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore + +moonlibs/ + +# User-specific files +*.rsuser +*.suo +*.user +*.userosscache +*.sln.docstates + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +[Aa][Rr][Mm]/ +[Aa][Rr][Mm]64/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ +[Ll]ogs/ + +# Visual Studio 2015/2017 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# Visual Studio 2017 auto generated files +Generated\ Files/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUnit +*.VisualState.xml +TestResult.xml +nunit-*.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# Benchmark Results +BenchmarkDotNet.Artifacts/ + +# .NET Core +project.lock.json +project.fragment.lock.json +artifacts/ + +# StyleCop +StyleCopReport.xml + +# Files built by Visual Studio +*_i.c +*_p.c +*_h.h +*.ilk +*.meta +*.obj +*.iobj +*.pch +*.pdb +*.ipdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*_wpftmp.csproj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# Visual Studio Trace Files +*.e2e + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# AxoCover is a Code Coverage Tool +.axoCover/* +!.axoCover/settings.json + +# Coverlet is a free, cross platform Code Coverage Tool +coverage*[.json, .xml, .info] + +# Visual Studio code coverage results +*.coverage +*.coveragexml + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# Note: Comment the next line if you want to checkin your web deploy settings, +# but database connection strings (with potential passwords) will be unencrypted +*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# NuGet Symbol Packages +*.snupkg +# The packages folder can be ignored because of Package Restore +**/[Pp]ackages/* +# except build/, which is used as an MSBuild target. +!**/[Pp]ackages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/[Pp]ackages/repositories.config +# NuGet v3's project.json files produces more ignorable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt +*.appx +*.appxbundle +*.appxupload + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!?*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +orleans.codegen.cs + +# Including strong name files can present a security risk +# (https://github.com/github/gitignore/pull/2483#issue-259490424) +#*.snk + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm +ServiceFabricBackup/ +*.rptproj.bak + +# SQL Server files +*.mdf +*.ldf +*.ndf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings +*.rptproj.rsuser +*- [Bb]ackup.rdl +*- [Bb]ackup ([0-9]).rdl +*- [Bb]ackup ([0-9][0-9]).rdl + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat +node_modules/ + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) +*.vbw + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# CodeRush personal settings +.cr/personal + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc + +# Cake - Uncomment if you are using it +# tools/** +# !tools/packages.config + +# Tabs Studio +*.tss + +# Telerik's JustMock configuration file +*.jmconfig + +# BizTalk build output +*.btp.cs +*.btm.cs +*.odx.cs +*.xsd.cs + +# OpenCover UI analysis results +OpenCover/ + +# Azure Stream Analytics local run output +ASALocalRun/ + +# MSBuild Binary and Structured Log +*.binlog + +# NVidia Nsight GPU debugger configuration file +*.nvuser + +# MFractors (Xamarin productivity tool) working folder +.mfractor/ + +# Local History for Visual Studio +.localhistory/ + +# BeatPulse healthcheck temp database +healthchecksdb + +# Backup folder for Package Reference Convert tool in Visual Studio 2017 +MigrationBackup/ + +# Ionide (cross platform F# VS Code tools) working folder +.ionide/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..d51e2a4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "lib/MoonWorks"] + path = lib/MoonWorks + url = https://gitea.moonside.games/MoonsideGames/MoonWorks.git diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..6b0035d --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,16 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Attach to .NET 6 Debugger", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "Build: .NET 6 Debug", + "program": "${workspaceFolder}/bin/x64/Debug/net6.0/MoonWorksImguiExample.dll", + "args": [], + "cwd": "${workspaceFolder}/bin/x64/Debug/net6.0", + "console": "integratedTerminal", + "internalConsoleOptions": "neverOpen" + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..94eae1e --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,118 @@ +{ + "version": "2.0.0", + "options": { + "cwd": "${workspaceRoot}" + }, + "windows": { + "options": { + "shell": { + "executable": "cmd.exe", + "args": [ + "/d", + "/c" + ] + } + } + }, + "presentation": { + "reveal": "always", + "focus": true, + "panel": "shared" + }, + "tasks": [ + { + "label": "Build & Run: .NET 6 Debug", + "type": "shell", + "dependsOrder": "sequence", + "dependsOn": [ + "Build: .NET 6 Debug", + "Run: .NET 6 Debug" + ], + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Build: .NET 6 Debug", + "command": "dotnet", + "args": [ + "build", + "./MoonWorksImguiExample.csproj", + "-p:SolutionDir=${workspaceFolder}/", + "-p:Platform=x64" + ], + "type": "shell", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Run: .NET 6 Debug", + "command": "dotnet", + "args": [ + "./MoonWorksImguiExample.dll" + ], + "options": { + "cwd": "${workspaceFolder}/bin/x64/Debug/net6.0" + }, + "type": "process", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Build: .NET 6 Release", + "command": "dotnet", + "args": [ + "build", + "./MoonWorksImguiExample.csproj", + "--configuration", + "Release", + "-p:SolutionDir=${workspaceFolder}/", + "-p:Platform=x64" + ], + "type": "shell", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Run: .NET 5 Release", + "command": "dotnet", + "args": [ + "./MoonWorksImguiExample.dll" + ], + "options": { + "cwd": "${workspaceFolder}/bin/x64/Release/net6.0" + }, + "type": "process", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + }, + { + "label": "Build & Run: .NET 6 Release", + "dependsOrder": "sequence", + "dependsOn": [ + "Build: .NET 6 Release", + "Run: .NET 6 Release" + ], + "type": "shell", + "group": { + "kind": "build", + "isDefault": true + }, + "problemMatcher": [] + } + ] +} diff --git a/Content/ImGuiFrag.spv b/Content/ImGuiFrag.spv new file mode 100644 index 0000000..ef51b9f Binary files /dev/null and b/Content/ImGuiFrag.spv differ diff --git a/Content/ImGuiVert.spv b/Content/ImGuiVert.spv new file mode 100644 index 0000000..584735e Binary files /dev/null and b/Content/ImGuiVert.spv differ diff --git a/Content/README.md b/Content/README.md new file mode 100644 index 0000000..d05e474 --- /dev/null +++ b/Content/README.md @@ -0,0 +1 @@ +Insert your content files here (sprites, sound, etc) diff --git a/CopyMoonlibs.targets b/CopyMoonlibs.targets new file mode 100644 index 0000000..115b0ad --- /dev/null +++ b/CopyMoonlibs.targets @@ -0,0 +1,51 @@ + + + + + + + + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + + + %(RecursiveDir)%(Filename)%(Extension) + PreserveNewest + + + + diff --git a/MoonWorksImguiExample.csproj b/MoonWorksImguiExample.csproj new file mode 100644 index 0000000..b662559 --- /dev/null +++ b/MoonWorksImguiExample.csproj @@ -0,0 +1,33 @@ + + + Exe + net6.0 + MoonWorksImguiExample + false + false + 8.0 + MoonWorksImguiExample.Program + MoonWorksImguiExample + MoonWorksImguiExample + true + true + + + + + + Always + + + + + $(DefaultItemExcludes);lib\**\* + + + + + + + + + diff --git a/MoonWorksImguiExample.sln b/MoonWorksImguiExample.sln new file mode 100644 index 0000000..36a3bed --- /dev/null +++ b/MoonWorksImguiExample.sln @@ -0,0 +1,49 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30717.126 +MinimumVisualStudioVersion = 15.0.26124.0 +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MoonWorksImguiExample.Core", "MoonWorksImguiExample\MoonWorksImguiExample.Core.csproj", "{4589302C-174A-4173-9654-CAA6CA1B5220}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonWorksImguiExample", "MoonWorksImguiExample.csproj", "{2E898605-87C3-449C-AB79-A4623C2494E8}" +EndProject +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "lib", "lib", "{93E44B4D-AF02-4085-ADD3-F8BE21F0BE66}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MoonWorks", "lib\MoonWorks\MoonWorks.csproj", "{EE7FCB89-3297-4C18-8396-2A4C8FE03546}" +EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImGui.NET", "lib\ImGui.NET\ImGui.NET.csproj", "{321FB044-6597-43CA-942F-3FC5FF60D7BC}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x64 = Debug|x64 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.ActiveCfg = Debug|x64 + {4589302C-174A-4173-9654-CAA6CA1B5220}.Debug|x64.Build.0 = Debug|x64 + {4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.ActiveCfg = Release|x64 + {4589302C-174A-4173-9654-CAA6CA1B5220}.Release|x64.Build.0 = Release|x64 + {2E898605-87C3-449C-AB79-A4623C2494E8}.Debug|x64.ActiveCfg = Debug|Any CPU + {2E898605-87C3-449C-AB79-A4623C2494E8}.Debug|x64.Build.0 = Debug|Any CPU + {2E898605-87C3-449C-AB79-A4623C2494E8}.Release|x64.ActiveCfg = Release|Any CPU + {2E898605-87C3-449C-AB79-A4623C2494E8}.Release|x64.Build.0 = Release|Any CPU + {EE7FCB89-3297-4C18-8396-2A4C8FE03546}.Debug|x64.ActiveCfg = Debug|x64 + {EE7FCB89-3297-4C18-8396-2A4C8FE03546}.Debug|x64.Build.0 = Debug|x64 + {EE7FCB89-3297-4C18-8396-2A4C8FE03546}.Release|x64.ActiveCfg = Release|x64 + {EE7FCB89-3297-4C18-8396-2A4C8FE03546}.Release|x64.Build.0 = Release|x64 + {321FB044-6597-43CA-942F-3FC5FF60D7BC}.Debug|x64.ActiveCfg = Debug|Any CPU + {321FB044-6597-43CA-942F-3FC5FF60D7BC}.Debug|x64.Build.0 = Debug|Any CPU + {321FB044-6597-43CA-942F-3FC5FF60D7BC}.Release|x64.ActiveCfg = Release|Any CPU + {321FB044-6597-43CA-942F-3FC5FF60D7BC}.Release|x64.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {70247DA8-9C19-4FC5-B4BC-68E1262B9F4B} + EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {EE7FCB89-3297-4C18-8396-2A4C8FE03546} = {93E44B4D-AF02-4085-ADD3-F8BE21F0BE66} + {321FB044-6597-43CA-942F-3FC5FF60D7BC} = {93E44B4D-AF02-4085-ADD3-F8BE21F0BE66} + EndGlobalSection +EndGlobal diff --git a/README.md b/README.md new file mode 100644 index 0000000..c60fc21 --- /dev/null +++ b/README.md @@ -0,0 +1,40 @@ +# MoonWorksTemplate + +Template and build tasks for developing a cross-platform multi-target .NET 6 MoonWorks project in VSCode. + +The generated solution file will also work in regular Visual Studio. + +NOTE: OSX is broken right now because I need to set up MoltenVK. + +## Features + +- Project boilerplate code +- VSCode build tasks +- VSCode debugger integration + +## Requirements + +- [Git](https://git-scm.com/) or [Git for Windows](https://gitforwindows.org/) on Windows +- [.NET 6 SDK](https://dotnet.microsoft.com/download/dotnet/6.0) +- [Build Tools for Visual Studio 2019](https://visualstudio.microsoft.com/downloads/) on Windows +- [Visual Studio Code](https://code.visualstudio.com/) +- [VSCode C# Extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.csharp) + +## Installation + +- Make sure you have Git Bash from Git for Windows if you are on Windows +- Download this repository +- Run `install.sh` +- Move the newly created project directory wherever you want +- On Windows, add `C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin` to your system environment PATH variable after installing Build Tools for VS 2019 + +## Usage + +- Open the project directory in VSCode +- Press Ctrl-Shift-B to open the build tasks menu +- Tasks use .NET 6.0 to build and run +- Press F5 to build and debug + +## Acknowledgments + +Thanks to Andrew Russell and Caleb Cornett's FNA templates for a starting point for this template. diff --git a/lib/ImGui.NET/Generated/ImColor.gen.cs b/lib/ImGui.NET/Generated/ImColor.gen.cs new file mode 100644 index 0000000..009ed06 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImColor.gen.cs @@ -0,0 +1,48 @@ +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 Destroy() + { + ImGuiNative.ImColor_destroy((ImColor*)(NativePtr)); + } + public ImColor HSV(float h, float s, float v) + { + ImColor __retval; + float a = 1.0f; + ImGuiNative.ImColor_HSV(&__retval, h, s, v, a); + return __retval; + } + public ImColor HSV(float h, float s, float v, float a) + { + ImColor __retval; + ImGuiNative.ImColor_HSV(&__retval, h, s, v, a); + return __retval; + } + public void SetHSV(float h, float s, float v) + { + float a = 1.0f; + ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a); + } + public void SetHSV(float h, float s, float v, float a) + { + ImGuiNative.ImColor_SetHSV((ImColor*)(NativePtr), h, s, v, a); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawChannel.gen.cs b/lib/ImGui.NET/Generated/ImDrawChannel.gen.cs new file mode 100644 index 0000000..850df76 --- /dev/null +++ b/lib/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/lib/ImGui.NET/Generated/ImDrawCmd.gen.cs b/lib/ImGui.NET/Generated/ImDrawCmd.gen.cs new file mode 100644 index 0000000..344d905 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImDrawCmd.gen.cs @@ -0,0 +1,43 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawCmd + { + public Vector4 ClipRect; + public IntPtr TextureId; + public uint VtxOffset; + public uint IdxOffset; + public uint ElemCount; + 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 Vector4 ClipRect => ref Unsafe.AsRef(&NativePtr->ClipRect); + public ref IntPtr TextureId => ref Unsafe.AsRef(&NativePtr->TextureId); + public ref uint VtxOffset => ref Unsafe.AsRef(&NativePtr->VtxOffset); + public ref uint IdxOffset => ref Unsafe.AsRef(&NativePtr->IdxOffset); + public ref uint ElemCount => ref Unsafe.AsRef(&NativePtr->ElemCount); + public ref IntPtr UserCallback => ref Unsafe.AsRef(&NativePtr->UserCallback); + public IntPtr UserCallbackData { get => (IntPtr)NativePtr->UserCallbackData; set => NativePtr->UserCallbackData = (void*)value; } + public void Destroy() + { + ImGuiNative.ImDrawCmd_destroy((ImDrawCmd*)(NativePtr)); + } + public IntPtr GetTexID() + { + IntPtr ret = ImGuiNative.ImDrawCmd_GetTexID((ImDrawCmd*)(NativePtr)); + return ret; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawCmdHeader.gen.cs b/lib/ImGui.NET/Generated/ImDrawCmdHeader.gen.cs new file mode 100644 index 0000000..2d1c053 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImDrawCmdHeader.gen.cs @@ -0,0 +1,26 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawCmdHeader + { + public Vector4 ClipRect; + public IntPtr TextureId; + public uint VtxOffset; + } + public unsafe partial struct ImDrawCmdHeaderPtr + { + public ImDrawCmdHeader* NativePtr { get; } + public ImDrawCmdHeaderPtr(ImDrawCmdHeader* nativePtr) => NativePtr = nativePtr; + public ImDrawCmdHeaderPtr(IntPtr nativePtr) => NativePtr = (ImDrawCmdHeader*)nativePtr; + public static implicit operator ImDrawCmdHeaderPtr(ImDrawCmdHeader* nativePtr) => new ImDrawCmdHeaderPtr(nativePtr); + public static implicit operator ImDrawCmdHeader* (ImDrawCmdHeaderPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawCmdHeaderPtr(IntPtr nativePtr) => new ImDrawCmdHeaderPtr(nativePtr); + public ref Vector4 ClipRect => ref Unsafe.AsRef(&NativePtr->ClipRect); + public ref IntPtr TextureId => ref Unsafe.AsRef(&NativePtr->TextureId); + public ref uint VtxOffset => ref Unsafe.AsRef(&NativePtr->VtxOffset); + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawData.gen.cs b/lib/ImGui.NET/Generated/ImDrawData.gen.cs new file mode 100644 index 0000000..e164f57 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImDrawData.gen.cs @@ -0,0 +1,54 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawData + { + public byte Valid; + public int CmdListsCount; + public int TotalIdxCount; + public int TotalVtxCount; + public ImDrawList** CmdLists; + public Vector2 DisplayPos; + public Vector2 DisplaySize; + public Vector2 FramebufferScale; + public ImGuiViewport* OwnerViewport; + } + 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 bool Valid => ref Unsafe.AsRef(&NativePtr->Valid); + 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 IntPtr CmdLists { get => (IntPtr)NativePtr->CmdLists; set => NativePtr->CmdLists = (ImDrawList**)value; } + public ref Vector2 DisplayPos => ref Unsafe.AsRef(&NativePtr->DisplayPos); + public ref Vector2 DisplaySize => ref Unsafe.AsRef(&NativePtr->DisplaySize); + public ref Vector2 FramebufferScale => ref Unsafe.AsRef(&NativePtr->FramebufferScale); + public ImGuiViewportPtr OwnerViewport => new ImGuiViewportPtr(NativePtr->OwnerViewport); + public void Clear() + { + ImGuiNative.ImDrawData_Clear((ImDrawData*)(NativePtr)); + } + public void DeIndexAllBuffers() + { + ImGuiNative.ImDrawData_DeIndexAllBuffers((ImDrawData*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImDrawData_destroy((ImDrawData*)(NativePtr)); + } + public void ScaleClipRects(Vector2 fb_scale) + { + ImGuiNative.ImDrawData_ScaleClipRects((ImDrawData*)(NativePtr), fb_scale); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawFlags.gen.cs b/lib/ImGui.NET/Generated/ImDrawFlags.gen.cs new file mode 100644 index 0000000..60ae459 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImDrawFlags.gen.cs @@ -0,0 +1,21 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImDrawFlags + { + None = 0, + Closed = 1, + RoundCornersTopLeft = 16, + RoundCornersTopRight = 32, + RoundCornersBottomLeft = 64, + RoundCornersBottomRight = 128, + RoundCornersNone = 256, + RoundCornersTop = 48, + RoundCornersBottom = 192, + RoundCornersLeft = 80, + RoundCornersRight = 160, + RoundCornersAll = 240, + RoundCornersDefault = 240, + RoundCornersMask = 496, + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawList.gen.cs b/lib/ImGui.NET/Generated/ImDrawList.gen.cs new file mode 100644 index 0000000..7a0f70e --- /dev/null +++ b/lib/ImGui.NET/Generated/ImDrawList.gen.cs @@ -0,0 +1,483 @@ +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 uint _VtxCurrentIdx; + public IntPtr _Data; + public byte* _OwnerName; + public ImDrawVert* _VtxWritePtr; + public ushort* _IdxWritePtr; + public ImVector _ClipRectStack; + public ImVector _TextureIdStack; + public ImVector _Path; + public ImDrawCmdHeader _CmdHeader; + public ImDrawListSplitter _Splitter; + public float _FringeScale; + } + 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 uint _VtxCurrentIdx => ref Unsafe.AsRef(&NativePtr->_VtxCurrentIdx); + public ref IntPtr _Data => ref Unsafe.AsRef(&NativePtr->_Data); + public NullTerminatedString _OwnerName => new NullTerminatedString(NativePtr->_OwnerName); + 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 ImDrawCmdHeader _CmdHeader => ref Unsafe.AsRef(&NativePtr->_CmdHeader); + public ref ImDrawListSplitter _Splitter => ref Unsafe.AsRef(&NativePtr->_Splitter); + public ref float _FringeScale => ref Unsafe.AsRef(&NativePtr->_FringeScale); + public int _CalcCircleAutoSegmentCount(float radius) + { + int ret = ImGuiNative.ImDrawList__CalcCircleAutoSegmentCount((ImDrawList*)(NativePtr), radius); + return ret; + } + public void _ClearFreeMemory() + { + ImGuiNative.ImDrawList__ClearFreeMemory((ImDrawList*)(NativePtr)); + } + public void _OnChangedClipRect() + { + ImGuiNative.ImDrawList__OnChangedClipRect((ImDrawList*)(NativePtr)); + } + public void _OnChangedTextureID() + { + ImGuiNative.ImDrawList__OnChangedTextureID((ImDrawList*)(NativePtr)); + } + public void _OnChangedVtxOffset() + { + ImGuiNative.ImDrawList__OnChangedVtxOffset((ImDrawList*)(NativePtr)); + } + public void _PathArcToFastEx(Vector2 center, float radius, int a_min_sample, int a_max_sample, int a_step) + { + ImGuiNative.ImDrawList__PathArcToFastEx((ImDrawList*)(NativePtr), center, radius, a_min_sample, a_max_sample, a_step); + } + public void _PathArcToN(Vector2 center, float radius, float a_min, float a_max, int num_segments) + { + ImGuiNative.ImDrawList__PathArcToN((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments); + } + public void _PopUnusedDrawCmd() + { + ImGuiNative.ImDrawList__PopUnusedDrawCmd((ImDrawList*)(NativePtr)); + } + public void _ResetForNewFrame() + { + ImGuiNative.ImDrawList__ResetForNewFrame((ImDrawList*)(NativePtr)); + } + public void _TryMergeDrawCmds() + { + ImGuiNative.ImDrawList__TryMergeDrawCmds((ImDrawList*)(NativePtr)); + } + public void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness) + { + int num_segments = 0; + ImGuiNative.ImDrawList_AddBezierCubic((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness, num_segments); + } + public void AddBezierCubic(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments) + { + ImGuiNative.ImDrawList_AddBezierCubic((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness, num_segments); + } + public void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness) + { + int num_segments = 0; + ImGuiNative.ImDrawList_AddBezierQuadratic((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness, num_segments); + } + public void AddBezierQuadratic(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness, int num_segments) + { + ImGuiNative.ImDrawList_AddBezierQuadratic((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness, num_segments); + } + public void AddCallback(IntPtr callback, IntPtr callback_data) + { + void* native_callback_data = (void*)callback_data.ToPointer(); + ImGuiNative.ImDrawList_AddCallback((ImDrawList*)(NativePtr), callback, native_callback_data); + } + public void AddCircle(Vector2 center, float radius, uint col) + { + int num_segments = 0; + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); + } + public void AddCircle(Vector2 center, float radius, uint col, int num_segments) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); + } + public void AddCircle(Vector2 center, float radius, uint col, int num_segments, float thickness) + { + ImGuiNative.ImDrawList_AddCircle((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); + } + public void AddCircleFilled(Vector2 center, float radius, uint col) + { + int num_segments = 0; + ImGuiNative.ImDrawList_AddCircleFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments); + } + public void AddCircleFilled(Vector2 center, float radius, uint col, int num_segments) + { + ImGuiNative.ImDrawList_AddCircleFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments); + } + public void AddConvexPolyFilled(ref Vector2 points, int num_points, uint col) + { + fixed (Vector2* native_points = &points) + { + ImGuiNative.ImDrawList_AddConvexPolyFilled((ImDrawList*)(NativePtr), native_points, num_points, col); + } + } + public void AddDrawCmd() + { + ImGuiNative.ImDrawList_AddDrawCmd((ImDrawList*)(NativePtr)); + } + public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max) + { + Vector2 uv_min = new Vector2(); + Vector2 uv_max = new Vector2(1, 1); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); + } + public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min) + { + Vector2 uv_max = new Vector2(1, 1); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); + } + public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max) + { + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); + } + public void AddImage(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col) + { + ImGuiNative.ImDrawList_AddImage((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4) + { + Vector2 uv1 = new Vector2(); + Vector2 uv2 = new Vector2(1, 0); + Vector2 uv3 = new Vector2(1, 1); + Vector2 uv4 = new Vector2(0, 1); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1) + { + Vector2 uv2 = new Vector2(1, 0); + Vector2 uv3 = new Vector2(1, 1); + Vector2 uv4 = new Vector2(0, 1); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2) + { + Vector2 uv3 = new Vector2(1, 1); + Vector2 uv4 = new Vector2(0, 1); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3) + { + Vector2 uv4 = new Vector2(0, 1); + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4) + { + uint col = 4294967295; + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + } + public void AddImageQuad(IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col) + { + ImGuiNative.ImDrawList_AddImageQuad((ImDrawList*)(NativePtr), user_texture_id, p1, p2, p3, p4, uv1, uv2, uv3, uv4, col); + } + public void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding) + { + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_AddImageRounded((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); + } + public void AddImageRounded(IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawFlags flags) + { + ImGuiNative.ImDrawList_AddImageRounded((ImDrawList*)(NativePtr), user_texture_id, p_min, p_max, uv_min, uv_max, col, rounding, flags); + } + public void AddLine(Vector2 p1, Vector2 p2, uint col) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddLine((ImDrawList*)(NativePtr), p1, p2, col, thickness); + } + public void AddLine(Vector2 p1, Vector2 p2, uint col, float thickness) + { + ImGuiNative.ImDrawList_AddLine((ImDrawList*)(NativePtr), p1, p2, col, thickness); + } + public void AddNgon(Vector2 center, float radius, uint col, int num_segments) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddNgon((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); + } + public void AddNgon(Vector2 center, float radius, uint col, int num_segments, float thickness) + { + ImGuiNative.ImDrawList_AddNgon((ImDrawList*)(NativePtr), center, radius, col, num_segments, thickness); + } + public void AddNgonFilled(Vector2 center, float radius, uint col, int num_segments) + { + ImGuiNative.ImDrawList_AddNgonFilled((ImDrawList*)(NativePtr), center, radius, col, num_segments); + } + public void AddPolyline(ref Vector2 points, int num_points, uint col, ImDrawFlags flags, float thickness) + { + fixed (Vector2* native_points = &points) + { + ImGuiNative.ImDrawList_AddPolyline((ImDrawList*)(NativePtr), native_points, num_points, col, flags, thickness); + } + } + public void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddQuad((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness); + } + public void AddQuad(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness) + { + ImGuiNative.ImDrawList_AddQuad((ImDrawList*)(NativePtr), p1, p2, p3, p4, col, thickness); + } + public void AddQuadFilled(Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col) + { + ImGuiNative.ImDrawList_AddQuadFilled((ImDrawList*)(NativePtr), p1, p2, p3, p4, col); + } + public void AddRect(Vector2 p_min, Vector2 p_max, uint col) + { + float rounding = 0.0f; + ImDrawFlags flags = (ImDrawFlags)0; + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); + } + public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding) + { + ImDrawFlags flags = (ImDrawFlags)0; + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); + } + public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); + } + public void AddRect(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags, float thickness) + { + ImGuiNative.ImDrawList_AddRect((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags, thickness); + } + public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col) + { + float rounding = 0.0f; + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags); + } + public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding) + { + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags); + } + public void AddRectFilled(Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags) + { + ImGuiNative.ImDrawList_AddRectFilled((ImDrawList*)(NativePtr), p_min, p_max, col, rounding, flags); + } + public void AddRectFilledMultiColor(Vector2 p_min, Vector2 p_max, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left) + { + ImGuiNative.ImDrawList_AddRectFilledMultiColor((ImDrawList*)(NativePtr), p_min, p_max, col_upr_left, col_upr_right, col_bot_right, col_bot_left); + } + public void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_AddTriangle((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness); + } + public void AddTriangle(Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness) + { + ImGuiNative.ImDrawList_AddTriangle((ImDrawList*)(NativePtr), p1, p2, p3, col, thickness); + } + public void AddTriangleFilled(Vector2 p1, Vector2 p2, Vector2 p3, uint col) + { + ImGuiNative.ImDrawList_AddTriangleFilled((ImDrawList*)(NativePtr), p1, p2, p3, col); + } + public void ChannelsMerge() + { + ImGuiNative.ImDrawList_ChannelsMerge((ImDrawList*)(NativePtr)); + } + public void ChannelsSetCurrent(int n) + { + ImGuiNative.ImDrawList_ChannelsSetCurrent((ImDrawList*)(NativePtr), n); + } + public void ChannelsSplit(int count) + { + ImGuiNative.ImDrawList_ChannelsSplit((ImDrawList*)(NativePtr), count); + } + public ImDrawListPtr CloneOutput() + { + ImDrawList* ret = ImGuiNative.ImDrawList_CloneOutput((ImDrawList*)(NativePtr)); + return new ImDrawListPtr(ret); + } + public void Destroy() + { + ImGuiNative.ImDrawList_destroy((ImDrawList*)(NativePtr)); + } + public Vector2 GetClipRectMax() + { + Vector2 __retval; + ImGuiNative.ImDrawList_GetClipRectMax(&__retval, (ImDrawList*)(NativePtr)); + return __retval; + } + public Vector2 GetClipRectMin() + { + Vector2 __retval; + ImGuiNative.ImDrawList_GetClipRectMin(&__retval, (ImDrawList*)(NativePtr)); + return __retval; + } + public void PathArcTo(Vector2 center, float radius, float a_min, float a_max) + { + int num_segments = 0; + ImGuiNative.ImDrawList_PathArcTo((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments); + } + public void PathArcTo(Vector2 center, float radius, float a_min, float a_max, int num_segments) + { + ImGuiNative.ImDrawList_PathArcTo((ImDrawList*)(NativePtr), center, radius, a_min, a_max, num_segments); + } + public void PathArcToFast(Vector2 center, float radius, int a_min_of_12, int a_max_of_12) + { + ImGuiNative.ImDrawList_PathArcToFast((ImDrawList*)(NativePtr), center, radius, a_min_of_12, a_max_of_12); + } + public void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4) + { + int num_segments = 0; + ImGuiNative.ImDrawList_PathBezierCubicCurveTo((ImDrawList*)(NativePtr), p2, p3, p4, num_segments); + } + public void PathBezierCubicCurveTo(Vector2 p2, Vector2 p3, Vector2 p4, int num_segments) + { + ImGuiNative.ImDrawList_PathBezierCubicCurveTo((ImDrawList*)(NativePtr), p2, p3, p4, num_segments); + } + public void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3) + { + int num_segments = 0; + ImGuiNative.ImDrawList_PathBezierQuadraticCurveTo((ImDrawList*)(NativePtr), p2, p3, num_segments); + } + public void PathBezierQuadraticCurveTo(Vector2 p2, Vector2 p3, int num_segments) + { + ImGuiNative.ImDrawList_PathBezierQuadraticCurveTo((ImDrawList*)(NativePtr), p2, p3, num_segments); + } + public void PathClear() + { + ImGuiNative.ImDrawList_PathClear((ImDrawList*)(NativePtr)); + } + public void PathFillConvex(uint col) + { + ImGuiNative.ImDrawList_PathFillConvex((ImDrawList*)(NativePtr), col); + } + public void PathLineTo(Vector2 pos) + { + ImGuiNative.ImDrawList_PathLineTo((ImDrawList*)(NativePtr), pos); + } + public void PathLineToMergeDuplicate(Vector2 pos) + { + ImGuiNative.ImDrawList_PathLineToMergeDuplicate((ImDrawList*)(NativePtr), pos); + } + public void PathRect(Vector2 rect_min, Vector2 rect_max) + { + float rounding = 0.0f; + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, flags); + } + public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding) + { + ImDrawFlags flags = (ImDrawFlags)0; + ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, flags); + } + public void PathRect(Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawFlags flags) + { + ImGuiNative.ImDrawList_PathRect((ImDrawList*)(NativePtr), rect_min, rect_max, rounding, flags); + } + public void PathStroke(uint col) + { + ImDrawFlags flags = (ImDrawFlags)0; + float thickness = 1.0f; + ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, flags, thickness); + } + public void PathStroke(uint col, ImDrawFlags flags) + { + float thickness = 1.0f; + ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, flags, thickness); + } + public void PathStroke(uint col, ImDrawFlags flags, float thickness) + { + ImGuiNative.ImDrawList_PathStroke((ImDrawList*)(NativePtr), col, flags, thickness); + } + public void PopClipRect() + { + ImGuiNative.ImDrawList_PopClipRect((ImDrawList*)(NativePtr)); + } + public void PopTextureID() + { + ImGuiNative.ImDrawList_PopTextureID((ImDrawList*)(NativePtr)); + } + 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((ImDrawList*)(NativePtr), a, b, c, d, uv_a, uv_b, uv_c, uv_d, col); + } + public void PrimRect(Vector2 a, Vector2 b, uint col) + { + ImGuiNative.ImDrawList_PrimRect((ImDrawList*)(NativePtr), a, b, col); + } + public void PrimRectUV(Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col) + { + ImGuiNative.ImDrawList_PrimRectUV((ImDrawList*)(NativePtr), a, b, uv_a, uv_b, col); + } + public void PrimReserve(int idx_count, int vtx_count) + { + ImGuiNative.ImDrawList_PrimReserve((ImDrawList*)(NativePtr), idx_count, vtx_count); + } + public void PrimUnreserve(int idx_count, int vtx_count) + { + ImGuiNative.ImDrawList_PrimUnreserve((ImDrawList*)(NativePtr), idx_count, vtx_count); + } + public void PrimVtx(Vector2 pos, Vector2 uv, uint col) + { + ImGuiNative.ImDrawList_PrimVtx((ImDrawList*)(NativePtr), pos, uv, col); + } + public void PrimWriteIdx(ushort idx) + { + ImGuiNative.ImDrawList_PrimWriteIdx((ImDrawList*)(NativePtr), idx); + } + public void PrimWriteVtx(Vector2 pos, Vector2 uv, uint col) + { + ImGuiNative.ImDrawList_PrimWriteVtx((ImDrawList*)(NativePtr), pos, uv, col); + } + public void PushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max) + { + byte intersect_with_current_clip_rect = 0; + ImGuiNative.ImDrawList_PushClipRect((ImDrawList*)(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((ImDrawList*)(NativePtr), clip_rect_min, clip_rect_max, native_intersect_with_current_clip_rect); + } + public void PushClipRectFullScreen() + { + ImGuiNative.ImDrawList_PushClipRectFullScreen((ImDrawList*)(NativePtr)); + } + public void PushTextureID(IntPtr texture_id) + { + ImGuiNative.ImDrawList_PushTextureID((ImDrawList*)(NativePtr), texture_id); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawListFlags.gen.cs b/lib/ImGui.NET/Generated/ImDrawListFlags.gen.cs new file mode 100644 index 0000000..e55321f --- /dev/null +++ b/lib/ImGui.NET/Generated/ImDrawListFlags.gen.cs @@ -0,0 +1,12 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImDrawListFlags + { + None = 0, + AntiAliasedLines = 1, + AntiAliasedLinesUseTex = 2, + AntiAliasedFill = 4, + AllowVtxOffset = 8, + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawListSplitter.gen.cs b/lib/ImGui.NET/Generated/ImDrawListSplitter.gen.cs new file mode 100644 index 0000000..9c180e7 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImDrawListSplitter.gen.cs @@ -0,0 +1,53 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImDrawListSplitter + { + public int _Current; + public int _Count; + public ImVector _Channels; + } + public unsafe partial struct ImDrawListSplitterPtr + { + public ImDrawListSplitter* NativePtr { get; } + public ImDrawListSplitterPtr(ImDrawListSplitter* nativePtr) => NativePtr = nativePtr; + public ImDrawListSplitterPtr(IntPtr nativePtr) => NativePtr = (ImDrawListSplitter*)nativePtr; + public static implicit operator ImDrawListSplitterPtr(ImDrawListSplitter* nativePtr) => new ImDrawListSplitterPtr(nativePtr); + public static implicit operator ImDrawListSplitter* (ImDrawListSplitterPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImDrawListSplitterPtr(IntPtr nativePtr) => new ImDrawListSplitterPtr(nativePtr); + public ref int _Current => ref Unsafe.AsRef(&NativePtr->_Current); + public ref int _Count => ref Unsafe.AsRef(&NativePtr->_Count); + public ImPtrVector _Channels => new ImPtrVector(NativePtr->_Channels, Unsafe.SizeOf()); + public void Clear() + { + ImGuiNative.ImDrawListSplitter_Clear((ImDrawListSplitter*)(NativePtr)); + } + public void ClearFreeMemory() + { + ImGuiNative.ImDrawListSplitter_ClearFreeMemory((ImDrawListSplitter*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImDrawListSplitter_destroy((ImDrawListSplitter*)(NativePtr)); + } + public void Merge(ImDrawListPtr draw_list) + { + ImDrawList* native_draw_list = draw_list.NativePtr; + ImGuiNative.ImDrawListSplitter_Merge((ImDrawListSplitter*)(NativePtr), native_draw_list); + } + public void SetCurrentChannel(ImDrawListPtr draw_list, int channel_idx) + { + ImDrawList* native_draw_list = draw_list.NativePtr; + ImGuiNative.ImDrawListSplitter_SetCurrentChannel((ImDrawListSplitter*)(NativePtr), native_draw_list, channel_idx); + } + public void Split(ImDrawListPtr draw_list, int count) + { + ImDrawList* native_draw_list = draw_list.NativePtr; + ImGuiNative.ImDrawListSplitter_Split((ImDrawListSplitter*)(NativePtr), native_draw_list, count); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImDrawVert.gen.cs b/lib/ImGui.NET/Generated/ImDrawVert.gen.cs new file mode 100644 index 0000000..6382adf --- /dev/null +++ b/lib/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/lib/ImGui.NET/Generated/ImFont.gen.cs b/lib/ImGui.NET/Generated/ImFont.gen.cs new file mode 100644 index 0000000..a505ab3 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImFont.gen.cs @@ -0,0 +1,122 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFont + { + public ImVector IndexAdvanceX; + public float FallbackAdvanceX; + public float FontSize; + public ImVector IndexLookup; + public ImVector Glyphs; + public ImFontGlyph* FallbackGlyph; + public ImFontAtlas* ContainerAtlas; + public ImFontConfig* ConfigData; + public short ConfigDataCount; + public ushort FallbackChar; + public ushort EllipsisChar; + public ushort DotChar; + public byte DirtyLookupTables; + public float Scale; + public float Ascent; + public float Descent; + public int MetricsTotalSurface; + public fixed byte Used4kPagesMap[2]; + } + 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 ImVector IndexAdvanceX => new ImVector(NativePtr->IndexAdvanceX); + public ref float FallbackAdvanceX => ref Unsafe.AsRef(&NativePtr->FallbackAdvanceX); + public ref float FontSize => ref Unsafe.AsRef(&NativePtr->FontSize); + public ImVector IndexLookup => new ImVector(NativePtr->IndexLookup); + public ImPtrVector Glyphs => new ImPtrVector(NativePtr->Glyphs, Unsafe.SizeOf()); + public ImFontGlyphPtr FallbackGlyph => new ImFontGlyphPtr(NativePtr->FallbackGlyph); + public ImFontAtlasPtr ContainerAtlas => new ImFontAtlasPtr(NativePtr->ContainerAtlas); + public ImFontConfigPtr ConfigData => new ImFontConfigPtr(NativePtr->ConfigData); + public ref short ConfigDataCount => ref Unsafe.AsRef(&NativePtr->ConfigDataCount); + public ref ushort FallbackChar => ref Unsafe.AsRef(&NativePtr->FallbackChar); + public ref ushort EllipsisChar => ref Unsafe.AsRef(&NativePtr->EllipsisChar); + public ref ushort DotChar => ref Unsafe.AsRef(&NativePtr->DotChar); + public ref bool DirtyLookupTables => ref Unsafe.AsRef(&NativePtr->DirtyLookupTables); + public ref float Scale => ref Unsafe.AsRef(&NativePtr->Scale); + public ref float Ascent => ref Unsafe.AsRef(&NativePtr->Ascent); + public ref float Descent => ref Unsafe.AsRef(&NativePtr->Descent); + public ref int MetricsTotalSurface => ref Unsafe.AsRef(&NativePtr->MetricsTotalSurface); + public RangeAccessor Used4kPagesMap => new RangeAccessor(NativePtr->Used4kPagesMap, 2); + public void AddGlyph(ImFontConfigPtr src_cfg, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) + { + ImFontConfig* native_src_cfg = src_cfg.NativePtr; + ImGuiNative.ImFont_AddGlyph((ImFont*)(NativePtr), native_src_cfg, c, x0, y0, x1, y1, u0, v0, u1, v1, advance_x); + } + public void AddRemapChar(ushort dst, ushort src) + { + byte overwrite_dst = 1; + ImGuiNative.ImFont_AddRemapChar((ImFont*)(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((ImFont*)(NativePtr), dst, src, native_overwrite_dst); + } + public void BuildLookupTable() + { + ImGuiNative.ImFont_BuildLookupTable((ImFont*)(NativePtr)); + } + public void ClearOutputData() + { + ImGuiNative.ImFont_ClearOutputData((ImFont*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImFont_destroy((ImFont*)(NativePtr)); + } + public ImFontGlyphPtr FindGlyph(ushort c) + { + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyph((ImFont*)(NativePtr), c); + return new ImFontGlyphPtr(ret); + } + public ImFontGlyphPtr FindGlyphNoFallback(ushort c) + { + ImFontGlyph* ret = ImGuiNative.ImFont_FindGlyphNoFallback((ImFont*)(NativePtr), c); + return new ImFontGlyphPtr(ret); + } + public float GetCharAdvance(ushort c) + { + float ret = ImGuiNative.ImFont_GetCharAdvance((ImFont*)(NativePtr), c); + return ret; + } + public string GetDebugName() + { + byte* ret = ImGuiNative.ImFont_GetDebugName((ImFont*)(NativePtr)); + return Util.StringFromPtr(ret); + } + public void GrowIndex(int new_size) + { + ImGuiNative.ImFont_GrowIndex((ImFont*)(NativePtr), new_size); + } + public bool IsLoaded() + { + byte ret = ImGuiNative.ImFont_IsLoaded((ImFont*)(NativePtr)); + return ret != 0; + } + public void RenderChar(ImDrawListPtr draw_list, float size, Vector2 pos, uint col, ushort c) + { + ImDrawList* native_draw_list = draw_list.NativePtr; + ImGuiNative.ImFont_RenderChar((ImFont*)(NativePtr), native_draw_list, size, pos, col, c); + } + public void SetGlyphVisible(ushort c, bool visible) + { + byte native_visible = visible ? (byte)1 : (byte)0; + ImGuiNative.ImFont_SetGlyphVisible((ImFont*)(NativePtr), c, native_visible); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImFontAtlas.gen.cs b/lib/ImGui.NET/Generated/ImFontAtlas.gen.cs new file mode 100644 index 0000000..7dd5ee2 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImFontAtlas.gen.cs @@ -0,0 +1,610 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFontAtlas + { + public ImFontAtlasFlags Flags; + public IntPtr TexID; + public int TexDesiredWidth; + public int TexGlyphPadding; + public byte Locked; + public byte TexReady; + public byte TexPixelsUseColors; + 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 Vector4 TexUvLines_0; + public Vector4 TexUvLines_1; + public Vector4 TexUvLines_2; + public Vector4 TexUvLines_3; + public Vector4 TexUvLines_4; + public Vector4 TexUvLines_5; + public Vector4 TexUvLines_6; + public Vector4 TexUvLines_7; + public Vector4 TexUvLines_8; + public Vector4 TexUvLines_9; + public Vector4 TexUvLines_10; + public Vector4 TexUvLines_11; + public Vector4 TexUvLines_12; + public Vector4 TexUvLines_13; + public Vector4 TexUvLines_14; + public Vector4 TexUvLines_15; + public Vector4 TexUvLines_16; + public Vector4 TexUvLines_17; + public Vector4 TexUvLines_18; + public Vector4 TexUvLines_19; + public Vector4 TexUvLines_20; + public Vector4 TexUvLines_21; + public Vector4 TexUvLines_22; + public Vector4 TexUvLines_23; + public Vector4 TexUvLines_24; + public Vector4 TexUvLines_25; + public Vector4 TexUvLines_26; + public Vector4 TexUvLines_27; + public Vector4 TexUvLines_28; + public Vector4 TexUvLines_29; + public Vector4 TexUvLines_30; + public Vector4 TexUvLines_31; + public Vector4 TexUvLines_32; + public Vector4 TexUvLines_33; + public Vector4 TexUvLines_34; + public Vector4 TexUvLines_35; + public Vector4 TexUvLines_36; + public Vector4 TexUvLines_37; + public Vector4 TexUvLines_38; + public Vector4 TexUvLines_39; + public Vector4 TexUvLines_40; + public Vector4 TexUvLines_41; + public Vector4 TexUvLines_42; + public Vector4 TexUvLines_43; + public Vector4 TexUvLines_44; + public Vector4 TexUvLines_45; + public Vector4 TexUvLines_46; + public Vector4 TexUvLines_47; + public Vector4 TexUvLines_48; + public Vector4 TexUvLines_49; + public Vector4 TexUvLines_50; + public Vector4 TexUvLines_51; + public Vector4 TexUvLines_52; + public Vector4 TexUvLines_53; + public Vector4 TexUvLines_54; + public Vector4 TexUvLines_55; + public Vector4 TexUvLines_56; + public Vector4 TexUvLines_57; + public Vector4 TexUvLines_58; + public Vector4 TexUvLines_59; + public Vector4 TexUvLines_60; + public Vector4 TexUvLines_61; + public Vector4 TexUvLines_62; + public Vector4 TexUvLines_63; + public IntPtr* FontBuilderIO; + public uint FontBuilderFlags; + public int PackIdMouseCursors; + public int PackIdLines; + } + 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 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 ref bool Locked => ref Unsafe.AsRef(&NativePtr->Locked); + public ref bool TexReady => ref Unsafe.AsRef(&NativePtr->TexReady); + public ref bool TexPixelsUseColors => ref Unsafe.AsRef(&NativePtr->TexPixelsUseColors); + 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 ImPtrVector CustomRects => new ImPtrVector(NativePtr->CustomRects, Unsafe.SizeOf()); + public ImPtrVector ConfigData => new ImPtrVector(NativePtr->ConfigData, Unsafe.SizeOf()); + public RangeAccessor TexUvLines => new RangeAccessor(&NativePtr->TexUvLines_0, 64); + public IntPtr FontBuilderIO { get => (IntPtr)NativePtr->FontBuilderIO; set => NativePtr->FontBuilderIO = (IntPtr*)value; } + public ref uint FontBuilderFlags => ref Unsafe.AsRef(&NativePtr->FontBuilderFlags); + public ref int PackIdMouseCursors => ref Unsafe.AsRef(&NativePtr->PackIdMouseCursors); + public ref int PackIdLines => ref Unsafe.AsRef(&NativePtr->PackIdLines); + 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((ImFontAtlas*)(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((ImFontAtlas*)(NativePtr), native_font, id, width, height, advance_x, offset); + return ret; + } + public int AddCustomRectRegular(int width, int height) + { + int ret = ImGuiNative.ImFontAtlas_AddCustomRectRegular((ImFontAtlas*)(NativePtr), width, height); + return ret; + } + public ImFontPtr AddFont(ImFontConfigPtr font_cfg) + { + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFont((ImFontAtlas*)(NativePtr), native_font_cfg); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontDefault() + { + ImFontConfig* font_cfg = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontDefault((ImFontAtlas*)(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((ImFontAtlas*)(NativePtr), native_font_cfg); + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels) + { + byte* native_filename; + int filename_byteCount = 0; + if (filename != null) + { + filename_byteCount = Encoding.UTF8.GetByteCount(filename); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + native_filename = Util.Allocate(filename_byteCount + 1); + } + else + { + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + } + int native_filename_offset = Util.GetUtf8(filename, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + else { native_filename = null; } + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, font_cfg, glyph_ranges); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_filename); + } + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg) + { + byte* native_filename; + int filename_byteCount = 0; + if (filename != null) + { + filename_byteCount = Encoding.UTF8.GetByteCount(filename); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + native_filename = Util.Allocate(filename_byteCount + 1); + } + else + { + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + } + int native_filename_offset = Util.GetUtf8(filename, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + else { native_filename = null; } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, native_font_cfg, glyph_ranges); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_filename); + } + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromFileTTF(string filename, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) + { + byte* native_filename; + int filename_byteCount = 0; + if (filename != null) + { + filename_byteCount = Encoding.UTF8.GetByteCount(filename); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + native_filename = Util.Allocate(filename_byteCount + 1); + } + else + { + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + } + int native_filename_offset = Util.GetUtf8(filename, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + else { native_filename = null; } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromFileTTF((ImFontAtlas*)(NativePtr), native_filename, size_pixels, native_font_cfg, native_glyph_ranges); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_filename); + } + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels) + { + byte* native_compressed_font_data_base85; + int compressed_font_data_base85_byteCount = 0; + if (compressed_font_data_base85 != null) + { + compressed_font_data_base85_byteCount = Encoding.UTF8.GetByteCount(compressed_font_data_base85); + if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) + { + native_compressed_font_data_base85 = Util.Allocate(compressed_font_data_base85_byteCount + 1); + } + else + { + byte* native_compressed_font_data_base85_stackBytes = stackalloc byte[compressed_font_data_base85_byteCount + 1]; + native_compressed_font_data_base85 = native_compressed_font_data_base85_stackBytes; + } + int native_compressed_font_data_base85_offset = Util.GetUtf8(compressed_font_data_base85, native_compressed_font_data_base85, compressed_font_data_base85_byteCount); + native_compressed_font_data_base85[native_compressed_font_data_base85_offset] = 0; + } + else { native_compressed_font_data_base85 = null; } + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, font_cfg, glyph_ranges); + if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_compressed_font_data_base85); + } + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg) + { + byte* native_compressed_font_data_base85; + int compressed_font_data_base85_byteCount = 0; + if (compressed_font_data_base85 != null) + { + compressed_font_data_base85_byteCount = Encoding.UTF8.GetByteCount(compressed_font_data_base85); + if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) + { + native_compressed_font_data_base85 = Util.Allocate(compressed_font_data_base85_byteCount + 1); + } + else + { + byte* native_compressed_font_data_base85_stackBytes = stackalloc byte[compressed_font_data_base85_byteCount + 1]; + native_compressed_font_data_base85 = native_compressed_font_data_base85_stackBytes; + } + int native_compressed_font_data_base85_offset = Util.GetUtf8(compressed_font_data_base85, native_compressed_font_data_base85, compressed_font_data_base85_byteCount); + native_compressed_font_data_base85[native_compressed_font_data_base85_offset] = 0; + } + else { native_compressed_font_data_base85 = null; } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, native_font_cfg, glyph_ranges); + if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_compressed_font_data_base85); + } + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedBase85TTF(string compressed_font_data_base85, float size_pixels, ImFontConfigPtr font_cfg, IntPtr glyph_ranges) + { + byte* native_compressed_font_data_base85; + int compressed_font_data_base85_byteCount = 0; + if (compressed_font_data_base85 != null) + { + compressed_font_data_base85_byteCount = Encoding.UTF8.GetByteCount(compressed_font_data_base85); + if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) + { + native_compressed_font_data_base85 = Util.Allocate(compressed_font_data_base85_byteCount + 1); + } + else + { + byte* native_compressed_font_data_base85_stackBytes = stackalloc byte[compressed_font_data_base85_byteCount + 1]; + native_compressed_font_data_base85 = native_compressed_font_data_base85_stackBytes; + } + int native_compressed_font_data_base85_offset = Util.GetUtf8(compressed_font_data_base85, native_compressed_font_data_base85, compressed_font_data_base85_byteCount); + native_compressed_font_data_base85[native_compressed_font_data_base85_offset] = 0; + } + else { native_compressed_font_data_base85 = null; } + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedBase85TTF((ImFontAtlas*)(NativePtr), native_compressed_font_data_base85, size_pixels, native_font_cfg, native_glyph_ranges); + if (compressed_font_data_base85_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_compressed_font_data_base85); + } + return new ImFontPtr(ret); + } + public ImFontPtr AddFontFromMemoryCompressedTTF(IntPtr compressed_font_data, int compressed_font_size, float size_pixels) + { + void* native_compressed_font_data = (void*)compressed_font_data.ToPointer(); + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(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 = (void*)compressed_font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(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, IntPtr glyph_ranges) + { + void* native_compressed_font_data = (void*)compressed_font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryCompressedTTF((ImFontAtlas*)(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 = (void*)font_data.ToPointer(); + ImFontConfig* font_cfg = null; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(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 = (void*)font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* glyph_ranges = null; + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(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, IntPtr glyph_ranges) + { + void* native_font_data = (void*)font_data.ToPointer(); + ImFontConfig* native_font_cfg = font_cfg.NativePtr; + ushort* native_glyph_ranges = (ushort*)glyph_ranges.ToPointer(); + ImFont* ret = ImGuiNative.ImFontAtlas_AddFontFromMemoryTTF((ImFontAtlas*)(NativePtr), native_font_data, font_size, size_pixels, native_font_cfg, native_glyph_ranges); + return new ImFontPtr(ret); + } + public bool Build() + { + byte ret = ImGuiNative.ImFontAtlas_Build((ImFontAtlas*)(NativePtr)); + return ret != 0; + } + public void CalcCustomRectUV(ImFontAtlasCustomRectPtr rect, out Vector2 out_uv_min, out Vector2 out_uv_max) + { + ImFontAtlasCustomRect* native_rect = rect.NativePtr; + fixed (Vector2* native_out_uv_min = &out_uv_min) + { + fixed (Vector2* native_out_uv_max = &out_uv_max) + { + ImGuiNative.ImFontAtlas_CalcCustomRectUV((ImFontAtlas*)(NativePtr), native_rect, native_out_uv_min, native_out_uv_max); + } + } + } + public void Clear() + { + ImGuiNative.ImFontAtlas_Clear((ImFontAtlas*)(NativePtr)); + } + public void ClearFonts() + { + ImGuiNative.ImFontAtlas_ClearFonts((ImFontAtlas*)(NativePtr)); + } + public void ClearInputData() + { + ImGuiNative.ImFontAtlas_ClearInputData((ImFontAtlas*)(NativePtr)); + } + public void ClearTexData() + { + ImGuiNative.ImFontAtlas_ClearTexData((ImFontAtlas*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImFontAtlas_destroy((ImFontAtlas*)(NativePtr)); + } + public ImFontAtlasCustomRectPtr GetCustomRectByIndex(int index) + { + ImFontAtlasCustomRect* ret = ImGuiNative.ImFontAtlas_GetCustomRectByIndex((ImFontAtlas*)(NativePtr), index); + return new ImFontAtlasCustomRectPtr(ret); + } + public IntPtr GetGlyphRangesChineseFull() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseFull((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesChineseSimplifiedCommon() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesCyrillic() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesCyrillic((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesDefault() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesDefault((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesJapanese() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesJapanese((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesKorean() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesKorean((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesThai() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesThai((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + public IntPtr GetGlyphRangesVietnamese() + { + ushort* ret = ImGuiNative.ImFontAtlas_GetGlyphRangesVietnamese((ImFontAtlas*)(NativePtr)); + return (IntPtr)ret; + } + 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((ImFontAtlas*)(NativePtr), cursor, native_out_offset, native_out_size, native_out_uv_border, native_out_uv_fill); + return ret != 0; + } + } + } + } + } + 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((ImFontAtlas*)(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((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + } + } + } + } + } + public void GetTexDataAsAlpha8(out IntPtr out_pixels, out int out_width, out int out_height) + { + int* out_bytes_per_pixel = null; + fixed (IntPtr* native_out_pixels = &out_pixels) + { + fixed (int* native_out_width = &out_width) + { + fixed (int* native_out_height = &out_height) + { + ImGuiNative.ImFontAtlas_GetTexDataAsAlpha8((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + } + } + } + } + public void GetTexDataAsAlpha8(out IntPtr out_pixels, out int out_width, out int out_height, out int out_bytes_per_pixel) + { + fixed (IntPtr* 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((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + } + } + } + } + } + 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((ImFontAtlas*)(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((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + } + } + } + } + } + public void GetTexDataAsRGBA32(out IntPtr out_pixels, out int out_width, out int out_height) + { + int* out_bytes_per_pixel = null; + fixed (IntPtr* native_out_pixels = &out_pixels) + { + fixed (int* native_out_width = &out_width) + { + fixed (int* native_out_height = &out_height) + { + ImGuiNative.ImFontAtlas_GetTexDataAsRGBA32((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, out_bytes_per_pixel); + } + } + } + } + public void GetTexDataAsRGBA32(out IntPtr out_pixels, out int out_width, out int out_height, out int out_bytes_per_pixel) + { + fixed (IntPtr* 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((ImFontAtlas*)(NativePtr), native_out_pixels, native_out_width, native_out_height, native_out_bytes_per_pixel); + } + } + } + } + } + public bool IsBuilt() + { + byte ret = ImGuiNative.ImFontAtlas_IsBuilt((ImFontAtlas*)(NativePtr)); + return ret != 0; + } + public void SetTexID(IntPtr id) + { + ImGuiNative.ImFontAtlas_SetTexID((ImFontAtlas*)(NativePtr), id); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImFontAtlasCustomRect.gen.cs b/lib/ImGui.NET/Generated/ImFontAtlasCustomRect.gen.cs new file mode 100644 index 0000000..10ce3ef --- /dev/null +++ b/lib/ImGui.NET/Generated/ImFontAtlasCustomRect.gen.cs @@ -0,0 +1,45 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFontAtlasCustomRect + { + public ushort Width; + public ushort Height; + public ushort X; + public ushort Y; + public uint GlyphID; + public float GlyphAdvanceX; + public Vector2 GlyphOffset; + public ImFont* Font; + } + public unsafe partial struct ImFontAtlasCustomRectPtr + { + public ImFontAtlasCustomRect* NativePtr { get; } + public ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => NativePtr = nativePtr; + public ImFontAtlasCustomRectPtr(IntPtr nativePtr) => NativePtr = (ImFontAtlasCustomRect*)nativePtr; + public static implicit operator ImFontAtlasCustomRectPtr(ImFontAtlasCustomRect* nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr); + public static implicit operator ImFontAtlasCustomRect* (ImFontAtlasCustomRectPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImFontAtlasCustomRectPtr(IntPtr nativePtr) => new ImFontAtlasCustomRectPtr(nativePtr); + 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 uint GlyphID => ref Unsafe.AsRef(&NativePtr->GlyphID); + 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 void Destroy() + { + ImGuiNative.ImFontAtlasCustomRect_destroy((ImFontAtlasCustomRect*)(NativePtr)); + } + public bool IsPacked() + { + byte ret = ImGuiNative.ImFontAtlasCustomRect_IsPacked((ImFontAtlasCustomRect*)(NativePtr)); + return ret != 0; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImFontAtlasFlags.gen.cs b/lib/ImGui.NET/Generated/ImFontAtlasFlags.gen.cs new file mode 100644 index 0000000..336f53e --- /dev/null +++ b/lib/ImGui.NET/Generated/ImFontAtlasFlags.gen.cs @@ -0,0 +1,11 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImFontAtlasFlags + { + None = 0, + NoPowerOfTwoHeight = 1, + NoMouseCursors = 2, + NoBakedLines = 4, + } +} diff --git a/lib/ImGui.NET/Generated/ImFontConfig.gen.cs b/lib/ImGui.NET/Generated/ImFontConfig.gen.cs new file mode 100644 index 0000000..38d82b5 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImFontConfig.gen.cs @@ -0,0 +1,62 @@ +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 FontBuilderFlags; + public float RasterizerMultiply; + public ushort EllipsisChar; + 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 bool 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 bool 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 bool MergeMode => ref Unsafe.AsRef(&NativePtr->MergeMode); + public ref uint FontBuilderFlags => ref Unsafe.AsRef(&NativePtr->FontBuilderFlags); + public ref float RasterizerMultiply => ref Unsafe.AsRef(&NativePtr->RasterizerMultiply); + public ref ushort EllipsisChar => ref Unsafe.AsRef(&NativePtr->EllipsisChar); + public RangeAccessor Name => new RangeAccessor(NativePtr->Name, 40); + public ImFontPtr DstFont => new ImFontPtr(NativePtr->DstFont); + public void Destroy() + { + ImGuiNative.ImFontConfig_destroy((ImFontConfig*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImFontGlyph.gen.cs b/lib/ImGui.NET/Generated/ImFontGlyph.gen.cs new file mode 100644 index 0000000..8a78d6f --- /dev/null +++ b/lib/ImGui.NET/Generated/ImFontGlyph.gen.cs @@ -0,0 +1,44 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFontGlyph + { + public uint Colored; + public uint Visible; + public uint 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 uint Colored => ref Unsafe.AsRef(&NativePtr->Colored); + public ref uint Visible => ref Unsafe.AsRef(&NativePtr->Visible); + public ref uint 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/lib/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs b/lib/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs new file mode 100644 index 0000000..ed28e2b --- /dev/null +++ b/lib/ImGui.NET/Generated/ImFontGlyphRangesBuilder.gen.cs @@ -0,0 +1,82 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImFontGlyphRangesBuilder + { + public ImVector UsedChars; + } + public unsafe partial struct ImFontGlyphRangesBuilderPtr + { + public ImFontGlyphRangesBuilder* NativePtr { get; } + public ImFontGlyphRangesBuilderPtr(ImFontGlyphRangesBuilder* nativePtr) => NativePtr = nativePtr; + public ImFontGlyphRangesBuilderPtr(IntPtr nativePtr) => NativePtr = (ImFontGlyphRangesBuilder*)nativePtr; + public static implicit operator ImFontGlyphRangesBuilderPtr(ImFontGlyphRangesBuilder* nativePtr) => new ImFontGlyphRangesBuilderPtr(nativePtr); + public static implicit operator ImFontGlyphRangesBuilder* (ImFontGlyphRangesBuilderPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImFontGlyphRangesBuilderPtr(IntPtr nativePtr) => new ImFontGlyphRangesBuilderPtr(nativePtr); + public ImVector UsedChars => new ImVector(NativePtr->UsedChars); + public void AddChar(ushort c) + { + ImGuiNative.ImFontGlyphRangesBuilder_AddChar((ImFontGlyphRangesBuilder*)(NativePtr), c); + } + public void AddRanges(IntPtr ranges) + { + ushort* native_ranges = (ushort*)ranges.ToPointer(); + ImGuiNative.ImFontGlyphRangesBuilder_AddRanges((ImFontGlyphRangesBuilder*)(NativePtr), native_ranges); + } + public void AddText(string text) + { + byte* native_text; + int text_byteCount = 0; + if (text != null) + { + text_byteCount = Encoding.UTF8.GetByteCount(text); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + native_text = Util.Allocate(text_byteCount + 1); + } + else + { + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + } + int native_text_offset = Util.GetUtf8(text, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + else { native_text = null; } + byte* native_text_end = null; + ImGuiNative.ImFontGlyphRangesBuilder_AddText((ImFontGlyphRangesBuilder*)(NativePtr), native_text, native_text_end); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_text); + } + } + public void BuildRanges(out ImVector out_ranges) + { + fixed (ImVector* native_out_ranges = &out_ranges) + { + ImGuiNative.ImFontGlyphRangesBuilder_BuildRanges((ImFontGlyphRangesBuilder*)(NativePtr), native_out_ranges); + } + } + public void Clear() + { + ImGuiNative.ImFontGlyphRangesBuilder_Clear((ImFontGlyphRangesBuilder*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImFontGlyphRangesBuilder_destroy((ImFontGlyphRangesBuilder*)(NativePtr)); + } + public bool GetBit(uint n) + { + byte ret = ImGuiNative.ImFontGlyphRangesBuilder_GetBit((ImFontGlyphRangesBuilder*)(NativePtr), n); + return ret != 0; + } + public void SetBit(uint n) + { + ImGuiNative.ImFontGlyphRangesBuilder_SetBit((ImFontGlyphRangesBuilder*)(NativePtr), n); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGui.gen.cs b/lib/ImGui.NET/Generated/ImGui.gen.cs new file mode 100644 index 0000000..8949b39 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGui.gen.cs @@ -0,0 +1,14451 @@ +using System; +using System.Numerics; +using System.Runtime.InteropServices; +using System.Text; + +namespace ImGuiNET +{ + public static unsafe partial class ImGui + { + public static ImGuiPayloadPtr AcceptDragDropPayload(string type) + { + byte* native_type; + int type_byteCount = 0; + if (type != null) + { + type_byteCount = Encoding.UTF8.GetByteCount(type); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + native_type = Util.Allocate(type_byteCount + 1); + } + else + { + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + } + int native_type_offset = Util.GetUtf8(type, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + else { native_type = null; } + ImGuiDragDropFlags flags = (ImGuiDragDropFlags)0; + ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_type); + } + return new ImGuiPayloadPtr(ret); + } + public static ImGuiPayloadPtr AcceptDragDropPayload(string type, ImGuiDragDropFlags flags) + { + byte* native_type; + int type_byteCount = 0; + if (type != null) + { + type_byteCount = Encoding.UTF8.GetByteCount(type); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + native_type = Util.Allocate(type_byteCount + 1); + } + else + { + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + } + int native_type_offset = Util.GetUtf8(type, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + else { native_type = null; } + ImGuiPayload* ret = ImGuiNative.igAcceptDragDropPayload(native_type, flags); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_type); + } + return new ImGuiPayloadPtr(ret); + } + public static void AlignTextToFramePadding() + { + ImGuiNative.igAlignTextToFramePadding(); + } + public static bool ArrowButton(string str_id, ImGuiDir dir) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igArrowButton(native_str_id, dir); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool Begin(string name) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + byte* p_open = null; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBegin(native_name, p_open, flags); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + return ret != 0; + } + public static bool Begin(string name, ref bool p_open) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBegin(native_name, native_p_open, flags); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool Begin(string name, ref bool p_open, ImGuiWindowFlags flags) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + 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); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool BeginChild(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + Vector2 size = new Vector2(); + byte border = 0; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, border, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte border = 0; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, border, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size, bool border) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte native_border = border ? (byte)1 : (byte)0; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, native_border, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginChild(string str_id, Vector2 size, bool border, ImGuiWindowFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte native_border = border ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginChild_Str(native_str_id, size, native_border, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginChild(uint id) + { + Vector2 size = new Vector2(); + byte border = 0; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginChild_ID(id, size, border, flags); + return ret != 0; + } + public static bool BeginChild(uint id, Vector2 size) + { + byte border = 0; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginChild_ID(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 = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginChild_ID(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.igBeginChild_ID(id, size, native_border, flags); + return ret != 0; + } + public static bool BeginChildFrame(uint id, Vector2 size) + { + ImGuiWindowFlags flags = (ImGuiWindowFlags)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 bool BeginCombo(string label, string preview_value) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_preview_value; + int preview_value_byteCount = 0; + if (preview_value != null) + { + preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); + if (preview_value_byteCount > Util.StackAllocationSizeLimit) + { + native_preview_value = Util.Allocate(preview_value_byteCount + 1); + } + else + { + byte* native_preview_value_stackBytes = stackalloc byte[preview_value_byteCount + 1]; + native_preview_value = native_preview_value_stackBytes; + } + int native_preview_value_offset = Util.GetUtf8(preview_value, native_preview_value, preview_value_byteCount); + native_preview_value[native_preview_value_offset] = 0; + } + else { native_preview_value = null; } + ImGuiComboFlags flags = (ImGuiComboFlags)0; + byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (preview_value_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_preview_value); + } + return ret != 0; + } + public static bool BeginCombo(string label, string preview_value, ImGuiComboFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_preview_value; + int preview_value_byteCount = 0; + if (preview_value != null) + { + preview_value_byteCount = Encoding.UTF8.GetByteCount(preview_value); + if (preview_value_byteCount > Util.StackAllocationSizeLimit) + { + native_preview_value = Util.Allocate(preview_value_byteCount + 1); + } + else + { + byte* native_preview_value_stackBytes = stackalloc byte[preview_value_byteCount + 1]; + native_preview_value = native_preview_value_stackBytes; + } + int native_preview_value_offset = Util.GetUtf8(preview_value, native_preview_value, preview_value_byteCount); + native_preview_value[native_preview_value_offset] = 0; + } + else { native_preview_value = null; } + byte ret = ImGuiNative.igBeginCombo(native_label, native_preview_value, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (preview_value_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_preview_value); + } + return ret != 0; + } + public static void BeginDisabled() + { + byte disabled = 1; + ImGuiNative.igBeginDisabled(disabled); + } + public static void BeginDisabled(bool disabled) + { + byte native_disabled = disabled ? (byte)1 : (byte)0; + ImGuiNative.igBeginDisabled(native_disabled); + } + public static bool BeginDragDropSource() + { + ImGuiDragDropFlags flags = (ImGuiDragDropFlags)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 bool BeginDragDropTarget() + { + byte ret = ImGuiNative.igBeginDragDropTarget(); + return ret != 0; + } + public static void BeginGroup() + { + ImGuiNative.igBeginGroup(); + } + public static bool BeginListBox(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igBeginListBox(native_label, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool BeginListBox(string label, Vector2 size) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igBeginListBox(native_label, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool BeginMainMenuBar() + { + byte ret = ImGuiNative.igBeginMainMenuBar(); + return ret != 0; + } + public static bool BeginMenu(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte enabled = 1; + byte ret = ImGuiNative.igBeginMenu(native_label, enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool BeginMenu(string label, bool enabled) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igBeginMenu(native_label, native_enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool BeginMenuBar() + { + byte ret = ImGuiNative.igBeginMenuBar(); + return ret != 0; + } + public static bool BeginPopup(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopup(string str_id, ImGuiWindowFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginPopup(native_str_id, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopupContextItem() + { + byte* native_str_id = null; + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, popup_flags); + return ret != 0; + } + public static bool BeginPopupContextItem(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopupContextItem(string str_id, ImGuiPopupFlags popup_flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginPopupContextItem(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopupContextVoid() + { + byte* native_str_id = null; + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, popup_flags); + return ret != 0; + } + public static bool BeginPopupContextVoid(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopupContextVoid(string str_id, ImGuiPopupFlags popup_flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginPopupContextVoid(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopupContextWindow() + { + byte* native_str_id = null; + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, popup_flags); + return ret != 0; + } + public static bool BeginPopupContextWindow(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopupContextWindow(string str_id, ImGuiPopupFlags popup_flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginPopupContextWindow(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginPopupModal(string name) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + byte* p_open = null; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginPopupModal(native_name, p_open, flags); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + return ret != 0; + } + public static bool BeginPopupModal(string name, ref bool p_open) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiWindowFlags flags = (ImGuiWindowFlags)0; + byte ret = ImGuiNative.igBeginPopupModal(native_name, native_p_open, flags); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool BeginPopupModal(string name, ref bool p_open, ImGuiWindowFlags flags) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + 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); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool BeginTabBar(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiTabBarFlags flags = (ImGuiTabBarFlags)0; + byte ret = ImGuiNative.igBeginTabBar(native_str_id, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTabBar(string str_id, ImGuiTabBarFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginTabBar(native_str_id, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTabItem(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* p_open = null; + ImGuiTabItemFlags flags = (ImGuiTabItemFlags)0; + byte ret = ImGuiNative.igBeginTabItem(native_label, p_open, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool BeginTabItem(string label, ref bool p_open) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiTabItemFlags flags = (ImGuiTabItemFlags)0; + byte ret = ImGuiNative.igBeginTabItem(native_label, native_p_open, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool BeginTabItem(string label, ref bool p_open, ImGuiTabItemFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + byte ret = ImGuiNative.igBeginTabItem(native_label, native_p_open, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + p_open = native_p_open_val != 0; + return ret != 0; + } + public static bool BeginTable(string str_id, int column) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiTableFlags flags = (ImGuiTableFlags)0; + Vector2 outer_size = new Vector2(); + float inner_width = 0.0f; + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTable(string str_id, int column, ImGuiTableFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + Vector2 outer_size = new Vector2(); + float inner_width = 0.0f; + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTable(string str_id, int column, ImGuiTableFlags flags, Vector2 outer_size) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + float inner_width = 0.0f; + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool BeginTable(string str_id, int column, ImGuiTableFlags flags, Vector2 outer_size, float inner_width) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igBeginTable(native_str_id, column, flags, outer_size, inner_width); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static void BeginTooltip() + { + ImGuiNative.igBeginTooltip(); + } + public static void Bullet() + { + ImGuiNative.igBullet(); + } + public static void BulletText(string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igBulletText(native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static bool Button(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igButton(native_label, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool Button(string label, Vector2 size) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igButton(native_label, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static float CalcItemWidth() + { + float ret = ImGuiNative.igCalcItemWidth(); + return ret; + } + public static void CaptureKeyboardFromApp() + { + byte want_capture_keyboard_value = 1; + ImGuiNative.igCaptureKeyboardFromApp(want_capture_keyboard_value); + } + public static void CaptureKeyboardFromApp(bool want_capture_keyboard_value) + { + byte native_want_capture_keyboard_value = want_capture_keyboard_value ? (byte)1 : (byte)0; + ImGuiNative.igCaptureKeyboardFromApp(native_want_capture_keyboard_value); + } + public static void CaptureMouseFromApp() + { + byte want_capture_mouse_value = 1; + ImGuiNative.igCaptureMouseFromApp(want_capture_mouse_value); + } + public static void CaptureMouseFromApp(bool want_capture_mouse_value) + { + byte native_want_capture_mouse_value = want_capture_mouse_value ? (byte)1 : (byte)0; + ImGuiNative.igCaptureMouseFromApp(native_want_capture_mouse_value); + } + public static bool Checkbox(string label, ref bool v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_v_val = v ? (byte)1 : (byte)0; + byte* native_v = &native_v_val; + byte ret = ImGuiNative.igCheckbox(native_label, native_v); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + v = native_v_val != 0; + return ret != 0; + } + public static bool CheckboxFlags(string label, ref int flags, int flags_value) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (int* native_flags = &flags) + { + byte ret = ImGuiNative.igCheckboxFlags_IntPtr(native_label, native_flags, flags_value); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool CheckboxFlags(string label, ref uint flags, uint flags_value) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (uint* native_flags = &flags) + { + byte ret = ImGuiNative.igCheckboxFlags_UintPtr(native_label, native_flags, flags_value); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static void CloseCurrentPopup() + { + ImGuiNative.igCloseCurrentPopup(); + } + public static bool CollapsingHeader(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiTreeNodeFlags flags = (ImGuiTreeNodeFlags)0; + byte ret = ImGuiNative.igCollapsingHeader_TreeNodeFlags(native_label, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool CollapsingHeader(string label, ImGuiTreeNodeFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igCollapsingHeader_TreeNodeFlags(native_label, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool CollapsingHeader(string label, ref bool p_visible) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_p_visible_val = p_visible ? (byte)1 : (byte)0; + byte* native_p_visible = &native_p_visible_val; + ImGuiTreeNodeFlags flags = (ImGuiTreeNodeFlags)0; + byte ret = ImGuiNative.igCollapsingHeader_BoolPtr(native_label, native_p_visible, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + p_visible = native_p_visible_val != 0; + return ret != 0; + } + public static bool CollapsingHeader(string label, ref bool p_visible, ImGuiTreeNodeFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_p_visible_val = p_visible ? (byte)1 : (byte)0; + byte* native_p_visible = &native_p_visible_val; + byte ret = ImGuiNative.igCollapsingHeader_BoolPtr(native_label, native_p_visible, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + p_visible = native_p_visible_val != 0; + return ret != 0; + } + public static bool ColorButton(string desc_id, Vector4 col) + { + byte* native_desc_id; + int desc_id_byteCount = 0; + if (desc_id != null) + { + desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + if (desc_id_byteCount > Util.StackAllocationSizeLimit) + { + native_desc_id = Util.Allocate(desc_id_byteCount + 1); + } + else + { + byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; + native_desc_id = native_desc_id_stackBytes; + } + int native_desc_id_offset = Util.GetUtf8(desc_id, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; + } + else { native_desc_id = null; } + ImGuiColorEditFlags flags = (ImGuiColorEditFlags)0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + if (desc_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_desc_id); + } + return ret != 0; + } + public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags) + { + byte* native_desc_id; + int desc_id_byteCount = 0; + if (desc_id != null) + { + desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + if (desc_id_byteCount > Util.StackAllocationSizeLimit) + { + native_desc_id = Util.Allocate(desc_id_byteCount + 1); + } + else + { + byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; + native_desc_id = native_desc_id_stackBytes; + } + int native_desc_id_offset = Util.GetUtf8(desc_id, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; + } + else { native_desc_id = null; } + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + if (desc_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_desc_id); + } + return ret != 0; + } + public static bool ColorButton(string desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size) + { + byte* native_desc_id; + int desc_id_byteCount = 0; + if (desc_id != null) + { + desc_id_byteCount = Encoding.UTF8.GetByteCount(desc_id); + if (desc_id_byteCount > Util.StackAllocationSizeLimit) + { + native_desc_id = Util.Allocate(desc_id_byteCount + 1); + } + else + { + byte* native_desc_id_stackBytes = stackalloc byte[desc_id_byteCount + 1]; + native_desc_id = native_desc_id_stackBytes; + } + int native_desc_id_offset = Util.GetUtf8(desc_id, native_desc_id, desc_id_byteCount); + native_desc_id[native_desc_id_offset] = 0; + } + else { native_desc_id = null; } + byte ret = ImGuiNative.igColorButton(native_desc_id, col, flags, size); + if (desc_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_desc_id); + } + return ret != 0; + } + public static uint ColorConvertFloat4ToU32(Vector4 @in) + { + uint ret = ImGuiNative.igColorConvertFloat4ToU32(@in); + return ret; + } + 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 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 Vector4 ColorConvertU32ToFloat4(uint @in) + { + Vector4 __retval; + ImGuiNative.igColorConvertU32ToFloat4(&__retval, @in); + return __retval; + } + public static bool ColorEdit3(string label, ref Vector3 col) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiColorEditFlags flags = (ImGuiColorEditFlags)0; + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorEdit3(string label, ref Vector3 col, ImGuiColorEditFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit3(native_label, native_col, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorEdit4(string label, ref Vector4 col) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiColorEditFlags flags = (ImGuiColorEditFlags)0; + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorEdit4(string label, ref Vector4 col, ImGuiColorEditFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorEdit4(native_label, native_col, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorPicker3(string label, ref Vector3 col) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiColorEditFlags flags = (ImGuiColorEditFlags)0; + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorPicker3(string label, ref Vector3 col, ImGuiColorEditFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (Vector3* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker3(native_label, native_col, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorPicker4(string label, ref Vector4 col) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiColorEditFlags flags = (ImGuiColorEditFlags)0; + float* ref_col = null; + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float* ref_col = null; + fixed (Vector4* native_col = &col) + { + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, ref_col); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ColorPicker4(string label, ref Vector4 col, ImGuiColorEditFlags flags, ref float ref_col) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (Vector4* native_col = &col) + { + fixed (float* native_ref_col = &ref_col) + { + byte ret = ImGuiNative.igColorPicker4(native_label, native_col, flags, native_ref_col); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + } + 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) + { + byte* native_id; + int id_byteCount = 0; + if (id != null) + { + id_byteCount = Encoding.UTF8.GetByteCount(id); + if (id_byteCount > Util.StackAllocationSizeLimit) + { + native_id = Util.Allocate(id_byteCount + 1); + } + else + { + byte* native_id_stackBytes = stackalloc byte[id_byteCount + 1]; + native_id = native_id_stackBytes; + } + int native_id_offset = Util.GetUtf8(id, native_id, id_byteCount); + native_id[native_id_offset] = 0; + } + else { native_id = null; } + byte border = 1; + ImGuiNative.igColumns(count, native_id, border); + if (id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_id); + } + } + public static void Columns(int count, string id, bool border) + { + byte* native_id; + int id_byteCount = 0; + if (id != null) + { + id_byteCount = Encoding.UTF8.GetByteCount(id); + if (id_byteCount > Util.StackAllocationSizeLimit) + { + native_id = Util.Allocate(id_byteCount + 1); + } + else + { + byte* native_id_stackBytes = stackalloc byte[id_byteCount + 1]; + native_id = native_id_stackBytes; + } + int native_id_offset = Util.GetUtf8(id, native_id, id_byteCount); + native_id[native_id_offset] = 0; + } + else { native_id = null; } + byte native_border = border ? (byte)1 : (byte)0; + ImGuiNative.igColumns(count, native_id, native_border); + if (id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_id); + } + } + public static bool Combo(string label, ref int current_item, string[] items, int items_count) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + 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]); + native_items_data[offset] = 0; + offset += 1; + } + } + 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_Str_arr(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool Combo(string label, ref int current_item, string[] items, int items_count, int popup_max_height_in_items) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + 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]); + native_items_data[offset] = 0; + offset += 1; + } + } + 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_Str_arr(native_label, native_current_item, native_items, items_count, popup_max_height_in_items); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool Combo(string label, ref int current_item, string items_separated_by_zeros) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_items_separated_by_zeros; + int items_separated_by_zeros_byteCount = 0; + if (items_separated_by_zeros != null) + { + items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); + if (items_separated_by_zeros_byteCount > Util.StackAllocationSizeLimit) + { + native_items_separated_by_zeros = Util.Allocate(items_separated_by_zeros_byteCount + 1); + } + else + { + byte* native_items_separated_by_zeros_stackBytes = stackalloc byte[items_separated_by_zeros_byteCount + 1]; + native_items_separated_by_zeros = native_items_separated_by_zeros_stackBytes; + } + int native_items_separated_by_zeros_offset = Util.GetUtf8(items_separated_by_zeros, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); + native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; + } + else { native_items_separated_by_zeros = null; } + int popup_max_height_in_items = -1; + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igCombo_Str(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (items_separated_by_zeros_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_items_separated_by_zeros); + } + return ret != 0; + } + } + public static bool Combo(string label, ref int current_item, string items_separated_by_zeros, int popup_max_height_in_items) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_items_separated_by_zeros; + int items_separated_by_zeros_byteCount = 0; + if (items_separated_by_zeros != null) + { + items_separated_by_zeros_byteCount = Encoding.UTF8.GetByteCount(items_separated_by_zeros); + if (items_separated_by_zeros_byteCount > Util.StackAllocationSizeLimit) + { + native_items_separated_by_zeros = Util.Allocate(items_separated_by_zeros_byteCount + 1); + } + else + { + byte* native_items_separated_by_zeros_stackBytes = stackalloc byte[items_separated_by_zeros_byteCount + 1]; + native_items_separated_by_zeros = native_items_separated_by_zeros_stackBytes; + } + int native_items_separated_by_zeros_offset = Util.GetUtf8(items_separated_by_zeros, native_items_separated_by_zeros, items_separated_by_zeros_byteCount); + native_items_separated_by_zeros[native_items_separated_by_zeros_offset] = 0; + } + else { native_items_separated_by_zeros = null; } + fixed (int* native_current_item = ¤t_item) + { + byte ret = ImGuiNative.igCombo_Str(native_label, native_current_item, native_items_separated_by_zeros, popup_max_height_in_items); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (items_separated_by_zeros_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_items_separated_by_zeros); + } + return ret != 0; + } + } + 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 bool DebugCheckVersionAndDataLayout(string version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert, uint sz_drawidx) + { + byte* native_version_str; + int version_str_byteCount = 0; + if (version_str != null) + { + version_str_byteCount = Encoding.UTF8.GetByteCount(version_str); + if (version_str_byteCount > Util.StackAllocationSizeLimit) + { + native_version_str = Util.Allocate(version_str_byteCount + 1); + } + else + { + byte* native_version_str_stackBytes = stackalloc byte[version_str_byteCount + 1]; + native_version_str = native_version_str_stackBytes; + } + int native_version_str_offset = Util.GetUtf8(version_str, native_version_str, version_str_byteCount); + native_version_str[native_version_str_offset] = 0; + } + else { native_version_str = null; } + byte ret = ImGuiNative.igDebugCheckVersionAndDataLayout(native_version_str, sz_io, sz_style, sz_vec2, sz_vec4, sz_drawvert, sz_drawidx); + if (version_str_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_version_str); + } + return ret != 0; + } + public static void DestroyContext() + { + IntPtr ctx = IntPtr.Zero; + ImGuiNative.igDestroyContext(ctx); + } + public static void DestroyContext(IntPtr ctx) + { + ImGuiNative.igDestroyContext(ctx); + } + public static void DestroyPlatformWindows() + { + ImGuiNative.igDestroyPlatformWindows(); + } + public static uint DockSpace(uint id) + { + Vector2 size = new Vector2(); + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class); + return ret; + } + public static uint DockSpace(uint id, Vector2 size) + { + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class); + return ret; + } + public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags) + { + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpace(id, size, flags, window_class); + return ret; + } + public static uint DockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class) + { + ImGuiWindowClass* native_window_class = window_class.NativePtr; + uint ret = ImGuiNative.igDockSpace(id, size, flags, native_window_class); + return ret; + } + public static uint DockSpaceOverViewport() + { + ImGuiViewport* viewport = null; + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpaceOverViewport(viewport, flags, window_class); + return ret; + } + public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImGuiDockNodeFlags flags = (ImGuiDockNodeFlags)0; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class); + return ret; + } + public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImGuiWindowClass* window_class = null; + uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, window_class); + return ret; + } + public static uint DockSpaceOverViewport(ImGuiViewportPtr viewport, ImGuiDockNodeFlags flags, ImGuiWindowClassPtr window_class) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImGuiWindowClass* native_window_class = window_class.NativePtr; + uint ret = ImGuiNative.igDockSpaceOverViewport(native_viewport, flags, native_window_class); + return ret; + } + public static bool DragFloat(string label, ref float v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat(string label, ref float v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat2(string label, ref Vector2 v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat3(string label, ref Vector3 v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloat4(string label, ref Vector4 v, float v_speed, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igDragFloat4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + } + public static bool DragFloatRange2(string label, ref float v_current_min, ref float v_current_max, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_min = 0.0f; + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_max = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte* native_format_max; + int format_max_byteCount = 0; + if (format_max != null) + { + format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + native_format_max = Util.Allocate(format_max_byteCount + 1); + } + else + { + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + } + int native_format_max_offset = Util.GetUtf8(format_max, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + else { native_format_max = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format_max); + } + 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, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte* native_format_max; + int format_max_byteCount = 0; + if (format_max != null) + { + format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + native_format_max = Util.Allocate(format_max_byteCount + 1); + } + else + { + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + } + int native_format_max_offset = Util.GetUtf8(format_max, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + else { native_format_max = null; } + 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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format_max); + } + return ret != 0; + } + } + } + public static bool DragInt(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed, int v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt(string label, ref int v, float v_speed, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v, float v_speed, int v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt2(string label, ref int v, float v_speed, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt2(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed, int v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt3(string label, ref int v, float v_speed, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt3(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed, int v_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragInt4(string label, ref int v, float v_speed, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igDragInt4(native_label, native_v, v_speed, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_speed = 1.0f; + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + } + public static bool DragIntRange2(string label, ref int v_current_min, ref int v_current_max, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_min = 0; + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int v_max = 0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte* native_format_max = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte* native_format_max; + int format_max_byteCount = 0; + if (format_max != null) + { + format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + native_format_max = Util.Allocate(format_max_byteCount + 1); + } + else + { + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + } + int native_format_max_offset = Util.GetUtf8(format_max, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + else { native_format_max = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(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, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte* native_format_max; + int format_max_byteCount = 0; + if (format_max != null) + { + format_max_byteCount = Encoding.UTF8.GetByteCount(format_max); + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + native_format_max = Util.Allocate(format_max_byteCount + 1); + } + else + { + byte* native_format_max_stackBytes = stackalloc byte[format_max_byteCount + 1]; + native_format_max = native_format_max_stackBytes; + } + int native_format_max_offset = Util.GetUtf8(format_max, native_format_max, format_max_byteCount); + native_format_max[native_format_max_offset] = 0; + } + else { 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, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + if (format_max_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format_max); + } + return ret != 0; + } + } + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + float v_speed = 1.0f; + void* p_min = null; + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* p_min = null; + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min, IntPtr p_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min, IntPtr p_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool DragScalar(string label, ImGuiDataType data_type, IntPtr p_data, float v_speed, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte ret = ImGuiNative.igDragScalar(native_label, data_type, native_p_data, v_speed, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + float v_speed = 1.0f; + void* p_min = null; + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* p_min = null; + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed, IntPtr p_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* p_max = null; + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed, IntPtr p_min, IntPtr p_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed, IntPtr p_min, IntPtr p_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool DragScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, float v_speed, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte ret = ImGuiNative.igDragScalarN(native_label, data_type, native_p_data, components, v_speed, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static void Dummy(Vector2 size) + { + ImGuiNative.igDummy(size); + } + public static void End() + { + ImGuiNative.igEnd(); + } + public static void EndChild() + { + ImGuiNative.igEndChild(); + } + public static void EndChildFrame() + { + ImGuiNative.igEndChildFrame(); + } + public static void EndCombo() + { + ImGuiNative.igEndCombo(); + } + public static void EndDisabled() + { + ImGuiNative.igEndDisabled(); + } + public static void EndDragDropSource() + { + ImGuiNative.igEndDragDropSource(); + } + public static void EndDragDropTarget() + { + ImGuiNative.igEndDragDropTarget(); + } + public static void EndFrame() + { + ImGuiNative.igEndFrame(); + } + public static void EndGroup() + { + ImGuiNative.igEndGroup(); + } + public static void EndListBox() + { + ImGuiNative.igEndListBox(); + } + public static void EndMainMenuBar() + { + ImGuiNative.igEndMainMenuBar(); + } + public static void EndMenu() + { + ImGuiNative.igEndMenu(); + } + public static void EndMenuBar() + { + ImGuiNative.igEndMenuBar(); + } + public static void EndPopup() + { + ImGuiNative.igEndPopup(); + } + public static void EndTabBar() + { + ImGuiNative.igEndTabBar(); + } + public static void EndTabItem() + { + ImGuiNative.igEndTabItem(); + } + public static void EndTable() + { + ImGuiNative.igEndTable(); + } + public static void EndTooltip() + { + ImGuiNative.igEndTooltip(); + } + public static ImGuiViewportPtr FindViewportByID(uint id) + { + ImGuiViewport* ret = ImGuiNative.igFindViewportByID(id); + return new ImGuiViewportPtr(ret); + } + public static ImGuiViewportPtr FindViewportByPlatformHandle(IntPtr platform_handle) + { + void* native_platform_handle = (void*)platform_handle.ToPointer(); + ImGuiViewport* ret = ImGuiNative.igFindViewportByPlatformHandle(native_platform_handle); + return new ImGuiViewportPtr(ret); + } + public static void GetAllocatorFunctions(ref IntPtr p_alloc_func, ref IntPtr p_free_func, ref void* p_user_data) + { + fixed (IntPtr* native_p_alloc_func = &p_alloc_func) + { + fixed (IntPtr* native_p_free_func = &p_free_func) + { + fixed (void** native_p_user_data = &p_user_data) + { + ImGuiNative.igGetAllocatorFunctions(native_p_alloc_func, native_p_free_func, native_p_user_data); + } + } + } + } + public static ImDrawListPtr GetBackgroundDrawList() + { + ImDrawList* ret = ImGuiNative.igGetBackgroundDrawList_Nil(); + return new ImDrawListPtr(ret); + } + public static ImDrawListPtr GetBackgroundDrawList(ImGuiViewportPtr viewport) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImDrawList* ret = ImGuiNative.igGetBackgroundDrawList_ViewportPtr(native_viewport); + return new ImDrawListPtr(ret); + } + public static string GetClipboardText() + { + byte* ret = ImGuiNative.igGetClipboardText(); + return Util.StringFromPtr(ret); + } + public static uint GetColorU32(ImGuiCol idx) + { + float alpha_mul = 1.0f; + uint ret = ImGuiNative.igGetColorU32_Col(idx, alpha_mul); + return ret; + } + public static uint GetColorU32(ImGuiCol idx, float alpha_mul) + { + uint ret = ImGuiNative.igGetColorU32_Col(idx, alpha_mul); + return ret; + } + public static uint GetColorU32(Vector4 col) + { + uint ret = ImGuiNative.igGetColorU32_Vec4(col); + return ret; + } + public static uint GetColorU32(uint col) + { + uint ret = ImGuiNative.igGetColorU32_U32(col); + return ret; + } + public static int GetColumnIndex() + { + int ret = ImGuiNative.igGetColumnIndex(); + return ret; + } + 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 int GetColumnsCount() + { + int ret = ImGuiNative.igGetColumnsCount(); + return 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 Vector2 GetContentRegionAvail() + { + Vector2 __retval; + ImGuiNative.igGetContentRegionAvail(&__retval); + return __retval; + } + public static Vector2 GetContentRegionMax() + { + Vector2 __retval; + ImGuiNative.igGetContentRegionMax(&__retval); + return __retval; + } + public static IntPtr GetCurrentContext() + { + IntPtr ret = ImGuiNative.igGetCurrentContext(); + return ret; + } + public static Vector2 GetCursorPos() + { + Vector2 __retval; + ImGuiNative.igGetCursorPos(&__retval); + return __retval; + } + public static float GetCursorPosX() + { + float ret = ImGuiNative.igGetCursorPosX(); + return ret; + } + public static float GetCursorPosY() + { + float ret = ImGuiNative.igGetCursorPosY(); + return ret; + } + public static Vector2 GetCursorScreenPos() + { + Vector2 __retval; + ImGuiNative.igGetCursorScreenPos(&__retval); + return __retval; + } + public static Vector2 GetCursorStartPos() + { + Vector2 __retval; + ImGuiNative.igGetCursorStartPos(&__retval); + return __retval; + } + public static ImGuiPayloadPtr GetDragDropPayload() + { + ImGuiPayload* ret = ImGuiNative.igGetDragDropPayload(); + return new ImGuiPayloadPtr(ret); + } + public static ImDrawDataPtr GetDrawData() + { + ImDrawData* ret = ImGuiNative.igGetDrawData(); + return new ImDrawDataPtr(ret); + } + public static IntPtr GetDrawListSharedData() + { + IntPtr ret = ImGuiNative.igGetDrawListSharedData(); + return ret; + } + public static ImFontPtr GetFont() + { + ImFont* ret = ImGuiNative.igGetFont(); + return new ImFontPtr(ret); + } + public static float GetFontSize() + { + float ret = ImGuiNative.igGetFontSize(); + return ret; + } + public static Vector2 GetFontTexUvWhitePixel() + { + Vector2 __retval; + ImGuiNative.igGetFontTexUvWhitePixel(&__retval); + return __retval; + } + public static ImDrawListPtr GetForegroundDrawList() + { + ImDrawList* ret = ImGuiNative.igGetForegroundDrawList_Nil(); + return new ImDrawListPtr(ret); + } + public static ImDrawListPtr GetForegroundDrawList(ImGuiViewportPtr viewport) + { + ImGuiViewport* native_viewport = viewport.NativePtr; + ImDrawList* ret = ImGuiNative.igGetForegroundDrawList_ViewportPtr(native_viewport); + return new ImDrawListPtr(ret); + } + public static int GetFrameCount() + { + int ret = ImGuiNative.igGetFrameCount(); + return ret; + } + public static float GetFrameHeight() + { + float ret = ImGuiNative.igGetFrameHeight(); + return ret; + } + public static float GetFrameHeightWithSpacing() + { + float ret = ImGuiNative.igGetFrameHeightWithSpacing(); + return ret; + } + public static uint GetID(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + uint ret = ImGuiNative.igGetID_Str(native_str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret; + } + public static uint GetID(IntPtr ptr_id) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + uint ret = ImGuiNative.igGetID_Ptr(native_ptr_id); + return ret; + } + public static ImGuiIOPtr GetIO() + { + ImGuiIO* ret = ImGuiNative.igGetIO(); + return new ImGuiIOPtr(ret); + } + public static Vector2 GetItemRectMax() + { + Vector2 __retval; + ImGuiNative.igGetItemRectMax(&__retval); + return __retval; + } + public static Vector2 GetItemRectMin() + { + Vector2 __retval; + ImGuiNative.igGetItemRectMin(&__retval); + return __retval; + } + public static Vector2 GetItemRectSize() + { + Vector2 __retval; + ImGuiNative.igGetItemRectSize(&__retval); + return __retval; + } + public static int GetKeyIndex(ImGuiKey key) + { + int ret = ImGuiNative.igGetKeyIndex(key); + return ret; + } + public static string GetKeyName(ImGuiKey key) + { + byte* ret = ImGuiNative.igGetKeyName(key); + return Util.StringFromPtr(ret); + } + public static int GetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate) + { + int ret = ImGuiNative.igGetKeyPressedAmount(key, repeat_delay, rate); + return ret; + } + public static ImGuiViewportPtr GetMainViewport() + { + ImGuiViewport* ret = ImGuiNative.igGetMainViewport(); + return new ImGuiViewportPtr(ret); + } + public static int GetMouseClickedCount(ImGuiMouseButton button) + { + int ret = ImGuiNative.igGetMouseClickedCount(button); + return ret; + } + public static ImGuiMouseCursor GetMouseCursor() + { + ImGuiMouseCursor ret = ImGuiNative.igGetMouseCursor(); + return ret; + } + public static Vector2 GetMouseDragDelta() + { + Vector2 __retval; + ImGuiMouseButton button = (ImGuiMouseButton)0; + float lock_threshold = -1.0f; + ImGuiNative.igGetMouseDragDelta(&__retval, button, lock_threshold); + return __retval; + } + public static Vector2 GetMouseDragDelta(ImGuiMouseButton button) + { + Vector2 __retval; + float lock_threshold = -1.0f; + ImGuiNative.igGetMouseDragDelta(&__retval, button, lock_threshold); + return __retval; + } + public static Vector2 GetMouseDragDelta(ImGuiMouseButton button, float lock_threshold) + { + Vector2 __retval; + ImGuiNative.igGetMouseDragDelta(&__retval, button, lock_threshold); + return __retval; + } + public static Vector2 GetMousePos() + { + Vector2 __retval; + ImGuiNative.igGetMousePos(&__retval); + return __retval; + } + public static Vector2 GetMousePosOnOpeningCurrentPopup() + { + Vector2 __retval; + ImGuiNative.igGetMousePosOnOpeningCurrentPopup(&__retval); + return __retval; + } + public static ImGuiPlatformIOPtr GetPlatformIO() + { + ImGuiPlatformIO* ret = ImGuiNative.igGetPlatformIO(); + return new ImGuiPlatformIOPtr(ret); + } + public static float GetScrollMaxX() + { + float ret = ImGuiNative.igGetScrollMaxX(); + return ret; + } + public static float GetScrollMaxY() + { + float ret = ImGuiNative.igGetScrollMaxY(); + return ret; + } + public static float GetScrollX() + { + float ret = ImGuiNative.igGetScrollX(); + return ret; + } + public static float GetScrollY() + { + float ret = ImGuiNative.igGetScrollY(); + return ret; + } + public static ImGuiStoragePtr GetStateStorage() + { + ImGuiStorage* ret = ImGuiNative.igGetStateStorage(); + return new ImGuiStoragePtr(ret); + } + public static ImGuiStylePtr GetStyle() + { + ImGuiStyle* ret = ImGuiNative.igGetStyle(); + return new ImGuiStylePtr(ret); + } + public static string GetStyleColorName(ImGuiCol idx) + { + byte* ret = ImGuiNative.igGetStyleColorName(idx); + return Util.StringFromPtr(ret); + } + public static Vector4* GetStyleColorVec4(ImGuiCol idx) + { + Vector4* ret = ImGuiNative.igGetStyleColorVec4(idx); + return ret; + } + public static float GetTextLineHeight() + { + float ret = ImGuiNative.igGetTextLineHeight(); + return ret; + } + public static float GetTextLineHeightWithSpacing() + { + float ret = ImGuiNative.igGetTextLineHeightWithSpacing(); + return ret; + } + public static double GetTime() + { + double ret = ImGuiNative.igGetTime(); + return ret; + } + public static float GetTreeNodeToLabelSpacing() + { + float ret = ImGuiNative.igGetTreeNodeToLabelSpacing(); + return ret; + } + public static string GetVersion() + { + byte* ret = ImGuiNative.igGetVersion(); + return Util.StringFromPtr(ret); + } + public static Vector2 GetWindowContentRegionMax() + { + Vector2 __retval; + ImGuiNative.igGetWindowContentRegionMax(&__retval); + return __retval; + } + public static Vector2 GetWindowContentRegionMin() + { + Vector2 __retval; + ImGuiNative.igGetWindowContentRegionMin(&__retval); + return __retval; + } + public static uint GetWindowDockID() + { + uint ret = ImGuiNative.igGetWindowDockID(); + return ret; + } + public static float GetWindowDpiScale() + { + float ret = ImGuiNative.igGetWindowDpiScale(); + return ret; + } + public static ImDrawListPtr GetWindowDrawList() + { + ImDrawList* ret = ImGuiNative.igGetWindowDrawList(); + return new ImDrawListPtr(ret); + } + public static float GetWindowHeight() + { + float ret = ImGuiNative.igGetWindowHeight(); + return ret; + } + public static Vector2 GetWindowPos() + { + Vector2 __retval; + ImGuiNative.igGetWindowPos(&__retval); + return __retval; + } + public static Vector2 GetWindowSize() + { + Vector2 __retval; + ImGuiNative.igGetWindowSize(&__retval); + return __retval; + } + public static ImGuiViewportPtr GetWindowViewport() + { + ImGuiViewport* ret = ImGuiNative.igGetWindowViewport(); + return new ImGuiViewportPtr(ret); + } + public static float GetWindowWidth() + { + float ret = ImGuiNative.igGetWindowWidth(); + return ret; + } + 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 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 Indent() + { + float indent_w = 0.0f; + ImGuiNative.igIndent(indent_w); + } + public static void Indent(float indent_w) + { + ImGuiNative.igIndent(indent_w); + } + public static bool InputDouble(string label, ref double v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + double step = 0.0; + double step_fast = 0.0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.6f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + double step_fast = 0.0; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.6f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step, double step_fast) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.6f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.6f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step, double step_fast, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputDouble(string label, ref double v, double step, double step_fast, string format, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (double* native_v = &v) + { + byte ret = ImGuiNative.igInputDouble(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float step = 0.0f; + float step_fast = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float step_fast = 0.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step, float step_fast) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step, float step_fast, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat(string label, ref float v, float step, float step_fast, string format, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat(native_label, native_v, step, step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat2(string label, ref Vector2 v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat2(string label, ref Vector2 v, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat2(string label, ref Vector2 v, string format, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat2(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat3(string label, ref Vector3 v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat3(string label, ref Vector3 v, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat3(string label, ref Vector3 v, string format, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat3(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat4(string label, ref Vector4 v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat4(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat4(string label, ref Vector4 v, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat4(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputFloat4(string label, ref Vector4 v, string format, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igInputFloat4(native_label, native_v, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool InputInt(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int step = 1; + int step_fast = 100; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt(string label, ref int v, int step) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int step_fast = 100; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt(string label, ref int v, int step, int step_fast) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt(string label, ref int v, int step, int step_fast, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt(native_label, native_v, step, step_fast, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt2(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt2(native_label, native_v, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt2(string label, ref int v, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt2(native_label, native_v, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt3(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt3(native_label, native_v, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt3(string label, ref int v, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt3(native_label, native_v, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt4(string label, ref int v) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt4(native_label, native_v, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputInt4(string label, ref int v, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igInputInt4(native_label, native_v, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr p_data) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* p_step = null; + void* p_step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_p_data, p_step, p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_step) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* p_step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_p_data, native_p_step, p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_step, IntPtr p_step_fast) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* native_p_step_fast = (void*)p_step_fast.ToPointer(); + byte* native_format = null; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_p_data, native_p_step, native_p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_step, IntPtr p_step_fast, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* native_p_step_fast = (void*)p_step_fast.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_p_data, native_p_step, native_p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool InputScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_step, IntPtr p_step_fast, string format, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* native_p_step_fast = (void*)p_step_fast.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte ret = ImGuiNative.igInputScalar(native_label, data_type, native_p_data, native_p_step, native_p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* p_step = null; + void* p_step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_p_data, components, p_step, p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_step) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* p_step_fast = null; + byte* native_format = null; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_p_data, components, native_p_step, p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_step, IntPtr p_step_fast) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* native_p_step_fast = (void*)p_step_fast.ToPointer(); + byte* native_format = null; + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_p_data, components, native_p_step, native_p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_step, IntPtr p_step_fast, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* native_p_step_fast = (void*)p_step_fast.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiInputTextFlags flags = (ImGuiInputTextFlags)0; + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_p_data, components, native_p_step, native_p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool InputScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_step, IntPtr p_step_fast, string format, ImGuiInputTextFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_step = (void*)p_step.ToPointer(); + void* native_p_step_fast = (void*)p_step_fast.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte ret = ImGuiNative.igInputScalarN(native_label, data_type, native_p_data, components, native_p_step, native_p_step_fast, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool InvisibleButton(string str_id, Vector2 size) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiButtonFlags flags = (ImGuiButtonFlags)0; + byte ret = ImGuiNative.igInvisibleButton(native_str_id, size, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool InvisibleButton(string str_id, Vector2 size, ImGuiButtonFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igInvisibleButton(native_str_id, size, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool IsAnyItemActive() + { + byte ret = ImGuiNative.igIsAnyItemActive(); + return ret != 0; + } + public static bool IsAnyItemFocused() + { + byte ret = ImGuiNative.igIsAnyItemFocused(); + return ret != 0; + } + public static bool IsAnyItemHovered() + { + byte ret = ImGuiNative.igIsAnyItemHovered(); + return ret != 0; + } + public static bool IsAnyMouseDown() + { + byte ret = ImGuiNative.igIsAnyMouseDown(); + return ret != 0; + } + public static bool IsItemActivated() + { + byte ret = ImGuiNative.igIsItemActivated(); + return ret != 0; + } + public static bool IsItemActive() + { + byte ret = ImGuiNative.igIsItemActive(); + return ret != 0; + } + public static bool IsItemClicked() + { + ImGuiMouseButton mouse_button = (ImGuiMouseButton)0; + byte ret = ImGuiNative.igIsItemClicked(mouse_button); + return ret != 0; + } + public static bool IsItemClicked(ImGuiMouseButton mouse_button) + { + byte ret = ImGuiNative.igIsItemClicked(mouse_button); + return ret != 0; + } + public static bool IsItemDeactivated() + { + byte ret = ImGuiNative.igIsItemDeactivated(); + return ret != 0; + } + public static bool IsItemDeactivatedAfterEdit() + { + byte ret = ImGuiNative.igIsItemDeactivatedAfterEdit(); + return ret != 0; + } + public static bool IsItemEdited() + { + byte ret = ImGuiNative.igIsItemEdited(); + return ret != 0; + } + public static bool IsItemFocused() + { + byte ret = ImGuiNative.igIsItemFocused(); + return ret != 0; + } + public static bool IsItemHovered() + { + ImGuiHoveredFlags flags = (ImGuiHoveredFlags)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 bool IsItemToggledOpen() + { + byte ret = ImGuiNative.igIsItemToggledOpen(); + return ret != 0; + } + public static bool IsItemVisible() + { + byte ret = ImGuiNative.igIsItemVisible(); + return ret != 0; + } + public static bool IsKeyDown(ImGuiKey key) + { + byte ret = ImGuiNative.igIsKeyDown(key); + return ret != 0; + } + public static bool IsKeyPressed(ImGuiKey key) + { + byte repeat = 1; + byte ret = ImGuiNative.igIsKeyPressed(key, repeat); + return ret != 0; + } + public static bool IsKeyPressed(ImGuiKey key, bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsKeyPressed(key, native_repeat); + return ret != 0; + } + public static bool IsKeyReleased(ImGuiKey key) + { + byte ret = ImGuiNative.igIsKeyReleased(key); + return ret != 0; + } + public static bool IsMouseClicked(ImGuiMouseButton button) + { + byte repeat = 0; + byte ret = ImGuiNative.igIsMouseClicked(button, repeat); + return ret != 0; + } + public static bool IsMouseClicked(ImGuiMouseButton button, bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igIsMouseClicked(button, native_repeat); + return ret != 0; + } + public static bool IsMouseDoubleClicked(ImGuiMouseButton button) + { + byte ret = ImGuiNative.igIsMouseDoubleClicked(button); + return ret != 0; + } + public static bool IsMouseDown(ImGuiMouseButton button) + { + byte ret = ImGuiNative.igIsMouseDown(button); + return ret != 0; + } + public static bool IsMouseDragging(ImGuiMouseButton button) + { + float lock_threshold = -1.0f; + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; + } + public static bool IsMouseDragging(ImGuiMouseButton button, float lock_threshold) + { + byte ret = ImGuiNative.igIsMouseDragging(button, lock_threshold); + return ret != 0; + } + 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 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 bool IsMouseReleased(ImGuiMouseButton button) + { + byte ret = ImGuiNative.igIsMouseReleased(button); + return ret != 0; + } + public static bool IsPopupOpen(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiPopupFlags flags = (ImGuiPopupFlags)0; + byte ret = ImGuiNative.igIsPopupOpen_Str(native_str_id, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool IsPopupOpen(string str_id, ImGuiPopupFlags flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte ret = ImGuiNative.igIsPopupOpen_Str(native_str_id, flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + return ret != 0; + } + public static bool IsRectVisible(Vector2 size) + { + byte ret = ImGuiNative.igIsRectVisible_Nil(size); + return ret != 0; + } + public static bool IsRectVisible(Vector2 rect_min, Vector2 rect_max) + { + byte ret = ImGuiNative.igIsRectVisible_Vec2(rect_min, rect_max); + return ret != 0; + } + public static bool IsWindowAppearing() + { + byte ret = ImGuiNative.igIsWindowAppearing(); + return ret != 0; + } + public static bool IsWindowCollapsed() + { + byte ret = ImGuiNative.igIsWindowCollapsed(); + return ret != 0; + } + public static bool IsWindowDocked() + { + byte ret = ImGuiNative.igIsWindowDocked(); + return ret != 0; + } + public static bool IsWindowFocused() + { + ImGuiFocusedFlags flags = (ImGuiFocusedFlags)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 bool IsWindowHovered() + { + ImGuiHoveredFlags flags = (ImGuiHoveredFlags)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 LabelText(string label, string fmt) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igLabelText(native_label, native_fmt); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static bool ListBox(string label, ref int current_item, string[] items, int items_count) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + 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]); + native_items_data[offset] = 0; + offset += 1; + } + } + 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.igListBox_Str_arr(native_label, native_current_item, native_items, items_count, height_in_items); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static bool ListBox(string label, ref int current_item, string[] items, int items_count, int height_in_items) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + 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]); + native_items_data[offset] = 0; + offset += 1; + } + } + 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.igListBox_Str_arr(native_label, native_current_item, native_items, items_count, height_in_items); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static void LoadIniSettingsFromDisk(string ini_filename) + { + byte* native_ini_filename; + int ini_filename_byteCount = 0; + if (ini_filename != null) + { + ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); + if (ini_filename_byteCount > Util.StackAllocationSizeLimit) + { + native_ini_filename = Util.Allocate(ini_filename_byteCount + 1); + } + else + { + byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; + native_ini_filename = native_ini_filename_stackBytes; + } + int native_ini_filename_offset = Util.GetUtf8(ini_filename, native_ini_filename, ini_filename_byteCount); + native_ini_filename[native_ini_filename_offset] = 0; + } + else { native_ini_filename = null; } + ImGuiNative.igLoadIniSettingsFromDisk(native_ini_filename); + if (ini_filename_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_ini_filename); + } + } + public static void LoadIniSettingsFromMemory(string ini_data) + { + byte* native_ini_data; + int ini_data_byteCount = 0; + if (ini_data != null) + { + ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + if (ini_data_byteCount > Util.StackAllocationSizeLimit) + { + native_ini_data = Util.Allocate(ini_data_byteCount + 1); + } + else + { + byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; + native_ini_data = native_ini_data_stackBytes; + } + int native_ini_data_offset = Util.GetUtf8(ini_data, native_ini_data, ini_data_byteCount); + native_ini_data[native_ini_data_offset] = 0; + } + else { native_ini_data = null; } + uint ini_size = 0; + ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); + if (ini_data_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_ini_data); + } + } + public static void LoadIniSettingsFromMemory(string ini_data, uint ini_size) + { + byte* native_ini_data; + int ini_data_byteCount = 0; + if (ini_data != null) + { + ini_data_byteCount = Encoding.UTF8.GetByteCount(ini_data); + if (ini_data_byteCount > Util.StackAllocationSizeLimit) + { + native_ini_data = Util.Allocate(ini_data_byteCount + 1); + } + else + { + byte* native_ini_data_stackBytes = stackalloc byte[ini_data_byteCount + 1]; + native_ini_data = native_ini_data_stackBytes; + } + int native_ini_data_offset = Util.GetUtf8(ini_data, native_ini_data, ini_data_byteCount); + native_ini_data[native_ini_data_offset] = 0; + } + else { native_ini_data = null; } + ImGuiNative.igLoadIniSettingsFromMemory(native_ini_data, ini_size); + if (ini_data_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_ini_data); + } + } + public static void LogButtons() + { + ImGuiNative.igLogButtons(); + } + public static void LogFinish() + { + ImGuiNative.igLogFinish(); + } + public static void LogText(string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igLogText(native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static void LogToClipboard() + { + int auto_open_depth = -1; + ImGuiNative.igLogToClipboard(auto_open_depth); + } + public static void LogToClipboard(int auto_open_depth) + { + ImGuiNative.igLogToClipboard(auto_open_depth); + } + public static void LogToFile() + { + int auto_open_depth = -1; + byte* native_filename = null; + ImGuiNative.igLogToFile(auto_open_depth, native_filename); + } + public static void LogToFile(int auto_open_depth) + { + byte* native_filename = null; + ImGuiNative.igLogToFile(auto_open_depth, native_filename); + } + public static void LogToFile(int auto_open_depth, string filename) + { + byte* native_filename; + int filename_byteCount = 0; + if (filename != null) + { + filename_byteCount = Encoding.UTF8.GetByteCount(filename); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + native_filename = Util.Allocate(filename_byteCount + 1); + } + else + { + byte* native_filename_stackBytes = stackalloc byte[filename_byteCount + 1]; + native_filename = native_filename_stackBytes; + } + int native_filename_offset = Util.GetUtf8(filename, native_filename, filename_byteCount); + native_filename[native_filename_offset] = 0; + } + else { native_filename = null; } + ImGuiNative.igLogToFile(auto_open_depth, native_filename); + if (filename_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_filename); + } + } + public static void LogToTTY() + { + int auto_open_depth = -1; + ImGuiNative.igLogToTTY(auto_open_depth); + } + public static void LogToTTY(int auto_open_depth) + { + ImGuiNative.igLogToTTY(auto_open_depth); + } + public static IntPtr MemAlloc(uint size) + { + void* ret = ImGuiNative.igMemAlloc(size); + return (IntPtr)ret; + } + public static void MemFree(IntPtr ptr) + { + void* native_ptr = (void*)ptr.ToPointer(); + ImGuiNative.igMemFree(native_ptr); + } + public static bool MenuItem(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_shortcut = null; + byte selected = 0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, selected, enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool MenuItem(string label, string shortcut) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_shortcut; + int shortcut_byteCount = 0; + if (shortcut != null) + { + shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + native_shortcut = Util.Allocate(shortcut_byteCount + 1); + } + else + { + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + } + int native_shortcut_offset = Util.GetUtf8(shortcut, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + else { native_shortcut = null; } + byte selected = 0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, selected, enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_shortcut); + } + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, bool selected) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_shortcut; + int shortcut_byteCount = 0; + if (shortcut != null) + { + shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + native_shortcut = Util.Allocate(shortcut_byteCount + 1); + } + else + { + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + } + int native_shortcut_offset = Util.GetUtf8(shortcut, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + else { native_shortcut = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + byte enabled = 1; + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, native_selected, enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_shortcut); + } + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, bool selected, bool enabled) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_shortcut; + int shortcut_byteCount = 0; + if (shortcut != null) + { + shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + native_shortcut = Util.Allocate(shortcut_byteCount + 1); + } + else + { + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + } + int native_shortcut_offset = Util.GetUtf8(shortcut, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + else { native_shortcut = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + byte native_enabled = enabled ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igMenuItem_Bool(native_label, native_shortcut, native_selected, native_enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_shortcut); + } + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, ref bool p_selected) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_shortcut; + int shortcut_byteCount = 0; + if (shortcut != null) + { + shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + native_shortcut = Util.Allocate(shortcut_byteCount + 1); + } + else + { + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + } + int native_shortcut_offset = Util.GetUtf8(shortcut, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + else { native_shortcut = null; } + 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.igMenuItem_BoolPtr(native_label, native_shortcut, native_p_selected, enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_shortcut); + } + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool MenuItem(string label, string shortcut, ref bool p_selected, bool enabled) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_shortcut; + int shortcut_byteCount = 0; + if (shortcut != null) + { + shortcut_byteCount = Encoding.UTF8.GetByteCount(shortcut); + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + native_shortcut = Util.Allocate(shortcut_byteCount + 1); + } + else + { + byte* native_shortcut_stackBytes = stackalloc byte[shortcut_byteCount + 1]; + native_shortcut = native_shortcut_stackBytes; + } + int native_shortcut_offset = Util.GetUtf8(shortcut, native_shortcut, shortcut_byteCount); + native_shortcut[native_shortcut_offset] = 0; + } + else { native_shortcut = null; } + 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.igMenuItem_BoolPtr(native_label, native_shortcut, native_p_selected, native_enabled); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (shortcut_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_shortcut); + } + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static void NewFrame() + { + ImGuiNative.igNewFrame(); + } + public static void NewLine() + { + ImGuiNative.igNewLine(); + } + public static void NextColumn() + { + ImGuiNative.igNextColumn(); + } + public static void OpenPopup(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)0; + ImGuiNative.igOpenPopup_Str(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + } + public static void OpenPopup(string str_id, ImGuiPopupFlags popup_flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiNative.igOpenPopup_Str(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + } + public static void OpenPopup(uint id) + { + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)0; + ImGuiNative.igOpenPopup_ID(id, popup_flags); + } + public static void OpenPopup(uint id, ImGuiPopupFlags popup_flags) + { + ImGuiNative.igOpenPopup_ID(id, popup_flags); + } + public static void OpenPopupOnItemClick() + { + byte* native_str_id = null; + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + ImGuiNative.igOpenPopupOnItemClick(native_str_id, popup_flags); + } + public static void OpenPopupOnItemClick(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiPopupFlags popup_flags = (ImGuiPopupFlags)1; + ImGuiNative.igOpenPopupOnItemClick(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + } + public static void OpenPopupOnItemClick(string str_id, ImGuiPopupFlags popup_flags) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiNative.igOpenPopupOnItemClick(native_str_id, popup_flags); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + } + public static void PlotHistogram(string label, ref float values, int values_count) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int values_offset = 0; + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + public static void PlotHistogram(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + fixed (float* native_values = &values) + { + ImGuiNative.igPlotHistogram_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + public static void PlotLines(string label, ref float values, int values_count) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + int values_offset = 0; + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text = null; + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + float scale_min = float.MaxValue; + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + float scale_max = float.MaxValue; + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + public static void PlotLines(string label, ref float values, int values_count, int values_offset, string overlay_text, float scale_min, float scale_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + Vector2 graph_size = new Vector2(); + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + int stride = sizeof(float); + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + 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) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_overlay_text; + int overlay_text_byteCount = 0; + if (overlay_text != null) + { + overlay_text_byteCount = Encoding.UTF8.GetByteCount(overlay_text); + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay_text = Util.Allocate(overlay_text_byteCount + 1); + } + else + { + byte* native_overlay_text_stackBytes = stackalloc byte[overlay_text_byteCount + 1]; + native_overlay_text = native_overlay_text_stackBytes; + } + int native_overlay_text_offset = Util.GetUtf8(overlay_text, native_overlay_text, overlay_text_byteCount); + native_overlay_text[native_overlay_text_offset] = 0; + } + else { native_overlay_text = null; } + fixed (float* native_values = &values) + { + ImGuiNative.igPlotLines_FloatPtr(native_label, native_values, values_count, values_offset, native_overlay_text, scale_min, scale_max, graph_size, stride); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (overlay_text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay_text); + } + } + } + public static void PopAllowKeyboardFocus() + { + ImGuiNative.igPopAllowKeyboardFocus(); + } + public static void PopButtonRepeat() + { + ImGuiNative.igPopButtonRepeat(); + } + public static void PopClipRect() + { + ImGuiNative.igPopClipRect(); + } + public static void PopFont() + { + ImGuiNative.igPopFont(); + } + public static void PopID() + { + ImGuiNative.igPopID(); + } + public static void PopItemWidth() + { + ImGuiNative.igPopItemWidth(); + } + public static void PopStyleColor() + { + int count = 1; + ImGuiNative.igPopStyleColor(count); + } + public static void PopStyleColor(int count) + { + ImGuiNative.igPopStyleColor(count); + } + public static void PopStyleVar() + { + int count = 1; + ImGuiNative.igPopStyleVar(count); + } + public static void PopStyleVar(int count) + { + ImGuiNative.igPopStyleVar(count); + } + public static void PopTextWrapPos() + { + ImGuiNative.igPopTextWrapPos(); + } + public static void ProgressBar(float fraction) + { + Vector2 size_arg = new Vector2(-float.MinValue, 0.0f); + 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) + { + byte* native_overlay; + int overlay_byteCount = 0; + if (overlay != null) + { + overlay_byteCount = Encoding.UTF8.GetByteCount(overlay); + if (overlay_byteCount > Util.StackAllocationSizeLimit) + { + native_overlay = Util.Allocate(overlay_byteCount + 1); + } + else + { + byte* native_overlay_stackBytes = stackalloc byte[overlay_byteCount + 1]; + native_overlay = native_overlay_stackBytes; + } + int native_overlay_offset = Util.GetUtf8(overlay, native_overlay, overlay_byteCount); + native_overlay[native_overlay_offset] = 0; + } + else { native_overlay = null; } + ImGuiNative.igProgressBar(fraction, size_arg, native_overlay); + if (overlay_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_overlay); + } + } + 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 void PushButtonRepeat(bool repeat) + { + byte native_repeat = repeat ? (byte)1 : (byte)0; + ImGuiNative.igPushButtonRepeat(native_repeat); + } + 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 PushFont(ImFontPtr font) + { + ImFont* native_font = font.NativePtr; + ImGuiNative.igPushFont(native_font); + } + public static void PushID(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiNative.igPushID_Str(native_str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + } + public static void PushID(IntPtr ptr_id) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + ImGuiNative.igPushID_Ptr(native_ptr_id); + } + public static void PushID(int int_id) + { + ImGuiNative.igPushID_Int(int_id); + } + public static void PushItemWidth(float item_width) + { + ImGuiNative.igPushItemWidth(item_width); + } + public static void PushStyleColor(ImGuiCol idx, uint col) + { + ImGuiNative.igPushStyleColor_U32(idx, col); + } + public static void PushStyleColor(ImGuiCol idx, Vector4 col) + { + ImGuiNative.igPushStyleColor_Vec4(idx, col); + } + public static void PushStyleVar(ImGuiStyleVar idx, float val) + { + ImGuiNative.igPushStyleVar_Float(idx, val); + } + public static void PushStyleVar(ImGuiStyleVar idx, Vector2 val) + { + ImGuiNative.igPushStyleVar_Vec2(idx, val); + } + public static void PushTextWrapPos() + { + float wrap_local_pos_x = 0.0f; + ImGuiNative.igPushTextWrapPos(wrap_local_pos_x); + } + public static void PushTextWrapPos(float wrap_local_pos_x) + { + ImGuiNative.igPushTextWrapPos(wrap_local_pos_x); + } + public static bool RadioButton(string label, bool active) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_active = active ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igRadioButton_Bool(native_label, native_active); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool RadioButton(string label, ref int v, int v_button) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igRadioButton_IntPtr(native_label, native_v, v_button); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + } + public static void Render() + { + ImGuiNative.igRender(); + } + public static void RenderPlatformWindowsDefault() + { + void* platform_render_arg = null; + void* renderer_render_arg = null; + ImGuiNative.igRenderPlatformWindowsDefault(platform_render_arg, renderer_render_arg); + } + public static void RenderPlatformWindowsDefault(IntPtr platform_render_arg) + { + void* native_platform_render_arg = (void*)platform_render_arg.ToPointer(); + void* renderer_render_arg = null; + ImGuiNative.igRenderPlatformWindowsDefault(native_platform_render_arg, renderer_render_arg); + } + public static void RenderPlatformWindowsDefault(IntPtr platform_render_arg, IntPtr renderer_render_arg) + { + void* native_platform_render_arg = (void*)platform_render_arg.ToPointer(); + void* native_renderer_render_arg = (void*)renderer_render_arg.ToPointer(); + ImGuiNative.igRenderPlatformWindowsDefault(native_platform_render_arg, native_renderer_render_arg); + } + public static void ResetMouseDragDelta() + { + ImGuiMouseButton button = (ImGuiMouseButton)0; + ImGuiNative.igResetMouseDragDelta(button); + } + public static void ResetMouseDragDelta(ImGuiMouseButton button) + { + ImGuiNative.igResetMouseDragDelta(button); + } + public static void SameLine() + { + float offset_from_start_x = 0.0f; + float spacing = -1.0f; + ImGuiNative.igSameLine(offset_from_start_x, spacing); + } + public static void SameLine(float offset_from_start_x) + { + float spacing = -1.0f; + ImGuiNative.igSameLine(offset_from_start_x, spacing); + } + public static void SameLine(float offset_from_start_x, float spacing) + { + ImGuiNative.igSameLine(offset_from_start_x, spacing); + } + public static void SaveIniSettingsToDisk(string ini_filename) + { + byte* native_ini_filename; + int ini_filename_byteCount = 0; + if (ini_filename != null) + { + ini_filename_byteCount = Encoding.UTF8.GetByteCount(ini_filename); + if (ini_filename_byteCount > Util.StackAllocationSizeLimit) + { + native_ini_filename = Util.Allocate(ini_filename_byteCount + 1); + } + else + { + byte* native_ini_filename_stackBytes = stackalloc byte[ini_filename_byteCount + 1]; + native_ini_filename = native_ini_filename_stackBytes; + } + int native_ini_filename_offset = Util.GetUtf8(ini_filename, native_ini_filename, ini_filename_byteCount); + native_ini_filename[native_ini_filename_offset] = 0; + } + else { native_ini_filename = null; } + ImGuiNative.igSaveIniSettingsToDisk(native_ini_filename); + if (ini_filename_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_ini_filename); + } + } + 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 Selectable(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte selected = 0; + ImGuiSelectableFlags flags = (ImGuiSelectableFlags)0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable_Bool(native_label, selected, flags, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool Selectable(string label, bool selected) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + ImGuiSelectableFlags flags = (ImGuiSelectableFlags)0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable_Bool(native_label, native_selected, flags, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable_Bool(native_label, native_selected, flags, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool Selectable(string label, bool selected, ImGuiSelectableFlags flags, Vector2 size) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_selected = selected ? (byte)1 : (byte)0; + byte ret = ImGuiNative.igSelectable_Bool(native_label, native_selected, flags, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool Selectable(string label, ref bool p_selected) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + ImGuiSelectableFlags flags = (ImGuiSelectableFlags)0; + Vector2 size = new Vector2(); + byte ret = ImGuiNative.igSelectable_BoolPtr(native_label, native_p_selected, flags, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + 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.igSelectable_BoolPtr(native_label, native_p_selected, flags, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static bool Selectable(string label, ref bool p_selected, ImGuiSelectableFlags flags, Vector2 size) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte native_p_selected_val = p_selected ? (byte)1 : (byte)0; + byte* native_p_selected = &native_p_selected_val; + byte ret = ImGuiNative.igSelectable_BoolPtr(native_label, native_p_selected, flags, size); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + p_selected = native_p_selected_val != 0; + return ret != 0; + } + public static void Separator() + { + ImGuiNative.igSeparator(); + } + public static void SetAllocatorFunctions(IntPtr alloc_func, IntPtr free_func) + { + void* user_data = null; + ImGuiNative.igSetAllocatorFunctions(alloc_func, free_func, user_data); + } + public static void SetAllocatorFunctions(IntPtr alloc_func, IntPtr free_func, IntPtr user_data) + { + void* native_user_data = (void*)user_data.ToPointer(); + ImGuiNative.igSetAllocatorFunctions(alloc_func, free_func, native_user_data); + } + public static void SetClipboardText(string text) + { + byte* native_text; + int text_byteCount = 0; + if (text != null) + { + text_byteCount = Encoding.UTF8.GetByteCount(text); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + native_text = Util.Allocate(text_byteCount + 1); + } + else + { + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + } + int native_text_offset = Util.GetUtf8(text, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + else { native_text = null; } + ImGuiNative.igSetClipboardText(native_text); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_text); + } + } + public static void SetColorEditOptions(ImGuiColorEditFlags flags) + { + ImGuiNative.igSetColorEditOptions(flags); + } + public static void SetColumnOffset(int column_index, float offset_x) + { + ImGuiNative.igSetColumnOffset(column_index, offset_x); + } + public static void SetColumnWidth(int column_index, float width) + { + ImGuiNative.igSetColumnWidth(column_index, width); + } + public static void SetCurrentContext(IntPtr ctx) + { + ImGuiNative.igSetCurrentContext(ctx); + } + public static void SetCursorPos(Vector2 local_pos) + { + ImGuiNative.igSetCursorPos(local_pos); + } + public static void SetCursorPosX(float local_x) + { + ImGuiNative.igSetCursorPosX(local_x); + } + public static void SetCursorPosY(float local_y) + { + ImGuiNative.igSetCursorPosY(local_y); + } + public static void SetCursorScreenPos(Vector2 pos) + { + ImGuiNative.igSetCursorScreenPos(pos); + } + public static bool SetDragDropPayload(string type, IntPtr data, uint sz) + { + byte* native_type; + int type_byteCount = 0; + if (type != null) + { + type_byteCount = Encoding.UTF8.GetByteCount(type); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + native_type = Util.Allocate(type_byteCount + 1); + } + else + { + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + } + int native_type_offset = Util.GetUtf8(type, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + else { native_type = null; } + void* native_data = (void*)data.ToPointer(); + ImGuiCond cond = (ImGuiCond)0; + byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, sz, cond); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_type); + } + return ret != 0; + } + public static bool SetDragDropPayload(string type, IntPtr data, uint sz, ImGuiCond cond) + { + byte* native_type; + int type_byteCount = 0; + if (type != null) + { + type_byteCount = Encoding.UTF8.GetByteCount(type); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + native_type = Util.Allocate(type_byteCount + 1); + } + else + { + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + } + int native_type_offset = Util.GetUtf8(type, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + else { native_type = null; } + void* native_data = (void*)data.ToPointer(); + byte ret = ImGuiNative.igSetDragDropPayload(native_type, native_data, sz, cond); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_type); + } + return ret != 0; + } + public static void SetItemAllowOverlap() + { + ImGuiNative.igSetItemAllowOverlap(); + } + public static void SetItemDefaultFocus() + { + ImGuiNative.igSetItemDefaultFocus(); + } + public static void SetKeyboardFocusHere() + { + int offset = 0; + ImGuiNative.igSetKeyboardFocusHere(offset); + } + public static void SetKeyboardFocusHere(int offset) + { + ImGuiNative.igSetKeyboardFocusHere(offset); + } + public static void SetMouseCursor(ImGuiMouseCursor cursor_type) + { + ImGuiNative.igSetMouseCursor(cursor_type); + } + public static void SetNextItemOpen(bool is_open) + { + byte native_is_open = is_open ? (byte)1 : (byte)0; + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetNextItemOpen(native_is_open, cond); + } + public static void SetNextItemOpen(bool is_open, ImGuiCond cond) + { + byte native_is_open = is_open ? (byte)1 : (byte)0; + ImGuiNative.igSetNextItemOpen(native_is_open, cond); + } + public static void SetNextItemWidth(float item_width) + { + ImGuiNative.igSetNextItemWidth(item_width); + } + public static void SetNextWindowBgAlpha(float alpha) + { + ImGuiNative.igSetNextWindowBgAlpha(alpha); + } + public static void SetNextWindowClass(ImGuiWindowClassPtr window_class) + { + ImGuiWindowClass* native_window_class = window_class.NativePtr; + ImGuiNative.igSetNextWindowClass(native_window_class); + } + public static void SetNextWindowCollapsed(bool collapsed) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = (ImGuiCond)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 void SetNextWindowContentSize(Vector2 size) + { + ImGuiNative.igSetNextWindowContentSize(size); + } + public static void SetNextWindowDockID(uint dock_id) + { + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetNextWindowDockID(dock_id, cond); + } + public static void SetNextWindowDockID(uint dock_id, ImGuiCond cond) + { + ImGuiNative.igSetNextWindowDockID(dock_id, cond); + } + public static void SetNextWindowFocus() + { + ImGuiNative.igSetNextWindowFocus(); + } + public static void SetNextWindowPos(Vector2 pos) + { + ImGuiCond cond = (ImGuiCond)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 void SetNextWindowSize(Vector2 size) + { + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetNextWindowSize(size, cond); + } + public static void SetNextWindowSize(Vector2 size, ImGuiCond cond) + { + ImGuiNative.igSetNextWindowSize(size, cond); + } + 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 = (void*)custom_callback_data.ToPointer(); + ImGuiNative.igSetNextWindowSizeConstraints(size_min, size_max, custom_callback, native_custom_callback_data); + } + public static void SetNextWindowViewport(uint viewport_id) + { + ImGuiNative.igSetNextWindowViewport(viewport_id); + } + public static void SetScrollFromPosX(float local_x) + { + float center_x_ratio = 0.5f; + ImGuiNative.igSetScrollFromPosX_Float(local_x, center_x_ratio); + } + public static void SetScrollFromPosX(float local_x, float center_x_ratio) + { + ImGuiNative.igSetScrollFromPosX_Float(local_x, center_x_ratio); + } + public static void SetScrollFromPosY(float local_y) + { + float center_y_ratio = 0.5f; + ImGuiNative.igSetScrollFromPosY_Float(local_y, center_y_ratio); + } + public static void SetScrollFromPosY(float local_y, float center_y_ratio) + { + ImGuiNative.igSetScrollFromPosY_Float(local_y, center_y_ratio); + } + public static void SetScrollHereX() + { + float center_x_ratio = 0.5f; + ImGuiNative.igSetScrollHereX(center_x_ratio); + } + public static void SetScrollHereX(float center_x_ratio) + { + ImGuiNative.igSetScrollHereX(center_x_ratio); + } + public static void SetScrollHereY() + { + float center_y_ratio = 0.5f; + ImGuiNative.igSetScrollHereY(center_y_ratio); + } + public static void SetScrollHereY(float center_y_ratio) + { + ImGuiNative.igSetScrollHereY(center_y_ratio); + } + public static void SetScrollX(float scroll_x) + { + ImGuiNative.igSetScrollX_Float(scroll_x); + } + public static void SetScrollY(float scroll_y) + { + ImGuiNative.igSetScrollY_Float(scroll_y); + } + public static void SetStateStorage(ImGuiStoragePtr storage) + { + ImGuiStorage* native_storage = storage.NativePtr; + ImGuiNative.igSetStateStorage(native_storage); + } + public static void SetTabItemClosed(string tab_or_docked_window_label) + { + byte* native_tab_or_docked_window_label; + int tab_or_docked_window_label_byteCount = 0; + if (tab_or_docked_window_label != null) + { + tab_or_docked_window_label_byteCount = Encoding.UTF8.GetByteCount(tab_or_docked_window_label); + if (tab_or_docked_window_label_byteCount > Util.StackAllocationSizeLimit) + { + native_tab_or_docked_window_label = Util.Allocate(tab_or_docked_window_label_byteCount + 1); + } + else + { + byte* native_tab_or_docked_window_label_stackBytes = stackalloc byte[tab_or_docked_window_label_byteCount + 1]; + native_tab_or_docked_window_label = native_tab_or_docked_window_label_stackBytes; + } + int native_tab_or_docked_window_label_offset = Util.GetUtf8(tab_or_docked_window_label, native_tab_or_docked_window_label, tab_or_docked_window_label_byteCount); + native_tab_or_docked_window_label[native_tab_or_docked_window_label_offset] = 0; + } + else { native_tab_or_docked_window_label = null; } + ImGuiNative.igSetTabItemClosed(native_tab_or_docked_window_label); + if (tab_or_docked_window_label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_tab_or_docked_window_label); + } + } + public static void SetTooltip(string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igSetTooltip(native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static void SetWindowCollapsed(bool collapsed) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetWindowCollapsed_Bool(native_collapsed, cond); + } + public static void SetWindowCollapsed(bool collapsed, ImGuiCond cond) + { + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetWindowCollapsed_Bool(native_collapsed, cond); + } + public static void SetWindowCollapsed(string name, bool collapsed) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetWindowCollapsed_Str(native_name, native_collapsed, cond); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + } + public static void SetWindowCollapsed(string name, bool collapsed, ImGuiCond cond) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + byte native_collapsed = collapsed ? (byte)1 : (byte)0; + ImGuiNative.igSetWindowCollapsed_Str(native_name, native_collapsed, cond); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + } + public static void SetWindowFocus() + { + ImGuiNative.igSetWindowFocus_Nil(); + } + public static void SetWindowFocus(string name) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + ImGuiNative.igSetWindowFocus_Str(native_name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + } + public static void SetWindowFontScale(float scale) + { + ImGuiNative.igSetWindowFontScale(scale); + } + public static void SetWindowPos(Vector2 pos) + { + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetWindowPos_Vec2(pos, cond); + } + public static void SetWindowPos(Vector2 pos, ImGuiCond cond) + { + ImGuiNative.igSetWindowPos_Vec2(pos, cond); + } + public static void SetWindowPos(string name, Vector2 pos) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetWindowPos_Str(native_name, pos, cond); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + } + public static void SetWindowPos(string name, Vector2 pos, ImGuiCond cond) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + ImGuiNative.igSetWindowPos_Str(native_name, pos, cond); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + } + public static void SetWindowSize(Vector2 size) + { + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetWindowSize_Vec2(size, cond); + } + public static void SetWindowSize(Vector2 size, ImGuiCond cond) + { + ImGuiNative.igSetWindowSize_Vec2(size, cond); + } + public static void SetWindowSize(string name, Vector2 size) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + ImGuiCond cond = (ImGuiCond)0; + ImGuiNative.igSetWindowSize_Str(native_name, size, cond); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + } + public static void SetWindowSize(string name, Vector2 size, ImGuiCond cond) + { + byte* native_name; + int name_byteCount = 0; + if (name != null) + { + name_byteCount = Encoding.UTF8.GetByteCount(name); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + native_name = Util.Allocate(name_byteCount + 1); + } + else + { + byte* native_name_stackBytes = stackalloc byte[name_byteCount + 1]; + native_name = native_name_stackBytes; + } + int native_name_offset = Util.GetUtf8(name, native_name, name_byteCount); + native_name[native_name_offset] = 0; + } + else { native_name = null; } + ImGuiNative.igSetWindowSize_Str(native_name, size, cond); + if (name_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_name); + } + } + public static void ShowAboutWindow() + { + byte* p_open = null; + ImGuiNative.igShowAboutWindow(p_open); + } + public static void ShowAboutWindow(ref bool p_open) + { + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiNative.igShowAboutWindow(native_p_open); + p_open = native_p_open_val != 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 ShowFontSelector(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiNative.igShowFontSelector(native_label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + 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 void ShowStackToolWindow() + { + byte* p_open = null; + ImGuiNative.igShowStackToolWindow(p_open); + } + public static void ShowStackToolWindow(ref bool p_open) + { + byte native_p_open_val = p_open ? (byte)1 : (byte)0; + byte* native_p_open = &native_p_open_val; + ImGuiNative.igShowStackToolWindow(native_p_open); + p_open = native_p_open_val != 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 ShowStyleSelector(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igShowStyleSelector(native_label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static void ShowUserGuide() + { + ImGuiNative.igShowUserGuide(); + } + public static bool SliderAngle(string label, ref float v_rad) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_degrees_min = -360.0f; + float v_degrees_max = +360.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.0f deg"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.0f deg", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float v_degrees_max = +360.0f; + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.0f deg"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.0f deg", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.0f deg"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.0f deg", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderAngle(string label, ref float v_rad, float v_degrees_min, float v_degrees_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (float* native_v_rad = &v_rad) + { + byte ret = ImGuiNative.igSliderAngle(native_label, native_v_rad, v_degrees_min, v_degrees_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat(string label, ref float v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat(string label, ref float v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat2(string label, ref Vector2 v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector2* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat3(string label, ref Vector3 v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector3* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderFloat4(string label, ref Vector4 v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (Vector4* native_v = &v) + { + byte ret = ImGuiNative.igSliderFloat4(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt(string label, ref int v, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt(string label, ref int v, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt2(string label, ref int v, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt2(string label, ref int v, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt2(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt2(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt3(string label, ref int v, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt3(string label, ref int v, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt3(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt3(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt4(string label, ref int v, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderInt4(string label, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igSliderInt4(native_label, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool SliderScalar(string label, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte ret = ImGuiNative.igSliderScalar(native_label, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool SliderScalarN(string label, ImGuiDataType data_type, IntPtr p_data, int components, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte ret = ImGuiNative.igSliderScalarN(native_label, data_type, native_p_data, components, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool SmallButton(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igSmallButton(native_label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static void Spacing() + { + ImGuiNative.igSpacing(); + } + 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 StyleColorsDark() + { + ImGuiStyle* dst = null; + ImGuiNative.igStyleColorsDark(dst); + } + public static void StyleColorsDark(ImGuiStylePtr dst) + { + ImGuiStyle* native_dst = dst.NativePtr; + ImGuiNative.igStyleColorsDark(native_dst); + } + 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 TabItemButton(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiTabItemFlags flags = (ImGuiTabItemFlags)0; + byte ret = ImGuiNative.igTabItemButton(native_label, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool TabItemButton(string label, ImGuiTabItemFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igTabItemButton(native_label, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static int TableGetColumnCount() + { + int ret = ImGuiNative.igTableGetColumnCount(); + return ret; + } + public static ImGuiTableColumnFlags TableGetColumnFlags() + { + int column_n = -1; + ImGuiTableColumnFlags ret = ImGuiNative.igTableGetColumnFlags(column_n); + return ret; + } + public static ImGuiTableColumnFlags TableGetColumnFlags(int column_n) + { + ImGuiTableColumnFlags ret = ImGuiNative.igTableGetColumnFlags(column_n); + return ret; + } + public static int TableGetColumnIndex() + { + int ret = ImGuiNative.igTableGetColumnIndex(); + return ret; + } + public static string TableGetColumnName() + { + int column_n = -1; + byte* ret = ImGuiNative.igTableGetColumnName_Int(column_n); + return Util.StringFromPtr(ret); + } + public static string TableGetColumnName(int column_n) + { + byte* ret = ImGuiNative.igTableGetColumnName_Int(column_n); + return Util.StringFromPtr(ret); + } + public static int TableGetRowIndex() + { + int ret = ImGuiNative.igTableGetRowIndex(); + return ret; + } + public static ImGuiTableSortSpecsPtr TableGetSortSpecs() + { + ImGuiTableSortSpecs* ret = ImGuiNative.igTableGetSortSpecs(); + return new ImGuiTableSortSpecsPtr(ret); + } + public static void TableHeader(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiNative.igTableHeader(native_label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + public static void TableHeadersRow() + { + ImGuiNative.igTableHeadersRow(); + } + public static bool TableNextColumn() + { + byte ret = ImGuiNative.igTableNextColumn(); + return ret != 0; + } + public static void TableNextRow() + { + ImGuiTableRowFlags row_flags = (ImGuiTableRowFlags)0; + float min_row_height = 0.0f; + ImGuiNative.igTableNextRow(row_flags, min_row_height); + } + public static void TableNextRow(ImGuiTableRowFlags row_flags) + { + float min_row_height = 0.0f; + ImGuiNative.igTableNextRow(row_flags, min_row_height); + } + public static void TableNextRow(ImGuiTableRowFlags row_flags, float min_row_height) + { + ImGuiNative.igTableNextRow(row_flags, min_row_height); + } + public static void TableSetBgColor(ImGuiTableBgTarget target, uint color) + { + int column_n = -1; + ImGuiNative.igTableSetBgColor(target, color, column_n); + } + public static void TableSetBgColor(ImGuiTableBgTarget target, uint color, int column_n) + { + ImGuiNative.igTableSetBgColor(target, color, column_n); + } + public static void TableSetColumnEnabled(int column_n, bool v) + { + byte native_v = v ? (byte)1 : (byte)0; + ImGuiNative.igTableSetColumnEnabled(column_n, native_v); + } + public static bool TableSetColumnIndex(int column_n) + { + byte ret = ImGuiNative.igTableSetColumnIndex(column_n); + return ret != 0; + } + public static void TableSetupColumn(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiTableColumnFlags flags = (ImGuiTableColumnFlags)0; + float init_width_or_weight = 0.0f; + uint user_id = 0; + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float init_width_or_weight = 0.0f; + uint user_id = 0; + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags, float init_width_or_weight) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + uint user_id = 0; + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + public static void TableSetupColumn(string label, ImGuiTableColumnFlags flags, float init_width_or_weight, uint user_id) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiNative.igTableSetupColumn(native_label, flags, init_width_or_weight, user_id); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + } + public static void TableSetupScrollFreeze(int cols, int rows) + { + ImGuiNative.igTableSetupScrollFreeze(cols, rows); + } + public static void Text(string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igText(native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static void TextColored(Vector4 col, string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igTextColored(col, native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static void TextDisabled(string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igTextDisabled(native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static void TextUnformatted(string text) + { + byte* native_text; + int text_byteCount = 0; + if (text != null) + { + text_byteCount = Encoding.UTF8.GetByteCount(text); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + native_text = Util.Allocate(text_byteCount + 1); + } + else + { + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + } + int native_text_offset = Util.GetUtf8(text, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + else { native_text = null; } + byte* native_text_end = null; + ImGuiNative.igTextUnformatted(native_text, native_text_end); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_text); + } + } + public static void TextWrapped(string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.igTextWrapped(native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public static bool TreeNode(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igTreeNode_Str(native_label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool TreeNode(string str_id, string fmt) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNode_StrStr(native_str_id, native_fmt); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + return ret != 0; + } + public static bool TreeNode(IntPtr ptr_id, string fmt) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNode_Ptr(native_ptr_id, native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + return ret != 0; + } + public static bool TreeNodeEx(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + ImGuiTreeNodeFlags flags = (ImGuiTreeNodeFlags)0; + byte ret = ImGuiNative.igTreeNodeEx_Str(native_label, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool TreeNodeEx(string label, ImGuiTreeNodeFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.igTreeNodeEx_Str(native_label, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool TreeNodeEx(string str_id, ImGuiTreeNodeFlags flags, string fmt) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNodeEx_StrStr(native_str_id, flags, native_fmt); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + return ret != 0; + } + public static bool TreeNodeEx(IntPtr ptr_id, ImGuiTreeNodeFlags flags, string fmt) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + byte ret = ImGuiNative.igTreeNodeEx_Ptr(native_ptr_id, flags, native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + return ret != 0; + } + public static void TreePop() + { + ImGuiNative.igTreePop(); + } + public static void TreePush(string str_id) + { + byte* native_str_id; + int str_id_byteCount = 0; + if (str_id != null) + { + str_id_byteCount = Encoding.UTF8.GetByteCount(str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + native_str_id = Util.Allocate(str_id_byteCount + 1); + } + else + { + byte* native_str_id_stackBytes = stackalloc byte[str_id_byteCount + 1]; + native_str_id = native_str_id_stackBytes; + } + int native_str_id_offset = Util.GetUtf8(str_id, native_str_id, str_id_byteCount); + native_str_id[native_str_id_offset] = 0; + } + else { native_str_id = null; } + ImGuiNative.igTreePush_Str(native_str_id); + if (str_id_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str_id); + } + } + public static void TreePush() + { + void* ptr_id = null; + ImGuiNative.igTreePush_Ptr(ptr_id); + } + public static void TreePush(IntPtr ptr_id) + { + void* native_ptr_id = (void*)ptr_id.ToPointer(); + ImGuiNative.igTreePush_Ptr(native_ptr_id); + } + 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 UpdatePlatformWindows() + { + ImGuiNative.igUpdatePlatformWindows(); + } + public static void Value(string prefix, bool b) + { + byte* native_prefix; + int prefix_byteCount = 0; + if (prefix != null) + { + prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + native_prefix = Util.Allocate(prefix_byteCount + 1); + } + else + { + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + } + int native_prefix_offset = Util.GetUtf8(prefix, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + else { native_prefix = null; } + byte native_b = b ? (byte)1 : (byte)0; + ImGuiNative.igValue_Bool(native_prefix, native_b); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_prefix); + } + } + public static void Value(string prefix, int v) + { + byte* native_prefix; + int prefix_byteCount = 0; + if (prefix != null) + { + prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + native_prefix = Util.Allocate(prefix_byteCount + 1); + } + else + { + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + } + int native_prefix_offset = Util.GetUtf8(prefix, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + else { native_prefix = null; } + ImGuiNative.igValue_Int(native_prefix, v); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_prefix); + } + } + public static void Value(string prefix, uint v) + { + byte* native_prefix; + int prefix_byteCount = 0; + if (prefix != null) + { + prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + native_prefix = Util.Allocate(prefix_byteCount + 1); + } + else + { + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + } + int native_prefix_offset = Util.GetUtf8(prefix, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + else { native_prefix = null; } + ImGuiNative.igValue_Uint(native_prefix, v); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_prefix); + } + } + public static void Value(string prefix, float v) + { + byte* native_prefix; + int prefix_byteCount = 0; + if (prefix != null) + { + prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + native_prefix = Util.Allocate(prefix_byteCount + 1); + } + else + { + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + } + int native_prefix_offset = Util.GetUtf8(prefix, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + else { native_prefix = null; } + byte* native_float_format = null; + ImGuiNative.igValue_Float(native_prefix, v, native_float_format); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_prefix); + } + } + public static void Value(string prefix, float v, string float_format) + { + byte* native_prefix; + int prefix_byteCount = 0; + if (prefix != null) + { + prefix_byteCount = Encoding.UTF8.GetByteCount(prefix); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + native_prefix = Util.Allocate(prefix_byteCount + 1); + } + else + { + byte* native_prefix_stackBytes = stackalloc byte[prefix_byteCount + 1]; + native_prefix = native_prefix_stackBytes; + } + int native_prefix_offset = Util.GetUtf8(prefix, native_prefix, prefix_byteCount); + native_prefix[native_prefix_offset] = 0; + } + else { native_prefix = null; } + byte* native_float_format; + int float_format_byteCount = 0; + if (float_format != null) + { + float_format_byteCount = Encoding.UTF8.GetByteCount(float_format); + if (float_format_byteCount > Util.StackAllocationSizeLimit) + { + native_float_format = Util.Allocate(float_format_byteCount + 1); + } + else + { + byte* native_float_format_stackBytes = stackalloc byte[float_format_byteCount + 1]; + native_float_format = native_float_format_stackBytes; + } + int native_float_format_offset = Util.GetUtf8(float_format, native_float_format, float_format_byteCount); + native_float_format[native_float_format_offset] = 0; + } + else { native_float_format = null; } + ImGuiNative.igValue_Float(native_prefix, v, native_float_format); + if (prefix_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_prefix); + } + if (float_format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_float_format); + } + } + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%.3f"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%.3f", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool VSliderFloat(string label, Vector2 size, ref float v, float v_min, float v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (float* native_v = &v) + { + byte ret = ImGuiNative.igVSliderFloat(native_label, size, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + format_byteCount = Encoding.UTF8.GetByteCount("%d"); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8("%d", native_format, format_byteCount); + native_format[native_format_offset] = 0; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool VSliderInt(string label, Vector2 size, ref int v, int v_min, int v_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + fixed (int* native_v = &v) + { + byte ret = ImGuiNative.igVSliderInt(native_label, size, native_v, v_min, v_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format = null; + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + ImGuiSliderFlags flags = (ImGuiSliderFlags)0; + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + public static bool VSliderScalar(string label, Vector2 size, ImGuiDataType data_type, IntPtr p_data, IntPtr p_min, IntPtr p_max, string format, ImGuiSliderFlags flags) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + void* native_p_data = (void*)p_data.ToPointer(); + void* native_p_min = (void*)p_min.ToPointer(); + void* native_p_max = (void*)p_max.ToPointer(); + byte* native_format; + int format_byteCount = 0; + if (format != null) + { + format_byteCount = Encoding.UTF8.GetByteCount(format); + if (format_byteCount > Util.StackAllocationSizeLimit) + { + native_format = Util.Allocate(format_byteCount + 1); + } + else + { + byte* native_format_stackBytes = stackalloc byte[format_byteCount + 1]; + native_format = native_format_stackBytes; + } + int native_format_offset = Util.GetUtf8(format, native_format, format_byteCount); + native_format[native_format_offset] = 0; + } + else { native_format = null; } + byte ret = ImGuiNative.igVSliderScalar(native_label, size, data_type, native_p_data, native_p_min, native_p_max, native_format, flags); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + if (format_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_format); + } + return ret != 0; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs new file mode 100644 index 0000000..704dec4 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiBackendFlags.gen.cs @@ -0,0 +1,15 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiBackendFlags + { + None = 0, + HasGamepad = 1, + HasMouseCursors = 2, + HasSetMousePos = 4, + RendererHasVtxOffset = 8, + PlatformHasViewports = 1024, + HasMouseHoveredViewport = 2048, + RendererHasViewports = 4096, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiButtonFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiButtonFlags.gen.cs new file mode 100644 index 0000000..7964d5e --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiButtonFlags.gen.cs @@ -0,0 +1,13 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiButtonFlags + { + None = 0, + MouseButtonLeft = 1, + MouseButtonRight = 2, + MouseButtonMiddle = 4, + MouseButtonMask = 7, + MouseButtonDefault = 1, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiCol.gen.cs b/lib/ImGui.NET/Generated/ImGuiCol.gen.cs new file mode 100644 index 0000000..38401f1 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiCol.gen.cs @@ -0,0 +1,62 @@ +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, + Tab = 33, + TabHovered = 34, + TabActive = 35, + TabUnfocused = 36, + TabUnfocusedActive = 37, + DockingPreview = 38, + DockingEmptyBg = 39, + PlotLines = 40, + PlotLinesHovered = 41, + PlotHistogram = 42, + PlotHistogramHovered = 43, + TableHeaderBg = 44, + TableBorderStrong = 45, + TableBorderLight = 46, + TableRowBg = 47, + TableRowBgAlt = 48, + TextSelectedBg = 49, + DragDropTarget = 50, + NavHighlight = 51, + NavWindowingHighlight = 52, + NavWindowingDimBg = 53, + ModalWindowDimBg = 54, + COUNT = 55, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs new file mode 100644 index 0000000..ede1457 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiColorEditFlags.gen.cs @@ -0,0 +1,36 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiColorEditFlags + { + None = 0, + NoAlpha = 2, + NoPicker = 4, + NoOptions = 8, + NoSmallPreview = 16, + NoInputs = 32, + NoTooltip = 64, + NoLabel = 128, + NoSidePreview = 256, + NoDragDrop = 512, + NoBorder = 1024, + AlphaBar = 65536, + AlphaPreview = 131072, + AlphaPreviewHalf = 262144, + HDR = 524288, + DisplayRGB = 1048576, + DisplayHSV = 2097152, + DisplayHex = 4194304, + Uint8 = 8388608, + Float = 16777216, + PickerHueBar = 33554432, + PickerHueWheel = 67108864, + InputRGB = 134217728, + InputHSV = 268435456, + DefaultOptions = 177209344, + DisplayMask = 7340032, + DataTypeMask = 25165824, + PickerMask = 100663296, + InputMask = 402653184, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiComboFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiComboFlags.gen.cs new file mode 100644 index 0000000..68efc53 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiComboFlags.gen.cs @@ -0,0 +1,16 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiComboFlags + { + None = 0, + PopupAlignLeft = 1, + HeightSmall = 2, + HeightRegular = 4, + HeightLarge = 8, + HeightLargest = 16, + NoArrowButton = 32, + NoPreview = 64, + HeightMask = 30, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiCond.gen.cs b/lib/ImGui.NET/Generated/ImGuiCond.gen.cs new file mode 100644 index 0000000..23a4cbb --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiCond.gen.cs @@ -0,0 +1,11 @@ +namespace ImGuiNET +{ + public enum ImGuiCond + { + None = 0, + Always = 1, + Once = 2, + FirstUseEver = 4, + Appearing = 8, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs new file mode 100644 index 0000000..c64b184 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiConfigFlags.gen.cs @@ -0,0 +1,20 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiConfigFlags + { + None = 0, + NavEnableKeyboard = 1, + NavEnableGamepad = 2, + NavEnableSetMousePos = 4, + NavNoCaptureKeyboard = 8, + NoMouse = 16, + NoMouseCursorChange = 32, + DockingEnable = 64, + ViewportsEnable = 1024, + DpiEnableScaleViewports = 16384, + DpiEnableScaleFonts = 32768, + IsSRGB = 1048576, + IsTouchScreen = 2097152, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiDataType.gen.cs b/lib/ImGui.NET/Generated/ImGuiDataType.gen.cs new file mode 100644 index 0000000..3e1f232 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiDataType.gen.cs @@ -0,0 +1,17 @@ +namespace ImGuiNET +{ + public enum ImGuiDataType + { + S8 = 0, + U8 = 1, + S16 = 2, + U16 = 3, + S32 = 4, + U32 = 5, + S64 = 6, + U64 = 7, + Float = 8, + Double = 9, + COUNT = 10, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiDir.gen.cs b/lib/ImGui.NET/Generated/ImGuiDir.gen.cs new file mode 100644 index 0000000..f409d80 --- /dev/null +++ b/lib/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/lib/ImGui.NET/Generated/ImGuiDockNodeFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiDockNodeFlags.gen.cs new file mode 100644 index 0000000..f705b1c --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiDockNodeFlags.gen.cs @@ -0,0 +1,14 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiDockNodeFlags + { + None = 0, + KeepAliveOnly = 1, + NoDockingInCentralNode = 4, + PassthruCentralNode = 8, + NoSplit = 16, + NoResize = 32, + AutoHideTabBar = 64, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiDragDropFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiDragDropFlags.gen.cs new file mode 100644 index 0000000..00fdf8a --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiDragDropFlags.gen.cs @@ -0,0 +1,18 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiDragDropFlags + { + None = 0, + SourceNoPreviewTooltip = 1, + SourceNoDisableHover = 2, + SourceNoHoldToOpenOthers = 4, + SourceAllowNullID = 8, + SourceExtern = 16, + SourceAutoExpirePayload = 32, + AcceptBeforeDelivery = 1024, + AcceptNoDrawDefaultRect = 2048, + AcceptNoPreviewTooltip = 4096, + AcceptPeekOnly = 3072, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiFocusedFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiFocusedFlags.gen.cs new file mode 100644 index 0000000..249a42f --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiFocusedFlags.gen.cs @@ -0,0 +1,14 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiFocusedFlags + { + None = 0, + ChildWindows = 1, + RootWindow = 2, + AnyWindow = 4, + NoPopupHierarchy = 8, + DockHierarchy = 16, + RootAndChildWindows = 3, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs new file mode 100644 index 0000000..60699dc --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiHoveredFlags.gen.cs @@ -0,0 +1,19 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiHoveredFlags + { + None = 0, + ChildWindows = 1, + RootWindow = 2, + AnyWindow = 4, + NoPopupHierarchy = 8, + DockHierarchy = 16, + AllowWhenBlockedByPopup = 32, + AllowWhenBlockedByActiveItem = 128, + AllowWhenOverlapped = 256, + AllowWhenDisabled = 512, + RectOnly = 416, + RootAndChildWindows = 3, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiIO.gen.cs b/lib/ImGui.NET/Generated/ImGuiIO.gen.cs new file mode 100644 index 0000000..3a4040d --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiIO.gen.cs @@ -0,0 +1,951 @@ +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 float KeyRepeatDelay; + public float KeyRepeatRate; + public void* UserData; + public ImFontAtlas* Fonts; + public float FontGlobalScale; + public byte FontAllowUserScaling; + public ImFont* FontDefault; + public Vector2 DisplayFramebufferScale; + public byte ConfigDockingNoSplit; + public byte ConfigDockingWithShift; + public byte ConfigDockingAlwaysTabBar; + public byte ConfigDockingTransparentPayload; + public byte ConfigViewportsNoAutoMerge; + public byte ConfigViewportsNoTaskBarIcon; + public byte ConfigViewportsNoDecoration; + public byte ConfigViewportsNoDefaultParent; + public byte MouseDrawCursor; + public byte ConfigMacOSXBehaviors; + public byte ConfigInputTrickleEventQueue; + public byte ConfigInputTextCursorBlink; + public byte ConfigDragClickToInputText; + public byte ConfigWindowsResizeFromEdges; + public byte ConfigWindowsMoveFromTitleBarOnly; + public float ConfigMemoryCompactTimer; + public byte* BackendPlatformName; + public byte* BackendRendererName; + public void* BackendPlatformUserData; + public void* BackendRendererUserData; + public void* BackendLanguageUserData; + public IntPtr GetClipboardTextFn; + public IntPtr SetClipboardTextFn; + public void* ClipboardUserData; + public IntPtr SetPlatformImeDataFn; + public void* _UnusedPadding; + 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 fixed int KeyMap[645]; + public fixed byte KeysDown[512]; + public Vector2 MousePos; + public fixed byte MouseDown[5]; + public float MouseWheel; + public float MouseWheelH; + public uint MouseHoveredViewport; + public byte KeyCtrl; + public byte KeyShift; + public byte KeyAlt; + public byte KeySuper; + public fixed float NavInputs[20]; + public ImGuiKeyModFlags KeyMods; + public ImGuiKeyModFlags KeyModsPrev; + public ImGuiKeyData KeysData_0; + public ImGuiKeyData KeysData_1; + public ImGuiKeyData KeysData_2; + public ImGuiKeyData KeysData_3; + public ImGuiKeyData KeysData_4; + public ImGuiKeyData KeysData_5; + public ImGuiKeyData KeysData_6; + public ImGuiKeyData KeysData_7; + public ImGuiKeyData KeysData_8; + public ImGuiKeyData KeysData_9; + public ImGuiKeyData KeysData_10; + public ImGuiKeyData KeysData_11; + public ImGuiKeyData KeysData_12; + public ImGuiKeyData KeysData_13; + public ImGuiKeyData KeysData_14; + public ImGuiKeyData KeysData_15; + public ImGuiKeyData KeysData_16; + public ImGuiKeyData KeysData_17; + public ImGuiKeyData KeysData_18; + public ImGuiKeyData KeysData_19; + public ImGuiKeyData KeysData_20; + public ImGuiKeyData KeysData_21; + public ImGuiKeyData KeysData_22; + public ImGuiKeyData KeysData_23; + public ImGuiKeyData KeysData_24; + public ImGuiKeyData KeysData_25; + public ImGuiKeyData KeysData_26; + public ImGuiKeyData KeysData_27; + public ImGuiKeyData KeysData_28; + public ImGuiKeyData KeysData_29; + public ImGuiKeyData KeysData_30; + public ImGuiKeyData KeysData_31; + public ImGuiKeyData KeysData_32; + public ImGuiKeyData KeysData_33; + public ImGuiKeyData KeysData_34; + public ImGuiKeyData KeysData_35; + public ImGuiKeyData KeysData_36; + public ImGuiKeyData KeysData_37; + public ImGuiKeyData KeysData_38; + public ImGuiKeyData KeysData_39; + public ImGuiKeyData KeysData_40; + public ImGuiKeyData KeysData_41; + public ImGuiKeyData KeysData_42; + public ImGuiKeyData KeysData_43; + public ImGuiKeyData KeysData_44; + public ImGuiKeyData KeysData_45; + public ImGuiKeyData KeysData_46; + public ImGuiKeyData KeysData_47; + public ImGuiKeyData KeysData_48; + public ImGuiKeyData KeysData_49; + public ImGuiKeyData KeysData_50; + public ImGuiKeyData KeysData_51; + public ImGuiKeyData KeysData_52; + public ImGuiKeyData KeysData_53; + public ImGuiKeyData KeysData_54; + public ImGuiKeyData KeysData_55; + public ImGuiKeyData KeysData_56; + public ImGuiKeyData KeysData_57; + public ImGuiKeyData KeysData_58; + public ImGuiKeyData KeysData_59; + public ImGuiKeyData KeysData_60; + public ImGuiKeyData KeysData_61; + public ImGuiKeyData KeysData_62; + public ImGuiKeyData KeysData_63; + public ImGuiKeyData KeysData_64; + public ImGuiKeyData KeysData_65; + public ImGuiKeyData KeysData_66; + public ImGuiKeyData KeysData_67; + public ImGuiKeyData KeysData_68; + public ImGuiKeyData KeysData_69; + public ImGuiKeyData KeysData_70; + public ImGuiKeyData KeysData_71; + public ImGuiKeyData KeysData_72; + public ImGuiKeyData KeysData_73; + public ImGuiKeyData KeysData_74; + public ImGuiKeyData KeysData_75; + public ImGuiKeyData KeysData_76; + public ImGuiKeyData KeysData_77; + public ImGuiKeyData KeysData_78; + public ImGuiKeyData KeysData_79; + public ImGuiKeyData KeysData_80; + public ImGuiKeyData KeysData_81; + public ImGuiKeyData KeysData_82; + public ImGuiKeyData KeysData_83; + public ImGuiKeyData KeysData_84; + public ImGuiKeyData KeysData_85; + public ImGuiKeyData KeysData_86; + public ImGuiKeyData KeysData_87; + public ImGuiKeyData KeysData_88; + public ImGuiKeyData KeysData_89; + public ImGuiKeyData KeysData_90; + public ImGuiKeyData KeysData_91; + public ImGuiKeyData KeysData_92; + public ImGuiKeyData KeysData_93; + public ImGuiKeyData KeysData_94; + public ImGuiKeyData KeysData_95; + public ImGuiKeyData KeysData_96; + public ImGuiKeyData KeysData_97; + public ImGuiKeyData KeysData_98; + public ImGuiKeyData KeysData_99; + public ImGuiKeyData KeysData_100; + public ImGuiKeyData KeysData_101; + public ImGuiKeyData KeysData_102; + public ImGuiKeyData KeysData_103; + public ImGuiKeyData KeysData_104; + public ImGuiKeyData KeysData_105; + public ImGuiKeyData KeysData_106; + public ImGuiKeyData KeysData_107; + public ImGuiKeyData KeysData_108; + public ImGuiKeyData KeysData_109; + public ImGuiKeyData KeysData_110; + public ImGuiKeyData KeysData_111; + public ImGuiKeyData KeysData_112; + public ImGuiKeyData KeysData_113; + public ImGuiKeyData KeysData_114; + public ImGuiKeyData KeysData_115; + public ImGuiKeyData KeysData_116; + public ImGuiKeyData KeysData_117; + public ImGuiKeyData KeysData_118; + public ImGuiKeyData KeysData_119; + public ImGuiKeyData KeysData_120; + public ImGuiKeyData KeysData_121; + public ImGuiKeyData KeysData_122; + public ImGuiKeyData KeysData_123; + public ImGuiKeyData KeysData_124; + public ImGuiKeyData KeysData_125; + public ImGuiKeyData KeysData_126; + public ImGuiKeyData KeysData_127; + public ImGuiKeyData KeysData_128; + public ImGuiKeyData KeysData_129; + public ImGuiKeyData KeysData_130; + public ImGuiKeyData KeysData_131; + public ImGuiKeyData KeysData_132; + public ImGuiKeyData KeysData_133; + public ImGuiKeyData KeysData_134; + public ImGuiKeyData KeysData_135; + public ImGuiKeyData KeysData_136; + public ImGuiKeyData KeysData_137; + public ImGuiKeyData KeysData_138; + public ImGuiKeyData KeysData_139; + public ImGuiKeyData KeysData_140; + public ImGuiKeyData KeysData_141; + public ImGuiKeyData KeysData_142; + public ImGuiKeyData KeysData_143; + public ImGuiKeyData KeysData_144; + public ImGuiKeyData KeysData_145; + public ImGuiKeyData KeysData_146; + public ImGuiKeyData KeysData_147; + public ImGuiKeyData KeysData_148; + public ImGuiKeyData KeysData_149; + public ImGuiKeyData KeysData_150; + public ImGuiKeyData KeysData_151; + public ImGuiKeyData KeysData_152; + public ImGuiKeyData KeysData_153; + public ImGuiKeyData KeysData_154; + public ImGuiKeyData KeysData_155; + public ImGuiKeyData KeysData_156; + public ImGuiKeyData KeysData_157; + public ImGuiKeyData KeysData_158; + public ImGuiKeyData KeysData_159; + public ImGuiKeyData KeysData_160; + public ImGuiKeyData KeysData_161; + public ImGuiKeyData KeysData_162; + public ImGuiKeyData KeysData_163; + public ImGuiKeyData KeysData_164; + public ImGuiKeyData KeysData_165; + public ImGuiKeyData KeysData_166; + public ImGuiKeyData KeysData_167; + public ImGuiKeyData KeysData_168; + public ImGuiKeyData KeysData_169; + public ImGuiKeyData KeysData_170; + public ImGuiKeyData KeysData_171; + public ImGuiKeyData KeysData_172; + public ImGuiKeyData KeysData_173; + public ImGuiKeyData KeysData_174; + public ImGuiKeyData KeysData_175; + public ImGuiKeyData KeysData_176; + public ImGuiKeyData KeysData_177; + public ImGuiKeyData KeysData_178; + public ImGuiKeyData KeysData_179; + public ImGuiKeyData KeysData_180; + public ImGuiKeyData KeysData_181; + public ImGuiKeyData KeysData_182; + public ImGuiKeyData KeysData_183; + public ImGuiKeyData KeysData_184; + public ImGuiKeyData KeysData_185; + public ImGuiKeyData KeysData_186; + public ImGuiKeyData KeysData_187; + public ImGuiKeyData KeysData_188; + public ImGuiKeyData KeysData_189; + public ImGuiKeyData KeysData_190; + public ImGuiKeyData KeysData_191; + public ImGuiKeyData KeysData_192; + public ImGuiKeyData KeysData_193; + public ImGuiKeyData KeysData_194; + public ImGuiKeyData KeysData_195; + public ImGuiKeyData KeysData_196; + public ImGuiKeyData KeysData_197; + public ImGuiKeyData KeysData_198; + public ImGuiKeyData KeysData_199; + public ImGuiKeyData KeysData_200; + public ImGuiKeyData KeysData_201; + public ImGuiKeyData KeysData_202; + public ImGuiKeyData KeysData_203; + public ImGuiKeyData KeysData_204; + public ImGuiKeyData KeysData_205; + public ImGuiKeyData KeysData_206; + public ImGuiKeyData KeysData_207; + public ImGuiKeyData KeysData_208; + public ImGuiKeyData KeysData_209; + public ImGuiKeyData KeysData_210; + public ImGuiKeyData KeysData_211; + public ImGuiKeyData KeysData_212; + public ImGuiKeyData KeysData_213; + public ImGuiKeyData KeysData_214; + public ImGuiKeyData KeysData_215; + public ImGuiKeyData KeysData_216; + public ImGuiKeyData KeysData_217; + public ImGuiKeyData KeysData_218; + public ImGuiKeyData KeysData_219; + public ImGuiKeyData KeysData_220; + public ImGuiKeyData KeysData_221; + public ImGuiKeyData KeysData_222; + public ImGuiKeyData KeysData_223; + public ImGuiKeyData KeysData_224; + public ImGuiKeyData KeysData_225; + public ImGuiKeyData KeysData_226; + public ImGuiKeyData KeysData_227; + public ImGuiKeyData KeysData_228; + public ImGuiKeyData KeysData_229; + public ImGuiKeyData KeysData_230; + public ImGuiKeyData KeysData_231; + public ImGuiKeyData KeysData_232; + public ImGuiKeyData KeysData_233; + public ImGuiKeyData KeysData_234; + public ImGuiKeyData KeysData_235; + public ImGuiKeyData KeysData_236; + public ImGuiKeyData KeysData_237; + public ImGuiKeyData KeysData_238; + public ImGuiKeyData KeysData_239; + public ImGuiKeyData KeysData_240; + public ImGuiKeyData KeysData_241; + public ImGuiKeyData KeysData_242; + public ImGuiKeyData KeysData_243; + public ImGuiKeyData KeysData_244; + public ImGuiKeyData KeysData_245; + public ImGuiKeyData KeysData_246; + public ImGuiKeyData KeysData_247; + public ImGuiKeyData KeysData_248; + public ImGuiKeyData KeysData_249; + public ImGuiKeyData KeysData_250; + public ImGuiKeyData KeysData_251; + public ImGuiKeyData KeysData_252; + public ImGuiKeyData KeysData_253; + public ImGuiKeyData KeysData_254; + public ImGuiKeyData KeysData_255; + public ImGuiKeyData KeysData_256; + public ImGuiKeyData KeysData_257; + public ImGuiKeyData KeysData_258; + public ImGuiKeyData KeysData_259; + public ImGuiKeyData KeysData_260; + public ImGuiKeyData KeysData_261; + public ImGuiKeyData KeysData_262; + public ImGuiKeyData KeysData_263; + public ImGuiKeyData KeysData_264; + public ImGuiKeyData KeysData_265; + public ImGuiKeyData KeysData_266; + public ImGuiKeyData KeysData_267; + public ImGuiKeyData KeysData_268; + public ImGuiKeyData KeysData_269; + public ImGuiKeyData KeysData_270; + public ImGuiKeyData KeysData_271; + public ImGuiKeyData KeysData_272; + public ImGuiKeyData KeysData_273; + public ImGuiKeyData KeysData_274; + public ImGuiKeyData KeysData_275; + public ImGuiKeyData KeysData_276; + public ImGuiKeyData KeysData_277; + public ImGuiKeyData KeysData_278; + public ImGuiKeyData KeysData_279; + public ImGuiKeyData KeysData_280; + public ImGuiKeyData KeysData_281; + public ImGuiKeyData KeysData_282; + public ImGuiKeyData KeysData_283; + public ImGuiKeyData KeysData_284; + public ImGuiKeyData KeysData_285; + public ImGuiKeyData KeysData_286; + public ImGuiKeyData KeysData_287; + public ImGuiKeyData KeysData_288; + public ImGuiKeyData KeysData_289; + public ImGuiKeyData KeysData_290; + public ImGuiKeyData KeysData_291; + public ImGuiKeyData KeysData_292; + public ImGuiKeyData KeysData_293; + public ImGuiKeyData KeysData_294; + public ImGuiKeyData KeysData_295; + public ImGuiKeyData KeysData_296; + public ImGuiKeyData KeysData_297; + public ImGuiKeyData KeysData_298; + public ImGuiKeyData KeysData_299; + public ImGuiKeyData KeysData_300; + public ImGuiKeyData KeysData_301; + public ImGuiKeyData KeysData_302; + public ImGuiKeyData KeysData_303; + public ImGuiKeyData KeysData_304; + public ImGuiKeyData KeysData_305; + public ImGuiKeyData KeysData_306; + public ImGuiKeyData KeysData_307; + public ImGuiKeyData KeysData_308; + public ImGuiKeyData KeysData_309; + public ImGuiKeyData KeysData_310; + public ImGuiKeyData KeysData_311; + public ImGuiKeyData KeysData_312; + public ImGuiKeyData KeysData_313; + public ImGuiKeyData KeysData_314; + public ImGuiKeyData KeysData_315; + public ImGuiKeyData KeysData_316; + public ImGuiKeyData KeysData_317; + public ImGuiKeyData KeysData_318; + public ImGuiKeyData KeysData_319; + public ImGuiKeyData KeysData_320; + public ImGuiKeyData KeysData_321; + public ImGuiKeyData KeysData_322; + public ImGuiKeyData KeysData_323; + public ImGuiKeyData KeysData_324; + public ImGuiKeyData KeysData_325; + public ImGuiKeyData KeysData_326; + public ImGuiKeyData KeysData_327; + public ImGuiKeyData KeysData_328; + public ImGuiKeyData KeysData_329; + public ImGuiKeyData KeysData_330; + public ImGuiKeyData KeysData_331; + public ImGuiKeyData KeysData_332; + public ImGuiKeyData KeysData_333; + public ImGuiKeyData KeysData_334; + public ImGuiKeyData KeysData_335; + public ImGuiKeyData KeysData_336; + public ImGuiKeyData KeysData_337; + public ImGuiKeyData KeysData_338; + public ImGuiKeyData KeysData_339; + public ImGuiKeyData KeysData_340; + public ImGuiKeyData KeysData_341; + public ImGuiKeyData KeysData_342; + public ImGuiKeyData KeysData_343; + public ImGuiKeyData KeysData_344; + public ImGuiKeyData KeysData_345; + public ImGuiKeyData KeysData_346; + public ImGuiKeyData KeysData_347; + public ImGuiKeyData KeysData_348; + public ImGuiKeyData KeysData_349; + public ImGuiKeyData KeysData_350; + public ImGuiKeyData KeysData_351; + public ImGuiKeyData KeysData_352; + public ImGuiKeyData KeysData_353; + public ImGuiKeyData KeysData_354; + public ImGuiKeyData KeysData_355; + public ImGuiKeyData KeysData_356; + public ImGuiKeyData KeysData_357; + public ImGuiKeyData KeysData_358; + public ImGuiKeyData KeysData_359; + public ImGuiKeyData KeysData_360; + public ImGuiKeyData KeysData_361; + public ImGuiKeyData KeysData_362; + public ImGuiKeyData KeysData_363; + public ImGuiKeyData KeysData_364; + public ImGuiKeyData KeysData_365; + public ImGuiKeyData KeysData_366; + public ImGuiKeyData KeysData_367; + public ImGuiKeyData KeysData_368; + public ImGuiKeyData KeysData_369; + public ImGuiKeyData KeysData_370; + public ImGuiKeyData KeysData_371; + public ImGuiKeyData KeysData_372; + public ImGuiKeyData KeysData_373; + public ImGuiKeyData KeysData_374; + public ImGuiKeyData KeysData_375; + public ImGuiKeyData KeysData_376; + public ImGuiKeyData KeysData_377; + public ImGuiKeyData KeysData_378; + public ImGuiKeyData KeysData_379; + public ImGuiKeyData KeysData_380; + public ImGuiKeyData KeysData_381; + public ImGuiKeyData KeysData_382; + public ImGuiKeyData KeysData_383; + public ImGuiKeyData KeysData_384; + public ImGuiKeyData KeysData_385; + public ImGuiKeyData KeysData_386; + public ImGuiKeyData KeysData_387; + public ImGuiKeyData KeysData_388; + public ImGuiKeyData KeysData_389; + public ImGuiKeyData KeysData_390; + public ImGuiKeyData KeysData_391; + public ImGuiKeyData KeysData_392; + public ImGuiKeyData KeysData_393; + public ImGuiKeyData KeysData_394; + public ImGuiKeyData KeysData_395; + public ImGuiKeyData KeysData_396; + public ImGuiKeyData KeysData_397; + public ImGuiKeyData KeysData_398; + public ImGuiKeyData KeysData_399; + public ImGuiKeyData KeysData_400; + public ImGuiKeyData KeysData_401; + public ImGuiKeyData KeysData_402; + public ImGuiKeyData KeysData_403; + public ImGuiKeyData KeysData_404; + public ImGuiKeyData KeysData_405; + public ImGuiKeyData KeysData_406; + public ImGuiKeyData KeysData_407; + public ImGuiKeyData KeysData_408; + public ImGuiKeyData KeysData_409; + public ImGuiKeyData KeysData_410; + public ImGuiKeyData KeysData_411; + public ImGuiKeyData KeysData_412; + public ImGuiKeyData KeysData_413; + public ImGuiKeyData KeysData_414; + public ImGuiKeyData KeysData_415; + public ImGuiKeyData KeysData_416; + public ImGuiKeyData KeysData_417; + public ImGuiKeyData KeysData_418; + public ImGuiKeyData KeysData_419; + public ImGuiKeyData KeysData_420; + public ImGuiKeyData KeysData_421; + public ImGuiKeyData KeysData_422; + public ImGuiKeyData KeysData_423; + public ImGuiKeyData KeysData_424; + public ImGuiKeyData KeysData_425; + public ImGuiKeyData KeysData_426; + public ImGuiKeyData KeysData_427; + public ImGuiKeyData KeysData_428; + public ImGuiKeyData KeysData_429; + public ImGuiKeyData KeysData_430; + public ImGuiKeyData KeysData_431; + public ImGuiKeyData KeysData_432; + public ImGuiKeyData KeysData_433; + public ImGuiKeyData KeysData_434; + public ImGuiKeyData KeysData_435; + public ImGuiKeyData KeysData_436; + public ImGuiKeyData KeysData_437; + public ImGuiKeyData KeysData_438; + public ImGuiKeyData KeysData_439; + public ImGuiKeyData KeysData_440; + public ImGuiKeyData KeysData_441; + public ImGuiKeyData KeysData_442; + public ImGuiKeyData KeysData_443; + public ImGuiKeyData KeysData_444; + public ImGuiKeyData KeysData_445; + public ImGuiKeyData KeysData_446; + public ImGuiKeyData KeysData_447; + public ImGuiKeyData KeysData_448; + public ImGuiKeyData KeysData_449; + public ImGuiKeyData KeysData_450; + public ImGuiKeyData KeysData_451; + public ImGuiKeyData KeysData_452; + public ImGuiKeyData KeysData_453; + public ImGuiKeyData KeysData_454; + public ImGuiKeyData KeysData_455; + public ImGuiKeyData KeysData_456; + public ImGuiKeyData KeysData_457; + public ImGuiKeyData KeysData_458; + public ImGuiKeyData KeysData_459; + public ImGuiKeyData KeysData_460; + public ImGuiKeyData KeysData_461; + public ImGuiKeyData KeysData_462; + public ImGuiKeyData KeysData_463; + public ImGuiKeyData KeysData_464; + public ImGuiKeyData KeysData_465; + public ImGuiKeyData KeysData_466; + public ImGuiKeyData KeysData_467; + public ImGuiKeyData KeysData_468; + public ImGuiKeyData KeysData_469; + public ImGuiKeyData KeysData_470; + public ImGuiKeyData KeysData_471; + public ImGuiKeyData KeysData_472; + public ImGuiKeyData KeysData_473; + public ImGuiKeyData KeysData_474; + public ImGuiKeyData KeysData_475; + public ImGuiKeyData KeysData_476; + public ImGuiKeyData KeysData_477; + public ImGuiKeyData KeysData_478; + public ImGuiKeyData KeysData_479; + public ImGuiKeyData KeysData_480; + public ImGuiKeyData KeysData_481; + public ImGuiKeyData KeysData_482; + public ImGuiKeyData KeysData_483; + public ImGuiKeyData KeysData_484; + public ImGuiKeyData KeysData_485; + public ImGuiKeyData KeysData_486; + public ImGuiKeyData KeysData_487; + public ImGuiKeyData KeysData_488; + public ImGuiKeyData KeysData_489; + public ImGuiKeyData KeysData_490; + public ImGuiKeyData KeysData_491; + public ImGuiKeyData KeysData_492; + public ImGuiKeyData KeysData_493; + public ImGuiKeyData KeysData_494; + public ImGuiKeyData KeysData_495; + public ImGuiKeyData KeysData_496; + public ImGuiKeyData KeysData_497; + public ImGuiKeyData KeysData_498; + public ImGuiKeyData KeysData_499; + public ImGuiKeyData KeysData_500; + public ImGuiKeyData KeysData_501; + public ImGuiKeyData KeysData_502; + public ImGuiKeyData KeysData_503; + public ImGuiKeyData KeysData_504; + public ImGuiKeyData KeysData_505; + public ImGuiKeyData KeysData_506; + public ImGuiKeyData KeysData_507; + public ImGuiKeyData KeysData_508; + public ImGuiKeyData KeysData_509; + public ImGuiKeyData KeysData_510; + public ImGuiKeyData KeysData_511; + public ImGuiKeyData KeysData_512; + public ImGuiKeyData KeysData_513; + public ImGuiKeyData KeysData_514; + public ImGuiKeyData KeysData_515; + public ImGuiKeyData KeysData_516; + public ImGuiKeyData KeysData_517; + public ImGuiKeyData KeysData_518; + public ImGuiKeyData KeysData_519; + public ImGuiKeyData KeysData_520; + public ImGuiKeyData KeysData_521; + public ImGuiKeyData KeysData_522; + public ImGuiKeyData KeysData_523; + public ImGuiKeyData KeysData_524; + public ImGuiKeyData KeysData_525; + public ImGuiKeyData KeysData_526; + public ImGuiKeyData KeysData_527; + public ImGuiKeyData KeysData_528; + public ImGuiKeyData KeysData_529; + public ImGuiKeyData KeysData_530; + public ImGuiKeyData KeysData_531; + public ImGuiKeyData KeysData_532; + public ImGuiKeyData KeysData_533; + public ImGuiKeyData KeysData_534; + public ImGuiKeyData KeysData_535; + public ImGuiKeyData KeysData_536; + public ImGuiKeyData KeysData_537; + public ImGuiKeyData KeysData_538; + public ImGuiKeyData KeysData_539; + public ImGuiKeyData KeysData_540; + public ImGuiKeyData KeysData_541; + public ImGuiKeyData KeysData_542; + public ImGuiKeyData KeysData_543; + public ImGuiKeyData KeysData_544; + public ImGuiKeyData KeysData_545; + public ImGuiKeyData KeysData_546; + public ImGuiKeyData KeysData_547; + public ImGuiKeyData KeysData_548; + public ImGuiKeyData KeysData_549; + public ImGuiKeyData KeysData_550; + public ImGuiKeyData KeysData_551; + public ImGuiKeyData KeysData_552; + public ImGuiKeyData KeysData_553; + public ImGuiKeyData KeysData_554; + public ImGuiKeyData KeysData_555; + public ImGuiKeyData KeysData_556; + public ImGuiKeyData KeysData_557; + public ImGuiKeyData KeysData_558; + public ImGuiKeyData KeysData_559; + public ImGuiKeyData KeysData_560; + public ImGuiKeyData KeysData_561; + public ImGuiKeyData KeysData_562; + public ImGuiKeyData KeysData_563; + public ImGuiKeyData KeysData_564; + public ImGuiKeyData KeysData_565; + public ImGuiKeyData KeysData_566; + public ImGuiKeyData KeysData_567; + public ImGuiKeyData KeysData_568; + public ImGuiKeyData KeysData_569; + public ImGuiKeyData KeysData_570; + public ImGuiKeyData KeysData_571; + public ImGuiKeyData KeysData_572; + public ImGuiKeyData KeysData_573; + public ImGuiKeyData KeysData_574; + public ImGuiKeyData KeysData_575; + public ImGuiKeyData KeysData_576; + public ImGuiKeyData KeysData_577; + public ImGuiKeyData KeysData_578; + public ImGuiKeyData KeysData_579; + public ImGuiKeyData KeysData_580; + public ImGuiKeyData KeysData_581; + public ImGuiKeyData KeysData_582; + public ImGuiKeyData KeysData_583; + public ImGuiKeyData KeysData_584; + public ImGuiKeyData KeysData_585; + public ImGuiKeyData KeysData_586; + public ImGuiKeyData KeysData_587; + public ImGuiKeyData KeysData_588; + public ImGuiKeyData KeysData_589; + public ImGuiKeyData KeysData_590; + public ImGuiKeyData KeysData_591; + public ImGuiKeyData KeysData_592; + public ImGuiKeyData KeysData_593; + public ImGuiKeyData KeysData_594; + public ImGuiKeyData KeysData_595; + public ImGuiKeyData KeysData_596; + public ImGuiKeyData KeysData_597; + public ImGuiKeyData KeysData_598; + public ImGuiKeyData KeysData_599; + public ImGuiKeyData KeysData_600; + public ImGuiKeyData KeysData_601; + public ImGuiKeyData KeysData_602; + public ImGuiKeyData KeysData_603; + public ImGuiKeyData KeysData_604; + public ImGuiKeyData KeysData_605; + public ImGuiKeyData KeysData_606; + public ImGuiKeyData KeysData_607; + public ImGuiKeyData KeysData_608; + public ImGuiKeyData KeysData_609; + public ImGuiKeyData KeysData_610; + public ImGuiKeyData KeysData_611; + public ImGuiKeyData KeysData_612; + public ImGuiKeyData KeysData_613; + public ImGuiKeyData KeysData_614; + public ImGuiKeyData KeysData_615; + public ImGuiKeyData KeysData_616; + public ImGuiKeyData KeysData_617; + public ImGuiKeyData KeysData_618; + public ImGuiKeyData KeysData_619; + public ImGuiKeyData KeysData_620; + public ImGuiKeyData KeysData_621; + public ImGuiKeyData KeysData_622; + public ImGuiKeyData KeysData_623; + public ImGuiKeyData KeysData_624; + public ImGuiKeyData KeysData_625; + public ImGuiKeyData KeysData_626; + public ImGuiKeyData KeysData_627; + public ImGuiKeyData KeysData_628; + public ImGuiKeyData KeysData_629; + public ImGuiKeyData KeysData_630; + public ImGuiKeyData KeysData_631; + public ImGuiKeyData KeysData_632; + public ImGuiKeyData KeysData_633; + public ImGuiKeyData KeysData_634; + public ImGuiKeyData KeysData_635; + public ImGuiKeyData KeysData_636; + public ImGuiKeyData KeysData_637; + public ImGuiKeyData KeysData_638; + public ImGuiKeyData KeysData_639; + public ImGuiKeyData KeysData_640; + public ImGuiKeyData KeysData_641; + public ImGuiKeyData KeysData_642; + public ImGuiKeyData KeysData_643; + public ImGuiKeyData KeysData_644; + public byte WantCaptureMouseUnlessPopupClose; + 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 ushort MouseClickedCount[5]; + public fixed ushort MouseClickedLastCount[5]; + public fixed byte MouseReleased[5]; + public fixed byte MouseDownOwned[5]; + public fixed byte MouseDownOwnedUnlessPopupClose[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 NavInputsDownDuration[20]; + public fixed float NavInputsDownDurationPrev[20]; + public float PenPressure; + public byte AppFocusLost; + public sbyte BackendUsingLegacyKeyArrays; + public byte BackendUsingLegacyNavInputArray; + public ushort InputQueueSurrogate; + public ImVector InputQueueCharacters; + } + 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 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 bool FontAllowUserScaling => ref Unsafe.AsRef(&NativePtr->FontAllowUserScaling); + public ImFontPtr FontDefault => new ImFontPtr(NativePtr->FontDefault); + public ref Vector2 DisplayFramebufferScale => ref Unsafe.AsRef(&NativePtr->DisplayFramebufferScale); + public ref bool ConfigDockingNoSplit => ref Unsafe.AsRef(&NativePtr->ConfigDockingNoSplit); + public ref bool ConfigDockingWithShift => ref Unsafe.AsRef(&NativePtr->ConfigDockingWithShift); + public ref bool ConfigDockingAlwaysTabBar => ref Unsafe.AsRef(&NativePtr->ConfigDockingAlwaysTabBar); + public ref bool ConfigDockingTransparentPayload => ref Unsafe.AsRef(&NativePtr->ConfigDockingTransparentPayload); + public ref bool ConfigViewportsNoAutoMerge => ref Unsafe.AsRef(&NativePtr->ConfigViewportsNoAutoMerge); + public ref bool ConfigViewportsNoTaskBarIcon => ref Unsafe.AsRef(&NativePtr->ConfigViewportsNoTaskBarIcon); + public ref bool ConfigViewportsNoDecoration => ref Unsafe.AsRef(&NativePtr->ConfigViewportsNoDecoration); + public ref bool ConfigViewportsNoDefaultParent => ref Unsafe.AsRef(&NativePtr->ConfigViewportsNoDefaultParent); + public ref bool MouseDrawCursor => ref Unsafe.AsRef(&NativePtr->MouseDrawCursor); + public ref bool ConfigMacOSXBehaviors => ref Unsafe.AsRef(&NativePtr->ConfigMacOSXBehaviors); + public ref bool ConfigInputTrickleEventQueue => ref Unsafe.AsRef(&NativePtr->ConfigInputTrickleEventQueue); + public ref bool ConfigInputTextCursorBlink => ref Unsafe.AsRef(&NativePtr->ConfigInputTextCursorBlink); + public ref bool ConfigDragClickToInputText => ref Unsafe.AsRef(&NativePtr->ConfigDragClickToInputText); + public ref bool ConfigWindowsResizeFromEdges => ref Unsafe.AsRef(&NativePtr->ConfigWindowsResizeFromEdges); + public ref bool ConfigWindowsMoveFromTitleBarOnly => ref Unsafe.AsRef(&NativePtr->ConfigWindowsMoveFromTitleBarOnly); + public ref float ConfigMemoryCompactTimer => ref Unsafe.AsRef(&NativePtr->ConfigMemoryCompactTimer); + public NullTerminatedString BackendPlatformName => new NullTerminatedString(NativePtr->BackendPlatformName); + public NullTerminatedString BackendRendererName => new NullTerminatedString(NativePtr->BackendRendererName); + public IntPtr BackendPlatformUserData { get => (IntPtr)NativePtr->BackendPlatformUserData; set => NativePtr->BackendPlatformUserData = (void*)value; } + public IntPtr BackendRendererUserData { get => (IntPtr)NativePtr->BackendRendererUserData; set => NativePtr->BackendRendererUserData = (void*)value; } + public IntPtr BackendLanguageUserData { get => (IntPtr)NativePtr->BackendLanguageUserData; set => NativePtr->BackendLanguageUserData = (void*)value; } + 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 SetPlatformImeDataFn => ref Unsafe.AsRef(&NativePtr->SetPlatformImeDataFn); + public IntPtr _UnusedPadding { get => (IntPtr)NativePtr->_UnusedPadding; set => NativePtr->_UnusedPadding = (void*)value; } + public ref bool WantCaptureMouse => ref Unsafe.AsRef(&NativePtr->WantCaptureMouse); + public ref bool WantCaptureKeyboard => ref Unsafe.AsRef(&NativePtr->WantCaptureKeyboard); + public ref bool WantTextInput => ref Unsafe.AsRef(&NativePtr->WantTextInput); + public ref bool WantSetMousePos => ref Unsafe.AsRef(&NativePtr->WantSetMousePos); + public ref bool WantSaveIniSettings => ref Unsafe.AsRef(&NativePtr->WantSaveIniSettings); + public ref bool NavActive => ref Unsafe.AsRef(&NativePtr->NavActive); + public ref bool 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 RangeAccessor KeyMap => new RangeAccessor(NativePtr->KeyMap, 645); + public RangeAccessor KeysDown => new RangeAccessor(NativePtr->KeysDown, 512); + 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 uint MouseHoveredViewport => ref Unsafe.AsRef(&NativePtr->MouseHoveredViewport); + public ref bool KeyCtrl => ref Unsafe.AsRef(&NativePtr->KeyCtrl); + public ref bool KeyShift => ref Unsafe.AsRef(&NativePtr->KeyShift); + public ref bool KeyAlt => ref Unsafe.AsRef(&NativePtr->KeyAlt); + public ref bool KeySuper => ref Unsafe.AsRef(&NativePtr->KeySuper); + public RangeAccessor NavInputs => new RangeAccessor(NativePtr->NavInputs, 20); + public ref ImGuiKeyModFlags KeyMods => ref Unsafe.AsRef(&NativePtr->KeyMods); + public ref ImGuiKeyModFlags KeyModsPrev => ref Unsafe.AsRef(&NativePtr->KeyModsPrev); + public RangeAccessor KeysData => new RangeAccessor(&NativePtr->KeysData_0, 645); + public ref bool WantCaptureMouseUnlessPopupClose => ref Unsafe.AsRef(&NativePtr->WantCaptureMouseUnlessPopupClose); + 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 MouseClickedCount => new RangeAccessor(NativePtr->MouseClickedCount, 5); + public RangeAccessor MouseClickedLastCount => new RangeAccessor(NativePtr->MouseClickedLastCount, 5); + public RangeAccessor MouseReleased => new RangeAccessor(NativePtr->MouseReleased, 5); + public RangeAccessor MouseDownOwned => new RangeAccessor(NativePtr->MouseDownOwned, 5); + public RangeAccessor MouseDownOwnedUnlessPopupClose => new RangeAccessor(NativePtr->MouseDownOwnedUnlessPopupClose, 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 NavInputsDownDuration => new RangeAccessor(NativePtr->NavInputsDownDuration, 20); + public RangeAccessor NavInputsDownDurationPrev => new RangeAccessor(NativePtr->NavInputsDownDurationPrev, 20); + public ref float PenPressure => ref Unsafe.AsRef(&NativePtr->PenPressure); + public ref bool AppFocusLost => ref Unsafe.AsRef(&NativePtr->AppFocusLost); + public ref sbyte BackendUsingLegacyKeyArrays => ref Unsafe.AsRef(&NativePtr->BackendUsingLegacyKeyArrays); + public ref bool BackendUsingLegacyNavInputArray => ref Unsafe.AsRef(&NativePtr->BackendUsingLegacyNavInputArray); + public ref ushort InputQueueSurrogate => ref Unsafe.AsRef(&NativePtr->InputQueueSurrogate); + public ImVector InputQueueCharacters => new ImVector(NativePtr->InputQueueCharacters); + public void AddFocusEvent(bool focused) + { + byte native_focused = focused ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddFocusEvent((ImGuiIO*)(NativePtr), native_focused); + } + public void AddInputCharacter(uint c) + { + ImGuiNative.ImGuiIO_AddInputCharacter((ImGuiIO*)(NativePtr), c); + } + public void AddInputCharactersUTF8(string str) + { + byte* native_str; + int str_byteCount = 0; + if (str != null) + { + str_byteCount = Encoding.UTF8.GetByteCount(str); + if (str_byteCount > Util.StackAllocationSizeLimit) + { + native_str = Util.Allocate(str_byteCount + 1); + } + else + { + byte* native_str_stackBytes = stackalloc byte[str_byteCount + 1]; + native_str = native_str_stackBytes; + } + int native_str_offset = Util.GetUtf8(str, native_str, str_byteCount); + native_str[native_str_offset] = 0; + } + else { native_str = null; } + ImGuiNative.ImGuiIO_AddInputCharactersUTF8((ImGuiIO*)(NativePtr), native_str); + if (str_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str); + } + } + public void AddInputCharacterUTF16(ushort c) + { + ImGuiNative.ImGuiIO_AddInputCharacterUTF16((ImGuiIO*)(NativePtr), c); + } + public void AddKeyAnalogEvent(ImGuiKey key, bool down, float v) + { + byte native_down = down ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddKeyAnalogEvent((ImGuiIO*)(NativePtr), key, native_down, v); + } + public void AddKeyEvent(ImGuiKey key, bool down) + { + byte native_down = down ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddKeyEvent((ImGuiIO*)(NativePtr), key, native_down); + } + public void AddMouseButtonEvent(int button, bool down) + { + byte native_down = down ? (byte)1 : (byte)0; + ImGuiNative.ImGuiIO_AddMouseButtonEvent((ImGuiIO*)(NativePtr), button, native_down); + } + public void AddMousePosEvent(float x, float y) + { + ImGuiNative.ImGuiIO_AddMousePosEvent((ImGuiIO*)(NativePtr), x, y); + } + public void AddMouseViewportEvent(uint id) + { + ImGuiNative.ImGuiIO_AddMouseViewportEvent((ImGuiIO*)(NativePtr), id); + } + public void AddMouseWheelEvent(float wh_x, float wh_y) + { + ImGuiNative.ImGuiIO_AddMouseWheelEvent((ImGuiIO*)(NativePtr), wh_x, wh_y); + } + public void ClearInputCharacters() + { + ImGuiNative.ImGuiIO_ClearInputCharacters((ImGuiIO*)(NativePtr)); + } + public void ClearInputKeys() + { + ImGuiNative.ImGuiIO_ClearInputKeys((ImGuiIO*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImGuiIO_destroy((ImGuiIO*)(NativePtr)); + } + public void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode) + { + int native_legacy_index = -1; + ImGuiNative.ImGuiIO_SetKeyEventNativeData((ImGuiIO*)(NativePtr), key, native_keycode, native_scancode, native_legacy_index); + } + public void SetKeyEventNativeData(ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index) + { + ImGuiNative.ImGuiIO_SetKeyEventNativeData((ImGuiIO*)(NativePtr), key, native_keycode, native_scancode, native_legacy_index); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs b/lib/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs new file mode 100644 index 0000000..4c11005 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiInputTextCallbackData.gen.cs @@ -0,0 +1,92 @@ +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 bool 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 ClearSelection() + { + ImGuiNative.ImGuiInputTextCallbackData_ClearSelection((ImGuiInputTextCallbackData*)(NativePtr)); + } + public void DeleteChars(int pos, int bytes_count) + { + ImGuiNative.ImGuiInputTextCallbackData_DeleteChars((ImGuiInputTextCallbackData*)(NativePtr), pos, bytes_count); + } + public void Destroy() + { + ImGuiNative.ImGuiInputTextCallbackData_destroy((ImGuiInputTextCallbackData*)(NativePtr)); + } + public bool HasSelection() + { + byte ret = ImGuiNative.ImGuiInputTextCallbackData_HasSelection((ImGuiInputTextCallbackData*)(NativePtr)); + return ret != 0; + } + public void InsertChars(int pos, string text) + { + byte* native_text; + int text_byteCount = 0; + if (text != null) + { + text_byteCount = Encoding.UTF8.GetByteCount(text); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + native_text = Util.Allocate(text_byteCount + 1); + } + else + { + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + } + int native_text_offset = Util.GetUtf8(text, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + else { native_text = null; } + byte* native_text_end = null; + ImGuiNative.ImGuiInputTextCallbackData_InsertChars((ImGuiInputTextCallbackData*)(NativePtr), pos, native_text, native_text_end); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_text); + } + } + public void SelectAll() + { + ImGuiNative.ImGuiInputTextCallbackData_SelectAll((ImGuiInputTextCallbackData*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiInputTextFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiInputTextFlags.gen.cs new file mode 100644 index 0000000..1b457b7 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiInputTextFlags.gen.cs @@ -0,0 +1,28 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiInputTextFlags + { + None = 0, + CharsDecimal = 1, + CharsHexadecimal = 2, + CharsUppercase = 4, + CharsNoBlank = 8, + AutoSelectAll = 16, + EnterReturnsTrue = 32, + CallbackCompletion = 64, + CallbackHistory = 128, + CallbackAlways = 256, + CallbackCharFilter = 512, + AllowTabInput = 1024, + CtrlEnterForNewLine = 2048, + NoHorizontalScroll = 4096, + AlwaysOverwrite = 8192, + ReadOnly = 16384, + Password = 32768, + NoUndoRedo = 65536, + CharsScientific = 131072, + CallbackResize = 262144, + CallbackEdit = 524288, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiKey.gen.cs b/lib/ImGui.NET/Generated/ImGuiKey.gen.cs new file mode 100644 index 0000000..cbe2e94 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiKey.gen.cs @@ -0,0 +1,146 @@ +namespace ImGuiNET +{ + public enum ImGuiKey + { + None = 0, + Tab = 512, + LeftArrow = 513, + RightArrow = 514, + UpArrow = 515, + DownArrow = 516, + PageUp = 517, + PageDown = 518, + Home = 519, + End = 520, + Insert = 521, + Delete = 522, + Backspace = 523, + Space = 524, + Enter = 525, + Escape = 526, + LeftCtrl = 527, + LeftShift = 528, + LeftAlt = 529, + LeftSuper = 530, + RightCtrl = 531, + RightShift = 532, + RightAlt = 533, + RightSuper = 534, + Menu = 535, + _0 = 536, + _1 = 537, + _2 = 538, + _3 = 539, + _4 = 540, + _5 = 541, + _6 = 542, + _7 = 543, + _8 = 544, + _9 = 545, + A = 546, + B = 547, + C = 548, + D = 549, + E = 550, + F = 551, + G = 552, + H = 553, + I = 554, + J = 555, + K = 556, + L = 557, + M = 558, + N = 559, + O = 560, + P = 561, + Q = 562, + R = 563, + S = 564, + T = 565, + U = 566, + V = 567, + W = 568, + X = 569, + Y = 570, + Z = 571, + F1 = 572, + F2 = 573, + F3 = 574, + F4 = 575, + F5 = 576, + F6 = 577, + F7 = 578, + F8 = 579, + F9 = 580, + F10 = 581, + F11 = 582, + F12 = 583, + Apostrophe = 584, + Comma = 585, + Minus = 586, + Period = 587, + Slash = 588, + Semicolon = 589, + Equal = 590, + LeftBracket = 591, + Backslash = 592, + RightBracket = 593, + GraveAccent = 594, + CapsLock = 595, + ScrollLock = 596, + NumLock = 597, + PrintScreen = 598, + Pause = 599, + Keypad0 = 600, + Keypad1 = 601, + Keypad2 = 602, + Keypad3 = 603, + Keypad4 = 604, + Keypad5 = 605, + Keypad6 = 606, + Keypad7 = 607, + Keypad8 = 608, + Keypad9 = 609, + KeypadDecimal = 610, + KeypadDivide = 611, + KeypadMultiply = 612, + KeypadSubtract = 613, + KeypadAdd = 614, + KeypadEnter = 615, + KeypadEqual = 616, + GamepadStart = 617, + GamepadBack = 618, + GamepadFaceUp = 619, + GamepadFaceDown = 620, + GamepadFaceLeft = 621, + GamepadFaceRight = 622, + GamepadDpadUp = 623, + GamepadDpadDown = 624, + GamepadDpadLeft = 625, + GamepadDpadRight = 626, + GamepadL1 = 627, + GamepadR1 = 628, + GamepadL2 = 629, + GamepadR2 = 630, + GamepadL3 = 631, + GamepadR3 = 632, + GamepadLStickUp = 633, + GamepadLStickDown = 634, + GamepadLStickLeft = 635, + GamepadLStickRight = 636, + GamepadRStickUp = 637, + GamepadRStickDown = 638, + GamepadRStickLeft = 639, + GamepadRStickRight = 640, + ModCtrl = 641, + ModShift = 642, + ModAlt = 643, + ModSuper = 644, + COUNT = 645, + NamedKey_BEGIN = 512, + NamedKey_END = 645, + NamedKey_COUNT = 133, + KeysData_SIZE = 645, + KeysData_OFFSET = 0, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiKeyData.gen.cs b/lib/ImGui.NET/Generated/ImGuiKeyData.gen.cs new file mode 100644 index 0000000..68ebbdc --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiKeyData.gen.cs @@ -0,0 +1,28 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiKeyData + { + public byte Down; + public float DownDuration; + public float DownDurationPrev; + public float AnalogValue; + } + public unsafe partial struct ImGuiKeyDataPtr + { + public ImGuiKeyData* NativePtr { get; } + public ImGuiKeyDataPtr(ImGuiKeyData* nativePtr) => NativePtr = nativePtr; + public ImGuiKeyDataPtr(IntPtr nativePtr) => NativePtr = (ImGuiKeyData*)nativePtr; + public static implicit operator ImGuiKeyDataPtr(ImGuiKeyData* nativePtr) => new ImGuiKeyDataPtr(nativePtr); + public static implicit operator ImGuiKeyData* (ImGuiKeyDataPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiKeyDataPtr(IntPtr nativePtr) => new ImGuiKeyDataPtr(nativePtr); + public ref bool Down => ref Unsafe.AsRef(&NativePtr->Down); + public ref float DownDuration => ref Unsafe.AsRef(&NativePtr->DownDuration); + public ref float DownDurationPrev => ref Unsafe.AsRef(&NativePtr->DownDurationPrev); + public ref float AnalogValue => ref Unsafe.AsRef(&NativePtr->AnalogValue); + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiKeyModFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiKeyModFlags.gen.cs new file mode 100644 index 0000000..35fc28e --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiKeyModFlags.gen.cs @@ -0,0 +1,12 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiKeyModFlags + { + None = 0, + Ctrl = 1, + Shift = 2, + Alt = 4, + Super = 8, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiListClipper.gen.cs b/lib/ImGui.NET/Generated/ImGuiListClipper.gen.cs new file mode 100644 index 0000000..27a809b --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiListClipper.gen.cs @@ -0,0 +1,58 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiListClipper + { + public int DisplayStart; + public int DisplayEnd; + public int ItemsCount; + public float ItemsHeight; + public float StartPosY; + public void* TempData; + } + 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 int DisplayStart => ref Unsafe.AsRef(&NativePtr->DisplayStart); + public ref int DisplayEnd => ref Unsafe.AsRef(&NativePtr->DisplayEnd); + public ref int ItemsCount => ref Unsafe.AsRef(&NativePtr->ItemsCount); + public ref float ItemsHeight => ref Unsafe.AsRef(&NativePtr->ItemsHeight); + public ref float StartPosY => ref Unsafe.AsRef(&NativePtr->StartPosY); + public IntPtr TempData { get => (IntPtr)NativePtr->TempData; set => NativePtr->TempData = (void*)value; } + public void Begin(int items_count) + { + float items_height = -1.0f; + ImGuiNative.ImGuiListClipper_Begin((ImGuiListClipper*)(NativePtr), items_count, items_height); + } + public void Begin(int items_count, float items_height) + { + ImGuiNative.ImGuiListClipper_Begin((ImGuiListClipper*)(NativePtr), items_count, items_height); + } + public void Destroy() + { + ImGuiNative.ImGuiListClipper_destroy((ImGuiListClipper*)(NativePtr)); + } + public void End() + { + ImGuiNative.ImGuiListClipper_End((ImGuiListClipper*)(NativePtr)); + } + public void ForceDisplayRangeByIndices(int item_min, int item_max) + { + ImGuiNative.ImGuiListClipper_ForceDisplayRangeByIndices((ImGuiListClipper*)(NativePtr), item_min, item_max); + } + public bool Step() + { + byte ret = ImGuiNative.ImGuiListClipper_Step((ImGuiListClipper*)(NativePtr)); + return ret != 0; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiMouseButton.gen.cs b/lib/ImGui.NET/Generated/ImGuiMouseButton.gen.cs new file mode 100644 index 0000000..96a3fd1 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiMouseButton.gen.cs @@ -0,0 +1,10 @@ +namespace ImGuiNET +{ + public enum ImGuiMouseButton + { + Left = 0, + Right = 1, + Middle = 2, + COUNT = 5, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiMouseCursor.gen.cs b/lib/ImGui.NET/Generated/ImGuiMouseCursor.gen.cs new file mode 100644 index 0000000..fcf21e1 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiMouseCursor.gen.cs @@ -0,0 +1,17 @@ +namespace ImGuiNET +{ + public enum ImGuiMouseCursor + { + None = -1, + Arrow = 0, + TextInput = 1, + ResizeAll = 2, + ResizeNS = 3, + ResizeEW = 4, + ResizeNESW = 5, + ResizeNWSE = 6, + Hand = 7, + NotAllowed = 8, + COUNT = 9, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiNative.gen.cs b/lib/ImGui.NET/Generated/ImGuiNative.gen.cs new file mode 100644 index 0000000..92840df --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiNative.gen.cs @@ -0,0 +1,1266 @@ +using System; +using System.Numerics; +using System.Runtime.InteropServices; + +namespace ImGuiNET +{ + public static unsafe partial class ImGuiNative + { + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPayload* igAcceptDragDropPayload(byte* type, ImGuiDragDropFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igAlignTextToFramePadding(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igArrowButton(byte* str_id, ImGuiDir dir); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBegin(byte* name, byte* p_open, ImGuiWindowFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginChild_Str(byte* str_id, Vector2 size, byte border, ImGuiWindowFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginChild_ID(uint id, Vector2 size, byte border, ImGuiWindowFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginChildFrame(uint id, Vector2 size, ImGuiWindowFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginCombo(byte* label, byte* preview_value, ImGuiComboFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igBeginDisabled(byte disabled); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginDragDropSource(ImGuiDragDropFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginDragDropTarget(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igBeginGroup(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginListBox(byte* label, Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginMainMenuBar(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginMenu(byte* label, byte enabled); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginMenuBar(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginPopup(byte* str_id, ImGuiWindowFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginPopupContextItem(byte* str_id, ImGuiPopupFlags popup_flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginPopupContextVoid(byte* str_id, ImGuiPopupFlags popup_flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginPopupContextWindow(byte* str_id, ImGuiPopupFlags popup_flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginPopupModal(byte* name, byte* p_open, ImGuiWindowFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginTabBar(byte* str_id, ImGuiTabBarFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginTabItem(byte* label, byte* p_open, ImGuiTabItemFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igBeginTable(byte* str_id, int column, ImGuiTableFlags flags, Vector2 outer_size, float inner_width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igBeginTooltip(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igBullet(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igBulletText(byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igButton(byte* label, Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igCalcItemWidth(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igCalcTextSize(Vector2* pOut, byte* text, byte* text_end, byte hide_text_after_double_hash, float wrap_width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igCaptureKeyboardFromApp(byte want_capture_keyboard_value); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igCaptureMouseFromApp(byte want_capture_mouse_value); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCheckbox(byte* label, byte* v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCheckboxFlags_IntPtr(byte* label, int* flags, int flags_value); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCheckboxFlags_UintPtr(byte* label, uint* flags, uint flags_value); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igCloseCurrentPopup(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCollapsingHeader_TreeNodeFlags(byte* label, ImGuiTreeNodeFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCollapsingHeader_BoolPtr(byte* label, byte* p_visible, ImGuiTreeNodeFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igColorButton(byte* desc_id, Vector4 col, ImGuiColorEditFlags flags, Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igColorConvertFloat4ToU32(Vector4 @in); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igColorConvertHSVtoRGB(float h, float s, float v, float* out_r, float* out_g, float* out_b); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igColorConvertRGBtoHSV(float r, float g, float b, float* out_h, float* out_s, float* out_v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igColorConvertU32ToFloat4(Vector4* pOut, uint @in); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igColorEdit3(byte* label, Vector3* col, ImGuiColorEditFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igColorEdit4(byte* label, Vector4* col, ImGuiColorEditFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igColorPicker3(byte* label, Vector3* col, ImGuiColorEditFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igColorPicker4(byte* label, Vector4* col, ImGuiColorEditFlags flags, float* ref_col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igColumns(int count, byte* id, byte border); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCombo_Str_arr(byte* label, int* current_item, byte** items, int items_count, int popup_max_height_in_items); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igCombo_Str(byte* label, int* current_item, byte* items_separated_by_zeros, int popup_max_height_in_items); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr igCreateContext(ImFontAtlas* shared_font_atlas); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDebugCheckVersionAndDataLayout(byte* version_str, uint sz_io, uint sz_style, uint sz_vec2, uint sz_vec4, uint sz_drawvert, uint sz_drawidx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igDestroyContext(IntPtr ctx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igDestroyPlatformWindows(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igDockSpace(uint id, Vector2 size, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igDockSpaceOverViewport(ImGuiViewport* viewport, ImGuiDockNodeFlags flags, ImGuiWindowClass* window_class); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragFloat(byte* label, float* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragFloat2(byte* label, Vector2* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragFloat3(byte* label, Vector3* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragFloat4(byte* label, Vector4* v, float v_speed, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + 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, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragInt(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragInt2(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragInt3(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragInt4(byte* label, int* v, float v_speed, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + 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, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragScalar(byte* label, ImGuiDataType data_type, void* p_data, float v_speed, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igDragScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, float v_speed, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igDummy(Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEnd(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndChild(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndChildFrame(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndCombo(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndDisabled(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndDragDropSource(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndDragDropTarget(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndFrame(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndGroup(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndListBox(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndMainMenuBar(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndMenu(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndMenuBar(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndPopup(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndTabBar(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndTabItem(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndTable(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igEndTooltip(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* igFindViewportByID(uint id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* igFindViewportByPlatformHandle(void* platform_handle); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetAllocatorFunctions(IntPtr* p_alloc_func, IntPtr* p_free_func, void** p_user_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetBackgroundDrawList_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetBackgroundDrawList_ViewportPtr(ImGuiViewport* viewport); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igGetClipboardText(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetColorU32_Col(ImGuiCol idx, float alpha_mul); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetColorU32_Vec4(Vector4 col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetColorU32_U32(uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetColumnIndex(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetColumnOffset(int column_index); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetColumnsCount(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetColumnWidth(int column_index); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetContentRegionAvail(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetContentRegionMax(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr igGetCurrentContext(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetCursorPos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetCursorPosX(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetCursorPosY(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetCursorScreenPos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetCursorStartPos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPayload* igGetDragDropPayload(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawData* igGetDrawData(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr igGetDrawListSharedData(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFont* igGetFont(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetFontSize(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetFontTexUvWhitePixel(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetForegroundDrawList_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetForegroundDrawList_ViewportPtr(ImGuiViewport* viewport); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetFrameCount(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetFrameHeight(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetFrameHeightWithSpacing(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetID_Str(byte* str_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetID_StrStr(byte* str_id_begin, byte* str_id_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetID_Ptr(void* ptr_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiIO* igGetIO(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetItemRectMax(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetItemRectMin(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetItemRectSize(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetKeyIndex(ImGuiKey key); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igGetKeyName(ImGuiKey key); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetKeyPressedAmount(ImGuiKey key, float repeat_delay, float rate); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* igGetMainViewport(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igGetMouseClickedCount(ImGuiMouseButton button); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiMouseCursor igGetMouseCursor(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetMouseDragDelta(Vector2* pOut, ImGuiMouseButton button, float lock_threshold); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetMousePos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetMousePosOnOpeningCurrentPopup(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformIO* igGetPlatformIO(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetScrollMaxX(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetScrollMaxY(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetScrollX(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetScrollY(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiStorage* igGetStateStorage(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiStyle* igGetStyle(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igGetStyleColorName(ImGuiCol idx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern Vector4* igGetStyleColorVec4(ImGuiCol idx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetTextLineHeight(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetTextLineHeightWithSpacing(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern double igGetTime(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetTreeNodeToLabelSpacing(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igGetVersion(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetWindowContentRegionMax(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetWindowContentRegionMin(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern uint igGetWindowDockID(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetWindowDpiScale(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* igGetWindowDrawList(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetWindowHeight(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetWindowPos(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igGetWindowSize(Vector2* pOut); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* igGetWindowViewport(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float igGetWindowWidth(); + [DllImport("cimgui", 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("cimgui", CallingConvention = CallingConvention.Cdecl)] + 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", CallingConvention = CallingConvention.Cdecl)] + public static extern void igIndent(float indent_w); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputDouble(byte* label, double* v, double step, double step_fast, byte* format, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputFloat(byte* label, float* v, float step, float step_fast, byte* format, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputFloat2(byte* label, Vector2* v, byte* format, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputFloat3(byte* label, Vector3* v, byte* format, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputFloat4(byte* label, Vector4* v, byte* format, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputInt(byte* label, int* v, int step, int step_fast, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputInt2(byte* label, int* v, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputInt3(byte* label, int* v, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputInt4(byte* label, int* v, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputScalar(byte* label, ImGuiDataType data_type, void* p_data, void* p_step, void* p_step_fast, byte* format, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, void* p_step, void* p_step_fast, byte* format, ImGuiInputTextFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputText(byte* label, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputTextMultiline(byte* label, byte* buf, uint buf_size, Vector2 size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInputTextWithHint(byte* label, byte* hint, byte* buf, uint buf_size, ImGuiInputTextFlags flags, ImGuiInputTextCallback callback, void* user_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igInvisibleButton(byte* str_id, Vector2 size, ImGuiButtonFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsAnyItemActive(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsAnyItemFocused(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsAnyItemHovered(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsAnyMouseDown(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemActivated(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemActive(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemClicked(ImGuiMouseButton mouse_button); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemDeactivated(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemDeactivatedAfterEdit(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemEdited(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemFocused(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemHovered(ImGuiHoveredFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemToggledOpen(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsItemVisible(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsKeyDown(ImGuiKey key); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsKeyPressed(ImGuiKey key, byte repeat); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsKeyReleased(ImGuiKey key); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsMouseClicked(ImGuiMouseButton button, byte repeat); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsMouseDoubleClicked(ImGuiMouseButton button); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsMouseDown(ImGuiMouseButton button); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsMouseDragging(ImGuiMouseButton button, float lock_threshold); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsMouseHoveringRect(Vector2 r_min, Vector2 r_max, byte clip); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsMousePosValid(Vector2* mouse_pos); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsMouseReleased(ImGuiMouseButton button); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsPopupOpen_Str(byte* str_id, ImGuiPopupFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsRectVisible_Nil(Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsRectVisible_Vec2(Vector2 rect_min, Vector2 rect_max); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsWindowAppearing(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsWindowCollapsed(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsWindowDocked(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsWindowFocused(ImGuiFocusedFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igIsWindowHovered(ImGuiHoveredFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLabelText(byte* label, byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igListBox_Str_arr(byte* label, int* current_item, byte** items, int items_count, int height_in_items); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLoadIniSettingsFromDisk(byte* ini_filename); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLoadIniSettingsFromMemory(byte* ini_data, uint ini_size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLogButtons(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLogFinish(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLogText(byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLogToClipboard(int auto_open_depth); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLogToFile(int auto_open_depth, byte* filename); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igLogToTTY(int auto_open_depth); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void* igMemAlloc(uint size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igMemFree(void* ptr); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igMenuItem_Bool(byte* label, byte* shortcut, byte selected, byte enabled); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igMenuItem_BoolPtr(byte* label, byte* shortcut, byte* p_selected, byte enabled); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igNewFrame(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igNewLine(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igNextColumn(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igOpenPopup_Str(byte* str_id, ImGuiPopupFlags popup_flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igOpenPopup_ID(uint id, ImGuiPopupFlags popup_flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igOpenPopupOnItemClick(byte* str_id, ImGuiPopupFlags popup_flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPlotHistogram_FloatPtr(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", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPlotLines_FloatPtr(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", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopAllowKeyboardFocus(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopButtonRepeat(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopClipRect(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopFont(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopID(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopItemWidth(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopStyleColor(int count); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopStyleVar(int count); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPopTextWrapPos(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igProgressBar(float fraction, Vector2 size_arg, byte* overlay); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushAllowKeyboardFocus(byte allow_keyboard_focus); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushButtonRepeat(byte repeat); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushClipRect(Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushFont(ImFont* font); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushID_Str(byte* str_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushID_StrStr(byte* str_id_begin, byte* str_id_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushID_Ptr(void* ptr_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushID_Int(int int_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushItemWidth(float item_width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushStyleColor_U32(ImGuiCol idx, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushStyleColor_Vec4(ImGuiCol idx, Vector4 col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushStyleVar_Float(ImGuiStyleVar idx, float val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushStyleVar_Vec2(ImGuiStyleVar idx, Vector2 val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igPushTextWrapPos(float wrap_local_pos_x); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igRadioButton_Bool(byte* label, byte active); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igRadioButton_IntPtr(byte* label, int* v, int v_button); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igRender(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igRenderPlatformWindowsDefault(void* platform_render_arg, void* renderer_render_arg); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igResetMouseDragDelta(ImGuiMouseButton button); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSameLine(float offset_from_start_x, float spacing); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSaveIniSettingsToDisk(byte* ini_filename); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igSaveIniSettingsToMemory(uint* out_ini_size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSelectable_Bool(byte* label, byte selected, ImGuiSelectableFlags flags, Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSelectable_BoolPtr(byte* label, byte* p_selected, ImGuiSelectableFlags flags, Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSeparator(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetAllocatorFunctions(IntPtr alloc_func, IntPtr free_func, void* user_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetClipboardText(byte* text); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetColorEditOptions(ImGuiColorEditFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetColumnOffset(int column_index, float offset_x); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetColumnWidth(int column_index, float width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetCurrentContext(IntPtr ctx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetCursorPos(Vector2 local_pos); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetCursorPosX(float local_x); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetCursorPosY(float local_y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetCursorScreenPos(Vector2 pos); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSetDragDropPayload(byte* type, void* data, uint sz, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetItemAllowOverlap(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetItemDefaultFocus(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetKeyboardFocusHere(int offset); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetMouseCursor(ImGuiMouseCursor cursor_type); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextItemOpen(byte is_open, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextItemWidth(float item_width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowBgAlpha(float alpha); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowClass(ImGuiWindowClass* window_class); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowCollapsed(byte collapsed, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowContentSize(Vector2 size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowDockID(uint dock_id, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowFocus(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowPos(Vector2 pos, ImGuiCond cond, Vector2 pivot); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowSize(Vector2 size, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowSizeConstraints(Vector2 size_min, Vector2 size_max, ImGuiSizeCallback custom_callback, void* custom_callback_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetNextWindowViewport(uint viewport_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetScrollFromPosX_Float(float local_x, float center_x_ratio); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetScrollFromPosY_Float(float local_y, float center_y_ratio); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetScrollHereX(float center_x_ratio); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetScrollHereY(float center_y_ratio); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetScrollX_Float(float scroll_x); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetScrollY_Float(float scroll_y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetStateStorage(ImGuiStorage* storage); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetTabItemClosed(byte* tab_or_docked_window_label); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetTooltip(byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowCollapsed_Bool(byte collapsed, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowCollapsed_Str(byte* name, byte collapsed, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowFocus_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowFocus_Str(byte* name); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowFontScale(float scale); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowPos_Vec2(Vector2 pos, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowPos_Str(byte* name, Vector2 pos, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowSize_Vec2(Vector2 size, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSetWindowSize_Str(byte* name, Vector2 size, ImGuiCond cond); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowAboutWindow(byte* p_open); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowDemoWindow(byte* p_open); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowFontSelector(byte* label); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowMetricsWindow(byte* p_open); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowStackToolWindow(byte* p_open); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowStyleEditor(ImGuiStyle* @ref); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igShowStyleSelector(byte* label); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igShowUserGuide(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderAngle(byte* label, float* v_rad, float v_degrees_min, float v_degrees_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderFloat(byte* label, float* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderFloat2(byte* label, Vector2* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderFloat3(byte* label, Vector3* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderFloat4(byte* label, Vector4* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderInt(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderInt2(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderInt3(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderInt4(byte* label, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderScalar(byte* label, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSliderScalarN(byte* label, ImGuiDataType data_type, void* p_data, int components, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igSmallButton(byte* label); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igSpacing(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igStyleColorsClassic(ImGuiStyle* dst); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igStyleColorsDark(ImGuiStyle* dst); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igStyleColorsLight(ImGuiStyle* dst); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTabItemButton(byte* label, ImGuiTabItemFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igTableGetColumnCount(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableColumnFlags igTableGetColumnFlags(int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igTableGetColumnIndex(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* igTableGetColumnName_Int(int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int igTableGetRowIndex(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableSortSpecs* igTableGetSortSpecs(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableHeader(byte* label); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableHeadersRow(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTableNextColumn(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableNextRow(ImGuiTableRowFlags row_flags, float min_row_height); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetBgColor(ImGuiTableBgTarget target, uint color, int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetColumnEnabled(int column_n, byte v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTableSetColumnIndex(int column_n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetupColumn(byte* label, ImGuiTableColumnFlags flags, float init_width_or_weight, uint user_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTableSetupScrollFreeze(int cols, int rows); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igText(byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTextColored(Vector4 col, byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTextDisabled(byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTextUnformatted(byte* text, byte* text_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTextWrapped(byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTreeNode_Str(byte* label); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTreeNode_StrStr(byte* str_id, byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTreeNode_Ptr(void* ptr_id, byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTreeNodeEx_Str(byte* label, ImGuiTreeNodeFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTreeNodeEx_StrStr(byte* str_id, ImGuiTreeNodeFlags flags, byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igTreeNodeEx_Ptr(void* ptr_id, ImGuiTreeNodeFlags flags, byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTreePop(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTreePush_Str(byte* str_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igTreePush_Ptr(void* ptr_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igUnindent(float indent_w); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igUpdatePlatformWindows(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igValue_Bool(byte* prefix, byte b); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igValue_Int(byte* prefix, int v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igValue_Uint(byte* prefix, uint v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void igValue_Float(byte* prefix, float v, byte* float_format); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igVSliderFloat(byte* label, Vector2 size, float* v, float v_min, float v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igVSliderInt(byte* label, Vector2 size, int* v, int v_min, int v_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte igVSliderScalar(byte* label, Vector2 size, ImGuiDataType data_type, void* p_data, void* p_min, void* p_max, byte* format, ImGuiSliderFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImColor_destroy(ImColor* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImColor_HSV(ImColor* pOut, float h, float s, float v, float a); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImColor* ImColor_ImColor_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImColor* ImColor_ImColor_Int(int r, int g, int b, int a); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImColor* ImColor_ImColor_U32(uint rgba); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImColor* ImColor_ImColor_Float(float r, float g, float b, float a); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImColor* ImColor_ImColor_Vec4(Vector4 col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImColor_SetHSV(ImColor* self, float h, float s, float v, float a); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawCmd_destroy(ImDrawCmd* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern IntPtr ImDrawCmd_GetTexID(ImDrawCmd* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawCmd* ImDrawCmd_ImDrawCmd(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawData_Clear(ImDrawData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawData_DeIndexAllBuffers(ImDrawData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawData_destroy(ImDrawData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawData* ImDrawData_ImDrawData(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawData_ScaleClipRects(ImDrawData* self, Vector2 fb_scale); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int ImDrawList__CalcCircleAutoSegmentCount(ImDrawList* self, float radius); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__ClearFreeMemory(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__OnChangedClipRect(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__OnChangedTextureID(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__OnChangedVtxOffset(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__PathArcToFastEx(ImDrawList* self, Vector2 center, float radius, int a_min_sample, int a_max_sample, int a_step); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__PathArcToN(ImDrawList* self, Vector2 center, float radius, float a_min, float a_max, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__PopUnusedDrawCmd(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__ResetForNewFrame(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList__TryMergeDrawCmds(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddBezierCubic(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddBezierQuadratic(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddCallback(ImDrawList* self, IntPtr callback, void* callback_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddCircle(ImDrawList* self, Vector2 center, float radius, uint col, int num_segments, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddCircleFilled(ImDrawList* self, Vector2 center, float radius, uint col, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddConvexPolyFilled(ImDrawList* self, Vector2* points, int num_points, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddDrawCmd(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddImage(ImDrawList* self, IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddImageQuad(ImDrawList* self, IntPtr user_texture_id, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, Vector2 uv1, Vector2 uv2, Vector2 uv3, Vector2 uv4, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddImageRounded(ImDrawList* self, IntPtr user_texture_id, Vector2 p_min, Vector2 p_max, Vector2 uv_min, Vector2 uv_max, uint col, float rounding, ImDrawFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddLine(ImDrawList* self, Vector2 p1, Vector2 p2, uint col, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddNgon(ImDrawList* self, Vector2 center, float radius, uint col, int num_segments, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddNgonFilled(ImDrawList* self, Vector2 center, float radius, uint col, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddPolyline(ImDrawList* self, Vector2* points, int num_points, uint col, ImDrawFlags flags, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddQuad(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddQuadFilled(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, Vector2 p4, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddRect(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddRectFilled(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col, float rounding, ImDrawFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddRectFilledMultiColor(ImDrawList* self, Vector2 p_min, Vector2 p_max, uint col_upr_left, uint col_upr_right, uint col_bot_right, uint col_bot_left); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddText_Vec2(ImDrawList* self, Vector2 pos, uint col, byte* text_begin, byte* text_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddText_FontPtr(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", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddTriangle(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, uint col, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_AddTriangleFilled(ImDrawList* self, Vector2 p1, Vector2 p2, Vector2 p3, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_ChannelsMerge(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_ChannelsSetCurrent(ImDrawList* self, int n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_ChannelsSplit(ImDrawList* self, int count); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* ImDrawList_CloneOutput(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_destroy(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_GetClipRectMax(Vector2* pOut, ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_GetClipRectMin(Vector2* pOut, ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawList* ImDrawList_ImDrawList(IntPtr shared_data); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathArcTo(ImDrawList* self, Vector2 center, float radius, float a_min, float a_max, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathArcToFast(ImDrawList* self, Vector2 center, float radius, int a_min_of_12, int a_max_of_12); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathBezierCubicCurveTo(ImDrawList* self, Vector2 p2, Vector2 p3, Vector2 p4, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathBezierQuadraticCurveTo(ImDrawList* self, Vector2 p2, Vector2 p3, int num_segments); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathClear(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathFillConvex(ImDrawList* self, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathLineTo(ImDrawList* self, Vector2 pos); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathLineToMergeDuplicate(ImDrawList* self, Vector2 pos); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathRect(ImDrawList* self, Vector2 rect_min, Vector2 rect_max, float rounding, ImDrawFlags flags); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PathStroke(ImDrawList* self, uint col, ImDrawFlags flags, float thickness); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PopClipRect(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PopTextureID(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + 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", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PrimRect(ImDrawList* self, Vector2 a, Vector2 b, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PrimRectUV(ImDrawList* self, Vector2 a, Vector2 b, Vector2 uv_a, Vector2 uv_b, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PrimReserve(ImDrawList* self, int idx_count, int vtx_count); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PrimUnreserve(ImDrawList* self, int idx_count, int vtx_count); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PrimVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PrimWriteIdx(ImDrawList* self, ushort idx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PrimWriteVtx(ImDrawList* self, Vector2 pos, Vector2 uv, uint col); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PushClipRect(ImDrawList* self, Vector2 clip_rect_min, Vector2 clip_rect_max, byte intersect_with_current_clip_rect); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PushClipRectFullScreen(ImDrawList* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawList_PushTextureID(ImDrawList* self, IntPtr texture_id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawListSplitter_Clear(ImDrawListSplitter* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawListSplitter_ClearFreeMemory(ImDrawListSplitter* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawListSplitter_destroy(ImDrawListSplitter* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImDrawListSplitter* ImDrawListSplitter_ImDrawListSplitter(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawListSplitter_Merge(ImDrawListSplitter* self, ImDrawList* draw_list); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawListSplitter_SetCurrentChannel(ImDrawListSplitter* self, ImDrawList* draw_list, int channel_idx); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImDrawListSplitter_Split(ImDrawListSplitter* self, ImDrawList* draw_list, int count); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_AddGlyph(ImFont* self, ImFontConfig* src_cfg, ushort c, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_AddRemapChar(ImFont* self, ushort dst, ushort src, byte overwrite_dst); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_BuildLookupTable(ImFont* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_CalcTextSizeA(Vector2* pOut, ImFont* self, float size, float max_width, float wrap_width, byte* text_begin, byte* text_end, byte** remaining); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* ImFont_CalcWordWrapPositionA(ImFont* self, float scale, byte* text, byte* text_end, float wrap_width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_ClearOutputData(ImFont* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_destroy(ImFont* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFontGlyph* ImFont_FindGlyph(ImFont* self, ushort c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFontGlyph* ImFont_FindGlyphNoFallback(ImFont* self, ushort c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float ImFont_GetCharAdvance(ImFont* self, ushort c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* ImFont_GetDebugName(ImFont* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_GrowIndex(ImFont* self, int new_size); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFont* ImFont_ImFont(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImFont_IsGlyphRangeUnused(ImFont* self, uint c_begin, uint c_last); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImFont_IsLoaded(ImFont* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_RenderChar(ImFont* self, ImDrawList* draw_list, float size, Vector2 pos, uint col, ushort c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + 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", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFont_SetGlyphVisible(ImFont* self, ushort c, byte visible); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int ImFontAtlas_AddCustomRectFontGlyph(ImFontAtlas* self, ImFont* font, ushort id, int width, int height, float advance_x, Vector2 offset); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int ImFontAtlas_AddCustomRectRegular(ImFontAtlas* self, int width, int height); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFont* ImFontAtlas_AddFont(ImFontAtlas* self, ImFontConfig* font_cfg); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFont* ImFontAtlas_AddFontDefault(ImFontAtlas* self, ImFontConfig* font_cfg); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFont* ImFontAtlas_AddFontFromFileTTF(ImFontAtlas* self, byte* filename, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFont* ImFontAtlas_AddFontFromMemoryCompressedBase85TTF(ImFontAtlas* self, byte* compressed_font_data_base85, float size_pixels, ImFontConfig* font_cfg, ushort* glyph_ranges); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + 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", CallingConvention = CallingConvention.Cdecl)] + 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", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImFontAtlas_Build(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_CalcCustomRectUV(ImFontAtlas* self, ImFontAtlasCustomRect* rect, Vector2* out_uv_min, Vector2* out_uv_max); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_Clear(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_ClearFonts(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_ClearInputData(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_ClearTexData(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_destroy(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFontAtlasCustomRect* ImFontAtlas_GetCustomRectByIndex(ImFontAtlas* self, int index); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesChineseFull(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesChineseSimplifiedCommon(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesCyrillic(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesDefault(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesJapanese(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesKorean(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesThai(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ushort* ImFontAtlas_GetGlyphRangesVietnamese(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + 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", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_GetTexDataAsAlpha8(ImFontAtlas* self, IntPtr* out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self, byte** out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_GetTexDataAsRGBA32(ImFontAtlas* self, IntPtr* out_pixels, int* out_width, int* out_height, int* out_bytes_per_pixel); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFontAtlas* ImFontAtlas_ImFontAtlas(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImFontAtlas_IsBuilt(ImFontAtlas* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlas_SetTexID(ImFontAtlas* self, IntPtr id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontAtlasCustomRect_destroy(ImFontAtlasCustomRect* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFontAtlasCustomRect* ImFontAtlasCustomRect_ImFontAtlasCustomRect(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImFontAtlasCustomRect_IsPacked(ImFontAtlasCustomRect* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontConfig_destroy(ImFontConfig* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFontConfig* ImFontConfig_ImFontConfig(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontGlyphRangesBuilder_AddChar(ImFontGlyphRangesBuilder* self, ushort c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontGlyphRangesBuilder_AddRanges(ImFontGlyphRangesBuilder* self, ushort* ranges); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontGlyphRangesBuilder_AddText(ImFontGlyphRangesBuilder* self, byte* text, byte* text_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontGlyphRangesBuilder_BuildRanges(ImFontGlyphRangesBuilder* self, ImVector* out_ranges); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontGlyphRangesBuilder_Clear(ImFontGlyphRangesBuilder* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontGlyphRangesBuilder_destroy(ImFontGlyphRangesBuilder* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImFontGlyphRangesBuilder_GetBit(ImFontGlyphRangesBuilder* self, uint n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImFontGlyphRangesBuilder* ImFontGlyphRangesBuilder_ImFontGlyphRangesBuilder(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImFontGlyphRangesBuilder_SetBit(ImFontGlyphRangesBuilder* self, uint n); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiInputTextCallbackData_ClearSelection(ImGuiInputTextCallbackData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiInputTextCallbackData_DeleteChars(ImGuiInputTextCallbackData* self, int pos, int bytes_count); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiInputTextCallbackData_destroy(ImGuiInputTextCallbackData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiInputTextCallbackData_HasSelection(ImGuiInputTextCallbackData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiInputTextCallbackData* ImGuiInputTextCallbackData_ImGuiInputTextCallbackData(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiInputTextCallbackData_InsertChars(ImGuiInputTextCallbackData* self, int pos, byte* text, byte* text_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiInputTextCallbackData_SelectAll(ImGuiInputTextCallbackData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddFocusEvent(ImGuiIO* self, byte focused); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddInputCharacter(ImGuiIO* self, uint c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddInputCharactersUTF8(ImGuiIO* self, byte* str); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddInputCharacterUTF16(ImGuiIO* self, ushort c); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddKeyAnalogEvent(ImGuiIO* self, ImGuiKey key, byte down, float v); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddKeyEvent(ImGuiIO* self, ImGuiKey key, byte down); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMouseButtonEvent(ImGuiIO* self, int button, byte down); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMousePosEvent(ImGuiIO* self, float x, float y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMouseViewportEvent(ImGuiIO* self, uint id); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_AddMouseWheelEvent(ImGuiIO* self, float wh_x, float wh_y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_ClearInputCharacters(ImGuiIO* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_ClearInputKeys(ImGuiIO* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_destroy(ImGuiIO* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiIO* ImGuiIO_ImGuiIO(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiIO_SetKeyEventNativeData(ImGuiIO* self, ImGuiKey key, int native_keycode, int native_scancode, int native_legacy_index); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiListClipper_Begin(ImGuiListClipper* self, int items_count, float items_height); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiListClipper_destroy(ImGuiListClipper* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiListClipper_End(ImGuiListClipper* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiListClipper_ForceDisplayRangeByIndices(ImGuiListClipper* self, int item_min, int item_max); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiListClipper* ImGuiListClipper_ImGuiListClipper(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiListClipper_Step(ImGuiListClipper* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiOnceUponAFrame_destroy(ImGuiOnceUponAFrame* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiOnceUponAFrame* ImGuiOnceUponAFrame_ImGuiOnceUponAFrame(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPayload_Clear(ImGuiPayload* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPayload_destroy(ImGuiPayload* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPayload* ImGuiPayload_ImGuiPayload(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiPayload_IsDataType(ImGuiPayload* self, byte* type); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiPayload_IsDelivery(ImGuiPayload* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiPayload_IsPreview(ImGuiPayload* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPlatformImeData_destroy(ImGuiPlatformImeData* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformImeData* ImGuiPlatformImeData_ImGuiPlatformImeData(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPlatformIO_destroy(ImGuiPlatformIO* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformIO* ImGuiPlatformIO_ImGuiPlatformIO(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiPlatformMonitor_destroy(ImGuiPlatformMonitor* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiPlatformMonitor* ImGuiPlatformMonitor_ImGuiPlatformMonitor(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStorage_BuildSortByKey(ImGuiStorage* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStorage_Clear(ImGuiStorage* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiStorage_GetBool(ImGuiStorage* self, uint key, byte default_val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* ImGuiStorage_GetBoolRef(ImGuiStorage* self, uint key, byte default_val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float ImGuiStorage_GetFloat(ImGuiStorage* self, uint key, float default_val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern float* ImGuiStorage_GetFloatRef(ImGuiStorage* self, uint key, float default_val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int ImGuiStorage_GetInt(ImGuiStorage* self, uint key, int default_val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int* ImGuiStorage_GetIntRef(ImGuiStorage* self, uint key, int default_val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void* ImGuiStorage_GetVoidPtr(ImGuiStorage* self, uint key); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void** ImGuiStorage_GetVoidPtrRef(ImGuiStorage* self, uint key, void* default_val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStorage_SetAllInt(ImGuiStorage* self, int val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStorage_SetBool(ImGuiStorage* self, uint key, byte val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStorage_SetFloat(ImGuiStorage* self, uint key, float val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStorage_SetInt(ImGuiStorage* self, uint key, int val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStorage_SetVoidPtr(ImGuiStorage* self, uint key, void* val); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStoragePair_destroy(ImGuiStoragePair* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Int(uint _key, int _val_i); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Float(uint _key, float _val_f); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiStoragePair* ImGuiStoragePair_ImGuiStoragePair_Ptr(uint _key, void* _val_p); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStyle_destroy(ImGuiStyle* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiStyle* ImGuiStyle_ImGuiStyle(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiStyle_ScaleAllSizes(ImGuiStyle* self, float scale_factor); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTableColumnSortSpecs_destroy(ImGuiTableColumnSortSpecs* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableColumnSortSpecs* ImGuiTableColumnSortSpecs_ImGuiTableColumnSortSpecs(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTableSortSpecs_destroy(ImGuiTableSortSpecs* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTableSortSpecs* ImGuiTableSortSpecs_ImGuiTableSortSpecs(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextBuffer_append(ImGuiTextBuffer* self, byte* str, byte* str_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextBuffer_appendf(ImGuiTextBuffer* self, byte* fmt); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* ImGuiTextBuffer_begin(ImGuiTextBuffer* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* ImGuiTextBuffer_c_str(ImGuiTextBuffer* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextBuffer_clear(ImGuiTextBuffer* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextBuffer_destroy(ImGuiTextBuffer* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiTextBuffer_empty(ImGuiTextBuffer* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte* ImGuiTextBuffer_end(ImGuiTextBuffer* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTextBuffer* ImGuiTextBuffer_ImGuiTextBuffer(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextBuffer_reserve(ImGuiTextBuffer* self, int capacity); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern int ImGuiTextBuffer_size(ImGuiTextBuffer* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextFilter_Build(ImGuiTextFilter* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextFilter_Clear(ImGuiTextFilter* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextFilter_destroy(ImGuiTextFilter* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiTextFilter_Draw(ImGuiTextFilter* self, byte* label, float width); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTextFilter* ImGuiTextFilter_ImGuiTextFilter(byte* default_filter); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiTextFilter_IsActive(ImGuiTextFilter* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiTextFilter_PassFilter(ImGuiTextFilter* self, byte* text, byte* text_end); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextRange_destroy(ImGuiTextRange* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern byte ImGuiTextRange_empty(ImGuiTextRange* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiTextRange* ImGuiTextRange_ImGuiTextRange_Str(byte* _b, byte* _e); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiTextRange_split(ImGuiTextRange* self, byte separator, ImVector* @out); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiViewport_destroy(ImGuiViewport* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiViewport_GetCenter(Vector2* pOut, ImGuiViewport* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiViewport_GetWorkCenter(Vector2* pOut, ImGuiViewport* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiViewport* ImGuiViewport_ImGuiViewport(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImGuiWindowClass_destroy(ImGuiWindowClass* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern ImGuiWindowClass* ImGuiWindowClass_ImGuiWindowClass(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImVec2_destroy(Vector2* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern Vector2* ImVec2_ImVec2_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern Vector2* ImVec2_ImVec2_Float(float _x, float _y); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern void ImVec4_destroy(Vector4* self); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern Vector4* ImVec4_ImVec4_Nil(); + [DllImport("cimgui", CallingConvention = CallingConvention.Cdecl)] + public static extern Vector4* ImVec4_ImVec4_Float(float _x, float _y, float _z, float _w); + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiNavInput.gen.cs b/lib/ImGui.NET/Generated/ImGuiNavInput.gen.cs new file mode 100644 index 0000000..b52fc61 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiNavInput.gen.cs @@ -0,0 +1,27 @@ +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, + KeyLeft = 16, + KeyRight = 17, + KeyUp = 18, + KeyDown = 19, + COUNT = 20, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs b/lib/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs new file mode 100644 index 0000000..d6d7db8 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiOnceUponAFrame.gen.cs @@ -0,0 +1,26 @@ +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); + public void Destroy() + { + ImGuiNative.ImGuiOnceUponAFrame_destroy((ImGuiOnceUponAFrame*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiPayload.gen.cs b/lib/ImGui.NET/Generated/ImGuiPayload.gen.cs new file mode 100644 index 0000000..117e7e6 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiPayload.gen.cs @@ -0,0 +1,81 @@ +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 bool Preview => ref Unsafe.AsRef(&NativePtr->Preview); + public ref bool Delivery => ref Unsafe.AsRef(&NativePtr->Delivery); + public void Clear() + { + ImGuiNative.ImGuiPayload_Clear((ImGuiPayload*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImGuiPayload_destroy((ImGuiPayload*)(NativePtr)); + } + public bool IsDataType(string type) + { + byte* native_type; + int type_byteCount = 0; + if (type != null) + { + type_byteCount = Encoding.UTF8.GetByteCount(type); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + native_type = Util.Allocate(type_byteCount + 1); + } + else + { + byte* native_type_stackBytes = stackalloc byte[type_byteCount + 1]; + native_type = native_type_stackBytes; + } + int native_type_offset = Util.GetUtf8(type, native_type, type_byteCount); + native_type[native_type_offset] = 0; + } + else { native_type = null; } + byte ret = ImGuiNative.ImGuiPayload_IsDataType((ImGuiPayload*)(NativePtr), native_type); + if (type_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_type); + } + return ret != 0; + } + public bool IsDelivery() + { + byte ret = ImGuiNative.ImGuiPayload_IsDelivery((ImGuiPayload*)(NativePtr)); + return ret != 0; + } + public bool IsPreview() + { + byte ret = ImGuiNative.ImGuiPayload_IsPreview((ImGuiPayload*)(NativePtr)); + return ret != 0; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiPlatformIO.gen.cs b/lib/ImGui.NET/Generated/ImGuiPlatformIO.gen.cs new file mode 100644 index 0000000..602e369 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiPlatformIO.gen.cs @@ -0,0 +1,74 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiPlatformIO + { + public IntPtr Platform_CreateWindow; + public IntPtr Platform_DestroyWindow; + public IntPtr Platform_ShowWindow; + public IntPtr Platform_SetWindowPos; + public IntPtr Platform_GetWindowPos; + public IntPtr Platform_SetWindowSize; + public IntPtr Platform_GetWindowSize; + public IntPtr Platform_SetWindowFocus; + public IntPtr Platform_GetWindowFocus; + public IntPtr Platform_GetWindowMinimized; + public IntPtr Platform_SetWindowTitle; + public IntPtr Platform_SetWindowAlpha; + public IntPtr Platform_UpdateWindow; + public IntPtr Platform_RenderWindow; + public IntPtr Platform_SwapBuffers; + public IntPtr Platform_GetWindowDpiScale; + public IntPtr Platform_OnChangedViewport; + public IntPtr Platform_CreateVkSurface; + public IntPtr Renderer_CreateWindow; + public IntPtr Renderer_DestroyWindow; + public IntPtr Renderer_SetWindowSize; + public IntPtr Renderer_RenderWindow; + public IntPtr Renderer_SwapBuffers; + public ImVector Monitors; + public ImVector Viewports; + } + public unsafe partial struct ImGuiPlatformIOPtr + { + public ImGuiPlatformIO* NativePtr { get; } + public ImGuiPlatformIOPtr(ImGuiPlatformIO* nativePtr) => NativePtr = nativePtr; + public ImGuiPlatformIOPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformIO*)nativePtr; + public static implicit operator ImGuiPlatformIOPtr(ImGuiPlatformIO* nativePtr) => new ImGuiPlatformIOPtr(nativePtr); + public static implicit operator ImGuiPlatformIO* (ImGuiPlatformIOPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiPlatformIOPtr(IntPtr nativePtr) => new ImGuiPlatformIOPtr(nativePtr); + public ref IntPtr Platform_CreateWindow => ref Unsafe.AsRef(&NativePtr->Platform_CreateWindow); + public ref IntPtr Platform_DestroyWindow => ref Unsafe.AsRef(&NativePtr->Platform_DestroyWindow); + public ref IntPtr Platform_ShowWindow => ref Unsafe.AsRef(&NativePtr->Platform_ShowWindow); + public ref IntPtr Platform_SetWindowPos => ref Unsafe.AsRef(&NativePtr->Platform_SetWindowPos); + public ref IntPtr Platform_GetWindowPos => ref Unsafe.AsRef(&NativePtr->Platform_GetWindowPos); + public ref IntPtr Platform_SetWindowSize => ref Unsafe.AsRef(&NativePtr->Platform_SetWindowSize); + public ref IntPtr Platform_GetWindowSize => ref Unsafe.AsRef(&NativePtr->Platform_GetWindowSize); + public ref IntPtr Platform_SetWindowFocus => ref Unsafe.AsRef(&NativePtr->Platform_SetWindowFocus); + public ref IntPtr Platform_GetWindowFocus => ref Unsafe.AsRef(&NativePtr->Platform_GetWindowFocus); + public ref IntPtr Platform_GetWindowMinimized => ref Unsafe.AsRef(&NativePtr->Platform_GetWindowMinimized); + public ref IntPtr Platform_SetWindowTitle => ref Unsafe.AsRef(&NativePtr->Platform_SetWindowTitle); + public ref IntPtr Platform_SetWindowAlpha => ref Unsafe.AsRef(&NativePtr->Platform_SetWindowAlpha); + public ref IntPtr Platform_UpdateWindow => ref Unsafe.AsRef(&NativePtr->Platform_UpdateWindow); + public ref IntPtr Platform_RenderWindow => ref Unsafe.AsRef(&NativePtr->Platform_RenderWindow); + public ref IntPtr Platform_SwapBuffers => ref Unsafe.AsRef(&NativePtr->Platform_SwapBuffers); + public ref IntPtr Platform_GetWindowDpiScale => ref Unsafe.AsRef(&NativePtr->Platform_GetWindowDpiScale); + public ref IntPtr Platform_OnChangedViewport => ref Unsafe.AsRef(&NativePtr->Platform_OnChangedViewport); + public ref IntPtr Platform_CreateVkSurface => ref Unsafe.AsRef(&NativePtr->Platform_CreateVkSurface); + public ref IntPtr Renderer_CreateWindow => ref Unsafe.AsRef(&NativePtr->Renderer_CreateWindow); + public ref IntPtr Renderer_DestroyWindow => ref Unsafe.AsRef(&NativePtr->Renderer_DestroyWindow); + public ref IntPtr Renderer_SetWindowSize => ref Unsafe.AsRef(&NativePtr->Renderer_SetWindowSize); + public ref IntPtr Renderer_RenderWindow => ref Unsafe.AsRef(&NativePtr->Renderer_RenderWindow); + public ref IntPtr Renderer_SwapBuffers => ref Unsafe.AsRef(&NativePtr->Renderer_SwapBuffers); + public ImPtrVector Monitors => new ImPtrVector(NativePtr->Monitors, Unsafe.SizeOf()); + public ImVector Viewports => new ImVector(NativePtr->Viewports); + public void Destroy() + { + ImGuiNative.ImGuiPlatformIO_destroy((ImGuiPlatformIO*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiPlatformImeData.gen.cs b/lib/ImGui.NET/Generated/ImGuiPlatformImeData.gen.cs new file mode 100644 index 0000000..fa0cdcc --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiPlatformImeData.gen.cs @@ -0,0 +1,30 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiPlatformImeData + { + public byte WantVisible; + public Vector2 InputPos; + public float InputLineHeight; + } + public unsafe partial struct ImGuiPlatformImeDataPtr + { + public ImGuiPlatformImeData* NativePtr { get; } + public ImGuiPlatformImeDataPtr(ImGuiPlatformImeData* nativePtr) => NativePtr = nativePtr; + public ImGuiPlatformImeDataPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformImeData*)nativePtr; + public static implicit operator ImGuiPlatformImeDataPtr(ImGuiPlatformImeData* nativePtr) => new ImGuiPlatformImeDataPtr(nativePtr); + public static implicit operator ImGuiPlatformImeData* (ImGuiPlatformImeDataPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiPlatformImeDataPtr(IntPtr nativePtr) => new ImGuiPlatformImeDataPtr(nativePtr); + public ref bool WantVisible => ref Unsafe.AsRef(&NativePtr->WantVisible); + public ref Vector2 InputPos => ref Unsafe.AsRef(&NativePtr->InputPos); + public ref float InputLineHeight => ref Unsafe.AsRef(&NativePtr->InputLineHeight); + public void Destroy() + { + ImGuiNative.ImGuiPlatformImeData_destroy((ImGuiPlatformImeData*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiPlatformMonitor.gen.cs b/lib/ImGui.NET/Generated/ImGuiPlatformMonitor.gen.cs new file mode 100644 index 0000000..8536d8a --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiPlatformMonitor.gen.cs @@ -0,0 +1,34 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiPlatformMonitor + { + public Vector2 MainPos; + public Vector2 MainSize; + public Vector2 WorkPos; + public Vector2 WorkSize; + public float DpiScale; + } + public unsafe partial struct ImGuiPlatformMonitorPtr + { + public ImGuiPlatformMonitor* NativePtr { get; } + public ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* nativePtr) => NativePtr = nativePtr; + public ImGuiPlatformMonitorPtr(IntPtr nativePtr) => NativePtr = (ImGuiPlatformMonitor*)nativePtr; + public static implicit operator ImGuiPlatformMonitorPtr(ImGuiPlatformMonitor* nativePtr) => new ImGuiPlatformMonitorPtr(nativePtr); + public static implicit operator ImGuiPlatformMonitor* (ImGuiPlatformMonitorPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiPlatformMonitorPtr(IntPtr nativePtr) => new ImGuiPlatformMonitorPtr(nativePtr); + public ref Vector2 MainPos => ref Unsafe.AsRef(&NativePtr->MainPos); + public ref Vector2 MainSize => ref Unsafe.AsRef(&NativePtr->MainSize); + public ref Vector2 WorkPos => ref Unsafe.AsRef(&NativePtr->WorkPos); + public ref Vector2 WorkSize => ref Unsafe.AsRef(&NativePtr->WorkSize); + public ref float DpiScale => ref Unsafe.AsRef(&NativePtr->DpiScale); + public void Destroy() + { + ImGuiNative.ImGuiPlatformMonitor_destroy((ImGuiPlatformMonitor*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiPopupFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiPopupFlags.gen.cs new file mode 100644 index 0000000..5fbe608 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiPopupFlags.gen.cs @@ -0,0 +1,18 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiPopupFlags + { + None = 0, + MouseButtonLeft = 0, + MouseButtonRight = 1, + MouseButtonMiddle = 2, + MouseButtonMask = 31, + MouseButtonDefault = 1, + NoOpenOverExistingPopup = 32, + NoOpenOverItems = 64, + AnyPopupId = 128, + AnyPopupLevel = 256, + AnyPopup = 384, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiSelectableFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiSelectableFlags.gen.cs new file mode 100644 index 0000000..c0391bf --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiSelectableFlags.gen.cs @@ -0,0 +1,13 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiSelectableFlags + { + None = 0, + DontClosePopups = 1, + SpanAllColumns = 2, + AllowDoubleClick = 4, + Disabled = 8, + AllowItemOverlap = 16, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiSizeCallbackData.gen.cs b/lib/ImGui.NET/Generated/ImGuiSizeCallbackData.gen.cs new file mode 100644 index 0000000..83c3196 --- /dev/null +++ b/lib/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/lib/ImGui.NET/Generated/ImGuiSliderFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiSliderFlags.gen.cs new file mode 100644 index 0000000..f87859c --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiSliderFlags.gen.cs @@ -0,0 +1,13 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiSliderFlags + { + None = 0, + AlwaysClamp = 16, + Logarithmic = 32, + NoRoundToFormat = 64, + NoInput = 128, + InvalidMask = 1879048207, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiSortDirection.gen.cs b/lib/ImGui.NET/Generated/ImGuiSortDirection.gen.cs new file mode 100644 index 0000000..7b4fae9 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiSortDirection.gen.cs @@ -0,0 +1,9 @@ +namespace ImGuiNET +{ + public enum ImGuiSortDirection + { + None = 0, + Ascending = 1, + Descending = 2, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiStorage.gen.cs b/lib/ImGui.NET/Generated/ImGuiStorage.gen.cs new file mode 100644 index 0000000..7838589 --- /dev/null +++ b/lib/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 ImPtrVector Data => new ImPtrVector(NativePtr->Data, Unsafe.SizeOf()); + public void BuildSortByKey() + { + ImGuiNative.ImGuiStorage_BuildSortByKey((ImGuiStorage*)(NativePtr)); + } + public void Clear() + { + ImGuiNative.ImGuiStorage_Clear((ImGuiStorage*)(NativePtr)); + } + public bool GetBool(uint key) + { + byte default_val = 0; + byte ret = ImGuiNative.ImGuiStorage_GetBool((ImGuiStorage*)(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((ImGuiStorage*)(NativePtr), key, native_default_val); + return ret != 0; + } + public byte* GetBoolRef(uint key) + { + byte default_val = 0; + byte* ret = ImGuiNative.ImGuiStorage_GetBoolRef((ImGuiStorage*)(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((ImGuiStorage*)(NativePtr), key, native_default_val); + return ret; + } + public float GetFloat(uint key) + { + float default_val = 0.0f; + float ret = ImGuiNative.ImGuiStorage_GetFloat((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public float GetFloat(uint key, float default_val) + { + float ret = ImGuiNative.ImGuiStorage_GetFloat((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public float* GetFloatRef(uint key) + { + float default_val = 0.0f; + float* ret = ImGuiNative.ImGuiStorage_GetFloatRef((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public float* GetFloatRef(uint key, float default_val) + { + float* ret = ImGuiNative.ImGuiStorage_GetFloatRef((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public int GetInt(uint key) + { + int default_val = 0; + int ret = ImGuiNative.ImGuiStorage_GetInt((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public int GetInt(uint key, int default_val) + { + int ret = ImGuiNative.ImGuiStorage_GetInt((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public int* GetIntRef(uint key) + { + int default_val = 0; + int* ret = ImGuiNative.ImGuiStorage_GetIntRef((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public int* GetIntRef(uint key, int default_val) + { + int* ret = ImGuiNative.ImGuiStorage_GetIntRef((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public IntPtr GetVoidPtr(uint key) + { + void* ret = ImGuiNative.ImGuiStorage_GetVoidPtr((ImGuiStorage*)(NativePtr), key); + return (IntPtr)ret; + } + public void** GetVoidPtrRef(uint key) + { + void* default_val = null; + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef((ImGuiStorage*)(NativePtr), key, default_val); + return ret; + } + public void** GetVoidPtrRef(uint key, IntPtr default_val) + { + void* native_default_val = (void*)default_val.ToPointer(); + void** ret = ImGuiNative.ImGuiStorage_GetVoidPtrRef((ImGuiStorage*)(NativePtr), key, native_default_val); + return ret; + } + public void SetAllInt(int val) + { + ImGuiNative.ImGuiStorage_SetAllInt((ImGuiStorage*)(NativePtr), val); + } + public void SetBool(uint key, bool val) + { + byte native_val = val ? (byte)1 : (byte)0; + ImGuiNative.ImGuiStorage_SetBool((ImGuiStorage*)(NativePtr), key, native_val); + } + public void SetFloat(uint key, float val) + { + ImGuiNative.ImGuiStorage_SetFloat((ImGuiStorage*)(NativePtr), key, val); + } + public void SetInt(uint key, int val) + { + ImGuiNative.ImGuiStorage_SetInt((ImGuiStorage*)(NativePtr), key, val); + } + public void SetVoidPtr(uint key, IntPtr val) + { + void* native_val = (void*)val.ToPointer(); + ImGuiNative.ImGuiStorage_SetVoidPtr((ImGuiStorage*)(NativePtr), key, native_val); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiStyle.gen.cs b/lib/ImGui.NET/Generated/ImGuiStyle.gen.cs new file mode 100644 index 0000000..3c92420 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiStyle.gen.cs @@ -0,0 +1,164 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiStyle + { + public float Alpha; + public float DisabledAlpha; + public Vector2 WindowPadding; + public float WindowRounding; + public float WindowBorderSize; + public Vector2 WindowMinSize; + public Vector2 WindowTitleAlign; + public ImGuiDir WindowMenuButtonPosition; + 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 CellPadding; + public Vector2 TouchExtraPadding; + public float IndentSpacing; + public float ColumnsMinSpacing; + public float ScrollbarSize; + public float ScrollbarRounding; + public float GrabMinSize; + public float GrabRounding; + public float LogSliderDeadzone; + public float TabRounding; + public float TabBorderSize; + public float TabMinWidthForCloseButton; + public ImGuiDir ColorButtonPosition; + public Vector2 ButtonTextAlign; + public Vector2 SelectableTextAlign; + public Vector2 DisplayWindowPadding; + public Vector2 DisplaySafeAreaPadding; + public float MouseCursorScale; + public byte AntiAliasedLines; + public byte AntiAliasedLinesUseTex; + public byte AntiAliasedFill; + public float CurveTessellationTol; + public float CircleTessellationMaxError; + 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 Vector4 Colors_43; + public Vector4 Colors_44; + public Vector4 Colors_45; + public Vector4 Colors_46; + public Vector4 Colors_47; + public Vector4 Colors_48; + public Vector4 Colors_49; + public Vector4 Colors_50; + public Vector4 Colors_51; + public Vector4 Colors_52; + public Vector4 Colors_53; + public Vector4 Colors_54; + } + 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 float DisabledAlpha => ref Unsafe.AsRef(&NativePtr->DisabledAlpha); + 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 ImGuiDir WindowMenuButtonPosition => ref Unsafe.AsRef(&NativePtr->WindowMenuButtonPosition); + 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 CellPadding => ref Unsafe.AsRef(&NativePtr->CellPadding); + 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 float LogSliderDeadzone => ref Unsafe.AsRef(&NativePtr->LogSliderDeadzone); + public ref float TabRounding => ref Unsafe.AsRef(&NativePtr->TabRounding); + public ref float TabBorderSize => ref Unsafe.AsRef(&NativePtr->TabBorderSize); + public ref float TabMinWidthForCloseButton => ref Unsafe.AsRef(&NativePtr->TabMinWidthForCloseButton); + public ref ImGuiDir ColorButtonPosition => ref Unsafe.AsRef(&NativePtr->ColorButtonPosition); + public ref Vector2 ButtonTextAlign => ref Unsafe.AsRef(&NativePtr->ButtonTextAlign); + public ref Vector2 SelectableTextAlign => ref Unsafe.AsRef(&NativePtr->SelectableTextAlign); + 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 bool AntiAliasedLines => ref Unsafe.AsRef(&NativePtr->AntiAliasedLines); + public ref bool AntiAliasedLinesUseTex => ref Unsafe.AsRef(&NativePtr->AntiAliasedLinesUseTex); + public ref bool AntiAliasedFill => ref Unsafe.AsRef(&NativePtr->AntiAliasedFill); + public ref float CurveTessellationTol => ref Unsafe.AsRef(&NativePtr->CurveTessellationTol); + public ref float CircleTessellationMaxError => ref Unsafe.AsRef(&NativePtr->CircleTessellationMaxError); + public RangeAccessor Colors => new RangeAccessor(&NativePtr->Colors_0, 55); + public void Destroy() + { + ImGuiNative.ImGuiStyle_destroy((ImGuiStyle*)(NativePtr)); + } + public void ScaleAllSizes(float scale_factor) + { + ImGuiNative.ImGuiStyle_ScaleAllSizes((ImGuiStyle*)(NativePtr), scale_factor); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiStyleVar.gen.cs b/lib/ImGui.NET/Generated/ImGuiStyleVar.gen.cs new file mode 100644 index 0000000..ffa53e5 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiStyleVar.gen.cs @@ -0,0 +1,32 @@ +namespace ImGuiNET +{ + public enum ImGuiStyleVar + { + Alpha = 0, + DisabledAlpha = 1, + WindowPadding = 2, + WindowRounding = 3, + WindowBorderSize = 4, + WindowMinSize = 5, + WindowTitleAlign = 6, + ChildRounding = 7, + ChildBorderSize = 8, + PopupRounding = 9, + PopupBorderSize = 10, + FramePadding = 11, + FrameRounding = 12, + FrameBorderSize = 13, + ItemSpacing = 14, + ItemInnerSpacing = 15, + IndentSpacing = 16, + CellPadding = 17, + ScrollbarSize = 18, + ScrollbarRounding = 19, + GrabMinSize = 20, + GrabRounding = 21, + TabRounding = 22, + ButtonTextAlign = 23, + SelectableTextAlign = 24, + COUNT = 25, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTabBarFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiTabBarFlags.gen.cs new file mode 100644 index 0000000..c5b82bf --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTabBarFlags.gen.cs @@ -0,0 +1,18 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTabBarFlags + { + None = 0, + Reorderable = 1, + AutoSelectNewTabs = 2, + TabListPopupButton = 4, + NoCloseWithMiddleMouseButton = 8, + NoTabListScrollingButtons = 16, + NoTooltip = 32, + FittingPolicyResizeDown = 64, + FittingPolicyScroll = 128, + FittingPolicyMask = 192, + FittingPolicyDefault = 64, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTabItemFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiTabItemFlags.gen.cs new file mode 100644 index 0000000..18e2c01 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTabItemFlags.gen.cs @@ -0,0 +1,16 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTabItemFlags + { + None = 0, + UnsavedDocument = 1, + SetSelected = 2, + NoCloseWithMiddleMouseButton = 4, + NoPushId = 8, + NoTooltip = 16, + NoReorder = 32, + Leading = 64, + Trailing = 128, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTableBgTarget.gen.cs b/lib/ImGui.NET/Generated/ImGuiTableBgTarget.gen.cs new file mode 100644 index 0000000..83a1102 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTableBgTarget.gen.cs @@ -0,0 +1,10 @@ +namespace ImGuiNET +{ + public enum ImGuiTableBgTarget + { + None = 0, + RowBg0 = 1, + RowBg1 = 2, + CellBg = 3, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTableColumnFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiTableColumnFlags.gen.cs new file mode 100644 index 0000000..e377cdc --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTableColumnFlags.gen.cs @@ -0,0 +1,34 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTableColumnFlags + { + None = 0, + Disabled = 1, + DefaultHide = 2, + DefaultSort = 4, + WidthStretch = 8, + WidthFixed = 16, + NoResize = 32, + NoReorder = 64, + NoHide = 128, + NoClip = 256, + NoSort = 512, + NoSortAscending = 1024, + NoSortDescending = 2048, + NoHeaderLabel = 4096, + NoHeaderWidth = 8192, + PreferSortAscending = 16384, + PreferSortDescending = 32768, + IndentEnable = 65536, + IndentDisable = 131072, + IsEnabled = 16777216, + IsVisible = 33554432, + IsSorted = 67108864, + IsHovered = 134217728, + WidthMask = 24, + IndentMask = 196608, + StatusMask = 251658240, + NoDirectResize = 1073741824, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTableColumnSortSpecs.gen.cs b/lib/ImGui.NET/Generated/ImGuiTableColumnSortSpecs.gen.cs new file mode 100644 index 0000000..ef1d61b --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTableColumnSortSpecs.gen.cs @@ -0,0 +1,32 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiTableColumnSortSpecs + { + public uint ColumnUserID; + public short ColumnIndex; + public short SortOrder; + public ImGuiSortDirection SortDirection; + } + public unsafe partial struct ImGuiTableColumnSortSpecsPtr + { + public ImGuiTableColumnSortSpecs* NativePtr { get; } + public ImGuiTableColumnSortSpecsPtr(ImGuiTableColumnSortSpecs* nativePtr) => NativePtr = nativePtr; + public ImGuiTableColumnSortSpecsPtr(IntPtr nativePtr) => NativePtr = (ImGuiTableColumnSortSpecs*)nativePtr; + public static implicit operator ImGuiTableColumnSortSpecsPtr(ImGuiTableColumnSortSpecs* nativePtr) => new ImGuiTableColumnSortSpecsPtr(nativePtr); + public static implicit operator ImGuiTableColumnSortSpecs* (ImGuiTableColumnSortSpecsPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiTableColumnSortSpecsPtr(IntPtr nativePtr) => new ImGuiTableColumnSortSpecsPtr(nativePtr); + public ref uint ColumnUserID => ref Unsafe.AsRef(&NativePtr->ColumnUserID); + public ref short ColumnIndex => ref Unsafe.AsRef(&NativePtr->ColumnIndex); + public ref short SortOrder => ref Unsafe.AsRef(&NativePtr->SortOrder); + public ref ImGuiSortDirection SortDirection => ref Unsafe.AsRef(&NativePtr->SortDirection); + public void Destroy() + { + ImGuiNative.ImGuiTableColumnSortSpecs_destroy((ImGuiTableColumnSortSpecs*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTableFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiTableFlags.gen.cs new file mode 100644 index 0000000..c7f0a5f --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTableFlags.gen.cs @@ -0,0 +1,43 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTableFlags + { + None = 0, + Resizable = 1, + Reorderable = 2, + Hideable = 4, + Sortable = 8, + NoSavedSettings = 16, + ContextMenuInBody = 32, + RowBg = 64, + BordersInnerH = 128, + BordersOuterH = 256, + BordersInnerV = 512, + BordersOuterV = 1024, + BordersH = 384, + BordersV = 1536, + BordersInner = 640, + BordersOuter = 1280, + Borders = 1920, + NoBordersInBody = 2048, + NoBordersInBodyUntilResize = 4096, + SizingFixedFit = 8192, + SizingFixedSame = 16384, + SizingStretchProp = 24576, + SizingStretchSame = 32768, + NoHostExtendX = 65536, + NoHostExtendY = 131072, + NoKeepColumnsVisible = 262144, + PreciseWidths = 524288, + NoClip = 1048576, + PadOuterX = 2097152, + NoPadOuterX = 4194304, + NoPadInnerX = 8388608, + ScrollX = 16777216, + ScrollY = 33554432, + SortMulti = 67108864, + SortTristate = 134217728, + SizingMask = 57344, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTableRowFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiTableRowFlags.gen.cs new file mode 100644 index 0000000..e90a011 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTableRowFlags.gen.cs @@ -0,0 +1,9 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTableRowFlags + { + None = 0, + Headers = 1, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTableSortSpecs.gen.cs b/lib/ImGui.NET/Generated/ImGuiTableSortSpecs.gen.cs new file mode 100644 index 0000000..626eeef --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTableSortSpecs.gen.cs @@ -0,0 +1,30 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiTableSortSpecs + { + public ImGuiTableColumnSortSpecs* Specs; + public int SpecsCount; + public byte SpecsDirty; + } + public unsafe partial struct ImGuiTableSortSpecsPtr + { + public ImGuiTableSortSpecs* NativePtr { get; } + public ImGuiTableSortSpecsPtr(ImGuiTableSortSpecs* nativePtr) => NativePtr = nativePtr; + public ImGuiTableSortSpecsPtr(IntPtr nativePtr) => NativePtr = (ImGuiTableSortSpecs*)nativePtr; + public static implicit operator ImGuiTableSortSpecsPtr(ImGuiTableSortSpecs* nativePtr) => new ImGuiTableSortSpecsPtr(nativePtr); + public static implicit operator ImGuiTableSortSpecs* (ImGuiTableSortSpecsPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiTableSortSpecsPtr(IntPtr nativePtr) => new ImGuiTableSortSpecsPtr(nativePtr); + public ImGuiTableColumnSortSpecsPtr Specs => new ImGuiTableColumnSortSpecsPtr(NativePtr->Specs); + public ref int SpecsCount => ref Unsafe.AsRef(&NativePtr->SpecsCount); + public ref bool SpecsDirty => ref Unsafe.AsRef(&NativePtr->SpecsDirty); + public void Destroy() + { + ImGuiNative.ImGuiTableSortSpecs_destroy((ImGuiTableSortSpecs*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs b/lib/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs new file mode 100644 index 0000000..bac78b6 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTextBuffer.gen.cs @@ -0,0 +1,112 @@ +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 append(string str) + { + byte* native_str; + int str_byteCount = 0; + if (str != null) + { + str_byteCount = Encoding.UTF8.GetByteCount(str); + if (str_byteCount > Util.StackAllocationSizeLimit) + { + native_str = Util.Allocate(str_byteCount + 1); + } + else + { + byte* native_str_stackBytes = stackalloc byte[str_byteCount + 1]; + native_str = native_str_stackBytes; + } + int native_str_offset = Util.GetUtf8(str, native_str, str_byteCount); + native_str[native_str_offset] = 0; + } + else { native_str = null; } + byte* native_str_end = null; + ImGuiNative.ImGuiTextBuffer_append((ImGuiTextBuffer*)(NativePtr), native_str, native_str_end); + if (str_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_str); + } + } + public void appendf(string fmt) + { + byte* native_fmt; + int fmt_byteCount = 0; + if (fmt != null) + { + fmt_byteCount = Encoding.UTF8.GetByteCount(fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + native_fmt = Util.Allocate(fmt_byteCount + 1); + } + else + { + byte* native_fmt_stackBytes = stackalloc byte[fmt_byteCount + 1]; + native_fmt = native_fmt_stackBytes; + } + int native_fmt_offset = Util.GetUtf8(fmt, native_fmt, fmt_byteCount); + native_fmt[native_fmt_offset] = 0; + } + else { native_fmt = null; } + ImGuiNative.ImGuiTextBuffer_appendf((ImGuiTextBuffer*)(NativePtr), native_fmt); + if (fmt_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_fmt); + } + } + public string begin() + { + byte* ret = ImGuiNative.ImGuiTextBuffer_begin((ImGuiTextBuffer*)(NativePtr)); + return Util.StringFromPtr(ret); + } + public string c_str() + { + byte* ret = ImGuiNative.ImGuiTextBuffer_c_str((ImGuiTextBuffer*)(NativePtr)); + return Util.StringFromPtr(ret); + } + public void clear() + { + ImGuiNative.ImGuiTextBuffer_clear((ImGuiTextBuffer*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImGuiTextBuffer_destroy((ImGuiTextBuffer*)(NativePtr)); + } + public bool empty() + { + byte ret = ImGuiNative.ImGuiTextBuffer_empty((ImGuiTextBuffer*)(NativePtr)); + return ret != 0; + } + public string end() + { + byte* ret = ImGuiNative.ImGuiTextBuffer_end((ImGuiTextBuffer*)(NativePtr)); + return Util.StringFromPtr(ret); + } + public void reserve(int capacity) + { + ImGuiNative.ImGuiTextBuffer_reserve((ImGuiTextBuffer*)(NativePtr), capacity); + } + public int size() + { + int ret = ImGuiNative.ImGuiTextBuffer_size((ImGuiTextBuffer*)(NativePtr)); + return ret; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTextFilter.gen.cs b/lib/ImGui.NET/Generated/ImGuiTextFilter.gen.cs new file mode 100644 index 0000000..76e8b18 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTextFilter.gen.cs @@ -0,0 +1,150 @@ +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 ImPtrVector Filters => new ImPtrVector(NativePtr->Filters, Unsafe.SizeOf()); + public ref int CountGrep => ref Unsafe.AsRef(&NativePtr->CountGrep); + public void Build() + { + ImGuiNative.ImGuiTextFilter_Build((ImGuiTextFilter*)(NativePtr)); + } + public void Clear() + { + ImGuiNative.ImGuiTextFilter_Clear((ImGuiTextFilter*)(NativePtr)); + } + public void Destroy() + { + ImGuiNative.ImGuiTextFilter_destroy((ImGuiTextFilter*)(NativePtr)); + } + public bool Draw() + { + byte* native_label; + int label_byteCount = 0; + label_byteCount = Encoding.UTF8.GetByteCount("Filter(inc,-exc)"); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8("Filter(inc,-exc)", native_label, label_byteCount); + native_label[native_label_offset] = 0; + float width = 0.0f; + byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public bool Draw(string label) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + float width = 0.0f; + byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public bool Draw(string label, float width) + { + byte* native_label; + int label_byteCount = 0; + if (label != null) + { + label_byteCount = Encoding.UTF8.GetByteCount(label); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + native_label = Util.Allocate(label_byteCount + 1); + } + else + { + byte* native_label_stackBytes = stackalloc byte[label_byteCount + 1]; + native_label = native_label_stackBytes; + } + int native_label_offset = Util.GetUtf8(label, native_label, label_byteCount); + native_label[native_label_offset] = 0; + } + else { native_label = null; } + byte ret = ImGuiNative.ImGuiTextFilter_Draw((ImGuiTextFilter*)(NativePtr), native_label, width); + if (label_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_label); + } + return ret != 0; + } + public bool IsActive() + { + byte ret = ImGuiNative.ImGuiTextFilter_IsActive((ImGuiTextFilter*)(NativePtr)); + return ret != 0; + } + public bool PassFilter(string text) + { + byte* native_text; + int text_byteCount = 0; + if (text != null) + { + text_byteCount = Encoding.UTF8.GetByteCount(text); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + native_text = Util.Allocate(text_byteCount + 1); + } + else + { + byte* native_text_stackBytes = stackalloc byte[text_byteCount + 1]; + native_text = native_text_stackBytes; + } + int native_text_offset = Util.GetUtf8(text, native_text, text_byteCount); + native_text[native_text_offset] = 0; + } + else { native_text = null; } + byte* native_text_end = null; + byte ret = ImGuiNative.ImGuiTextFilter_PassFilter((ImGuiTextFilter*)(NativePtr), native_text, native_text_end); + if (text_byteCount > Util.StackAllocationSizeLimit) + { + Util.Free(native_text); + } + return ret != 0; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTextRange.gen.cs b/lib/ImGui.NET/Generated/ImGuiTextRange.gen.cs new file mode 100644 index 0000000..1f00fd6 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTextRange.gen.cs @@ -0,0 +1,40 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiTextRange + { + public byte* b; + public byte* e; + } + public unsafe partial struct ImGuiTextRangePtr + { + public ImGuiTextRange* NativePtr { get; } + public ImGuiTextRangePtr(ImGuiTextRange* nativePtr) => NativePtr = nativePtr; + public ImGuiTextRangePtr(IntPtr nativePtr) => NativePtr = (ImGuiTextRange*)nativePtr; + public static implicit operator ImGuiTextRangePtr(ImGuiTextRange* nativePtr) => new ImGuiTextRangePtr(nativePtr); + public static implicit operator ImGuiTextRange* (ImGuiTextRangePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiTextRangePtr(IntPtr nativePtr) => new ImGuiTextRangePtr(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 Destroy() + { + ImGuiNative.ImGuiTextRange_destroy((ImGuiTextRange*)(NativePtr)); + } + public bool empty() + { + byte ret = ImGuiNative.ImGuiTextRange_empty((ImGuiTextRange*)(NativePtr)); + return ret != 0; + } + public void split(byte separator, out ImVector @out) + { + fixed (ImVector* native_out = &@out) + { + ImGuiNative.ImGuiTextRange_split((ImGuiTextRange*)(NativePtr), separator, native_out); + } + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiTreeNodeFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiTreeNodeFlags.gen.cs new file mode 100644 index 0000000..7f84875 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiTreeNodeFlags.gen.cs @@ -0,0 +1,23 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiTreeNodeFlags + { + None = 0, + Selected = 1, + Framed = 2, + AllowItemOverlap = 4, + NoTreePushOnOpen = 8, + NoAutoOpenOnLog = 16, + DefaultOpen = 32, + OpenOnDoubleClick = 64, + OpenOnArrow = 128, + Leaf = 256, + Bullet = 512, + FramePadding = 1024, + SpanAvailWidth = 2048, + SpanFullWidth = 4096, + NavLeftJumpsBackHere = 8192, + CollapsingHeader = 26, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiViewport.gen.cs b/lib/ImGui.NET/Generated/ImGuiViewport.gen.cs new file mode 100644 index 0000000..4507f94 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiViewport.gen.cs @@ -0,0 +1,68 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiViewport + { + public uint ID; + public ImGuiViewportFlags Flags; + public Vector2 Pos; + public Vector2 Size; + public Vector2 WorkPos; + public Vector2 WorkSize; + public float DpiScale; + public uint ParentViewportId; + public ImDrawData* DrawData; + public void* RendererUserData; + public void* PlatformUserData; + public void* PlatformHandle; + public void* PlatformHandleRaw; + public byte PlatformRequestMove; + public byte PlatformRequestResize; + public byte PlatformRequestClose; + } + public unsafe partial struct ImGuiViewportPtr + { + public ImGuiViewport* NativePtr { get; } + public ImGuiViewportPtr(ImGuiViewport* nativePtr) => NativePtr = nativePtr; + public ImGuiViewportPtr(IntPtr nativePtr) => NativePtr = (ImGuiViewport*)nativePtr; + public static implicit operator ImGuiViewportPtr(ImGuiViewport* nativePtr) => new ImGuiViewportPtr(nativePtr); + public static implicit operator ImGuiViewport* (ImGuiViewportPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiViewportPtr(IntPtr nativePtr) => new ImGuiViewportPtr(nativePtr); + public ref uint ID => ref Unsafe.AsRef(&NativePtr->ID); + public ref ImGuiViewportFlags Flags => ref Unsafe.AsRef(&NativePtr->Flags); + public ref Vector2 Pos => ref Unsafe.AsRef(&NativePtr->Pos); + public ref Vector2 Size => ref Unsafe.AsRef(&NativePtr->Size); + public ref Vector2 WorkPos => ref Unsafe.AsRef(&NativePtr->WorkPos); + public ref Vector2 WorkSize => ref Unsafe.AsRef(&NativePtr->WorkSize); + public ref float DpiScale => ref Unsafe.AsRef(&NativePtr->DpiScale); + public ref uint ParentViewportId => ref Unsafe.AsRef(&NativePtr->ParentViewportId); + public ImDrawDataPtr DrawData => new ImDrawDataPtr(NativePtr->DrawData); + public IntPtr RendererUserData { get => (IntPtr)NativePtr->RendererUserData; set => NativePtr->RendererUserData = (void*)value; } + public IntPtr PlatformUserData { get => (IntPtr)NativePtr->PlatformUserData; set => NativePtr->PlatformUserData = (void*)value; } + public IntPtr PlatformHandle { get => (IntPtr)NativePtr->PlatformHandle; set => NativePtr->PlatformHandle = (void*)value; } + public IntPtr PlatformHandleRaw { get => (IntPtr)NativePtr->PlatformHandleRaw; set => NativePtr->PlatformHandleRaw = (void*)value; } + public ref bool PlatformRequestMove => ref Unsafe.AsRef(&NativePtr->PlatformRequestMove); + public ref bool PlatformRequestResize => ref Unsafe.AsRef(&NativePtr->PlatformRequestResize); + public ref bool PlatformRequestClose => ref Unsafe.AsRef(&NativePtr->PlatformRequestClose); + public void Destroy() + { + ImGuiNative.ImGuiViewport_destroy((ImGuiViewport*)(NativePtr)); + } + public Vector2 GetCenter() + { + Vector2 __retval; + ImGuiNative.ImGuiViewport_GetCenter(&__retval, (ImGuiViewport*)(NativePtr)); + return __retval; + } + public Vector2 GetWorkCenter() + { + Vector2 __retval; + ImGuiNative.ImGuiViewport_GetWorkCenter(&__retval, (ImGuiViewport*)(NativePtr)); + return __retval; + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiViewportFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiViewportFlags.gen.cs new file mode 100644 index 0000000..463d0a1 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiViewportFlags.gen.cs @@ -0,0 +1,21 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiViewportFlags + { + None = 0, + IsPlatformWindow = 1, + IsPlatformMonitor = 2, + OwnedByApp = 4, + NoDecoration = 8, + NoTaskBarIcon = 16, + NoFocusOnAppearing = 32, + NoFocusOnClick = 64, + NoInputs = 128, + NoRendererClear = 256, + TopMost = 512, + Minimized = 1024, + NoAutoMerge = 2048, + CanHostOtherWindows = 4096, + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiWindowClass.gen.cs b/lib/ImGui.NET/Generated/ImGuiWindowClass.gen.cs new file mode 100644 index 0000000..e34c501 --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiWindowClass.gen.cs @@ -0,0 +1,40 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct ImGuiWindowClass + { + public uint ClassId; + public uint ParentViewportId; + public ImGuiViewportFlags ViewportFlagsOverrideSet; + public ImGuiViewportFlags ViewportFlagsOverrideClear; + public ImGuiTabItemFlags TabItemFlagsOverrideSet; + public ImGuiDockNodeFlags DockNodeFlagsOverrideSet; + public byte DockingAlwaysTabBar; + public byte DockingAllowUnclassed; + } + public unsafe partial struct ImGuiWindowClassPtr + { + public ImGuiWindowClass* NativePtr { get; } + public ImGuiWindowClassPtr(ImGuiWindowClass* nativePtr) => NativePtr = nativePtr; + public ImGuiWindowClassPtr(IntPtr nativePtr) => NativePtr = (ImGuiWindowClass*)nativePtr; + public static implicit operator ImGuiWindowClassPtr(ImGuiWindowClass* nativePtr) => new ImGuiWindowClassPtr(nativePtr); + public static implicit operator ImGuiWindowClass* (ImGuiWindowClassPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiWindowClassPtr(IntPtr nativePtr) => new ImGuiWindowClassPtr(nativePtr); + public ref uint ClassId => ref Unsafe.AsRef(&NativePtr->ClassId); + public ref uint ParentViewportId => ref Unsafe.AsRef(&NativePtr->ParentViewportId); + public ref ImGuiViewportFlags ViewportFlagsOverrideSet => ref Unsafe.AsRef(&NativePtr->ViewportFlagsOverrideSet); + public ref ImGuiViewportFlags ViewportFlagsOverrideClear => ref Unsafe.AsRef(&NativePtr->ViewportFlagsOverrideClear); + public ref ImGuiTabItemFlags TabItemFlagsOverrideSet => ref Unsafe.AsRef(&NativePtr->TabItemFlagsOverrideSet); + public ref ImGuiDockNodeFlags DockNodeFlagsOverrideSet => ref Unsafe.AsRef(&NativePtr->DockNodeFlagsOverrideSet); + public ref bool DockingAlwaysTabBar => ref Unsafe.AsRef(&NativePtr->DockingAlwaysTabBar); + public ref bool DockingAllowUnclassed => ref Unsafe.AsRef(&NativePtr->DockingAllowUnclassed); + public void Destroy() + { + ImGuiNative.ImGuiWindowClass_destroy((ImGuiWindowClass*)(NativePtr)); + } + } +} diff --git a/lib/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs b/lib/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs new file mode 100644 index 0000000..be9ed0f --- /dev/null +++ b/lib/ImGui.NET/Generated/ImGuiWindowFlags.gen.cs @@ -0,0 +1,39 @@ +namespace ImGuiNET +{ + [System.Flags] + public enum ImGuiWindowFlags + { + None = 0, + NoTitleBar = 1, + NoResize = 2, + NoMove = 4, + NoScrollbar = 8, + NoScrollWithMouse = 16, + NoCollapse = 32, + AlwaysAutoResize = 64, + NoBackground = 128, + NoSavedSettings = 256, + NoMouseInputs = 512, + MenuBar = 1024, + HorizontalScrollbar = 2048, + NoFocusOnAppearing = 4096, + NoBringToFrontOnFocus = 8192, + AlwaysVerticalScrollbar = 16384, + AlwaysHorizontalScrollbar = 32768, + AlwaysUseWindowPadding = 65536, + NoNavInputs = 262144, + NoNavFocus = 524288, + UnsavedDocument = 1048576, + NoDocking = 2097152, + NoNav = 786432, + NoDecoration = 43, + NoInputs = 786944, + NavFlattened = 8388608, + ChildWindow = 16777216, + Tooltip = 33554432, + Popup = 67108864, + Modal = 134217728, + ChildMenu = 268435456, + DockNodeHost = 536870912, + } +} diff --git a/lib/ImGui.NET/Generated/STB_TexteditState.gen.cs b/lib/ImGui.NET/Generated/STB_TexteditState.gen.cs new file mode 100644 index 0000000..9260756 --- /dev/null +++ b/lib/ImGui.NET/Generated/STB_TexteditState.gen.cs @@ -0,0 +1,48 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct STB_TexteditState + { + public int cursor; + public int select_start; + public int select_end; + public byte insert_mode; + public int row_count_per_page; + public byte cursor_at_end_of_line; + public byte initialized; + public byte has_preferred_x; + public byte single_line; + public byte padding1; + public byte padding2; + public byte padding3; + public float preferred_x; + public StbUndoState undostate; + } + public unsafe partial struct STB_TexteditStatePtr + { + public STB_TexteditState* NativePtr { get; } + public STB_TexteditStatePtr(STB_TexteditState* nativePtr) => NativePtr = nativePtr; + public STB_TexteditStatePtr(IntPtr nativePtr) => NativePtr = (STB_TexteditState*)nativePtr; + public static implicit operator STB_TexteditStatePtr(STB_TexteditState* nativePtr) => new STB_TexteditStatePtr(nativePtr); + public static implicit operator STB_TexteditState* (STB_TexteditStatePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator STB_TexteditStatePtr(IntPtr nativePtr) => new STB_TexteditStatePtr(nativePtr); + public ref int cursor => ref Unsafe.AsRef(&NativePtr->cursor); + public ref int select_start => ref Unsafe.AsRef(&NativePtr->select_start); + public ref int select_end => ref Unsafe.AsRef(&NativePtr->select_end); + public ref byte insert_mode => ref Unsafe.AsRef(&NativePtr->insert_mode); + public ref int row_count_per_page => ref Unsafe.AsRef(&NativePtr->row_count_per_page); + public ref byte cursor_at_end_of_line => ref Unsafe.AsRef(&NativePtr->cursor_at_end_of_line); + public ref byte initialized => ref Unsafe.AsRef(&NativePtr->initialized); + public ref byte has_preferred_x => ref Unsafe.AsRef(&NativePtr->has_preferred_x); + public ref byte single_line => ref Unsafe.AsRef(&NativePtr->single_line); + public ref byte padding1 => ref Unsafe.AsRef(&NativePtr->padding1); + public ref byte padding2 => ref Unsafe.AsRef(&NativePtr->padding2); + public ref byte padding3 => ref Unsafe.AsRef(&NativePtr->padding3); + public ref float preferred_x => ref Unsafe.AsRef(&NativePtr->preferred_x); + public ref StbUndoState undostate => ref Unsafe.AsRef(&NativePtr->undostate); + } +} diff --git a/lib/ImGui.NET/Generated/StbTexteditRow.gen.cs b/lib/ImGui.NET/Generated/StbTexteditRow.gen.cs new file mode 100644 index 0000000..331edfa --- /dev/null +++ b/lib/ImGui.NET/Generated/StbTexteditRow.gen.cs @@ -0,0 +1,32 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct StbTexteditRow + { + public float x0; + public float x1; + public float baseline_y_delta; + public float ymin; + public float ymax; + public int num_chars; + } + public unsafe partial struct StbTexteditRowPtr + { + public StbTexteditRow* NativePtr { get; } + public StbTexteditRowPtr(StbTexteditRow* nativePtr) => NativePtr = nativePtr; + public StbTexteditRowPtr(IntPtr nativePtr) => NativePtr = (StbTexteditRow*)nativePtr; + public static implicit operator StbTexteditRowPtr(StbTexteditRow* nativePtr) => new StbTexteditRowPtr(nativePtr); + public static implicit operator StbTexteditRow* (StbTexteditRowPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator StbTexteditRowPtr(IntPtr nativePtr) => new StbTexteditRowPtr(nativePtr); + public ref float x0 => ref Unsafe.AsRef(&NativePtr->x0); + public ref float x1 => ref Unsafe.AsRef(&NativePtr->x1); + public ref float baseline_y_delta => ref Unsafe.AsRef(&NativePtr->baseline_y_delta); + public ref float ymin => ref Unsafe.AsRef(&NativePtr->ymin); + public ref float ymax => ref Unsafe.AsRef(&NativePtr->ymax); + public ref int num_chars => ref Unsafe.AsRef(&NativePtr->num_chars); + } +} diff --git a/lib/ImGui.NET/Generated/StbUndoRecord.gen.cs b/lib/ImGui.NET/Generated/StbUndoRecord.gen.cs new file mode 100644 index 0000000..78d660f --- /dev/null +++ b/lib/ImGui.NET/Generated/StbUndoRecord.gen.cs @@ -0,0 +1,28 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct StbUndoRecord + { + public int where; + public int insert_length; + public int delete_length; + public int char_storage; + } + public unsafe partial struct StbUndoRecordPtr + { + public StbUndoRecord* NativePtr { get; } + public StbUndoRecordPtr(StbUndoRecord* nativePtr) => NativePtr = nativePtr; + public StbUndoRecordPtr(IntPtr nativePtr) => NativePtr = (StbUndoRecord*)nativePtr; + public static implicit operator StbUndoRecordPtr(StbUndoRecord* nativePtr) => new StbUndoRecordPtr(nativePtr); + public static implicit operator StbUndoRecord* (StbUndoRecordPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator StbUndoRecordPtr(IntPtr nativePtr) => new StbUndoRecordPtr(nativePtr); + public ref int where => ref Unsafe.AsRef(&NativePtr->where); + public ref int insert_length => ref Unsafe.AsRef(&NativePtr->insert_length); + public ref int delete_length => ref Unsafe.AsRef(&NativePtr->delete_length); + public ref int char_storage => ref Unsafe.AsRef(&NativePtr->char_storage); + } +} diff --git a/lib/ImGui.NET/Generated/StbUndoState.gen.cs b/lib/ImGui.NET/Generated/StbUndoState.gen.cs new file mode 100644 index 0000000..a8428a6 --- /dev/null +++ b/lib/ImGui.NET/Generated/StbUndoState.gen.cs @@ -0,0 +1,130 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Text; + +namespace ImGuiNET +{ + public unsafe partial struct StbUndoState + { + public StbUndoRecord undo_rec_0; + public StbUndoRecord undo_rec_1; + public StbUndoRecord undo_rec_2; + public StbUndoRecord undo_rec_3; + public StbUndoRecord undo_rec_4; + public StbUndoRecord undo_rec_5; + public StbUndoRecord undo_rec_6; + public StbUndoRecord undo_rec_7; + public StbUndoRecord undo_rec_8; + public StbUndoRecord undo_rec_9; + public StbUndoRecord undo_rec_10; + public StbUndoRecord undo_rec_11; + public StbUndoRecord undo_rec_12; + public StbUndoRecord undo_rec_13; + public StbUndoRecord undo_rec_14; + public StbUndoRecord undo_rec_15; + public StbUndoRecord undo_rec_16; + public StbUndoRecord undo_rec_17; + public StbUndoRecord undo_rec_18; + public StbUndoRecord undo_rec_19; + public StbUndoRecord undo_rec_20; + public StbUndoRecord undo_rec_21; + public StbUndoRecord undo_rec_22; + public StbUndoRecord undo_rec_23; + public StbUndoRecord undo_rec_24; + public StbUndoRecord undo_rec_25; + public StbUndoRecord undo_rec_26; + public StbUndoRecord undo_rec_27; + public StbUndoRecord undo_rec_28; + public StbUndoRecord undo_rec_29; + public StbUndoRecord undo_rec_30; + public StbUndoRecord undo_rec_31; + public StbUndoRecord undo_rec_32; + public StbUndoRecord undo_rec_33; + public StbUndoRecord undo_rec_34; + public StbUndoRecord undo_rec_35; + public StbUndoRecord undo_rec_36; + public StbUndoRecord undo_rec_37; + public StbUndoRecord undo_rec_38; + public StbUndoRecord undo_rec_39; + public StbUndoRecord undo_rec_40; + public StbUndoRecord undo_rec_41; + public StbUndoRecord undo_rec_42; + public StbUndoRecord undo_rec_43; + public StbUndoRecord undo_rec_44; + public StbUndoRecord undo_rec_45; + public StbUndoRecord undo_rec_46; + public StbUndoRecord undo_rec_47; + public StbUndoRecord undo_rec_48; + public StbUndoRecord undo_rec_49; + public StbUndoRecord undo_rec_50; + public StbUndoRecord undo_rec_51; + public StbUndoRecord undo_rec_52; + public StbUndoRecord undo_rec_53; + public StbUndoRecord undo_rec_54; + public StbUndoRecord undo_rec_55; + public StbUndoRecord undo_rec_56; + public StbUndoRecord undo_rec_57; + public StbUndoRecord undo_rec_58; + public StbUndoRecord undo_rec_59; + public StbUndoRecord undo_rec_60; + public StbUndoRecord undo_rec_61; + public StbUndoRecord undo_rec_62; + public StbUndoRecord undo_rec_63; + public StbUndoRecord undo_rec_64; + public StbUndoRecord undo_rec_65; + public StbUndoRecord undo_rec_66; + public StbUndoRecord undo_rec_67; + public StbUndoRecord undo_rec_68; + public StbUndoRecord undo_rec_69; + public StbUndoRecord undo_rec_70; + public StbUndoRecord undo_rec_71; + public StbUndoRecord undo_rec_72; + public StbUndoRecord undo_rec_73; + public StbUndoRecord undo_rec_74; + public StbUndoRecord undo_rec_75; + public StbUndoRecord undo_rec_76; + public StbUndoRecord undo_rec_77; + public StbUndoRecord undo_rec_78; + public StbUndoRecord undo_rec_79; + public StbUndoRecord undo_rec_80; + public StbUndoRecord undo_rec_81; + public StbUndoRecord undo_rec_82; + public StbUndoRecord undo_rec_83; + public StbUndoRecord undo_rec_84; + public StbUndoRecord undo_rec_85; + public StbUndoRecord undo_rec_86; + public StbUndoRecord undo_rec_87; + public StbUndoRecord undo_rec_88; + public StbUndoRecord undo_rec_89; + public StbUndoRecord undo_rec_90; + public StbUndoRecord undo_rec_91; + public StbUndoRecord undo_rec_92; + public StbUndoRecord undo_rec_93; + public StbUndoRecord undo_rec_94; + public StbUndoRecord undo_rec_95; + public StbUndoRecord undo_rec_96; + public StbUndoRecord undo_rec_97; + public StbUndoRecord undo_rec_98; + public fixed ushort undo_char[999]; + public short undo_point; + public short redo_point; + public int undo_char_point; + public int redo_char_point; + } + public unsafe partial struct StbUndoStatePtr + { + public StbUndoState* NativePtr { get; } + public StbUndoStatePtr(StbUndoState* nativePtr) => NativePtr = nativePtr; + public StbUndoStatePtr(IntPtr nativePtr) => NativePtr = (StbUndoState*)nativePtr; + public static implicit operator StbUndoStatePtr(StbUndoState* nativePtr) => new StbUndoStatePtr(nativePtr); + public static implicit operator StbUndoState* (StbUndoStatePtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator StbUndoStatePtr(IntPtr nativePtr) => new StbUndoStatePtr(nativePtr); + public RangeAccessor undo_rec => new RangeAccessor(&NativePtr->undo_rec_0, 99); + public RangeAccessor undo_char => new RangeAccessor(NativePtr->undo_char, 999); + public ref short undo_point => ref Unsafe.AsRef(&NativePtr->undo_point); + public ref short redo_point => ref Unsafe.AsRef(&NativePtr->redo_point); + public ref int undo_char_point => ref Unsafe.AsRef(&NativePtr->undo_char_point); + public ref int redo_char_point => ref Unsafe.AsRef(&NativePtr->redo_char_point); + } +} diff --git a/lib/ImGui.NET/ImDrawData.Manual.cs b/lib/ImGui.NET/ImDrawData.Manual.cs new file mode 100644 index 0000000..ddb5041 --- /dev/null +++ b/lib/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/lib/ImGui.NET/ImDrawList.Manual.cs b/lib/ImGui.NET/ImDrawList.Manual.cs new file mode 100644 index 0000000..dff0a4f --- /dev/null +++ b/lib/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_Vec2(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_AddText_FontPtr(NativePtr, native_font, font_size, pos, col, native_text_begin, native_text_end, wrap_width, cpu_fine_clip_rect); + } + } +} diff --git a/lib/ImGui.NET/ImGui.Manual.cs b/lib/ImGui.NET/ImGui.Manual.cs new file mode 100644 index 0000000..cec21cf --- /dev/null +++ b/lib/ImGui.NET/ImGui.Manual.cs @@ -0,0 +1,520 @@ +using System; +using System.Numerics; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +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 utf8LabelByteCount = Encoding.UTF8.GetByteCount(label); + byte* utf8LabelBytes; + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + utf8LabelBytes = Util.Allocate(utf8LabelByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8LabelByteCount + 1]; + utf8LabelBytes = stackPtr; + } + Util.GetUtf8(label, utf8LabelBytes, utf8LabelByteCount); + + bool ret; + fixed (byte* bufPtr = buf) + { + ret = ImGuiNative.igInputText(utf8LabelBytes, bufPtr, buf_size, flags, callback, user_data.ToPointer()) != 0; + } + + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8LabelBytes); + } + + return ret; + } + + public static bool InputText( + string label, + ref string input, + uint maxLength) => InputText(label, ref input, maxLength, 0, null, IntPtr.Zero); + + public static bool InputText( + string label, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags) => InputText(label, ref input, maxLength, flags, null, IntPtr.Zero); + + public static bool InputText( + string label, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback) => InputText(label, ref input, maxLength, flags, callback, IntPtr.Zero); + + public static bool InputText( + string label, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback, + IntPtr user_data) + { + int utf8LabelByteCount = Encoding.UTF8.GetByteCount(label); + byte* utf8LabelBytes; + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + utf8LabelBytes = Util.Allocate(utf8LabelByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8LabelByteCount + 1]; + utf8LabelBytes = stackPtr; + } + Util.GetUtf8(label, utf8LabelBytes, utf8LabelByteCount); + + int utf8InputByteCount = Encoding.UTF8.GetByteCount(input); + int inputBufSize = Math.Max((int)maxLength + 1, utf8InputByteCount + 1); + + byte* utf8InputBytes; + byte* originalUtf8InputBytes; + if (inputBufSize > Util.StackAllocationSizeLimit) + { + utf8InputBytes = Util.Allocate(inputBufSize); + originalUtf8InputBytes = Util.Allocate(inputBufSize); + } + else + { + byte* inputStackBytes = stackalloc byte[inputBufSize]; + utf8InputBytes = inputStackBytes; + byte* originalInputStackBytes = stackalloc byte[inputBufSize]; + originalUtf8InputBytes = originalInputStackBytes; + } + Util.GetUtf8(input, utf8InputBytes, inputBufSize); + uint clearBytesCount = (uint)(inputBufSize - utf8InputByteCount); + Unsafe.InitBlockUnaligned(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); + Unsafe.CopyBlock(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); + + byte result = ImGuiNative.igInputText( + utf8LabelBytes, + utf8InputBytes, + (uint)inputBufSize, + flags, + callback, + user_data.ToPointer()); + if (!Util.AreStringsEqual(originalUtf8InputBytes, inputBufSize, utf8InputBytes)) + { + input = Util.StringFromPtr(utf8InputBytes); + } + + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8LabelBytes); + } + if (inputBufSize > Util.StackAllocationSizeLimit) + { + Util.Free(utf8InputBytes); + Util.Free(originalUtf8InputBytes); + } + + return result != 0; + } + + public static bool InputTextMultiline( + string label, + ref string input, + uint maxLength, + Vector2 size) => InputTextMultiline(label, ref input, maxLength, size, 0, null, IntPtr.Zero); + + public static bool InputTextMultiline( + string label, + ref string input, + uint maxLength, + Vector2 size, + ImGuiInputTextFlags flags) => InputTextMultiline(label, ref input, maxLength, size, flags, null, IntPtr.Zero); + + public static bool InputTextMultiline( + string label, + ref string input, + uint maxLength, + Vector2 size, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback) => InputTextMultiline(label, ref input, maxLength, size, flags, callback, IntPtr.Zero); + + public static bool InputTextMultiline( + string label, + ref string input, + uint maxLength, + Vector2 size, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback, + IntPtr user_data) + { + int utf8LabelByteCount = Encoding.UTF8.GetByteCount(label); + byte* utf8LabelBytes; + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + utf8LabelBytes = Util.Allocate(utf8LabelByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8LabelByteCount + 1]; + utf8LabelBytes = stackPtr; + } + Util.GetUtf8(label, utf8LabelBytes, utf8LabelByteCount); + + int utf8InputByteCount = Encoding.UTF8.GetByteCount(input); + int inputBufSize = Math.Max((int)maxLength + 1, utf8InputByteCount + 1); + + byte* utf8InputBytes; + byte* originalUtf8InputBytes; + if (inputBufSize > Util.StackAllocationSizeLimit) + { + utf8InputBytes = Util.Allocate(inputBufSize); + originalUtf8InputBytes = Util.Allocate(inputBufSize); + } + else + { + byte* inputStackBytes = stackalloc byte[inputBufSize]; + utf8InputBytes = inputStackBytes; + byte* originalInputStackBytes = stackalloc byte[inputBufSize]; + originalUtf8InputBytes = originalInputStackBytes; + } + Util.GetUtf8(input, utf8InputBytes, inputBufSize); + uint clearBytesCount = (uint)(inputBufSize - utf8InputByteCount); + Unsafe.InitBlockUnaligned(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); + Unsafe.CopyBlock(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); + + byte result = ImGuiNative.igInputTextMultiline( + utf8LabelBytes, + utf8InputBytes, + (uint)inputBufSize, + size, + flags, + callback, + user_data.ToPointer()); + if (!Util.AreStringsEqual(originalUtf8InputBytes, inputBufSize, utf8InputBytes)) + { + input = Util.StringFromPtr(utf8InputBytes); + } + + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8LabelBytes); + } + if (inputBufSize > Util.StackAllocationSizeLimit) + { + Util.Free(utf8InputBytes); + Util.Free(originalUtf8InputBytes); + } + + return result != 0; + } + + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength) => InputTextWithHint(label, hint, ref input, maxLength, 0, null, IntPtr.Zero); + + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags) => InputTextWithHint(label, hint, ref input, maxLength, flags, null, IntPtr.Zero); + + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback) => InputTextWithHint(label, hint, ref input, maxLength, flags, callback, IntPtr.Zero); + + public static bool InputTextWithHint( + string label, + string hint, + ref string input, + uint maxLength, + ImGuiInputTextFlags flags, + ImGuiInputTextCallback callback, + IntPtr user_data) + { + int utf8LabelByteCount = Encoding.UTF8.GetByteCount(label); + byte* utf8LabelBytes; + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + utf8LabelBytes = Util.Allocate(utf8LabelByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8LabelByteCount + 1]; + utf8LabelBytes = stackPtr; + } + Util.GetUtf8(label, utf8LabelBytes, utf8LabelByteCount); + + int utf8HintByteCount = Encoding.UTF8.GetByteCount(hint); + byte* utf8HintBytes; + if (utf8HintByteCount > Util.StackAllocationSizeLimit) + { + utf8HintBytes = Util.Allocate(utf8HintByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8HintByteCount + 1]; + utf8HintBytes = stackPtr; + } + Util.GetUtf8(hint, utf8HintBytes, utf8HintByteCount); + + int utf8InputByteCount = Encoding.UTF8.GetByteCount(input); + int inputBufSize = Math.Max((int)maxLength + 1, utf8InputByteCount + 1); + + byte* utf8InputBytes; + byte* originalUtf8InputBytes; + if (inputBufSize > Util.StackAllocationSizeLimit) + { + utf8InputBytes = Util.Allocate(inputBufSize); + originalUtf8InputBytes = Util.Allocate(inputBufSize); + } + else + { + byte* inputStackBytes = stackalloc byte[inputBufSize]; + utf8InputBytes = inputStackBytes; + byte* originalInputStackBytes = stackalloc byte[inputBufSize]; + originalUtf8InputBytes = originalInputStackBytes; + } + Util.GetUtf8(input, utf8InputBytes, inputBufSize); + uint clearBytesCount = (uint)(inputBufSize - utf8InputByteCount); + Unsafe.InitBlockUnaligned(utf8InputBytes + utf8InputByteCount, 0, clearBytesCount); + Unsafe.CopyBlock(originalUtf8InputBytes, utf8InputBytes, (uint)inputBufSize); + + byte result = ImGuiNative.igInputTextWithHint( + utf8LabelBytes, + utf8HintBytes, + utf8InputBytes, + (uint)inputBufSize, + flags, + callback, + user_data.ToPointer()); + if (!Util.AreStringsEqual(originalUtf8InputBytes, inputBufSize, utf8InputBytes)) + { + input = Util.StringFromPtr(utf8InputBytes); + } + + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8LabelBytes); + } + if (utf8HintByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8HintBytes); + } + if (inputBufSize > Util.StackAllocationSizeLimit) + { + Util.Free(utf8InputBytes); + Util.Free(originalUtf8InputBytes); + } + + return result != 0; + } + + public static Vector2 CalcTextSize(string text) + => CalcTextSizeImpl(text); + + public static Vector2 CalcTextSize(string text, int start) + => CalcTextSizeImpl(text, start); + + public static Vector2 CalcTextSize(string text, float wrapWidth) + => CalcTextSizeImpl(text, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, bool hideTextAfterDoubleHash) + => CalcTextSizeImpl(text, hideTextAfterDoubleHash: hideTextAfterDoubleHash); + + public static Vector2 CalcTextSize(string text, int start, int length) + => CalcTextSizeImpl(text, start, length); + + public static Vector2 CalcTextSize(string text, int start, bool hideTextAfterDoubleHash) + => CalcTextSizeImpl(text, start, hideTextAfterDoubleHash: hideTextAfterDoubleHash); + + public static Vector2 CalcTextSize(string text, int start, float wrapWidth) + => CalcTextSizeImpl(text, start, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, bool hideTextAfterDoubleHash, float wrapWidth) + => CalcTextSizeImpl(text, hideTextAfterDoubleHash: hideTextAfterDoubleHash, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, int start, int length, bool hideTextAfterDoubleHash) + => CalcTextSizeImpl(text, start, length, hideTextAfterDoubleHash); + + public static Vector2 CalcTextSize(string text, int start, int length, float wrapWidth) + => CalcTextSizeImpl(text, start, length, wrapWidth: wrapWidth); + + public static Vector2 CalcTextSize(string text, int start, int length, bool hideTextAfterDoubleHash, float wrapWidth) + => CalcTextSizeImpl(text, start, length, hideTextAfterDoubleHash, wrapWidth); + + private static Vector2 CalcTextSizeImpl( + string text, + int start = 0, + int? length = null, + bool hideTextAfterDoubleHash = false, + float wrapWidth = -1.0f) + { + Vector2 ret; + byte* nativeTextStart = null; + byte* nativeTextEnd = null; + int textByteCount = 0; + if (text != null) + { + + int textToCopyLen = length.HasValue ? length.Value : text.Length; + textByteCount = Util.CalcSizeInUtf8(text, start, textToCopyLen); + if (textByteCount > Util.StackAllocationSizeLimit) + { + nativeTextStart = Util.Allocate(textByteCount + 1); + } + else + { + byte* nativeTextStackBytes = stackalloc byte[textByteCount + 1]; + nativeTextStart = nativeTextStackBytes; + } + + int nativeTextOffset = Util.GetUtf8(text, start, textToCopyLen, nativeTextStart, textByteCount); + nativeTextStart[nativeTextOffset] = 0; + nativeTextEnd = nativeTextStart + nativeTextOffset; + } + + ImGuiNative.igCalcTextSize(&ret, nativeTextStart, nativeTextEnd, *((byte*)(&hideTextAfterDoubleHash)), wrapWidth); + if (textByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(nativeTextStart); + } + + return ret; + } + + 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 utf8LabelByteCount = Encoding.UTF8.GetByteCount(label); + byte* utf8LabelBytes; + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + utf8LabelBytes = Util.Allocate(utf8LabelByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8LabelByteCount + 1]; + utf8LabelBytes = stackPtr; + } + Util.GetUtf8(label, utf8LabelBytes, utf8LabelByteCount); + + bool ret = ImGuiNative.igInputText(utf8LabelBytes, (byte*)buf.ToPointer(), buf_size, flags, callback, user_data.ToPointer()) != 0; + + if (utf8LabelByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8LabelBytes); + } + + return ret; + } + + public static bool Begin(string name, ImGuiWindowFlags flags) + { + int utf8NameByteCount = Encoding.UTF8.GetByteCount(name); + byte* utf8NameBytes; + if (utf8NameByteCount > Util.StackAllocationSizeLimit) + { + utf8NameBytes = Util.Allocate(utf8NameByteCount + 1); + } + else + { + byte* stackPtr = stackalloc byte[utf8NameByteCount + 1]; + utf8NameBytes = stackPtr; + } + Util.GetUtf8(name, utf8NameBytes, utf8NameByteCount); + + byte* p_open = null; + byte ret = ImGuiNative.igBegin(utf8NameBytes, p_open, flags); + + if (utf8NameByteCount > Util.StackAllocationSizeLimit) + { + Util.Free(utf8NameBytes); + } + + return ret != 0; + } + + public static bool MenuItem(string label, bool enabled) + { + return MenuItem(label, string.Empty, false, enabled); + } + } +} diff --git a/lib/ImGui.NET/ImGui.NET.csproj b/lib/ImGui.NET/ImGui.NET.csproj new file mode 100644 index 0000000..1e1cb8f --- /dev/null +++ b/lib/ImGui.NET/ImGui.NET.csproj @@ -0,0 +1,56 @@ + + + A .NET wrapper for the Dear ImGui library. + 1.87.2 + Eric Mellino + net6.0 + true + portable + ImGui.NET + ImGui.NET + + $(AssemblyVersion)$(PackagePrereleaseIdentifier) + ImGui ImGui.NET Immediate Mode GUI + https://github.com/mellinoe/imgui.net + $(OutputPath)\ImGui.NET.xml + ImGuiNET + + + + + + + + + <_Parameter1>ImPlot.NET + + + <_Parameter1>ImNodes.NET + + + + + runtimes/win-x86/native + true + + + runtimes/win-x64/native + true + + + runtimes/linux-x64/native/libcimgui.so + true + + + runtimes/osx-universal/native/libcimgui.dylib + true + + + build/net40/ImGui.NET.targets + true + + + + + + diff --git a/lib/ImGui.NET/ImGuiSizeCallback.cs b/lib/ImGui.NET/ImGuiSizeCallback.cs new file mode 100644 index 0000000..b70ebca --- /dev/null +++ b/lib/ImGui.NET/ImGuiSizeCallback.cs @@ -0,0 +1,4 @@ +namespace ImGuiNET +{ + public unsafe delegate void ImGuiSizeCallback(ImGuiSizeCallbackData* data); +} diff --git a/lib/ImGui.NET/ImGuiTextEditCallback.cs b/lib/ImGui.NET/ImGuiTextEditCallback.cs new file mode 100644 index 0000000..04e5500 --- /dev/null +++ b/lib/ImGui.NET/ImGuiTextEditCallback.cs @@ -0,0 +1,4 @@ +namespace ImGuiNET +{ + public unsafe delegate int ImGuiInputTextCallback(ImGuiInputTextCallbackData* data); +} diff --git a/lib/ImGui.NET/ImVector.cs b/lib/ImGui.NET/ImVector.cs new file mode 100644 index 0000000..76411b8 --- /dev/null +++ b/lib/ImGui.NET/ImVector.cs @@ -0,0 +1,75 @@ +using System; +using System.Runtime.CompilerServices; + +namespace ImGuiNET +{ + public unsafe struct ImVector + { + 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/lib/ImGui.NET/NullTerminatedString.cs b/lib/ImGui.NET/NullTerminatedString.cs new file mode 100644 index 0000000..d54bae2 --- /dev/null +++ b/lib/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/lib/ImGui.NET/Pair.cs b/lib/ImGui.NET/Pair.cs new file mode 100644 index 0000000..904cde3 --- /dev/null +++ b/lib/ImGui.NET/Pair.cs @@ -0,0 +1,32 @@ +using System; +using System.Runtime.InteropServices; + +namespace ImGuiNET +{ + public struct ImGuiStoragePair + { + public uint Key; + public UnionValue Value; + } + + public unsafe struct ImGuiStoragePairPtr + { + public ImGuiStoragePair* NativePtr { get; } + public ImGuiStoragePairPtr(ImGuiStoragePair* nativePtr) => NativePtr = nativePtr; + public ImGuiStoragePairPtr(IntPtr nativePtr) => NativePtr = (ImGuiStoragePair*)nativePtr; + public static implicit operator ImGuiStoragePairPtr(ImGuiStoragePair* nativePtr) => new ImGuiStoragePairPtr(nativePtr); + public static implicit operator ImGuiStoragePair*(ImGuiStoragePairPtr wrappedPtr) => wrappedPtr.NativePtr; + public static implicit operator ImGuiStoragePairPtr(IntPtr nativePtr) => new ImGuiStoragePairPtr(nativePtr); + } + + [StructLayout(LayoutKind.Explicit)] + public struct UnionValue + { + [FieldOffset(0)] + public int ValueI32; + [FieldOffset(0)] + public float ValueF32; + [FieldOffset(0)] + public IntPtr ValuePtr; + } +} diff --git a/lib/ImGui.NET/RangeAccessor.cs b/lib/ImGui.NET/RangeAccessor.cs new file mode 100644 index 0000000..cf766c7 --- /dev/null +++ b/lib/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/lib/ImGui.NET/Util.cs b/lib/ImGui.NET/Util.cs new file mode 100644 index 0000000..52785b6 --- /dev/null +++ b/lib/ImGui.NET/Util.cs @@ -0,0 +1,72 @@ +using System; +using System.Runtime.InteropServices; +using System.Text; + +namespace ImGuiNET +{ + internal static unsafe class Util + { + internal const int StackAllocationSizeLimit = 2048; + + public static string StringFromPtr(byte* ptr) + { + int characters = 0; + while (ptr[characters] != 0) + { + characters++; + } + + return Encoding.UTF8.GetString(ptr, characters); + } + + internal static bool AreStringsEqual(byte* a, int aLength, byte* b) + { + for (int i = 0; i < aLength; i++) + { + if (a[i] != b[i]) { return false; } + } + + if (b[aLength] != 0) { return false; } + + return true; + } + + internal static byte* Allocate(int byteCount) => (byte*)Marshal.AllocHGlobal(byteCount); + + internal static void Free(byte* ptr) => Marshal.FreeHGlobal((IntPtr)ptr); + + internal static int CalcSizeInUtf8(string s, int start, int length) + { + if (start < 0 || length < 0 || start + length > s.Length) + { + throw new ArgumentOutOfRangeException(); + } + + fixed (char* utf16Ptr = s) + { + return Encoding.UTF8.GetByteCount(utf16Ptr + start, length); + } + } + + internal static int GetUtf8(string s, byte* utf8Bytes, int utf8ByteCount) + { + fixed (char* utf16Ptr = s) + { + return Encoding.UTF8.GetBytes(utf16Ptr, s.Length, utf8Bytes, utf8ByteCount); + } + } + + internal static int GetUtf8(string s, int start, int length, byte* utf8Bytes, int utf8ByteCount) + { + if (start < 0 || length < 0 || start + length > s.Length) + { + throw new ArgumentOutOfRangeException(); + } + + fixed (char* utf16Ptr = s) + { + return Encoding.UTF8.GetBytes(utf16Ptr + start, length, utf8Bytes, utf8ByteCount); + } + } + } +} diff --git a/lib/ImGui.NET/build/net40/ImGui.NET.targets b/lib/ImGui.NET/build/net40/ImGui.NET.targets new file mode 100644 index 0000000..e323ac3 --- /dev/null +++ b/lib/ImGui.NET/build/net40/ImGui.NET.targets @@ -0,0 +1,25 @@ + + + + <_IsWindows Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Windows)))' == 'true'">true + <_IsMacOS Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::OSX)))' == 'true'">true + <_IsLinux Condition="'$([System.Runtime.InteropServices.RuntimeInformation]::IsOSPlatform($([System.Runtime.InteropServices.OSPlatform]::Linux)))' == 'true'">true + + <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsMacOS)' == 'true' And '$(PlatformTarget)' == 'x64'">osx-x64 + <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsMacOS)' == 'true' And '$(PlatformTarget)' == 'ARM64'">osx-arm64 + <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsLinux)' == 'true' And ('$(Prefer32Bit)' == 'false' Or '$(PlatformTarget)' == 'x64')">linux-x64 + <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsWindows)' == 'true' And ('$(Prefer32Bit)' == 'true' Or '$(PlatformTarget)' == 'x86')">win-x86 + <_NativeRuntime Condition=" '$(_NativeRuntime)' == '' And '$(_IsWindows)' == 'true' And ('$(Prefer32Bit)' == 'false' Or '$(PlatformTarget)' == 'x64')">win-x64 + + <_NativeLibName Condition="'$(_NativeRuntime)' == 'win-x86' Or '$(_NativeRuntime)' == 'win-x64'">cimgui.dll + <_NativeLibName Condition="'$(_NativeRuntime)' == 'osx-x64' Or '$(_NativeRuntime)' == 'osx-arm64'">libcimgui.dylib + <_NativeLibName Condition="'$(_NativeRuntime)' == 'linux-x64'">libcimgui.so + + + + %(Filename)%(Extension) + Always + False + + + diff --git a/lib/MoonWorks b/lib/MoonWorks new file mode 160000 index 0000000..a413863 --- /dev/null +++ b/lib/MoonWorks @@ -0,0 +1 @@ +Subproject commit a413863cf94827148dc36580a0313a2013c235ee diff --git a/shaders/ImGui.frag b/shaders/ImGui.frag new file mode 100644 index 0000000..597e244 --- /dev/null +++ b/shaders/ImGui.frag @@ -0,0 +1,13 @@ +#version 450 + +layout(set = 1, binding = 0) uniform sampler2D tex; + +layout(location = 0) in vec2 inTexCoord; +layout(location = 1) in vec4 inColor; + +layout(location = 0) out vec4 outColor; + +void main() +{ + outColor = texture(tex, inTexCoord) * inColor; +} diff --git a/shaders/ImGui.vert b/shaders/ImGui.vert new file mode 100644 index 0000000..b876f58 --- /dev/null +++ b/shaders/ImGui.vert @@ -0,0 +1,19 @@ +#version 450 + +layout(location = 0) in vec2 inPosition; +layout(location = 1) in vec2 inTexCoord; +layout(location = 2) in vec4 inColor; + +layout (set = 2, binding = 0) uniform UniformBlock +{ + mat4 projectionMatrix; +} Uniforms; + +layout(location = 0) out vec2 outTexCoord; +layout(location = 1) out vec4 outColor; + +void main() { + gl_Position = Uniforms.projectionMatrix * vec4(inPosition, 0.0, 1.0); + outTexCoord = inTexCoord; + outColor = inColor; +} diff --git a/src/MoonWorksImguiExampleGame.cs b/src/MoonWorksImguiExampleGame.cs new file mode 100644 index 0000000..d1bbd30 --- /dev/null +++ b/src/MoonWorksImguiExampleGame.cs @@ -0,0 +1,310 @@ +using MoonWorks.Graphics; +using MoonWorks; +using ImGuiNET; +using System.Runtime.InteropServices; +using System.IO; +using MoonWorks.Input; +using MoonWorks.Math; +using System.Collections.Generic; + +namespace MoonWorksImguiExample +{ + class MoonWorksImguiExampleGame : Game + { + private string ContentPath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "Content"); + + private ImFontPtr DefaultFontPtr; + private int TextureID; + private System.IntPtr? FontTexturePtr; + private Dictionary LoadedTextures = new Dictionary(); + private Dictionary TextureHandles = new Dictionary(); + + private uint VertexCount = 0; + private uint IndexCount = 0; + private Buffer ImGuiVertexBuffer = null; + private Buffer ImGuiIndexBuffer = null; + private GraphicsPipeline ImGuiPipeline; + private ShaderModule ImGuiVertexShader; + private ShaderModule ImGuiFragmentShader; + private Sampler ImGuiSampler; + + public MoonWorksImguiExampleGame( + WindowCreateInfo windowCreateInfo, + PresentMode presentMode, + bool debugMode + ) : base(windowCreateInfo, presentMode, 60, debugMode) + { + var context = ImGui.CreateContext(); + ImGui.SetCurrentContext(context); + + var io = ImGui.GetIO(); + + io.Fonts.AddFontDefault(); + + RebuildFontAtlas(); + + io.DisplaySize = new System.Numerics.Vector2( + windowCreateInfo.WindowWidth, + windowCreateInfo.WindowHeight + ); + io.DisplayFramebufferScale = System.Numerics.Vector2.One; + + ImGuiVertexShader = new ShaderModule(GraphicsDevice, Path.Combine(ContentPath, "ImGuiVert.spv")); + ImGuiFragmentShader = new ShaderModule(GraphicsDevice, Path.Combine(ContentPath, "ImGuiFrag.spv")); + ImGuiSampler = new Sampler(GraphicsDevice, SamplerCreateInfo.PointClamp); + + ImGuiPipeline = new GraphicsPipeline( + GraphicsDevice, + new GraphicsPipelineCreateInfo + { + AttachmentInfo = new GraphicsPipelineAttachmentInfo( + new ColorAttachmentDescription( + GraphicsDevice.GetSwapchainFormat(Window), + ColorAttachmentBlendState.NonPremultiplied + ) + ), + DepthStencilState = DepthStencilState.Disable, + VertexShaderInfo = GraphicsShaderInfo.Create(ImGuiVertexShader, "main", 0), + FragmentShaderInfo = GraphicsShaderInfo.Create(ImGuiFragmentShader, "main", 1), + VertexInputState = new VertexInputState( + VertexBinding.Create(), + VertexAttribute.Create("Position", 0), + VertexAttribute.Create("Texture", 1), + VertexAttribute.Create("Color", 2) + ), + PrimitiveType = PrimitiveType.TriangleList, + RasterizerState = RasterizerState.CW_CullNone, + ViewportState = new ViewportState((int) windowCreateInfo.WindowWidth, (int) windowCreateInfo.WindowHeight), + MultisampleState = MultisampleState.None + } + ); + } + + protected override void Update(System.TimeSpan dt) + { + // Insert your game update logic here. + } + + private System.IntPtr BindTexture(Texture texture) + { + var id = new System.IntPtr(TextureID); + LoadedTextures.Add(id, texture); + TextureHandles.Add(texture, id); + return id; + } + + private void UnbindTexture(System.IntPtr textureID) + { + var texture = LoadedTextures[textureID]; + LoadedTextures.Remove(textureID); + TextureHandles.Remove(texture); + } + + private void RebuildFontAtlas() + { + var commandBuffer = GraphicsDevice.AcquireCommandBuffer(); + + var io = ImGui.GetIO(); + + io.Fonts.GetTexDataAsRGBA32( + out System.IntPtr pixelData, + out int width, + out int height, + out int bytesPerPixel + ); + + var texture = Texture.CreateTexture2D( + GraphicsDevice, + (uint) width, + (uint) height, + TextureFormat.R8G8B8A8, + TextureUsageFlags.Sampler + ); + + commandBuffer.SetTextureData(texture, pixelData, (uint) (width * height * bytesPerPixel)); + + GraphicsDevice.Submit(commandBuffer); + + if (FontTexturePtr.HasValue) + { + UnbindTexture(FontTexturePtr.Value); + } + + FontTexturePtr = BindTexture(texture); + + io.Fonts.SetTexID(FontTexturePtr.Value); + io.Fonts.ClearTexData(); + } + + private void UpdateImGuiBuffers(ImDrawDataPtr drawDataPtr) + { + if (drawDataPtr.TotalVtxCount == 0) { return; } + + var commandBuffer = GraphicsDevice.AcquireCommandBuffer(); + + var vertexSize = Marshal.SizeOf(); + + if (drawDataPtr.TotalVtxCount > VertexCount) + { + ImGuiVertexBuffer?.Dispose(); + + VertexCount = (uint) (drawDataPtr.TotalVtxCount * 1.5f); + ImGuiVertexBuffer = Buffer.Create( + GraphicsDevice, + BufferUsageFlags.Vertex, + VertexCount + ); + } + + if (drawDataPtr.TotalIdxCount > IndexCount) + { + ImGuiIndexBuffer?.Dispose(); + + IndexCount = (uint) (drawDataPtr.TotalIdxCount * 1.5f); + ImGuiIndexBuffer = Buffer.Create( + GraphicsDevice, + BufferUsageFlags.Index, + IndexCount + ); + } + + uint vertexOffset = 0; + uint indexOffset = 0; + + for (var n = 0; n < drawDataPtr.CmdListsCount; n += 1) + { + var cmdList = drawDataPtr.CmdListsRange[n]; + + commandBuffer.SetBufferData( + ImGuiVertexBuffer, + cmdList.VtxBuffer.Data, + vertexOffset, + (uint) (cmdList.VtxBuffer.Size * vertexSize) + ); + + commandBuffer.SetBufferData( + ImGuiIndexBuffer, + cmdList.IdxBuffer.Data, + indexOffset, + (uint) cmdList.IdxBuffer.Size * sizeof(ushort) + ); + + vertexOffset += (uint) cmdList.VtxBuffer.Size; + indexOffset += (uint) cmdList.IdxBuffer.Size; + } + + GraphicsDevice.Submit(commandBuffer); + } + + protected override void Draw(System.TimeSpan dt, double alpha) + { + // Replace this with your own drawing code. + + var io = ImGui.GetIO(); + + io.KeyShift = Inputs.Keyboard.IsDown(Keycode.LeftShift) || Inputs.Keyboard.IsDown(Keycode.RightShift); + io.KeyCtrl = Inputs.Keyboard.IsDown(Keycode.LeftControl) || Inputs.Keyboard.IsDown(Keycode.RightControl); + io.KeyAlt = Inputs.Keyboard.IsDown(Keycode.LeftAlt) || Inputs.Keyboard.IsDown(Keycode.RightAlt); + io.KeySuper = Inputs.Keyboard.IsDown(Keycode.LeftMeta) || Inputs.Keyboard.IsDown(Keycode.RightMeta); + io.KeyMap[(int)ImGuiKey.Backspace] = (int)Keycode.Backspace; + + io.MousePos = new System.Numerics.Vector2(Inputs.Mouse.X, Inputs.Mouse.Y); + io.MouseDown[0] = Inputs.Mouse.LeftButton.IsDown; + io.MouseDown[1] = Inputs.Mouse.RightButton.IsDown; + io.MouseDown[2] = Inputs.Mouse.MiddleButton.IsDown; + io.MouseWheel = Inputs.Mouse.Wheel > 0 ? 1 : Inputs.Mouse.Wheel < 0 ? -1 : 0; + + ImGui.NewFrame(); + + ImGui.SetNextWindowSize(new System.Numerics.Vector2(400, 200)); + ImGui.Begin("Help"); + ImGui.Columns(2); + + ImGui.Text("F7"); + ImGui.NextColumn(); + ImGui.Text("Pause Action"); + ImGui.NextColumn(); + + ImGui.Text("Ctrl-E"); + ImGui.NextColumn(); + ImGui.Text("Entity Search"); + ImGui.NextColumn(); + + ImGui.Text("Left Click"); + ImGui.NextColumn(); + ImGui.Text("Inspect Entity"); + ImGui.NextColumn(); + + ImGui.Text("Ctrl-H"); + ImGui.NextColumn(); + ImGui.Text("Help"); + ImGui.NextColumn(); + + ImGui.End(); + + ImGui.Render(); + + var drawDataPtr = ImGui.GetDrawData(); + UpdateImGuiBuffers(drawDataPtr); + + if (ImGuiVertexBuffer == null) { return; } + + var commandBuffer = GraphicsDevice.AcquireCommandBuffer(); + var swapchainTexture = commandBuffer.AcquireSwapchainTexture(Window); + + if (swapchainTexture != null) + { + commandBuffer.BeginRenderPass( + new ColorAttachmentInfo(swapchainTexture, Color.Transparent) + ); + + commandBuffer.BindGraphicsPipeline(ImGuiPipeline); + + var vertexUniformOffset = commandBuffer.PushVertexShaderUniforms( + Matrix4x4.CreateOrthographicOffCenter(0, io.DisplaySize.X, io.DisplaySize.Y, 0, -1, 1) + ); + + commandBuffer.BindVertexBuffers(ImGuiVertexBuffer); + commandBuffer.BindIndexBuffer(ImGuiIndexBuffer, IndexElementSize.Sixteen); + + uint vertexOffset = 0; + uint indexOffset = 0; + + for (int n = 0; n < drawDataPtr.CmdListsCount; n += 1) + { + var cmdList = drawDataPtr.CmdListsRange[n]; + + for (int cmdIndex = 0; cmdIndex < cmdList.CmdBuffer.Size; cmdIndex += 1) + { + var drawCmd = cmdList.CmdBuffer[cmdIndex]; + + commandBuffer.BindFragmentSamplers( + new TextureSamplerBinding(LoadedTextures[drawCmd.TextureId], ImGuiSampler) + ); + + commandBuffer.DrawIndexedPrimitives( + vertexOffset, + indexOffset, + drawCmd.ElemCount / 3, + vertexUniformOffset, + 0 + ); + + indexOffset += drawCmd.ElemCount; + } + + vertexOffset += (uint) cmdList.VtxBuffer.Size; + } + + commandBuffer.EndRenderPass(); + } + + GraphicsDevice.Submit(commandBuffer); + } + + protected override void OnDestroy() + { + + } + } +} diff --git a/src/Program.cs b/src/Program.cs new file mode 100644 index 0000000..c2fa6b3 --- /dev/null +++ b/src/Program.cs @@ -0,0 +1,34 @@ +using System; +using System.IO; +using System.Runtime.InteropServices; +using MoonWorks; + +namespace MoonWorksImguiExample +{ + class Program + { + [DllImport("kernel32.dll", CharSet = CharSet.Unicode, SetLastError = true)] + [return: MarshalAs(UnmanagedType.Bool)] + static extern bool SetDllDirectory(string lpPathName); + + + static void Main(string[] args) + { + WindowCreateInfo windowCreateInfo = new WindowCreateInfo + { + WindowWidth = 1280, + WindowHeight = 720, + WindowTitle = "MoonWorksImguiExample", + ScreenMode = ScreenMode.Windowed + }; + + MoonWorksImguiExampleGame game = new MoonWorksImguiExampleGame( + windowCreateInfo, + MoonWorks.Graphics.PresentMode.FIFORelaxed, + true + ); + + game.Run(); + } + } +} diff --git a/src/VertexPositionTextureColor.cs b/src/VertexPositionTextureColor.cs new file mode 100644 index 0000000..55cbbec --- /dev/null +++ b/src/VertexPositionTextureColor.cs @@ -0,0 +1,12 @@ +using MoonWorks.Graphics; +using MoonWorks.Math; + +namespace MoonWorksImguiExample +{ + public struct VertexPositionTextureColor + { + public Vector2 Position; + public Vector2 Texture; + public Color Color; + } +}