Sfoglia il codice sorgente

Old Control Removal

I removed a few controls that had outlived their usefulness. More will follow someday.
Peter Robinson 5 anni fa
parent
commit
7dbce66958
31 ha cambiato i file con 273 aggiunte e 3062 eliminazioni
  1. 0 0
      engine/Link/Debug/libogg/libogg.vcxproj.FileListAbsolute.txt
  2. 0 0
      engine/Link/Debug/libvorbis/libvorbis.vcxproj.FileListAbsolute.txt
  3. 0 0
      engine/Link/Debug/ljpeg/ljpeg.vcxproj.FileListAbsolute.txt
  4. 0 0
      engine/Link/Debug/lpng/lpng.vcxproj.FileListAbsolute.txt
  5. 0 0
      engine/Link/Debug/zlib/zlib.vcxproj.FileListAbsolute.txt
  6. 0 0
      engine/Link/VC2012.Debug.Win32/Torque2D/Torque 2D.vcxproj.FileListAbsolute.txt
  7. BIN
      engine/compilers/VisualStudio 2017/.vs/Torque 2D/v15/Browse.VC.db
  8. 2 17
      engine/compilers/VisualStudio 2017/Torque 2D.vcxproj
  9. 12 57
      engine/compilers/VisualStudio 2017/Torque 2D.vcxproj.filters
  10. 0 1069
      engine/source/gui/containers/guiFrameCtrl.cc
  11. 0 189
      engine/source/gui/containers/guiFrameCtrl.h
  12. 9 9
      engine/source/gui/containers/guiRolloutCtrl.cc
  13. 0 4
      engine/source/gui/containers/guiRolloutCtrl.h
  14. 0 325
      engine/source/gui/containers/guiStackCtrl.cc
  15. 0 93
      engine/source/gui/containers/guiStackCtrl.h
  16. 1 1
      engine/source/gui/containers/guiTabBookCtrl.h
  17. 180 180
      engine/source/gui/containers/guiTabPageCtrl.cc
  18. 57 61
      engine/source/gui/containers/guiTabPageCtrl.h
  19. 0 288
      engine/source/gui/editor/guiImageList.cc
  20. 0 97
      engine/source/gui/editor/guiImageList.h
  21. 5 6
      engine/source/gui/editor/guiInspector.cc
  22. 7 7
      engine/source/gui/editor/guiInspector.h
  23. 0 111
      engine/source/gui/editor/guiSeparatorCtrl.cc
  24. 0 57
      engine/source/gui/editor/guiSeparatorCtrl.h
  25. 0 44
      engine/source/gui/guiBackgroundCtrl.cc
  26. 0 46
      engine/source/gui/guiBackgroundCtrl.h
  27. 0 137
      engine/source/gui/guiBitmapBorderCtrl.cc
  28. 0 186
      engine/source/gui/guiConsoleTextCtrl.cc
  29. 0 72
      engine/source/gui/guiConsoleTextCtrl.h
  30. 0 3
      engine/source/gui/guiPopUpCtrl.h
  31. 0 3
      engine/source/gui/guiPopUpCtrlEx.h

+ 0 - 0
engine/Link/Debug/libogg/libogg.vcxproj.FileListAbsolute.txt


+ 0 - 0
engine/Link/Debug/libvorbis/libvorbis.vcxproj.FileListAbsolute.txt


+ 0 - 0
engine/Link/Debug/ljpeg/ljpeg.vcxproj.FileListAbsolute.txt


+ 0 - 0
engine/Link/Debug/lpng/lpng.vcxproj.FileListAbsolute.txt


+ 0 - 0
engine/Link/Debug/zlib/zlib.vcxproj.FileListAbsolute.txt


+ 0 - 0
engine/Link/VC2012.Debug.Win32/Torque2D/Torque 2D.vcxproj.FileListAbsolute.txt


BIN
engine/compilers/VisualStudio 2017/.vs/Torque 2D/v15/Browse.VC.db


+ 2 - 17
engine/compilers/VisualStudio 2017/Torque 2D.vcxproj

@@ -384,16 +384,14 @@
     <ClCompile Include="..\..\source\graphics\TextureHandle.cc" />
     <ClCompile Include="..\..\source\graphics\TextureManager.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiGridCtrl.cc" />
+    <ClCompile Include="..\..\source\gui\containers\guiTabPageCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiArrayCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\guiBackgroundCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\guiBitmapBorderCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiBitmapCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiBubbleTextCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiCanvas.cc" />
     <ClCompile Include="..\..\source\gui\guiColorPicker.cc" />
     <ClCompile Include="..\..\source\gui\guiConsole.cc" />
     <ClCompile Include="..\..\source\gui\guiConsoleEditCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\guiConsoleTextCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiControl.cc" />
     <ClCompile Include="..\..\source\gui\guiDefaultControlRender.cc" />
     <ClCompile Include="..\..\source\gui\guiFadeinBitmapCtrl.cc" />
@@ -406,9 +404,7 @@
     <ClCompile Include="..\..\source\gui\guiPopUpCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiPopUpCtrlEx.cc" />
     <ClCompile Include="..\..\source\gui\guiProgressCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\guiScriptNotifyControl.cc" />
     <ClCompile Include="..\..\source\gui\guiSliderCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\guiTabPageCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiTextCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiTextEditCtrl.cc" />
     <ClCompile Include="..\..\source\gui\guiTextEditSliderCtrl.cc" />
@@ -624,11 +620,9 @@
     <ClCompile Include="..\..\source\gui\containers\guiAutoScrollCtrl.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiDragAndDropCtrl.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiFormCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\containers\guiFrameCtrl.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiPaneCtrl.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiRolloutCtrl.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiScrollCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\containers\guiStackCtrl.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiTabBookCtrl.cc" />
     <ClCompile Include="..\..\source\gui\containers\guiWindowCtrl.cc" />
     <ClCompile Include="..\..\source\gui\editor\guiControlListPopup.cc" />
@@ -636,11 +630,9 @@
     <ClCompile Include="..\..\source\gui\editor\guiEditCtrl.cc" />
     <ClCompile Include="..\..\source\gui\editor\guiFilterCtrl.cc" />
     <ClCompile Include="..\..\source\gui\editor\guiGraphCtrl.cc" />
-    <ClCompile Include="..\..\source\gui\editor\guiImageList.cc" />
     <ClCompile Include="..\..\source\gui\editor\guiInspector.cc" />
     <ClCompile Include="..\..\source\gui\editor\guiInspectorTypes.cc" />
     <ClCompile Include="..\..\source\gui\editor\guiMenuBar.cc" />
-    <ClCompile Include="..\..\source\gui\editor\guiSeparatorCtrl.cc" />
     <ClCompile Include="..\..\source\testing\tests\platformFileIoTests.cc" />
     <ClCompile Include="..\..\source\testing\tests\platformMemoryTests.cc" />
     <ClCompile Include="..\..\source\testing\tests\platformStringTests.cc" />
@@ -890,8 +882,8 @@
     <ClInclude Include="..\..\source\gui\containers\guiGridCtrl_ScriptBinding.h" />
     <ClInclude Include="..\..\source\gui\containers\guiScrollCtrl_ScriptBinding.h" />
     <ClInclude Include="..\..\source\gui\containers\guiTabBookCtrl_ScriptBinding.h" />
+    <ClInclude Include="..\..\source\gui\containers\guiTabPageCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiArrayCtrl.h" />
-    <ClInclude Include="..\..\source\gui\guiBackgroundCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiBitmapCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiBubbleTextCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiCanvas.h" />
@@ -899,7 +891,6 @@
     <ClInclude Include="..\..\source\gui\guiColorPicker.h" />
     <ClInclude Include="..\..\source\gui\guiConsole.h" />
     <ClInclude Include="..\..\source\gui\guiConsoleEditCtrl.h" />
-    <ClInclude Include="..\..\source\gui\guiConsoleTextCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiControl.h" />
     <ClInclude Include="..\..\source\gui\guiControl_ScriptBinding.h" />
     <ClInclude Include="..\..\source\gui\guiDefaultControlRender.h" />
@@ -912,9 +903,7 @@
     <ClInclude Include="..\..\source\gui\guiPopUpCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiPopUpCtrlEx.h" />
     <ClInclude Include="..\..\source\gui\guiProgressCtrl.h" />
-    <ClInclude Include="..\..\source\gui\guiScriptNotifyControl.h" />
     <ClInclude Include="..\..\source\gui\guiSliderCtrl.h" />
-    <ClInclude Include="..\..\source\gui\guiTabPageCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiTextCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiTextEditCtrl.h" />
     <ClInclude Include="..\..\source\gui\guiTextEditSliderCtrl.h" />
@@ -1213,22 +1202,18 @@
     <ClInclude Include="..\..\source\gui\containers\guiAutoScrollCtrl.h" />
     <ClInclude Include="..\..\source\gui\containers\guiDragAndDropCtrl.h" />
     <ClInclude Include="..\..\source\gui\containers\guiFormCtrl.h" />
-    <ClInclude Include="..\..\source\gui\containers\guiFrameCtrl.h" />
     <ClInclude Include="..\..\source\gui\containers\guiPaneCtrl.h" />
     <ClInclude Include="..\..\source\gui\containers\guiRolloutCtrl.h" />
     <ClInclude Include="..\..\source\gui\containers\guiScrollCtrl.h" />
-    <ClInclude Include="..\..\source\gui\containers\guiStackCtrl.h" />
     <ClInclude Include="..\..\source\gui\containers\guiTabBookCtrl.h" />
     <ClInclude Include="..\..\source\gui\containers\guiWindowCtrl.h" />
     <ClInclude Include="..\..\source\gui\editor\guiDebugger.h" />
     <ClInclude Include="..\..\source\gui\editor\guiEditCtrl.h" />
     <ClInclude Include="..\..\source\gui\editor\guiFilterCtrl.h" />
     <ClInclude Include="..\..\source\gui\editor\guiGraphCtrl.h" />
-    <ClInclude Include="..\..\source\gui\editor\guiImageList.h" />
     <ClInclude Include="..\..\source\gui\editor\guiInspector.h" />
     <ClInclude Include="..\..\source\gui\editor\guiInspectorTypes.h" />
     <ClInclude Include="..\..\source\gui\editor\guiMenuBar.h" />
-    <ClInclude Include="..\..\source\gui\editor\guiSeparatorCtrl.h" />
     <ClInclude Include="..\..\source\testing\unitTesting.h" />
     <ClInclude Include="..\..\source\testing\unitTesting_ScriptBinding.h" />
     <ClInclude Include="..\..\source\torqueConfig.h" />

+ 12 - 57
engine/compilers/VisualStudio 2017/Torque 2D.vcxproj.filters

@@ -468,9 +468,6 @@
     <ClCompile Include="..\..\source\gui\containers\guiFormCtrl.cc">
       <Filter>gui\containers</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\containers\guiFrameCtrl.cc">
-      <Filter>gui\containers</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\gui\containers\guiPaneCtrl.cc">
       <Filter>gui\containers</Filter>
     </ClCompile>
@@ -480,9 +477,6 @@
     <ClCompile Include="..\..\source\gui\containers\guiScrollCtrl.cc">
       <Filter>gui\containers</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\containers\guiStackCtrl.cc">
-      <Filter>gui\containers</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\gui\containers\guiTabBookCtrl.cc">
       <Filter>gui\containers</Filter>
     </ClCompile>
@@ -504,9 +498,6 @@
     <ClCompile Include="..\..\source\gui\editor\guiGraphCtrl.cc">
       <Filter>gui\editor</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\editor\guiImageList.cc">
-      <Filter>gui\editor</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\gui\editor\guiInspector.cc">
       <Filter>gui\editor</Filter>
     </ClCompile>
@@ -516,9 +507,6 @@
     <ClCompile Include="..\..\source\gui\editor\guiMenuBar.cc">
       <Filter>gui\editor</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\editor\guiSeparatorCtrl.cc">
-      <Filter>gui\editor</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\Box2D\Collision\b2BroadPhase.cpp">
       <Filter>Box2D\Collision</Filter>
     </ClCompile>
@@ -753,12 +741,6 @@
     <ClCompile Include="..\..\source\gui\guiArrayCtrl.cc">
       <Filter>gui</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\guiBackgroundCtrl.cc">
-      <Filter>gui</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\source\gui\guiBitmapBorderCtrl.cc">
-      <Filter>gui</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\gui\guiBitmapCtrl.cc">
       <Filter>gui</Filter>
     </ClCompile>
@@ -777,9 +759,6 @@
     <ClCompile Include="..\..\source\gui\guiConsoleEditCtrl.cc">
       <Filter>gui</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\guiConsoleTextCtrl.cc">
-      <Filter>gui</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\gui\guiControl.cc">
       <Filter>gui</Filter>
     </ClCompile>
@@ -816,18 +795,9 @@
     <ClCompile Include="..\..\source\gui\guiProgressCtrl.cc">
       <Filter>gui</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\guiScriptNotifyControl.cc">
-      <Filter>gui</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\gui\guiSliderCtrl.cc">
       <Filter>gui</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\source\gui\guiTabPageCtrl.cc">
-      <Filter>gui</Filter>
-    </ClCompile>
-    <ClCompile Include="..\..\source\gui\guiTextCtrl.cc">
-      <Filter>gui</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\source\gui\guiTextEditCtrl.cc">
       <Filter>gui</Filter>
     </ClCompile>
@@ -1408,6 +1378,12 @@
     <ClCompile Include="..\..\source\platform\platformNet.cpp" />
     <ClCompile Include="..\..\source\platform\platformNetAsync.cpp" />
     <ClCompile Include="..\..\source\platform\platformNet_ScriptBinding.cc" />
+    <ClCompile Include="..\..\source\gui\containers\guiTabPageCtrl.cc">
+      <Filter>gui\containers</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\source\gui\guiTextCtrl.cc">
+      <Filter>gui</Filter>
+    </ClCompile>
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="..\..\source\audio\audio.h">
@@ -1698,9 +1674,6 @@
     <ClInclude Include="..\..\source\gui\containers\guiFormCtrl.h">
       <Filter>gui\containers</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\containers\guiFrameCtrl.h">
-      <Filter>gui\containers</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\gui\containers\guiPaneCtrl.h">
       <Filter>gui\containers</Filter>
     </ClInclude>
@@ -1710,9 +1683,6 @@
     <ClInclude Include="..\..\source\gui\containers\guiScrollCtrl.h">
       <Filter>gui\containers</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\containers\guiStackCtrl.h">
-      <Filter>gui\containers</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\gui\containers\guiTabBookCtrl.h">
       <Filter>gui\containers</Filter>
     </ClInclude>
@@ -1731,9 +1701,6 @@
     <ClInclude Include="..\..\source\gui\editor\guiGraphCtrl.h">
       <Filter>gui\editor</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\editor\guiImageList.h">
-      <Filter>gui\editor</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\gui\editor\guiInspector.h">
       <Filter>gui\editor</Filter>
     </ClInclude>
@@ -1743,9 +1710,6 @@
     <ClInclude Include="..\..\source\gui\editor\guiMenuBar.h">
       <Filter>gui\editor</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\editor\guiSeparatorCtrl.h">
-      <Filter>gui\editor</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\Box2D\Box2D.h">
       <Filter>Box2D</Filter>
     </ClInclude>
@@ -2025,9 +1989,6 @@
     <ClInclude Include="..\..\source\gui\guiArrayCtrl.h">
       <Filter>gui</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\guiBackgroundCtrl.h">
-      <Filter>gui</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\gui\guiBitmapCtrl.h">
       <Filter>gui</Filter>
     </ClInclude>
@@ -2046,9 +2007,6 @@
     <ClInclude Include="..\..\source\gui\guiConsoleEditCtrl.h">
       <Filter>gui</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\guiConsoleTextCtrl.h">
