Bläddra i källkod

Changing the LICENSE to MIT

Coldzer0 1 år sedan
förälder
incheckning
9f2b3cc997

+ 21 - 165
LICENSE

@@ -1,165 +1,21 @@
-                   GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-
-  This version of the GNU Lesser General Public License incorporates
-the terms and conditions of version 3 of the GNU General Public
-License, supplemented by the additional permissions listed below.
-
-  0. Additional Definitions.
-
-  As used herein, "this License" refers to version 3 of the GNU Lesser
-General Public License, and the "GNU GPL" refers to version 3 of the GNU
-General Public License.
-
-  "The Library" refers to a covered work governed by this License,
-other than an Application or a Combined Work as defined below.
-
-  An "Application" is any work that makes use of an interface provided
-by the Library, but which is not otherwise based on the Library.
-Defining a subclass of a class defined by the Library is deemed a mode
-of using an interface provided by the Library.
-
-  A "Combined Work" is a work produced by combining or linking an
-Application with the Library.  The particular version of the Library
-with which the Combined Work was made is also called the "Linked
-Version".
-
-  The "Minimal Corresponding Source" for a Combined Work means the
-Corresponding Source for the Combined Work, excluding any source code
-for portions of the Combined Work that, considered in isolation, are
-based on the Application, and not on the Linked Version.
-
-  The "Corresponding Application Code" for a Combined Work means the
-object code and/or source code for the Application, including any data
-and utility programs needed for reproducing the Combined Work from the
-Application, but excluding the System Libraries of the Combined Work.
-
-  1. Exception to Section 3 of the GNU GPL.
-
-  You may convey a covered work under sections 3 and 4 of this License
-without being bound by section 3 of the GNU GPL.
-
-  2. Conveying Modified Versions.
-
-  If you modify a copy of the Library, and, in your modifications, a
-facility refers to a function or data to be supplied by an Application
-that uses the facility (other than as an argument passed when the
-facility is invoked), then you may convey a copy of the modified
-version:
-
-   a) under this License, provided that you make a good faith effort to
-   ensure that, in the event an Application does not supply the
-   function or data, the facility still operates, and performs
-   whatever part of its purpose remains meaningful, or
-
-   b) under the GNU GPL, with none of the additional permissions of
-   this License applicable to that copy.
-
-  3. Object Code Incorporating Material from Library Header Files.
-
-  The object code form of an Application may incorporate material from
-a header file that is part of the Library.  You may convey such object
-code under terms of your choice, provided that, if the incorporated
-material is not limited to numerical parameters, data structure
-layouts and accessors, or small macros, inline functions and templates
-(ten or fewer lines in length), you do both of the following:
-
-   a) Give prominent notice with each copy of the object code that the
-   Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the object code with a copy of the GNU GPL and this license
-   document.
-
-  4. Combined Works.
-
-  You may convey a Combined Work under terms of your choice that,
-taken together, effectively do not restrict modification of the
-portions of the Library contained in the Combined Work and reverse
-engineering for debugging such modifications, if you also do each of
-the following:
-
-   a) Give prominent notice with each copy of the Combined Work that
-   the Library is used in it and that the Library and its use are
-   covered by this License.
-
-   b) Accompany the Combined Work with a copy of the GNU GPL and this license
-   document.
-
-   c) For a Combined Work that displays copyright notices during
-   execution, include the copyright notice for the Library among
-   these notices, as well as a reference directing the user to the
-   copies of the GNU GPL and this license document.
-
-   d) Do one of the following:
-
-       0) Convey the Minimal Corresponding Source under the terms of this
-       License, and the Corresponding Application Code in a form
-       suitable for, and under terms that permit, the user to
-       recombine or relink the Application with a modified version of
-       the Linked Version to produce a modified Combined Work, in the
-       manner specified by section 6 of the GNU GPL for conveying
-       Corresponding Source.
-
-       1) Use a suitable shared library mechanism for linking with the
-       Library.  A suitable mechanism is one that (a) uses at run time
-       a copy of the Library already present on the user's computer
-       system, and (b) will operate properly with a modified version
-       of the Library that is interface-compatible with the Linked
-       Version.
-
-   e) Provide Installation Information, but only if you would otherwise
-   be required to provide such information under section 6 of the
-   GNU GPL, and only to the extent that such information is
-   necessary to install and execute a modified version of the
-   Combined Work produced by recombining or relinking the
-   Application with a modified version of the Linked Version. (If
-   you use option 4d0, the Installation Information must accompany
-   the Minimal Corresponding Source and Corresponding Application
-   Code. If you use option 4d1, you must provide the Installation
-   Information in the manner specified by section 6 of the GNU GPL
-   for conveying Corresponding Source.)
-
-  5. Combined Libraries.
-
-  You may place library facilities that are a work based on the
-Library side by side in a single library together with other library
-facilities that are not Applications and are not covered by this
-License, and convey such a combined library under terms of your
-choice, if you do both of the following:
-
-   a) Accompany the combined library with a copy of the same work based
-   on the Library, uncombined with any other library facilities,
-   conveyed under the terms of this License.
-
-   b) Give prominent notice with the combined library that part of it
-   is a work based on the Library, and explaining where to find the
-   accompanying uncombined form of the same work.
-
-  6. Revised Versions of the GNU Lesser General Public License.
-
-  The Free Software Foundation may publish revised and/or new versions
-of the GNU Lesser General Public License from time to time. Such new
-versions will be similar in spirit to the present version, but may
-differ in detail to address new problems or concerns.
-
-  Each version is given a distinguishing version number. If the
-Library as you received it specifies that a certain numbered version
-of the GNU Lesser General Public License "or any later version"
-applies to it, you have the option of following the terms and
-conditions either of that published version or of any later version
-published by the Free Software Foundation. If the Library as you
-received it does not specify a version number of the GNU Lesser
-General Public License, you may choose any version of the GNU Lesser
-General Public License ever published by the Free Software Foundation.
-
-  If the Library as you received it specifies that a proxy can decide
-whether future versions of the GNU Lesser General Public License shall
-apply, that proxy's public statement of acceptance of any version is
-permanent authorization for you to choose that version for the
-Library.
+MIT License
+
+Copyright (c) 2019 Coldzer0
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.

+ 2 - 3
OpenGL3/OpenGl3.Loader.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 unit OpenGl3.Loader;
 unit OpenGl3.Loader;

