[Gcblue-commits] gcb_wx/include/graphics tc3DViewer.h,1.1,1.2 tc3DWindow.h,1.4,1.5 tcConsoleBox.h,1.
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-10-07 22:01:24
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12334/include/graphics Modified Files: tc3DViewer.h tc3DWindow.h tcConsoleBox.h tcHookInfo.h tcOOBView.h tcXmlWindow.h Log Message: Changes related to GDI+ replacement Index: tcXmlWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcXmlWindow.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcXmlWindow.h 2 Oct 2004 22:41:32 -0000 1.2 --- tcXmlWindow.h 7 Oct 2004 22:01:12 -0000 1.3 *************** *** 49,61 **** protected: TiXmlDocument* config; ///< XML auto-configuration file for window - /* - static Gdiplus::SolidBrush* mpBrush; - static Gdiplus::Font* font20; - static Gdiplus::Font* font16; - static Gdiplus::Font* font12; - static Gdiplus::Font* font10; - static Gdiplus::Font* font8; - static Gdiplus::Pen* mpPen; - */ void AddXMLControls(); ///< adds XML controls to window that can be added automatically --- 49,52 ---- Index: tcOOBView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcOOBView.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcOOBView.h 2 Oct 2004 22:41:32 -0000 1.1 --- tcOOBView.h 7 Oct 2004 22:01:12 -0000 1.2 *************** *** 1,7 **** ! /* ! ** tcOOBView.h ** order of battle view window ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,7 ---- ! /** ! ** @file tcOOBView.h ** order of battle view window ! */ ! /* Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 29,37 **** #include "wx/wx.h" ! #ifdef WIN32 ! #include "wx/msw/private.h" // for MS Windows specific definitions ! #endif ! #include "tcWindow.h" ! #include <string> #include "tcPool.h" #include "tcDatabase.h" --- 29,34 ---- #include "wx/wx.h" ! ! #include "tc3DWindow.h" #include "tcPool.h" #include "tcDatabase.h" *************** *** 58,65 **** float mfDamage_fract; ///< damage over toughness std::string mzAction; ! Gdiplus::RectF rectf; ///< draw location (without offset for current scroll) ! Gdiplus::RectF remcon; ///< location for EMCON icon ! Gdiplus::RectF rdamage; ///< location for damage indicator ! Gdiplus::RectF raction; ///< loc for action string tsOOBInfo& operator= (const tsOOBInfo& rhs); --- 55,62 ---- float mfDamage_fract; ///< damage over toughness std::string mzAction; ! tcRect rectf; ///< draw location (without offset for current scroll) ! tcRect remcon; ///< location for EMCON icon ! tcRect rdamage; ///< location for damage indicator ! tcRect raction; ///< loc for action string tsOOBInfo& operator= (const tsOOBInfo& rhs); *************** *** 75,79 **** * All of the code in this section is out of date and needs refactoring */ ! class tcOOBView : public tcWindow { public: --- 72,76 ---- * All of the code in this section is out of date and needs refactoring */ ! class tcOOBView : public tc3DWindow { public: *************** *** 96,100 **** void AttachMapView(tcTacticalMapView *apMapView) {mpMapView = apMapView;} void Update(); ! int Draw(); void OnLButtonDown(wxMouseEvent& event); void OnLButtonUp(wxMouseEvent& event); --- 93,97 ---- void AttachMapView(tcTacticalMapView *apMapView) {mpMapView = apMapView;} void Update(); ! void Draw(); void OnLButtonDown(wxMouseEvent& event); void OnLButtonUp(wxMouseEvent& event); *************** *** 112,128 **** float mfXIndent; ///< indent for formations tnPoolIndex objKeys[MAX_OOB_OBJECTS]; Gdiplus::SolidBrush* mpBrush; Gdiplus::Pen* mpPen; Gdiplus::Font* mpFont; ! tsOOBInfo* ButtonContainingPoint(Gdiplus::PointF pointf); ! tsOOBInfo* ButtonContainingPointCategory(Gdiplus::PointF pointf, std::vector<tsOOBInfo>& objInfo); ! void DrawCategory(Gdiplus::Graphics* graphics, ! std::vector<tsOOBInfo>& objInfo, float stopy); float GetCategoryY(std::vector<tsOOBInfo>& objInfo); ! void PlaceIcons(Gdiplus::Graphics *apGraphics); ! void PlaceIconsCategory(Gdiplus::Graphics* graphics, std::vector<tsOOBInfo>& objInfo); void UpdateData(); void UpdateFormation(); --- 109,127 ---- float mfXIndent; ///< indent for formations tnPoolIndex objKeys[MAX_OOB_OBJECTS]; + + /* Gdiplus::SolidBrush* mpBrush; Gdiplus::Pen* mpPen; Gdiplus::Font* mpFont; + */ ! tsOOBInfo* ButtonContainingPoint(wxRealPoint pointf); ! tsOOBInfo* ButtonContainingPointCategory(wxRealPoint pointf, std::vector<tsOOBInfo>& objInfo); ! void DrawCategory(std::vector<tsOOBInfo>& objInfo, float stopy); float GetCategoryY(std::vector<tsOOBInfo>& objInfo); ! void PlaceIcons(); ! void PlaceIconsCategory(std::vector<tsOOBInfo>& objInfo); void UpdateData(); void UpdateFormation(); Index: tcConsoleBox.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcConsoleBox.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tcConsoleBox.h 2 Oct 2004 22:41:32 -0000 1.5 --- tcConsoleBox.h 7 Oct 2004 22:01:12 -0000 1.6 *************** *** 62,69 **** --- 62,71 ---- int Print(const char* line); + void Clear(); virtual void Draw(); void ForceRedraw() {mbForceRedraw = true;} bool IsCurrentLineEmpty(); + virtual void OnSize(wxSizeEvent& event); bool Redraw() const {return mbRedraw != 0;} ///< @return true if console will be updated void SetDelayedTextEffect(bool effectOn) {useDelayedTextEffect = effectOn;} *************** *** 80,83 **** --- 82,86 ---- bool isMouseOver; bool isFocused; + bool drawBorder; float fontSize; osg::Vec4 fontColor; Index: tcHookInfo.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcHookInfo.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcHookInfo.h 2 Oct 2004 22:41:32 -0000 1.1 --- tcHookInfo.h 7 Oct 2004 22:01:12 -0000 1.2 *************** *** 1,6 **** ! /* ! ** tcHookInfo.h ! ** ! ** Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. --- 1,6 ---- ! /** ! ** @file tcHookInfo.h ! */ ! /* Copyright (C) 2003 Dewitt Colclough (de...@tw...) ** All rights reserved. *************** *** 30,35 **** #include "wx/wx.h" //#include "wx/msw/private.h" //for MS Windows specific definitions ! #include "tcwindow.h" ! #include <string> // forward declare to cut dependencies --- 30,35 ---- #include "wx/wx.h" //#include "wx/msw/private.h" //for MS Windows specific definitions ! #include "tc3DWindow.h" ! //#include <string> // forward declare to cut dependencies *************** *** 54,63 **** #endif ! class tcHookInfo : public tcWindow { public: ! int Draw(void); ! void DrawOwn(Gdiplus::Graphics *apGraphics, tcGameObject *pHookedObj); ! void DrawTrack(Gdiplus::Graphics *apGraphics, tnPoolIndex anID); void AttachSimState(tcSimState *apSS) {mpSS=apSS;} void AttachOptions(tcOptions *apOptions) {mpOptions = apOptions;} --- 54,63 ---- #endif ! class tcHookInfo : public tc3DWindow { public: ! void Draw(); ! void DrawOwn(tcGameObject *pHookedObj); ! void DrawTrack(tnPoolIndex anID); void AttachSimState(tcSimState *apSS) {mpSS=apSS;} void AttachOptions(tcOptions *apOptions) {mpOptions = apOptions;} *************** *** 66,69 **** --- 66,70 ---- void SetHookID(tnPoolIndex anID) {mnHookID=anID;} void OnLButtonDown(wxMouseEvent& event); + tcHookInfo(wxWindow *parent, const wxPoint& pos, const wxSize& size, *************** *** 78,89 **** tnPoolIndex mnHookID; ! Gdiplus::Pen *mpPen; // GDI+ objects ! Gdiplus::SolidBrush *mpBrush; ! Gdiplus::Font *mpFont, *mpFontLarge; ! void DrawTrackEngaged(Gdiplus::Graphics *graphics, const Sensor::tcSensorMapTrack *smtrack, float& x, float& y); ! void GetFunctionalName(std::string& s, tcDatabaseObject *apDBObject, tcGameObject *apGameObject); ! void GetObjectInfo(std::string& s, tcDatabaseObject *apDBObject, tcGameObject *apGameObject); }; --- 79,92 ---- tnPoolIndex mnHookID; ! //Gdiplus::Pen *mpPen; // GDI+ objects ! //Gdiplus::SolidBrush *mpBrush; ! //Gdiplus::Font *mpFont, *mpFontLarge; ! void DrawTrackEngaged( const Sensor::tcSensorMapTrack *smtrack, float& x, float& y); ! void GetFunctionalName(std::string& s, ! tcDatabaseObject *apDBObject, tcGameObject *apGameObject); ! void GetObjectInfo(std::string& s, ! tcDatabaseObject *apDBObject, tcGameObject *apGameObject); }; Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tc3DWindow.h 2 Oct 2004 22:41:32 -0000 1.4 --- tc3DWindow.h 7 Oct 2004 22:01:12 -0000 1.5 *************** *** 48,52 **** class Switch; class Texture2D; ! class Vec4; } --- 48,52 ---- class Switch; class Texture2D; ! // class Vec4; // causes C1001, line 2701 compiler error !? } *************** *** 181,185 **** tc3DWindow(wxWindow* parent, const wxPoint& pos, const wxSize& size, ! const wxString& name = "tc3DWindow"); virtual ~tc3DWindow(); protected: --- 181,185 ---- tc3DWindow(wxWindow* parent, const wxPoint& pos, const wxSize& size, ! const wxString& name = "tc3DWindow", tc3DWindow* graphicsHost = 0); virtual ~tc3DWindow(); protected: Index: tc3DViewer.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DViewer.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tc3DViewer.h 2 Oct 2004 22:41:32 -0000 1.1 --- tc3DViewer.h 7 Oct 2004 22:01:12 -0000 1.2 *************** *** 29,33 **** #include "wx/wx.h" ! #include "wx/msw/private.h" // for MS Windows specific definitions #include <osg/FrameStamp> #include <osg/NodeVisitor> --- 29,33 ---- #include "wx/wx.h" ! //#include "wx/msw/private.h" // for MS Windows specific definitions #include <osg/FrameStamp> #include <osg/NodeVisitor> *************** *** 51,63 **** { public: - // Producer::ref_ptr<tcRenderSurface> render_surface; - //Producer::ref_ptr<Producer::Camera> camera; - //Producer::ref_ptr<Producer::CameraConfig> camera_config; - //osg::ref_ptr<osgProducer::OsgCameraGroup> camera_group; osg::ref_ptr<osgUtil::SceneView> sceneView; osg::ref_ptr<osg::DisplaySettings> displaySettings; osg::ref_ptr<osg::NodeVisitor> updateVisitor; osg::ref_ptr<osg::FrameStamp> frameStamp; osg::ref_ptr<osgText::Text> viewerText; ///< text for debug/basic viewer info display osg::ref_ptr<osg::MatrixTransform> hudObjects; ///< add HUD objects to this transform osg::ref_ptr<osg::Projection> orthoProjection; ///< ortho projection for HUD objects --- 51,64 ---- { public: osg::ref_ptr<osgUtil::SceneView> sceneView; + osg::ref_ptr<osgUtil::SceneView> guiView; + osg::ref_ptr<osg::DisplaySettings> displaySettings; osg::ref_ptr<osg::NodeVisitor> updateVisitor; + osg::ref_ptr<osg::NodeVisitor> guiUpdateVisitor; osg::ref_ptr<osg::FrameStamp> frameStamp; + osg::ref_ptr<osg::FrameStamp> guiFrameStamp; osg::ref_ptr<osgText::Text> viewerText; ///< text for debug/basic viewer info display + osg::ref_ptr<osg::MatrixTransform> guiObjects; osg::ref_ptr<osg::MatrixTransform> hudObjects; ///< add HUD objects to this transform osg::ref_ptr<osg::Projection> orthoProjection; ///< ortho projection for HUD objects *************** *** 119,122 **** --- 120,124 ---- double GetGameTime() const {return gameTime;} osg::Vec3 GetObjectPosition(tcGameObject *obj); + bool GetTerrainActive() const {return isTerrainActive;} bool IsActive() {return isActive;} void LoadModel(tcGameObject *obj); *************** *** 204,207 **** --- 206,210 ---- void InitLight(); + void InitGuiView(); void InitSceneView(wxPoint pos, wxSize size); void InitState(); |