Browse Source

Bug fixes and header licenses

Lloyd Weehuizen 15 years ago
parent
commit
09b9364721
100 changed files with 3864 additions and 1060 deletions
  1. 0 2
      Build/RocketControls.vcproj
  2. 241 0
      Build/RocketControlsPython.vcproj
  3. 23 21
      Build/RocketCore.vcproj
  4. 377 0
      Build/RocketCorePython.vcproj
  5. 0 2
      Build/RocketDebugger.vcproj
  6. 58 0
      Build/RocketPython.sln
  7. 175 0
      Build/builddist.py
  8. 70 70
      Build/vsprops/BuildConfigurationBase.vsprops
  9. 7 7
      Build/vsprops/BuildConfigurationDLL.vsprops
  10. 17 17
      Build/vsprops/BuildConfigurationDLLDebug.vsprops
  11. 17 17
      Build/vsprops/BuildConfigurationDLLRelease.vsprops
  12. 21 21
      Build/vsprops/BuildConfigurationDebug.vsprops
  13. 20 20
      Build/vsprops/BuildConfigurationRelease.vsprops
  14. 1 1
      Include/Rocket/Controls/Clipboard.h
  15. 1 1
      Include/Rocket/Controls/Header.h
  16. 22 6
      Include/Rocket/Core/Colour.inl
  17. 3 5
      Include/Rocket/Core/Core.h
  18. 25 25
      Include/Rocket/Core/Debug.h
  19. 22 6
      Include/Rocket/Core/Dictionary.inl
  20. 23 7
      Include/Rocket/Core/Element.inl
  21. 22 6
      Include/Rocket/Core/ElementInstancerGeneric.inl
  22. 2 2
      Include/Rocket/Core/EventListener.h
  23. 1 1
      Include/Rocket/Core/Header.h
  24. 12 12
      Include/Rocket/Core/Platform.h
  25. 1 1
      Include/Rocket/Core/Pool.h
  26. 23 7
      Include/Rocket/Core/Pool.inl
  27. 77 0
      Include/Rocket/Core/Python/ConverterScriptObject.h
  28. 5 5
      Include/Rocket/Core/Python/ElementInstancer.h
  29. 2 2
      Include/Rocket/Core/Python/Header.h
  30. 123 0
      Include/Rocket/Core/Python/NameIndexInterface.h
  31. 87 0
      Include/Rocket/Core/Python/PickleTypeConverter.h
  32. 52 0
      Include/Rocket/Core/Python/Python.h
  33. 111 0
      Include/Rocket/Core/Python/Utilities.h
  34. 118 0
      Include/Rocket/Core/Python/VectorInterface.h
  35. 67 0
      Include/Rocket/Core/Python/Wrapper.h
  36. 122 0
      Include/Rocket/Core/Python/WrapperIter.h
  37. 1 1
      Include/Rocket/Core/String.h
  38. 29 13
      Include/Rocket/Core/StringBase.inl
  39. 29 53
      Include/Rocket/Core/TypeConverter.inl
  40. 1 1
      Include/Rocket/Core/Types.h
  41. 2 8
      Include/Rocket/Core/Variant.h
  42. 24 8
      Include/Rocket/Core/Variant.inl
  43. 24 8
      Include/Rocket/Core/Vector2.inl
  44. 1 1
      Include/Rocket/Debugger/Header.h
  45. 59 59
      Samples/README.TXT
  46. BIN
      Samples/basic/customlog/.sconsign.dblite
  47. 65 65
      Samples/basic/customlog/CustomLog.vcproj.user
  48. 24 8
      Samples/basic/customlog/src/SystemInterface.cpp
  49. 22 6
      Samples/basic/customlog/src/SystemInterface.h
  50. 26 10
      Samples/basic/customlog/src/main.cpp
  51. 2 2
      Samples/basic/directx/DirectX.vcproj
  52. 65 65
      Samples/basic/directx/DirectX.vcproj.user
  53. 46 10
      Samples/basic/directx/src/RenderInterfaceDirectX.cpp
  54. 23 7
      Samples/basic/directx/src/RenderInterfaceDirectX.h
  55. 27 11
      Samples/basic/directx/src/main.cpp
  56. 65 65
      Samples/basic/drag/Drag.vcproj.user
  57. 27 0
      Samples/basic/drag/src/DragListener.cpp
  58. 27 0
      Samples/basic/drag/src/DragListener.h
  59. 27 0
      Samples/basic/drag/src/Inventory.cpp
  60. 27 0
      Samples/basic/drag/src/Inventory.h
  61. 25 9
      Samples/basic/drag/src/main.cpp
  62. BIN
      Samples/basic/loaddocument/.sconsign.dblite
  63. 65 65
      Samples/basic/loaddocument/LoadDocument.vcproj.user
  64. 25 9
      Samples/basic/loaddocument/src/main.cpp
  65. 4 4
      Samples/basic/ogre3d/Ogre3D.vcproj
  66. 65 65
      Samples/basic/ogre3d/Ogre3D.vcproj.user
  67. 27 11
      Samples/basic/ogre3d/src/RenderInterfaceOgre3D.cpp
  68. 26 10
      Samples/basic/ogre3d/src/RenderInterfaceOgre3D.h
  69. 27 11
      Samples/basic/ogre3d/src/RocketApplication.cpp
  70. 24 8
      Samples/basic/ogre3d/src/RocketApplication.h
  71. 26 10
      Samples/basic/ogre3d/src/RocketFrameListener.cpp
  72. 22 6
      Samples/basic/ogre3d/src/RocketFrameListener.h
  73. 27 11
      Samples/basic/ogre3d/src/SystemInterfaceOgre3D.cpp
  74. 23 7
      Samples/basic/ogre3d/src/SystemInterfaceOgre3D.h
  75. 24 8
      Samples/basic/ogre3d/src/main.cpp
  76. BIN
      Samples/basic/treeview/.sconsign.dblite
  77. 65 65
      Samples/basic/treeview/TreeView.vcproj.user
  78. 27 0
      Samples/basic/treeview/src/FileFormatter.cpp
  79. 27 0
      Samples/basic/treeview/src/FileFormatter.h
  80. 22 6
      Samples/basic/treeview/src/FileSystem.cpp
  81. 22 6
      Samples/basic/treeview/src/FileSystem.h
  82. 25 9
      Samples/basic/treeview/src/main.cpp
  83. 65 65
      Samples/invaders/RocketInvaders.vcproj.user
  84. 3 3
      Samples/invaders/src/DecoratorDefender.cpp
  85. 1 1
      Samples/invaders/src/DecoratorInstancerDefender.cpp
  86. 1 1
      Samples/invaders/src/DecoratorInstancerStarfield.cpp
  87. 1 1
      Samples/invaders/src/DecoratorStarfield.cpp
  88. 1 1
      Samples/invaders/src/Event.cpp
  89. 2 2
      Samples/invaders/src/HighScores.cpp
  90. 1 1
      Samples/invaders/src/main.cpp
  91. 29 0
      Samples/pyinvaders/PyRocketInvaders.sln
  92. 292 0
      Samples/pyinvaders/PyRocketInvaders.vcproj
  93. 65 0
      Samples/pyinvaders/PyRocketInvaders.vcproj.user
  94. 35 0
      Samples/pyinvaders/data/background.rml
  95. BIN
      Samples/pyinvaders/data/background.tga
  96. 124 0
      Samples/pyinvaders/data/game.rml
  97. 55 0
      Samples/pyinvaders/data/help.rml
  98. BIN
      Samples/pyinvaders/data/help_defender.tga
  99. BIN
      Samples/pyinvaders/data/help_invader_mothership.tga
  100. BIN
      Samples/pyinvaders/data/help_invader_rank1.tga

+ 0 - 2
Build/RocketControls.vcproj

@@ -19,7 +19,6 @@
 		<Configuration
 			Name="Debug|Win32"
 			OutputDirectory="$(IntDir)"
-			IntermediateDirectory="build\$(ProjectName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLDebug.vsprops"
 			CharacterSet="1"
@@ -87,7 +86,6 @@
 		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(IntDir)"
-			IntermediateDirectory="build\$(ProjectName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLRelease.vsprops"
 			CharacterSet="1"

+ 241 - 0
Build/RocketControlsPython.vcproj

@@ -0,0 +1,241 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="RocketControlsPython"
+	ProjectGUID="{206AC8CC-432B-4B7C-C497-2CF315AEE1C1}"
+	RootNamespace="core"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLDebug.vsprops"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\include\;..\Source\Core;..\..\support\boost\;..\..\support\python\include\;..\..\support\python\PC"
+				WarningLevel="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkLibraryDependencies="false"
+				AdditionalDependencies="RocketCore_d.lib RocketControls_d.lib python27_d.lib boost_python-vc90-mt-gyd-1_44.lib"
+				OutputFile="..\bin\_rocketcontrols_d.pyd"
+				AdditionalLibraryDirectories="..\bin;..\..\support\lib"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLRelease.vsprops"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\include\;..\Source\Core;..\..\support\boost\;..\..\support\python\include\;..\..\support\python\PC"
+				WarningLevel="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkLibraryDependencies="false"
+				AdditionalDependencies="RocketCore.lib RocketControls.lib python27.lib boost_python-vc90-mt-1_44.lib"
+				OutputFile="..\bin\_rocketcontrols.pyd"
+				AdditionalLibraryDirectories="..\bin;..\..\support\lib"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Elements"
+			>
+			<File
+				RelativePath="..\Source\Controls\Python\DataGridRowProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\DataGridRowProxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\ElementInterface.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\ElementInterface.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\SelectOptionProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\SelectOptionProxy.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Precompiled Header"
+			>
+			<File
+				RelativePath="..\Source\Controls\Python\precompiled.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\precompiled.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="DataSource"
+			>
+			<File
+				RelativePath="..\Source\Controls\Python\DataFormatterWrapper.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\DataFormatterWrapper.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\DataSourceWrapper.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Controls\Python\DataSourceWrapper.h"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\Source\Controls\Python\Module.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\Source\Controls\Python\Module.h"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

+ 23 - 21
Build/RocketCore.vcproj

@@ -19,7 +19,6 @@
 		<Configuration
 			Name="Debug|Win32"
 			OutputDirectory="$(SolutionDir)$(ConfigurationName)"
-			IntermediateDirectory="build\$(ProjectName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLDebug.vsprops"
 			CharacterSet="1"
@@ -42,7 +41,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="..\Include;..\..\support\freetype\include"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -85,7 +84,6 @@
 		</Configuration>
 		<Configuration
 			Name="Release|Win32"
-			IntermediateDirectory="build\$(ProjectName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLRelease.vsprops"
 			CharacterSet="1"
@@ -109,7 +107,7 @@
 			<Tool
 				Name="VCCLCompilerTool"
 				AdditionalIncludeDirectories="..\Include;..\..\support\freetype\include"
-				UsePrecompiledHeader="0"
+				UsePrecompiledHeader="2"
 			/>
 			<Tool
 				Name="VCManagedResourceCompilerTool"
@@ -160,12 +158,20 @@
 			<File
 				RelativePath="..\Source\Core\precompiled.cpp"
 				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
 				<FileConfiguration
 					Name="Release|Win32"
 					>
 					<Tool
 						Name="VCCLCompilerTool"
-						UsePrecompiledHeader="0"
+						UsePrecompiledHeader="1"
 					/>
 				</FileConfiguration>
 			</File>
@@ -1182,22 +1188,6 @@
 				>
 			</File>
 		</Filter>
-		<Filter
-			Name="Trial"
-			>
-			<File
-				RelativePath="..\Source\Core\TrialLogo.cpp"
-				>
-			</File>
-			<File
-				RelativePath="..\Source\Core\TrialLogo.h"
-				>
-			</File>
-			<File
-				RelativePath="..\Source\Core\TrialLogoTexture.h"
-				>
-			</File>
-		</Filter>
 		<Filter
 			Name="Core"
 			>
@@ -1436,6 +1426,18 @@
 					RelativePath="..\Include\Rocket\Core\Variant.inl"
 					>
 				</File>
+				<File
+					RelativePath="..\Source\Core\Vector2.cpp"
+					>
+				</File>
+				<File
+					RelativePath="..\Include\Rocket\Core\Vector2.h"
+					>
+				</File>
+				<File
+					RelativePath="..\Include\Rocket\Core\Vector2.inl"
+					>
+				</File>
 				<File
 					RelativePath="..\Source\Core\WString.cpp"
 					>

+ 377 - 0
Build/RocketCorePython.vcproj

@@ -0,0 +1,377 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="RocketCorePython"
+	ProjectGUID="{286AC8CC-432A-4B7C-C497-2CF315AEE1FE}"
+	RootNamespace="core"
+	Keyword="Win32Proj"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLDebug.vsprops"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\include\;..\Source\Core;..\..\support\boost\;..\..\support\python\include\;..\..\support\python\PC"
+				WarningLevel="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkLibraryDependencies="false"
+				AdditionalDependencies="RocketCore_d.lib python27_d.lib boost_python-vc90-mt-gyd-1_44.lib"
+				OutputFile="..\bin\_rocketcore_d.pyd"
+				AdditionalLibraryDirectories="..\bin;..\..\support\lib"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLRelease.vsprops"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\include\;..\Source\Core;..\..\support\boost\;..\..\support\python\include\;..\..\support\python\PC"
+				WarningLevel="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				LinkLibraryDependencies="false"
+				AdditionalDependencies="RocketCore.lib python27.lib boost_python-vc90-mt-1_44.lib"
+				OutputFile="..\bin\_rocketcore.pyd"
+				AdditionalLibraryDirectories="..\bin;..\..\support\lib"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Context"
+			>
+			<File
+				RelativePath="..\Source\Core\Python\ContextDocumentProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ContextDocumentProxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ContextInstancer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ContextInstancer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ContextInterface.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ContextInterface.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ContextProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ContextProxy.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Elements"
+			>
+			<File
+				RelativePath="..\Source\Core\Python\ElementAttributeProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementAttributeProxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementChildrenProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementChildrenProxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementDocumentWrapper.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementDocumentWrapper.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\ElementInstancer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementInterface.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementInterface.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementStyleProxy.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\ElementStyleProxy.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\ElementWrapper.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Events"
+			>
+			<File
+				RelativePath="..\Source\Core\Python\EventInstancer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventInstancer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventInterface.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventInterface.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventListener.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventListener.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventListenerInstancer.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventListenerInstancer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventWrapper.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\EventWrapper.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Precompiled Header"
+			>
+			<File
+				RelativePath="..\Source\Core\Python\precompiled.cpp"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\precompiled.h"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Core"
+			>
+			<File
+				RelativePath="..\Source\Core\Python\Converters.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\ConverterScriptObject.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\Interfaces.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\NameIndexInterface.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\PickleTypeConverter.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\Python.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Source\Core\Python\Utilities.cpp"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\Utilities.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\VectorInterface.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\Wrapper.h"
+				>
+			</File>
+			<File
+				RelativePath="..\Include\Rocket\Core\Python\WrapperIter.h"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath="..\Include\Rocket\Core\Python\Header.h"
+			>
+		</File>
+		<File
+			RelativePath="..\Source\Core\Python\Module.cpp"
+			>
+		</File>
+		<File
+			RelativePath="..\Source\Core\Python\Module.h"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

+ 0 - 2
Build/RocketDebugger.vcproj