+ 8 - 4
demo/ImGuiDemo.dpr

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 Program ImGuiDemo;
 Program ImGuiDemo;
@@ -45,13 +44,14 @@ Uses
   PasImGui.SDL2,
   PasImGui.SDL2,
   CImGui.Impl.OpenGL3,
   CImGui.Impl.OpenGL3,
   imgui_extra,
   imgui_extra,
-  TestWindow;
+  TestWindow, CustomNodeGraph;
 
 
 Var
 Var
   counter: Integer;
   counter: Integer;
   showPascalDemoWindow: Boolean = False;
   showPascalDemoWindow: Boolean = False;
   showAnotherWindow: Boolean = False;
   showAnotherWindow: Boolean = False;
   showDemoWindow: Boolean = False;
   showDemoWindow: Boolean = False;
+  showNodeWindow: Boolean = False;
   clearColor: ImVec4;
   clearColor: ImVec4;
   float_value: Single;
   float_value: Single;
 
 
@@ -151,6 +151,8 @@ Var
       ImGui.Checkbox('Demo window', @showDemoWindow);
       ImGui.Checkbox('Demo window', @showDemoWindow);
       ImGui.Checkbox('Another Pascal window', @showAnotherWindow);
       ImGui.Checkbox('Another Pascal window', @showAnotherWindow);
       ImGui.Checkbox('Pascal Demo Window', @showPascalDemoWindow);
       ImGui.Checkbox('Pascal Demo Window', @showPascalDemoWindow);
+      ImGui.Checkbox('Pascal Node Window', @showNodeWindow);
+
 
 
       ImGui.SliderFloat('Float', @float_value, 0.0, 1.0, '%.3f', ImGuiSliderFlags_None);
       ImGui.SliderFloat('Float', @float_value, 0.0, 1.0, '%.3f', ImGuiSliderFlags_None);
       ImGui.ColorEdit3('Background color', @clearColor, ImGuiColorEditFlags_None);
       ImGui.ColorEdit3('Background color', @clearColor, ImGuiColorEditFlags_None);
@@ -362,6 +364,8 @@ Begin
     // Main UI Code
     // Main UI Code
     Begin
     Begin
       RenderPascalCode();
       RenderPascalCode();
+      if showNodeWindow then
+        ShowExampleAppCustomNodeGraph(@showNodeWindow);
       If showPascalDemoWindow Then
       If showPascalDemoWindow Then
         testwin.Show(showPascalDemoWindow);
         testwin.Show(showPascalDemoWindow);
     End;
     End;

+ 1 - 1
demo/ImGuiDemo.dproj

@@ -3,7 +3,7 @@
         <ProjectGuid>{B77F45C3-3CEB-4E07-9F00-8AFFDA8F2C9C}</ProjectGuid>
         <ProjectGuid>{B77F45C3-3CEB-4E07-9F00-8AFFDA8F2C9C}</ProjectGuid>
         <MainSource>ImGuiDemo.dpr</MainSource>
         <MainSource>ImGuiDemo.dpr</MainSource>
         <Base>True</Base>
         <Base>True</Base>
-        <Config Condition="'$(Config)'==''">Release</Config>
+        <Config Condition="'$(Config)'==''">Debug</Config>
         <TargetedPlatforms>660611</TargetedPlatforms>
         <TargetedPlatforms>660611</TargetedPlatforms>
         <AppType>Console</AppType>
         <AppType>Console</AppType>
         <FrameworkType>None</FrameworkType>
         <FrameworkType>None</FrameworkType>

+ 5 - 1
demo/ImGuiDemo.lpi

@@ -134,7 +134,7 @@
         <Mode0 Name="default"/>
         <Mode0 Name="default"/>
       </Modes>
       </Modes>
     </RunParams>
     </RunParams>
-    <Units Count="5">
+    <Units Count="6">
       <Unit0>
       <Unit0>
         <Filename Value="ImGuiDemo.dpr"/>
         <Filename Value="ImGuiDemo.dpr"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
@@ -156,6 +156,10 @@
         <Filename Value="..\OpenGL3\OpenGl3.Loader.pas"/>
         <Filename Value="..\OpenGL3\OpenGl3.Loader.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
       </Unit4>
       </Unit4>
+      <Unit5>
+        <Filename Value="CustomNodeGraph.pas"/>
+        <IsPartOfProject Value="True"/>
+      </Unit5>
     </Units>
     </Units>
   </ProjectOptions>
   </ProjectOptions>
   <CompilerOptions>
   <CompilerOptions>

+ 136 - 122
demo/ImGuiDemo.lps

@@ -4,12 +4,12 @@
     <PathDelim Value="\"/>
     <PathDelim Value="\"/>
     <Version Value="12"/>
     <Version Value="12"/>
     <BuildModes Active="Debug_windows"/>
     <BuildModes Active="Debug_windows"/>
-    <Units Count="51">
+    <Units Count="55">
       <Unit0>
       <Unit0>
         <Filename Value="ImGuiDemo.dpr"/>
         <Filename Value="ImGuiDemo.dpr"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <IsVisibleTab Value="True"/>
         <IsVisibleTab Value="True"/>
-        <CursorPos X="52" Y="14"/>
+        <CursorPos X="2" Y="13"/>
         <UsageCount Value="200"/>
         <UsageCount Value="200"/>
         <Loaded Value="True"/>
         <Loaded Value="True"/>
       </Unit0>
       </Unit0>
@@ -18,15 +18,14 @@
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <UnitName Value="TestWindow"/>
         <UnitName Value="TestWindow"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <TopLine Value="72"/>
-        <CursorPos X="15" Y="87"/>
+        <CursorPos X="17" Y="3"/>
         <UsageCount Value="200"/>
         <UsageCount Value="200"/>
       </Unit1>
       </Unit1>
       <Unit2>
       <Unit2>
         <Filename Value="imgui_extra.pas"/>
         <Filename Value="imgui_extra.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <CursorPos X="2" Y="14"/>
+        <CursorPos X="2" Y="13"/>
         <UsageCount Value="200"/>
         <UsageCount Value="200"/>
       </Unit2>
       </Unit2>
       <Unit3>
       <Unit3>
@@ -41,331 +40,346 @@
         <Filename Value="..\OpenGL3\OpenGl3.Loader.pas"/>
         <Filename Value="..\OpenGL3\OpenGl3.Loader.pas"/>
         <IsPartOfProject Value="True"/>
         <IsPartOfProject Value="True"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
