[Gcblue-commits] gcb_wx/include/graphics tc3DWindow.h,1.11,1.12 tcButton.h,1.10,1.11 tcLauncherPopup
Status: Alpha
Brought to you by:
ddcforge
|
From: Dewitt C. <ddc...@us...> - 2004-12-21 02:26:30
|
Update of /cvsroot/gcblue/gcb_wx/include/graphics In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31924/include/graphics Modified Files: tc3DWindow.h tcButton.h tcLauncherPopup.h Log Message: Changes for OSG 0.9.8 Index: tc3DWindow.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tc3DWindow.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tc3DWindow.h 23 Nov 2004 23:30:46 -0000 1.11 --- tc3DWindow.h 21 Dec 2004 02:26:17 -0000 1.12 *************** *** 65,68 **** --- 65,69 ---- using osgText::Text::LEFT_BASE_LINE; using osgText::Text::LEFT_CENTER; + using osgText::Text::RIGHT_CENTER; using osgText::Text::CENTER_CENTER; Index: tcLauncherPopup.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcLauncherPopup.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tcLauncherPopup.h 11 Dec 2004 01:09:04 -0000 1.2 --- tcLauncherPopup.h 21 Dec 2004 02:26:17 -0000 1.3 *************** *** 37,40 **** --- 37,42 ---- class tcLauncher; class tcSimState; + class tcButton; + class tcNumberWidget; /** *************** *** 56,73 **** bool redraw; unsigned int birthCount; virtual void OnLButtonDown(wxMouseEvent& event); ! virtual void OnMouseOver(wxMouseEvent& event); private: long platformId; unsigned launcherIdx; tcSimState* simState; ! tcRect launchButton; ! tcRect datumButton; ! tcLauncher* GetLauncher(); }; --- 58,109 ---- bool redraw; unsigned int birthCount; + bool isLButtonDown; + bool dragOn; + wxPoint dragPoint; ///< initial point at start of drag + + virtual void OnChildRedraw(wxCommandEvent& event); + virtual void OnCloseCommand(wxCommandEvent& event); + virtual void OnDatumCommand(wxCommandEvent& event); + virtual void OnLaunchCommand(wxCommandEvent& event); + virtual void OnLButtonDown(wxMouseEvent& event); ! virtual void OnLButtonUp(wxMouseEvent& event); ! virtual void OnMouseMove(wxMouseEvent& event); ! ! private: + enum {LP_CLOSE = 0, LP_LAUNCH = 1, LP_SETDATUM = 2}; long platformId; unsigned launcherIdx; tcSimState* simState; ! bool destroy; ///< workaround to delay destruction of window to safe time ! tcLauncher* GetLauncher(); + void InitTorpedoControls(); + void UpdateTorpedoLauncher(); + + tcButton* closeButton; + + // torpedo launcher controls + tcButton* launchButton; + tcButton* selectDatumButton; + + tcNumberWidget* runToEnableAdjust; + tcNumberWidget* depthAdjust; + tcNumberWidget* speedAdjust; + tcNumberWidget* ceilingAdjust; + tcNumberWidget* floorAdjust; + tcButton* activePassiveButton; + float runToEnable; + float depth; + float speed; + float ceiling; + float floor; + bool isPassive; + DECLARE_EVENT_TABLE() }; Index: tcButton.h =================================================================== RCS file: /cvsroot/gcblue/gcb_wx/include/graphics/tcButton.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tcButton.h 11 Dec 2004 01:09:04 -0000 1.10 --- tcButton.h 21 Dec 2004 02:26:17 -0000 1.11 *************** *** 51,56 **** void LoadImages(std::string offImageName, std::string onImageName, std::string overOffImageName, std::string overOnImageName); void SetCaption(std::string s) {caption = s;} ! void SetCommand(long cmd) {command = cmd;} void SetOn(bool state) {isButtonOn = state;} void SetSendRedraw(bool state) {sendRedraw = state;} --- 51,61 ---- void LoadImages(std::string offImageName, std::string onImageName, std::string overOffImageName, std::string overOnImageName); + + void SetBackgroundAlpha(float val); void SetCaption(std::string s) {caption = s;} ! void SetCommand(long cmd) {command = cmd;} ! void SetFillColors(const osg::Vec4& off_color, const osg::Vec4& over_color, ! const osg::Vec4& on_color); ! void SetFontSize(float val); void SetOn(bool state) {isButtonOn = state;} void SetSendRedraw(bool state) {sendRedraw = state;} *************** *** 71,74 **** --- 76,83 ---- bool sendRedraw; ///< true to send redraw message to parent on button state change float backgroundAlpha; ///< transparency value for solid color background + + osg::Vec4 offColor; + osg::Vec4 overColor; + osg::Vec4 onColor; osg::ref_ptr<osg::Texture2D> offImage; |