@@ -19,7 +19,6 @@
 		<Configuration
 			Name="Debug|Win32"
 			OutputDirectory="$(IntDir)"
-			IntermediateDirectory="build\$(ProjectName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLDebug.vsprops"
 			CharacterSet="1"
@@ -88,7 +87,6 @@
 		<Configuration
 			Name="Release|Win32"
 			OutputDirectory="$(IntDir)"
-			IntermediateDirectory="build\$(ProjectName)\$(ConfigurationName)"
 			ConfigurationType="2"
 			InheritedPropertySheets=".\vsprops\BuildConfigurationDLLRelease.vsprops"
 			CharacterSet="1"

+ 58 - 0
Build/RocketPython.sln

@@ -0,0 +1,58 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RocketCorePython", "RocketCorePython.vcproj", "{286AC8CC-432A-4B7C-C497-2CF315AEE1FE}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B} = {1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RocketCore", "RocketCore.vcproj", "{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RocketDebugger", "RocketDebugger.vcproj", "{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41A}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B} = {1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RocketControls", "RocketControls.vcproj", "{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B} = {1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "RocketControlsPython", "RocketControlsPython.vcproj", "{206AC8CC-432B-4B7C-C497-2CF315AEE1C1}"
+	ProjectSection(ProjectDependencies) = postProject
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B} = {1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41B} = {1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41B}
+		{286AC8CC-432A-4B7C-C497-2CF315AEE1FE} = {286AC8CC-432A-4B7C-C497-2CF315AEE1FE}
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{286AC8CC-432A-4B7C-C497-2CF315AEE1FE}.Debug|Win32.ActiveCfg = Debug|Win32
+		{286AC8CC-432A-4B7C-C497-2CF315AEE1FE}.Debug|Win32.Build.0 = Debug|Win32
+		{286AC8CC-432A-4B7C-C497-2CF315AEE1FE}.Release|Win32.ActiveCfg = Release|Win32
+		{286AC8CC-432A-4B7C-C497-2CF315AEE1FE}.Release|Win32.Build.0 = Release|Win32
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}.Debug|Win32.Build.0 = Debug|Win32
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}.Release|Win32.ActiveCfg = Release|Win32
+		{1AAC0B29-AEB9-4E3F-8EDF-B46F8949C41B}.Release|Win32.Build.0 = Release|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41A}.Debug|Win32.Build.0 = Debug|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41A}.Release|Win32.ActiveCfg = Release|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41A}.Release|Win32.Build.0 = Release|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41B}.Debug|Win32.Build.0 = Debug|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41B}.Release|Win32.ActiveCfg = Release|Win32
+		{1AAC0B29-AEC9-4E3F-9EDF-B56F8949C41B}.Release|Win32.Build.0 = Release|Win32
+		{206AC8CC-432B-4B7C-C497-2CF315AEE1C1}.Debug|Win32.ActiveCfg = Debug|Win32
+		{206AC8CC-432B-4B7C-C497-2CF315AEE1C1}.Debug|Win32.Build.0 = Debug|Win32
+		{206AC8CC-432B-4B7C-C497-2CF315AEE1C1}.Release|Win32.ActiveCfg = Release|Win32
+		{206AC8CC-432B-4B7C-C497-2CF315AEE1C1}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 175 - 0
Build/builddist.py

@@ -0,0 +1,175 @@
+#!/usr/bin/python
+import subprocess
+import os
+import sys
+import getopt
+import traceback
+import shutil
+import re
+
+def Usage(args):
+	print sys.argv[0] + ' [-hp] [-r revision]'
+	print ''
+	print ' -r\t: Specify rocket internal revision number'
+	print ' -p\t: Include python libraries'
+	print ' -s\t: Include full source code and build files'
+	print ' -h\t: This help screen'
+	print ''
+	sys.exit()
+
+def CheckVSVars():
+	if 'VCINSTALLDIR' in os.environ:
+		return
+		
+	if not 'VS90COMNTOOLS' in os.environ:
+		print "Unable to find VS9 install - check your VS90COMNTOOLS environment variable"
+		sys.exit()
+		
+	path = os.environ['VS90COMNTOOLS']
+	subprocess.call('"' + path + 'vsvars32.bat" > NUL && ' + ' '.join(sys.argv))
+	sys.exit()
+	
+def ProcessOptions(args):
+
+	options = {'ROCKET_VERSION': 'custom', 'BUILD_PYTHON': False, 'FULL_SOURCE': False, 'ARCHIVE_NAME': 'libRocket-sdk'}
+	
+	try:
+		optlist, args = getopt.getopt(args, 'r:phs')
+	except getopt.GetoptError, e:
+		print '\nError: ' + str(e) + '\n'
+		Usage(args)
+	
+	for opt in optlist:
+		if opt[0] == '-h':
+			Usage(args)
+		if opt[0] == '-r':
+			options['ROCKET_VERSION'] = opt[1]
+		if opt[0] == '-p':
+			options['BUILD_PYTHON'] = True
+		if opt[0] == '-s':
+			options['FULL_SOURCE'] = True
+			options['ARCHIVE_NAME'] = 'libRocket-source'
+			
+	return options
+		
+def Build(project, configs, defines = {}):
+
+	old_cl = ''
+	if 'CL' in os.environ:
+		old_cl = os.environ['CL']
+	else:
+		os.environ['CL'] = ''
+
+	for name, value in defines.iteritems():
+		os.environ['CL'] = os.environ['CL'] + ' /D' + name + '=' + value
+		
+	for config in configs:
+		cmd = '"' + os.environ['VCINSTALLDIR'] + '\\vcpackages\\vcbuild.exe" /rebuild ' + project + '.vcproj "' + config + '|Win32"'
+		ret = subprocess.call(cmd)
+		if ret != 0:
+			print "Failed to build " + project
+			sys.exit()
+			
+	os.environ['CL'] = old_cl
+	
+def DelTree(path):
+	if not os.path.exists(path):
+		return
+		
+	print 'Deleting ' + path + '...'
+	for root, dirs, files in os.walk(path, topdown=False):
+		for name in files:
+			os.remove(os.path.join(root, name))
+		for name in dirs:
+			os.rmdir(os.path.join(root, name))
+
+def CopyFiles(source_path, destination_path, file_list = [], exclude_list = [], preserve_paths = True):
+	working_directory = os.getcwd()
+	source_directory = os.path.abspath(os.path.join(working_directory, os.path.normpath(source_path)))
+	destination_directory = os.path.abspath(os.path.join(working_directory, os.path.normpath(destination_path)))
+	print "Copying " + source_directory + " to " + destination_directory + " ..."
+	
+	if not os.path.exists(source_directory):
+		print "Warning: Source directory " + source_directory + " doesn't exist."
+		return False
+	
+	for root, directories, files in os.walk(source_directory, False):
+			for file in files:
+				
+				# Skip files not in the include list.
+				if len(file_list) > 0:
+					included = False
+					for include in file_list:
+						if re.search(include, os.path.join(root, file).replace('\\', '/')):
+							included = True
+							break;
+
+					if not included:
+						continue
+				
+				# Determine our subdirectory.
+				subdir = root.replace(source_directory, "")
+				if subdir[:1] == os.path.normcase('/'):
+					subdir = subdir[1:]
+				
+				# Skip paths in the exclude list
+				excluded = False
+				for exclude in exclude_list:
+					if re.search(exclude, os.path.join(root, file).replace('\\', '/')):
+						excluded = True
+						break
+						
+				if excluded:
+					continue
+				
+				# Build up paths
+				source_file = os.path.join(root, file)
+				destination_subdir = destination_directory
+				if preserve_paths:
+					destination_subdir = os.path.join(destination_directory, subdir)
+				
+				if not os.path.exists(destination_subdir):
+					os.makedirs(destination_subdir)
+				destination_file = os.path.join(destination_subdir, file)
+				
+				# Copy files
+				try:
+					shutil.copy(source_file, destination_file)
+				except:
+					print "Failed copying " + source_file + " to " + destination_file
+					traceback.print_exc()
+					
+	return True
+	
+def Archive(archive_name, path):
+	cwd = os.getcwd()
+	os.chdir(path + '/..')
+	file_name = archive_name + '.zip'
+	if os.path.exists(file_name):
+		os.unlink(file_name)
+	os.system('zip -r ' + file_name + ' ' + path[path.rfind('/')+1:])
+	os.chdir(cwd)
+	
+def main():
+	CheckVSVars()
+	options = ProcessOptions(sys.argv[1:])
+	
+	Build('RocketCore', ['Debug', 'Release'], {'ROCKET_VERSION': '\\"' + options['ROCKET_VERSION'] + '\\"'})
+	Build('RocketControls', ['Debug', 'Release'])
+	Build('RocketDebugger', ['Debug', 'Release'])
+	if options['BUILD_PYTHON']:
+		Build('RocketCorePython', ['Debug', 'Release'])
+		Build('RocketControlsPython', ['Debug', 'Release'])
+		
+	DelTree('../dist/libRocket')
+	CopyFiles('../Include', '../dist/libRocket/Include')
+	CopyFiles('../bin', '../dist/libRocket/bin', [], ['\.ilk$', '\.pdb$', '\.exp$', '^_.*lib$'])
+	CopyFiles('../Samples', '../dist/libRocket/Samples', ['\.h$', '\.cpp$', '\.vcproj$', '\.sln$', '\.vcproj\.user$', '\.rml$', '\.rcss$', '\.tga$', '\.py$', '\.otf$', '\.txt$'])
+	if options['FULL_SOURCE']:
+		CopyFiles('../Build', '../dist/libRocket/Build', ['\.vcproj$', '\.sln$', '\.vsprops$', '\.py$'])
+		CopyFiles('../Source', '../dist/libRocket/Source', ['\.cpp$', '\.h$', '\.inl$'])
+	shutil.copyfile('../changelog.txt', '../dist/libRocket/changelog.txt')
+	Archive(options['ARCHIVE_NAME'] + '-' + options['ROCKET_VERSION'], '../dist/libRocket');
+	
+if __name__ == '__main__':
+	main()

+ 70 - 70
Build/vsprops/BuildConfigurationBase.vsprops

@@ -1,70 +1,70 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="BuildConfigurationBase"
-	OutputDirectory="$(IntDir)"
-	IntermediateDirectory="obj\$(ConfigurationName)"
-	CharacterSet="2"
-	BuildLogFile="$(IntDir)\BuildLog.htm"
-	>
-	<Tool
-		Name="VCPreBuildEventTool"
-	/>
-	<Tool
-		Name="VCCustomBuildTool"
-	/>
-	<Tool
-		Name="VCXMLDataGeneratorTool"
-	/>
-	<Tool
-		Name="VCWebServiceProxyGeneratorTool"
-	/>
-	<Tool
-		Name="VCMIDLTool"
-	/>
-	<Tool
-		Name="VCCLCompilerTool"
-		UsePrecompiledHeader="2"
-		PrecompiledHeaderThrough="precompiled.h"
-		ObjectFile="$(IntDir)\"
-		ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
-		XMLDocumentationFileName="$(IntDir)\"
-		WarningLevel="4"
-		Detect64BitPortabilityProblems="false"
-	/>
-	<Tool
-		Name="VCManagedResourceCompilerTool"
-	/>
-	<Tool
-		Name="VCResourceCompilerTool"
-	/>
-	<Tool
-		Name="VCPreLinkEventTool"
-	/>
-	<Tool
-		Name="VCLibrarianTool"
-	/>
-	<Tool
-		Name="VCLinkerTool"
-		LinkLibraryDependencies="false"
-		GenerateDebugInformation="true"
-		SubSystem="2"
-		TargetMachine="1"
-	/>
-	<Tool
-		Name="VCALinkTool"
-	/>
-	<Tool
-		Name="VCXDCMakeTool"
-	/>
-	<Tool
-		Name="VCBscMakeTool"
-	/>
-	<Tool
-		Name="VCFxCopTool"
-	/>
-	<Tool
-		Name="VCPostBuildEventTool"
-	/>
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BuildConfigurationBase"
+	OutputDirectory="$(IntDir)"
+	IntermediateDirectory="build\$(ProjectName)\$(ConfigurationName)"
+	CharacterSet="2"
+	BuildLogFile="$(IntDir)\BuildLog.htm"
+	>
+	<Tool
+		Name="VCPreBuildEventTool"
+	/>
+	<Tool
+		Name="VCCustomBuildTool"
+	/>
+	<Tool
+		Name="VCXMLDataGeneratorTool"
+	/>
+	<Tool
+		Name="VCWebServiceProxyGeneratorTool"
+	/>
+	<Tool
+		Name="VCMIDLTool"
+	/>
+	<Tool
+		Name="VCCLCompilerTool"
+		UsePrecompiledHeader="2"
+		PrecompiledHeaderThrough="precompiled.h"
+		ObjectFile="$(IntDir)\"
+		ProgramDataBaseFileName="$(IntDir)\vc80.pdb"
+		XMLDocumentationFileName="$(IntDir)\"
+		WarningLevel="4"
+		Detect64BitPortabilityProblems="false"
+	/>
+	<Tool
+		Name="VCManagedResourceCompilerTool"
+	/>
+	<Tool
+		Name="VCResourceCompilerTool"
+	/>
+	<Tool
+		Name="VCPreLinkEventTool"
+	/>
+	<Tool
+		Name="VCLibrarianTool"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		LinkLibraryDependencies="false"
+		GenerateDebugInformation="true"
+		SubSystem="2"
+		TargetMachine="1"
+	/>
+	<Tool
+		Name="VCALinkTool"
+	/>
+	<Tool
+		Name="VCXDCMakeTool"
+	/>
+	<Tool
+		Name="VCBscMakeTool"
+	/>
+	<Tool
+		Name="VCFxCopTool"
+	/>
+	<Tool
+		Name="VCPostBuildEventTool"
+	/>
+</VisualStudioPropertySheet>

+ 7 - 7
Build/vsprops/BuildConfigurationDLL.vsprops

@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="EMPBuildConfigurationDLL"
-	>
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="EMPBuildConfigurationDLL"
+	>
+</VisualStudioPropertySheet>

+ 17 - 17
Build/vsprops/BuildConfigurationDLLDebug.vsprops

@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="BuildConfigurationDLLDebug"
-	InheritedPropertySheets="BuildConfigurationDebug.vsprops;BuildConfigurationDLL.vsprops"
-	>
-	<Tool
-		Name="VCCLCompilerTool"
-		RuntimeLibrary="3"
-		PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;$(ProjectName)_EXPORTS"
-	/>
-	<Tool
-		Name="VCLinkerTool"
-		ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
-	/>
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BuildConfigurationDLLDebug"
+	InheritedPropertySheets="BuildConfigurationDebug.vsprops;BuildConfigurationDLL.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		RuntimeLibrary="3"
+		PreprocessorDefinitions="WIN32;_DEBUG;_USRDLL;$(ProjectName)_EXPORTS"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
+	/>
+</VisualStudioPropertySheet>

+ 17 - 17
Build/vsprops/BuildConfigurationDLLRelease.vsprops