+        <CursorPos X="2" Y="13"/>
         <UsageCount Value="204"/>
         <UsageCount Value="204"/>
       </Unit4>
       </Unit4>
       <Unit5>
       <Unit5>
+        <Filename Value="CustomNodeGraph.pas"/>
+        <IsPartOfProject Value="True"/>
+        <EditorIndex Value="-1"/>
+        <UsageCount Value="24"/>
+      </Unit5>
+      <Unit6>
         <Filename Value="display.pas"/>
         <Filename Value="display.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="135"/>
         <TopLine Value="135"/>
         <CursorPos X="10" Y="143"/>
         <CursorPos X="10" Y="143"/>
         <UsageCount Value="194"/>
         <UsageCount Value="194"/>
-      </Unit5>
-      <Unit6>
+      </Unit6>
+      <Unit7>
         <Filename Value="sdl2.pas"/>
         <Filename Value="sdl2.pas"/>
         <UnitName Value="SDL2"/>
         <UnitName Value="SDL2"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="9926"/>
         <TopLine Value="9926"/>
         <CursorPos X="30" Y="9944"/>
         <CursorPos X="30" Y="9944"/>
         <UsageCount Value="194"/>
         <UsageCount Value="194"/>
-      </Unit6>
-      <Unit7>
+      </Unit7>
+      <Unit8>
         <Filename Value="..\fpimgui.pas"/>
         <Filename Value="..\fpimgui.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <CursorPos X="16" Y="6"/>
         <CursorPos X="16" Y="6"/>
         <UsageCount Value="194"/>
         <UsageCount Value="194"/>
-      </Unit7>
-      <Unit8>
+      </Unit8>
+      <Unit9>
         <Filename Value="..\examples\fpimgui_impl_sdlgl2.pas"/>
         <Filename Value="..\examples\fpimgui_impl_sdlgl2.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <UsageCount Value="194"/>
         <UsageCount Value="194"/>
-      </Unit8>
-      <Unit9>
+      </Unit9>
+      <Unit10>
         <Filename Value="..\ImGui.Types.pas"/>
         <Filename Value="..\ImGui.Types.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="518"/>
         <TopLine Value="518"/>
         <CursorPos X="23" Y="535"/>
         <CursorPos X="23" Y="535"/>
         <UsageCount Value="194"/>
         <UsageCount Value="194"/>
-      </Unit9>
-      <Unit10>
+      </Unit10>
+      <Unit11>
         <Filename Value="ImGui.Enums.pas"/>
         <Filename Value="ImGui.Enums.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <UsageCount Value="196"/>
         <UsageCount Value="196"/>
-      </Unit10>
-      <Unit11>
+      </Unit11>
+      <Unit12>
         <Filename Value="..\impl\PasImGui.Impl.SDL2.pas"/>
         <Filename Value="..\impl\PasImGui.Impl.SDL2.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <CursorPos X="27" Y="16"/>
         <CursorPos X="27" Y="16"/>
         <UsageCount Value="194"/>
         <UsageCount Value="194"/>
-      </Unit11>
-      <Unit12>
+      </Unit12>
+      <Unit13>
         <Filename Value="..\impl\PasImGui.Impl.OpenGL3.pas"/>
         <Filename Value="..\impl\PasImGui.Impl.OpenGL3.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="36"/>
         <TopLine Value="36"/>
         <CursorPos X="56" Y="45"/>
         <CursorPos X="56" Y="45"/>
         <UsageCount Value="194"/>
         <UsageCount Value="194"/>
-      </Unit12>
-      <Unit13>
+      </Unit13>
+      <Unit14>
         <Filename Value="..\PasImGui.Gen.Types.pas"/>
         <Filename Value="..\PasImGui.Gen.Types.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="163"/>
         <TopLine Value="163"/>
         <CursorPos Y="177"/>
         <CursorPos Y="177"/>
         <UsageCount Value="199"/>
         <UsageCount Value="199"/>
-      </Unit13>
-      <Unit14>
+      </Unit14>
+      <Unit15>
         <Filename Value="..\PasImGui.SDL2.pas"/>
         <Filename Value="..\PasImGui.SDL2.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="114"/>
         <TopLine Value="114"/>
         <CursorPos X="52" Y="143"/>
         <CursorPos X="52" Y="143"/>
         <UsageCount Value="160"/>
         <UsageCount Value="160"/>
-      </Unit14>
-      <Unit15>
+      </Unit15>
+      <Unit16>
         <Filename Value="..\PasImGui.Apis.pas"/>
         <Filename Value="..\PasImGui.Apis.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="106"/>
         <TopLine Value="106"/>
         <CursorPos X="31" Y="122"/>
         <CursorPos X="31" Y="122"/>
         <UsageCount Value="102"/>
         <UsageCount Value="102"/>
-      </Unit15>
-      <Unit16>
+      </Unit16>
+      <Unit17>
         <Filename Value="..\PasImGui.Types.pas"/>
         <Filename Value="..\PasImGui.Types.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="30"/>
         <TopLine Value="30"/>
         <CursorPos X="24" Y="40"/>
         <CursorPos X="24" Y="40"/>
         <UsageCount Value="101"/>
         <UsageCount Value="101"/>
-      </Unit16>
-      <Unit17>
+      </Unit17>
+      <Unit18>
         <Filename Value="..\PasImGui.Enums.pas"/>
         <Filename Value="..\PasImGui.Enums.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="703"/>
         <TopLine Value="703"/>
         <CursorPos X="40" Y="729"/>
         <CursorPos X="40" Y="729"/>
         <UsageCount Value="96"/>
         <UsageCount Value="96"/>
-      </Unit17>
-      <Unit18>
+      </Unit18>
+      <Unit19>
         <Filename Value="..\PasImGui.pas"/>
         <Filename Value="..\PasImGui.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="42"/>
         <TopLine Value="42"/>
         <CursorPos X="20" Y="58"/>
         <CursorPos X="20" Y="58"/>
         <UsageCount Value="94"/>
         <UsageCount Value="94"/>
-      </Unit18>
-      <Unit19>
+      </Unit19>
+      <Unit20>
         <Filename Value="..\..\PasGen\PasImGui.Apis.pas"/>
         <Filename Value="..\..\PasGen\PasImGui.Apis.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="1423"/>
         <TopLine Value="1423"/>
         <CursorPos X="7" Y="1515"/>
         <CursorPos X="7" Y="1515"/>
         <UsageCount Value="10"/>
         <UsageCount Value="10"/>