-      <Filter>gui</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\gui\guiControl.h">
       <Filter>gui</Filter>
     </ClInclude>
@@ -2082,18 +2040,9 @@
     <ClInclude Include="..\..\source\gui\guiProgressCtrl.h">
       <Filter>gui</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\guiScriptNotifyControl.h">
-      <Filter>gui</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\gui\guiSliderCtrl.h">
       <Filter>gui</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\source\gui\guiTabPageCtrl.h">
-      <Filter>gui</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\source\gui\guiTextCtrl.h">
-      <Filter>gui</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\source\gui\guiTextEditCtrl.h">
       <Filter>gui</Filter>
     </ClInclude>
@@ -3148,6 +3097,12 @@
     <ClInclude Include="..\..\source\gui\containers\guiScrollCtrl_ScriptBinding.h">
       <Filter>gui\containers</Filter>
     </ClInclude>
+    <ClInclude Include="..\..\source\gui\containers\guiTabPageCtrl.h">
+      <Filter>gui\containers</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\source\gui\guiTextCtrl.h">
+      <Filter>gui</Filter>
+    </ClInclude>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\source\math\mMath_ASM.asm">

+ 0 - 1069
engine/source/gui/containers/guiFrameCtrl.cc

@@ -1,1069 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "console/consoleTypes.h"
-#include "graphics/dgl.h"
-#include "gui/guiCanvas.h"
-#include "gui/containers/guiFrameCtrl.h"
-
-//-----------------------------------------------------------------------------
-
-IMPLEMENT_CONOBJECT(GuiFrameSetCtrl);
-
-//-----------------------------------------------------------------------------
-
-static EnumTable::Enums borderStateEnums[] =
-{
-   { GuiFrameSetCtrl::FRAME_STATE_ON,    "alwaysOn"  },
-   { GuiFrameSetCtrl::FRAME_STATE_OFF,   "alwaysOff" },
-   { GuiFrameSetCtrl::FRAME_STATE_AUTO,  "dynamic"   }
-};
-static EnumTable gBorderStateTable(3, &borderStateEnums[0]);
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::initPersistFields()
-{
-   Parent::initPersistFields();
-   addField("columns",        TypeS32Vector, Offset(mColumnOffsets, GuiFrameSetCtrl));
-   addField("rows",           TypeS32Vector, Offset(mRowOffsets, GuiFrameSetCtrl));
-   addField("borderWidth",    TypeS32,       Offset(mFramesetDetails.mBorderWidth, GuiFrameSetCtrl));
-   addField("borderColor",    TypeColorI,    Offset(mFramesetDetails.mBorderColor, GuiFrameSetCtrl));
-   addField("borderEnable",   TypeEnum,      Offset(mFramesetDetails.mBorderEnable, GuiFrameSetCtrl),   1, &gBorderStateTable);
-   addField("borderMovable",  TypeEnum,      Offset(mFramesetDetails.mBorderMovable, GuiFrameSetCtrl),  1, &gBorderStateTable);
-   addField("autoBalance",    TypeBool,      Offset(mAutoBalance, GuiFrameSetCtrl));
-   addField("fudgeFactor",    TypeS32,       Offset(mFudgeFactor, GuiFrameSetCtrl));
-}
-
-//-----------------------------------------------------------------------------
-ConsoleMethod( GuiFrameSetCtrl, frameBorder, void, 3, 4, "( index [ , enable = true ] ) Use the frameBorder method to change the frame's enable state.\n"
-																"This function is not working as of this writing\n"
-																"@param index Frame index to enable/disable/enable - Currently a boolean, but should actually be a string: alwaysOn, alwaysOff, dynamic.\n"
-																"@return No return value.")
-{
-   S32 index = dAtoi(argv[2]);
-   if (argc == 3)
-      object->frameBorderEnable(index);
-   else
-      object->frameBorderEnable(index, argv[3]);
-}
-
-ConsoleMethod( GuiFrameSetCtrl, frameMovable, void, 3, 4, "( index [ , enable = true ] ) Use the frameMovable method to change the frame's draggable state.\n"
-																"This function is not working as of this writing\n"
-																"@param index Frame index to enable/disable/enable - Currently a boolean, but should actually be a string: alwaysOn, alwaysOff, dynamic.\n"
-																"@return No return value.")
-{
-   S32 index = dAtoi(argv[2]);
-   if (argc == 3)
-      object->frameBorderMovable(index);
-   else
-      object->frameBorderMovable(index, argv[3]);
-}
-
-ConsoleMethod( GuiFrameSetCtrl, frameMinExtent, void, 5, 5, "(index, w, h ) Use the frameMinExtent method to set the minimum extent allowed for a frame.\n"
-																"These minimum extents do not prevent a parent control from collapsing the frame control and its frames. These limits apply to dragging and resizing as is done with the frames' draggable borders\n"
-																"@param index The frame number.\n"
-																"@param w Minimum width in pixels.\n"
-																"@param h Minimum height in pixels.\n"
-																"@return No return value.")
-{
-   Point2I extent(getMax(0, dAtoi(argv[3])), getMax(0, dAtoi(argv[4])));
-   object->frameMinExtent(dAtoi(argv[2]), extent);
-}
-
-ConsoleMethod( GuiFrameSetCtrl, addColumn, void, 2, 2, "() Use the addColumn method to add another column to the control.\n"
-																"The current contents of the GUIFrameCtrl may shift to fill the new column. New columns are added on the right of the control.\n"
-																"@return No return value.\n"
-																"@sa addRow, removeColumn, removeRow")
-{
-   Vector<S32> * columns = object->columnOffsets();
-   columns->push_back(0);
-   object->balanceFrames();
-}
-
-ConsoleMethod( GuiFrameSetCtrl, addRow, void, 2, 2, "() Use the addRow method to add another row to the control.\n"
-																"The current contents of the GUIFrameCtrl may shift to fill the new row. New rows are added on the bottom of the control.\n"
-																"@return No return value.\n"
-																"@sa addColumn, removeColumn, removeRow")
-{
-   Vector<S32> * rows = object->rowOffsets();
-   rows->push_back(0);
-   object->balanceFrames();
-}
-
-ConsoleMethod( GuiFrameSetCtrl, removeColumn, void, 2, 2, "() Use the removeColumn method to remove a column from the right side of the control.\n"
-																"Columns are removed right to left.\n"
-																"@return No return value.\n"
-																"@sa addColumn, addRow, removeRow")
-{
-   Vector<S32> * columns = object->columnOffsets();
-
-   if(columns->size() > 0)
-   {
-      columns->setSize(columns->size() - 1);
-      object->balanceFrames();
-   }
-   else
-      Con::errorf(ConsoleLogEntry::General, "No columns exist to remove");
-}
-
-ConsoleMethod( GuiFrameSetCtrl, removeRow, void, 2, 2, "() Use the removeRow method to remove the bottom row from the control.\n"
-																"Rows are removed bottom to top.\n"
-																"@return No return value.\n"
-																"@sa addColumn, addRow, removeColumn")
-{
-   Vector<S32> * rows = object->rowOffsets();
-
-   if(rows->size() > 0)
-   {
-      rows->setSize(rows->size() - 1);
-      object->balanceFrames();
-   }
-   else
-      Con::errorf(ConsoleLogEntry::General, "No rows exist to remove");
-}
-
-ConsoleMethod( GuiFrameSetCtrl, getColumnCount, S32, 2, 2, "() Use the getColumnCount method to determine the number of columns in this control.\n"
-																"@return Returns an integer value equal to the number of columns in this frame.\n"
-																"@sa getRowCount")
-{
-   return(object->columnOffsets()->size());
-}
-
-ConsoleMethod( GuiFrameSetCtrl, getRowCount, S32, 2, 2, "() Use the getRowCount method to determine the number of rows in this control.\n"
-																"@return Returns an integer value equal to the number of rows in this frame.\n"
-																"@sa getColumnCount")
-{
-   return(object->rowOffsets()->size());
-}
-
-ConsoleMethod( GuiFrameSetCtrl, getColumnOffset, S32, 3, 3, "( column ) Use the getColumnOffset method to determine the current pixel location of the specified column.\n"
-																"Column 0 is the first column on the left side of frame 0. Column 1 is on the right side of frame 0 and the left side of frame 1, etc.\n"
-																"@param column An integer value specifying the column to examine.\n"
-																"@return Returns the pixel offset for the specified column.\n"
-																"@sa getRowOffset, setColumnOffset, setRowOffset")
-{
-   S32 index = dAtoi(argv[2]);
-   if(index < 0 || index > object->columnOffsets()->size())
-   {
-      Con::errorf(ConsoleLogEntry::General, "Column index out of range");
-      return(0);
-   }
-   return((*object->columnOffsets())[index]);
-}
-
-ConsoleMethod( GuiFrameSetCtrl, getRowOffset, S32, 3, 3, "( row ) Use the getRowOffset method to determine the current pixel location of the specified row.\n"
-																"Row 0 is the first row on the top of the first row of frames. Row 1 is below the first row of frames and above the second row of frames, etc. 1, etc.\n"
-																"@param row An integer value specifying the row to examine.\n"
-																"@return Returns the pixel offset for the specified row.\n"
-																"@sa getColumnOffset, setColumnOffset, setRowOffset")
-{
-   S32 index = dAtoi(argv[2]);
-   if(index < 0 || index > object->rowOffsets()->size())
-   {
-      Con::errorf(ConsoleLogEntry::General, "Row index out of range");
-      return(0);
-   }
-   return((*object->rowOffsets())[index]);
-}
-
-ConsoleMethod( GuiFrameSetCtrl, setColumnOffset, void, 4, 4, "( column , offset ) Use the setColumnOffset method to determine the current pixel location of the specified column.\n"
-																"Column 0 is the first column on the left side of frame 0. Column 1 is on the right side of frame 0 and the left side of frame 1, etc. The left-most and right-most columns cannot be moved.\n"
-																"@param column An integer value specifying the column to examine.\n"
-																"@param offset An integer value specifying the new column offset in pixels.\n"
-																"@return No return value.\n"
-																"@sa getColumnOffset, getRowOffset, setRowOffset")
-{
-   Vector<S32> & columns = *(object->columnOffsets());
-
-   S32 index = dAtoi(argv[2]);
-   if(index < 0 || index > columns.size())
-   {
-      Con::errorf(ConsoleLogEntry::General, "Column index out of range");
-      return;
-   }
-
-   //
-   S32 offset = dAtoi(argv[3]);
-
-   // check the offset
-   if(((index > 0) && (offset < columns[index-1])) ||
-      ((index < (columns.size() - 1)) && (offset > columns[index+1])))
-   {
-      Con::errorf(ConsoleLogEntry::General, "Invalid column offset");
-      return;
-   }
-
-   columns[index] = offset;
-   object->updateSizes();
-}
-
-ConsoleMethod( GuiFrameSetCtrl, setRowOffset, void, 4, 4, "( row , offset ) Use the setRowOffset method to set the current pixel location of the specified row.\n"
-																"Row 0 is the first row on the top of the first row of frames. Row 1 is below the first row of frames and above the second row of frames, etc. 1, etc. The bottom-most and top-most rows cannot be moved.\n"
-																"@param row An integer value specifying the row to modify.\n"
-																"@param offset An integer value specifying the new row offset in pixels.\n"
-																"@return No return value.\n"
-																"@sa getColumnOffset, getRowOffset, setColumnOffset")
-{
-   Vector<S32> & rows = *(object->rowOffsets());
-
-   S32 index = dAtoi(argv[2]);
-   if(index < 0 || index > rows.size())
-   {
-      Con::errorf(ConsoleLogEntry::General, "Row index out of range");
-      return;
-   }
-
-   //
-   S32 offset = dAtoi(argv[3]);
-
-   // check the offset
-   if(((index > 0) && (offset < rows[index-1])) ||
-      ((index < (rows.size() - 1)) && (offset > rows[index+1])))
-   {
-      Con::errorf(ConsoleLogEntry::General, "Invalid row offset");
-      return;
-   }
-
-   rows[index] = offset;
-   object->updateSizes();
-}
-
-//-----------------------------------------------------------------------------
-GuiFrameSetCtrl::GuiFrameSetCtrl()
-{
-   VECTOR_SET_ASSOCIATION(mColumnOffsets);
-   VECTOR_SET_ASSOCIATION(mRowOffsets);
-   VECTOR_SET_ASSOCIATION(mFrameDetails);
-
-   mAutoBalance = true;
-   mIsContainer = true;
-
-   init(1, 1, NULL, NULL);
-}
-
-//-----------------------------------------------------------------------------
-GuiFrameSetCtrl::GuiFrameSetCtrl(U32 columns, U32 rows, const U32 columnOffsets[], const U32 rowOffsets[])
-{
-   init(columns, rows, columnOffsets, rowOffsets);
-}
-
-//-----------------------------------------------------------------------------
-GuiFrameSetCtrl::~GuiFrameSetCtrl()
-{
-   while (mFrameDetails.size() > 0)
-   {
-      delete mFrameDetails.last();
-      mFrameDetails.pop_back();
-   }
-}
-
-//-----------------------------------------------------------------------------
-
-void GuiFrameSetCtrl::addObject(SimObject *object)
-{
-   AssertFatal(object != NULL, "GuiFrameSetCtrl::addObject: NULL object");
-
-   // assign the object to a frame - give it default frame details
-   Parent::addObject(object);
-   GuiControl *gc = dynamic_cast<GuiControl *>(object);
-   if (gc != NULL)
-   {
-      FrameDetail *detail = new FrameDetail;
-      detail->mMinExtent = gc->mMinExtent;
-      mFrameDetails.push_back(detail);
-   }
-   else
-      mFrameDetails.push_back(NULL);
-   // resize it to fit into the frame to which it is assigned (if no frame for it, don't bother resizing)
-   if(isAwake())
-      computeSizes();
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::removeObject(SimObject *object)
-{
-   if (object != NULL)
-   {
-      VectorPtr<SimObject *>::iterator soitr;
-      VectorPtr<FrameDetail *>::iterator fditr = mFrameDetails.begin();
-      for (soitr = begin(); soitr != end(); soitr++, fditr++)
-      {
-         if (*soitr == object)
-         {
-            delete *fditr;
-            mFrameDetails.erase(fditr);
-            break;
-         }
-      }
-   }
-   Parent::removeObject(object);
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::resize(const Point2I &newPos, const Point2I &newExtent)
-{
-   // rebalance before losing the old extent (if required)
-   if (mAutoBalance == true)
-      rebalance(newExtent);
-
-   Parent::resize(newPos, newExtent);
-
-   // compute new sizing info for the frames - takes care of resizing the children
-   computeSizes( !mAutoBalance );
-}
-
-//-----------------------------------------------------------------------------
-
-void GuiFrameSetCtrl::getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent)
-{
-   Region curRegion = NONE;
-         //*** Determine the region by mouse position.
-         Point2I curMousePos = globalToLocalCoord(lastGuiEvent.mousePoint);
-         curRegion = pointInAnyRegion(curMousePos);
-
-   switch (curRegion)
-   {
-   case VERTICAL_DIVIDER:
-      // change to left-right cursor
-      if(GuiControl::smCursorChanged != CursorManager::curResizeVert)
-      {
-         //*** We've already changed the cursor, so set it back before we change it again.
-         if(GuiControl::smCursorChanged != -1)
-            Input::popCursor();
-
-         //*** Now change the cursor shape
-         Input::pushCursor(CursorManager::curResizeVert);
-         GuiControl::smCursorChanged = CursorManager::curResizeVert;
-
-      }
-      break;
-
-   case HORIZONTAL_DIVIDER:
-      // change to up-down cursor
-      if(GuiControl::smCursorChanged != CursorManager::curResizeHorz)
-      {
-         //*** We've already changed the cursor, so set it back before we change it again.
-         if(GuiControl::smCursorChanged != -1)
-            Input::popCursor();
-
-         //*** Now change the cursor shape
-         Input::pushCursor(CursorManager::curResizeHorz);
-         GuiControl::smCursorChanged = CursorManager::curResizeHorz;
-      }
-      break;
-
-   case DIVIDER_INTERSECTION:
-      // change to move cursor
-      if(GuiControl::smCursorChanged != CursorManager::curResizeAll)
-      {
-         //*** We've already changed the cursor, so set it back before we change it again.
-         if(GuiControl::smCursorChanged != -1)
-            Input::popCursor();
-
-         //*** Now change the cursor shape
-         Input::pushCursor(CursorManager::curResizeAll);
-         GuiControl::smCursorChanged = CursorManager::curResizeAll;
-
-      }
-      break;
-
-   case NONE:
-   default:
-      if(GuiControl::smCursorChanged != -1)
-      {
-         //*** We've already changed the cursor, so set it back before we change it again.
-         Input::popCursor();
-
-         GuiControl::smCursorChanged = -1;
-      }
-      break;
-   }
-
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::onMouseDown(const GuiEvent &event)
-{
-   if (mFramesetDetails.mBorderEnable != FRAME_STATE_OFF && mFramesetDetails.mBorderMovable != FRAME_STATE_OFF)
-   {
-      // determine if a divider was hit
-      Point2I curMousePos = globalToLocalCoord(event.mousePoint);
-      findHitRegion(curMousePos);                        // sets mCurVerticalHit, mCurHorizontalHit, & mCurHitRegion
-
-      if (mCurHitRegion != NONE)
-      {
-         mouseLock();
-         setFirstResponder();
-         setUpdate();
-      }
-   }
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::onMouseUp(const GuiEvent &event)
-{
-   if (mCurHitRegion != NONE)
-   {
-      mCurHitRegion = NONE;
-      mCurVerticalHit = NO_HIT;
-      mCurHorizontalHit = NO_HIT;
-      mouseUnlock();
-      setUpdate();
-   }
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::onMouseDragged(const GuiEvent &event)
-{
-   if (mCurHitRegion != NONE)
-   {
-      // identify the frames involved in the resizing, checking if they are resizable
-      S32 indexes[4];
-      S32 activeFrames = findResizableFrames(indexes);
-      if (activeFrames > 0)
-      {
-         S32 range[4];
-         // determine the range of movement, limiting as specified by individual frames
-         computeMovableRange(mCurHitRegion, mCurVerticalHit, mCurHorizontalHit, activeFrames, indexes, range);
-         Point2I curMousePos = globalToLocalCoord(event.mousePoint);
-         switch (mCurHitRegion)
-         {
-            case VERTICAL_DIVIDER:
-               mColumnOffsets[mCurVerticalHit] = getMin(getMax(range[0], curMousePos.x - mLocOnDivider.x), range[1]);
-               break;
-            case HORIZONTAL_DIVIDER:
-               mRowOffsets[mCurHorizontalHit] = getMin(getMax(range[0], curMousePos.y - mLocOnDivider.y), range[1]);
-               break;
-            case DIVIDER_INTERSECTION:
-               mColumnOffsets[mCurVerticalHit] = getMin(getMax(range[0], curMousePos.x - mLocOnDivider.x), range[1]);
-               mRowOffsets[mCurHorizontalHit] = getMin(getMax(range[2], curMousePos.y - mLocOnDivider.y), range[3]);
-               break;
-            default:
-               return;
-         }
-         computeSizes();
-      }
-   }
-}
-
-//-----------------------------------------------------------------------------
-bool GuiFrameSetCtrl::onAdd()
-{
-   if (Parent::onAdd() == false)
-      return(false);
-
-   return(true);
-}
-
-bool GuiFrameSetCtrl::onWake()
-{
-   if (Parent::onWake() == false)
-      return(false);
-
-   computeSizes();
-   return(true);
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::onRender(Point2I offset, const RectI &updateRect )
-{
-   RectI r(offset.x, offset.y, mBounds.extent.x, mBounds.extent.y);
-
-   // draw the border of the frameset if specified
-   if (mProfile->mOpaque)
-      dglDrawRectFill(r, mProfile->mFillColor);
-
-   drawDividers(offset);
-
-   //if (mProfile->mBorder)
-   //   dglDrawRect(r, mProfile->mBorderColor);
-
-   // draw the frame contents
-   renderChildControls(offset, mBounds, updateRect);
-}
-
-//-----------------------------------------------------------------------------
-bool GuiFrameSetCtrl::init(U32 columns, U32 rows, const U32 columnOffsets[], const U32 rowOffsets[])
-{
-   if (columns != 0 && rows != 0)
-   {
-      mColumnOffsets.clear();
-      mRowOffsets.clear();
-      U32 i;
-      for (i = 0; i < columns; i++)
-      {
-         if (columnOffsets == NULL)
-            mColumnOffsets.push_back(0);
-         else
-         {
-            AssertFatal(columnOffsets != NULL, "GuiFrameSetCtrl::init: NULL column offsets");
-            mColumnOffsets.push_back((U32)columnOffsets[i]);
-            if (i > 0)
-            {
-               AssertFatal(mColumnOffsets[i - 1] < mColumnOffsets[i], "GuiFrameSetCtrl::init: column offsets must be monotonically increasing");
-               mColumnOffsets.clear();
-               return(false);
-            }
-         }
-      }
-      for (i = 0; i < rows; i++)
-      {
-         if (rowOffsets == NULL)
-            mRowOffsets.push_back(0);
-         else
-         {
-            AssertFatal(rowOffsets != NULL, "GuiFrameSetCtrl::init: NULL row offsets");
-            mRowOffsets.push_back((U32)rowOffsets[i]);
-            if (i > 0)
-            {
-               AssertFatal(mRowOffsets[i - 1] < mRowOffsets[i], "GuiFrameSetCtrl::init: row offsets must be monotonically increasing");
-               mRowOffsets.clear();
-               return(false);
-            }
-         }
-      }
-   }
-   mFramesetDetails.mBorderWidth = DEFAULT_BORDER_WIDTH;
-   mFramesetDetails.mBorderEnable = FRAME_STATE_AUTO;
-   mFramesetDetails.mBorderMovable = FRAME_STATE_AUTO;
-   mAutoBalance = false;
-   mFudgeFactor = 0;
-   mCurHitRegion = NONE;
-   mCurVerticalHit = NO_HIT;
-   mCurHorizontalHit = NO_HIT;
-   return(true);
-}
-
-//-----------------------------------------------------------------------------
-// point is assumed to already be in local coordinates.
-GuiFrameSetCtrl::Region GuiFrameSetCtrl::findHitRegion(const Point2I &point)
-{
-   Vector<S32>::iterator itr;
-   S32 i = 1;
-   // step through vertical dividers
-   for (itr = mColumnOffsets.begin() + 1; itr < mColumnOffsets.end(); itr++, i++)
-   {
-      if (hitVerticalDivider(*itr, point) == true)
-      {
-         mCurVerticalHit = i;
-         mLocOnDivider.x = point.x - (*itr);
-         break;
-      }
-   }
-   i = 1;
-   // step through horizontal dividers
-   for (itr = mRowOffsets.begin() + 1; itr < mRowOffsets.end(); itr++, i++)
-   {
-      if (hitHorizontalDivider(*itr, point) == true)
-      {
-         mCurHorizontalHit = i;
-         mLocOnDivider.y = point.y - (*itr);
-         break;
-      }
-   }
-   // now set type of hit...
-   if (mCurVerticalHit != NO_HIT)
-   {
-      if (mCurHorizontalHit != NO_HIT)
-         return(mCurHitRegion = DIVIDER_INTERSECTION);
-      else
-         return(mCurHitRegion = VERTICAL_DIVIDER);
-   }
-   else if (mCurHorizontalHit != NO_HIT)
-      return(mCurHitRegion = HORIZONTAL_DIVIDER);
-   else
-      return(mCurHitRegion = NONE);
-}
-
-GuiFrameSetCtrl::Region GuiFrameSetCtrl::pointInAnyRegion(const Point2I &point)
-{
-   Vector<S32>::iterator itr;
-   S32 i = 1;
-   S32 curVertHit = NO_HIT, curHorzHit = NO_HIT;
-   Region result = NONE;
-   // step through vertical dividers
-   for (itr = mColumnOffsets.begin() + 1; itr < mColumnOffsets.end(); itr++, i++)
-   {
-      if (hitVerticalDivider(*itr, point) == true)
-      {
-         curVertHit = i;
-         break;
-      }
-   }
-   i = 1;
-   // step through horizontal dividers
-   for (itr = mRowOffsets.begin() + 1; itr < mRowOffsets.end(); itr++, i++)
-   {
-      if (hitHorizontalDivider(*itr, point) == true)
-      {
-         curHorzHit = i;
-         break;
-      }
-   }
-   // now select the type of region in which the point lies
-   if (curVertHit != NO_HIT)
-   {
-      if (curHorzHit != NO_HIT)
-         result = DIVIDER_INTERSECTION;
-      else
-         result = VERTICAL_DIVIDER;
-   }
-   else if (curHorzHit != NO_HIT)
-      result = HORIZONTAL_DIVIDER;
-   return(result);
-}
-
-//-----------------------------------------------------------------------------
-// indexes must have at least 4 entries.
-// This *may* modify mCurVerticalHit, mCurHorizontalHit, and mCurHitRegion if it
-// determines that movement is disabled by frame content.
-// If it does make such a change, it also needs to do the reset performed by
-// onMouseUp if it sets mCurHitRegion to NONE.
-S32 GuiFrameSetCtrl::findResizableFrames(S32 indexes[])
-{
-   AssertFatal(indexes != NULL, "GuiFrameSetCtrl::findResizableFrames: NULL indexes");
-
-   // first, find the column and row indexes of the affected columns/rows
-   S32 validIndexes = 0;
-   switch (mCurHitRegion)
-   {
-      case VERTICAL_DIVIDER:                             // columns
-         indexes[0] = mCurVerticalHit - 1;
-         indexes[1] = mCurVerticalHit;
-         validIndexes = 2;
-         break;
-      case HORIZONTAL_DIVIDER:                           // rows
-         indexes[0] = mCurHorizontalHit - 1;
-         indexes[1] = mCurHorizontalHit;
-         validIndexes = 2;
-         break;
-      case DIVIDER_INTERSECTION:                         // columns & rows
-         indexes[0] = mCurVerticalHit - 1;               // columns
-         indexes[1] = mCurVerticalHit;
-         indexes[2] = mCurHorizontalHit - 1;             // rows
-         indexes[3] = mCurHorizontalHit;
-         validIndexes = 4;
-         break;
-      default:
-         break;
-   }
-   // now, make sure these indexes are for movable frames
-   VectorPtr<SimObject *>::iterator soitr;
-   VectorPtr<FrameDetail *>::iterator fditr = mFrameDetails.begin();
-   GuiControl *gc;
-   S32 column = 0;
-   S32 row = 0;
-   S32 columns = mColumnOffsets.size();
-   S32 rows = mRowOffsets.size();
-   for (soitr = begin(); soitr != end() && validIndexes > 0; soitr++, fditr++)
-   {
-      // don't continue if some of the frames are empty
-      if (fditr == mFrameDetails.end())
-         break;
-      // otherwise, check the gui elements for move-restrictions
-      gc = dynamic_cast<GuiControl *>(*soitr);
-      if (gc != NULL)
-      {
-         if (column == columns)
-         {
-            column = 0;
-            row++;
-         }
-         if (row == rows)
-            break;
-         switch (mCurHitRegion)
-         {
-            case VERTICAL_DIVIDER:
-               if ((column == indexes[0] || column == indexes[1]) && (*fditr) && (*fditr)->mBorderMovable == FRAME_STATE_OFF)
-                  validIndexes = 0;
-               break;
-            case HORIZONTAL_DIVIDER:
-               if ((row == indexes[0] || row == indexes[1]) && (*fditr) && (*fditr)->mBorderMovable == FRAME_STATE_OFF)
-                  validIndexes = 0;
-               break;
-            case DIVIDER_INTERSECTION:
-               if ((column == indexes[0] || column == indexes[1]) && (*fditr) && (*fditr)->mBorderMovable == FRAME_STATE_OFF)
-               {
-                  if ((row == indexes[2] || row == indexes[3]) && (*fditr) && (*fditr)->mBorderMovable == FRAME_STATE_OFF)
-                     validIndexes = 0;
-                  else
-                  {
-                     mCurHitRegion = HORIZONTAL_DIVIDER;
-                     mCurVerticalHit = NO_HIT;
-                     indexes[0] = indexes[2];
-                     indexes[1] = indexes[3];
-                     validIndexes = 2;
-                  }
-               }
-               else if ((row == indexes[2] || row == indexes[3]) && (*fditr) && (*fditr)->mBorderMovable == FRAME_STATE_OFF)
-               {
-                  mCurHitRegion = VERTICAL_DIVIDER;
-                  mCurHorizontalHit = NO_HIT;
-                  validIndexes = 2;
-               }
-               break;
-            default:
-               return(0);
-         }
-         column++;
-      }
-   }
-   if (validIndexes == 0)
-   {
-      mCurHitRegion = NONE;
-      mCurVerticalHit = NO_HIT;
-      mCurHorizontalHit = NO_HIT;
-      mouseUnlock();
-      setUpdate();
-   }
-   return(validIndexes);
-}
-
-//-----------------------------------------------------------------------------
-// This method locates the gui control and frame detail associated with a
-// particular frame index.
-bool GuiFrameSetCtrl::findFrameContents(S32 index, GuiControl **gc, FrameDetail **fd)
-{
-   AssertFatal(gc != NULL, "GuiFrameSetCtrl::findFrameContents: NULL gui control pointer");
-   AssertFatal(fd != NULL, "GuiFrameSetCtrl::findFrameContents: NULL frame detail pointer");
-   AssertFatal(*gc == NULL, "GuiFrameSetCtrl::findFrameContents: contents of gui control must be NULL");
-   AssertFatal(*fd == NULL, "GuiFrameSetCtrl::findFrameContents: contents of frame detail must be NULL");
-
-   if (index >= 0 && index < size())
-   {
-      VectorPtr<SimObject *>::iterator soitr;
-      VectorPtr<FrameDetail *>::iterator fditr = mFrameDetails.begin();
-      for (soitr = begin(); soitr != end(); soitr++, fditr++, index--)
-      {
-         if (index == 0)
-         {
-            GuiControl *guiCtrl = dynamic_cast<GuiControl *>(*soitr);
-            if (guiCtrl != NULL)
-            {
-               *gc = guiCtrl;
-               *fd = *fditr;
-               return(true);
-            }
-            else
-               break;
-         }
-      }
-   }
-   return(false);
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::computeSizes(bool balanceFrames)
-{
-   S32 columns = mColumnOffsets.size();
-   S32 rows = mRowOffsets.size();
-   S32 vDividers = columns - 1;
-   S32 hDividers = rows - 1;
-
-   if ( !balanceFrames && mFrameDetails.size() == ( columns * rows ) )
-   {
-      // This will do some goofy things if you allow this control to resize smaller than
-      // the additive minimum extents of its frames--so don't.
-      S32 index, delta;
-
-      if ( columns > 1 )
-      {
-         index = columns - 1;
-         delta = mFrameDetails[index]->mMinExtent.x - ( mBounds.extent.x - mColumnOffsets[index] );
-         while ( delta > 0 )
-         {
-            mColumnOffsets[index--] -= delta;
-            if ( index >= 0 )
-               delta = mFrameDetails[index]->mMinExtent.x - ( mColumnOffsets[index + 1] - mColumnOffsets[index] );
-            else
-               break;
-         }
-      }
-
-      if ( rows > 1 )
-      {
-         index = rows - 1;
-         delta = mFrameDetails[columns * index]->mMinExtent.y - ( mBounds.extent.y - mRowOffsets[index] );
-         while ( delta > 0 )
-         {
-            mRowOffsets[index--] -= delta;
-            if ( index >= 0 )
-               delta = mFrameDetails[columns * index]->mMinExtent.y - ( mRowOffsets[index + 1] - mRowOffsets[index] );
-            else
-               break;
-         }
-      }
-   }
-
-   // first, update the divider placement if necessary
-   if (balanceFrames == true && mColumnOffsets.size() > 0 && mRowOffsets.size() > 0)
-   {
-      Vector<S32>::iterator itr;
-      F32 totWidth = F32(mBounds.extent.x - vDividers * mFramesetDetails.mBorderWidth);
-      F32 totHeight = F32(mBounds.extent.y - hDividers * mFramesetDetails.mBorderWidth);
-      F32 frameWidth = totWidth/(F32)columns;
-      F32 frameHeight = totHeight/(F32)rows;
-      F32 i = 0.;
-      for (itr = mColumnOffsets.begin(); itr != mColumnOffsets.end(); itr++, i++)
-         *itr = (S32)(i * (frameWidth + (F32)mFramesetDetails.mBorderWidth));
-      i = 0.;
-      for (itr = mRowOffsets.begin(); itr != mRowOffsets.end(); itr++, i++)
-         *itr = (S32)(i * (frameHeight + (F32)mFramesetDetails.mBorderWidth));
-   }
-
-   // now, resize the contents of each frame (and move content w/o a frame beyond visible range)
-   VectorPtr<SimObject *>::iterator soitr;
-   GuiControl *gc;
-   S32 column = 0;
-   S32 row = 0;
-   Point2I newPos;
-   Point2I newExtent;
-   // step through all the children
-   for (soitr = begin(); soitr != end(); soitr++)
-   {
-      // column and row track the current frame being resized
-      if (column == columns)
-      {
-         column = 0;
-         row++;
-      }
-      // resize the contents if its a gui control...
-      gc = dynamic_cast<GuiControl *>(*soitr);
-      if (gc != NULL)
-      {
-         if (row >= rows)
-         {
-            // no more visible frames
-            newPos = mBounds.extent;
-            newExtent.set(DEFAULT_MIN_FRAME_EXTENT, DEFAULT_MIN_FRAME_EXTENT);
-            gc->resize(newPos, newExtent);
-            continue;
-         }
-         else
-         {
-            // determine x components of new position & extent
-            newPos.x = mColumnOffsets[column];
-            if (column == vDividers)
-               newExtent.x = mBounds.extent.x - mColumnOffsets[column];             // last column
-            else
-               newExtent.x = mColumnOffsets[column + 1] - mColumnOffsets[column] - mFramesetDetails.mBorderWidth;   // any other column
-            // determine y components of new position & extent
-            newPos.y = mRowOffsets[row];
-            if (row == hDividers)
-               newExtent.y = mBounds.extent.y - mRowOffsets[row];                   // last row
-            else
-               newExtent.y = mRowOffsets[row + 1] - mRowOffsets[row] - mFramesetDetails.mBorderWidth;            // any other row
-            // apply the new position & extent
-            gc->resize(newPos, newExtent);
-            column++;
-         }
-      }
-   }
-}
-
-//-----------------------------------------------------------------------------
-// this method looks at the previous offsets, and uses them to redistribute
-// the available height & width proportionally.
-void GuiFrameSetCtrl::rebalance(const Point2I &newExtent)
-{
-   // look at old_width and old_height - current extent
-   F32 widthScale = (F32)newExtent.x/(F32)mBounds.extent.x;
-   F32 heightScale = (F32)newExtent.y/(F32)mBounds.extent.y;
-   Vector<S32>::iterator itr;
-   // look at old width offsets
-   for (itr = mColumnOffsets.begin() + 1; itr < mColumnOffsets.end(); itr++)
-      // multiply each by new_width/old_width
-      *itr = S32(F32(*itr) * widthScale);
-   // look at old height offsets
-   for (itr = mRowOffsets.begin() + 1; itr < mRowOffsets.end(); itr++)
-      // multiply each by new_height/new_width
-      *itr = S32(F32(*itr) * heightScale);
-
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::computeMovableRange(Region hitRegion, S32 vertHit, S32 horzHit, S32 numIndexes, const S32 indexes[], S32 ranges[])
-{
-   S32 hardRanges[4];
-   switch (numIndexes)
-   {
-      case 2:
-         switch (hitRegion)
-         {
-            case VERTICAL_DIVIDER:
-               ranges[0] = hardRanges[0] = (vertHit <= 1) ? mFramesetDetails.mBorderWidth : mColumnOffsets[vertHit - 1] + mFramesetDetails.mBorderWidth;
-               ranges[1] = hardRanges[1] = (vertHit >= (mColumnOffsets.size() - 1)) ? mBounds.extent.x : mColumnOffsets[vertHit + 1] - mFramesetDetails.mBorderWidth;
-               break;
-            case HORIZONTAL_DIVIDER:
-               ranges[0] = hardRanges[0] = (horzHit <= 1) ? mFramesetDetails.mBorderWidth : mRowOffsets[horzHit - 1] + mFramesetDetails.mBorderWidth;
-               ranges[1] = hardRanges[1] = (horzHit >= (mRowOffsets.size() - 1)) ? mBounds.extent.y : mRowOffsets[horzHit + 1] - mFramesetDetails.mBorderWidth;
-               break;
-            default:
-               return;
-         }
-         break;
-      case 4:
-         if (hitRegion == DIVIDER_INTERSECTION)
-         {
-            ranges[0] = hardRanges[0] = (vertHit <= 1) ? mFramesetDetails.mBorderWidth : mColumnOffsets[vertHit - 1] + mFramesetDetails.mBorderWidth;
-            ranges[1] = hardRanges[1] = (vertHit >= (mColumnOffsets.size() - 1)) ? mBounds.extent.x : mColumnOffsets[vertHit + 1] - mFramesetDetails.mBorderWidth;
-            ranges[2] = hardRanges[2] = (horzHit <= 1) ? mFramesetDetails.mBorderWidth : mRowOffsets[horzHit - 1] + mFramesetDetails.mBorderWidth;
-            ranges[3] = hardRanges[3] = (horzHit >= (mRowOffsets.size() - 1)) ? mBounds.extent.y : mRowOffsets[horzHit + 1] - mFramesetDetails.mBorderWidth;
-         }
-         else
-            return;
-         break;
-      default:
-         return;
-   }
-   // now that we have the hard ranges, reduce ranges based on minimum frame extents
-   VectorPtr<SimObject *>::iterator soitr;
-   VectorPtr<FrameDetail *>::iterator fditr = mFrameDetails.begin();
-   GuiControl *gc;
-   S32 column = 0;
-   S32 row = 0;
-   S32 columns = mColumnOffsets.size();
-   S32 rows = mRowOffsets.size();
-   for (soitr = begin(); soitr != end(); soitr++, fditr++)
-   {
-      // only worry about visible frames
-      if (column == columns)
-      {
-         column = 0;
-         row++;
-      }
-      if (row == rows)
-         return;
-      gc = dynamic_cast<GuiControl *>(*soitr);
-      if (gc != NULL)
-      {
-         // the gui control is in a visible frame, so look at its frame details
-         if ((*fditr) != NULL)
-         {
-            switch (hitRegion)
-            {
-               case VERTICAL_DIVIDER:
-                  if (column == indexes[0])
-                     ranges[0] = getMax(ranges[0], hardRanges[0] + (*fditr)->mMinExtent.x);
-                  if (column == indexes[1])
-                     ranges[1] = getMin(ranges[1], hardRanges[1] - (*fditr)->mMinExtent.x);
-                  break;
-               case HORIZONTAL_DIVIDER:
-                  if (row == indexes[0])
-                     ranges[0] = getMax(ranges[0], hardRanges[0] + (*fditr)->mMinExtent.y);
-                  if (row == indexes[1])
-                     ranges[1] = getMin(ranges[1], hardRanges[1] - (*fditr)->mMinExtent.y);
-                  break;
-               case DIVIDER_INTERSECTION:
-                  if (column == indexes[0])
-                     ranges[0] = getMax(ranges[0], hardRanges[0] + (*fditr)->mMinExtent.x);
-                  if (column == indexes[1])
-                     ranges[1] = getMin(ranges[1], hardRanges[1] - (*fditr)->mMinExtent.x);
-                  if (row == indexes[2])
-                     ranges[2] = getMax(ranges[2], hardRanges[2] + (*fditr)->mMinExtent.y);
-                  if (row == indexes[3])
-                     ranges[3] = getMin(ranges[3], hardRanges[3] - (*fditr)->mMinExtent.y);
-                  break;
-               default:
-                  return;
-            }
-         }
-         column++;
-      }
-   }
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::drawDividers(const Point2I &offset)
-{
-   // draw the frame dividers, if they are enabled
-   if (mFramesetDetails.mBorderEnable != FRAME_STATE_OFF)
-   {
-      RectI r;
-      Vector<S32>::iterator itr;
-      for (itr = mColumnOffsets.begin() + 1; itr < mColumnOffsets.end(); itr++)
-      {
-         r.point = Point2I(*itr - mFramesetDetails.mBorderWidth, mFudgeFactor) + offset;
-         r.extent.set(mFramesetDetails.mBorderWidth, mBounds.extent.y - ( 2 * mFudgeFactor ) );
-         dglDrawRectFill(r, mFramesetDetails.mBorderColor);
-      }
-      for (itr = mRowOffsets.begin() + 1; itr < mRowOffsets.end(); itr++)
-      {
-         r.point = Point2I(mFudgeFactor, *itr - mFramesetDetails.mBorderWidth) + offset;
-         r.extent.set(mBounds.extent.x - ( 2 * mFudgeFactor ), mFramesetDetails.mBorderWidth);
-         dglDrawRectFill(r, mFramesetDetails.mBorderColor);
-      }
-   }
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::frameBorderEnable(S32 index, const char *state)
-{
-   GuiControl *gc = NULL;
-   FrameDetail *fd = NULL;
-   if (findFrameContents(index, &gc, &fd) == true && fd != NULL)
-   {
-      if (state != NULL)
-      {
-         // find the value for the detail member
-         for (S32 i = 0; i < gBorderStateTable.size; i++)
-         {
-            if (dStrcmp(state, gBorderStateTable.table[i].label) == 0)
-               fd->mBorderEnable = gBorderStateTable.table[i].index;
-         }
-      }
-      else
-         // defaults to AUTO if NULL passed in state
-         fd->mBorderEnable = FRAME_STATE_AUTO;
-   }
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::frameBorderMovable(S32 index, const char *state)
-{
-   GuiControl *gc = NULL;
-   FrameDetail *fd = NULL;
-   if (findFrameContents(index, &gc, &fd) == true && fd != NULL)
-   {
-      if (state != NULL)
-      {
-         // find the value for the detail member
-         for (S32 i = 0; i < gBorderStateTable.size; i++)
-         {
-            if (dStrcmp(state, gBorderStateTable.table[i].label) == 0)
-               fd->mBorderMovable = gBorderStateTable.table[i].index;
-         }
-      }
-      else
-         // defaults to AUTO if NULL passed in state
-         fd->mBorderMovable = FRAME_STATE_AUTO;
-   }
-}
-
-//-----------------------------------------------------------------------------
-void GuiFrameSetCtrl::frameMinExtent(S32 index, const Point2I &extent)
-{
-   GuiControl *gc = NULL;
-   FrameDetail *fd = NULL;
-   if (findFrameContents(index, &gc, &fd) == true && fd != NULL)
-      fd->mMinExtent = extent;
-}

+ 0 - 189
engine/source/gui/containers/guiFrameCtrl.h

@@ -1,189 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-//-----------------------------------------------------------------------------
-// A gui control allowing a window to be subdivided into panes,
-// each of which displays a gui control child of the
-// GuiFrameSetCtrl. Each gui control child will have an associated
-// FrameDetail through which frame-specific details can be
-// assigned. Frame-specific values override the values specified
-// for the entire frameset.
-//
-// Note that it is possible to have more children than frames,
-// or more frames than children. In the former case, the extra
-// children will not be visible (they are moved beyond the
-// visible extent of the frameset). In the latter case, frames
-// will be empty.
-//
-// If a frameset had two columns and two rows but only three
-// gui control children they would be assigned to frames as
-// follows:
-//                 1 | 2
-//                 -----
-//                 3 |
-//
-// The last frame would be blank.
-//-----------------------------------------------------------------------------
-
-#ifndef _GUIFRAMECTRL_H_
-#define _GUIFRAMECTRL_H_
-
-#define DISABLE_COPY_CTOR(className) \
-   className(const className &)
-
-#define DISABLE_ASSIGNMENT(className) \
-   className& operator=(const className &)
-
-#ifndef _GUICONTROL_H_
-#include "gui/guiControl.h"
-#endif
-
-// for debugging porpoises...
-#define GUI_FRAME_DEBUG
-// ...save the porpoises
-
-class GuiFrameSetCtrl : public GuiControl
-{
-private:
-   typedef GuiControl Parent;
-public:
-   enum
-   {
-      FRAME_STATE_ON,                                    // ON overrides OFF
-      FRAME_STATE_OFF,                                   // OFF overrides AUTO
-      FRAME_STATE_AUTO,                                  // AUTO == ON, unless overridden
-
-      NO_HIT = -1,
-
-      DEFAULT_BORDER_WIDTH = 4,
-      DEFAULT_COLUMNS = 1,
-      DEFAULT_ROWS = 1,
-      DEFAULT_MIN_FRAME_EXTENT = 64
-   };
-   enum Region
-   {
-      VERTICAL_DIVIDER,
-      HORIZONTAL_DIVIDER,
-      DIVIDER_INTERSECTION,
-      NONE
-   };
-   struct FrameDetail
-   {
-      U32 mBorderWidth;
-      ColorI mBorderColor;
-      S32 mBorderEnable;
-      S32 mBorderMovable;
-      Point2I mMinExtent;
-      FrameDetail()                                      { mBorderWidth = DEFAULT_BORDER_WIDTH; mBorderEnable = FRAME_STATE_AUTO; mBorderMovable = FRAME_STATE_AUTO; mMinExtent.set(DEFAULT_MIN_FRAME_EXTENT, DEFAULT_MIN_FRAME_EXTENT); }
-   };
-   DECLARE_CONOBJECT(GuiFrameSetCtrl);
-   static void initPersistFields();
-
-   GuiFrameSetCtrl();
-   GuiFrameSetCtrl(U32 columns, U32 rows, const U32 columnOffsets[] = NULL, const U32 rowOffsets[] = NULL);
-   virtual ~GuiFrameSetCtrl();
-
-   void addObject(SimObject *obj);
-   void removeObject(SimObject *obj);
-
-   virtual void resize(const Point2I &newPosition, const Point2I &newExtent);
-
-   virtual void onMouseDown(const GuiEvent &event);
-   virtual void onMouseUp(const GuiEvent &event);
-   virtual void onMouseDragged(const GuiEvent &event);
-
-   bool onAdd();
-   void onRender(Point2I offset, const RectI &updateRect );
-protected:
-   /* member variables */
-   Vector<S32> mColumnOffsets;
-   Vector<S32> mRowOffsets;
-   GuiCursor *mMoveCursor;
-   GuiCursor *mUpDownCursor;
-   GuiCursor *mLeftRightCursor;
-   GuiCursor *mDefaultCursor;
-   FrameDetail mFramesetDetails;
-   VectorPtr<FrameDetail *> mFrameDetails;
-   bool mAutoBalance;
-   S32   mFudgeFactor;
-
-   /* divider activation member variables */
-   Region mCurHitRegion;
-   Point2I mLocOnDivider;
-   S32 mCurVerticalHit;
-   S32 mCurHorizontalHit;
-
-   bool init(U32 columns, U32 rows, const U32 columnOffsets[], const U32 rowOffsets[]);
-
-   Region findHitRegion(const Point2I &point);
-   Region pointInAnyRegion(const Point2I &point);
-   S32 findResizableFrames(S32 indexes[]);
-   bool hitVerticalDivider(S32 x, const Point2I &point);
-   bool hitHorizontalDivider(S32 y, const Point2I &point);
-
-   virtual void getCursor(GuiCursor *&cursor, bool &showCursor, const GuiEvent &lastGuiEvent);
-   void rebalance(const Point2I &newExtent);
-
-   void computeSizes(bool balanceFrames = false);
-   void computeMovableRange(Region hitRegion, S32 vertHit, S32 horzHit, S32 numIndexes, const S32 indexes[], S32 ranges[]);
-
-   void drawDividers(const Point2I &offset);
-public:
-   U32 columns() const                                   { return(mColumnOffsets.size()); }
-   U32 rows() const                                      { return(mRowOffsets.size()); }
-   U32 borderWidth() const                               { return(mFramesetDetails.mBorderWidth); }
-   Vector<S32>* columnOffsets()                          { return(&mColumnOffsets); }
-   Vector<S32>* rowOffsets()                             { return(&mRowOffsets); }
-   FrameDetail* framesetDetails()                        { return(&mFramesetDetails); }
-
-   bool findFrameContents(S32 index, GuiControl **gc, FrameDetail **fd);
-
-   void frameBorderEnable(S32 index, const char *state = NULL);
-   void frameBorderMovable(S32 index, const char *state = NULL);
-   void frameMinExtent(S32 index, const Point2I &extent);
-
-   void balanceFrames()    { computeSizes(true); }
-   void updateSizes()      { computeSizes();     }
-
-   bool onWake();
-
-private:
-   DISABLE_COPY_CTOR(GuiFrameSetCtrl);
-   DISABLE_ASSIGNMENT(GuiFrameSetCtrl);
-};
-
-//-----------------------------------------------------------------------------
-// x is the first value inside the next column, so the divider x-coords
-// precede x.
-inline bool GuiFrameSetCtrl::hitVerticalDivider(S32 x, const Point2I &point)
-{
-   return((point.x >= S32(x - mFramesetDetails.mBorderWidth)) && (point.x < x) && (point.y >= 0) && (point.y < S32(mBounds.extent.y)));
-}
-
-//-----------------------------------------------------------------------------
-// y is the first value inside the next row, so the divider y-coords precede y.
-inline bool GuiFrameSetCtrl::hitHorizontalDivider(S32 y, const Point2I &point)
-{
-   return((point.x >= 0) && (point.x < S32(mBounds.extent.x)) && (point.y >= S32(y - mFramesetDetails.mBorderWidth)) && (point.y < y));
-}
-
-#endif // _GUI_FRAME_CTRL_H

+ 9 - 9
engine/source/gui/containers/guiRolloutCtrl.cc

@@ -59,11 +59,11 @@ void GuiRolloutCtrl::initPersistFields()
 {
    Parent::initPersistFields();
 
-   addField("Caption", TypeCaseString, Offset(mCaption, GuiRolloutCtrl));
-   addField("Margin", TypePoint2I, Offset(mMargin, GuiRolloutCtrl));
-   addField("DefaultHeight", TypeS32, Offset(mDefaultHeight, GuiRolloutCtrl));
-   addProtectedField( "Collapsed", TypeBool, Offset( mIsExpanded, GuiRolloutCtrl), &setCollapsed, &defaultProtectedGetFn, "" );
-   addField("ClickCollapse", TypeBool, Offset(mCanCollapse, GuiRolloutCtrl));
+   //addField("Caption", TypeCaseString, Offset(mCaption, GuiRolloutCtrl));
+   //addField("Margin", TypePoint2I, Offset(mMargin, GuiRolloutCtrl));
+   //addField("DefaultHeight", TypeS32, Offset(mDefaultHeight, GuiRolloutCtrl));
+   //addProtectedField( "Collapsed", TypeBool, Offset( mIsExpanded, GuiRolloutCtrl), &setCollapsed, &defaultProtectedGetFn, "" );
+   //addField("ClickCollapse", TypeBool, Offset(mCanCollapse, GuiRolloutCtrl));
 }
 
 //////////////////////////////////////////////////////////////////////////
@@ -339,7 +339,7 @@ void GuiRolloutCtrl::onRender(Point2I offset, const RectI &updateRect)
 
    if( mProfile->mBitmapArrayRects.size() >= NumBitmaps )
    {
-      dglClearBitmapModulation();
+      //dglClearBitmapModulation();
 
       // Draw Rollout From Skin
       if( !mIsExpanded )
@@ -349,11 +349,11 @@ void GuiRolloutCtrl::onRender(Point2I offset, const RectI &updateRect)
 
       // Draw Caption ( Vertically Centered )
       ColorI currColor;
-      dglGetBitmapModulation( &currColor );
+      //dglGetBitmapModulation( &currColor );
       Point2I textPosition = mHeader.point + offset + mProfile->mTextOffset;
-      dglSetBitmapModulation( mProfile->mFontColor );
+      //dglSetBitmapModulation( mProfile->mFontColor );
       renderText( textPosition, mHeader.extent, mCaption, mProfile);
-      dglSetBitmapModulation( currColor );
+      //dglSetBitmapModulation( currColor );
 
       // If we're collapsed we contain the first child as our content
       // thus we don't render it when collapsed.  but to support modified

+ 0 - 4
engine/source/gui/containers/guiRolloutCtrl.h

@@ -26,10 +26,6 @@
 #include "gui/guiControl.h"
 #endif
 
-#ifndef _GUISTACKCTRL_H_
-#include "gui/containers/guiStackCtrl.h"
-#endif
-
 #ifndef _H_GUIDEFAULTCONTROLRENDER_
 #include "gui/guiDefaultControlRender.h"
 #endif

+ 0 - 325
engine/source/gui/containers/guiStackCtrl.cc

@@ -1,325 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "gui/containers/guiStackCtrl.h"
-
-IMPLEMENT_CONOBJECT(GuiStackControl);
-
-static EnumTable::Enums stackTypeEnum[] =
-{
-   { GuiStackControl::stackingTypeVert, "Vertical"  },
-   { GuiStackControl::stackingTypeHoriz,"Horizontal" },
-   { GuiStackControl::stackingTypeDyn,"Dynamic" }
-};
-static EnumTable gStackTypeTable(3, &stackTypeEnum[0]);
-
-static EnumTable::Enums stackHorizEnum[] =
-{
-   { GuiStackControl::horizStackLeft, "Left to Right"  },
-   { GuiStackControl::horizStackRight,"Right to Left" }
-};
-static EnumTable gStackHorizSizingTable(2, &stackHorizEnum[0]);
-
-static EnumTable::Enums stackVertEnum[] =
-{
-   { GuiStackControl::vertStackTop, "Top to Bottom"  },
-   { GuiStackControl::vertStackBottom,"Bottom to Top" }
-};
-static EnumTable gStackVertSizingTable(2, &stackVertEnum[0]);
-
-
-
-GuiStackControl::GuiStackControl()
-{
-   mMinExtent.set(24, 24);
-   mResizing = false;
-   mStackingType = stackingTypeVert;
-   mStackVertSizing = vertStackTop;
-   mStackHorizSizing = horizStackLeft;
-   mPadding = 0;
-   mIsContainer = true;
-}
-
-void GuiStackControl::initPersistFields()
-{
-
-   addGroup( "Stacking" );
-   addField( "StackingType",       TypeEnum,         Offset(mStackingType, GuiStackControl), 1, &gStackTypeTable);
-   addField( "HorizStacking",       TypeEnum,         Offset(mStackHorizSizing, GuiStackControl), 1, &gStackHorizSizingTable);
-   addField( "VertStacking",        TypeEnum,         Offset(mStackVertSizing, GuiStackControl), 1, &gStackVertSizingTable);
-   addField( "Padding", TypeS32, Offset(mPadding, GuiStackControl));
-   endGroup( "Stacking" );
-
-   Parent::initPersistFields();
-}
-
-ConsoleMethod( GuiStackControl, updateStack, void, 2, 2, "%stackCtrl.updateStack() - Restacks controls it owns")
-{
-   object->updatePanes();
-}
-
-bool GuiStackControl::onWake()
-{
-   if ( !Parent::onWake() )
-      return false;
-
-   updatePanes();
-
-   return true;
-}
-
-void GuiStackControl::onSleep()
-{
-   Parent::onSleep();
-}
-
-void GuiStackControl::updatePanes()
-{
-   // Prevent recursion
-   if(mResizing) 
-      return;
-
-   // Set Resizing.
-   mResizing = true;
-
-   Point2I extent = getExtent();
-
-   // Do we need to stack horizontally?
-   if( ( extent.x > extent.y && mStackingType == stackingTypeDyn ) || mStackingType == stackingTypeHoriz )
-   {
-      switch( mStackHorizSizing )
-      {
-      case horizStackLeft:
-         stackFromLeft();
-         break;
-      case horizStackRight:
-         stackFromRight();
-         break;
-      }
-   }
-   // Or, vertically?
-   else if( ( extent.y > extent.x && mStackingType == stackingTypeDyn ) || mStackingType == stackingTypeVert)
-   {
-      switch( mStackVertSizing )
-      {
-      case vertStackTop:
-         stackFromTop();
-         break;
-      case vertStackBottom:
-         stackFromBottom();
-
-         break;
-      }
-   }
-
-   // Clear Sizing Flag.
-   mResizing = false;
-}
-
-void GuiStackControl::freeze(bool _shouldfreeze)
-{
-   mResizing = _shouldfreeze;
-}
-
-void GuiStackControl::stackFromBottom()
-{
-   // Store the sum of the heights of our controls.
-   S32 totalHeight=0;
-
-   Point2I curPos;
-   // If we go from the bottom, things are basically the same...
-   // except we have to assign positions in an arse backwards way
-   // (literally :P)
-
-   // Figure out how high everything is going to be...
-   // Place each child...
-   for( S32 i = 0; i < size(); i++ )
-   {
-      // Place control
-      GuiControl * gc = dynamic_cast<GuiControl*>(operator [](i));
-
-      if(gc && gc->isVisible() )
-      {
-         Point2I childExtent = gc->getExtent();
-         totalHeight += childExtent.y;
-      }
-   }
-
-   // Figure out where we're starting...
-   curPos = getPosition();
-   curPos.y += totalHeight;
-
-   // Offset so the bottom control goes in the right place...
-   GuiControl * gc = dynamic_cast<GuiControl*>(operator [](size()-1));
-   if(gc)
-      curPos.y -= gc->getExtent().y;
-
-
-   // Now work up from there!
-   for(S32 i=size()-1; i>=0; i--)
-   {
-      // Place control
-      GuiControl * gc = dynamic_cast<GuiControl*>(operator [](i));
-
-      if(gc)
-      {
-         // We must place the child...
-
-         // Make it have our width but keep its height
-         Point2I childExtent = gc->getExtent();
-
-         // Update our state...
-         curPos.y -= childExtent.y - mPadding;
-
-         // And resize...
-         gc->resize(curPos - getPosition(), Point2I(getExtent().x, childExtent.y));
-      }
-   }
-}
-void GuiStackControl::stackFromTop()
-{
-   // Store the sum of the heights of our controls.
-   S32 totalHeight=0;
-
-   Point2I curPos;
-   // Position and resize everything...
-   curPos = getPosition();
-
-   // Place each child...
-   for(S32 i=0; i<size(); i++)
-   {
-      // Place control
-      GuiControl * gc = dynamic_cast<GuiControl*>(operator [](i));
-
-      if(gc && gc->isVisible() )
-      {
-         // We must place the child...
-
-         // Make it have our width but keep its height
-         Point2I childExtent = gc->getExtent();
-
-         gc->resize(curPos - getPosition(), Point2I(getExtent().x, childExtent.y));
-
-         // Update our state...
-         curPos.y    += childExtent.y + mPadding;
-         totalHeight += childExtent.y + mPadding;
-      }
-   }
-   // Conform our size to the sum of the child sizes.
-   if( totalHeight > getExtent().y )
-   {
-      curPos.x = getExtent().x;
-      curPos.y = totalHeight;
-      resize(getPosition(), curPos);
-   }
-   else if( totalHeight < getExtent().y )
-   {
-      curPos.x = getExtent().x;
-      curPos.y = getMax( totalHeight , mMinExtent.y );
-      resize(getPosition(), curPos);
-   }
-}
-void GuiStackControl::stackFromLeft()
-{
-   // Store the sum of the heights of our controls.
-   S32 totalWidth=0;
-
-   Point2I curPos;
-   // Position and resize everything...
-   curPos = getPosition();
-
-   // Place each child...
-   for(S32 i=0; i<size(); i++)
-   {
-      // Place control
-      GuiControl * gc = dynamic_cast<GuiControl*>(operator [](i));
-
-      if(gc && gc->isVisible() )
-      {
-         // We must place the child...
-
-         // Make it have our width but keep its height
-         Point2I childExtent = gc->getExtent();
-
-         gc->resize(curPos - getPosition(), Point2I( childExtent.x,getExtent().y));
-
-         // Update our state...
-         curPos.x    += childExtent.x + mPadding;
-         totalWidth += childExtent.x + mPadding;
-      }
-   }
-
-   // Conform our size to the sum of the child sizes.
-   if( totalWidth > getExtent().x )
-   {
-      curPos.x = totalWidth;
-      curPos.y = getExtent().y;
-      resize(getPosition(), curPos);
-   }
-}
-void GuiStackControl::stackFromRight()
-{
-}
-
-void GuiStackControl::resize(const Point2I &newPosition, const Point2I &newExtent)
-{
-   //call set update both before and after
-   setUpdate();
-   Point2I actualNewExtent = Point2I(  getMax(mMinExtent.x, newExtent.x),
-                                       getMax(mMinExtent.y, newExtent.y));
-   mBounds.set(newPosition, actualNewExtent);
-
-   GuiControl *parent = getParent();
-   if (parent)
-      parent->childResized(this);
-   setUpdate();
-
-   updatePanes();
-}
-
-void GuiStackControl::addObject(SimObject *obj)
-{
-   Parent::addObject(obj);
-
-   updatePanes();
-}
-
-void GuiStackControl::removeObject(SimObject *obj)
-{
-   Parent::removeObject(obj);
-
-   updatePanes();
-}
-
-bool GuiStackControl::reOrder(SimObject* obj, SimObject* target)
-{
-   bool ret = Parent::reOrder(obj, target);
-   if (ret)
-      updatePanes();
-
-   return ret;
-}
-
-void GuiStackControl::childResized(GuiControl *child)
-{
-   updatePanes();
-}

+ 0 - 93
engine/source/gui/containers/guiStackCtrl.h

@@ -1,93 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#ifndef _GUISTACKCTRL_H_
-#define _GUISTACKCTRL_H_
-
-#ifndef _GUICONTROL_H_
-#include "gui/guiControl.h"
-#endif
-
-#include "graphics/dgl.h"
-#include "console/console.h"
-#include "console/consoleTypes.h"
-
-/// A stack of GUI controls.
-///
-/// This maintains a horizontal or vertical stack of GUI controls. If one is deleted, or
-/// resized, then the stack is resized to fit. The order of the stack is
-/// determined by the internal order of the children (ie, order of addition).
-///
-///
-/// @todo Make this support horizontal right to left stacks.
-class GuiStackControl : public GuiControl
-{
-protected:
-   typedef GuiControl Parent;
-   bool             mResizing;
-   S32              mPadding;
-   S32 mStackHorizSizing;      ///< Set from horizSizingOptions.
-   S32 mStackVertSizing;       ///< Set from vertSizingOptions.
-   S32 mStackingType;
-
-public:
-   GuiStackControl();
-
-   enum stackingOptions
-   {
-      horizStackLeft = 0,///< Stack from left to right when horizontal
-      horizStackRight,   ///< Stack from right to left when horizontal
-      vertStackTop,      ///< Stack from top to bottom when vertical
-      vertStackBottom,   ///< Stack from bottom to top when vertical
-      stackingTypeVert,  ///< Always stack vertically
-      stackingTypeHoriz, ///< Always stack horizontally
-      stackingTypeDyn    ///< Dynamically switch based on width/height
-   };
-
-
-   void resize(const Point2I &newPosition, const Point2I &newExtent);
-   void childResized(GuiControl *child);
-   /// prevent resizing. useful when adding many items.
-   void freeze(bool);
-
-   bool onWake();
-   void onSleep();
-
-   void updatePanes();
-
-   void stackFromLeft();
-   void stackFromRight();
-   void stackFromTop();
-   void stackFromBottom();
-
-   S32 getCount() { return size(); }; /// Returns the number of children in the stack
-
-   void addObject(SimObject *obj);
-   void removeObject(SimObject *obj);
-
-   bool reOrder(SimObject* obj, SimObject* target = 0);
-
-   static void initPersistFields();
-   DECLARE_CONOBJECT(GuiStackControl);
-};
-
-#endif

+ 1 - 1
engine/source/gui/containers/guiTabBookCtrl.h

@@ -27,7 +27,7 @@
 #endif
 
 #ifndef _GUITABPAGECTRL_H_
-#include "gui/guiTabPageCtrl.h"
+#include "gui/containers/guiTabPageCtrl.h"
 #endif
 
 

+ 180 - 180
engine/source/gui/guiTabPageCtrl.cc → engine/source/gui/containers/guiTabPageCtrl.cc

@@ -1,180 +1,180 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "console/consoleTypes.h"
-#include "console/console.h"
-#include "graphics/dgl.h"
-#include "gui/guiCanvas.h"
-#include "gui/guiTabPageCtrl.h"
-#include "gui/guiDefaultControlRender.h"
-#include "gui/editor/guiEditCtrl.h"
-
-IMPLEMENT_CONOBJECT(GuiTabPageCtrl);
-
-GuiTabPageCtrl::GuiTabPageCtrl(void)
-{
-   mBounds.extent.set(100, 200);
-   //dStrcpy(mText,(UTF8*)"TabPage");
-   mActive = true;
-   mIsContainer = true;
-}
-
-void GuiTabPageCtrl::initPersistFields()
-{
-   Parent::initPersistFields();
-}
-
-bool GuiTabPageCtrl::onWake()
-{
-   if (! Parent::onWake())
-      return false;
-
-   return true;
-}
-
-void GuiTabPageCtrl::onSleep()
-{
-   Parent::onSleep();
-}
-
-GuiControl* GuiTabPageCtrl::findHitControl(const Point2I &pt, S32 initialLayer)
-{
-   return Parent::findHitControl(pt, initialLayer);
-}
-
-void GuiTabPageCtrl::onTouchDown(const GuiEvent &event)
-{
-   setUpdate();
-   Point2I localPoint = globalToLocalCoord( event.mousePoint );
-
-   GuiControl *ctrl = findHitControl(localPoint);
-   if (ctrl && ctrl != this)
-   {
-      ctrl->onTouchDown(event);
-   }
-}
-
-bool GuiTabPageCtrl::onMouseDownEditor(const GuiEvent &event, Point2I offset )
-{
-   // This shouldn't be called if it's not design time, but check just incase
-   if ( GuiControl::smDesignTime )
-   {
-      GuiEditCtrl* edit = GuiControl::smEditorHandle;
-      if( edit )
-         edit->select( this );
-   }
-
-   return Parent::onMouseDownEditor( event, offset );
-}
-
-
-GuiControl *GuiTabPageCtrl::findNextTabable(GuiControl *curResponder, bool firstCall)
-{
-   //set the global if this is the first call (directly from the canvas)
-   if (firstCall)
-   {
-      GuiControl::smCurResponder = NULL;
-   }
-
-   //if the window does not already contain the first responder, return false
-   //ie.  Can't tab into or out of a window
-   if (! ControlIsChild(curResponder))
-   {
-      return NULL;
-   }
-
-   //loop through, checking each child to see if it is the one that follows the firstResponder
-   GuiControl *tabCtrl = NULL;
-   iterator i;
-   for (i = begin(); i != end(); i++)
-   {
-      GuiControl *ctrl = static_cast<GuiControl *>(*i);
-      tabCtrl = ctrl->findNextTabable(curResponder, false);
-      if (tabCtrl) break;
-   }
-
-   //to ensure the tab cycles within the current window...
-   if (! tabCtrl)
-   {
-      tabCtrl = findFirstTabable();
-   }
-
-   mFirstResponder = tabCtrl;
-   return tabCtrl;
-}
-
-GuiControl *GuiTabPageCtrl::findPrevTabable(GuiControl *curResponder, bool firstCall)
-{
-   if (firstCall)
-   {
-      GuiControl::smPrevResponder = NULL;
-   }
-
-   //if the window does not already contain the first responder, return false
-   //ie.  Can't tab into or out of a window
-   if (! ControlIsChild(curResponder))
-   {
-      return NULL;
-   }
-
-   //loop through, checking each child to see if it is the one that follows the firstResponder
-   GuiControl *tabCtrl = NULL;
-   iterator i;
-   for (i = begin(); i != end(); i++)
-   {
-      GuiControl *ctrl = static_cast<GuiControl *>(*i);
-      tabCtrl = ctrl->findPrevTabable(curResponder, false);
-      if (tabCtrl) break;
-   }
-
-   //to ensure the tab cycles within the current window...
-   if (! tabCtrl)
-   {
-      tabCtrl = findLastTabable();
-   }
-
-   mFirstResponder = tabCtrl;
-   return tabCtrl;
-}
-
-void GuiTabPageCtrl::setText(const char *txt)
-{
-   Parent::setText( txt );
-
-   GuiControl *parent = getParent();
-   if( parent )
-      parent->setUpdate();
-};
-
-
-void GuiTabPageCtrl::selectWindow(void)
-{
-   //first make sure this window is the front most of its siblings
-   GuiControl *parent = getParent();
-   if (parent)
-   {
-      parent->pushObjectToBack(this);
-   }
-
-   //also set the first responder to be the one within this window
-   setFirstResponder(mFirstResponder);
-}
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// 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.
+//-----------------------------------------------------------------------------
+
+#include "console/consoleTypes.h"
+#include "console/console.h"
+#include "graphics/dgl.h"
+#include "gui/guiCanvas.h"
+#include "gui/containers/guiTabPageCtrl.h"
+#include "gui/guiDefaultControlRender.h"
+#include "gui/editor/guiEditCtrl.h"
+
+IMPLEMENT_CONOBJECT(GuiTabPageCtrl);
+
+GuiTabPageCtrl::GuiTabPageCtrl(void)
+{
+   mBounds.extent.set(100, 200);
+   //dStrcpy(mText,(UTF8*)"TabPage");
+   mActive = true;
+   mIsContainer = true;
+}
+
+void GuiTabPageCtrl::initPersistFields()
+{
+   Parent::initPersistFields();
+}
+
+bool GuiTabPageCtrl::onWake()
+{
+   if (! Parent::onWake())
+      return false;
+
+   return true;
+}
+
+void GuiTabPageCtrl::onSleep()
+{
+   Parent::onSleep();
+}
+
+GuiControl* GuiTabPageCtrl::findHitControl(const Point2I &pt, S32 initialLayer)
+{
+   return Parent::findHitControl(pt, initialLayer);
+}
+
+void GuiTabPageCtrl::onTouchDown(const GuiEvent &event)
+{
+   setUpdate();
+   Point2I localPoint = globalToLocalCoord( event.mousePoint );
+
+   GuiControl *ctrl = findHitControl(localPoint);
+   if (ctrl && ctrl != this)
+   {
+      ctrl->onTouchDown(event);
+   }
+}
+
+bool GuiTabPageCtrl::onMouseDownEditor(const GuiEvent &event, Point2I offset )
+{
+   // This shouldn't be called if it's not design time, but check just incase
+   if ( GuiControl::smDesignTime )
+   {
+      GuiEditCtrl* edit = GuiControl::smEditorHandle;
+      if( edit )
+         edit->select( this );
+   }
+
+   return Parent::onMouseDownEditor( event, offset );
+}
+
+
+GuiControl *GuiTabPageCtrl::findNextTabable(GuiControl *curResponder, bool firstCall)
+{
+   //set the global if this is the first call (directly from the canvas)
+   if (firstCall)
+   {
+      GuiControl::smCurResponder = NULL;
+   }
+
+   //if the window does not already contain the first responder, return false
+   //ie.  Can't tab into or out of a window
+   if (! ControlIsChild(curResponder))
+   {
+      return NULL;
+   }
+
+   //loop through, checking each child to see if it is the one that follows the firstResponder
+   GuiControl *tabCtrl = NULL;
+   iterator i;
+   for (i = begin(); i != end(); i++)
+   {
+      GuiControl *ctrl = static_cast<GuiControl *>(*i);
+      tabCtrl = ctrl->findNextTabable(curResponder, false);
+      if (tabCtrl) break;
+   }
+
+   //to ensure the tab cycles within the current window...
+   if (! tabCtrl)
+   {
+      tabCtrl = findFirstTabable();
+   }
+
+   mFirstResponder = tabCtrl;
+   return tabCtrl;
+}
+
+GuiControl *GuiTabPageCtrl::findPrevTabable(GuiControl *curResponder, bool firstCall)
+{
+   if (firstCall)
+   {
+      GuiControl::smPrevResponder = NULL;
+   }
+
+   //if the window does not already contain the first responder, return false
+   //ie.  Can't tab into or out of a window
+   if (! ControlIsChild(curResponder))
+   {
+      return NULL;
+   }
+
+   //loop through, checking each child to see if it is the one that follows the firstResponder
+   GuiControl *tabCtrl = NULL;
+   iterator i;
+   for (i = begin(); i != end(); i++)
+   {
+      GuiControl *ctrl = static_cast<GuiControl *>(*i);
+      tabCtrl = ctrl->findPrevTabable(curResponder, false);
+      if (tabCtrl) break;
+   }
+
+   //to ensure the tab cycles within the current window...
+   if (! tabCtrl)
+   {
+      tabCtrl = findLastTabable();
+   }
+
+   mFirstResponder = tabCtrl;
+   return tabCtrl;
+}
+
+void GuiTabPageCtrl::setText(const char *txt)
+{
+   Parent::setText( txt );
+
+   GuiControl *parent = getParent();
+   if( parent )
+      parent->setUpdate();
+};
+
+
+void GuiTabPageCtrl::selectWindow(void)
+{
+   //first make sure this window is the front most of its siblings
+   GuiControl *parent = getParent();
+   if (parent)
+   {
+      parent->pushObjectToBack(this);
+   }
+
+   //also set the first responder to be the one within this window
+   setFirstResponder(mFirstResponder);
+}

+ 57 - 61
engine/source/gui/guiTabPageCtrl.h → engine/source/gui/containers/guiTabPageCtrl.h

@@ -1,61 +1,57 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#ifndef _GUITABPAGECTRL_H_
-#define _GUITABPAGECTRL_H_
-
-#ifndef _GUITEXTCTRL_H_
-#include "gui/guiTextCtrl.h"
-#endif
-
-class GuiTabPageCtrl : public GuiControl
-{
-   private:
-      typedef GuiControl Parent;
-
-      S32            mTabIndex;
-
-   public:
-      GuiTabPageCtrl();
-      DECLARE_CONOBJECT(GuiTabPageCtrl);
-      static void initPersistFields();
-
-      bool onWake();    ///< The page awakens (becomes active)!
-      void onSleep();   ///< The page sleeps (zzzzZZ - becomes inactive)
-
-      GuiControl* findHitControl(const Point2I &pt, S32 initialLayer = -1); ///< Find which control is hit by the mouse starting at a specified layer
-
-      void onTouchDown(const GuiEvent &event);  ///< Called when a mouseDown event occurs
-      bool onMouseDownEditor(const GuiEvent &event, Point2I offset );   ///< Called when a mouseDown event occurs and the GUI editor is active
-
-      S32 getTabIndex(void) { return mTabIndex; }  ///< Get the tab index of this control
-
-      //only cycle tabs through the current window, so overwrite the method
-      GuiControl* findNextTabable(GuiControl *curResponder, bool firstCall = true);
-      GuiControl* findPrevTabable(GuiControl *curResponder, bool firstCall = true);
-
-      void selectWindow(void);               ///< Select this window
-
-      virtual void setText(const char *txt = NULL); ///< Override setText function to signal parent we need to update.
-};
-
-#endif //_GUITABPAGECTRL_H_
+//-----------------------------------------------------------------------------
+// Copyright (c) 2013 GarageGames, LLC
+//
+// 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.
+//-----------------------------------------------------------------------------
+
+#ifndef _GUITABPAGECTRL_H_
+#define _GUITABPAGECTRL_H_
+
+class GuiTabPageCtrl : public GuiControl
+{
+   private:
+      typedef GuiControl Parent;
+
+      S32            mTabIndex;
+
+   public:
+      GuiTabPageCtrl();
+      DECLARE_CONOBJECT(GuiTabPageCtrl);
+      static void initPersistFields();
+
+      bool onWake();    ///< The page awakens (becomes active)!
+      void onSleep();   ///< The page sleeps (zzzzZZ - becomes inactive)
+
+      GuiControl* findHitControl(const Point2I &pt, S32 initialLayer = -1); ///< Find which control is hit by the mouse starting at a specified layer
+
+      void onTouchDown(const GuiEvent &event);  ///< Called when a mouseDown event occurs
+      bool onMouseDownEditor(const GuiEvent &event, Point2I offset );   ///< Called when a mouseDown event occurs and the GUI editor is active
+
+      S32 getTabIndex(void) { return mTabIndex; }  ///< Get the tab index of this control
+
+      //only cycle tabs through the current window, so overwrite the method
+      GuiControl* findNextTabable(GuiControl *curResponder, bool firstCall = true);
+      GuiControl* findPrevTabable(GuiControl *curResponder, bool firstCall = true);
+
+      void selectWindow(void);               ///< Select this window
+
+      virtual void setText(const char *txt = NULL); ///< Override setText function to signal parent we need to update.
+};
+
+#endif //_GUITABPAGECTRL_H_

+ 0 - 288
engine/source/gui/editor/guiImageList.cc

@@ -1,288 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "platform/platform.h"
-#include "console/consoleTypes.h"
-#include "console/console.h"
-#include "graphics/dgl.h"
-#include "gui/editor/guiImageList.h"
-
-GuiImageList::GuiImageList()
-{
-  VECTOR_SET_ASSOCIATION(mTextures);
-  mTextures.clear();
-  mUniqueId = 0;
-}
-
-U32 GuiImageList::Insert( const char* texturePath , TextureHandle::TextureHandleType type )
-{
-    // Sanity!
-    AssertISV( type != TextureHandle::InvalidTexture, "Invalid texture type." );
-
-  TextureEntry *t = new TextureEntry;
-
-  if ( ! t ) return -1;
-
-  t->TexturePath = StringTable->insert(texturePath);
-  if ( *t->TexturePath ) 
-  {
-    t->Handle = TextureHandle(t->TexturePath, type);
-
-    if ( t->Handle )
-    {
-      t->Object = (TextureObject *) t->Handle;
-
-      if(t->Object == NULL) 
-      { 
-        return -1;
-      }
-      t->id = ++mUniqueId;
-
-      mTextures.push_back( t );
-
-      return t->id;
-
-    }
-  }
-
-  // Free Texture Entry.
-  delete t;
-
-  // Return Failure.
-  return -1;
-
-}
-
-
-bool GuiImageList::Clear()
-{
-  while ( mTextures.size() )
-    FreeTextureEntry( mTextures[0] );
-  mTextures.clear();
-
-  mUniqueId = 0;
-
-  return true;
-}
-
-bool GuiImageList::FreeTextureEntry( U32 Index )
-{
-  U32 Id = IndexFromId( Index );
-  if ( Id != -1 )
-     return FreeTextureEntry( mTextures[ Id ] );
-  else
-    return false;
-}
-
-bool GuiImageList::FreeTextureEntry( PTextureEntry Entry )
-{
-  if ( ! Entry )
-    return false;
-
-  U32 id = IndexFromId( Entry->id );
-
-  delete Entry;
-
-  mTextures.erase ( id );
-
-  return true;
-}
-
-U32 GuiImageList::IndexFromId ( U32 Id )
-{
-  if ( !mTextures.size() ) return -1;
-  Vector<PTextureEntry>::iterator i = mTextures.begin();
-  U32 j = 0;
-  for ( ; i != mTextures.end(); i++ )
-  {
-    if ( i )
-    {
-    if ( (*i)->id == Id )
-      return j;
-    j++;
-    }
-  }
-
-  return -1;
-}
-
-U32 GuiImageList::IndexFromPath ( const char* Path )
-{
-  if ( !mTextures.size() ) return -1;
-  Vector<PTextureEntry>::iterator i = mTextures.begin();
-  for ( ; i != mTextures.end(); i++ )
-  {
-    if ( dStricmp( Path, (*i)->TexturePath ) == 0 )
-      return (*i)->id;
-  }
-
-  return -1;
-}
-
-
-void GuiImageList::initPersistFields()
-{
-  Parent::initPersistFields();
-}
-
-ConsoleMethod(GuiImageList, getImage,const char *, 3, 3, "(int index) Get a path to the texture at the specified index\n"
-              "@param index The index of the desired image\n"
-              "@return The ID of the image or -1 on failure")
-{
-  return object->GetTexturePath(dAtoi(argv[2]));
-}
-
-
-ConsoleMethod(GuiImageList, clear,bool, 2, 2, "() Clears the imagelist\n"
-              "@return Returns true on success, and false otherwise")
-{
-  return object->Clear();
-}
-
-ConsoleMethod(GuiImageList, count,S32, 2, 2, "Gets the number of images in the list\n"
-              "@return Return number of images as an integer")
-{
-  return object->Count();
-}
-
-
-ConsoleMethod(GuiImageList, remove, bool, 3,3, "(index) Removes an image from the list by index\n"
-              "@param index The index of the image to remove\n"
-              "@return Returns true on success, false otherwise")
-{
-  return object->FreeTextureEntry( dAtoi(argv[2] ) );
-}
-
-ConsoleMethod(GuiImageList, getIndex, S32, 3,3, "(char* path) Retrieves the imageindex of a specified texture in the list\n"
-              "@param path Thge path of the image file to retrieve the indexs of\n"
-              "@return The index of the image as an integer or -1 for failure")
-{
-  return object->IndexFromPath( argv[2] );
-}
-
-
-ConsoleMethod(GuiImageList, insert, S32, 3, 3, "(image path) Insert an image into imagelist\n"
-              "@param path The path of the image file\n"
-              "@return returns the image index or -1 for failure")
-{
-  return object->Insert( argv[2] );
-}
-
-
-
-TextureObject *GuiImageList::GetTextureObject( U32 Index )
-{
-  U32 ItemIndex = IndexFromId(Index);
-  if ( ItemIndex != -1 )
-    return mTextures[ItemIndex]->Object;
-  else
-    return NULL;
-}
-TextureObject *GuiImageList::GetTextureObject( const char* TexturePath )
-{
-  Vector<PTextureEntry>::iterator i = mTextures.begin();
-  for ( ; i != mTextures.end(); i++ )
-  {
-    if ( dStricmp( TexturePath, (*i)->TexturePath ) == 0 )
-      return (*i)->Object;
-  }
-
-  return NULL;
-}
-
-TextureHandle GuiImageList::GetTextureHandle( U32 Index )
-{
-  U32 ItemIndex = IndexFromId(Index);
-  if ( ItemIndex != -1 )
-    return mTextures[ItemIndex]->Handle;
-  else
-    return NULL;
-
-}
-TextureHandle GuiImageList::GetTextureHandle( const char* TexturePath )
-{
-  Vector<PTextureEntry>::iterator i = mTextures.begin();
-  for ( ; i != mTextures.end(); i++ )
-  {
-    if ( dStricmp( TexturePath, (*i)->TexturePath ) == 0 )
-      return (*i)->Handle;
-  }
-
-  return NULL;
-}
-
-
-const char *GuiImageList::GetTexturePath( U32 Index )
-{
-  U32 ItemIndex = IndexFromId(Index);
-  if ( ItemIndex != -1 )
-    return mTextures[ItemIndex]->TexturePath;
-  else
-    return "";
-}
-
-
-// Used to derive from GuiControl, but no visual representation was needed
-//void GuiImageList::onRender(Point2I offset, const RectI &updateRect)
-//{
-//  return;
-//
-//  //make sure we have a parent
-//  GuiCanvas *Canvas = getRoot();
-//  if (! Canvas)
-//    return;
-//
-//  U32 IconSize = 32;
-//
-//  RectI IconRect;
-//
-//  IconRect.point = offset;
-//
-//  IconRect.extent.x =  32;
-//  IconRect.extent.y =  32;
-//
-//  //debugging, checking insertion by rendering textures in list
-//  if( mTextures.size() )
-//  {
-//    Point2I TexPoint = offset;
-//
-//    Vector<PTextureEntry>::iterator i = mTextures.begin();
-//
-//    ColorI color;
-//
-//    dglGetBitmapModulation(&color);
-//
-//    dglClearBitmapModulation();
-//
-//    for ( ; i != mTextures.end(); i++ )
-//    {
-//      dglDrawBitmap((*i)->Object,TexPoint);
-//      TexPoint.y += (*i)->Object->getBitmapHeight();
-//    }
-//
-//    dglSetBitmapModulation(color);
-//  }
-//}
-
-
-
-IMPLEMENT_CONOBJECT(GuiImageList);

+ 0 - 97
engine/source/gui/editor/guiImageList.h

@@ -1,97 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#ifndef _GUIIMAGELIST_H_
-#define _GUIIMAGELIST_H_
-
-#ifndef _PLATFORM_H_
-#include "platform/platform.h"
-#endif
-#ifndef _MPOINT_H_
-#include "math/mPoint.h"
-#endif
-#ifndef _MRECT_H_
-#include "math/mRect.h"
-#endif
-#ifndef _COLOR_H_
-#include "graphics/color.h"
-#endif
-#ifndef _SIMBASE_H_
-#include "sim/simBase.h"
-#endif
-#ifndef _GUITYPES_H_
-#include "gui/guiTypes.h"
-#endif
-#ifndef _EVENT_H_
-#include "platform/event.h"
-#endif
-
-
-class GuiImageList : public SimObject
-{
-  private:
-   typedef SimObject Parent;
-
-  public:
-   typedef struct tag_TextureEntry
-   {
-      StringTableEntry TexturePath;
-      TextureHandle Handle;
-      TextureObject* Object;
-      U32 id;
-   }TextureEntry,*PTextureEntry;
-   
-   Vector<PTextureEntry> mTextures;
-
-  protected:
-
-
-    U32 mUniqueId;
-    
-  public:
-   GuiImageList();
-   
-   DECLARE_CONOBJECT(GuiImageList);
-   static void initPersistFields();
-
-   // Image managing functions
-   bool Clear();
-   inline U32 Count() { return (U32)mTextures.size(); };
-   U32 Insert( const char* texturePath , TextureHandle::TextureHandleType type = TextureHandle::BitmapTexture );
-
-   bool FreeTextureEntry( U32 Index );
-   bool FreeTextureEntry( PTextureEntry Entry );
-
-   TextureObject *GetTextureObject( U32 Index );
-   TextureObject *GetTextureObject( const char* TexturePath );
-
-   TextureHandle GetTextureHandle( U32 Index );
-   TextureHandle GetTextureHandle( const char* TexturePath );
-
-   const char * GetTexturePath( U32 Index );
-
-   U32 IndexFromId ( U32 Id );
-   U32 IndexFromPath ( const char* Path );
-
-};
-
-#endif //_GUIIMAGELISTCTRL_H_

+ 5 - 6
engine/source/gui/editor/guiInspector.cc

@@ -37,7 +37,6 @@ GuiInspector::GuiInspector()
 {
    mGroups.clear();
    mTarget = NULL;
-   mPadding = 1;
 }
 
 GuiInspector::~GuiInspector()
@@ -177,7 +176,7 @@ void GuiInspector::inspectObject( SimObject *object )
       {
          mGroups.erase(i);
          general->deleteObject();
-         updatePanes();
+         resize(getPosition(), getExtent());
       }
    }
 
@@ -553,7 +552,7 @@ bool GuiInspectorGroup::onAdd()
 bool GuiInspectorGroup::createContent()
 {
    // Create our field stack control
-   mStack = new GuiStackControl();
+   mStack = new GuiGridCtrl();
    if( !mStack )
       return false;
 
@@ -639,7 +638,7 @@ bool GuiInspectorGroup::inspectGroup()
       return false;
 
    // to prevent crazy resizing, we'll just freeze our stack for a sec..
-   mStack->freeze(true);
+   //mStack->freeze(true);
 
    bool bNoGroup = false;
 
@@ -756,8 +755,8 @@ bool GuiInspectorGroup::inspectGroup()
          }       
       }
    }
-   mStack->freeze(false);
-   mStack->updatePanes();
+   //mStack->freeze(false);
+   //mStack->updatePanes();
 
    // If we've no new items, there's no need to resize anything!
    if( bNewItems == false && !mChildren.empty() )

+ 7 - 7
engine/source/gui/editor/guiInspector.h

@@ -34,10 +34,6 @@
 #include "gui/guiCanvas.h"
 #endif
 
-#ifndef _GUISTACKCTRL_H_
-#include "gui/containers/guiStackCtrl.h"
-#endif
-
 #ifndef _H_GUIDEFAULTCONTROLRENDER_
 #include "gui/guiDefaultControlRender.h"
 #endif
@@ -58,6 +54,10 @@
 #include "gui/guiPopUpCtrl.h"
 #endif
 
+#ifndef _GUIGRIDCTRL_H_
+#include "gui/containers/guiGridCtrl.h"
+#endif
+
 #include "gui/containers/guiRolloutCtrl.h"
 
 
@@ -68,10 +68,10 @@ class GuiInspectorField;
 // Forward Declare GuiInspectorDatablockField
 class GuiInspectorDatablockField;
 
-class GuiInspector : public GuiStackControl
+class GuiInspector : public GuiGridCtrl
 {
 private:
-   typedef GuiStackControl Parent;
+   typedef GuiGridCtrl Parent;
 public:
    // Members
    Vector<GuiInspectorGroup*>    mGroups;
@@ -140,7 +140,7 @@ public:
    SimObjectPtr<SimObject>             mTarget;
    SimObjectPtr<GuiInspector>          mParent;
    Vector<GuiInspectorField*>          mChildren;
-   GuiStackControl*                    mStack;
+   GuiGridCtrl*						   mStack;
 
    // Constructor/Destructor/Conobject Declaration
    GuiInspectorGroup();

+ 0 - 111
engine/source/gui/editor/guiSeparatorCtrl.cc

@@ -1,111 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "graphics/dgl.h"
-#include "console/console.h"
-#include "console/consoleTypes.h"
-#include "gui/guiCanvas.h"
-#include "gui/guiDefaultControlRender.h"
-#include "gui/editor/guiSeparatorCtrl.h"
-
-IMPLEMENT_CONOBJECT(GuiSeparatorCtrl);
-
-static EnumTable::Enums separatorTypeEnum[] =
-{
-   { GuiSeparatorCtrl::separatorTypeVertical, "Vertical"  },
-   { GuiSeparatorCtrl::separatorTypeHorizontal,"Horizontal" }
-};
-static EnumTable gSeparatorTypeTable(2, &separatorTypeEnum[0]);
-
-
-//--------------------------------------------------------------------------
-GuiSeparatorCtrl::GuiSeparatorCtrl() : GuiControl()
-{
-   mInvisible = false;
-   mText = StringTable->EmptyString;
-   mTextLeftMargin = 0;
-   mMargin = 2;
-   mBounds.extent.set( 12, 35 );
-   mSeparatorType = GuiSeparatorCtrl::separatorTypeVertical;
-}
-
-//--------------------------------------------------------------------------
-void GuiSeparatorCtrl::initPersistFields()
-{
-   Parent::initPersistFields();
-
-   addField("Caption",         TypeString, Offset(mText,           GuiSeparatorCtrl));
-   addField("Type",            TypeEnum,   Offset(mSeparatorType,  GuiSeparatorCtrl), 1, &gSeparatorTypeTable);
-   addField("BorderMargin",      TypeS32,    Offset(mMargin, GuiSeparatorCtrl));
-   addField("Invisible",      TypeBool,    Offset(mInvisible, GuiSeparatorCtrl));
-   addField("LeftMargin",      TypeS32,    Offset(mTextLeftMargin, GuiSeparatorCtrl));
-}
-
-//--------------------------------------------------------------------------
-void GuiSeparatorCtrl::onRender(Point2I offset, const RectI &updateRect)
-{
-   Parent::onRender( offset, updateRect );
-
-   if( mInvisible )
-      return;
-
-   if(mText != StringTable->EmptyString && !( mSeparatorType == separatorTypeVertical ) )
-   {
-      // If text is present and we have a left margin, then draw some separator, then the
-      // text, and then the rest of the separator
-      S32 posx = offset.x + mMargin;
-      S32 fontheight = mProfile->mFont->getHeight();
-      S32 seppos = (fontheight - 2) / 2 + offset.y;
-      if(mTextLeftMargin > 0)
-      {
-         RectI rect(Point2I(posx,seppos),Point2I(mTextLeftMargin,2));
-         renderBorderedRect(rect, mProfile, GuiControlState::HighlightState);
-         posx += mTextLeftMargin;
-      }
-
-      dglSetBitmapModulation( mActive ? mProfile->mFillColor : mProfile->mFillColorNA );
-      posx += dglDrawText(mProfile->mFont, Point2I(posx,offset.y), mText, mProfile->mFontColors);
-      //posx += mProfile->mFont->getStrWidth(mText);
-
-      RectI rect(Point2I(posx,seppos),Point2I(mBounds.extent.x - posx + offset.x,2));
-	  renderBorderedRect(rect, mProfile, GuiControlState::HighlightState);
-
-   } else
-   {
-      if( mSeparatorType == separatorTypeHorizontal )
-      {
-         S32 seppos = mBounds.extent.y / 2 + offset.y; 
-         RectI rect(Point2I(offset.x + mMargin ,seppos),Point2I(mBounds.extent.x - (mMargin * 2),2));
-		 renderBorderedRect(rect, mProfile, GuiControlState::NormalState);
-      }
-      else
-      {
-         S32 seppos = mBounds.extent.x / 2 + offset.x; 
-         RectI rect(Point2I(seppos, offset.y + mMargin),Point2I(2, mBounds.extent.y - (mMargin * 2)));
-		 renderBorderedRect(rect, mProfile, GuiControlState::NormalState);
-      }
-   }
-
-   renderChildControls(offset, mBounds, updateRect);
-}
-
-

+ 0 - 57
engine/source/gui/editor/guiSeparatorCtrl.h

@@ -1,57 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-#ifndef _GUISEPARATORCTRL_H_
-#define _GUISEPARATORCTRL_H_
-
-#ifndef _GUICONTROL_H_
-#include "gui/guiControl.h"
-#endif
-
-/// Renders a separator line with optional text.
-class GuiSeparatorCtrl : public GuiControl
-{
-private:
-   typedef GuiControl Parent;
-
-public:
-   bool  mInvisible;
-   StringTableEntry mText;
-   S32   mTextLeftMargin;
-   S32   mMargin;
-   S32   mSeparatorType;
-
-   enum separatorTypeOptions
-   {
-      separatorTypeVertical = 0, ///< Draw Vertical Separator
-      separatorTypeHorizontal    ///< Horizontal Separator
-   };
-
-   //creation methods
-   DECLARE_CONOBJECT(GuiSeparatorCtrl);
-   GuiSeparatorCtrl();
-
-   static void initPersistFields();
-
-   void onRender(Point2I offset, const RectI &updateRect);
-};
-
-#endif

+ 0 - 44
engine/source/gui/guiBackgroundCtrl.cc

@@ -1,44 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "console/console.h"
-#include "gui/guiBackgroundCtrl.h"
-
-IMPLEMENT_CONOBJECT(GuiBackgroundCtrl);
-
-//--------------------------------------------------------------------------
-GuiBackgroundCtrl::GuiBackgroundCtrl() : GuiControl()
-{
-   mDraw = false;
-   mIsContainer = true;
-}
-
-//--------------------------------------------------------------------------
-void GuiBackgroundCtrl::onRender(Point2I offset, const RectI &updateRect)
-{
-   if ( mDraw )
-      Parent::onRender( offset, updateRect );
-
-   renderChildControls(offset, mBounds, updateRect);
-}
-
-

+ 0 - 46
engine/source/gui/guiBackgroundCtrl.h

@@ -1,46 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#ifndef _GUIBACKGROUNDCTRL_H_
-#define _GUIBACKGROUNDCTRL_H_
-
-#ifndef _GUICONTROL_H_
-#include "gui/guiControl.h"
-#endif
-
-/// Renders a background, so you can have a backdrop for your GUI.
-class GuiBackgroundCtrl : public GuiControl
-{
-private:
-   typedef GuiControl Parent;
-
-public:
-   bool  mDraw;
-
-   //creation methods
-   DECLARE_CONOBJECT(GuiBackgroundCtrl);
-   GuiBackgroundCtrl();
-
-   void onRender(Point2I offset, const RectI &updateRect);
-};
-
-#endif

+ 0 - 137
engine/source/gui/guiBitmapBorderCtrl.cc

@@ -1,137 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "gui/guiControl.h"
-#include "graphics/dgl.h"
-
-/// Renders a skinned border.
-class GuiBitmapBorderCtrl : public GuiControl
-{
-   typedef GuiControl Parent;
-
-   enum {
-      BorderTopLeft,
-      BorderTopRight,
-      BorderTop,
-      BorderLeft,
-      BorderRight,
-      BorderBottomLeft,
-      BorderBottom,
-      BorderBottomRight,
-      NumBitmaps
-   };
-	RectI *mBitmapBounds;  ///< bmp is [3*n], bmpHL is [3*n + 1], bmpNA is [3*n + 2]
-   TextureHandle mTextureHandle;
-public:
-   bool onWake();
-   void onSleep();
-   void onRender(Point2I offset, const RectI &updateRect);
-   DECLARE_CONOBJECT(GuiBitmapBorderCtrl);
-};
-
-IMPLEMENT_CONOBJECT(GuiBitmapBorderCtrl);
-
-bool GuiBitmapBorderCtrl::onWake()
-{
-   if (! Parent::onWake())
-      return false;
-
-   //get the texture for the close, minimize, and maximize buttons
-   mTextureHandle = mProfile->mTextureHandle;
-   bool result = mProfile->constructBitmapArray() >= NumBitmaps;
-   AssertFatal(result, "Failed to create the bitmap array");
-   if(!result)
-      return false;
-
-   mBitmapBounds = mProfile->mBitmapArrayRects.address();
-   return true;
-}
-
-void GuiBitmapBorderCtrl::onSleep()
-{
-   mTextureHandle = NULL;
-   Parent::onSleep();
-}
-
-void GuiBitmapBorderCtrl::onRender(Point2I offset, const RectI &updateRect)
-{
-   renderChildControls( offset, mBounds, updateRect );
-   dglSetClipRect(updateRect);
-
-   //draw the outline
-   RectI winRect;
-   winRect.point = offset;
-   winRect.extent = mBounds.extent;
-
-	winRect.point.x += mBitmapBounds[BorderLeft].extent.x;
-	winRect.point.y += mBitmapBounds[BorderTop].extent.y;
-
-   winRect.extent.x -= mBitmapBounds[BorderLeft].extent.x + mBitmapBounds[BorderRight].extent.x;
-   winRect.extent.y -= mBitmapBounds[BorderTop].extent.y + mBitmapBounds[BorderBottom].extent.y;
-
-   if(mProfile->mOpaque)
-      dglDrawRectFill(winRect, mProfile->mFillColor);
-
-   dglClearBitmapModulation();
-   dglDrawBitmapSR(mTextureHandle, offset, mBitmapBounds[BorderTopLeft]);
-   dglDrawBitmapSR(mTextureHandle, Point2I(offset.x + mBounds.extent.x - mBitmapBounds[BorderTopRight].extent.x, offset.y),
-                   mBitmapBounds[BorderTopRight]);
-
-   RectI destRect;
-   destRect.point.x = offset.x + mBitmapBounds[BorderTopLeft].extent.x;
-   destRect.point.y = offset.y;
-   destRect.extent.x = mBounds.extent.x - mBitmapBounds[BorderTopLeft].extent.x - mBitmapBounds[BorderTopRight].extent.x;
-	destRect.extent.y = mBitmapBounds[BorderTop].extent.y;
-   RectI stretchRect = mBitmapBounds[BorderTop];
-   stretchRect.inset(1,0);
-   dglDrawBitmapStretchSR(mTextureHandle, destRect, stretchRect);
-
-   destRect.point.x = offset.x;
-   destRect.point.y = offset.y + mBitmapBounds[BorderTopLeft].extent.y;
-   destRect.extent.x = mBitmapBounds[BorderLeft].extent.x;
-   destRect.extent.y = mBounds.extent.y - mBitmapBounds[BorderTopLeft].extent.y - mBitmapBounds[BorderBottomLeft].extent.y;
-   stretchRect = mBitmapBounds[BorderLeft];
-   stretchRect.inset(0,1);
-   dglDrawBitmapStretchSR(mTextureHandle, destRect, stretchRect);
-
-   destRect.point.x = offset.x + mBounds.extent.x - mBitmapBounds[BorderRight].extent.x;
-   destRect.extent.x = mBitmapBounds[BorderRight].extent.x;
-   destRect.point.y = offset.y + mBitmapBounds[BorderTopRight].extent.y;
-   destRect.extent.y = mBounds.extent.y - mBitmapBounds[BorderTopRight].extent.y - mBitmapBounds[BorderBottomRight].extent.y;
-
-	stretchRect = mBitmapBounds[BorderRight];
-   stretchRect.inset(0,1);
-   dglDrawBitmapStretchSR(mTextureHandle, destRect, stretchRect);
-
-   dglDrawBitmapSR(mTextureHandle, offset + Point2I(0, mBounds.extent.y - mBitmapBounds[BorderBottomLeft].extent.y), mBitmapBounds[BorderBottomLeft]);
-   dglDrawBitmapSR(mTextureHandle, offset + mBounds.extent - mBitmapBounds[BorderBottomRight].extent, mBitmapBounds[BorderBottomRight]);
-
-   destRect.point.x = offset.x + mBitmapBounds[BorderBottomLeft].extent.x;
-   destRect.extent.x = mBounds.extent.x - mBitmapBounds[BorderBottomLeft].extent.x - mBitmapBounds[BorderBottomRight].extent.x;
-
-   destRect.point.y = offset.y + mBounds.extent.y - mBitmapBounds[BorderBottom].extent.y;
-   destRect.extent.y = mBitmapBounds[BorderBottom].extent.y;
-   stretchRect = mBitmapBounds[BorderBottom];
-   stretchRect.inset(1,0);
-
-   dglDrawBitmapStretchSR(mTextureHandle, destRect, stretchRect);
-}

+ 0 - 186
engine/source/gui/guiConsoleTextCtrl.cc

@@ -1,186 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#include "console/consoleTypes.h"
-#include "console/console.h"
-#include "graphics/color.h"
-#include "gui/guiConsoleTextCtrl.h"
-#include "graphics/dgl.h"
-
-IMPLEMENT_CONOBJECT(GuiConsoleTextCtrl);
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
-
-GuiConsoleTextCtrl::GuiConsoleTextCtrl()
-{
-   //default fonts
-   mConsoleExpression = NULL;
-   mResult = NULL;
-}
-
-void GuiConsoleTextCtrl::initPersistFields()
-{
-   Parent::initPersistFields();
-   addGroup("GuiConsoleTextCtrl");		
-   addField("expression",  TypeCaseString,  Offset(mConsoleExpression, GuiConsoleTextCtrl));
-   endGroup("GuiConsoleTextCtrl");		
-}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
-
-bool GuiConsoleTextCtrl::onWake()
-{
-   if (! Parent::onWake())
-      return false;
-
-   mFont = mProfile->mFont;
-   return true;
-}
-
-void GuiConsoleTextCtrl::onSleep()
-{
-   Parent::onSleep();
-   mFont = NULL;
-}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
-
-void GuiConsoleTextCtrl::setText(const char *txt)
-{
-   //make sure we don't call this before onAdd();
-   AssertFatal(mProfile, "Can't call setText() until setProfile() has been called.");
-
-   if (txt)
-      mConsoleExpression = StringTable->insert(txt);
-   else
-      mConsoleExpression = NULL;
-
-   //Make sure we have a font
-   mProfile->incRefCount();
-   mFont = mProfile->mFont;
-
-   setUpdate();
-
-   //decrement the profile referrence
-   mProfile->decRefCount();
-}
-
-void GuiConsoleTextCtrl::calcResize()
-{
-   if (!mResult)
-      return;
-
-   //resize
-   //DEPRECIATED
-   /*
-   if (mProfile->mAutoSizeWidth)
-   {
-      if (mProfile->mAutoSizeHeight)
-         resize(mBounds.point, Point2I(mFont->getStrWidth((const UTF8 *)mResult) + 4, mFont->getHeight() + 4));
-      else
-         resize(mBounds.point, Point2I(mFont->getStrWidth((const UTF8 *)mResult) + 4, mBounds.extent.y));
-   }
-   else if (mProfile->mAutoSizeHeight)
-   {
-      resize(mBounds.point, Point2I(mBounds.extent.x, mFont->getHeight() + 4));
-   }
-   */
-}
-
-
-void GuiConsoleTextCtrl::onPreRender()
-{
-   if (mConsoleExpression)
-      mResult = Con::evaluatef("$temp = %s;", mConsoleExpression);
-   calcResize();
-}
-
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
-
-void GuiConsoleTextCtrl::onRender(Point2I offset, const RectI &updateRect)
-{
-   // draw the background rectangle
-   RectI r(offset, mBounds.extent);
-   dglDrawRectFill(r, ColorI(255,255,255));
-
-   // draw the border
-   r.extent += r.point;
-   glColor4ub(0, 0, 0, 0);
-
-#if defined(TORQUE_OS_IOS) || defined(TORQUE_OS_ANDROID) || defined(TORQUE_OS_EMSCRIPTEN)
-   Point2I topleft(r.point.x,  r.point.y);
-   Point2I bottomRight(r.extent.x-1, r.extent.y-1);
-	//this was the same drawing as dglDrawRect
-	dglDrawRect( topleft, bottomRight, ColorI(0, 0, 0, 0) );// PUAP -Mat untested
-#else
-   glBegin(GL_LINE_LOOP);
-   glVertex2i(r.point.x,  r.point.y);
-   glVertex2i(r.extent.x-1, r.point.y);
-   glVertex2i(r.extent.x-1, r.extent.y-1);
-   glVertex2i(r.point.x,  r.extent.y-1);
-   glEnd();
-#endif
-
-   if (mResult)
-   {
-      S32 txt_w = mFont->getStrWidth((const UTF8 *)mResult);
-      Point2I localStart;
-      switch (mProfile->mAlignment)
-      {
-         case GuiControlProfile::RightAlign:
-            localStart.set(mBounds.extent.x - txt_w-2, 0);
-            break;
-         case GuiControlProfile::CenterAlign:
-            localStart.set((mBounds.extent.x - txt_w) / 2, 0);
-            break;
-         default:
-            // GuiControlProfile::LeftAlign
-            localStart.set(2,0);
-            break;
-      }
-
-      Point2I globalStart = localToGlobalCoord(localStart);
-
-      //draw the text
-      dglSetBitmapModulation(mProfile->mFontColor);
-      dglDrawText(mFont, globalStart, mResult, mProfile->mFontColors);
-   }
-
-   //render the child controls
-   renderChildControls(offset, mBounds, updateRect);
-}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
-
-const char *GuiConsoleTextCtrl::getScriptValue()
-{
-   return getText();
-}
-
-void GuiConsoleTextCtrl::setScriptValue(const char *val)
-{
-   setText(val);
-}
-
-// -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- //
-// EOF //

+ 0 - 72
engine/source/gui/guiConsoleTextCtrl.h

@@ -1,72 +0,0 @@
-//-----------------------------------------------------------------------------
-// Copyright (c) 2013 GarageGames, LLC
-//
-// 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.
-//-----------------------------------------------------------------------------
-
-#ifndef _GUICONSOLETEXTCTRL_H_
-#define _GUICONSOLETEXTCTRL_H_
-
-#ifndef _GUITYPES_H_
-#include "gui/guiTypes.h"
-#endif
-#ifndef _GUICONTROL_H_
-#include "gui/guiControl.h"
-#endif
-
-class GuiConsoleTextCtrl : public GuiControl
-{
-private:
-   typedef GuiControl Parent;
-
-public:
-   enum Constants { MAX_STRING_LENGTH = 255 };
-
-
-protected:
-   const char *mConsoleExpression;
-   const char *mResult;
-   Resource<GFont> mFont;
-
-public:
-
-   //creation methods
-   DECLARE_CONOBJECT(GuiConsoleTextCtrl);
-   GuiConsoleTextCtrl();
-   static void initPersistFields();
-
-   //Parental methods
-   bool onWake();
-   void onSleep();
-
-   //text methods
-   virtual void setText(const char *txt = NULL);
-   const char *getText() { return mConsoleExpression; }
-
-   //rendering methods
-   void calcResize();
-   void onPreRender();    // do special pre render processing
-   void onRender(Point2I offset, const RectI &updateRect);
-
-   //Console methods
-   const char *getScriptValue();
-   void setScriptValue(const char *value);
-};
-
-#endif //_GUI_TEXT_CONTROL_H_

+ 0 - 3
engine/source/gui/guiPopUpCtrl.h

@@ -32,9 +32,6 @@
 #ifndef _GUIBUTTONCTRL_H_
 #include "gui/buttons/guiButtonCtrl.h"
 #endif
-#ifndef _GUIBACKGROUNDCTRL_H_
-#include "gui/guiBackgroundCtrl.h"
-#endif
 #ifndef _GUISCROLLCTRL_H_
 #include "gui/containers/guiScrollCtrl.h"
 #endif

+ 0 - 3
engine/source/gui/guiPopUpCtrlEx.h

@@ -50,9 +50,6 @@
 #ifndef _GUIBUTTONCTRL_H_
 #include "gui/buttons/guiButtonCtrl.h"
 #endif
-#ifndef _GUIBACKGROUNDCTRL_H_
-#include "gui/guiBackgroundCtrl.h"
-#endif
 #ifndef _GUISCROLLCTRL_H_
 #include "gui/containers/guiScrollCtrl.h"
 #endif