@@ -1,17 +1,17 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="BuildConfigurationDLLRelease"
-	InheritedPropertySheets="BuildConfigurationRelease.vsprops;BuildConfigurationDLL.vsprops"
-	>
-	<Tool
-		Name="VCCLCompilerTool"
-		RuntimeLibrary="2"
-		PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;$(ProjectName)_EXPORTS"
-	/>
-	<Tool
-		Name="VCLinkerTool"
-		ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
-	/>
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BuildConfigurationDLLRelease"
+	InheritedPropertySheets="BuildConfigurationRelease.vsprops;BuildConfigurationDLL.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		RuntimeLibrary="2"
+		PreprocessorDefinitions="WIN32;NDEBUG;_USRDLL;$(ProjectName)_EXPORTS"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		ProgramDatabaseFile="$(IntDir)\$(TargetName).pdb"
+	/>
+</VisualStudioPropertySheet>

+ 21 - 21
Build/vsprops/BuildConfigurationDebug.vsprops

@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="BuildConfigurationDebug"
-	InheritedPropertySheets="BuildConfigurationBase.vsprops"
-	>
-	<Tool
-		Name="VCCLCompilerTool"
-		Optimization="0"
-		MinimalRebuild="true"
-		BasicRuntimeChecks="3"
-		RuntimeLibrary="3"
-		DebugInformationFormat="3"
-		BufferSecurityCheck="true"
-	/>
-	<Tool
-		Name="VCLinkerTool"
-		LinkIncremental="2"
-	/>
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BuildConfigurationDebug"
+	InheritedPropertySheets="BuildConfigurationBase.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		Optimization="0"
+		MinimalRebuild="true"
+		BasicRuntimeChecks="3"
+		RuntimeLibrary="3"
+		DebugInformationFormat="3"
+		BufferSecurityCheck="true"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		LinkIncremental="2"
+	/>
+</VisualStudioPropertySheet>

+ 20 - 20
Build/vsprops/BuildConfigurationRelease.vsprops

@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="BuildConfigurationRelease"
-	InheritedPropertySheets="BuildConfigurationBase.vsprops"
-	>
-	<Tool
-		Name="VCCLCompilerTool"
-		RuntimeLibrary="2"
-		DebugInformationFormat="3"
-	/>
-	<Tool
-		Name="VCLinkerTool"
-		LinkIncremental="1"
-		OptimizeReferences="2"
-		EnableCOMDATFolding="2"
-		LinkTimeCodeGeneration="1"
-	/>
-</VisualStudioPropertySheet>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="BuildConfigurationRelease"
+	InheritedPropertySheets="BuildConfigurationBase.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		RuntimeLibrary="2"
+		DebugInformationFormat="3"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		LinkIncremental="1"
+		OptimizeReferences="2"
+		EnableCOMDATFolding="2"
+		LinkTimeCodeGeneration="1"
+	/>
+</VisualStudioPropertySheet>

+ 1 - 1
Include/Rocket/Controls/Clipboard.h

@@ -48,7 +48,7 @@ public:
 	/// Set the contents of the clipboard.
 	static void Set(const Rocket::Core::WString& content);
 
-	#if defined EMP_PLATFORM_WIN32
+	#if defined ROCKET_PLATFORM_WIN32
 	/// Set the window handle of the application. This shouldn't need to be called unless the host
 	/// application opens multiple windows, or opens and closes windows, etc.
 	static void SetHWND(void* hwnd);

+ 1 - 1
Include/Rocket/Controls/Header.h

@@ -30,7 +30,7 @@
 
 #include <Rocket/Core/Platform.h>
 
-#ifdef EMP_PLATFORM_WIN32
+#ifdef ROCKET_PLATFORM_WIN32
 	#ifdef RocketControls_EXPORTS
 		#define ROCKETCONTROLS_API __declspec(dllexport)
 	#else

+ 22 - 6
Include/Rocket/Core/Colour.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 

+ 3 - 5
Include/Rocket/Core/Core.h

@@ -28,14 +28,12 @@
 #ifndef ROCKETCORECORE_H
 #define ROCKETCORECORE_H
 
-#include "Types.h"
-//#include <Rocket/Core/Types.h>
-//#include <Rocket/Core/Math.h>
-//#include <Rocket/Core/Header.h>
+#include <Rocket/Core/Types.h>
+#include <Rocket/Core/Math.h>
+#include <Rocket/Core/Header.h>
 #include <Rocket/Core/Box.h>
 #include <Rocket/Core/Context.h>
 #include <Rocket/Core/ContextInstancer.h>
-#include <Rocket/Core.h>
 #include <Rocket/Core/Decorator.h>
 #include <Rocket/Core/DecoratorInstancer.h>
 #include <Rocket/Core/Element.h>

+ 25 - 25
Include/Rocket/Core/Debug.h

@@ -31,55 +31,55 @@
 #include <Rocket/Core/Header.h>
 
 // Define for breakpointing.
-#if defined (EMP_PLATFORM_WIN32)
-#define EMP_BREAK _asm { int 0x03 }
-#elif defined (EMP_PLATFORM_LINUX)
-#define EMP_BREAK asm ("int $0x03" )
-#elif defined (EMP_PLATFORM_MACOSX)
-#define EMP_BREAK _asm { int 0x03 }
+#if defined (ROCKET_PLATFORM_WIN32)
+#define ROCKET_BREAK _asm { int 0x03 }
+#elif defined (ROCKET_PLATFORM_LINUX)
+#define ROCKET_BREAK asm ("int $0x03" )
+#elif defined (ROCKET_PLATFORM_MACOSX)
+#define ROCKET_BREAK _asm { int 0x03 }
 #endif
 
-#define EMP_STATIC_ASSERT(cond, msg) typedef char msg[(cond) ? 1 : 0]
+#define ROCKET_STATIC_ASSERT(cond, msg) typedef char msg[(cond) ? 1 : 0]
 