-      </Unit19>
-      <Unit20>
+      </Unit20>
+      <Unit21>
         <Filename Value="..\..\PasGen\Full.pas"/>
         <Filename Value="..\..\PasGen\Full.pas"/>
         <UnitName Value="PasImGui.Types"/>
         <UnitName Value="PasImGui.Types"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="709"/>
         <TopLine Value="709"/>
         <CursorPos X="23" Y="722"/>
         <CursorPos X="23" Y="722"/>
         <UsageCount Value="10"/>
         <UsageCount Value="10"/>
-      </Unit20>
-      <Unit21>
+      </Unit21>
+      <Unit22>
         <Filename Value="..\..\PasGen\PasImGui.Enums.pas"/>
         <Filename Value="..\..\PasGen\PasImGui.Enums.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <TopLine Value="1461"/>
-        <CursorPos Y="1487"/>
+        <TopLine Value="1132"/>
+        <CursorPos Y="1167"/>
         <UsageCount Value="10"/>
         <UsageCount Value="10"/>
-      </Unit21>
-      <Unit22>
+      </Unit22>
+      <Unit23>
         <Filename Value="F:\FPCross\fpcsrc\rtl\win\wininc\base.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\win\wininc\base.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="135"/>
         <TopLine Value="135"/>
         <CursorPos X="6" Y="150"/>
         <CursorPos X="6" Y="150"/>
         <UsageCount Value="20"/>
         <UsageCount Value="20"/>
-      </Unit22>
-      <Unit23>
+      </Unit23>
+      <Unit24>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\systemh.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\systemh.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="517"/>
         <TopLine Value="517"/>
         <CursorPos X="3" Y="530"/>
         <CursorPos X="3" Y="530"/>
         <UsageCount Value="4"/>
         <UsageCount Value="4"/>
-      </Unit23>
-      <Unit24>
+      </Unit24>
+      <Unit25>
         <Filename Value="F:\FPCross\fpcsrc\rtl\win\wininc\defines.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\win\wininc\defines.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="3011"/>
         <TopLine Value="3011"/>
         <CursorPos X="6" Y="3021"/>
         <CursorPos X="6" Y="3021"/>
         <UsageCount Value="3"/>
         <UsageCount Value="3"/>
-      </Unit24>
-      <Unit25>
+      </Unit25>
+      <Unit26>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\resh.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\resh.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="48"/>
         <TopLine Value="48"/>
         <CursorPos X="10" Y="64"/>
         <CursorPos X="10" Y="64"/>
         <UsageCount Value="7"/>
         <UsageCount Value="7"/>
-      </Unit25>
-      <Unit26>
+      </Unit26>
+      <Unit27>
         <Filename Value="..\SDL2-for-Pascal\units\sdlkeycode.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlkeycode.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="17"/>
         <TopLine Value="17"/>
         <CursorPos X="37" Y="37"/>
         <CursorPos X="37" Y="37"/>
         <UsageCount Value="8"/>
         <UsageCount Value="8"/>
-      </Unit26>
-      <Unit27>
+      </Unit27>
+      <Unit28>
         <Filename Value="..\SDL2-for-Pascal\units\sdlsyswm.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlsyswm.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="224"/>
         <TopLine Value="224"/>
         <CursorPos X="4" Y="240"/>
         <CursorPos X="4" Y="240"/>
         <UsageCount Value="20"/>
         <UsageCount Value="20"/>
-      </Unit27>
-      <Unit28>
+      </Unit28>
+      <Unit29>
         <Filename Value="..\SDL2-for-Pascal\units\sdlversion.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlversion.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="20"/>
         <TopLine Value="20"/>
         <CursorPos X="3" Y="34"/>
         <CursorPos X="3" Y="34"/>
         <UsageCount Value="19"/>
         <UsageCount Value="19"/>
-      </Unit28>
-      <Unit29>
+      </Unit29>
+      <Unit30>
         <Filename Value="..\SDL2-for-Pascal\units\sdl2.pas"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdl2.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="186"/>
         <TopLine Value="186"/>
         <CursorPos X="10" Y="202"/>
         <CursorPos X="10" Y="202"/>
         <UsageCount Value="21"/>
         <UsageCount Value="21"/>
-      </Unit29>
-      <Unit30>
+      </Unit30>
+      <Unit31>
         <Filename Value="..\SDL2-for-Pascal\units\sdlvideo.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlvideo.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="1333"/>
         <TopLine Value="1333"/>
         <CursorPos X="10" Y="1348"/>
         <CursorPos X="10" Y="1348"/>
         <UsageCount Value="5"/>
         <UsageCount Value="5"/>
-      </Unit30>
-      <Unit31>
+      </Unit31>
+      <Unit32>
         <Filename Value="..\SDL2-for-Pascal\units\sdllog.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdllog.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="76"/>
         <TopLine Value="76"/>
         <CursorPos Y="97"/>
         <CursorPos Y="97"/>
         <UsageCount Value="10"/>
         <UsageCount Value="10"/>
-      </Unit31>
-      <Unit32>
+      </Unit32>
+      <Unit33>
         <Filename Value="..\SDL2-for-Pascal\units\sdlerror.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlerror.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <CursorPos X="10" Y="30"/>
         <CursorPos X="10" Y="30"/>
         <UsageCount Value="3"/>
         <UsageCount Value="3"/>
-      </Unit32>
-      <Unit33>
+      </Unit33>
+      <Unit34>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\currh.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\currh.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <CursorPos X="14" Y="22"/>
         <CursorPos X="14" Y="22"/>
         <UsageCount Value="3"/>
         <UsageCount Value="3"/>
-      </Unit33>
-      <Unit34>
+      </Unit34>
+      <Unit35>
         <Filename Value="..\SDL2-for-Pascal\units\sdlmessagebox.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlmessagebox.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="92"/>
         <TopLine Value="92"/>
         <CursorPos X="10" Y="107"/>
         <CursorPos X="10" Y="107"/>
         <UsageCount Value="4"/>
         <UsageCount Value="4"/>
-      </Unit34>
-      <Unit35>
-        <Filename Value="..\impl\CImGui.Impl.OpenGL3.pas"/>
-        <EditorIndex Value="-1"/>
-        <UsageCount Value="9"/>
       </Unit35>
       </Unit35>
       <Unit36>
       <Unit36>
