[Gcblue-commits] gcb_wx/include/graphics tcButton.h,1.9,1.10 tcLauncherPopup.h,1.1,1.2 tcMapView.h,1
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-11 01:09:56
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30338/include/graphics Modified Files: tcButton.h tcLauncherPopup.h tcMapView.h tcOOBView.h tcPopupControl.h Log Message: Sonar work, passive sonar, torpedoes Index: tcPopupControl.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcPopupControl.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcPopupControl.h 1 Nov 2004 03:17:16 -0000 1.3 --- tcPopupControl.h 11 Dec 2004 01:09:04 -0000 1.4 *************** *** 42,45 **** --- 42,48 ---- class tcSimPythonInterface; } + + class tcCommandQueue; + using namespace ScriptInterface; Index: tcOOBView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcOOBView.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tcOOBView.h 7 Dec 2004 03:59:08 -0000 1.3 --- tcOOBView.h 11 Dec 2004 01:09:04 -0000 1.4 *************** *** 30,34 **** #include "wx/wx.h" ! #include "tc3DWindow.h" #include "tcPool.h" #include "tcDatabase.h" --- 30,34 ---- #include "wx/wx.h" ! #include "tcXmlWindow.h" #include "tcPool.h" #include "tcDatabase.h" *************** *** 48,64 **** struct tsOOBInfo { ! tnPoolIndex mnID; ! tcDBString mzName; ! tnPoolIndex mnLeaderID; ! std::vector<unsigned> maFollowers; ! bool mbRadiating; ! 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); }; --- 48,64 ---- struct tsOOBInfo { ! tnPoolIndex mnID; ! tcDBString mzName; ! tnPoolIndex mnLeaderID; ! std::vector<unsigned> maFollowers; ! bool mbRadiating; ! 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); }; *************** *** 72,132 **** * All of the code in this section is out of date and needs refactoring */ ! class tcOOBView : public tc3DWindow { public: ! tcSimState* mpSimState; ///< for retrieving platform info ! tcTacticalMapView *mpMapView; ! int mnAlliance; ///< alliance to display ! std::vector<tsOOBInfo> surfaceObj; ! std::vector<tsOOBInfo> airObj; ! std::vector<tsOOBInfo> flightopsObj; ///< carriers and airfields ! tnPoolIndex mnSelectedKey; ! struct ! { ! bool mbApply; ! tnPoolIndex mnFollowerKey; ! tnPoolIndex mnNewLeaderKey; ! } msFormationChangeInfo; ! void AttachMapView(tcTacticalMapView *apMapView) {mpMapView = apMapView;} ! void Update(); ! void Draw(); ! void OnLButtonDown(wxMouseEvent& event); ! void OnLButtonUp(wxMouseEvent& event); ! void OnMouseMove(wxMouseEvent& event); ! void SetHookID(long id) {mnSelectedKey = id;} ! tcOOBView(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "OOBView"); ! ~tcOOBView(); private: ! bool mbMouseDrag; ! float mfRowSpacing; ! float mfYOffset; ///< offset for Y coord of first item ! float mfXOffset; ! 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(); ! void UpdateRect(); ! void UpdateRectCategory(std::vector<tsOOBInfo>& objInfo, float& y, float stopy); }; --- 72,155 ---- * All of the code in this section is out of date and needs refactoring */ ! class tcOOBView : public tcXmlWindow { public: ! tcSimState* mpSimState; ///< for retrieving platform info ! tcTacticalMapView *mpMapView; ! int mnAlliance; ///< alliance to display ! // own alliance ! std::vector<tsOOBInfo> surfaceObj; ! std::vector<tsOOBInfo> airObj; ! std::vector<tsOOBInfo> flightopsObj; ///< carriers and airfields ! std::vector<tsOOBInfo> heloObj; ! std::vector<tsOOBInfo> subObj; ! // tracks ! std::vector<tsOOBInfo> surfaceTracks; ! std::vector<tsOOBInfo> subTracks; ! std::vector<tsOOBInfo> airTracks; ! std::vector<tsOOBInfo> missileTracks; ! std::vector<tsOOBInfo> unknownTracks; ! tnPoolIndex mnSelectedKey; ! struct ! { ! bool mbApply; ! tnPoolIndex mnFollowerKey; ! tnPoolIndex mnNewLeaderKey; ! } msFormationChangeInfo; ! ! void AttachMapView(tcTacticalMapView *apMapView) {mpMapView = apMapView;} ! void Update(); ! void Draw(); ! void OnLButtonDown(wxMouseEvent& event); ! void OnLButtonUp(wxMouseEvent& event); ! void OnMouseMove(wxMouseEvent& event); ! void SetDisplayOwn(wxCommandEvent& event); ! void SetDisplayTrack(wxCommandEvent& event); ! void SetIPText(wxCommandEvent& event); ! ! void SetHookID(long id) {mnSelectedKey = id;} ! ! tcOOBView(wxWindow *parent, const wxPoint& pos, const wxSize& size, const wxString& name = "OOBView"); ! ~tcOOBView(); private: ! /** * */ ! enum DisplayMode ! { ! SHOW_OWN = 0, ! SHOW_TRACKS = 1 ! }; ! bool mbMouseDrag; ! float mfRowSpacing; ! float mfYOffset; ///< offset for Y coord of first item ! float mfXOffset; ! float mfXIndent; ///< indent for formations ! int displayMode; ! tnPoolIndex objKeys[MAX_OOB_OBJECTS]; ! tsOOBInfo* ButtonContainingPoint(wxRealPoint pointf); ! tsOOBInfo* ButtonContainingPointCategory(wxRealPoint pointf, ! std::vector<tsOOBInfo>& objInfo); ! void DrawCategory(std::vector<tsOOBInfo>& objInfo, float stopy); ! void DrawOwn(); ! void DrawTracks(); ! ! float GetCategoryY(std::vector<tsOOBInfo>& objInfo); ! void PlaceIcons(); ! void PlaceIconsCategory(std::vector<tsOOBInfo>& objInfo); ! void UpdateData(); ! void UpdateTrackData(); ! void UpdateFormation(); ! void UpdateRect(); ! void UpdateRectCategory(std::vector<tsOOBInfo>& objInfo, float& y, float stopy); ! ! DECLARE_EVENT_TABLE() }; *************** *** 135,138 **** --- 158,162 ---- + #endif Index: tcLauncherPopup.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcLauncherPopup.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tcLauncherPopup.h 7 Dec 2004 03:59:08 -0000 1.1 --- tcLauncherPopup.h 11 Dec 2004 01:09:04 -0000 1.2 *************** *** 65,68 **** --- 65,69 ---- tcSimState* simState; tcRect launchButton; + tcRect datumButton; tcLauncher* GetLauncher(); Index: tcMapView.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcMapView.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tcMapView.h 7 Dec 2004 03:59:07 -0000 1.8 --- tcMapView.h 11 Dec 2004 01:09:04 -0000 1.9 *************** *** 45,48 **** --- 45,49 ---- } + class tcCommandQueue; class tcMapData; class tcMapObject; *************** *** 273,276 **** --- 274,278 ---- char mzMapCmdCallback[128]; int callbackParam; + long callbackPlatformID; ///< platform ID for callback *************** *** 283,291 **** float GetMapCmdHeading() {return mfMapCmdHeading;} long GetMapCmdTarget() {return mnMapCmdTarget;} ! void SetMapCmdCallback(const char *azCallback, int param = -1) ! { ! strcpy(mzMapCmdCallback,azCallback); ! callbackParam = param; ! } void SetMousePoint(wxPoint point) {mpointMouse = point;} // used to be TranslatePoint(point); void ScrollMap(float afDirection_deg); --- 285,289 ---- float GetMapCmdHeading() {return mfMapCmdHeading;} long GetMapCmdTarget() {return mnMapCmdTarget;} ! void SetMapCmdCallback(const char *azCallback, long id, int param = -1); void SetMousePoint(wxPoint point) {mpointMouse = point;} // used to be TranslatePoint(point); void ScrollMap(float afDirection_deg); Index: tcButton.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcButton.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tcButton.h 2 Oct 2004 22:41:32 -0000 1.9 --- tcButton.h 11 Dec 2004 01:09:04 -0000 1.10 *************** *** 70,73 **** --- 70,74 ---- float fontSize; bool sendRedraw; ///< true to send redraw message to parent on button state change + float backgroundAlpha; ///< transparency value for solid color background osg::ref_ptr<osg::Texture2D> offImage; |