-// Define the LT_ASSERT and EMP_VERIFY macros.
-#if 1 //!defined EMP_DEBUG
-#define EMP_ASSERT(x)
-#define EMP_ASSERTMSG(x, m)
-#define EMP_ERROR
-#define EMP_ERRORMSG(m)
-#define EMP_VERIFY(x) x
+// Define the LT_ASSERT and ROCKET_VERIFY macros.
+#if 1 //!defined ROCKET_DEBUG
+#define ROCKET_ASSERT(x)
+#define ROCKET_ASSERTMSG(x, m)
+#define ROCKET_ERROR
+#define ROCKET_ERRORMSG(m)
+#define ROCKET_VERIFY(x) x
 #else
 namespace Rocket {
 namespace Core {
 
 bool ROCKETCORE_API Assert(const char* message, const char* file, int line);
-#define EMP_ASSERT(x) \
+#define ROCKET_ASSERT(x) \
 if (!(x)) \
 { \
-	if (!Rocket::Core::Assert("EMP_ASSERT("#x")", __FILE__, __LINE__ )) \
+	if (!Rocket::Core::Assert("ROCKET_ASSERT("#x")", __FILE__, __LINE__ )) \
 	{ \
-		EMP_BREAK; \
+		ROCKET_BREAK; \
 	} \
 }
-#define EMP_ASSERTMSG(x, m)	\
+#define ROCKET_ASSERTMSG(x, m)	\
 if (!(x)) \
 { \
 	if (!Rocket::Core::Assert(m, __FILE__, __LINE__ )) \
 	{ \
-		EMP_BREAK; \
+		ROCKET_BREAK; \
 	} \
 }
-#define EMP_ERROR \
-if (!Rocket::Core::Assert("EMP_ERROR", __FILE__, __LINE__)) \
+#define ROCKET_ERROR \
+if (!Rocket::Core::Assert("ROCKET_ERROR", __FILE__, __LINE__)) \
 { \
-	EMP_BREAK; \
+	ROCKET_BREAK; \
 }
-#define EMP_ERRORMSG(m) \
+#define ROCKET_ERRORMSG(m) \
 if (!Rocket::Core::Assert(m, __FILE__, __LINE__)) \
 { \
-	EMP_BREAK; \
+	ROCKET_BREAK; \
 }
-#define EMP_VERIFY(x) EMP_ASSERT(x)
+#define ROCKET_VERIFY(x) ROCKET_ASSERT(x)
 
 }
 }

+ 22 - 6
Include/Rocket/Core/Dictionary.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 

+ 23 - 7
Include/Rocket/Core/Element.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -15,7 +31,7 @@ template < typename T >
 T Element::GetProperty(const String& name)
 {
 	const Property* property = GetProperty(name);
-	EMP_ASSERTMSG(property, "Invalid property name.");
+	ROCKET_ASSERTMSG(property, "Invalid property name.");
 	return property->Get< T >();
 }
 

+ 22 - 6
Include/Rocket/Core/ElementInstancerGeneric.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ * 
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
  *
  */
 

+ 2 - 2
Include/Rocket/Core/EventListener.h

@@ -52,12 +52,12 @@ public:
 	virtual void ProcessEvent(Event& event) = 0;
 
 	/// Called when the listener has been attached to a new Element
-	virtual void OnAttach(Element* EMP_UNUSED(element))
+	virtual void OnAttach(Element* ROCKET_UNUSED(element))
 	{
 	}
 
 	/// Called when the listener has been detached from a Element
-	virtual void OnDetach(Element* EMP_UNUSED(element))
+	virtual void OnDetach(Element* ROCKET_UNUSED(element))
 	{
 	}
 };

+ 1 - 1
Include/Rocket/Core/Header.h

@@ -30,7 +30,7 @@
 
 #include <Rocket/Core/Platform.h>
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 	#if defined RocketCore_EXPORTS
 		#define ROCKETCORE_API __declspec(dllexport)
 	#else

+ 12 - 12
Include/Rocket/Core/Platform.h

@@ -29,24 +29,24 @@
 #define ROCKETCOREPLATFORM_H
 
 #if defined __WIN32__ || defined _WIN32
-	#define EMP_PLATFORM_WIN32
-	#define EMP_PLATFORM_NAME "win32"
+	#define ROCKET_PLATFORM_WIN32
+	#define ROCKET_PLATFORM_NAME "win32"
     #pragma warning(disable:4355)
 #elif defined __APPLE_CC__
-	#define EMP_PLATFORM_UNIX
-	#define EMP_PLATFORM_MACOSX
-	#define EMP_PLATFORM_NAME "macosx"
+	#define ROCKET_PLATFORM_UNIX
+	#define ROCKET_PLATFORM_MACOSX
+	#define ROCKET_PLATFORM_NAME "macosx"
 #else
-	#define EMP_PLATFORM_UNIX
-	#define EMP_PLATFORM_LINUX
-	#define EMP_PLATFORM_NAME "linux"
+	#define ROCKET_PLATFORM_UNIX
+	#define ROCKET_PLATFORM_LINUX
+	#define ROCKET_PLATFORM_NAME "linux"
 #endif
 
-#if !defined NDEBUG && !defined EMP_DEBUG
-	#define EMP_DEBUG
+#if !defined NDEBUG && !defined ROCKET_DEBUG
+	#define ROCKET_DEBUG
 #endif
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 	// alignment of a member was sensitive to packing
 	#pragma warning(disable : 4121)
 
@@ -64,6 +64,6 @@
 	#endif
 #endif
 
-#define EMP_UNUSED(x)
+#define ROCKET_UNUSED(x)
 
 #endif

+ 1 - 1
Include/Rocket/Core/Pool.h

@@ -68,7 +68,7 @@ public:
 		/// node this iterator references is invalid.
 		inline void operator++()
 		{
-			EMP_ASSERT(node != NULL);
+			ROCKET_ASSERT(node != NULL);
 			node = node->next;
 		}
 		/// Returns true if it is OK to deference or increment this

+ 23 - 7
Include/Rocket/Core/Pool.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -133,7 +149,7 @@ void Pool< PoolType >::DeallocateObject(Iterator& iterator)
 		previous_object->next = next_object;
 	else
 	{
-		EMP_ASSERT(first_allocated_node == object);
+		ROCKET_ASSERT(first_allocated_node == object);
 		first_allocated_node = next_object;
 	}
 

+ 77 - 0
Include/Rocket/Core/Python/ConverterScriptObject.h

@@ -0,0 +1,77 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 ROCKETCOREPYTHONCONVERTERSCRIPTOBJECT_H
+#define ROCKETCOREPYTHONCONVERTERSCRIPTOBJECT_H
+
+#include <Rocket/Core/Python/Python.h>
+
+namespace Rocket {
+namespace Core {
+namespace Python {
+
+/**
+	Templated class for converting from a script object to a python object
+	
+	Simply construct this class in your application start up and it
+	will do the necessary registration of the object with the boost
+	type conversion repository.
+
+	@author Lloyd Weehuizen
+ */
+
+template <typename T>
+struct ConverterScriptObject
+{
+	ConverterScriptObject()
+	{
+		// Register custom RKTElement to python converter
+		boost::python::to_python_converter< T*, ConverterScriptObject< T > >();
+	}
+
+	static PyObject* convert(T* object)
+	{
+		PyObject* pyobject = Py_None;
+		if (object)
+		{
+			PyObject* script_object = (PyObject*)object->GetScriptObject();
+			if (script_object) 
+			{
+				pyobject = script_object;
+			}
+		}
+
+		Py_INCREF(pyobject);
+		return pyobject;
+	}
+};
+
+}
+}
+}
+
+#endif

+ 5 - 5
Include/Rocket/Core/Python/ElementInstancer.h

@@ -28,9 +28,9 @@
 #ifndef ROCKETCOREPYTHONELEMENTINSTANCER_H
 #define ROCKETCOREPYTHONELEMENTINSTANCER_H
 
-#include <EMP/Core/String.h>
-#include <EMP/Core/XMLParser.h>
-#include <EMP/Core/Python/Python.h>
+#include <Rocket/Core/String.h>
+#include <Rocket/Core/XMLParser.h>
+#include <Rocket/Core/Python/Python.h>
 #include <Rocket/Core/Element.h>
 #include <Rocket/Core/ElementInstancer.h>
 #include <Rocket/Core/Python/Header.h>
@@ -66,7 +66,7 @@ public:
 	/// Instances an element given the tag name and attributes
 	/// @param tag Name of the element to instance
 	/// @param attributes vector of name value pairs
-	virtual Element* InstanceElement(Element* EMP_UNUSED(parent), const EMP::Core::String& tag, const EMP::Core::XMLAttributes& EMP_UNUSED(attributes))
+	virtual Element* InstanceElement(Element* ROCKET_UNUSED(parent), const Rocket::Core::String& tag, const Rocket::Core::XMLAttributes& ROCKET_UNUSED(attributes))
 	{
 		// Build the arguments
 		PyObject* args = PyTuple_New(1);
@@ -93,7 +93,7 @@ public:
 
 	/// Releases the given element
 	/// @param element to release
-	virtual void ReleaseElement(Element* EMP_UNUSED(element))
+	virtual void ReleaseElement(Element* ROCKET_UNUSED(element))
 	{
 		// Never release Python elements, Python will manage this for us.
 	}

+ 2 - 2
Include/Rocket/Core/Python/Header.h

@@ -28,9 +28,9 @@
 #ifndef ROCKETCOREPYTHONHEADER_H
 #define ROCKETCOREPYTHONHEADER_H
 
-#include <EMP/Core/Platform.h>
+#include <Rocket/Core/Platform.h>
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 	#if defined RocketCorePython_EXPORTS
 		#define ROCKETCOREPYTHON_API __declspec(dllexport)
 	#else

+ 123 - 0
Include/Rocket/Core/Python/NameIndexInterface.h

@@ -0,0 +1,123 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 ROCKETCOREPYTHONNAMEINDEXINTERFACE_H
+#define ROCKETCOREPYTHONNAMEINDEXINTERFACE_H
+
+#include <Rocket/Core/Python/Utilities.h>
+
+namespace Rocket {
+namespace Core {
+namespace Python {
+
+template < typename HostType >
+class NameAccessorInvalid
+{
+public:
+	python::object operator()(HostType& host, const char* name)
+	{
+		PyErr_SetString(PyExc_KeyError, "Invalid key.");
+		python::throw_error_already_set();
+
+		return python::object();
+	}
+};
+
+/**
+	Template class for generating a lightweight proxy object for providing array-style lookups on a C++ object.
+
+	@author Peter Curry
+ */
+
+template < typename HostType, typename LengthAccessor, typename IndexAccessor, typename NameAccessor = NameAccessorInvalid< HostType > >
+class NameIndexInterface : public python::def_visitor< NameIndexInterface< HostType, LengthAccessor, IndexAccessor, NameAccessor > >
+{
+public:
+	NameIndexInterface()
+	{
+	}
+
+	~NameIndexInterface()
+	{
+	}
+
+	/// Initialise the interface.
+	template < typename ClassType >
+	void visit(ClassType& _class) const
+	{
+		_class.def("__getitem__", &NameIndexInterface< HostType, LengthAccessor, IndexAccessor, NameAccessor >::GetItem);
+		_class.def("__len__", &NameIndexInterface< HostType, LengthAccessor, IndexAccessor, NameAccessor >::Len);
+	}
+
+	/// Python __getitem__ override.
+	static python::object GetItem(HostType& host, python::object key)
+	{
+		static NameAccessor name_accessor;
+		static LengthAccessor length_accessor;
+		static IndexAccessor index_accessor;
+
+		if (PyString_Check(key.ptr()))
+		{
+			return Rocket::Core::Python::Utilities::MakeObject(name_accessor(host, PyString_AsString(key.ptr())));
+		}
+		else if (PyInt_Check(key.ptr()))
+		{
+			int index = PyInt_AsLong(key.ptr());
+
+			// Support indexing from both ends.
+			if (index < 0)
+				index = length_accessor(host) + index;
+
+			// Throw exception if we're out of range, this is required to support python iteration.
+			if (index >= length_accessor(host))
+			{
+				PyErr_SetString(PyExc_IndexError, "Index out of range.");
+				python::throw_error_already_set();
+			}
+
+			return Rocket::Core::Python::Utilities::MakeObject(index_accessor(host, index));
+		}
+
+		PyErr_SetString(PyExc_KeyError, "Invalid key.");
+		python::throw_error_already_set();
+
+		return python::object();
+	}
+
+	/// Python __len__ override.
+	static int Len(HostType& host)
+	{
+		static LengthAccessor length_accessor;
+		return length_accessor(host);
+	}
+};
+
+}
+}
+}
+
+#endif

+ 87 - 0
Include/Rocket/Core/Python/PickleTypeConverter.h

@@ -0,0 +1,87 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 ROCKETCOREPICKLETYPECONVERTER_H
+#define ROCKETCOREPICKLETYPECONVERTER_H
+
+#include <Rocket/Core/TypeConverter.h>
+
+namespace Rocket {
+namespace Core {
+namespace Python {
+
+/**
+	Generic Python Pickler that does string conversion using an Rocket::Core::TypeConverter.
+
+	@author Lloyd Weehuizen
+ */
+
+template <typename T>
+class PickleTypeConverter : public python::pickle_suite
+{
+public:	
+	static python::tuple getstate(python::object obj)
+	{
+		T& object = python::extract<T&>(obj)();
+		
+		String buffer;
+		TypeConverter< T, String >::Convert(object, buffer);
+
+		return python::make_tuple(buffer.CString());
+	}
+
+	static void setstate(python::object obj, python::tuple state)
+	{
+		T& object = python::extract< T& >(obj)();	
+
+		int len = python::extract< int >(state.attr( "__len__" )());
+		if (len != 1)
+		{
+			PyErr_SetObject(PyExc_ValueError,
+							("expected 1-item tuple in call to __setstate__; got %s"
+							% state).ptr()
+				);
+			python::throw_error_already_set();
+		}
+		
+		const char* cstring = python::extract<const char*>(state[0]);
+		String string(cstring);
+		TypeConverter<String, T>::Convert(string, object);
+	}
+
+	static bool getstate_manages_dict()
+	{
+		// Tell boost we've taken care of the dictionary
+		return true; 
+	}
+};
+
+}
+}
+}
+
+#endif

+ 52 - 0
Include/Rocket/Core/Python/Python.h

@@ -0,0 +1,52 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 ROCKETCOREPYTHON_H
+#define ROCKETCOREPYTHON_H
+
+// RocketCore platform header for the ROCKET_PLATFORM_* define.
+#include <Rocket/Core/Platform.h>
+
+// Python header includes
+#include <Python.h>
+
+#ifdef ROCKET_PLATFORM_WIN32
+	#pragma warning(push)
+	#pragma warning(disable: 4244)
+#endif
+
+// Prevent Boost from auto-linking with the wrong library.
+#define BOOST_ALL_NO_LIB
+#include <boost/python.hpp>
+// remap boost::python to python for easier access
+namespace python = boost::python;
+
+#ifdef ROCKET_PLATFORM_WIN32
+	#pragma warning(pop)
+#endif
+
+#endif

+ 111 - 0
Include/Rocket/Core/Python/Utilities.h

@@ -0,0 +1,111 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 ROCKETCOREPYTHONUTILITIES_H
+#define ROCKETCOREPYTHONUTILITIES_H
+
+#include <Rocket/Core/Variant.h>
+#include <Rocket/Core/Python/Header.h>
+#include <Rocket/Core/Python/Python.h>
+
+namespace Rocket {
+namespace Core {
+namespace Python {
+
+class ROCKETCOREPYTHON_API Utilities
+{
+public:
+	/// Is the specific method name callable
+	static bool IsCallable(PyObject* self, const char* method_name);
+
+	/// Call a python function
+	/// @param[in] object Python Dictionary or Object
+	/// @param[in] method_name function or method name to call
+	/// @param[in] args Tuple of arguments
+	/// @returns The python result
+	template <typename R>
+	static R Call(PyObject* object, const char* method_name, const python::tuple& args)
+	{
+		PyObject* result = PythonCall(object, method_name, args);		
+		
+		python::converter::return_from_python<R> converter;
+		return converter(result);		
+	}	
+	/// Call a python function
+	/// @param[in] object Python Dictionary or Object to lookup the method in
+	/// @param[in] method_name function or method name to call
+	/// @param[in] args Tuple of arguments
+	/// @returns True on success
+	static bool Call(PyObject* object, const char* method_name, const python::tuple& args);
+
+	/// Creates a boost python object from an existing C++ object pointer
+	/// @param[in] object The C++ object to convert
+	/// @returns A boost::python::object referencing the same object
+	template< typename T >
+	static inline python::object MakeObject(T* object)
+	{
+		// Constructs a boost::object using a result_converter to get a pointer to the existing object
+		typename python::return_by_value::apply< T* >::type result_converter;
+		return python::object(python::handle<>(result_converter(object)));
+	}
+	/// Creates a new python object (copy) from a C++ object
+	/// @param[in] object The C++ object to convert
+	/// @returns A boost::python::object that contains a copy of the object
+	template< typename T >
+	static inline python::object MakeObject(const T& object)
+	{
+		// Constructs a boost::object copy of the C++ object
+		return python::object(object);		
+	}
+
+	/// Print any pending exceptions to stderr
+	/// @param[in] clear_error Clear the error flag
+	static void PrintError(bool clear_error = false);
+
+	/// Converts a python object into an Rocket variant.
+	/// @param[out] variant The variant to convert the object into.
+	/// @param[in] object The python object to convert.
+	/// @return True if the conversion was successful, false otherwise.
+	static bool ConvertToVariant(Variant& variant, PyObject* object);
+
+private:
+	static PyObject* PythonCall(PyObject* object, const char* method_name, const python::tuple& args );
+};
+
+// Template Specialisation for converting from a PyObject*
+template<>
+inline python::object Utilities::MakeObject< PyObject >(PyObject* object)
+{
+	return python::object(python::handle<>(python::borrowed(object)));
+}
+
+}
+}
+}
+
+#endif
+

+ 118 - 0
Include/Rocket/Core/Python/VectorInterface.h

@@ -0,0 +1,118 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 ROCKETCOREPYTHONVECTORINTERFACE_H
+#define ROCKETCOREPYTHONVECTORINTERFACE_H
+
+namespace Rocket {
+namespace Core {
+namespace Python {
+
+/**
+	Provides a list style python interface to any STL container
+	that can provide a vector style interface.
+
+	Simply contruct one of these objects to register the type
+	with python.
+	
+	VectorInterface< std::vector< std::string > >("StringList");
+
+	@author Lloyd Weehuizen
+ */
+template <typename Container>
+class VectorInterface
+{
+public:
+	VectorInterface(const char* name)
+	{
+		python::class_< Container >(name)
+			.def("__len__", &VectorInterface< Container >::Size)
+			.def("__setitem__", &VectorInterface< Container >::SetItem)
+			.def("__delitem__", &VectorInterface< Container >::DelItem)
+			.def("__getitem__", &VectorInterface< Container >::GetItem, python::return_value_policy< python::return_by_value >())
+			.def("__contains__", &VectorInterface< Container >::Contains)			
+		;
+	}
+
+	static size_t Size(const Container& container)
+	{
+		return container.size();
+	}
+
+	static void SetItem(Container& container, int index, const typename Container::value_type& value)
+	{
+		if (index < 0)
+			index = container.size() + index;
+		if (index >= (int)container.size())
+			container.resize(index + 1);
+
+		container[index] = value;
+	}
+
+	static void DelItem(Container& container, int index)
+	{
+		if (index >= (int)container.size())
+		{
+			PyErr_SetString(PyExc_IndexError, String(32, "Invalid index %d", index).CString());
+			python::throw_error_already_set();
+		}
+
+		container.erase(container.begin() + index);
+	}
+
+	static typename Container::value_type& GetItem(Container& container, int index)
+	{
+		if (index < 0)
+			index = container.size() + index;
+
+		if (index >= (int)container.size())
+		{
+			PyErr_SetString(PyExc_IndexError, String(32, "Invalid index %d", index).CString());
+			python::throw_error_already_set();
+		}
+
+		return container[index];
+	}
+
+	static bool Contains(Container& container, const typename Container::value_type& value)
+	{
+		for (typename Container::iterator itr = container.begin(); itr != container.end(); ++itr)
+		{
+			if ((*itr) == value)
+				return true;
+		}
+
+		return false;
+	}
+};
+
+}
+}
+}
+
+#endif
+

+ 67 - 0
Include/Rocket/Core/Python/Wrapper.h

@@ -0,0 +1,67 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 ROCKETCOREPYTHONWRAPPER_H
+#define ROCKETCOREPYTHONWRAPPER_H
+
+#include <Rocket/Core/Debug.h>
+#include <Rocket/Core/Python/Python.h>
+
+#include <boost/none.hpp>
+
+namespace Rocket {
+namespace Core {
+namespace Python {
+
+/**
+	Generic Python Wrapper, using boost preprocessor iteration for constructor params
+	
+	Defines a basic wrapper, then template overloads it for each variation of the
+	number of arguments.
+
+	@author Lloyd Weehuizen
+ */
+
+struct WrapperNone {};
+
+#define WRAPPER_MAX_ARGS	6
+
+#define WRAPPER_TEMPLATE_ARG(z, n, d) BOOST_PP_COMMA_IF(n) typename T##n = WrapperNone
+
+template <typename T, BOOST_PP_REPEAT_1( BOOST_PP_INC(WRAPPER_MAX_ARGS), WRAPPER_TEMPLATE_ARG, N) >
+class Wrapper {};
+
+#undef WRAPPER_TEMPLATE_ARG
+
+#define BOOST_PP_ITERATION_PARAMS_1 (3, (0, WRAPPER_MAX_ARGS, <Rocket/Core/Python/WrapperIter.h>))
+#include BOOST_PP_ITERATE()
+
+}
+}
+}
+
+#endif

+ 122 - 0
Include/Rocket/Core/Python/WrapperIter.h

@@ -0,0 +1,122 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
+ *
+ */
+
+#if !defined(BOOST_PP_IS_ITERATING)
+#  error PyWrapperIter - do not include this file!
+#endif
+
+#define N BOOST_PP_ITERATION()
+
+/**
+	Generic Python Wrapper, using Boost Preprocessor Iteration to Generate Variants
+	
+	Relies on a Rocket::Core::ReferenceCountable base class for reference counting.
+	
+	Traps ReferenceActivated/Deactivated calls and makes them behave like
+	they should for python based objects.
+	
+	@author Lloyd Weehuizen
+ */
+
+#define WRAPPER_PARAM(x, n, d) , d
+
+template < typename T BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS_Z(1, N, typename A) >
+class Wrapper< T BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_PARAMS_Z(1, N, A) BOOST_PP_REPEAT_1( BOOST_PP_SUB(BOOST_PP_INC(WRAPPER_MAX_ARGS), N), WRAPPER_PARAM, WrapperNone) > : public T
+{
+public:	
+	Wrapper(PyObject* self BOOST_PP_COMMA_IF(N) BOOST_PP_ENUM_BINARY_PARAMS_Z(1, N, A, a)) : T(BOOST_PP_ENUM_PARAMS_Z(1, N, a))
+	{
+		// Set self to NULL, so we can trap the reference deactivated and not pass it down
+		this->self = NULL;
+
+		// We have to remove the C++ reference count that all C++ objects start with here,
+		// otherwise if an object is created in python and destroyed by python, the C++ ref count will
+		// remain 1. The PyWrapperInstancer will increase the refcount again, to ensure a correct refcount
+		// if the object was created by C++
+		T::RemoveReference();
+
+		// If the C++ reference count is not 0 at this point, it means additional references have been added
+		// during the classes constructor. We have to propogate these references into python.
+		for (int i = 0; i < this->T::GetReferenceCount(); i++)
+			Py_INCREF(self);
+
+		// Store self
+		this->self = self;
+	}
+
+	Wrapper(PyObject* self, const T& other) : T(other)
+	{
+		this->self = self;		
+	}
+
+	virtual ~Wrapper()
+	{		
+		// We should only be deleted when python says the refcnt is 0, if we
+		// are being deleted prematurely, something is wrong!
+		ROCKET_ASSERTMSG(self->ob_refcnt == 0, "Python object being cleared up prematurely, reference count not 0.");
+		ROCKET_ASSERT(this->T::GetReferenceCount() == 0);
+	}
+
+	/// Override AddReference so we can push the call through to python
+	virtual void AddReference()
+	{
+		Py_INCREF(self);
+		
+		T::AddReference();
+	}
+
+	/// Overrride RemoveReference so we can push the call through to python
+	virtual void RemoveReference()
+	{
+		T::RemoveReference();
+
+		Py_DECREF(self);
+	}
+	
+	virtual int GetReferenceCount()
+	{
+		// C++ reference counts are always reflected in the python ref count
+		return self->ob_refcnt;
+	}
+
+	virtual void OnReferenceDeactivate()
+	{
+		// If self is NULL, don't pass the call down, as this is the initial 
+		// T::RemoveReference from the constructor
+		if (self)
+			T::OnReferenceDeactivate();
+	}
+
+	// Script object access
+	virtual void* GetScriptObject() const { return self; }
+
+protected:
+	PyObject* self;
+};
+
+#undef WRAPPER_PARAM
+

+ 1 - 1
Include/Rocket/Core/String.h

@@ -49,7 +49,7 @@ ROCKETCORE_API int StringBase<char>::FormatString(StringBase<char>::size_type ma
 ROCKETCORE_API String operator+(const char* cstring, const String& string);
 
 // Redefine Windows APIs as their STDC counterparts.
-#ifdef EMP_PLATFORM_WIN32
+#ifdef ROCKET_PLATFORM_WIN32
 	#define strcasecmp stricmp
 	#define strncasecmp strnicmp
 #endif

+ 29 - 13
Include/Rocket/Core/StringBase.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -65,14 +81,14 @@ StringBase< T >::StringBase(size_type count, const T character)
 }
 
 template< typename T >
-StringBase< T >::StringBase(size_type EMP_UNUSED(max_length), const T* EMP_UNUSED(fmt), ...)
+StringBase< T >::StringBase(size_type ROCKET_UNUSED(max_length), const T* ROCKET_UNUSED(fmt), ...)
 {
 	string_id = 0;
 	length = 0;
 	value = (T*)StringStorage::empty_string;
 
 	// Can't implement this at the base level, requires template specialisation
-	EMP_ERRORMSG("Not implemented.");
+	ROCKET_ERRORMSG("Not implemented.");
 }
 
 template< typename T >
@@ -255,9 +271,9 @@ void StringBase< T >::Erase(size_type index, size_type count)
 }
 
 template< typename T >
-int StringBase< T >::FormatString(size_type EMP_UNUSED(max_length), const T* EMP_UNUSED(fmt), ...)
+int StringBase< T >::FormatString(size_type ROCKET_UNUSED(max_length), const T* ROCKET_UNUSED(fmt), ...)
 {
-	EMP_ERRORMSG("Not implemented.");
+	ROCKET_ERRORMSG("Not implemented.");
 	return -1;
 }
 
@@ -461,14 +477,14 @@ StringBase< T >& StringBase< T >::operator+=(const T& add)
 template< typename T >
 const T& StringBase< T >::operator[](size_type index) const
 {
-	EMP_ASSERT(index < length);
+	ROCKET_ASSERT(index < length);
 	return value[index];
 }
 
 template< typename T >
 T& StringBase< T >::operator[](size_type index)
 {
-	EMP_ASSERT(index < length);
+	ROCKET_ASSERT(index < length);
 	return value[index];
 }
 
@@ -601,7 +617,7 @@ typename StringBase< T >::size_type StringBase< T >::_Find(const T* find, size_t
 template< typename T >
 typename StringBase< T >::size_type StringBase< T >::_RFind(const T* find, size_type find_length, size_type offset) const
 {
-	EMP_ASSERT(find_length > 0);
+	ROCKET_ASSERT(find_length > 0);
 
 	size_type needle_index = 0;	
 	size_type haystack_index = (offset < length ? offset : length) - find_length;

+ 29 - 53
Include/Rocket/Core/TypeConverter.inl

@@ -1,18 +1,34 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
 template <typename SourceType, typename DestType>
 bool TypeConverter<SourceType, DestType>::Convert(const SourceType& /*src*/, DestType& /*dest*/)
 {
-	EMP_ERRORMSG("No converter specified.");
+	ROCKET_ERRORMSG("No converter specified.");
 	return false;
 }
 
@@ -96,8 +112,8 @@ PASS_THROUGH(String);
 class ScriptInterface;
 typedef ScriptInterface* ScriptInterfacePtr;
 PASS_THROUGH(ScriptInterfacePtr);
-/*typedef void* voidPtr;
-PASS_THROUGH(voidPtr);*/
+typedef void* voidPtr;
+PASS_THROUGH(voidPtr);
 
 template<>
 class TypeConverter< Stream, Stream >
@@ -196,7 +212,7 @@ public:
 	}
 };
 
-/*template<>
+template<>
 class TypeConverter< String, URL >
 {
 public:
@@ -204,7 +220,7 @@ public:
 	{
 		return dest.SetURL(src);		
 	}
-};*/
+};
 
 template< typename DestType, typename InternalType, int count >
 class TypeConverterStringVector
@@ -238,13 +254,8 @@ public: \
 
 STRING_VECTOR_CONVERTER(Vector2i, int, 2);
 STRING_VECTOR_CONVERTER(Vector2f, float, 2);
-//STRING_VECTOR_CONVERTER(Vector3i, int, 3);
-//STRING_VECTOR_CONVERTER(Vector3f, float, 2);
-//STRING_VECTOR_CONVERTER(Vector4i, int, 4);
-//STRING_VECTOR_CONVERTER(Vector4f, float, 4);
 STRING_VECTOR_CONVERTER(Colourf, float, 4);
 STRING_VECTOR_CONVERTER(Colourb, byte, 4);
-//STRING_VECTOR_CONVERTER(Quaternion, float, 4);
 
 /////////////////////////////////////////////////
 // To String Converters
@@ -315,7 +326,7 @@ public:
 	}
 };
 
