From a0b411d35c10d31ce38c4efad7b54eaab275a547 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 16 Jun 2012 04:16:12 +0200 Subject: [PATCH] CHANGED: #1471 CCtrlTooltip is now in the NELGUI library and is under NLGUI namespace. --- .../include/nel/gui}/ctrl_tooltip.h | 49 +++++++++--------- .../src/gui}/ctrl_tooltip.cpp | 50 +++++++++++-------- .../src/interface_v3/interface_parser.cpp | 2 +- .../client/src/interface_v3/view_text.cpp | 2 +- .../ryzom/client/src/interface_v3/view_text.h | 6 ++- 5 files changed, 61 insertions(+), 48 deletions(-) rename code/{ryzom/client/src/interface_v3 => nel/include/nel/gui}/ctrl_tooltip.h (60%) rename code/{ryzom/client/src/interface_v3 => nel/src/gui}/ctrl_tooltip.cpp (58%) diff --git a/code/ryzom/client/src/interface_v3/ctrl_tooltip.h b/code/nel/include/nel/gui/ctrl_tooltip.h similarity index 60% rename from code/ryzom/client/src/interface_v3/ctrl_tooltip.h rename to code/nel/include/nel/gui/ctrl_tooltip.h index 67fa2ccd3..6c49a194c 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_tooltip.h +++ b/code/nel/include/nel/gui/ctrl_tooltip.h @@ -25,31 +25,34 @@ namespace NLGUI { class CEventDescriptor; + + + /** + * \author Matthieu 'Mr TRAP' Besson + * \author Nevrax France + * \date 2003 + */ + class CCtrlToolTip : public CCtrlBase + { + public: + DECLARE_UI_CLASS(CCtrlToolTip) + /// Constructor + CCtrlToolTip(const TCtorParam ¶m) : CCtrlBase(param) {} + + virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); + virtual void draw(); + virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); + // Can do nothing with tooltip (but display it :) ) + virtual bool isCapturable() const {return false;} + virtual void serial(NLMISC::IStream &f); + public: + + }; + + } -/** - * \author Matthieu 'Mr TRAP' Besson - * \author Nevrax France - * \date 2003 - */ -class CCtrlToolTip : public CCtrlBase -{ -public: - DECLARE_UI_CLASS(CCtrlToolTip) - /// Constructor - CCtrlToolTip(const TCtorParam ¶m) : CCtrlBase(param) {} - - virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); - virtual void draw(); - virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); - // Can do nothing with tooltip (but display it :) ) - virtual bool isCapturable() const {return false;} - virtual void serial(NLMISC::IStream &f); -public: - -}; - - #endif // RZ_CTRL_TOOLTIP_H /* End of ctrl_tooltip.h */ + diff --git a/code/ryzom/client/src/interface_v3/ctrl_tooltip.cpp b/code/nel/src/gui/ctrl_tooltip.cpp similarity index 58% rename from code/ryzom/client/src/interface_v3/ctrl_tooltip.cpp rename to code/nel/src/gui/ctrl_tooltip.cpp index 8b17a7073..0900084a9 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_tooltip.cpp +++ b/code/nel/src/gui/ctrl_tooltip.cpp @@ -17,7 +17,7 @@ // ---------------------------------------------------------------------------- -#include "ctrl_tooltip.h" +#include "nel/gui/ctrl_tooltip.h" #include "nel/misc/xml_auto_ptr.h" // ---------------------------------------------------------------------------- @@ -29,27 +29,33 @@ NLMISC_REGISTER_OBJECT(CViewBase, CCtrlToolTip, std::string, "tooltip"); REGISTER_UI_CLASS(CCtrlToolTip) -// ---------------------------------------------------------------------------- -void CCtrlToolTip::draw () +namespace NLGUI { + + // ---------------------------------------------------------------------------- + void CCtrlToolTip::draw () + { + } + + // ---------------------------------------------------------------------------- + bool CCtrlToolTip::handleEvent (const NLGUI::CEventDescriptor& event) + { + if (CCtrlBase::handleEvent(event)) return true; + return false; + } + + // ---------------------------------------------------------------------------- + bool CCtrlToolTip::parse(xmlNodePtr cur, CInterfaceGroup *parentGroup) + { + if (!CCtrlBase::parse(cur, parentGroup)) return false; + return true; + } + + // ---------------------------------------------------------------------------- + void CCtrlToolTip::serial(NLMISC::IStream &f) + { + CCtrlBase::serial(f); + } + } -// ---------------------------------------------------------------------------- -bool CCtrlToolTip::handleEvent (const NLGUI::CEventDescriptor& event) -{ - if (CCtrlBase::handleEvent(event)) return true; - return false; -} - -// ---------------------------------------------------------------------------- -bool CCtrlToolTip::parse(xmlNodePtr cur, CInterfaceGroup *parentGroup) -{ - if (!CCtrlBase::parse(cur, parentGroup)) return false; - return true; -} - -// ---------------------------------------------------------------------------- -void CCtrlToolTip::serial(NLMISC::IStream &f) -{ - CCtrlBase::serial(f); -} diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index 4d0b76ed8..be1f38175 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -55,7 +55,7 @@ #include "nel/gui/ctrl_scroll.h" #include "nel/gui/ctrl_button.h" #include "nel/gui/ctrl_col_pick.h" -#include "ctrl_tooltip.h" +#include "nel/gui/ctrl_tooltip.h" #include "ctrl_text_button.h" #include "group_paragraph.h" // For CCtrlLink // DBCtrl diff --git a/code/ryzom/client/src/interface_v3/view_text.cpp b/code/ryzom/client/src/interface_v3/view_text.cpp index 895aadda6..af81274c1 100644 --- a/code/ryzom/client/src/interface_v3/view_text.cpp +++ b/code/ryzom/client/src/interface_v3/view_text.cpp @@ -24,7 +24,7 @@ #include "view_text.h" #include "interface_manager.h" #include "group_container.h" // CCtrlResizer -#include "ctrl_tooltip.h" +#include "nel/gui/ctrl_tooltip.h" #include "nel/misc/xml_auto_ptr.h" #include "nel/gui/lua_ihm.h" diff --git a/code/ryzom/client/src/interface_v3/view_text.h b/code/ryzom/client/src/interface_v3/view_text.h index 3620bbe77..623e2c2aa 100644 --- a/code/ryzom/client/src/interface_v3/view_text.h +++ b/code/ryzom/client/src/interface_v3/view_text.h @@ -23,7 +23,11 @@ #include "../misc.h" #include "nel/3d/u_text_context.h" -class CCtrlToolTip; +namespace NLGUI +{ + class CCtrlToolTip; +} + /** * class implementing a text view