[Python-ogre-commit] SF.net SVN: python-ogre: [481] trunk/python-ogre
Brought to you by:
andy_miller,
roman_yakovenko
|
From: <and...@us...> - 2007-12-02 06:17:05
|
Revision: 481
http://python-ogre.svn.sourceforge.net/python-ogre/?rev=481&view=rev
Author: andy_miller
Date: 2007-12-01 22:17:06 -0800 (Sat, 01 Dec 2007)
Log Message:
-----------
Significant changes and updates to match latest library version and
gccxml 0.9 support -- see the changelog.txt for details
Modified Paths:
--------------
trunk/python-ogre/ChangeLog.txt
trunk/python-ogre/PythonOgreConfig_nt.py
trunk/python-ogre/SConstruct
trunk/python-ogre/ThirdParty/betagui/BetaGUI.h
trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp
trunk/python-ogre/ThirdParty/caelum/CaelumPrerequisites.h
trunk/python-ogre/ThirdParty/caelum/CameraBoundElement.h
trunk/python-ogre/ThirdParty/caelum/GroundFog.cpp
trunk/python-ogre/ThirdParty/caelum/GroundFog.h
trunk/python-ogre/ThirdParty/caelum/LayeredClouds.cpp
trunk/python-ogre/ThirdParty/caelum/LayeredClouds.h
trunk/python-ogre/ThirdParty/caelum/SkyColourModel.cpp
trunk/python-ogre/ThirdParty/caelum/SkyDome.cpp
trunk/python-ogre/ThirdParty/caelum/SkyDome.h
trunk/python-ogre/ThirdParty/caelum/Starfield.cpp
trunk/python-ogre/ThirdParty/caelum/Starfield.h
trunk/python-ogre/ThirdParty/caelum/Sun.cpp
trunk/python-ogre/ThirdParty/caelum/Sun.h
trunk/python-ogre/ThirdParty/forests/BatchPage.cpp
trunk/python-ogre/ThirdParty/forests/BatchedGeometry.cpp
trunk/python-ogre/ThirdParty/forests/BatchedGeometry.h
trunk/python-ogre/ThirdParty/forests/GrassLoader.cpp
trunk/python-ogre/ThirdParty/forests/GrassLoader.h
trunk/python-ogre/ThirdParty/forests/ImpostorPage.cpp
trunk/python-ogre/ThirdParty/forests/ImpostorPage.h
trunk/python-ogre/ThirdParty/forests/PagedGeometry.cpp
trunk/python-ogre/ThirdParty/forests/PagedGeometry.h
trunk/python-ogre/ThirdParty/forests/PropertyMaps.cpp
trunk/python-ogre/ThirdParty/forests/PropertyMaps.h
trunk/python-ogre/ThirdParty/forests/StaticBillboardSet.cpp
trunk/python-ogre/ThirdParty/forests/TreeLoader2D.cpp
trunk/python-ogre/ThirdParty/forests/TreeLoader2D.h
trunk/python-ogre/ThirdParty/forests/TreeLoader3D.cpp
trunk/python-ogre/ThirdParty/forests/TreeLoader3D.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreCloth.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreEnumsBlueprint.h
trunk/python-ogre/ThirdParty/nxogre/NxOgrePhysXDriver.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreShapeBlueprintTerrain.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreSoftBody.cpp
trunk/python-ogre/ThirdParty/nxogre/NxOgreStable.h
trunk/python-ogre/ThirdParty/nxogre/NxOgreWorld.cpp
trunk/python-ogre/ThirdParty/ofusion/OgreOSMScene.cpp
trunk/python-ogre/ThirdParty/ofusion/OgreOSMScene.h
trunk/python-ogre/ThirdParty/ogreal/OgreAL.h
trunk/python-ogre/ThirdParty/ogreal/OgreALException.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALException.h
trunk/python-ogre/ThirdParty/ogreal/OgreALListener.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALListener.h
trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALOggSound.h
trunk/python-ogre/ThirdParty/ogreal/OgreALPrereqs.h
trunk/python-ogre/ThirdParty/ogreal/OgreALSound.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALSound.h
trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALSoundManager.h
trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.cpp
trunk/python-ogre/ThirdParty/ogreal/OgreALWavSound.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Debug/OgreBulletCollisionsDebugContact.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Debug/OgreBulletCollisionsDebugDrawer.cpp
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Debug/OgreBulletCollisionsDebugDrawer.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Debug/OgreBulletCollisionsDebugLines.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Debug/OgreBulletCollisionsDebugShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisions.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsObject.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsObjectState.cpp
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsObjectState.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsPreRequisites.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsRay.cpp
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsRay.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsWorld.cpp
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/OgreBulletCollisionsWorld.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsBoxShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsCompoundShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsConeShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsConvexHullShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsCylinderShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsMinkowskiSumShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsMultiSphereShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsSphereShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsStaticPlaneShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsTriangleShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Shapes/OgreBulletCollisionsTrimeshShape.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Utils/OgreBulletCollisionsMeshToShapeConverter.cpp
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Utils/OgreBulletCollisionsMeshToShapeConverter.h
trunk/python-ogre/ThirdParty/ogrebullet/Collisions/Utils/OgreBulletConverter.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/Constraints/OgreBulletDynamics6DofConstraint.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/Constraints/OgreBulletDynamicsConeTwistConstraint.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/Constraints/OgreBulletDynamicsHingeConstraint.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/Constraints/OgreBulletDynamicsPoint2pointConstraint.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/Constraints/OgreBulletDynamicsRaycastVehicle.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamics.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsConstraint.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsObjectState.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsPreRequisites.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsRigidBody.cpp
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsRigidBody.h
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.cpp
trunk/python-ogre/ThirdParty/ogrebullet/Dynamics/OgreBulletDynamicsWorld.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUI.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIBorder.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIButton.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIComboBox.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIConfigScriptParser.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIConsole.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIEffect.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIEventArgs.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIExportDLL.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalScrollBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIHorizontalTrackBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIImage.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIKeyCode.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUILabel.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUILabelArea.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIList.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIManager.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMemberFunctionPointer.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMenuLabel.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseButtonID.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIMouseCursor.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUINStateButton.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPanel.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIPoint.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIProgressBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuad.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIQuadContainer.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIRect.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIScrollPane.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUISheet.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUISize.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUISkinSet.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIText.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUITextArea.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUITextBox.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUITitleBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIUtility.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertex.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVertexBuffer.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalScrollBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIVerticalTrackBar.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWidget.h
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.cpp
trunk/python-ogre/ThirdParty/quickgui/QuickGUIWindow.h
trunk/python-ogre/boost/libs/python/build/Jamfile.v2
trunk/python-ogre/code_generators/betagui/generate_code.py
trunk/python-ogre/code_generators/betagui/python_betagui_aliases.h
trunk/python-ogre/code_generators/bullet/customization_data.py
trunk/python-ogre/code_generators/bullet/generate_code.py
trunk/python-ogre/code_generators/bullet/hand_made_wrappers.py
trunk/python-ogre/code_generators/bullet/python_bullet.h
trunk/python-ogre/code_generators/bullet/python_bullet_aliases.h
trunk/python-ogre/code_generators/caelum/generate_code.py
trunk/python-ogre/code_generators/cegui/generate_code.py
trunk/python-ogre/code_generators/common_utils/__init__.py
trunk/python-ogre/code_generators/navi/generate_code.py
trunk/python-ogre/code_generators/nxogre/generate_code.py
trunk/python-ogre/code_generators/ode/generate_code.py
trunk/python-ogre/code_generators/ogre/custom_rvalue.cpp
trunk/python-ogre/code_generators/ogre/customization_data.py
trunk/python-ogre/code_generators/ogre/generate_code.py
trunk/python-ogre/code_generators/ogre/hand_made_wrappers.py
trunk/python-ogre/code_generators/ogre/python_ogre.h
trunk/python-ogre/code_generators/ogre/python_ogre_masterlist.h
trunk/python-ogre/code_generators/ogre/python_ogre_sizeof.h
trunk/python-ogre/code_generators/ogreal/generate_code.py
trunk/python-ogre/code_generators/ogrebulletc/generate_code.py
trunk/python-ogre/code_generators/ogrebulletd/generate_code.py
trunk/python-ogre/code_generators/ogreode/generate_code.py
trunk/python-ogre/code_generators/ois/customization_data.py
trunk/python-ogre/code_generators/ois/generate_code.py
trunk/python-ogre/code_generators/ois/python_ois_aliases.h
trunk/python-ogre/code_generators/physx/generate_code.py
trunk/python-ogre/code_generators/quickgui/generate_code.py
trunk/python-ogre/code_generators/quickgui/python_quickgui_aliases.h
trunk/python-ogre/code_generators/quickgui/python_quickgui_sizeof.h
trunk/python-ogre/code_generators/theora/generate_code.py
trunk/python-ogre/environment.py
trunk/python-ogre/patch/ogre.patch
Modified: trunk/python-ogre/ChangeLog.txt
===================================================================
--- trunk/python-ogre/ChangeLog.txt 2007-11-14 05:48:13 UTC (rev 480)
+++ trunk/python-ogre/ChangeLog.txt 2007-12-02 06:17:06 UTC (rev 481)
@@ -1,3 +1,48 @@
+December 02 2007: SVN Update
+=============================
+* Full support for gccxml 0.9 (requires the latest gccxml and Py++) -- main change is in simplification of generated
+ template code and changes to noncopyable logic which has required tweaks to the generate_code in a number of libraries
+* Changes to use precompiled headers (Ogre and OIS at moment) which improves compile time significantly
+* Tweaked scons to put it's database file in each library source directory as the single one was getting huge
+* Automatic function added to common_utilites (Auto_Functional_Transformation) to handle function transformation
+ of common cases where a function takes a non mutable variable (int etc) as a reference instead of passing by value.
+ This does have potential minior API impacts as functions aren't hand wrapped anymore.
+ Only implemented for Ogre at moment
+
+Module Specifics:
+* betagui -- now using version 2.x of the source code
+* bullet -- Updated to verssion 2.64
+* caleum -- SVN version r112 - small change to hanve noncopyable changes
+* cegui -- still using 0.5.0, small changes to generator for noncopyable classes
+* et -- no changes - built on 2.2 source
+* navi -- not part of this build due to errors
+* noise -- no changes
+* nxogre -- no changes, still using SVN r
+* ODE -- Updated to version 0.9 with changes due to noncopyable classes
+* ofusion -- no changes
+* ogre -- lots of changes to code generation due to new gccxml.
+ New helper functions for bone and sceneNode to return them as nodes ( .castAsNode() ).
+ Changes due to using precompiled headers -- python_ogre_precompiled.h is now the primary header which includes
+ boost and python_ogre_masterlist. The masterlist now uses Ogre.h and OgreStableHeaders.h to
+ include most of the headers, so the missing list is smaller and easier to manage
+* ogreal -- updated to SVN r90
+* ogrebulletc and ogrebulletd -- updated to latest CVS and using bullet 2.64
+* ogredshow -- Not part of this release as not compatible with latest DirectX SDK (I think..)
+* ogreforests -- update to latest CVS
+* ogrenewt -- no changes
+* ogreode -- small change to remove list<Ogre::plane> from generated code as it's part of the ogre module
+* ogrerefapp -- no changes
+* ogrevideoffmpeg -- no changes
+* ois -- no change to source (1.0RC1) however full cleanup to code generator ready to move to SVN verison of OIS
+* opcode -- no change
+* physx -- update to SDK 2.7.3
+* plib -- no change
+* QuickGui -- Update: Svn r272
+* theora -- no change
+* watermesh -- no change
+
+
+
October 20 2007: Version 1.1.b SnapShot
========================================
* Fixed Caelum demo
Modified: trunk/python-ogre/PythonOgreConfig_nt.py
===================================================================
--- trunk/python-ogre/PythonOgreConfig_nt.py 2007-11-14 05:48:13 UTC (rev 480)
+++ trunk/python-ogre/PythonOgreConfig_nt.py 2007-12-02 06:17:06 UTC (rev 481)
@@ -56,7 +56,7 @@
PATH_ogrevideoffmpeg = os.path.join(PATH_THIRDPARTY,'ffmpeg')
PATH_Bullet= os.path.join(BASE_DIR, 'bullet-2.64')
-PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.2/SDKs"
+PATH_PhysX= "c:/program files/AGEIA Technologies/SDK/v2.7.3/SDKs"
PATH_Theora= os.path.join(PATH_OgreAddons,'videoplugin','TheoraVideo')
PATH_ffmpeg= os.path.join(BASE_DIR, 'ffmpeg')
PATH_navi = os.path.join(BASE_DIR, 'navi','Navi')
@@ -148,7 +148,8 @@
PATH_INCLUDE_OggVorbisTheora = [ os.path.join(BASE_DIR,'ogg','include')
,os.path.join(BASE_DIR, 'vorbis', 'include')
,os.path.join(PATH_OgreAddons,'videoplugin','theora','include')
- ,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-2.1.1','include')
+# ,os.path.join(PATH_OgreAddons,'videoplugin','ptypes-2.1.1','include')
+ ,os.path.join(PATH_THIRDPARTY,'ptypes','include')
]
PATH_INCLUDE_PhysX= [ os.path.join(PATH_PhysX, 'Physics','include')
Modified: trunk/python-ogre/SConstruct
===================================================================
--- trunk/python-ogre/SConstruct 2007-11-14 05:48:13 UTC (rev 480)
+++ trunk/python-ogre/SConstruct 2007-12-02 06:17:06 UTC (rev 481)
@@ -51,11 +51,9 @@
if os.name=='nt':
CCFLAGS=''
#CCFLAGS += '-DBOOST_PYTHON_MAX_ARITY=19'
- CCFLAGS += ' /nologo' # -Zm800
+ CCFLAGS += ' /nologo -Zm200 '
CCFLAGS += ' /W3 /wd4675' # warning level -Zc:wchar_t
- CCFLAGS += ' /TP /MD /Zc:forScope /EHs /c'
- ##CCFLAGS += ' /Ogisyb2 /Gs /GR ' #/Op /Ox /O2
- CCFLAGS += ' /Ox /Ob2 /Oi /Ot /Oy /GS- /GR '
+ CCFLAGS += ' /TP /MD /Zc:forScope /EHs /c /Ox /Ob2 /Oi /Ot /Oy /GS- /GR '
elif os.name =='posix':
if os.sys.platform <> 'darwin':
CCFLAGS = ' `pkg-config --cflags OGRE` ' ## needs to change I think :)
@@ -70,11 +68,22 @@
CCFLAGS = ' -I -pipe -Os -I./'
return CCFLAGS
-def get_source_files(_dir):
+def get_source_files(cls, _dir, usepch = False):
+
+ def filterfunc ( filein ):
+ validext = ['.cpp', '.cxx', '.c']
+ if usepch:
+ if filein == cls.pchbuild:
+ return False
+ for e in validext:
+ if filein.endswith ( e ):
+ return True
+ return False
+
try:
- source_files = filter( lambda s: (s.endswith( '.cpp' ) or s.endswith('.cxx') or s.endswith('.c') ), os.listdir(_dir) )
+ source_files = filter( filterfunc , os.listdir(_dir) )
except OSError,e:
- print 'WARNING: Generate the sources this directory: "%s"' % _dir
+ print 'WARNING: Generate the sources in this directory: "%s"' % _dir
raise e
source_files.sort()
return source_files ## "Image.pypp.cpp" ##source_files
@@ -82,7 +91,7 @@
def get_linkflags():
if os.name=='nt':
#LINKFLAGS = " /NOLOGO /INCREMENTAL:NO /DLL /OPT:NOREF /OPT:NOICF /OPT:NOWIN98 /subsystem:console " # no change
- LINKFLAGS = " /MAP:FULL /MAPINFO:EXPORTS /NOLOGO /OPT:REF /INCREMENTAL:NO /DLL /OPT:ICF /OPT:NOWIN98 /subsystem:console " # 7 minutes 25% smaller 16.6 Meg
+ LINKFLAGS = " /MAP:FULL /MAPINFO:EXPORTS /NOLOGO /OPT:REF /INCREMENTAL:NO /DLL /OPT:ICF /subsystem:console " # 7 minutes 25% smaller 16.6 Meg
#LINKFLAGS = " /NOLOGO /INCREMENTAL:NO /DLL /subsystem:console " ### LONG Link , 80 minutes - 15.7 meg
elif os.name == 'posix':
if os.sys.platform <> 'darwin':
@@ -91,17 +100,28 @@
LINKFLAGS = ''
return LINKFLAGS
+def build_pch( cls, pchfile ):
+ """ lets create a source file that we will use to create the PCH file from """
+ fout = open ( pchfile, 'w' ) ## delete it if it's already there
+ for i in cls.pchincludes:
+ fout.write ( '#include "' + i + '"\n' )
+ fout.write ( "\n" )
+ fout.close()
+
# Let us select the projects to build
possible_projects = []
for name,cls in environment.projects.items():
- if cls.active:
- possible_projects.append ( name )
+ possible_projects.append ( name )
# ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\
# 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\
# 'ogrevideoffmpeg', 'ogredshow', 'plib', 'ogrebulletc', 'ogrebulletd',
# 'ogreforests', 'et', 'navi', 'caelum', 'noise', 'watermesh' ] # , 'raknet'
-default_projects = possible_projects ## environment.projects
+default_projects = []
+for name,cls in environment.projects.items():
+ if cls.active:
+ default_projects.append ( name )
+#default_projects = possible_projects ## environment.projects
# ['ogre' , 'ois', 'ogrerefapp', 'ogrenewt', 'cegui', 'ode',\
# 'ogreode', 'ogreal', 'quickgui', 'opcode', 'nxogre', 'bullet', 'physx', 'betagui','theora',\
# 'ogrevideoffmpeg', 'ogredshow', 'plib', 'ogrebulletc', 'ogrebulletd',
@@ -114,7 +134,8 @@
temp_env = Environment(options = opts)
tobuild = temp_env['PROJECTS']
del temp_env
-
+
+
for name, cls in environment.projects.items():
##if name.active:
@@ -128,8 +149,11 @@
_env = Environment(ENV=os.environ)
if environment.rpath:
- _env.Append(RPATH=_env.Literal(environment.rpath))
-
+ _env.Append(RPATH=environment.rpath)
+
+ # Stores signatures in a separate .sconsign file
+ # in each directory as the single one was getting huge
+ _env.SConsignFile(os.path.join( cls.generated_dir, "sconsign") )
## Use custom compilier if wanted (things like ccache)
if hasattr(environment, 'cxx_compiler'):
@@ -142,8 +166,6 @@
linkflags=get_linkflags()
if hasattr ( cls, 'LINKFLAGS' ):
linkflags += cls.LINKFLAGS
- if environment.rpath:
- linkflags += ' -z origin '
_env.Append( LINKFLAGS=linkflags )
_env.Append ( LIBS = cls.libs )
@@ -154,8 +176,17 @@
ccflags += cls.CCFLAGS
_env.Append ( CCFLAGS=ccflags )
+ if hasattr( cls, 'pchbuild' ) and hasattr( cls, 'pchstop' ):
+ usepch = True
+ _env['PCHSTOP']= cls.pchstop
+ build_pch ( cls, os.path.join(cls._source, cls.pchbuild) ) ## we build the source pch file here
+ _env['PCH']=_env.PCH( os.path.join(cls._source, cls.pchbuild) )[0]
+ else:
+ usepch = False
+
## create a list of source files to include
- _env.Append ( FILES= get_source_files(cls._source) )
+ sourcefiles = get_source_files(cls, cls._source, usepch)
+ _env.Append ( FILES= sourcefiles )
##cls._env = _env.Copy() ## NOT sure this is needed...
## build it to somewhere else
@@ -165,7 +196,7 @@
## create a dynamic Sconscript file in the source directory (only if it doesn't exist)
create_SConscript ( cls )
# # _env.LINKCOM = [_env['LINKCOM'],\
-# # 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % {'name':cls._name} ]
+# # 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % {'name':cls._name} ]
## now call the SConscript file in the source directory
Export ( '_env' )
package = _env.SConscript(os.path.join( cls._build_dir, 'SConscript' ) )
@@ -175,11 +206,11 @@
if os.name=="nt":
## and lets have it install the output into the 'package_dir_name/ModuleName' dir and rename to the PydName
_env.AddPostAction(package,\
- 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } )
- else:
+ 'mt.exe -nologo -manifest %(name)s.manifest -outputresource:%(name)s;2' % { 'name':package[index] } )
+ else:
_env.AddPostAction(package,\
- '-strip -g -S -d --strip-debug -s %(name)s' % { 'name':package[index] } )
-
+ '-strip -g -S -d --strip-debug -s %(name)s' % { 'name':package[index] } )
+
_env.InstallAs(os.path.join(environment.package_dir_name, cls.parent,
cls.ModuleName, cls.PydName),
package[index] )
Modified: trunk/python-ogre/ThirdParty/betagui/BetaGUI.h
===================================================================
--- trunk/python-ogre/ThirdParty/betagui/BetaGUI.h 2007-11-14 05:48:13 UTC (rev 480)
+++ trunk/python-ogre/ThirdParty/betagui/BetaGUI.h 2007-12-02 06:17:06 UTC (rev 481)
@@ -1,638 +1,244 @@
+// Betajaen's GUI "BetaGUI 2.0", Version 35-uncompressed, http://www.ogre3d.org/wiki/index.php/BetaGUI
+//
+// Copyright (c) 2007 Robin Southern <bet...@ih...>
+//
+// 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 BETAGUI_H
#define BETAGUI_H
-/// Betajaen's GUI 016 Uncompressed
-/// Written by Robin "Betajaen" Southern 07-Nov-2006, http://www.ogre3d.org/wiki/index.php/BetaGUI
-/// This code is under the Whatevar! licence. Do what you want; but keep the original copyright header.
-
#include "Ogre.h"
-#include "OgreTextAreaOverlayElement.h"
-#include <iostream>
+#pragma pointers_to_members(full_generality, virtual_inheritance)
-using namespace Ogre;
-using namespace std;
-
-namespace BetaGUI
-{
- //------------------------------------------------------------------------------------------------
- class GUI;
-
- class Widget;
- class Window;
-
- class Button;
- class BoolButton;
- class MenuButton;
- class RealButton;
-
- class StaticText;
- class TextInput;
-
- class Callback;
-
- class Effect;
- class AlphaEffect;
- class MoveEffect;
- class SizeEffect;
-
- //------------------------------------------------------------------------------------------------
- enum WindowFeatureType
- {
- WFT_NONE = 0,
- WFT_MOVE ,
- WFT_RESIZE ,
- WFT_RESIZE_AND_MOVE
- };
- //------------------------------------------------------------------------------------------------
- enum WindowPlacementType
- {
- WPT_NONE = 0,
- WPT_VERTICAL ,
- WPT_HORIZONTAL
- };
- //------------------------------------------------------------------------------------------------
- enum WindowActivity
- {
- WA_NONE = 0,
- WA_MOVE ,
- WA_RESIZE ,
- WA_PRESS
- };
- //------------------------------------------------------------------------------------------------
- class GUI
- {
+namespace BetaGUI {
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ class GUI;
+ class Style;
+ struct WindowStyle;
+ struct WidgetStyle;
+ class Window;
+ class Widget;
+ class Button;
+ class TextInput;
+ class Slider;
+ class NumericSlider;
+ class StringSlider;
+ class Meter;
+ class Select;
+ class GUIListener{};
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ enum WindowFeatureType { WFT_NONE = 0, WFT_MOVE, WFT_RESIZE, WFT_RESIZE_AND_MOVE, WFT_ON_TOP };
+ enum FocusState { FS_NONE = 0, FS_SELECT, FS_SELECT_OFF, FS_DRAG };
+ enum SpecialKey { SK_BACKSPACE = 0, SK_ENTER, SK_TAB, SK_ESCAPE };
+ enum WindowRole { WR_NONE = 0, WR_DRAG, WR_RESIZE, WR_CLOSE };
+ enum WindowMode { WM_NONE = 0, WM_DRAG, WM_RESIZE, WM_LMB_DOWN, WM_SLIDER_MOVE };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ typedef void (BetaGUI::GUIListener::*ButtonMethodPtr)(BetaGUI::Button*, BetaGUI::FocusState);
+ typedef void (BetaGUI::GUIListener::*SliderMethodPtr)(BetaGUI::Slider*, BetaGUI::FocusState);
+ typedef void (BetaGUI::GUIListener::*TextInputMethodPtr)(BetaGUI::TextInput*, BetaGUI::FocusState);
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ class GUI { friend class Window;friend class Button;friend class TextInput;
public:
-
- friend class Window;
-
- friend class Button;
-
- friend class MenuButton;
- friend class BoolButton;
- friend class RealButton;
-
- friend class StaticText;
- friend class TextInput;
-
- GUI(const Ogre::String &baseOverlay, const Ogre::String &font, int fontSize, Ogre::RenderWindow *win);
-
+ GUI(Ogre::RenderWindow*);
~GUI();
+
+ bool injectRelMouse(int RelX, int RelY, bool selectDown);
+ bool injectMouse(unsigned int ScreenX, unsigned int ScreenY, bool selectDown);
+ bool injectKey(const Ogre::String& key, unsigned int x, unsigned int y);
+ void injectSpecialKey(SpecialKey, unsigned int ScreenX, unsigned int ScreenY);
+
+ Style* createStyle(const Ogre::String& name);
+ Window* createWindow(int x, int y, unsigned int width, unsigned int height, const Ogre::String& Style, WindowFeatureType type, const Ogre::String& caption, GUIListener*);
+ void destroyWindow(Window *window);
+
+ Ogre::OverlayContainer* createMousePointer(const Ogre::String& material, unsigned int w, unsigned int h);
+ Ogre::OverlayContainer* createOverlayFromWidgetStyle(const Ogre::String &name, const Ogre::String &style, const Ogre::String &widget, int x, int y, const Ogre::String &caption = "");
+ Ogre::OverlayContainer* createOverlayFromWindowStyle(const Ogre::String &name, const Ogre::String &style, int x, int y, int w, int h);
+ protected:
+ void __updateCenteredOverlay(Ogre::OverlayContainer*);
+ Ogre::OverlayContainer* __getOverlay(const Ogre::String&, const Ogre::String& = "Panel", int x=0, int y=0, int w=0,int h=0);
- void sortZOrder() ;
-
- void setZRangeOrder(int nearZ, int FarZ);
-
- bool injectMouse(int x, int y, bool LMB);
- bool injectMouse(float x, float y, bool LMB);
-
- bool injectKey(const Ogre::String &key, int x, int y);
-
- void injectBackspace(int x, int y);
-
- Window* createWindow(
- const Ogre::Vector4 &Dimensions,
- const Ogre::String &Material,
- WindowFeatureType type,
- const Ogre::String &caption = "");
-
- void destroyWindow(Window *window) {
- mNextWindowToDestroy=window;
- }
- Ogre::OverlayContainer* createOverlay(const Ogre::String &name,
- const Ogre::Vector2 &position,
- const Ogre::Vector2 &dimensions,
- const Ogre::String &material = "",
- const Ogre::String &caption = "");
-
- Ogre::OverlayContainer* createMousePointer(Ogre::Vector2 dimensions,
- const Ogre::String &material);
-
-
-
- Window *addMenuWindow(const Ogre::Vector2 dimensions);
-
- void update(Ogre::Real timeElapsed);
- void addEffect (Effect* e);
- Ogre::Real getUpTime() const {return mUpTime;}
-
- protected:
- //Ogre::Overlay* mGuiOverlay; // Main sheet overlay
- std::vector<Window*> mWindows; // Windows
- Window * mNextWindowToDestroy; // Window to destroy
- Ogre::OverlayContainer* mMousePointerOverlay; // Mouse Pointer Overlay
-
- Ogre::String mFont;
- int mFontSize;
- int mWindowCount, mButtonCount, mTextCaptionCount, mTextCaptionCountArea, mButtonCountTextArea;
-
-
- Ogre::uint mDragWindowAction;
-
- int mDragX, mDragY;
- int mDragWindowX, mDragWindowY;
-
- Window * mActiveDraggedWindow;
- TextInput * mActiveTextInput;
- Button * mActiveButton;
-
- Ogre::Vector2 mNextMenuWindowPos;
- Window * mMenuWindow;
- Ogre::RenderWindow * mRenderWindow;
-
- std::list<Effect*> mActiveEffects;
-
- Ogre::Real mUpTime;
- Ogre::String mName;
- int mFarZ;
- int mNearZ;
- };
- //------------------------------------------------------------------------------------------------
- class Widget
- {
- public:
-
- friend class GUI;
-
- Widget(const Ogre::Vector4 &Dimension,
- const Ogre::String &materialNameNormal,
- bool hasOverState = true,
- bool hasActiveState = true);
-
- virtual ~Widget();
-
- Ogre::Vector2 getPosition() const{return Ogre::Vector2(mPosX,mPosY);}
- Ogre::Vector2 getSize() const {return Ogre::Vector2(mWidth,mHeight); }
-
- void setPosition(const Ogre::Vector2 &position);
- void setSize(const Ogre::Vector2 &size);
-
- virtual void show(){setAlpha (1.0, true);};
- virtual void hide(){setAlpha (0.0, true);};
-
- virtual bool isVisible() {return mMainOverlay->isVisible ();};
-
- virtual void over(const bool a);
- virtual void activate(const bool a);
-
- virtual void adjustSizeToContent();
-
- virtual void setPosition(float X,float Y);
- virtual void setPosition(int X,int Y);
- virtual void setSize(int X,int Y);
- virtual void setAlpha(const Ogre::Real alpha, const bool isContainer);
- virtual void setMaterialBlendFactor(const Ogre::Real blendFactor, const bool isContainer);
-
- // mUnderEffect getter
- bool getUnderEffect() const { return mUnderEffect; }
- // mUnderEffect setter
- void setUnderEffect(bool val);
-
- // mOver getter
- bool getOver() const { return mOver; }
- // mOver setter
- void setOver(bool val) { mOver = val; }
- // mActive getter
- bool getActive() const { return mActive; }
- // mActive setter
- void setActive(bool val) { mActive = val; }
-
- // mActive setter
- void setMainMaterial(const Ogre::String& mat) {
- mMainOverlay->setMaterialName(mat);
- }
-
- void setCaptionMaterial(const Ogre::String& mat) {
- mCaptionOverlay->setMaterialName(mat);
- }
-
- void setText(const Ogre::String& t) {
- mCaptionOverlay->setCaption(t);
- }
-
- Ogre::String getText() const {
- return mCaptionOverlay->getCaption();
- }
-
- protected:
- //------------------------------------------------------------------------------------------------
- inline bool isOut (const int x, const int y) const
- {
- return (x < mPosX) || (y < mPosY)
- || (x > (mPosX + mWidth)) ||
- (y > (mPosY + mHeight));
- }
- //------------------------------------------------------------------------------------------------
- inline bool isIn (const int x, const int y) const
- {
- return (x >= mPosX) && (y >= mPosY)
- && (x <= (mPosX + mWidth)) &&
- (y <= (mPosY + mHeight));
- }
-
- void instantiateMaterial(Ogre::OverlayContainer * const oc, bool reset) const;
- void setOverlayAlpha(Ogre::OverlayContainer * const oc, const Ogre::Real alpha) const;
- void setOverlayMaterialBlendFactor(Ogre::OverlayContainer * const oc, const Ogre::Real blendFactor) const;
-
- int mPosX, mPosY, mWidth, mHeight;
-
- std::vector<Widget *> mChildren;
- Ogre::OverlayContainer* mMainOverlay;
- Ogre::OverlayContainer* mCaptionOverlay;
- Ogre::String mMaterialName;
-
- bool mHasMaterial;
- bool mHasOverState;
- bool mHasActiveState;
- bool mUnderEffect;
- bool mOver;
- bool mActive;
- };
- //------------------------------------------------------------------------------------------------
- class Window : public Widget
- {
+ Ogre::Overlay* mOverlay; // Main sheet overlay
+ std::vector<Window*> mWindow; // Windows
+ std::map<Ogre::String, Style*> mStyle; // Styles
+ Window *mWindowToDestroy; // Window to destroy
+ Ogre::OverlayContainer* mMousePointer; // Mouse Pointer Overlay
+ unsigned int mWindowCount, mButtonCount, mTextInputCount, mRenderWindowWidth, mRenderWindowHeight;
+ Ogre::Real mWindowRatio;
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ class Window { friend class Button;friend class TextInput;friend class GUI;
public:
- friend class Button;
- friend class TextInput;
- friend class StaticText;
- friend class GUI;
-
- Window(const Ogre::Vector4 &Dimensions, const Ogre::String &Material, WindowFeatureType type, const Ogre::String &caption, GUI *gui);
- virtual ~Window();
-
- Button* createButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material,
- const Ogre::String &Text, Callback callback);
-
- TextInput* createTextInput(const Ogre::Vector4 &Dimensions, const Ogre::String &Material,
- const Ogre::String & Value, int length);
-
- StaticText* createStaticText(const Ogre::Vector4 &Dimensions, const Ogre::String &Text);
-
- void setSize(int X,int Y);
-
- MenuButton *addMenuButton(Window *target, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE);
- BoolButton *addBoolButton(bool value, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE);
- RealButton *addRealButton(Ogre::Real value, const Ogre::Vector4 &SliderMoves, const Ogre::String &label, WindowPlacementType wpt = WPT_NONE);
- StaticText* addStaticText(const Ogre::String &label, WindowPlacementType wpt = WPT_NONE);
-
- Window *addMenuWindowTab(const Ogre::String &label,
- bool titleBarWin = true,
- WindowPlacementType wpt = WPT_VERTICAL);
-
- MenuButton* createMenuButton(const Ogre::Vector4 &D, const Ogre::String &M, const Ogre::String &T, Callback C, Window *t);
- BoolButton* createBoolButton(const Ogre::Vector4 &D, const Ogre::String &M, const Ogre::String &T, Callback C, bool boolValue);
-
- RealButton *createRealButton(Ogre::Real value,
- const Ogre::Vector4 &SliderMoves,
- const Ogre::String &label,
- const Ogre::Vector2 &pos);
-
- GUI* getGUI() const {return mGUI;}
-
- void setFadeOut(bool f){mFadeOut = f;}
- void setZOrder(int zOrder){mGuiOverlay->setZOrder (zOrder);}
+ Button* createButton(int x, int y, const Ogre::String& Caption, ButtonMethodPtr);
+ TextInput* createTextInput(int x, int y, int w, const Ogre::String& intialValue, unsigned maxLength);
+ Ogre::OverlayContainer* createStaticText(int x, int y, const Ogre::String& caption);
+ void hide() { mOverlay->hide();}
+ void show() { mOverlay->show();}
+ bool isVisible() { return mOverlay->isVisible();}
+ void setPosition(unsigned int X,unsigned int Y);
+ Ogre::Vector2 getPosition();
+ Ogre::Vector2 getSize();
+ void setSize(unsigned int X,unsigned int Y);
+ Ogre::OverlayContainer* mOverlay; // Overlay
+ ~Window();
protected:
-
+ Window(int x, int y, unsigned int width, unsigned int height, const Ogre::String& Style, WindowFeatureType type, const Ogre::String& caption, GUIListener*, GUI*);
- bool check(int x, int y, bool LMB);
- bool checkKey(const Ogre::String &key, int x, int y);
-
- TextInput* mActiveTextInput; // Active TextInput
-
- Button
- *mCloseButton,
- *mResizerButton,
- *mActiveButton,
- *mTitleBarButton; // Resizer, ActiveButton, Title bar
-
- GUI *mGUI; // mGUI pointer
+ bool check(unsigned int x, unsigned int y, bool LMB);
+ bool checkKey(const Ogre::String& key, unsigned int x, unsigned int y);
+ unsigned int x,y,w,h;int dx,dy; // Dimensions
+ Button *mResizeButton,*mActiveButton,*mTitlebarButton; // Resizer, ActiveButton, Titlebar
+ TextInput* mActiveTextInput; // Active TextInput
+ GUI *mGUI; // mGUI pointer
+ std::vector<BetaGUI::Button*> mButtons; // Buttons
+ std::vector<BetaGUI::TextInput*> mTextInputs; // TextInputs
+ Ogre::String mStyle;
+ WindowMode mMode;
+ GUIListener* mListener;
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ struct WidgetStyle {
+ WidgetStyle() {WidgetStyle("");}
+ WidgetStyle(const Ogre::String&);
+ void fromStyle(const Ogre::String&);
+ Ogre::String mBackground, mFontFace;
+ unsigned int mFontSize, mDecalSize, mHeight; Ogre::ColourValue mColour; bool centerText;
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ class Style {
+ public:
+ void addStyle(Ogre::String widgetName, const Ogre::String& style);
+ std::map<Ogre::String, WidgetStyle> mWidgets;
+ Ogre::String mWindow_Background, mFontFace;
+ unsigned int mFontSize;
+ static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, unsigned int&);
+ static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, int&);
+ static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, bool&);
+ static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, Ogre::Real&);
+ static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, Ogre::String&);
+ static bool _set(const Ogre::String&, std::pair<Ogre::String,Ogre::String>&, Ogre::ColourValue&);
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ class Button {
+ friend class Window;
- std::vector<Button*> mButtons; // Buttons
- std::vector<TextInput*> mTextInput; // TextInputs
+ void setCaption(const Ogre::String&, bool resize = false);
- Ogre::Overlay *mGuiOverlay;
+ protected:
- void addWidget(const Widget * const w, WindowPlacementType wpt);
- Ogre::Vector2 mNextWidgetPos;
- WindowActivity mDragType;
+ Button(int x, int y, const Ogre::String& caption, ButtonMethodPtr, Window *parent);
+ Button(int x, int y, int w, int h, const Ogre::String& caption, Window *parent, WindowRole);
+ ~Button() {
+ mOverlay->getParent()->removeChild(mOverlay->getName());
+ }
+ void setToActive();
+ void setToNormal();
- bool mFadeOut;
+ bool out(unsigned int mx, unsigned int my, unsigned int px, unsigned int py) {
+ return ( !(mx >= x + px && my >= y + py)) || ( ! (mx <= x + px + w && my <= y + py + h) );
+ }
- };
- //------------------------------------------------------------------------------------------------
- class BetaGUIListener
- {
+ Ogre::OverlayContainer* mOverlay, *mCaptionOverlay,*mDecalLeft,*mDecalRight; // Main Overlay and Caption
+ Ogre::String mBackground_Normal,mBackground_Active; // MaterialName Normal, MaterialName Active
+ int x,y; unsigned int w,h; // Dimensions.
+ ButtonMethodPtr mMethod;
+ WindowRole mRole;
+ Window *mParent;
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ class TextInput {
public:
- virtual void onButtonPress(Button*, unsigned char) = 0;
- };
- //------------------------------------------------------------------------------------------------
- class Callback
- {
- public:
friend class Window;
- friend class Button;
- Callback() {
- mCallbackType=0;
+ protected:
+ TextInput(int x, int y, int w, const Ogre::String& intialValue, unsigned maxLength, Window *parent);
+ ~TextInput(){}
+ Ogre::String getValue() const {
+ return mValue;
}
- Callback( void(*functionPointer)(BetaGUI::Button*, bool) ) {
- mCallbackType=1;
- fp = functionPointer;
+ void setValue(const Ogre::String& v) {
+ mCaptionOverlay->setCaption(mValue=v);
}
- Callback(BetaGUIListener *l){
- mCallbackType = 2;
- mListener = l;
- }
protected:
- unsigned char mCallbackType; // Type of callback: 0 - None, 1 - FunctionPointer 2 - GUIListener, 3 - Move Window, 4 - Resize
- void(*fp)(BetaGUI::Button*, bool); // Function pointer (if 1)
- BetaGUIListener *mListener; // GuiListener (if 2)
- };
- //------------------------------------------------------------------------------------------------
- class Button : public Widget
- {
+ bool in(unsigned int mx, unsigned int my, unsigned int px, unsigned int py) {
+ return ( !(mx >= x + px && my >= y + py)) || ( ! (mx <= x + px + w && my <= y + py + h) );
+ }
+ Ogre::OverlayContainer* mOverlay,*mCaptionOverlay,*mDecalLeft,*mDecalRight;
+ Ogre::String mBackground_Normal, mBackground_Active, mValue;
+ int x,y;
+ unsigned int w,h, mLength;
+ Window* mParent;
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+ class Slider {
+ friend class Window;
+
public:
- friend class Window;
- friend class GUI;
-
- Button(const Ogre::Vector4 &Dimensions, const Ogre::String &Material,
- const Ogre::String &Text, Callback callback, Window *parent);
- virtual ~Button() {}
+
+ class SliderValueRange {
+ public:
+ // Mark has to be between 0 and 1 (marker / width).
+// virtual void set(Ogre::Real marker, Ogre::String &value) {}
+// virtual Ogre::Real get() {return 0;}
+// virtual Ogre::String get() {return "";}
+ };
- protected:
- Callback mCallback; // Callback to use
- };
- //------------------------------------------------------------------------------------------------
- class MenuButton : public Button
- {
- public:
- MenuButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material,
- const Ogre::String &Text, Callback callback, Window *parent,
- Window *target) :
- Button(Dimensions, Material, Text, callback, parent),
- mTarget(target)
- {};
- virtual ~MenuButton(){};
- protected:
- void activate(const bool a) ;
+ class NumericSliderValueRange : public SliderValueRange{
+ public:
+ NumericSliderValueRange(Ogre::Real min, Ogre::Real max, Ogre::Real step = 1.0);
+ NumericSliderValueRange(Ogre::Real minA, Ogre::Real maxA, Ogre::Real stepA, Ogre::Real minB, Ogre::Real maxB, Ogre::Real stepB);
- Window *mTarget;
- };
- //------------------------------------------------------------------------------------------------
- class BoolButton : public Button
- {
- public:
- BoolButton(const Ogre::Vector4 &Dimensions, const Ogre::String &Material,
- const Ogre::String &Text, Callback callback, Window *parent, bool boolValue):
- Button(Dimensions, Material, Text, callback, parent),
- mBoolValue(boolValue)
- {}
- virtual ~BoolButton(){};
+
+ // 1. (from 0,1) 2. Value.
+ // std::map<Ogre::Real, Ogre::Real>;
+ };
- protected:
- void activate(const bool a) ;
+ class DictionarySliderValueRange {
- bool mBoolValue;
- };
- //------------------------------------------------------------------------------------------------
- class TextInput : public Widget
- {
- public:
- friend class Window;
- friend class GUI;
-
- TextInput(const Ogre::Vector4 &Dimensions, const Ogre::String &Material,
- const Ogre::String &Value, unsigned int length, Window *parent);
- virtual ~TextInput(){}
- const Ogre::String &getValue() const {return mValueText;}
- void setValue(const Ogre::String &v) {mCaptionOverlay->setCaption(mValueText = v);}
+ };
protected:
- unsigned int length;
- Ogre::String mValueText;// MaterialName Normal, MaterialName Active
+
+ Slider(int x, int y, int width, SliderValueRange*, Window *parent);
- };
- //------------------------------------------------------------------------------------------------
- class StaticText : public Widget
- {
- public:
- friend class Window;
+ void setToActive();
+ void setToNormal();
- StaticText(const Ogre::Vector4 &Dimensions,
- const Ogre::String &Value,
- Window *parent);
- virtual ~StaticText(){}
+ bool out(unsigned int mx, unsigned int my, unsigned int px, unsigned int py) {
+ return ( !(mx >= x + px && my >= y + py)) || ( ! (mx <= x + px + w && my <= y + py + h) );
+ }
- const Ogre::String &getValue() const
- {return mValueText;}
-
- void setValue(const Ogre::String &v)
- {
- mCaptionOverlay->setCaption(mValueText = v);
- mWidth = static_cast<int> (mValueText.size () * 7);
- mParent->adjustSizeToContent ();
- }
-
- protected:
-
- int length;
- Ogre::String mValueText;
- Window *mParent;
- };
- //------------------------------------------------------------------------------------------------
- class RealButton : public BetaGUIListener, public Widget
- {
- public:
- friend class Window;
-
- RealButton(BetaGUI::Window *window,
- Ogre::Real value,
- const Ogre::Vector4 &SliderMoves,
- const Ogre::String &label,
- const Ogre::Vector2 &pos);
-
- virtual ~RealButton(){};
-
- Ogre::Real getValue() const {return mValue;}
-
- void setValue(const Ogre::Real v);
-
- void onButtonPress(BetaGUI::Button *ref, Ogre::uchar type);
- protected:
-
- int length;
-
- BetaGUI::TextInput *mtextValueInput;
- BetaGUI::Button *mForward, *mFastForward, *mRewind, *mFastRewind;
-
- Ogre::Real mValue;
- Ogre::String mValueText;
-
- Ogre::Real mLowSlideUnit;
- Ogre::Real mFastSlideUnit;
- Ogre::Real mMinValue;
- Ogre::Real mMaxValue;
-
- };
- //------------------------------------------------------------------------------------------------
- class Effect
- {
- public:
- enum EffectInterpolatorType
- {
- EFFECT_LINEAR = 0,
- EFFECT_LINEARX2,
- EFFECT_LINEARX4,
- EFFECT_SIN
- };
- public:
- Effect(Widget * const widget, const Ogre::Real duration,
- const Ogre::Real startTime, const Ogre::Real currTime = 0, const bool repeat = false,
- EffectInterpolatorType type = EFFECT_LINEARX4) :
- mWidget(widget),
- mStartTime(startTime),
- mDuration(duration),
- mRepeat(repeat),
- mCurrTime(currTime),
- mType(type)
- {
- assert (duration != 0);
- }
- virtual ~Effect(){};
-
- virtual void updateValue(const Ogre::Real factor) = 0;
-
- bool update(Ogre::Real timeElapsed);
- Ogre::Real getTimeFactor() ;
- bool getTimeOrIsFinished();
-// Ogre::Real linearInterpolate(const Ogre::Real start,
-// const Ogre::Real end,
-// const Ogre::Real timeFactor) const;
- Ogre::Real interpolate(const Ogre::Real start,
- const Ogre::Real end,
- const Ogre::Real timeFactor) const;
-
- protected:
- Widget * const mWidget;
- const Ogre::Real mStartTime;
- const Ogre::Real mDuration;
- const bool mRepeat;
-
- Ogre::Real mCurrTime;
- const EffectInterpolatorType mType;
- };
- //------------------------------------------------------------------------------------------------
- class AlphaEffect : public Effect
- {
- public:
-
- AlphaEffect(Widget * const widget,
- const Ogre::Real duration,
- const Ogre::Real startAlpha,
- const Ogre::Real endAlpha,
- const Ogre::Real startTime,
- const Ogre::Real currTime = 0,
- const bool repeat = false,
- EffectInterpolatorType type = EFFECT_LINEARX4) :
- Effect(widget, duration, startTime, currTime, repeat),
- mStartAlpha(startAlpha),
- mEndAlpha(endAlpha)
- {
- assert(mStartAlpha >= 0.0 && mStartAlpha <= 1.0);
- assert(mEndAlpha >= 0.0 && mEndAlpha <= 1.0);
- }
- virtual ~AlphaEffect(){};
-
- void updateValue(const Ogre::Real factor);
- private:
- const Ogre::Real mStartAlpha;
- const Ogre::Real mEndAlpha;
- };
- //------------------------------------------------------------------------------------------------
- class MoveEffect : public Effect
- {
- public:
- MoveEffect(Widget * const widget,
- const Ogre::Real duration,
- const Ogre::Vector2 &startPosition,
- const Ogre::Vector2 &endPosition,
- const Ogre::Real startTime,
- const Ogre::Real currTime = 0,
- const bool repeat = false,
- EffectInterpolatorType type = EFFECT_LINEARX4) :
- Effect(widget, duration, startTime, currTime, repeat),
- mStartPosition(startPosition),
- mEndPosition(endPosition)
- {}
- virtual ~MoveEffect(){};
- void updateValue(const Ogre::Real factor);
-
- private:
- const Ogre::Vector2 mStartPosition;
- const Ogre::Vector2 mEndPosition;
- };
- //------------------------------------------------------------------------------------------------
- class SizeEffect : public Effect
- {
- public:
- SizeEffect(Widget * const widget,
- const Ogre::Real duration,
- const Ogre::Vector2 &startSize,
- const Ogre::Vector2 &endSize,
- const Ogre::Real startTime,
- const Ogre::Real currTime = 0,
- const bool repeat = false,
- EffectInterpolatorType type = EFFECT_LINEARX4) :
- Effect(widget, duration, startTime, currTime, repeat),
- mStartSize(startSize),
- mEndSize(endSize)
- {}
- virtual ~SizeEffect(){};
- void updateValue(const Ogre::Real factor);
-
- private:
- const Ogre::Vector2 mStartSize;
- const Ogre::Vector2 mEndSize;
- };
- //------------------------------------------------------------------------------------------------
- class ActivateEffect : public Effect
- {
- public:
- ActivateEffect(Widget * const widget,
- const Ogre::Real duration,
- const Ogre::Real startTime,
- const Ogre::Real currTime = 0,
- const bool repeat = false,
- EffectInterpolatorType type = EFFECT_LINEARX4):
- Effect(widget, duration, startTime, currTime, repeat)
- {};
- virtual ~ActivateEffect(){};
- void updateValue(const Ogre::Real factor);
-
- };
- //------------------------------------------------------------------------------------------------
- class OverEffect : public Effect
- {
- public:
- OverEffect(Widget * const widget,
- const Ogre::Real duration,
- const Ogre::Real startTime,
- const Ogre::Real currTime = 0,
- const bool repeat = false,
- EffectInterpolatorType type = EFFECT_LINEARX4):
- Effect(widget, duration, startTime, currTime, repeat)
- {};
- virtual ~OverEffect(){};
- void updateValue(const Ogre::Real factor);
-
- };
- //------------------------------------------------------------------------------------------------
-
-
+ Ogre::OverlayContainer* mOverlay, *mMarkerOverlay,*mDecalLeft,*mDecalRight, *mSelection; // Main Overlay and Caption
+ std::vector<Ogre::OverlayContainer*> mMarkers;
+ Ogre::String mBackground_Normal,mBackground_Active; // MaterialName Normal, MaterialName Active
+ int x,y; unsigned int w, h; // Dimensions.
+ ButtonMethodPtr mMethod;
+ bool mHorizontalSlider;
+ SliderValueRange* mRange;
+ Window *mParent;
+ };
+ ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} // End of Namespace
-
-///////////////////////////////////////////////////////////////////////////////
-#endif
-
+#endif
\ No newline at end of file
Modified: trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp
===================================================================
--- trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp 2007-11-14 05:48:13 UTC (rev 480)
+++ trunk/python-ogre/ThirdParty/betagui/BetaGui.cpp 2007-12-02 06:17:06 UTC (rev 481)
@@ -1,1269 +1,463 @@
+// Betajaen's GUI "BetaGUI 2.0", Version 35-uncompressed, http://www.ogre3d.org/wiki/index.php/BetaGUI
+//
+// Copyright (c) 2007 Robin Southern <bet...@ih...>
+//
+// 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 t...
[truncated message content] |