-/*template<>
+template<>
 class TypeConverter< URL, String >
 {
 public:
@@ -324,8 +335,7 @@ public:
 		dest = src.GetURL();
 		return true;
 	}
-};*/
-
+};
 
 template< typename SourceType, typename InternalType, int count >
 class TypeConverterVectorString
@@ -361,44 +371,10 @@ public: \
 
 VECTOR_STRING_CONVERTER(Vector2i, int, 2);
 VECTOR_STRING_CONVERTER(Vector2f, float, 2);
-//VECTOR_STRING_CONVERTER(Vector3i, int, 3);
-//VECTOR_STRING_CONVERTER(Vector3f, float, 3);
-//VECTOR_STRING_CONVERTER(Vector4i, int, 4);
-//VECTOR_STRING_CONVERTER(Vector4f, float, 4);
 VECTOR_STRING_CONVERTER(Colourf, float, 4);
 VECTOR_STRING_CONVERTER(Colourb, byte, 4);
-//VECTOR_STRING_CONVERTER(Quaternion, float, 4);
-
 #undef PASS_THROUGH
 #undef BASIC_CONVERTER
 #undef BASIC_CONVERTER_BOOL
 #undef STRING_VECTOR_CONVERTER
 #undef VECTOR_STRING_CONVERTER
-
-/*#define EMP_ENUM_CONVERTER( enum_type ) \
-template<> \
-class TypeConverter< enum_type, String > \
-{ \
-public: \
-	static bool Convert(const enum_type& src, String& dest) \
-	{ \
-		return dest.FormatString(32, "%d", src) > 0; \
-	} \
-};\
-\
-template<> \
-class TypeConverter< String, enum_type > \
-{ \
-public: \
-	static bool Convert(const String& src, enum_type& dest) \
-	{ \
-		int temp; \
-		if (sscanf(src.CString(), "%d", &temp) == 1) \
-		{ \
-			dest = (enum_type) temp; \
-			return true; \
-		} \
-\
-		return false; \
-	} \
-};*/

+ 1 - 1
Include/Rocket/Core/Types.h

@@ -52,7 +52,7 @@ typedef void* ScriptObject;
 }
 }
 
-#ifdef EMP_PLATFORM_WIN32
+#ifdef ROCKET_PLATFORM_WIN32
 typedef unsigned __int64 uint64_t;
 #else
 #include <inttypes.h>

+ 2 - 8
Include/Rocket/Core/Variant.h

@@ -25,8 +25,8 @@
  *
  */
 
-#ifndef EMPVARIANT_H
-#define EMPVARIANT_H
+#ifndef ROCKETVARIANT_H
+#define ROCKETVARIANT_H
 
 #include <Rocket/Core/Header.h>
 #include <Rocket/Core/Types.h>
@@ -107,15 +107,9 @@ public:
 	/// Sets a generic void* value on this variant.
 	/// @param[in] value New value to set.
 	void Set(void* value);
-	/// Sets a Quaternion value on this variant.
-	/// @param[in] value New value to set.
-	//void Set(const Quaternion& value);
 	/// Sets an EMP string value on this variant.
 	/// @param[in] value New value to set.
 	void Set(const String& value);
-	/// Sets a Vector3f value on this variant.
-	/// @param[in] value New value to set.
-	//void Set(const Vector3f& value);
 	/// Sets a Vector2f value on this variant.
 	/// @param[in] value New value to set.
 	void Set(const Vector2f& value);

+ 24 - 8
Include/Rocket/Core/Variant.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -59,7 +75,7 @@ bool Variant::GetInto(T& value) const
 			return TypeConverter< Colourb, T >::Convert(*(Colourb*)data_block->data_ptr, value);
 		break;
 
-		/*case SCRIPTINTERFACE:
+		case SCRIPTINTERFACE:
 		{
 			ScriptInterface* interface = (ScriptInterface*) data_block->data_ptr;
 			return TypeConverter< ScriptInterface*, T >::Convert(interface, value);			
@@ -68,7 +84,7 @@ bool Variant::GetInto(T& value) const
 
 		case VOIDPTR:
 			return TypeConverter< void*, T >::Convert(data_block->data_ptr, value);
-		break;*/
+		break;
 	}
 
 	return false;

+ 24 - 8
Include/Rocket/Core/Vector2.inl

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -46,7 +62,7 @@ Type Vector2< Type >::SquaredMagnitude() const
 template < typename Type >
 Vector2< Type > Vector2< Type >::Normalise() const
 {
-	EMP_STATIC_ASSERT(false, Invalid_Operation);
+	ROCKET_STATIC_ASSERT(false, Invalid_Operation);
 	return *this;
 }
 
@@ -65,7 +81,7 @@ Type Vector2< Type >::DotProduct(const Vector2< Type >& rhs) const
 template < typename Type >
 Vector2< Type > Vector2< Type >::Rotate(float theta) const
 {
-	EMP_STATIC_ASSERT(false, Invalid_Operation);
+	ROCKET_STATIC_ASSERT(false, Invalid_Operation);
 	return *this;
 }
 

+ 1 - 1
Include/Rocket/Debugger/Header.h

@@ -30,7 +30,7 @@
 
 #include <Rocket/Core/Platform.h>
 
-#ifdef EMP_PLATFORM_WIN32
+#ifdef ROCKET_PLATFORM_WIN32
 	#ifdef RocketDebugger_EXPORTS
 		#define ROCKETDEBUGGER_API __declspec(dllexport)
 	#else

+ 59 - 59
Samples/README.TXT

@@ -1,59 +1,59 @@
-=====================================================================
- libRocket Sample Applications
-=====================================================================
-
-This directory contains a collection of sample applications
-that demonstrate the use of libRocket in small, easy
-to understand applications.
-
-To build the samples, you can either use Microsoft Visual Studio
-(using the project files found within each directory), or use SCons
-(SConstruct files are present in directories except those for
-Windows-specific samples).
-
-If you build with Visual Studio, make sure the actual sample is the
-'startup project' (displayed in bold) rather than the sample shell
-project.
-
-If you build with SCons, be sure to compile the sample shell (found
-in /samples/shell/) before you compile other samples. All the
-SConstructs will build a debug build by default; to build a release
-version, run 'scons release'.
-
-When compiling Python examples, you will need to set up your build
-paths to point at the local copy of Python and Boost. If using Visual
-Studio, change these in the project's include and library paths. If
-using SCons, edit /build/config.py and change the paths as
-appropriate.
-
-Directory Overview:
-
- * assets     - This directory contains the assets shared by
-                all the sample applications.
- * basic      - This directory contains basic applications
-                that demonstrate initialisation, shutdown and
-                installing custom interfaces.
-
-                  * customlog    - setting up custom logging
-                  * directx      - using DirectX as a renderer
-                  * drag         - dragging elements between containers
-                  * loaddocument - loading your first document
-                  * ogre3d       - interfacing with Ogre3D engine
-                  * treeview     - using a nested DataSource
-
- * invaders   - A full implementation of the 1970s classic
-                Space Invaders using the libRocket interface.
-
- * pyinvaders - Python version of the above (only installed
-                with the Python plugin).
-
- * shell      - Common platform specific code used by all the 
-                samples for open windows, processing input and 
-                access files.
-                Supports Windows, MacOSX and Linux
-
- * tutorial   - Tutorial code that should be used in conjunction
-                with the tutorials on the libRocket website.
-                http://www.librocket.com/wiki/documentation
-
-=====================================================================
+=====================================================================
+ libRocket Sample Applications
+=====================================================================
+
+This directory contains a collection of sample applications
+that demonstrate the use of libRocket in small, easy
+to understand applications.
+
+To build the samples, you can either use Microsoft Visual Studio
+(using the project files found within each directory), or use SCons
+(SConstruct files are present in directories except those for
+Windows-specific samples).
+
+If you build with Visual Studio, make sure the actual sample is the
+'startup project' (displayed in bold) rather than the sample shell
+project.
+
+If you build with SCons, be sure to compile the sample shell (found
+in /samples/shell/) before you compile other samples. All the
+SConstructs will build a debug build by default; to build a release
+version, run 'scons release'.
+
+When compiling Python examples, you will need to set up your build
+paths to point at the local copy of Python and Boost. If using Visual
+Studio, change these in the project's include and library paths. If
+using SCons, edit /build/config.py and change the paths as
+appropriate.
+
+Directory Overview:
+
+ * assets     - This directory contains the assets shared by
+                all the sample applications.
+ * basic      - This directory contains basic applications
+                that demonstrate initialisation, shutdown and
+                installing custom interfaces.
+
+                  * customlog    - setting up custom logging
+                  * directx      - using DirectX as a renderer
+                  * drag         - dragging elements between containers
+                  * loaddocument - loading your first document
+                  * ogre3d       - interfacing with Ogre3D engine
+                  * treeview     - using a nested DataSource
+
+ * invaders   - A full implementation of the 1970s classic
+                Space Invaders using the libRocket interface.
+
+ * pyinvaders - Python version of the above (only installed
+                with the Python plugin).
+
+ * shell      - Common platform specific code used by all the 
+                samples for open windows, processing input and 
+                access files.
+                Supports Windows, MacOSX and Linux
+
+ * tutorial   - Tutorial code that should be used in conjunction
+                with the tutorials on the libRocket website.
+                http://www.librocket.com/wiki/documentation
+
+=====================================================================

BIN
Samples/basic/customlog/.sconsign.dblite


+ 65 - 65
Samples/basic/customlog/CustomLog.vcproj.user

@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="8.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 24 - 8
Samples/basic/customlog/src/SystemInterface.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -13,7 +29,7 @@
 #include <Rocket/Core/Platform.h>
 #include <Shell.h>
 #include <stdio.h>
-#ifdef EMP_PLATFORM_WIN32
+#ifdef ROCKET_PLATFORM_WIN32
 #include <windows.h>
 #endif
 