-        <Filename Value="..\impl\PasImGui.SDL2.pas"/>
+        <Filename Value="..\impl\CImGui.Impl.OpenGL3.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <TopLine Value="727"/>
-        <CursorPos X="14" Y="749"/>
-        <UsageCount Value="16"/>
+        <CursorPos X="51" Y="13"/>
+        <UsageCount Value="10"/>
       </Unit36>
       </Unit36>
       <Unit37>
       <Unit37>
-        <Filename Value="..\impl\CImGui.Impl.SDL2.pas"/>
+        <Filename Value="..\impl\PasImGui.SDL2.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <CursorPos X="2" Y="14"/>
-        <UsageCount Value="8"/>
+        <CursorPos X="2" Y="13"/>
+        <UsageCount Value="16"/>
       </Unit37>
       </Unit37>
       <Unit38>
       <Unit38>
+        <Filename Value="..\impl\CImGui.Impl.SDL2.pas"/>
+        <EditorIndex Value="-1"/>
+        <CursorPos X="2" Y="13"/>
+        <UsageCount Value="10"/>
+      </Unit38>
+      <Unit39>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\dynlibs.pas"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\dynlibs.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="17"/>
         <TopLine Value="17"/>
         <CursorPos X="3" Y="30"/>
         <CursorPos X="3" Y="30"/>
         <UsageCount Value="8"/>
         <UsageCount Value="8"/>
-      </Unit38>
-      <Unit39>
+      </Unit39>
+      <Unit40>
         <Filename Value="F:\FPCross\fpcsrc\rtl\unix\sysdlh.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\unix\sysdlh.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <CursorPos X="3" Y="28"/>
         <CursorPos X="3" Y="28"/>
         <UsageCount Value="8"/>
         <UsageCount Value="8"/>
-      </Unit39>
-      <Unit40>
+      </Unit40>
+      <Unit41>
         <Filename Value="F:\FPCross\fpcsrc\rtl\win\sysdlh.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\win\sysdlh.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <CursorPos X="3" Y="23"/>
         <CursorPos X="3" Y="23"/>
         <UsageCount Value="4"/>
         <UsageCount Value="4"/>
-      </Unit40>
-      <Unit41>
+      </Unit41>
+      <Unit42>
         <Filename Value="F:\FPCross\fpcsrc\rtl\objpas\math.pp"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\objpas\math.pp"/>
         <UnitName Value="Math"/>
         <UnitName Value="Math"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="845"/>
         <TopLine Value="845"/>
         <CursorPos X="3" Y="861"/>
         <CursorPos X="3" Y="861"/>
         <UsageCount Value="5"/>
         <UsageCount Value="5"/>
-      </Unit41>
-      <Unit42>
+      </Unit42>
+      <Unit43>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\mathh.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\mathh.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="54"/>
         <TopLine Value="54"/>
         <CursorPos X="45" Y="70"/>
         <CursorPos X="45" Y="70"/>
         <UsageCount Value="5"/>
         <UsageCount Value="5"/>
-      </Unit42>
-      <Unit43>
-        <Filename Value="..\src\PasImGui.Types.pas"/>
-        <EditorIndex Value="-1"/>
-        <TopLine Value="1535"/>
-        <CursorPos X="44" Y="1556"/>
-        <UsageCount Value="17"/>
       </Unit43>
       </Unit43>
       <Unit44>
       <Unit44>
-        <Filename Value="..\src\PasImGui.Apis.pas"/>
+        <Filename Value="..\src\PasImGui.Types.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <TopLine Value="129"/>
-        <CursorPos X="156" Y="145"/>
-        <UsageCount Value="8"/>
+        <CursorPos X="2" Y="13"/>
+        <UsageCount Value="19"/>
       </Unit44>
       </Unit44>
       <Unit45>
       <Unit45>
-        <Filename Value="..\src\PasImGui.Enums.pas"/>
+        <Filename Value="..\src\PasImGui.Apis.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <TopLine Value="1134"/>
-        <CursorPos X="55" Y="1150"/>
-        <UsageCount Value="22"/>
+        <CursorPos X="2" Y="13"/>
+        <UsageCount Value="10"/>
       </Unit45>
       </Unit45>
       <Unit46>
       <Unit46>
-        <Filename Value="..\src\PasImGui.pas"/>
+        <Filename Value="..\src\PasImGui.Enums.pas"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
-        <TopLine Value="202"/>
-        <CursorPos X="21" Y="217"/>
-        <UsageCount Value="13"/>
+        <CursorPos X="2" Y="13"/>
+        <UsageCount Value="24"/>
       </Unit46>
       </Unit46>
       <Unit47>
       <Unit47>
+        <Filename Value="..\src\PasImGui.pas"/>
+        <EditorIndex Value="-1"/>
+        <CursorPos X="2" Y="13"/>
+        <UsageCount Value="15"/>
+      </Unit47>
+      <Unit48>
         <Filename Value="..\SDL2-for-Pascal\units\sdlevents.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlevents.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="46"/>
         <TopLine Value="46"/>
         <CursorPos X="27" Y="59"/>
         <CursorPos X="27" Y="59"/>
         <UsageCount Value="7"/>
         <UsageCount Value="7"/>
-      </Unit47>
-      <Unit48>
+      </Unit48>
+      <Unit49>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\cmem.pp"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\cmem.pp"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="155"/>
         <TopLine Value="155"/>
         <CursorPos X="16" Y="53"/>
         <CursorPos X="16" Y="53"/>
         <UsageCount Value="7"/>
         <UsageCount Value="7"/>
-      </Unit48>
-      <Unit49>
+      </Unit49>
+      <Unit50>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\heaph.inc"/>
         <Filename Value="F:\FPCross\fpcsrc\rtl\inc\heaph.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="79"/>
         <TopLine Value="79"/>
         <CursorPos X="10" Y="102"/>
         <CursorPos X="10" Y="102"/>
         <UsageCount Value="7"/>
         <UsageCount Value="7"/>
-      </Unit49>
-      <Unit50>
+      </Unit50>
+      <Unit51>
         <Filename Value="..\SDL2-for-Pascal\units\sdlhints.inc"/>
         <Filename Value="..\SDL2-for-Pascal\units\sdlhints.inc"/>
         <EditorIndex Value="-1"/>
         <EditorIndex Value="-1"/>
         <TopLine Value="2410"/>
         <TopLine Value="2410"/>
         <CursorPos Y="2426"/>
         <CursorPos Y="2426"/>
         <UsageCount Value="7"/>
         <UsageCount Value="7"/>