@@ -60,7 +76,7 @@ bool SystemInterface::LogMessage(Rocket::Core::Log::Type type, const Rocket::Cor
 		fprintf(fp, "%s (%.2f): %s", prefix, GetElapsedTime(), message.CString());
 		fflush(fp);
 
-#ifdef EMP_PLATFORM_WIN32
+#ifdef ROCKET_PLATFORM_WIN32
 		if (type == Rocket::Core::Log::LT_ASSERT)
 		{
 			Rocket::Core::String assert_message(1024, "%s\nWould you like to interrupt execution?", message.CString());

+ 22 - 6
Samples/basic/customlog/src/SystemInterface.h

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 

+ 26 - 10
Samples/basic/customlog/src/main.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -27,11 +43,11 @@ void GameLoop()
 	Shell::FlipBuffers();
 }
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.
@@ -68,7 +84,7 @@ int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
 
 	// Load a non-existent document to spawn an error message.
 	Rocket::Core::ElementDocument* invalid_document = context->LoadDocument("../../assets/invalid.rml");
-	EMP_ASSERTMSG(invalid_document != NULL, "Testing ASSERT logging.");
+	ROCKET_ASSERTMSG(invalid_document != NULL, "Testing ASSERT logging.");
 	if (invalid_document != NULL)
 	{
 		invalid_document->RemoveReference();

+ 2 - 2
Samples/basic/directx/DirectX.vcproj

@@ -55,7 +55,7 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="EMPCore_d.lib RocketCore_d.lib RocketDebugger_d.lib libpng_d.lib zlib_d.lib opengl32.lib d3d9.lib d3dx9.lib"
+				AdditionalDependencies="RocketCore_d.lib RocketDebugger_d.lib opengl32.lib d3d9.lib d3dx9.lib"
 				OutputFile="..\..\..\bin\$(ProjectName)_d.exe"
 				AdditionalLibraryDirectories="..\..\..\bin"
 				GenerateDebugInformation="true"
@@ -124,7 +124,7 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				AdditionalDependencies="EMPCore.lib RocketCore.lib RocketDebugger.lib libpng.lib zlib.lib opengl32.lib d3d9.lib d3dx9.lib"
+				AdditionalDependencies="RocketCore.lib RocketDebugger.lib opengl32.lib d3d9.lib d3dx9.lib"
 				OutputFile="..\..\..\bin\$(ProjectName).exe"
 				AdditionalLibraryDirectories="..\..\..\bin"
 				SubSystem="2"

+ 65 - 65
Samples/basic/directx/DirectX.vcproj.user

@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="8.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 46 - 10
Samples/basic/directx/src/RenderInterfaceDirectX.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -48,7 +64,7 @@ RenderInterfaceDirectX::~RenderInterfaceDirectX()
 }
 
 // Called by Rocket when it wants to render geometry that it does not wish to optimise.
-void RenderInterfaceDirectX::RenderGeometry(Rocket::Core::Vertex* EMP_UNUSED(vertices), int EMP_UNUSED(num_vertices), int* EMP_UNUSED(indices), int EMP_UNUSED(num_indices), const Rocket::Core::TextureHandle EMP_UNUSED(texture), const EMP::Core::Vector2f& EMP_UNUSED(translation))
+void RenderInterfaceDirectX::RenderGeometry(Rocket::Core::Vertex* ROCKET_UNUSED(vertices), int ROCKET_UNUSED(num_vertices), int* ROCKET_UNUSED(indices), int ROCKET_UNUSED(num_indices), const Rocket::Core::TextureHandle ROCKET_UNUSED(texture), const Rocket::Core::Vector2f& ROCKET_UNUSED(translation))
 {
 	// We've chosen to not support non-compiled geometry in the DirectX renderer. If you wanted to render non-compiled
 	// geometry, for example for very small sections of geometry, you could use DrawIndexedPrimitiveUP or write to a
@@ -95,7 +111,7 @@ Rocket::Core::CompiledGeometryHandle RenderInterfaceDirectX::CompileGeometry(Roc
 }
 
 // Called by Rocket when it wants to render application-compiled geometry.
-void RenderInterfaceDirectX::RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const EMP::Core::Vector2f& translation)
+void RenderInterfaceDirectX::RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const Rocket::Core::Vector2f& translation)
 {
 	// Build and set the transform matrix.
 	D3DXMATRIX world_transform;
@@ -148,8 +164,28 @@ void RenderInterfaceDirectX::SetScissorRegion(int x, int y, int width, int heigh
 	g_pd3dDevice->SetScissorRect(&scissor_rect);
 }
 
+// Set to byte packing, or the compiler will expand our struct, which means it won't read correctly from file
+#pragma pack(1) 
+struct TGAHeader 
+{
+	char  idLength;
+	char  colourMapType;
+	char  dataType;
+	short int colourMapOrigin;
+	short int colourMapLength;
+	char  colourMapDepth;
+	short int xOrigin;
+	short int yOrigin;
+	short int width;
+	short int height;
+	char  bitsPerPixel;
+	char  imageDescriptor;
+};
+// Restore packing
+#pragma pack()
+
 // Called by Rocket when a texture is required by the library.
-bool RenderInterfaceDirectX::LoadTexture(Rocket::Core::TextureHandle& texture_handle, EMP::Core::Vector2i& texture_dimensions, const EMP::Core::String& source)
+bool RenderInterfaceDirectX::LoadTexture(Rocket::Core::TextureHandle& texture_handle, Rocket::Core::Vector2i& texture_dimensions, const Rocket::Core::String& source)
 {
 	Rocket::Core::FileInterface* file_interface = Rocket::Core::GetFileInterface();
 	Rocket::Core::FileHandle file_handle = file_interface->Open(source);
@@ -218,7 +254,7 @@ bool RenderInterfaceDirectX::LoadTexture(Rocket::Core::TextureHandle& texture_ha
 }
 
 // Called by Rocket when a texture is required to be built from an internally-generated sequence of pixels.
-bool RenderInterfaceDirectX::GenerateTexture(Rocket::Core::TextureHandle& texture_handle, const byte* source, const EMP::Core::Vector2i& source_dimensions)
+bool RenderInterfaceDirectX::GenerateTexture(Rocket::Core::TextureHandle& texture_handle, const byte* source, const Rocket::Core::Vector2i& source_dimensions)
 {
 	// Create a Direct3DTexture9, which will be set as the texture handle. Note that we only create one surface for
 	// this texture; because we're rendering in a 2D context, mip-maps are not required.

+ 23 - 7
Samples/basic/directx/src/RenderInterfaceDirectX.h

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -28,7 +44,7 @@ public:
 	virtual ~RenderInterfaceDirectX();
 
 	/// Called by Rocket when it wants to render geometry that it does not wish to optimise.
-	virtual void RenderGeometry(Rocket::Core::Vertex* vertices, int num_vertices, short int* indices, int num_indices, Rocket::Core::TextureHandle texture, const Rocket::Core::Vector2f& translation);
+	virtual void RenderGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture, const Rocket::Core::Vector2f& translation);
 
 	/// Called by Rocket when it wants to compile geometry it believes will be static for the forseeable future.
 	virtual Rocket::Core::CompiledGeometryHandle CompileGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture);

+ 27 - 11
Samples/basic/directx/src/main.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -107,15 +123,15 @@ void GameLoop()
 	g_pd3dDevice->Present(NULL, NULL, NULL, NULL);
 }
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 {
 	// Generic OS initialisation, creates a window and does not attach OpenGL.
-	if (!Shell::Initialise("../../Samples/basic/directx/") ||
+	if (!Shell::Initialise("../Samples/basic/directx/") ||
 		!Shell::OpenWindow("DirectX Sample", false))
 	{
 		Shell::Shutdown();
@@ -141,7 +157,7 @@ int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
 	Rocket::Core::Initialise();
 
 	// Create the main Rocket context and set it on the shell's input layer.
-	context = Rocket::Core::CreateContext("main", EMP::Core::Vector2i(1024, 768));
+	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(1024, 768));
 	if (context == NULL)
 	{
 		Rocket::Core::Shutdown();

+ 65 - 65
Samples/basic/drag/Drag.vcproj.user

@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="8.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 27 - 0
Samples/basic/drag/src/DragListener.cpp

@@ -1,3 +1,30 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 "DragListener.h"
 #include <Rocket/Core/Element.h>
 

+ 27 - 0
Samples/basic/drag/src/DragListener.h

@@ -1,3 +1,30 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 DRAGLISTENER_H
 #define DRAGLISTENER_H
 

+ 27 - 0
Samples/basic/drag/src/Inventory.cpp

@@ -1,3 +1,30 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 "Inventory.h"
 #include <Rocket/Core/Factory.h>
 #include "DragListener.h"

+ 27 - 0
Samples/basic/drag/src/Inventory.h

@@ -1,3 +1,30 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 INVENTORY_H
 #define INVENTORY_H
 

+ 25 - 9
Samples/basic/drag/src/main.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -27,11 +43,11 @@ void GameLoop()
 	Shell::FlipBuffers();
 }
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.

BIN
Samples/basic/loaddocument/.sconsign.dblite


+ 65 - 65
Samples/basic/loaddocument/LoadDocument.vcproj.user

@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="8.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 25 - 9
Samples/basic/loaddocument/src/main.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -26,11 +42,11 @@ void GameLoop()
 	Shell::FlipBuffers();
 }
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.

+ 4 - 4
Samples/basic/ogre3d/Ogre3D.vcproj

@@ -57,8 +57,8 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="RocketCore_d.lib RocketControls_d.lib RocketDebugger_d.lib OgreMain_d.lib OIS_d.lib"
-				OutputFile="..\..\..\..\..\packages\bin\$(ProjectName)_d.exe"
-				AdditionalLibraryDirectories="..\..\..\..\..\packages\bin;&quot;$(OGRE_HOME)\lib&quot;"
+				OutputFile="..\..\..\bin\$(ProjectName)_d.exe"
+				AdditionalLibraryDirectories="..\..\..\bin;&quot;$(OGRE_HOME)\lib&quot;"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
@@ -126,8 +126,8 @@
 			<Tool
 				Name="VCLinkerTool"
 				AdditionalDependencies="RocketCore.lib RocketControls.lib RocketDebugger.lib OgreMain.lib OIS.lib"
-				OutputFile="..\..\..\..\..\packages\bin\$(ProjectName).exe"
-				AdditionalLibraryDirectories="..\..\..\..\..\packages\bin;&quot;$(OGRE_HOME)\lib&quot;"
+				OutputFile="..\..\..\bin\$(ProjectName).exe"
+				AdditionalLibraryDirectories="..\..\..\bin;&quot;$(OGRE_HOME)\lib&quot;"
 				SubSystem="2"
 				RandomizedBaseAddress="1"
 				DataExecutionPrevention="0"

+ 65 - 65
Samples/basic/ogre3d/Ogre3D.vcproj.user

@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="8.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment="PATH=%PATH%;$(OGRE_HOME)\bin\debug"
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment="PATH=%PATH%;$(OGRE_HOME)\bin\release"
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment="PATH=%PATH%;$(OGRE_HOME)\bin\debug"
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment="PATH=%PATH%;$(OGRE_HOME)\bin\release"
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 27 - 11
Samples/basic/ogre3d/src/RenderInterfaceOgre3D.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -66,7 +82,7 @@ RenderInterfaceOgre3D::~RenderInterfaceOgre3D()
 }
 
 // Called by Rocket when it wants to render geometry that it does not wish to optimise.
-void RenderInterfaceOgre3D::RenderGeometry(Rocket::Core::Vertex* EMP_UNUSED(vertices), int EMP_UNUSED(num_vertices), int* EMP_UNUSED(indices), int EMP_UNUSED(num_indices), Rocket::Core::TextureHandle EMP_UNUSED(texture), const EMP::Core::Vector2f& EMP_UNUSED(translation))
+void RenderInterfaceOgre3D::RenderGeometry(Rocket::Core::Vertex* ROCKET_UNUSED(vertices), int ROCKET_UNUSED(num_vertices), int* ROCKET_UNUSED(indices), int ROCKET_UNUSED(num_indices), Rocket::Core::TextureHandle ROCKET_UNUSED(texture), const Rocket::Core::Vector2f& ROCKET_UNUSED(translation))
 {
 	// We've chosen to not support non-compiled geometry in the Ogre3D renderer.
 }
@@ -134,7 +150,7 @@ Rocket::Core::CompiledGeometryHandle RenderInterfaceOgre3D::CompileGeometry(Rock
 }
 
 // Called by Rocket when it wants to render application-compiled geometry.
-void RenderInterfaceOgre3D::RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const EMP::Core::Vector2f& translation)
+void RenderInterfaceOgre3D::RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const Rocket::Core::Vector2f& translation)
 {
 	Ogre::Matrix4 transform;
 	transform.makeTrans(translation.x, translation.y, 0);
@@ -191,7 +207,7 @@ void RenderInterfaceOgre3D::SetScissorRegion(int x, int y, int width, int height
 }
 
 // Called by Rocket when a texture is required by the library.
-bool RenderInterfaceOgre3D::LoadTexture(Rocket::Core::TextureHandle& texture_handle, EMP::Core::Vector2i& texture_dimensions, const EMP::Core::String& source)
+bool RenderInterfaceOgre3D::LoadTexture(Rocket::Core::TextureHandle& texture_handle, Rocket::Core::Vector2i& texture_dimensions, const Rocket::Core::String& source)
 {
 	Ogre::TextureManager* texture_manager = Ogre::TextureManager::getSingletonPtr();
 	Ogre::TexturePtr ogre_texture = texture_manager->getByName(Ogre::String(source.CString()));
@@ -214,11 +230,11 @@ bool RenderInterfaceOgre3D::LoadTexture(Rocket::Core::TextureHandle& texture_han
 }
 
 // Called by Rocket when a texture is required to be built from an internally-generated sequence of pixels.
-bool RenderInterfaceOgre3D::GenerateTexture(Rocket::Core::TextureHandle& texture_handle, const EMP::Core::byte* source, const EMP::Core::Vector2i& source_dimensions)
+bool RenderInterfaceOgre3D::GenerateTexture(Rocket::Core::TextureHandle& texture_handle, const Rocket::Core::byte* source, const Rocket::Core::Vector2i& source_dimensions)
 {
 	static int texture_id = 1;
 
-	Ogre::TexturePtr ogre_texture = Ogre::TextureManager::getSingleton().loadRawData(EMP::Core::String(16, "%d", texture_id++).CString(),
+	Ogre::TexturePtr ogre_texture = Ogre::TextureManager::getSingleton().loadRawData(Rocket::Core::String(16, "%d", texture_id++).CString(),
 																					 "Rocket",
 																					 Ogre::DataStreamPtr(new Ogre::MemoryDataStream((void*) source, source_dimensions.x * source_dimensions.y * sizeof(unsigned int))),
 																					 source_dimensions.x,

+ 26 - 10
Samples/basic/ogre3d/src/RenderInterfaceOgre3D.h

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -28,13 +44,13 @@ class RenderInterfaceOgre3D : public Rocket::Core::RenderInterface
 		virtual ~RenderInterfaceOgre3D();
 
 		/// Called by Rocket when it wants to render geometry that it does not wish to optimise.
-		virtual void RenderGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture, const EMP::Core::Vector2f& translation);
+		virtual void RenderGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture, const Rocket::Core::Vector2f& translation);
 
 		/// Called by Rocket when it wants to compile geometry it believes will be static for the forseeable future.
 		virtual Rocket::Core::CompiledGeometryHandle CompileGeometry(Rocket::Core::Vertex* vertices, int num_vertices, int* indices, int num_indices, Rocket::Core::TextureHandle texture);
 
 		/// Called by Rocket when it wants to render application-compiled geometry.
-		virtual void RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const EMP::Core::Vector2f& translation);
+		virtual void RenderCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry, const Rocket::Core::Vector2f& translation);
 		/// Called by Rocket when it wants to release application-compiled geometry.
 		virtual void ReleaseCompiledGeometry(Rocket::Core::CompiledGeometryHandle geometry);
 
@@ -44,9 +60,9 @@ class RenderInterfaceOgre3D : public Rocket::Core::RenderInterface
 		virtual void SetScissorRegion(int x, int y, int width, int height);
 
 		/// Called by Rocket when a texture is required by the library.
-		virtual bool LoadTexture(Rocket::Core::TextureHandle& texture_handle, EMP::Core::Vector2i& texture_dimensions, const EMP::Core::String& source);
+		virtual bool LoadTexture(Rocket::Core::TextureHandle& texture_handle, Rocket::Core::Vector2i& texture_dimensions, const Rocket::Core::String& source);
 		/// Called by Rocket when a texture is required to be built from an internally-generated sequence of pixels.
-		virtual bool GenerateTexture(Rocket::Core::TextureHandle& texture_handle, const EMP::Core::byte* source, const EMP::Core::Vector2i& source_dimensions);
+		virtual bool GenerateTexture(Rocket::Core::TextureHandle& texture_handle, const Rocket::Core::byte* source, const Rocket::Core::Vector2i& source_dimensions);
 		/// Called by Rocket when a loaded texture is no longer required.
 		virtual void ReleaseTexture(Rocket::Core::TextureHandle texture);
 

+ 27 - 11
Samples/basic/ogre3d/src/RocketApplication.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -32,12 +48,12 @@ RocketApplication::RocketApplication()
 
 	// Normalise the path. This path is used to specify the resource location (see line 56 below).
 	_fullpath(path, rocket_path.CString(), MAX_PATH);
-	rocket_path = EMP::Core::String(path).Replace("\\", "/");
+	rocket_path = Rocket::Core::String(path).Replace("\\", "/");
 
 	// The sample path is the path to the Ogre3D sample directory. All resources are loaded
 	// relative to this path.
 	sample_path = getcwd(path, MAX_PATH);
-	sample_path += "/../../projects/Rocket/samples/basic/ogre3d/";
+	sample_path += "/../Samples/basic/ogre3d/";
 #if OGRE_DEBUG_MODE
 	chdir((Ogre::String(getenv("OGRE_HOME")) + "\\bin\\debug\\").c_str());
 #else
@@ -71,7 +87,7 @@ void RocketApplication::createScene()
 	Rocket::Core::FontDatabase::LoadFontFace(sample_path + "../../assets/Delicious-Italic.otf");
 	Rocket::Core::FontDatabase::LoadFontFace(sample_path + "../../assets/Delicious-BoldItalic.otf");
 
-	context = Rocket::Core::CreateContext("main", EMP::Core::Vector2i(mWindow->getWidth(), mWindow->getHeight()));
+	context = Rocket::Core::CreateContext("main", Rocket::Core::Vector2i(mWindow->getWidth(), mWindow->getHeight()));
 	Rocket::Debugger::Initialise(context);
 
 	// Load the mouse cursor and release the caller's reference.
@@ -114,7 +130,7 @@ void RocketApplication::createFrameListener()
 }
 
 // Called from Ogre before a queue group is rendered.
-void RocketApplication::renderQueueStarted(uint8 queueGroupId, const Ogre::String& invocation, bool& EMP_UNUSED(skipThisInvocation))
+void RocketApplication::renderQueueStarted(uint8 queueGroupId, const Ogre::String& invocation, bool& ROCKET_UNUSED(skipThisInvocation))
 {
 	if (queueGroupId == Ogre::RENDER_QUEUE_OVERLAY && Ogre::Root::getSingleton().getRenderSystem()->_getViewport()->getOverlaysEnabled())
 	{
@@ -126,7 +142,7 @@ void RocketApplication::renderQueueStarted(uint8 queueGroupId, const Ogre::Strin
 }
 
 // Called from Ogre after a queue group is rendered.
-void RocketApplication::renderQueueEnded(uint8 EMP_UNUSED(queueGroupId), const Ogre::String& EMP_UNUSED(invocation), bool& EMP_UNUSED(repeatThisInvocation))
+void RocketApplication::renderQueueEnded(uint8 ROCKET_UNUSED(queueGroupId), const Ogre::String& ROCKET_UNUSED(invocation), bool& ROCKET_UNUSED(repeatThisInvocation))
 {
 }
 

+ 24 - 8
Samples/basic/ogre3d/src/RocketApplication.h

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -55,9 +71,9 @@ class RocketApplication : public ExampleApplication, public Ogre::RenderQueueLis
 		void BuildProjectionMatrix(Ogre::Matrix4& matrix);
 
 		// Absolute path to the libRocket directory.
-		EMP::Core::String rocket_path;
+		Rocket::Core::String rocket_path;
 		// Absolute path to the Ogre3d sample directory;
-		EMP::Core::String sample_path;
+		Rocket::Core::String sample_path;
 
 		Rocket::Core::Context* context;
 

+ 26 - 10
Samples/basic/ogre3d/src/RocketFrameListener.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -45,13 +61,13 @@ bool RocketFrameListener::mouseMoved(const OIS::MouseEvent& e)
 	return true;
 }
 
-bool RocketFrameListener::mousePressed(const OIS::MouseEvent& EMP_UNUSED(e), OIS::MouseButtonID id)
+bool RocketFrameListener::mousePressed(const OIS::MouseEvent& ROCKET_UNUSED(e), OIS::MouseButtonID id)
 {
 	context->ProcessMouseButtonDown((int) id, GetKeyModifierState());
 	return true;
 }
 
-bool RocketFrameListener::mouseReleased(const OIS::MouseEvent& EMP_UNUSED(e), OIS::MouseButtonID id)
+bool RocketFrameListener::mouseReleased(const OIS::MouseEvent& ROCKET_UNUSED(e), OIS::MouseButtonID id)
 {
 	context->ProcessMouseButtonUp((int) id, GetKeyModifierState());
 	return true;
@@ -74,9 +90,9 @@ bool RocketFrameListener::keyPressed(const OIS::KeyEvent& e)
 
 	// Send through the ASCII value as text input if it is printable.
 	if (e.text >= 32)
-		context->ProcessTextInput((EMP::Core::word) e.text);
+		context->ProcessTextInput((Rocket::Core::word) e.text);
 	else if (key_identifier == Rocket::Core::Input::KI_RETURN)
-		context->ProcessTextInput((EMP::Core::word) '\n');
+		context->ProcessTextInput((Rocket::Core::word) '\n');
 
 	return true;
 }

+ 22 - 6
Samples/basic/ogre3d/src/RocketFrameListener.h

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 

+ 27 - 11
Samples/basic/ogre3d/src/SystemInterfaceOgre3D.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -26,15 +42,15 @@ float SystemInterfaceOgre3D::GetElapsedTime()
 }
 
 // Logs the specified message.