-      </Unit50>
+      </Unit51>
+      <Unit52>
+        <Filename Value="F:\FPCross\fpcsrc\packages\rtl-generics\src\generics.collections.pas"/>
+        <UnitName Value="Generics.Collections"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="1527"/>
+        <CursorPos Y="1541"/>
+        <UsageCount Value="10"/>
+      </Unit52>
+      <Unit53>
+        <Filename Value="F:\FPCross\fpcsrc\packages\rtl-generics\src\generics.defaults.pas"/>
+        <UnitName Value="Generics.Defaults"/>
+        <EditorIndex Value="-1"/>
+        <UsageCount Value="10"/>
+      </Unit53>
+      <Unit54>
+        <Filename Value="F:\FPCross\fpcsrc\packages\rtl-generics\src\generics.helpers.pas"/>
+        <UnitName Value="Generics.Helpers"/>
+        <EditorIndex Value="-1"/>
+        <TopLine Value="28"/>
+        <UsageCount Value="10"/>
+      </Unit54>
     </Units>
     </Units>
-    <JumpHistory Count="2" HistoryIndex="1">
-      <Position1>
-        <Filename Value="ImGuiDemo.dpr"/>
-        <Caret Line="273" Column="9" TopLine="254"/>
-      </Position1>
-      <Position2>
-        <Filename Value="ImGuiDemo.dpr"/>
-        <Caret Line="281" Column="22" TopLine="260"/>
-      </Position2>
-    </JumpHistory>
+    <JumpHistory HistoryIndex="-1"/>
     <RunParams>
     <RunParams>
       <FormatVersion Value="2"/>
       <FormatVersion Value="2"/>
       <Modes ActiveMode="default"/>
       <Modes ActiveMode="default"/>
@@ -378,7 +392,7 @@
         <WatchScope Value="wpsLocal"/>
         <WatchScope Value="wpsLocal"/>
         <WatchKind Value="wpkWrite"/>
         <WatchKind Value="wpkWrite"/>
         <Source Value="..\impl\PasImGui.SDL2.pas"/>
         <Source Value="..\impl\PasImGui.SDL2.pas"/>
-        <Line Value="1102"/>
+        <Line Value="1101"/>
       </Item>
       </Item>
     </BreakPoints>
     </BreakPoints>
   </Debugging>
   </Debugging>

+ 2 - 3
demo/imgui_extra.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 {
 {
   code from https://github.com/dpethes/imgui-pas
   code from https://github.com/dpethes/imgui-pas

+ 2 - 3
demo/testwindow.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 {
 {

+ 2 - 3
impl/CImGui.Impl.OpenGL3.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 unit CImGui.Impl.OpenGL3;
 unit CImGui.Impl.OpenGL3;

+ 2 - 3
impl/CImGui.Impl.SDL2.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 Unit CImGui.Impl.SDL2;
 Unit CImGui.Impl.SDL2;

+ 2 - 3
impl/PasImGui.SDL2.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 Unit PasImGui.SDL2;
 Unit PasImGui.SDL2;

+ 2 - 3
src/PasImGui.Apis.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 unit PasImGui.Apis;
 unit PasImGui.Apis;

+ 2 - 3
src/PasImGui.Enums.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 unit PasImGui.Enums;
 unit PasImGui.Enums;

+ 48 - 31
src/PasImGui.pas

@@ -4,13 +4,12 @@
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
   Copyright (C) 2023 Coldzer0 <Coldzer0 [at] protonmail.ch>
 
 
   This program is free software: you can redistribute it and/or modify
   This program is free software: you can redistribute it and/or modify
-  it under the terms of the GNU LESSER GENERAL PUBLIC LICENSE as published by
-  the Free Software Foundation, version 3 of the License.
+  it under the terms of the MIT License.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-  GNU LESSER GENERAL PUBLIC LICENSE for more details.
+  MIT License for more details.
 }
 }
 
 
 Unit PasImGui;
 Unit PasImGui;
@@ -114,7 +113,7 @@ Type
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
     Class Procedure End_; {$IfDef INLINE} inline;{$EndIf}
     Class Procedure End_; {$IfDef INLINE} inline;{$EndIf}
     Class Function BeginChild(str_id: AnsiString; size: ImVec2;
     Class Function BeginChild(str_id: AnsiString; size: ImVec2;
-      child_flags: ImGuiChildFlags; extra_flags: ImGuiWindowFlags): Boolean;
+      child_flags: ImGuiChildFlags = ImGuiChildFlags_None; extra_flags: ImGuiWindowFlags = ImGuiWindowFlags_None): Boolean;
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
     Class Function BeginChildEx(id: ImGuiID; size: ImVec2;
     Class Function BeginChildEx(id: ImGuiID; size: ImVec2;
       child_flags: ImGuiChildFlags; extra_flags: ImGuiWindowFlags): Boolean;
       child_flags: ImGuiChildFlags; extra_flags: ImGuiWindowFlags): Boolean;
@@ -128,8 +127,8 @@ Type
     Class Function GetWindowContentRegionMax(): ImVec2; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowContentRegionMax(): ImVec2; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowContentRegionWidth: Single; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowContentRegionWidth: Single; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowDrawList(): PImDrawList; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowDrawList(): PImDrawList; {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure GetWindowPos(out_: PImVec2); {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure GetWindowSize(out_: PImVec2); {$IfDef INLINE} inline;{$EndIf}
+    class function GetWindowPos: ImVec2; {$IfDef INLINE} inline;{$EndIf}
+    class function GetWindowSize: ImVec2; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowWidth(): Single; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowWidth(): Single; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowHeight(): Single; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetWindowHeight(): Single; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsWindowCollapsed(): Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsWindowCollapsed(): Boolean; {$IfDef INLINE} inline;{$EndIf}
@@ -180,12 +179,12 @@ Type
     { Parameters stacks (shared) }
     { Parameters stacks (shared) }
     Class Procedure PushFont(font: PImFont); {$IfDef INLINE} inline;{$EndIf}
     Class Procedure PushFont(font: PImFont); {$IfDef INLINE} inline;{$EndIf}
     Class Procedure PopFont; {$IfDef INLINE} inline;{$EndIf}
     Class Procedure PopFont; {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure PushStyleColor(idx: ImGuiCol; col: ImVec4);
-    {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure PopStyleColor(Count: Longint); {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure PushStyleVar(idx: ImGuiStyleVar; val: Single);
+    Class Procedure PushStyleColor(idx: ImGuiCol; col: ImU32); overload; {$IfDef INLINE} inline;{$EndIf}
+    Class Procedure PushStyleColor(idx: ImGuiCol; col: ImVec4); overload; {$IfDef INLINE} inline;{$EndIf}
+    Class Procedure PopStyleColor(Count: Longint = 1); {$IfDef INLINE} inline;{$EndIf}
+    Class Procedure PushStyleVar(idx: ImGuiStyleVar; val: Single); overload;
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure PushStyleVarVec(idx: ImGuiStyleVar; val: ImVec2);
+    Class Procedure PushStyleVar(idx: ImGuiStyleVar; val: ImVec2); overload;
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
     Class Procedure PopStyleVar(Count: Longint = 1); {$IfDef INLINE} inline;{$EndIf}
     Class Procedure PopStyleVar(Count: Longint = 1); {$IfDef INLINE} inline;{$EndIf}
     Class Function GetFont(): PImFont; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetFont(): PImFont; {$IfDef INLINE} inline;{$EndIf}
@@ -293,7 +292,7 @@ Type
     Class Function Button(_label: AnsiString): Boolean; overload; //overload for default size (0,0)
     Class Function Button(_label: AnsiString): Boolean; overload; //overload for default size (0,0)
     Class Function SmallButton(_label: PAnsiChar): Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function SmallButton(_label: PAnsiChar): Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function InvisibleButton(str_id: PAnsiChar; size: ImVec2;
     Class Function InvisibleButton(str_id: PAnsiChar; size: ImVec2;
-      flags: ImGuiButtonFlags): Boolean; {$IfDef INLINE} inline;{$EndIf}
+      flags: ImGuiButtonFlags = ImGuiButtonFlags_None): Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Procedure Image(user_texture_id: ImTextureID; size: ImVec2;
     Class Procedure Image(user_texture_id: ImTextureID; size: ImVec2;
       uv0: ImVec2; uv1: ImVec2; tint_col: ImVec4; border_col: ImVec4);
       uv0: ImVec2; uv1: ImVec2; tint_col: ImVec4; border_col: ImVec4);
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
@@ -621,9 +620,9 @@ Type
     Class Function IsItemVisible: Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsItemVisible: Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsAnyItemHovered: Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsAnyItemHovered: Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsAnyItemActive: Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsAnyItemActive: Boolean; {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure GetItemRectMin(pOut: PImVec2); {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure GetItemRectMax(pOut: PImVec2); {$IfDef INLINE} inline;{$EndIf}
-    Class Procedure GetItemRectSize(pOut: PImVec2); {$IfDef INLINE} inline;{$EndIf}
+    class function GetItemRectMin: ImVec2; {$IfDef INLINE} inline;{$EndIf}
+    class function GetItemRectMax: ImVec2; {$IfDef INLINE} inline;{$EndIf}
+    class function GetItemRectSize: ImVec2; {$IfDef INLINE} inline;{$EndIf}
     Class Procedure SetNextItemAllowOverlap; {$IfDef INLINE} inline;{$EndIf}
     Class Procedure SetNextItemAllowOverlap; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsWindowFocused(flags: ImGuiFocusedFlags): Boolean;
     Class Function IsWindowFocused(flags: ImGuiFocusedFlags): Boolean;
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
@@ -663,7 +662,7 @@ Type
     Class Function IsMouseDown(_button: ImGuiMouseButton): Boolean;
     Class Function IsMouseDown(_button: ImGuiMouseButton): Boolean;
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
     Class Function IsMouseClicked(_button: ImGuiMouseButton;
     Class Function IsMouseClicked(_button: ImGuiMouseButton;
-      _repeat: Boolean): Boolean; {$IfDef INLINE} inline;{$EndIf}
+      _repeat: Boolean = False): Boolean; {$IfDef INLINE} inline;{$EndIf}
     class function IsMouseDoubleClicked(_button: ImGuiMouseButton): Boolean;overload;
     class function IsMouseDoubleClicked(_button: ImGuiMouseButton): Boolean;overload;
     class function IsMouseDoubleClicked(_button: ImGuiMouseButton; owner_id: ImGuiID): Boolean; overload;
     class function IsMouseDoubleClicked(_button: ImGuiMouseButton; owner_id: ImGuiID): Boolean; overload;
     Class Function IsMouseReleased(_button: ImGuiMouseButton): Boolean;
     Class Function IsMouseReleased(_button: ImGuiMouseButton): Boolean;
@@ -671,7 +670,7 @@ Type
     Class Function IsMouseHoveringRect(r_min: ImVec2; r_max: ImVec2;
     Class Function IsMouseHoveringRect(r_min: ImVec2; r_max: ImVec2;
       clip: Boolean = True): Boolean; {$IfDef INLINE} inline;{$EndIf}
       clip: Boolean = True): Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function IsMouseDragging(_button: ImGuiMouseButton;
     Class Function IsMouseDragging(_button: ImGuiMouseButton;
-      lock_threshold: Single): Boolean; {$IfDef INLINE} inline;{$EndIf}
+      lock_threshold: Single = -1.0): Boolean; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetMousePos: ImVec2; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetMousePos: ImVec2; {$IfDef INLINE} inline;{$EndIf}
     Class Function GetMousePosOnOpeningCurrentPopup: ImVec2;
     Class Function GetMousePosOnOpeningCurrentPopup: ImVec2;
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
@@ -723,7 +722,7 @@ Type
     Procedure PopTextureID(); {$IfDef INLINE} inline;{$EndIf}
     Procedure PopTextureID(); {$IfDef INLINE} inline;{$EndIf}
 
 
     { Primitives }
     { Primitives }
-    procedure AddLine(p1: ImVec2; p2: ImVec2; col: ImU32; thickness: Single);
+    procedure AddLine(p1: ImVec2; p2: ImVec2; col: ImU32; thickness: Single = 1.0);
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
     Procedure AddRect(a: ImVec2; b: ImVec2; col: ImU32; rounding: Single = 0;
     Procedure AddRect(a: ImVec2; b: ImVec2; col: ImU32; rounding: Single = 0;
       rounding_corners_flags: ImDrawFlags = ImDrawFlags_Closed;
       rounding_corners_flags: ImDrawFlags = ImDrawFlags_Closed;
@@ -747,7 +746,7 @@ Type
     Procedure AddCircle(centre: ImVec2; radius: Single; col: ImU32;
     Procedure AddCircle(centre: ImVec2; radius: Single; col: ImU32;
       num_segments: Longint; thickness: Single); {$IfDef INLINE} inline;{$EndIf}
       num_segments: Longint; thickness: Single); {$IfDef INLINE} inline;{$EndIf}
     Procedure AddCircleFilled(centre: ImVec2; radius: Single; col: ImU32;
     Procedure AddCircleFilled(centre: ImVec2; radius: Single; col: ImU32;
-      num_segments: Longint); {$IfDef INLINE} inline;{$EndIf}
+      num_segments: Longint = 0); {$IfDef INLINE} inline;{$EndIf}
     Procedure AddText(pos: ImVec2; col: ImU32; text_begin: PAnsiChar; text_end: PAnsiChar);
     Procedure AddText(pos: ImVec2; col: ImU32; text_begin: PAnsiChar; text_end: PAnsiChar);
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
     Procedure AddTextExt(font: ImFont; font_size: Single; pos: ImVec2;
     Procedure AddTextExt(font: ImFont; font_size: Single; pos: ImVec2;
@@ -763,7 +762,7 @@ Type
     Procedure AddConvexPolyFilled(points: PImVec2; num_points: Integer; col: ImU32);
     Procedure AddConvexPolyFilled(points: PImVec2; num_points: Integer; col: ImU32);
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
     Procedure AddBezierCubic(p1: ImVec2; p2: ImVec2; p3: ImVec2;
     Procedure AddBezierCubic(p1: ImVec2; p2: ImVec2; p3: ImVec2;
-      p4: ImVec2; col: ImU32; thickness: Single; num_segments: Integer);
+      p4: ImVec2; col: ImU32; thickness: Single; num_segments: Integer = 0);
     {$IfDef INLINE} inline;{$EndIf}
     {$IfDef INLINE} inline;{$EndIf}
 
 
     { Stateful path API, add points then finish with PathFill() or PathStroke() }
     { Stateful path API, add points then finish with PathFill() or PathStroke() }
@@ -814,8 +813,15 @@ Type
 { ImGuiPlatformMonitor }
 { ImGuiPlatformMonitor }
 Function ImGuiPlatformMonitor_Create(): PImGuiPlatformMonitor;
 Function ImGuiPlatformMonitor_Create(): PImGuiPlatformMonitor;
 
 
+function IM_COL32(R,G,B,A : ImU32): ImU32;
+
 Implementation
 Implementation
 
 
+function IM_COL32(R,G,B,A : ImU32): ImU32;
+begin
+  Result := (A shl IM_COL32_A_SHIFT) or (B shl IM_COL32_B_SHIFT) or (G shl IM_COL32_G_SHIFT) or (R shl IM_COL32_R_SHIFT);
+end;
+
 Function ImGuiPlatformMonitor_Create(): PImGuiPlatformMonitor;
 Function ImGuiPlatformMonitor_Create(): PImGuiPlatformMonitor;
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
@@ -1302,25 +1308,25 @@ Begin
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
-class procedure ImGui.GetWindowPos(out_: PImVec2);
+class function ImGui.GetWindowPos(): ImVec2;
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
   saved: Cardinal;
   saved: Cardinal;
 {$ENDIF}
 {$ENDIF}
 Begin
 Begin
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
-  igGetWindowPos(out_);
+  igGetWindowPos(@Result);
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
-class procedure ImGui.GetWindowSize(out_: PImVec2);
+class function ImGui.GetWindowSize() : ImVec2;
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
   saved: Cardinal;
   saved: Cardinal;
 {$ENDIF}
 {$ENDIF}
 Begin
 Begin
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
-  igGetWindowSize(out_);
+  igGetWindowSize(@Result);
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
@@ -1680,6 +1686,17 @@ Begin
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
+class procedure ImGui.PushStyleColor(idx: ImGuiCol; col: ImU32);
+{$IFDEF FPC}
+Var
+  saved: Cardinal;
+{$ENDIF}
+Begin
+  {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
+  igPushStyleColor_U32(idx, col);
+  {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
+End;
+
 class procedure ImGui.PushStyleColor(idx: ImGuiCol; col: ImVec4);
 class procedure ImGui.PushStyleColor(idx: ImGuiCol; col: ImVec4);
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
@@ -1713,7 +1730,7 @@ Begin
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
-class procedure ImGui.PushStyleVarVec(idx: ImGuiStyleVar; val: ImVec2);
+class procedure ImGui.PushStyleVar(idx: ImGuiStyleVar; val: ImVec2);
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
   saved: Cardinal;
   saved: Cardinal;
@@ -3874,36 +3891,36 @@ Begin
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
-class procedure ImGui.GetItemRectMin(pOut: PImVec2);
+class function ImGui.GetItemRectMin() : ImVec2;
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
   saved: Cardinal;
   saved: Cardinal;
 {$ENDIF}
 {$ENDIF}
 Begin
 Begin
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
-  igGetItemRectMin(pOut);
+  igGetItemRectMin(@Result);
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
-class procedure ImGui.GetItemRectMax(pOut: PImVec2);
+class function ImGui.GetItemRectMax() : ImVec2;
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
   saved: Cardinal;
   saved: Cardinal;
 {$ENDIF}
 {$ENDIF}
 Begin
 Begin
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
-  igGetItemRectMax(pOut);
+  igGetItemRectMax(@Result);
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;
 
 
-class procedure ImGui.GetItemRectSize(pOut: PImVec2);
+class function ImGui.GetItemRectSize() : ImVec2;
 {$IFDEF FPC}
 {$IFDEF FPC}
 Var
 Var
   saved: Cardinal;
   saved: Cardinal;
 {$ENDIF}
 {$ENDIF}
 Begin
 Begin
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
   {$IFDEF FPC}saved := SetFpuFlags();{$ENDIF}
-  igGetItemRectSize(pOut);
+  igGetItemRectSize(@Result);
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
   {$IFDEF FPC}ResetFpuFlags(saved);{$ENDIF}
 End;
 End;