-bool SystemInterfaceOgre3D::LogMessage(EMP::Core::Log::Type type, const EMP::Core::String& message)
+bool SystemInterfaceOgre3D::LogMessage(Rocket::Core::Log::Type type, const Rocket::Core::String& message)
 {
 	Ogre::LogMessageLevel message_level;
 	switch (type)
 	{
-		case EMP::Core::Log::LT_ALWAYS:
-		case EMP::Core::Log::LT_ERROR:
-		case EMP::Core::Log::LT_ASSERT:
-		case EMP::Core::Log::LT_WARNING:
+		case Rocket::Core::Log::LT_ALWAYS:
+		case Rocket::Core::Log::LT_ERROR:
+		case Rocket::Core::Log::LT_ASSERT:
+		case Rocket::Core::Log::LT_WARNING:
 			message_level = Ogre::LML_CRITICAL;
 			break;
 

+ 23 - 7
Samples/basic/ogre3d/src/SystemInterfaceOgre3D.h

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -31,7 +47,7 @@ class SystemInterfaceOgre3D : public Rocket::Core::SystemInterface
 		virtual float GetElapsedTime();
 
 		/// Logs the specified message.
-		virtual bool LogMessage(EMP::Core::Log::Type type, const EMP::Core::String& message);
+		virtual bool LogMessage(Rocket::Core::Log::Type type, const Rocket::Core::String& message);
 
 	private:
 		Ogre::Timer timer;

+ 24 - 8
Samples/basic/ogre3d/src/main.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -13,9 +29,9 @@
 
 #if OGRE_PLATFORM == OGRE_PLATFORM_WIN32
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 {
 	RocketApplication application;

BIN
Samples/basic/treeview/.sconsign.dblite


+ 65 - 65
Samples/basic/treeview/TreeView.vcproj.user

@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="8.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 27 - 0
Samples/basic/treeview/src/FileFormatter.cpp

@@ -1,3 +1,30 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 "FileFormatter.h"
 
 FileFormatter::FileFormatter() : Rocket::Controls::DataFormatter("file")

+ 27 - 0
Samples/basic/treeview/src/FileFormatter.h

@@ -1,3 +1,30 @@
+/*
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
+ *
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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 FILEFORMATTER_H
 #define FILEFORMATTER_H
 

+ 22 - 6
Samples/basic/treeview/src/FileSystem.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 

+ 22 - 6
Samples/basic/treeview/src/FileSystem.h

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 

+ 25 - 9
Samples/basic/treeview/src/main.cpp

@@ -1,11 +1,27 @@
 /*
- * Copyright (c) 2006 - 2008
- * Wandering Monster Studios Limited
+ * This source file is part of libRocket, the HTML/CSS Interface Middleware
  *
- * Any use of this program is governed by the terms of Wandering Monster
- * Studios Limited's Licence Agreement included with this program, a copy
- * of which can be obtained by contacting Wandering Monster Studios
- * Limited at [email protected].
+ * For the latest information, see http://www.librocket.com
+ *
+ * Copyright (c) 2008-2010 CodePoint Ltd, Shift Technology Ltd
+ *
+ * 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.
  *
  */
 
@@ -29,11 +45,11 @@ void GameLoop()
 	Shell::FlipBuffers();
 }
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
-int APIENTRY WinMain(HINSTANCE EMP_UNUSED(instance_handle), HINSTANCE EMP_UNUSED(previous_instance_handle), char* EMP_UNUSED(command_line), int EMP_UNUSED(command_show))
+int APIENTRY WinMain(HINSTANCE ROCKET_UNUSED(instance_handle), HINSTANCE ROCKET_UNUSED(previous_instance_handle), char* ROCKET_UNUSED(command_line), int ROCKET_UNUSED(command_show))
 #else
-int main(int EMP_UNUSED(argc), char** EMP_UNUSED(argv))
+int main(int ROCKET_UNUSED(argc), char** ROCKET_UNUSED(argv))
 #endif
 {
 	// Generic OS initialisation, creates a window and attaches OpenGL.

+ 65 - 65
Samples/invaders/RocketInvaders.vcproj.user

@@ -1,65 +1,65 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioUserFile
-	ProjectType="Visual C++"
-	Version="8.00"
-	ShowAllFiles="false"
-	>
-	<Configurations>
-		<Configuration
-			Name="Debug|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-		<Configuration
-			Name="Release|Win32"
-			>
-			<DebugSettings
-				Command="$(TargetPath)"
-				WorkingDirectory="..\..\bin"
-				CommandArguments=""
-				Attach="false"
-				DebuggerType="3"
-				Remote="1"
-				RemoteMachine=""
-				RemoteCommand=""
-				HttpUrl=""
-				PDBPath=""
-				SQLDebugging=""
-				Environment=""
-				EnvironmentMerge="true"
-				DebuggerFlavor="0"
-				MPIRunCommand=""
-				MPIRunArguments=""
-				MPIRunWorkingDirectory=""
-				ApplicationCommand=""
-				ApplicationArguments=""
-				ShimCommand=""
-				MPIAcceptMode=""
-				MPIAcceptFilter=""
-			/>
-		</Configuration>
-	</Configurations>
-</VisualStudioUserFile>
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment=""
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 3 - 3
Samples/invaders/src/DecoratorDefender.cpp

@@ -47,18 +47,18 @@ bool DecoratorDefender::Initialise(const Rocket::Core::String& image_source, con
 }
 
 /// Called on a decorator to generate any required per-element data for a newly decorated element.
-Rocket::Core::DecoratorDataHandle DecoratorDefender::GenerateElementData(Rocket::Core::Element* EMP_UNUSED(element))
+Rocket::Core::DecoratorDataHandle DecoratorDefender::GenerateElementData(Rocket::Core::Element* ROCKET_UNUSED(element))
 {
 	return NULL;
 }
 
 // Called to release element data generated by this decorator.
-void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle EMP_UNUSED(element_data))
+void DecoratorDefender::ReleaseElementData(Rocket::Core::DecoratorDataHandle ROCKET_UNUSED(element_data))
 {
 }
 
 // Called to render the decorator on an element.
-void DecoratorDefender::RenderElement(Rocket::Core::Element* element, Rocket::Core::DecoratorDataHandle EMP_UNUSED(element_data))
+void DecoratorDefender::RenderElement(Rocket::Core::Element* element, Rocket::Core::DecoratorDataHandle ROCKET_UNUSED(element_data))
 {
 	Rocket::Core::Vector2f position = element->GetAbsoluteOffset(Rocket::Core::Box::PADDING);
 	Rocket::Core::Vector2f size = element->GetBox().GetSize(Rocket::Core::Box::PADDING);

+ 1 - 1
Samples/invaders/src/DecoratorInstancerDefender.cpp

@@ -40,7 +40,7 @@ DecoratorInstancerDefender::~DecoratorInstancerDefender()
 }
 
 // Instances a decorator given the property tag and attributes from the RCSS file.
-Rocket::Core::Decorator* DecoratorInstancerDefender::InstanceDecorator(const Rocket::Core::String& EMP_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
+Rocket::Core::Decorator* DecoratorInstancerDefender::InstanceDecorator(const Rocket::Core::String& ROCKET_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
 {
 	const Rocket::Core::Property* image_source_property = properties.GetProperty("image-src");
 	Rocket::Core::String image_source = image_source_property->Get< Rocket::Core::String >();

+ 1 - 1
Samples/invaders/src/DecoratorInstancerStarfield.cpp

@@ -45,7 +45,7 @@ DecoratorInstancerStarfield::~DecoratorInstancerStarfield()
 }
 
 // Instances a decorator given the property tag and attributes from the RCSS file.
-Rocket::Core::Decorator* DecoratorInstancerStarfield::InstanceDecorator(const Rocket::Core::String& EMP_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
+Rocket::Core::Decorator* DecoratorInstancerStarfield::InstanceDecorator(const Rocket::Core::String& ROCKET_UNUSED(name), const Rocket::Core::PropertyDictionary& properties)
 {
 	int num_layers = Rocket::Core::Math::RealToInteger(properties.GetProperty("num-layers")->Get< float >());
 	Rocket::Core::Colourb top_colour = properties.GetProperty("top-colour")->Get< Rocket::Core::Colourb >();

+ 1 - 1
Samples/invaders/src/DecoratorStarfield.cpp

@@ -95,7 +95,7 @@ void DecoratorStarfield::ReleaseElementData(Rocket::Core::DecoratorDataHandle el
 }
 
 // Called to render the decorator on an element.
-void DecoratorStarfield::RenderElement(Rocket::Core::Element* EMP_UNUSED(element), Rocket::Core::DecoratorDataHandle element_data)
+void DecoratorStarfield::RenderElement(Rocket::Core::Element* ROCKET_UNUSED(element), Rocket::Core::DecoratorDataHandle element_data)
 {
 	StarField* star_field = (StarField*)element_data;
 	star_field->Update();

+ 1 - 1
Samples/invaders/src/Event.cpp

@@ -43,7 +43,7 @@ void Event::ProcessEvent(Rocket::Core::Event& event)
 }
 
 // Destroys the event.
-void Event::OnDetach(Rocket::Core::Element* EMP_UNUSED(element))
+void Event::OnDetach(Rocket::Core::Element* ROCKET_UNUSED(element))
 {
 	delete this;
 }

+ 2 - 2
Samples/invaders/src/HighScores.cpp

@@ -33,7 +33,7 @@ HighScores* HighScores::instance = NULL;
 
 HighScores::HighScores() : Rocket::Controls::DataSource("high_scores")
 {
-	EMP_ASSERT(instance == NULL);
+	ROCKET_ASSERT(instance == NULL);
 	instance = this;
 
 	for (int i = 0; i < NUM_SCORES; i++)
@@ -46,7 +46,7 @@ HighScores::HighScores() : Rocket::Controls::DataSource("high_scores")
 
 HighScores::~HighScores()
 {
-	EMP_ASSERT(instance == this);
+	ROCKET_ASSERT(instance == this);
 
 	SaveScores();
 

+ 1 - 1
Samples/invaders/src/main.cpp

@@ -53,7 +53,7 @@ void GameLoop()
 	Shell::FlipBuffers();
 }
 
-#if defined EMP_PLATFORM_WIN32
+#if defined ROCKET_PLATFORM_WIN32
 #include <windows.h>
 int APIENTRY WinMain(HINSTANCE, HINSTANCE, char*, int)
 #else

+ 29 - 0
Samples/pyinvaders/PyRocketInvaders.sln

@@ -0,0 +1,29 @@
+
+Microsoft Visual Studio Solution File, Format Version 10.00
+# Visual C++ Express 2008
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PyRocketInvaders", "PyRocketInvaders.vcproj", "{D343E357-BF62-424F-B22A-16D7B8A6422B}"
+	ProjectSection(ProjectDependencies) = postProject
+		{AF4FF882-AFD9-457B-979E-A5B482388D46} = {AF4FF882-AFD9-457B-979E-A5B482388D46}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Shell", "..\shell\Shell.vcproj", "{AF4FF882-AFD9-457B-979E-A5B482388D46}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{D343E357-BF62-424F-B22A-16D7B8A6422B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{D343E357-BF62-424F-B22A-16D7B8A6422B}.Debug|Win32.Build.0 = Debug|Win32
+		{D343E357-BF62-424F-B22A-16D7B8A6422B}.Release|Win32.ActiveCfg = Release|Win32
+		{D343E357-BF62-424F-B22A-16D7B8A6422B}.Release|Win32.Build.0 = Release|Win32
+		{AF4FF882-AFD9-457B-979E-A5B482388D46}.Debug|Win32.ActiveCfg = Debug|Win32
+		{AF4FF882-AFD9-457B-979E-A5B482388D46}.Debug|Win32.Build.0 = Debug|Win32
+		{AF4FF882-AFD9-457B-979E-A5B482388D46}.Release|Win32.ActiveCfg = Release|Win32
+		{AF4FF882-AFD9-457B-979E-A5B482388D46}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 292 - 0
Samples/pyinvaders/PyRocketInvaders.vcproj

@@ -0,0 +1,292 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="9.00"
+	Name="PyRocketInvaders"
+	ProjectGUID="{D343E357-BF62-424F-B22A-16D7B8A6422B}"
+	TargetFrameworkVersion="131072"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			OutputDirectory="$(ProjectDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				Optimization="0"
+				AdditionalIncludeDirectories="..\shell\include;..\..\include;..\..\..\support\python\include;..\..\..\support\python\pc;..\..\..\support\boost"
+				PreprocessorDefinitions="WIN32"
+				RuntimeLibrary="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="RocketCore_d.lib RocketDebugger_d.lib RocketControls_d.lib opengl32.lib boost_python-vc90-mt-gyd-1_44.lib"
+				OutputFile="..\..\bin\$(ProjectName)_d.exe"
+				AdditionalLibraryDirectories="..\..\bin;..\..\..\support\lib"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			OutputDirectory="$(ProjectDir)$(ConfigurationName)"
+			IntermediateDirectory="$(ConfigurationName)"
+			ConfigurationType="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalIncludeDirectories="..\shell\include;..\..\include;..\..\..\support\python\include;..\..\..\support\python\pc;..\..\..\support\boost"
+				PreprocessorDefinitions="WIN32"
+				RuntimeLibrary="2"
+				WarningLevel="3"
+				DebugInformationFormat="3"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				AdditionalDependencies="RocketCore.lib RocketDebugger.lib RocketControls.lib opengl32.lib boost_python-vc90-mt-1_44.lib"
+				OutputFile="..\..\bin\$(ProjectName).exe"
+				AdditionalLibraryDirectories="..\..\bin;..\..\..\support\lib"
+				GenerateDebugInformation="true"
+				SubSystem="2"
+				RandomizedBaseAddress="1"
+				DataExecutionPrevention="0"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Game"
+			>
+			<File
+				RelativePath=".\src\Defender.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Defender.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\ElementGame.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\ElementGame.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Game.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Game.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\GameDetails.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\GameDetails.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Invader.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Invader.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Mothership.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Mothership.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Shield.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Shield.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Sprite.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\Sprite.h"
+				>
+			</File>
+			<Filter
+				Name="High Scores"
+				>
+				<File
+					RelativePath=".\src\DecoratorDefender.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\DecoratorDefender.h"
+					>
+				</File>
+				<File
+					RelativePath=".\src\DecoratorInstancerDefender.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\DecoratorInstancerDefender.h"
+					>
+				</File>
+				<File
+					RelativePath=".\src\HighScores.cpp"
+					>
+				</File>
+				<File
+					RelativePath=".\src\HighScores.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Starfield"
+			>
+			<File
+				RelativePath=".\src\DecoratorInstancerStarfield.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\DecoratorInstancerStarfield.h"
+				>
+			</File>
+			<File
+				RelativePath=".\src\DecoratorStarfield.cpp"
+				>
+			</File>
+			<File
+				RelativePath=".\src\DecoratorStarfield.h"
+				>
+			</File>
+		</Filter>
+		<File
+			RelativePath=".\src\main.cpp"
+			>
+		</File>
+		<File
+			RelativePath=".\src\PythonInterface.cpp"
+			>
+		</File>
+		<File
+			RelativePath=".\src\PythonInterface.h"
+			>
+		</File>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>

+ 65 - 0
Samples/pyinvaders/PyRocketInvaders.vcproj.user

@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioUserFile
+	ProjectType="Visual C++"
+	Version="8.00"
+	ShowAllFiles="false"
+	>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment="PATH=%PATH%..\..\support\lib;&#x0A;PYTHONPATH=..\..\support\python\lib"
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			>
+			<DebugSettings
+				Command="$(TargetPath)"
+				WorkingDirectory="..\..\bin"
+				CommandArguments=""
+				Attach="false"
+				DebuggerType="3"
+				Remote="1"
+				RemoteMachine=""
+				RemoteCommand=""
+				HttpUrl=""
+				PDBPath=""
+				SQLDebugging=""
+				Environment="PATH=%PATH%..\..\support\lib;&#x0A;PYTHONPATH=..\..\support\python\lib"
+				EnvironmentMerge="true"
+				DebuggerFlavor="0"
+				MPIRunCommand=""
+				MPIRunArguments=""
+				MPIRunWorkingDirectory=""
+				ApplicationCommand=""
+				ApplicationArguments=""
+				ShimCommand=""
+				MPIAcceptMode=""
+				MPIAcceptFilter=""
+			/>
+		</Configuration>
+	</Configurations>
+</VisualStudioUserFile>

+ 35 - 0
Samples/pyinvaders/data/background.rml

@@ -0,0 +1,35 @@
+<rml>
+	<head>
+		<style>
+			body
+			{
+				width: 100%;
+				height: 100%;
+				z-index: bottom;
+
+				z-index: -1;
+			}
+
+			starfield
+			{
+				display: block;
+				width: 100%;
+				height: 100%;
+				z-index: 1;
+
+				star-decorator: starfield;
+				star-num-layers: 5;
+				star-top-colour: #fffc;
+				star-bottom-colour: #fff3;
+				star-top-speed: 80.0;
+				star-bottom-speed: 20.0;
+				star-top-density: 8;
+				star-bottom-density: 20;
+			}
+		</style>
+	</head>
+	<body>
+		<img src="background.tga" />
+		<starfield />
+	</body>
+</rml>

BIN
Samples/pyinvaders/data/background.tga


+ 124 - 0
Samples/pyinvaders/data/game.rml

@@ -0,0 +1,124 @@
+<rml>
+	<head>
+		<title>game</title>
+		<link type="text/template" href="window.rml" />
+		<style>
+			body
+			{
+				padding: 0px;
+				margin: 0px;
+				width: 100%;
+				height: 100%;
+
+				z-index: -1;
+			}
+			
+			game
+			{
+				display: block;
+				width: 100%;
+				height: 100%;
+			}
+
+			div
+			{
+				height: 47px;
+				padding: 9px 0px 0px 65px;
+				margin: 0px 20px;
+
+				font-size: 20;
+
+				background-decorator: tiled-horizontal;
+				background-left-image: ../../assets/invader.tga 147px 55px 229px 0px;
+				background-center-image: ../../assets/invader.tga stretch 229px 55px 230px 0px;
+				background-right-image: ../../assets/invader.tga 231px 55px 246px 0px;
+			}
+
+			div#score_div
+			{
+				float: left;
+				width: 155px;
+			}
+
+			div#hiscore_div
+			{
+				float: left;
+				width: 205px;
+			}
+
+			div#waves_div
+			{
+				float: right;
+				width: 95px;
+			}
+
+			div#lives_div
+			{
+				float: right;
+				width: 80px;
+			}
+
+			icon
+			{
+				display: block;
+				position: absolute;
+				left: 14px;
+				top: 3px;
+
+				width: 51px;
+				height: 39px;
+				
+				icon-decorator: image;
+				icon-image-src: ../../assets/invader.tga;
+				icon-image-t: 152px 191px;
+			}
+
+			div#score_div icon
+			{
+				icon-image-s: 434px 485px;
+			}
+
+			div#hiscore_div icon
+			{
+				icon-image-s: 281px 332px;
+			}
+
+			div#waves_div icon
+			{
+				icon-image-s: 332px 383px;
+			}
+
+			div#lives_div icon
+			{
+				icon-image-s: 383px 434px;
+			}
+		</style>
+		<script>
+import rocket
+
+def OnKeyDown(event, document):
+	if event.parameters['key_identifier'] == rocket.key_identifier.ESCAPE:
+		document.context.LoadDocument('data/pause.rml').Show()
+		</script>
+	</head>
+	<body id="game_window" onkeydown="OnKeyDown(event, document)" ongameover="LoadMenu('high_score')">
+		<game id="game">
+			<div id="score_div">
+				<icon />
+				score: <span id="score" />
+			</div>
+			<div id="hiscore_div">
+				<icon />
+				high score: <span id="hiscore" />
+			</div>
+			<div id="lives_div">
+				<icon />
+				lives: <span id="lives" />
+			</div>
+			<div id="waves_div">
+				<icon />
+				wave: <span id="waves" />
+			</div>
+		</game>
+	</body>
+</rml>

+ 55 - 0
Samples/pyinvaders/data/help.rml

@@ -0,0 +1,55 @@
+<rml>
+	<head>
+		<title>Help</title>
+		<link type="text/template" href="window.rml" />
+		<style>
+			body
+			{
+				width: 50%;
+				height: 70%;
+				margin: auto;
+			}
+			
+			div#content
+			{
+				overflow-y: scroll;
+			}
+			
+			div#title_bar div#icon
+			{
+				icon-image-s: 128px 179px;
+				icon-image-t: 152px 191px;
+			}
+		</style>
+	</head>
+	<body template="pywindow">
+		<h1>Story</h1>
+		<p>
+			One day, without warning, they came for us; endless waves of the invaders, numbers too vast to count, fresh from the Martian foundries. Earth's orbital defences took a heavy toll, but were inevitably overrun, buying enough time only for a single rocket ship to launch. The prototype X-42 'Defender'-class, not yet tested but piloted by the finest astronaut the Space Corps had to offer.
+		</p>
+		<p>
+			Do you have what it takes to defeat the invaders and save Earth?
+		</p>
+		<h1>The X-42</h1>
+		<p>
+			The culmination of <img src="help_defender.tga" style="float: left; margin: -6px -24px;" />decades of research and the pinnacle of Earth's technology, the X-42 'Defender' is the finest weapon mankind has to fight the alien menace. Equipped with the dual-layer ablative tridranium armour, low-velocity depleted-narconium chain-fed belt gun and state-of-the-art liquid-hydrangea turbo-thrusters, it is still going to be nearly impossible for its pilot to secure the safety of mankind.
+		</p>
+		<h1>The Invaders</h1>
+		<p>
+			The most numerous <img src="help_invader_rank1.tga" style="float: left; margin: -4px 0px;" />invader you'll face is a primitive drone that is primarily employed by its Martian overlords in the mines of Cydonia. It is large, ungainly and poorly-armed, so ill-suited to its new role as the backbone of the invasion fleet. However, whatever it lacks in pugilistic prowess it makes up for with numbers. Each drone is worth 10 points.
+		</p>
+		<p>
+			Behind the drones <img src="help_invader_rank2.tga" style="float: right; margin: -4px 0px;" />stand the formidable berserker units, encased in their zyterium battle-suits and wielding the dreaded Nimbus death-rods. A lone unit is no match for a skilled X-42 pilot, but in large groups they adopt complex flight patterns that can confuse even the best targetting computer. Pick them off and separate them when you can. Each berserker is worth 20 points.
+		</p>
+		<p>
+			The dreaded commander <img src="help_invader_rank3.tga" style="float: left; margin: -4px 0px;" />death-droids lie at the back of every Martian wave. Small, nimble and deadly, these ships are the true test of an X-42 pilot's abilities. Consider yourself warned, and watch out especially for their mind control attack! Each droid is worth 40 points.
+		</p>
+		<p>
+			Occasionally one of the <img src="help_invader_mothership.tga" style="float: right; margin: -6px -12px;" /> invasion motherships will drop into low-orbit to provide the Martian Overbrain with a close look at the progress of the battle; this is when they are most vulnerable, destroy them if you can! The loss of even a single mothership will be keenly felt by the fleet. The points value of each mothership is variable, depending on the seniority of its command synapse.
+		</p>
+		<p>
+			Destroy all the invaders in each wave before any get past your ship to invade Earth, unleash their deadly toxin and wipe out all of humanity!
+		</p>
+		<button onclick="LoadMenu('main_menu')">Back</button>
+	</body>
+</rml>

BIN
Samples/pyinvaders/data/help_defender.tga


BIN
Samples/pyinvaders/data/help_invader_mothership.tga


BIN
Samples/pyinvaders/data/help_invader_rank1.tga


Some files were not shown because too many files changed in this diff