From fce2d8e4433f2e7dc8ff06abb8d877d7c568a0c5 Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Thu, 10 May 2012 23:31:39 +0200 Subject: [PATCH] Moved event descriptors under the NLGUI namespace. --- code/nel/include/nel/gui/event_descriptor.h | 4 + code/nel/src/gui/event_descriptor.cpp | 5 ++ .../src/interface_v3/bot_chat_page_trade.cpp | 2 +- .../client/src/interface_v3/ctrl_base.cpp | 10 +-- .../ryzom/client/src/interface_v3/ctrl_base.h | 2 +- .../src/interface_v3/ctrl_base_button.cpp | 22 +++--- .../src/interface_v3/ctrl_base_button.h | 2 +- .../client/src/interface_v3/ctrl_button.h | 6 +- .../client/src/interface_v3/ctrl_col_pick.cpp | 12 +-- .../client/src/interface_v3/ctrl_col_pick.h | 2 +- .../client/src/interface_v3/ctrl_polygon.cpp | 2 +- .../client/src/interface_v3/ctrl_polygon.h | 2 +- .../client/src/interface_v3/ctrl_quad.cpp | 2 +- .../ryzom/client/src/interface_v3/ctrl_quad.h | 2 +- .../client/src/interface_v3/ctrl_scroll.cpp | 16 ++-- .../client/src/interface_v3/ctrl_scroll.h | 2 +- .../src/interface_v3/ctrl_text_button.h | 5 +- .../client/src/interface_v3/ctrl_tooltip.cpp | 2 +- .../client/src/interface_v3/ctrl_tooltip.h | 7 +- .../client/src/interface_v3/dbctrl_sheet.cpp | 16 ++-- .../client/src/interface_v3/dbctrl_sheet.h | 2 +- .../src/interface_v3/dbgroup_list_sheet.cpp | 10 +-- .../src/interface_v3/dbgroup_list_sheet.h | 2 +- .../interface_v3/dbgroup_list_sheet_text.cpp | 20 ++--- .../interface_v3/dbgroup_list_sheet_text.h | 2 +- .../interface_v3/dbgroup_select_number.cpp | 8 +- .../src/interface_v3/dbgroup_select_number.h | 2 +- .../client/src/interface_v3/group_compas.cpp | 8 +- .../client/src/interface_v3/group_compas.h | 2 +- .../src/interface_v3/group_container.cpp | 76 +++++++++---------- .../client/src/interface_v3/group_container.h | 15 ++-- .../client/src/interface_v3/group_editbox.cpp | 36 ++++----- .../client/src/interface_v3/group_editbox.h | 12 +-- .../client/src/interface_v3/group_header.cpp | 20 ++--- .../client/src/interface_v3/group_html.cpp | 8 +- .../client/src/interface_v3/group_html.h | 2 +- .../client/src/interface_v3/group_list.cpp | 6 +- .../client/src/interface_v3/group_list.h | 2 +- .../client/src/interface_v3/group_map.cpp | 44 +++++------ .../ryzom/client/src/interface_v3/group_map.h | 6 +- .../client/src/interface_v3/group_menu.cpp | 16 ++-- .../client/src/interface_v3/group_menu.h | 4 +- .../src/interface_v3/group_modal_get_key.cpp | 8 +- .../src/interface_v3/group_modal_get_key.h | 2 +- .../src/interface_v3/group_paragraph.cpp | 6 +- .../client/src/interface_v3/group_paragraph.h | 2 +- .../src/interface_v3/group_scrolltext.cpp | 8 +- .../src/interface_v3/group_scrolltext.h | 2 +- .../client/src/interface_v3/group_tab.cpp | 8 +- .../ryzom/client/src/interface_v3/group_tab.h | 2 +- .../client/src/interface_v3/group_tree.cpp | 10 +-- .../client/src/interface_v3/group_tree.h | 2 +- .../client/src/interface_v3/group_wheel.cpp | 8 +- .../client/src/interface_v3/group_wheel.h | 2 +- .../interface_v3/input_handler_manager.cpp | 34 ++++----- .../src/interface_v3/input_handler_manager.h | 6 +- .../src/interface_v3/interface_3d_scene.cpp | 24 +++--- .../src/interface_v3/interface_3d_scene.h | 2 +- .../src/interface_v3/interface_group.cpp | 24 +++--- .../client/src/interface_v3/interface_group.h | 4 +- .../src/interface_v3/interface_manager.cpp | 48 ++++++------ .../src/interface_v3/interface_manager.h | 6 +- .../client/src/r2/displayer_visual_group.cpp | 2 +- code/ryzom/client/src/r2/editor.cpp | 10 +-- code/ryzom/client/src/r2/editor.h | 2 +- .../ryzom/client/src/r2/instance_map_deco.cpp | 2 +- code/ryzom/client/src/r2/instance_map_deco.h | 2 +- code/ryzom/client/src/r2/tool.cpp | 24 +++--- code/ryzom/client/src/r2/tool.h | 7 +- 69 files changed, 354 insertions(+), 329 deletions(-) diff --git a/code/nel/include/nel/gui/event_descriptor.h b/code/nel/include/nel/gui/event_descriptor.h index fc601806f..54b561e6a 100644 --- a/code/nel/include/nel/gui/event_descriptor.h +++ b/code/nel/include/nel/gui/event_descriptor.h @@ -21,6 +21,8 @@ #include "nel/misc/types_nl.h" +namespace NLGUI +{ // ---------------------------------------------------------------------------- class CEventDescriptor @@ -247,6 +249,8 @@ protected: bool _HasFocus; }; +} + #endif // RZ_EVENT_DESCRIPTOR_H /* End of event_descriptor.h */ diff --git a/code/nel/src/gui/event_descriptor.cpp b/code/nel/src/gui/event_descriptor.cpp index f91f078bf..851c0504b 100644 --- a/code/nel/src/gui/event_descriptor.cpp +++ b/code/nel/src/gui/event_descriptor.cpp @@ -19,6 +19,9 @@ #include "nel/misc/events.h" #include "nel/gui/event_descriptor.h" +namespace NLGUI +{ + void CEventDescriptorKey::init(const NLMISC::CEventKey &ev) { _CtrlState = (ev.Button & NLMISC::ctrlKeyButton) != 0; @@ -50,3 +53,5 @@ void CEventDescriptorKey::init(const NLMISC::CEventKey &ev) } } +} + diff --git a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp index 509dfcd62..b17021cde 100644 --- a/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp +++ b/code/ryzom/client/src/interface_v3/bot_chat_page_trade.cpp @@ -2249,7 +2249,7 @@ class CAHConfirmTrade : public IActionHandler case 1: enableResale = true; break; default: // 2: comes only from Enter of Shift+Enter key from an edit box or in the modal window { - const CEventDescriptorKey& keyEvent = CInterfaceManager::getInstance()->getLastEventKeyDesc(); + const NLGUI::CEventDescriptorKey& keyEvent = CInterfaceManager::getInstance()->getLastEventKeyDesc(); enableResale = ! keyEvent.getKeyShift(); } } diff --git a/code/ryzom/client/src/interface_v3/ctrl_base.cpp b/code/ryzom/client/src/interface_v3/ctrl_base.cpp index f3c7dbbec..353b5d9e1 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_base.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_base.cpp @@ -32,14 +32,14 @@ CCtrlBase::~CCtrlBase() } // *************************************************************************** -bool CCtrlBase::handleEvent(const CEventDescriptor &event) +bool CCtrlBase::handleEvent(const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - CEventDescriptorSystem &eds = (CEventDescriptorSystem&)event; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::activecalledonparent) + NLGUI::CEventDescriptorSystem &eds = (NLGUI::CEventDescriptorSystem&)event; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::activecalledonparent) { - if (!((CEventDescriptorActiveCalledOnParent &) eds).getActive()) + if (!((NLGUI::CEventDescriptorActiveCalledOnParent &) eds).getActive()) { // the mouse capture should be lost when the ctrl is hidden CInterfaceManager *manager = CInterfaceManager::getInstance(); diff --git a/code/ryzom/client/src/interface_v3/ctrl_base.h b/code/ryzom/client/src/interface_v3/ctrl_base.h index b88716c53..bc0caa7e4 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_base.h +++ b/code/ryzom/client/src/interface_v3/ctrl_base.h @@ -58,7 +58,7 @@ public: /// Handle all events (implemented by derived classes) (return true to signal event handled) - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); virtual CCtrlBase *getSubCtrl (sint32 /* x */, sint32 /* y */) { return this; } diff --git a/code/ryzom/client/src/interface_v3/ctrl_base_button.cpp b/code/ryzom/client/src/interface_v3/ctrl_base_button.cpp index 12db635bf..045e9cf5c 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_base_button.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_base_button.cpp @@ -199,18 +199,18 @@ void CCtrlBaseButton::setModulateGlobalColorAll(bool state) // *************************************************************************** -bool CCtrlBaseButton::handleEvent (const CEventDescriptor& event) +bool CCtrlBaseButton::handleEvent (const NLGUI::CEventDescriptor& event) { if (CCtrlBase::handleEvent(event)) return true; if (!_Active || _Frozen) return false; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { CInterfaceManager *pIM = CInterfaceManager::getInstance(); - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { if (pIM->getCapturePointerLeft() != this) return false; @@ -223,7 +223,7 @@ bool CCtrlBaseButton::handleEvent (const CEventDescriptor& event) (eventDesc.getY() <= (_YReal+ _HReal)))) return false; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { if (_AHOnLeftDblClick) { @@ -246,7 +246,7 @@ bool CCtrlBaseButton::handleEvent (const CEventDescriptor& event) return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { if (pIM->getCapturePointerLeft() != this) return false; @@ -299,12 +299,12 @@ bool CCtrlBaseButton::handleEvent (const CEventDescriptor& event) // Always return true on LeftClick. return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown) { _LastLeftClickButton = NULL; return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { _LastLeftClickButton = NULL; bool handled= false; @@ -331,10 +331,10 @@ bool CCtrlBaseButton::handleEvent (const CEventDescriptor& event) } - else if (event.getType() == CEventDescriptor::system) + else if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &systemEvent = (const CEventDescriptorSystem &) event; - if (systemEvent.getEventTypeExtended() == CEventDescriptorSystem::clocktick) + const NLGUI::CEventDescriptorSystem &systemEvent = (const NLGUI::CEventDescriptorSystem &) event; + if (systemEvent.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::clocktick) { if (_AHOnClockTick != NULL) { diff --git a/code/ryzom/client/src/interface_v3/ctrl_base_button.h b/code/ryzom/client/src/interface_v3/ctrl_base_button.h index c33f0c63e..eb7438e8b 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_base_button.h +++ b/code/ryzom/client/src/interface_v3/ctrl_base_button.h @@ -40,7 +40,7 @@ public: CCtrlBaseButton(const TCtorParam ¶m); virtual bool parse (xmlNodePtr cur,CInterfaceGroup * parentGroup); - virtual bool handleEvent (const CEventDescriptor& event); + virtual bool handleEvent (const NLGUI::CEventDescriptor& event); /// \name Misc // @{ diff --git a/code/ryzom/client/src/interface_v3/ctrl_button.h b/code/ryzom/client/src/interface_v3/ctrl_button.h index ff769e6c4..3b035b01c 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_button.h +++ b/code/ryzom/client/src/interface_v3/ctrl_button.h @@ -22,8 +22,10 @@ #include "ctrl_base_button.h" #include "view_renderer.h" - -class CEventDescriptor; +namespace NLGUI +{ + class CEventDescriptor; +} class CInterfaceManager; /** diff --git a/code/ryzom/client/src/interface_v3/ctrl_col_pick.cpp b/code/ryzom/client/src/interface_v3/ctrl_col_pick.cpp index ece811773..70a1856e8 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_col_pick.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_col_pick.cpp @@ -108,14 +108,14 @@ void CCtrlColPick::draw() } // ------------------------------------------------------------------------------------------------ -bool CCtrlColPick::handleEvent (const CEventDescriptor &event) +bool CCtrlColPick::handleEvent (const NLGUI::CEventDescriptor &event) { if (CCtrlBase::handleEvent(event)) return true; if (!_Active) return false; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if ((CInterfaceManager::getInstance()->getCapturePointerLeft() != this) && (!((eventDesc.getX() >= _XReal) && (eventDesc.getX() < (_XReal + _WReal))&& @@ -123,18 +123,18 @@ bool CCtrlColPick::handleEvent (const CEventDescriptor &event) (eventDesc.getY() <= (_YReal+ _HReal))))) return false; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { _MouseDown = true; selectColor(eventDesc.getX()-_XReal, eventDesc.getY()-_YReal); return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { _MouseDown = false; return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove) { if (_MouseDown) { diff --git a/code/ryzom/client/src/interface_v3/ctrl_col_pick.h b/code/ryzom/client/src/interface_v3/ctrl_col_pick.h index ebfc0fd3f..741341b5f 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_col_pick.h +++ b/code/ryzom/client/src/interface_v3/ctrl_col_pick.h @@ -40,7 +40,7 @@ public: virtual void updateCoords(); virtual void draw(); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); sint32 getColorR () const { return _ColorSelect.R; } sint32 getColorG () const { return _ColorSelect.G; } diff --git a/code/ryzom/client/src/interface_v3/ctrl_polygon.cpp b/code/ryzom/client/src/interface_v3/ctrl_polygon.cpp index 078059960..9bcc2411f 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_polygon.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_polygon.cpp @@ -278,7 +278,7 @@ void CCtrlPolygon::setAlpha(sint32 a) } // ********************************************************************************* -bool CCtrlPolygon::handleEvent(const CEventDescriptor &/* event */) +bool CCtrlPolygon::handleEvent(const NLGUI::CEventDescriptor &/* event */) { H_AUTO(Rz_CCtrlPolygon_handleEvent) return false; diff --git a/code/ryzom/client/src/interface_v3/ctrl_polygon.h b/code/ryzom/client/src/interface_v3/ctrl_polygon.h index 20b09ee0f..356f37e55 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_polygon.h +++ b/code/ryzom/client/src/interface_v3/ctrl_polygon.h @@ -64,7 +64,7 @@ public: //const NLMISC::CMatrix &getMatrix() const { return _Matrix; } // test if last call to 'setVertices' was for a valid poly (e.g one that doesn't overlapp itself) bool isValid() const { return _Valid; } - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); // no capturable by default (just tooltip capability wanted) virtual bool isCapturable() const { return false; } diff --git a/code/ryzom/client/src/interface_v3/ctrl_quad.cpp b/code/ryzom/client/src/interface_v3/ctrl_quad.cpp index 23b6069ad..e517342bf 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_quad.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_quad.cpp @@ -410,7 +410,7 @@ void CCtrlQuad::setCustomUVs(const CUV uvs[4]) } // ********************************************************************************* -bool CCtrlQuad::handleEvent(const CEventDescriptor &/* event */) +bool CCtrlQuad::handleEvent(const NLGUI::CEventDescriptor &/* event */) { H_AUTO(Rz_CCtrlQuad_handleEvent) return false; diff --git a/code/ryzom/client/src/interface_v3/ctrl_quad.h b/code/ryzom/client/src/interface_v3/ctrl_quad.h index 0422f99af..c2ce759cb 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_quad.h +++ b/code/ryzom/client/src/interface_v3/ctrl_quad.h @@ -85,7 +85,7 @@ public: // from CCtrlBase, no op by default - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); // see if this control contains the given point (in parent coords) bool contains(const NLMISC::CVector2f &pos) const; diff --git a/code/ryzom/client/src/interface_v3/ctrl_scroll.cpp b/code/ryzom/client/src/interface_v3/ctrl_scroll.cpp index a95cda085..252ff3236 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_scroll.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_scroll.cpp @@ -457,14 +457,14 @@ void CCtrlScroll::draw() } // ------------------------------------------------------------------------------------------------ -bool CCtrlScroll::handleEvent (const CEventDescriptor &event) +bool CCtrlScroll::handleEvent (const NLGUI::CEventDescriptor &event) { if (CCtrlBase::handleEvent(event)) return true; if (!_Active || _Frozen) return false; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if ((CInterfaceManager::getInstance()->getCapturePointerLeft() != this) && (!((eventDesc.getX() >= _XReal) && (eventDesc.getX() < (_XReal + _WReal))&& @@ -472,7 +472,7 @@ bool CCtrlScroll::handleEvent (const CEventDescriptor &event) (eventDesc.getY() <= (_YReal+ _HReal))))) return false; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { _MouseDown = true; _InitialValue = getValue(); @@ -490,20 +490,20 @@ bool CCtrlScroll::handleEvent (const CEventDescriptor &event) } return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { _MouseDown = false; runAH(_AHOnScrollEnd, _AHOnScrollEndParams.empty() ? _AHOnScrollParams : _AHOnScrollEndParams); // backward compatibility return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown && _MouseDown && _Cancelable) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown && _MouseDown && _Cancelable) { _MouseDown = false; setValue(_InitialValue); runAH(_AHOnScrollCancel, _AHOnScrollCancelParams); // backward compatibility return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove) { if (_MouseDown) { @@ -514,7 +514,7 @@ bool CCtrlScroll::handleEvent (const CEventDescriptor &event) } return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel && _Vertical) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel && _Vertical) { moveTrackY (eventDesc.getWheel() * 12); return true; diff --git a/code/ryzom/client/src/interface_v3/ctrl_scroll.h b/code/ryzom/client/src/interface_v3/ctrl_scroll.h index f86d0047d..f7aa19b72 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_scroll.h +++ b/code/ryzom/client/src/interface_v3/ctrl_scroll.h @@ -41,7 +41,7 @@ public: virtual void updateCoords(); virtual void draw(); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); void setTarget (CInterfaceGroup *pIG); diff --git a/code/ryzom/client/src/interface_v3/ctrl_text_button.h b/code/ryzom/client/src/interface_v3/ctrl_text_button.h index 183ab3ab8..6383f3374 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_text_button.h +++ b/code/ryzom/client/src/interface_v3/ctrl_text_button.h @@ -23,7 +23,10 @@ #include "view_renderer.h" -class CEventDescriptor; +namespace NLGUI +{ + class CEventDescriptor; +} class CInterfaceManager; class CViewText; diff --git a/code/ryzom/client/src/interface_v3/ctrl_tooltip.cpp b/code/ryzom/client/src/interface_v3/ctrl_tooltip.cpp index 5e276d886..3d50931a5 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_tooltip.cpp +++ b/code/ryzom/client/src/interface_v3/ctrl_tooltip.cpp @@ -38,7 +38,7 @@ void CCtrlToolTip::draw () } // ---------------------------------------------------------------------------- -bool CCtrlToolTip::handleEvent (const CEventDescriptor& event) +bool CCtrlToolTip::handleEvent (const NLGUI::CEventDescriptor& event) { if (CCtrlBase::handleEvent(event)) return true; return false; diff --git a/code/ryzom/client/src/interface_v3/ctrl_tooltip.h b/code/ryzom/client/src/interface_v3/ctrl_tooltip.h index 8be53ca8c..ddd0b42c1 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_tooltip.h +++ b/code/ryzom/client/src/interface_v3/ctrl_tooltip.h @@ -22,7 +22,10 @@ #include "ctrl_base.h" #include "nel/3d/u_texture.h" -class CEventDescriptor; +namespace NLGUI +{ + class CEventDescriptor; +} class CInterfaceManager; /** @@ -37,7 +40,7 @@ public: /// Constructor CCtrlToolTip(const TCtorParam ¶m) : CCtrlBase(param) {} - virtual bool handleEvent (const CEventDescriptor& eventDesc); + 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 :) ) diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp index 9c3b59c3f..46efd5514 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.cpp @@ -2590,18 +2590,18 @@ sint32 CDBCtrlSheet::drawNumber(sint32 x, sint32 y, sint32 wSheet, sint32 /* hSh } // ---------------------------------------------------------------------------- -bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event) +bool CDBCtrlSheet::handleEvent (const NLGUI::CEventDescriptor &event) { if (CCtrlBase::handleEvent(event)) return true; CInterfaceManager *pIM = CInterfaceManager::getInstance(); - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; // Handle drag'n'drop if (pIM->getCapturePointerLeft() == this) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown && !_Draging) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown && !_Draging) { _DragX = eventDesc.getX(); _DragY = eventDesc.getY(); @@ -2655,7 +2655,7 @@ bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event) if (_Draging) { // If mouse left up, must end the Drag - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { bool handled = false; // get the ctrl under the drop @@ -2843,7 +2843,7 @@ bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event) (eventDesc.getY() <= (_YReal+ _HReal)))) return false; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { CInterfaceManager *pIM = CInterfaceManager::getInstance(); if (pIM->getCapturePointerLeft() != this) @@ -2865,12 +2865,12 @@ bool CDBCtrlSheet::handleEvent (const CEventDescriptor &event) return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown) { return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { bool handled= false; CInterfaceManager *pIM = CInterfaceManager::getInstance(); diff --git a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h index 95bd7278c..f904e34a8 100644 --- a/code/ryzom/client/src/interface_v3/dbctrl_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbctrl_sheet.h @@ -189,7 +189,7 @@ public: virtual void draw(); void drawSheet (sint32 scrX, sint32 scrY, bool draging, bool showSelectionBorder = true); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); void setActionOnLeftClick (const std::string &ActionHandlerName) { _AHOnLeftClick = getAH(ActionHandlerName, _AHLeftClickParams); } void setActionOnRightClick (const std::string &ActionHandlerName) { _AHOnRightClick = getAH(ActionHandlerName, _AHRightClickParams); } diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp index 93d525558..b8461c9c3 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp @@ -749,14 +749,14 @@ void CDBGroupListSheet::clearViews () } // *************************************************************************** -bool CDBGroupListSheet::handleEvent (const CEventDescriptor &event) +bool CDBGroupListSheet::handleEvent (const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if (isIn(eventDesc.getX(), eventDesc.getY())) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { if (_ScrollBar != NULL) { @@ -765,7 +765,7 @@ bool CDBGroupListSheet::handleEvent (const CEventDescriptor &event) return true; } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { CGroupContainer *pGC = getContainer(); if (pGC != NULL) pGC->setHighLighted(false); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h index a1005f3b6..2af0ef02a 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.h @@ -49,7 +49,7 @@ public: virtual void checkCoords (); virtual void draw (); virtual void clearViews (); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); // mod interface void changeNbRow(sint delta); diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp index 557ede4e3..2ec39cd85 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp @@ -664,12 +664,12 @@ void CDBGroupListSheetText::clearViews () } // *************************************************************************** -bool CDBGroupListSheetText::handleEvent (const CEventDescriptor &event) +bool CDBGroupListSheetText::handleEvent (const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { _Scrolling = 0; - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if (isIn(eventDesc.getX(), eventDesc.getY())) { // Drag'n'drop from a ctrl sheet that belongs to this list @@ -687,9 +687,9 @@ bool CDBGroupListSheetText::handleEvent (const CEventDescriptor &event) { pDraggedSheet = _SheetChildren[pos]->Ctrl; pIM->setCapturePointerLeft(pDraggedSheet); - CEventDescriptorMouse newEv = eventDesc; + NLGUI::CEventDescriptorMouse newEv = eventDesc; // Send this because not send (the captured button has processed the event mouseleftdown) - newEv.setEventTypeExtended(CEventDescriptorMouse::mouseleftdown); + newEv.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mouseleftdown); pDraggedSheet->handleEvent(newEv); } } @@ -711,7 +711,7 @@ bool CDBGroupListSheetText::handleEvent (const CEventDescriptor &event) if(swapable()) { if (pDraggedSheet != NULL) - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { sint posdst = -1,possrc = -1; const vector &rV = pIM->getCtrlsUnderPointer(); @@ -733,7 +733,7 @@ bool CDBGroupListSheetText::handleEvent (const CEventDescriptor &event) } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { // If scroll ok, and if scroll possible if (_ScrollBar != NULL && _List != NULL && _List->getH()>_List->getMaxH()) @@ -752,10 +752,10 @@ bool CDBGroupListSheetText::handleEvent (const CEventDescriptor &event) } } } - else if (event.getType() == CEventDescriptor::system) + else if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &systemEvent = (const CEventDescriptorSystem &) event; - if (systemEvent.getEventTypeExtended() == CEventDescriptorSystem::clocktick) + const NLGUI::CEventDescriptorSystem &systemEvent = (const NLGUI::CEventDescriptorSystem &) event; + if (systemEvent.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::clocktick) { if (_Scrolling != 0) if (_ScrollBar != NULL && _List != NULL) diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.h b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.h index 38d538df3..bf6d6be67 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.h @@ -57,7 +57,7 @@ public: virtual void checkCoords (); virtual void draw (); virtual void clearViews (); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); /// \name IListSheetBase implementation // @{ diff --git a/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp b/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp index 8ef0c3217..adce780f7 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp @@ -149,14 +149,14 @@ void CDBGroupSelectNumber::clearViews () } // *************************************************************************** -bool CDBGroupSelectNumber::handleEvent (const CEventDescriptor &event) +bool CDBGroupSelectNumber::handleEvent (const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if (isIn(eventDesc.getX(), eventDesc.getY())) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { changeValue (eventDesc.getWheel()); return true; diff --git a/code/ryzom/client/src/interface_v3/dbgroup_select_number.h b/code/ryzom/client/src/interface_v3/dbgroup_select_number.h index 39d3d3a54..0375e920d 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_select_number.h +++ b/code/ryzom/client/src/interface_v3/dbgroup_select_number.h @@ -51,7 +51,7 @@ public: virtual void checkCoords(); virtual void draw (); virtual void clearViews (); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); // mod interface void changeValue(sint delta); diff --git a/code/ryzom/client/src/interface_v3/group_compas.cpp b/code/ryzom/client/src/interface_v3/group_compas.cpp index fa9d62d5a..10a8ac230 100644 --- a/code/ryzom/client/src/interface_v3/group_compas.cpp +++ b/code/ryzom/client/src/interface_v3/group_compas.cpp @@ -399,15 +399,15 @@ void CGroupCompas::draw() // *************************************************************************** -bool CGroupCompas::handleEvent (const CEventDescriptor &event) +bool CGroupCompas::handleEvent (const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; // if ((_RadarView != NULL) && (_RadarRangeView != NULL)) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { CInterfaceManager *pIM = CInterfaceManager::getInstance(); _RadarPos = pIM->getDbProp("UI:SAVE:RADARZOOM")->getValue32(); diff --git a/code/ryzom/client/src/interface_v3/group_compas.h b/code/ryzom/client/src/interface_v3/group_compas.h index 112b6ae68..9277c2e76 100644 --- a/code/ryzom/client/src/interface_v3/group_compas.h +++ b/code/ryzom/client/src/interface_v3/group_compas.h @@ -86,7 +86,7 @@ public: virtual bool parse (xmlNodePtr cur, CInterfaceGroup *parentGroup); virtual void updateCoords(); virtual void draw(); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); void setTarget(const CCompassTarget &target); const CCompassTarget &getTarget() const { return _Target; } diff --git a/code/ryzom/client/src/interface_v3/group_container.cpp b/code/ryzom/client/src/interface_v3/group_container.cpp index e494af8f2..3d76b1c80 100644 --- a/code/ryzom/client/src/interface_v3/group_container.cpp +++ b/code/ryzom/client/src/interface_v3/group_container.cpp @@ -151,18 +151,18 @@ void CCtrlResizer::draw () } // *************************************************************************** -bool CCtrlResizer::handleEvent (const CEventDescriptor &event) +bool CCtrlResizer::handleEvent (const NLGUI::CEventDescriptor &event) { if (CCtrlBase::handleEvent(event)) return true; if (!_Active || !_Parent) return false; - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &eds = (const CEventDescriptorSystem &) event; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::setfocus) + const NLGUI::CEventDescriptorSystem &eds = (const NLGUI::CEventDescriptorSystem &) event; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::setfocus) { - const CEventDescriptorSetFocus &edsf = (const CEventDescriptorSetFocus &) eds; + const NLGUI::CEventDescriptorSetFocus &edsf = (const NLGUI::CEventDescriptorSetFocus &) eds; if (edsf.hasFocus() == false && _MouseDown) { _MouseDown = false; @@ -172,15 +172,15 @@ bool CCtrlResizer::handleEvent (const CEventDescriptor &event) } } - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if ((CInterfaceManager::getInstance()->getCapturePointerLeft() != this) && !isIn(eventDesc.getX(), eventDesc.getY())) return false; CGroupContainer *gc = dynamic_cast(_Parent); - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { // must check that parent isn't closed if (gc) @@ -200,13 +200,13 @@ bool CCtrlResizer::handleEvent (const CEventDescriptor &event) return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { _MouseDown = false; _Parent->invalidateCoords(); return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove) { if (_MouseDown) { @@ -560,7 +560,7 @@ void CCtrlMover::draw () } // *************************************************************************** -bool CCtrlMover::handleEvent (const CEventDescriptor &event) +bool CCtrlMover::handleEvent (const NLGUI::CEventDescriptor &event) { if (CCtrlBase::handleEvent(event)) return true; if (!_Active) @@ -568,12 +568,12 @@ bool CCtrlMover::handleEvent (const CEventDescriptor &event) CInterfaceManager *pIM= CInterfaceManager::getInstance(); - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &eds = (const CEventDescriptorSystem &) event; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::setfocus) + const NLGUI::CEventDescriptorSystem &eds = (const NLGUI::CEventDescriptorSystem &) event; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::setfocus) { - const CEventDescriptorSetFocus &edsf = (const CEventDescriptorSetFocus &) eds; + const NLGUI::CEventDescriptorSetFocus &edsf = (const NLGUI::CEventDescriptorSetFocus &) eds; if (edsf.hasFocus() == false && _Moving) { stopMove(pIM); @@ -582,9 +582,9 @@ bool CCtrlMover::handleEvent (const CEventDescriptor &event) } } - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; // the ctrl must have been captured if (pIM->getCapturePointerLeft() != this) return false; @@ -599,7 +599,7 @@ bool CCtrlMover::handleEvent (const CEventDescriptor &event) } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown && _WaitToOpenClose) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown && _WaitToOpenClose) { if (_WaitToOpenClose) { @@ -657,7 +657,7 @@ bool CCtrlMover::handleEvent (const CEventDescriptor &event) if (_CanOpen || gc->isOpenWhenPopup()) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { if (!_Parent) return false; gc->setHighLighted(false); @@ -704,7 +704,7 @@ bool CCtrlMover::handleEvent (const CEventDescriptor &event) if (_CanMove) { // Enter Moving? - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown ) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown ) { _MoveStartX= _Parent->getX()-eventDesc.getX(); _MoveStartY= _Parent->getY()-eventDesc.getY(); @@ -725,13 +725,13 @@ bool CCtrlMover::handleEvent (const CEventDescriptor &event) else { // Leave Moving? - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup ) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup ) { stopMove(pIM); return true; } // Move - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove ) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove ) { _HasMoved = true; if (gc) gc->touch(); @@ -911,10 +911,10 @@ bool CCtrlMover::handleEvent (const CEventDescriptor &event) } } } - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &systemEvent = (const CEventDescriptorSystem &) event; - if (systemEvent.getEventTypeExtended() == CEventDescriptorSystem::clocktick) + const NLGUI::CEventDescriptorSystem &systemEvent = (const NLGUI::CEventDescriptorSystem &) event; + if (systemEvent.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::clocktick) { if (_WaitToOpenClose) { @@ -1046,7 +1046,7 @@ bool CCtrlMover::runTitleActionHandler() } // *************************************************************************** -void CCtrlMover::setPoped(CGroupContainer *gc, sint32 x, sint32 y, CInterfaceManager *pIM, const CEventDescriptorMouse &eventDesc) +void CCtrlMover::setPoped(CGroupContainer *gc, sint32 x, sint32 y, CInterfaceManager *pIM, const NLGUI::CEventDescriptorMouse &eventDesc) { gc->setHighLighted(false); sint32 deltaX = x - _Parent->getX(); @@ -1088,7 +1088,7 @@ void CCtrlMover::setPoped(CGroupContainer *gc, sint32 x, sint32 y, CInterfaceMan } // *************************************************************************** -void CCtrlMover::setMovingInParent(CGroupContainer *gc, sint32 /* x */, sint32 y, CInterfaceManager *pIM, const CEventDescriptorMouse &eventDesc) +void CCtrlMover::setMovingInParent(CGroupContainer *gc, sint32 /* x */, sint32 y, CInterfaceManager *pIM, const NLGUI::CEventDescriptorMouse &eventDesc) { if (!gc) return; sint32 deltaY = y - gc->getY(); @@ -2267,7 +2267,7 @@ void CGroupContainer::clearViews() } // *************************************************************************** -bool CGroupContainer::handleEvent (const CEventDescriptor& event) +bool CGroupContainer::handleEvent (const NLGUI::CEventDescriptor& event) { if (!_Active) return false; @@ -2282,13 +2282,13 @@ bool CGroupContainer::handleEvent (const CEventDescriptor& event) if (!CInterfaceGroup::handleEvent(event)) { - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; // MouseWheel mgt if ((_LayerSetup == 0) && (isIn(eventDesc.getX(), eventDesc.getY()))) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { if (_ScrollBar != NULL) _ScrollBar->moveTrackY (eventDesc.getWheel()*12); @@ -3776,21 +3776,21 @@ void CGroupContainer::addModalSon (CGroupContainer *pSon) } // *************************************************************************** -bool CGroupContainer::checkIfModal(const CEventDescriptor& event) +bool CGroupContainer::checkIfModal(const NLGUI::CEventDescriptor& event) { bool bRet = true; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; - if ((eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) || - (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown)) + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; + if ((eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) || + (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown)) { bRet = blinkAllSons(); } // Additionaly, if it is a UP, don't blink, but return false if some son active if (bRet && ( - (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) || - (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup)) + (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) || + (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup)) ) { bRet= !isGrayed(); diff --git a/code/ryzom/client/src/interface_v3/group_container.h b/code/ryzom/client/src/interface_v3/group_container.h index 43ae9f1db..ae899f9b9 100644 --- a/code/ryzom/client/src/interface_v3/group_container.h +++ b/code/ryzom/client/src/interface_v3/group_container.h @@ -22,7 +22,10 @@ #include "interface_group.h" #include "nel/misc/smart_ptr.h" +namespace NLGUI +{ class CEventDescriptorLocalised; +} class CInterfaceList; class CCtrlButton; class CCtrlScroll; @@ -48,7 +51,7 @@ public: CCtrlResizer(const TCtorParam ¶m); virtual void draw (); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); // Add a big delta so when the user is over the Resizer, always take it whatever other controls under virtual uint getDeltaDepth() const { return 100; } @@ -99,7 +102,7 @@ public: CCtrlMover(const TCtorParam ¶m, bool canMove, bool canOpen); ~CCtrlMover(); virtual void draw (); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); bool canMove() { return _CanMove; } bool isMoving() const {return _Moving;} @@ -132,8 +135,8 @@ private: // static COptionsContainerInsertion *getInsertionOptions(); private: - void setPoped(CGroupContainer *gc, sint32 x, sint32 y, CInterfaceManager *pIM, const CEventDescriptorMouse &eventDesc); - void setMovingInParent(CGroupContainer *gc, sint32 x, sint32 y, CInterfaceManager *pIM, const CEventDescriptorMouse &eventDesc); + void setPoped(CGroupContainer *gc, sint32 x, sint32 y, CInterfaceManager *pIM, const NLGUI::CEventDescriptorMouse &eventDesc); + void setMovingInParent(CGroupContainer *gc, sint32 x, sint32 y, CInterfaceManager *pIM, const NLGUI::CEventDescriptorMouse &eventDesc); void updateInsertionIndex(const CGroupList *gl, sint32 posY); void stopMove(CInterfaceManager *pIM); bool runTitleActionHandler(); @@ -171,7 +174,7 @@ public: virtual void clearViews (); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); virtual void launch (); @@ -446,7 +449,7 @@ public: void setModalParentList (const std::string &name); - bool checkIfModal(const CEventDescriptor& event); // Return true if we can handle the event (and prevent from selecting a window) + bool checkIfModal(const NLGUI::CEventDescriptor& event); // Return true if we can handle the event (and prevent from selecting a window) bool isGrayed() const; bool blinkAllSons(); diff --git a/code/ryzom/client/src/interface_v3/group_editbox.cpp b/code/ryzom/client/src/interface_v3/group_editbox.cpp index 3f3e58a72..373eccb1c 100644 --- a/code/ryzom/client/src/interface_v3/group_editbox.cpp +++ b/code/ryzom/client/src/interface_v3/group_editbox.cpp @@ -551,7 +551,7 @@ void CGroupEditBox::writeString(const ucstring &str, bool replace, bool atEnd) } // ---------------------------------------------------------------------------- -void CGroupEditBox::handleEventChar(const CEventDescriptorKey &rEDK) +void CGroupEditBox::handleEventChar(const NLGUI::CEventDescriptorKey &rEDK) { stopParentBlink(); switch(rEDK.getChar()) @@ -711,7 +711,7 @@ void CGroupEditBox::handleEventChar(const CEventDescriptorKey &rEDK) } // ---------------------------------------------------------------------------- -void CGroupEditBox::handleEventString(const CEventDescriptorKey &rEDK) +void CGroupEditBox::handleEventString(const NLGUI::CEventDescriptorKey &rEDK) { appendStringFromClipboard(rEDK.getString()); } @@ -827,11 +827,11 @@ void CGroupEditBox::back() } // ---------------------------------------------------------------------------- -bool CGroupEditBox::handleEvent (const CEventDescriptor& event) +bool CGroupEditBox::handleEvent (const NLGUI::CEventDescriptor& event) { if (!_Active || !_ViewText) return false; - if (event.getType() == CEventDescriptor::key) + if (event.getType() == NLGUI::CEventDescriptor::key) { if (_BypassNextKey) { @@ -841,18 +841,18 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event) /////////////// // KEY EVENT // /////////////// - const CEventDescriptorKey &rEDK = (const CEventDescriptorKey&)event; + const NLGUI::CEventDescriptorKey &rEDK = (const NLGUI::CEventDescriptorKey&)event; switch(rEDK.getKeyEventType()) { - case CEventDescriptorKey::keychar: handleEventChar(rEDK); break; - case CEventDescriptorKey::keystring: handleEventString(rEDK); break; + case NLGUI::CEventDescriptorKey::keychar: handleEventChar(rEDK); break; + case NLGUI::CEventDescriptorKey::keystring: handleEventString(rEDK); break; default: break; } // update the text setInputString(_InputString); // if event of type char or string, consider handle all of them - if( rEDK.getKeyEventType()==CEventDescriptorKey::keychar || rEDK.getKeyEventType()==CEventDescriptorKey::keystring ) + if( rEDK.getKeyEventType()==NLGUI::CEventDescriptorKey::keychar || rEDK.getKeyEventType()==NLGUI::CEventDescriptorKey::keystring ) return true; // Else filter the EventKeyDown AND EventKeyUp. else @@ -866,16 +866,16 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event) } } else - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { ///////////////// // MOUSE EVENT // ///////////////// - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; CInterfaceManager *pIM = CInterfaceManager::getInstance(); - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { if (pIM->getCapturePointerRight() == this) { @@ -901,7 +901,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event) return false; // if click, and not frozen, then get the focus - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown && !_Frozen) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown && !_Frozen) { _SelectingText = true; stopParentBlink(); @@ -920,7 +920,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event) return true; } // if click, and not frozen, then get the focus - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove && !_Frozen && _SelectingText) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove && !_Frozen && _SelectingText) { // set the right cursor position uint newCurPos; @@ -934,7 +934,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event) } // if click, and not frozen, then get the focus - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup && !_Frozen) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup && !_Frozen) { _SelectingText = false; if (_SelectCursorPos == _CursorPos) @@ -943,7 +943,7 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event) return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown) { pIM->setCapturePointerRight(this); return true; @@ -954,10 +954,10 @@ bool CGroupEditBox::handleEvent (const CEventDescriptor& event) ////////////////// // SYSTEM EVENT // ////////////////// - const CEventDescriptorSystem &eventDesc = (const CEventDescriptorSystem &)event; - if (eventDesc.getEventTypeExtended() == CEventDescriptorSystem::activecalledonparent) + const NLGUI::CEventDescriptorSystem &eventDesc = (const NLGUI::CEventDescriptorSystem &)event; + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::activecalledonparent) { - CEventDescriptorActiveCalledOnParent &activeEvent = (CEventDescriptorActiveCalledOnParent &) eventDesc; + NLGUI::CEventDescriptorActiveCalledOnParent &activeEvent = (NLGUI::CEventDescriptorActiveCalledOnParent &) eventDesc; if (activeEvent.getActive() == false && _ResetFocusOnHide) { CInterfaceManager::getInstance()->resetCaptureKeyboard(); diff --git a/code/ryzom/client/src/interface_v3/group_editbox.h b/code/ryzom/client/src/interface_v3/group_editbox.h index f2856709a..e86e2bdcd 100644 --- a/code/ryzom/client/src/interface_v3/group_editbox.h +++ b/code/ryzom/client/src/interface_v3/group_editbox.h @@ -22,8 +22,10 @@ #include "interface_group.h" #include "nel/3d/u_texture.h" - -class CEventDescriptor; +namespace NLGUI +{ + class CEventDescriptor; +} class CViewText; // ---------------------------------------------------------------------------- class CGroupEditBox : public CInterfaceGroup @@ -41,7 +43,7 @@ public: virtual void draw(); - virtual bool handleEvent (const CEventDescriptor& eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); /// Accessors ucstring getInputString() const { return _InputString; } @@ -290,8 +292,8 @@ protected: private: void setupDisplayText(); void makeTopWindow(); - void handleEventChar(const CEventDescriptorKey &event); - void handleEventString(const CEventDescriptorKey &event); + void handleEventChar(const NLGUI::CEventDescriptorKey &event); + void handleEventString(const NLGUI::CEventDescriptorKey &event); void setup(); void triggerOnChangeAH(); void appendStringFromClipboard(const ucstring &str); diff --git a/code/ryzom/client/src/interface_v3/group_header.cpp b/code/ryzom/client/src/interface_v3/group_header.cpp index d7b2969a1..eb8121ac3 100644 --- a/code/ryzom/client/src/interface_v3/group_header.cpp +++ b/code/ryzom/client/src/interface_v3/group_header.cpp @@ -255,17 +255,17 @@ public: if (getParent()->getParent() == _Parent->getParentPos()) return NULL; // leftmost header return dynamic_cast(getParent()->getParentPos()); } - bool handleEvent (const CEventDescriptor &event) + bool handleEvent (const NLGUI::CEventDescriptor &event) { CInterfaceManager *im = CInterfaceManager::getInstance(); if (_Parent) { - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &eds = (const CEventDescriptorSystem &) event; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::setfocus) + const NLGUI::CEventDescriptorSystem &eds = (const NLGUI::CEventDescriptorSystem &) event; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::setfocus) { - const CEventDescriptorSetFocus &edsf = (const CEventDescriptorSetFocus &) eds; + const NLGUI::CEventDescriptorSetFocus &edsf = (const NLGUI::CEventDescriptorSetFocus &) eds; if (edsf.hasFocus() == false) { release(); @@ -273,10 +273,10 @@ public: } } } - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { if (!this->isIn(eventDesc.getX(), eventDesc.getY())) return false; _TargetGroup = getTargetGroup(); @@ -286,11 +286,11 @@ public: _OffsetX = _TargetGroup->getW() - eventDesc.getX(); return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { release(); } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove) { if (_Moving && im->getCapturePointerLeft() == this) { diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index e17426a79..c8a54f602 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -2106,14 +2106,14 @@ bool CGroupHTML::parse(xmlNodePtr cur,CInterfaceGroup *parentGroup) // *************************************************************************** -bool CGroupHTML::handleEvent (const CEventDescriptor& eventDesc) +bool CGroupHTML::handleEvent (const NLGUI::CEventDescriptor& eventDesc) { bool traited = CGroupScrollText::handleEvent (eventDesc); - if (eventDesc.getType() == CEventDescriptor::system) + if (eventDesc.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &systemEvent = (const CEventDescriptorSystem &) eventDesc; - if (systemEvent.getEventTypeExtended() == CEventDescriptorSystem::clocktick) + const NLGUI::CEventDescriptorSystem &systemEvent = (const NLGUI::CEventDescriptorSystem &) eventDesc; + if (systemEvent.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::clocktick) { // Handle now handle (); diff --git a/code/ryzom/client/src/interface_v3/group_html.h b/code/ryzom/client/src/interface_v3/group_html.h index 098fbb4ff..f8e3e09f9 100644 --- a/code/ryzom/client/src/interface_v3/group_html.h +++ b/code/ryzom/client/src/interface_v3/group_html.h @@ -73,7 +73,7 @@ public: virtual void draw (); // Events - virtual bool handleEvent (const CEventDescriptor& eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); // Browse virtual void browse (const char *url); diff --git a/code/ryzom/client/src/interface_v3/group_list.cpp b/code/ryzom/client/src/interface_v3/group_list.cpp index 7a68be9d5..d157543a7 100644 --- a/code/ryzom/client/src/interface_v3/group_list.cpp +++ b/code/ryzom/client/src/interface_v3/group_list.cpp @@ -663,16 +663,16 @@ void CGroupList::draw () } // ---------------------------------------------------------------------------- -bool CGroupList::handleEvent (const CEventDescriptor& event) +bool CGroupList::handleEvent (const NLGUI::CEventDescriptor& event) { if (!_Active) return false; bool bReturn = CInterfaceGroup::handleEvent(event); - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; _OverElt = -1; if (!isIn(eventDesc.getX(), eventDesc.getY())) diff --git a/code/ryzom/client/src/interface_v3/group_list.h b/code/ryzom/client/src/interface_v3/group_list.h index 9f17caf53..1053a2241 100644 --- a/code/ryzom/client/src/interface_v3/group_list.h +++ b/code/ryzom/client/src/interface_v3/group_list.h @@ -121,7 +121,7 @@ public: virtual void draw(); - virtual bool handleEvent (const CEventDescriptor& eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); virtual void clearViews(); virtual void clearControls(); diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index e1d7b4ecd..a47541b21 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -171,15 +171,15 @@ CGroupMap::CPolyButton::CPolyButton() //============================================================================================================ -bool CGroupMap::CPolyButton::handleEvent (const CEventDescriptor &event) +bool CGroupMap::CPolyButton::handleEvent (const NLGUI::CEventDescriptor &event) { if (CCtrlBase::handleEvent(event)) return true; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { CInterfaceManager *im = CInterfaceManager::getInstance(); - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { if (im->getCapturePointerLeft() != this) return false; @@ -205,7 +205,7 @@ bool CGroupMap::CPolyButton::handleEvent (const CEventDescriptor &event) } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { if (contains(CVector2f((float)eventDesc.getX(), (float)eventDesc.getY()))) { @@ -1703,7 +1703,7 @@ void CGroupMap::draw() } //============================================================================================================ -bool CGroupMap::handleEvent(const CEventDescriptor &event) +bool CGroupMap::handleEvent(const NLGUI::CEventDescriptor &event) { CInterfaceManager *im = CInterfaceManager::getInstance(); // if R2 editor editor is on, give it a chance to handle the event first @@ -1712,11 +1712,11 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) bool handled = false; bool panEnd = false; // handle standard clicks - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; - panEnd = eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup && _Panning && _HasMoved; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup && !panEnd) + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; + panEnd = eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup && _Panning && _HasMoved; + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup && !panEnd) { //if (im->getCapturePointerLeft() == this) // NB : don't test capture of mouse here, because @@ -1745,7 +1745,7 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) } } } - else if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + else if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { if (im->getCapturePointerRight() == this) { @@ -1784,13 +1784,13 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) // left button can be used to 'pan' the map // mouse wheel can be used to zoom in/out - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { if (!_Active) return false; - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { if (im->getCapturePointerLeft() != this) { @@ -1801,13 +1801,13 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown) { im->setCapturePointerRight(this); return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { if (isIn(eventDesc.getX(), eventDesc.getY())) { @@ -1843,7 +1843,7 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove) { if (im->getCapturePointerLeft() != this || !_Panning) return CInterfaceGroup::handleEvent(event); @@ -1873,7 +1873,7 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel && !_Panning) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel && !_Panning) { sint32 wheel = eventDesc.getWheel(); float newScale = _UserScale; @@ -1907,7 +1907,7 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { // convert click pos into map pos if (_MapTexW == 0 || _MapTexH == 0) @@ -1931,10 +1931,10 @@ bool CGroupMap::handleEvent(const CEventDescriptor &event) } } } - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - CEventDescriptorSystem &es = (CEventDescriptorSystem &) event; - if (es.getEventTypeExtended() == CEventDescriptorSystem::activecalledonparent) + NLGUI::CEventDescriptorSystem &es = (NLGUI::CEventDescriptorSystem &) event; + if (es.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::activecalledonparent) { bool visible = getActive(); if (visible) diff --git a/code/ryzom/client/src/interface_v3/group_map.h b/code/ryzom/client/src/interface_v3/group_map.h index b192b0c2f..30a8b9ded 100644 --- a/code/ryzom/client/src/interface_v3/group_map.h +++ b/code/ryzom/client/src/interface_v3/group_map.h @@ -119,7 +119,7 @@ public: virtual void updateCoords(); virtual void checkCoords(); virtual void draw (); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); virtual bool getCtrlsUnder (sint32 x, sint32 y, sint32 clipX, sint32 clipY, sint32 clipW, sint32 clipH, std::vector &vICL); @@ -234,7 +234,7 @@ private: { public: CPolyButton(); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); virtual void updateCoords(); virtual void draw () {} void drawPolyButton(); @@ -258,7 +258,7 @@ private: CContLandMark::TContLMType Type; bool HandleEvents; public: - virtual bool handleEvent (const CEventDescriptor& event) + virtual bool handleEvent (const NLGUI::CEventDescriptor& event) { if (!HandleEvents) return false; return CCtrlButton::handleEvent(event); diff --git a/code/ryzom/client/src/interface_v3/group_menu.cpp b/code/ryzom/client/src/interface_v3/group_menu.cpp index 8a1051e52..137dcec10 100644 --- a/code/ryzom/client/src/interface_v3/group_menu.cpp +++ b/code/ryzom/client/src/interface_v3/group_menu.cpp @@ -933,7 +933,7 @@ void CGroupSubMenu::draw() } // ------------------------------------------------------------------------------------------------ -bool CGroupSubMenu::handleEvent (const CEventDescriptor &event) +bool CGroupSubMenu::handleEvent (const NLGUI::CEventDescriptor &event) { if (!_Active) return false; @@ -942,9 +942,9 @@ bool CGroupSubMenu::handleEvent (const CEventDescriptor &event) if(_GroupList) textDYPos= -(1+_GroupList->getSpace())/2; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; _Selected = -1; // TODO First check sub menus that can be not in the area of this menu @@ -976,7 +976,7 @@ bool CGroupSubMenu::handleEvent (const CEventDescriptor &event) } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { // If a line is selected and the line is not grayed if ((_Selected != -1) && (!_Lines[i].ViewText->getGrayed())) @@ -1004,13 +1004,13 @@ bool CGroupSubMenu::handleEvent (const CEventDescriptor &event) } } - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; // if (_GroupList && _ScrollBar) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { if (isIn(eventDesc.getX(), eventDesc.getY())) { @@ -2082,7 +2082,7 @@ void CGroupMenu::draw () } // ------------------------------------------------------------------------------------------------ -bool CGroupMenu::handleEvent (const CEventDescriptor &event) +bool CGroupMenu::handleEvent (const NLGUI::CEventDescriptor &event) { if (!_Active) return false; diff --git a/code/ryzom/client/src/interface_v3/group_menu.h b/code/ryzom/client/src/interface_v3/group_menu.h index ff0985ec1..d0ec9f82c 100644 --- a/code/ryzom/client/src/interface_v3/group_menu.h +++ b/code/ryzom/client/src/interface_v3/group_menu.h @@ -107,7 +107,7 @@ public: virtual void draw (); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); virtual CInterfaceElement* getElement (const std::string &id); @@ -300,7 +300,7 @@ public: void recurseDraw(CGroupSubMenu *pSubMenu); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); virtual CInterfaceElement* getElement (const std::string &id); diff --git a/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp b/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp index 619a4c1e9..adf817b8d 100644 --- a/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp +++ b/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp @@ -68,12 +68,12 @@ void CGroupModalGetKey::setActive (bool state) } // *************************************************************************** -bool CGroupModalGetKey::handleEvent (const CEventDescriptor &event) +bool CGroupModalGetKey::handleEvent (const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::key) + if (event.getType() == NLGUI::CEventDescriptor::key) { - CEventDescriptorKey &edk = (CEventDescriptorKey &)event; - if (edk.getKeyEventType() == CEventDescriptorKey::keydown) + NLGUI::CEventDescriptorKey &edk = (NLGUI::CEventDescriptorKey &)event; + if (edk.getKeyEventType() == NLGUI::CEventDescriptorKey::keydown) { // if ((edk.getKey() != KeyCONTROL) && (edk.getKey() != KeyMENU) && (edk.getKey() != KeySHIFT)) // { diff --git a/code/ryzom/client/src/interface_v3/group_modal_get_key.h b/code/ryzom/client/src/interface_v3/group_modal_get_key.h index ee9cac9e8..54a594e7e 100644 --- a/code/ryzom/client/src/interface_v3/group_modal_get_key.h +++ b/code/ryzom/client/src/interface_v3/group_modal_get_key.h @@ -38,7 +38,7 @@ public: /// Constructor CGroupModalGetKey(const TCtorParam ¶m); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); virtual void setActive(bool state); diff --git a/code/ryzom/client/src/interface_v3/group_paragraph.cpp b/code/ryzom/client/src/interface_v3/group_paragraph.cpp index 42def29d6..5cc17105e 100644 --- a/code/ryzom/client/src/interface_v3/group_paragraph.cpp +++ b/code/ryzom/client/src/interface_v3/group_paragraph.cpp @@ -841,16 +841,16 @@ void CGroupParagraph::draw () } // ---------------------------------------------------------------------------- -bool CGroupParagraph::handleEvent (const CEventDescriptor& event) +bool CGroupParagraph::handleEvent (const NLGUI::CEventDescriptor& event) { if (!_Active) return false; bool bReturn = CInterfaceGroup::handleEvent(event); - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; _OverElt = -1; if (!isIn(eventDesc.getX(), eventDesc.getY())) diff --git a/code/ryzom/client/src/interface_v3/group_paragraph.h b/code/ryzom/client/src/interface_v3/group_paragraph.h index be82c28a6..ab37a1814 100644 --- a/code/ryzom/client/src/interface_v3/group_paragraph.h +++ b/code/ryzom/client/src/interface_v3/group_paragraph.h @@ -139,7 +139,7 @@ public: virtual void draw(); - virtual bool handleEvent (const CEventDescriptor& eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); virtual void clearViews(); virtual void clearControls(); diff --git a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp index 950ab9771..f9ddd85fd 100644 --- a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp +++ b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp @@ -121,15 +121,15 @@ void CGroupScrollText::clearViews() } //======================================================================== -bool CGroupScrollText::handleEvent(const CEventDescriptor &event) +bool CGroupScrollText::handleEvent(const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; // if (_List && _ScrollBar) { - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { if (isIn(eventDesc.getX(), eventDesc.getY())) { diff --git a/code/ryzom/client/src/interface_v3/group_scrolltext.h b/code/ryzom/client/src/interface_v3/group_scrolltext.h index c9e52d22a..c9baa1889 100644 --- a/code/ryzom/client/src/interface_v3/group_scrolltext.h +++ b/code/ryzom/client/src/interface_v3/group_scrolltext.h @@ -47,7 +47,7 @@ public: virtual void checkCoords (); virtual void draw (); virtual void clearViews (); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); // get the list associated to this group CGroupList *getList() const { return _List; } diff --git a/code/ryzom/client/src/interface_v3/group_tab.cpp b/code/ryzom/client/src/interface_v3/group_tab.cpp index d42855464..00cb26a83 100644 --- a/code/ryzom/client/src/interface_v3/group_tab.cpp +++ b/code/ryzom/client/src/interface_v3/group_tab.cpp @@ -788,12 +788,12 @@ void CCtrlTabButton::setActive(bool state) } // *************************************************************************** -bool CCtrlTabButton::handleEvent (const CEventDescriptor &event) +bool CCtrlTabButton::handleEvent (const NLGUI::CEventDescriptor &event) { - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &systemEvent = (const CEventDescriptorSystem &) event; - if (systemEvent.getEventTypeExtended() == CEventDescriptorSystem::clocktick) + const NLGUI::CEventDescriptorSystem &systemEvent = (const NLGUI::CEventDescriptorSystem &) event; + if (systemEvent.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::clocktick) if (_Blinking) { CInterfaceManager *pIM = CInterfaceManager::getInstance(); diff --git a/code/ryzom/client/src/interface_v3/group_tab.h b/code/ryzom/client/src/interface_v3/group_tab.h index f7c99abe2..42914506e 100644 --- a/code/ryzom/client/src/interface_v3/group_tab.h +++ b/code/ryzom/client/src/interface_v3/group_tab.h @@ -155,7 +155,7 @@ public: virtual void setActive(bool state); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); void setBlink (bool b); diff --git a/code/ryzom/client/src/interface_v3/group_tree.cpp b/code/ryzom/client/src/interface_v3/group_tree.cpp index 9eb02ad10..7c0be8016 100644 --- a/code/ryzom/client/src/interface_v3/group_tree.cpp +++ b/code/ryzom/client/src/interface_v3/group_tree.cpp @@ -777,14 +777,14 @@ const std::string &CGroupTree::getSelectedNodeId() const } // ---------------------------------------------------------------------------- -bool CGroupTree::handleEvent (const CEventDescriptor& event) +bool CGroupTree::handleEvent (const NLGUI::CEventDescriptor& event) { if (!_Active) return false; if (CInterfaceGroup::handleEvent(event)) return true; // The line must be over (pre-selected) - if (event.getType() == CEventDescriptor::mouse && _OverLine>=0) + if (event.getType() == NLGUI::CEventDescriptor::mouse && _OverLine>=0) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if (!isIn(eventDesc.getX(), eventDesc.getY())) return false; @@ -799,7 +799,7 @@ bool CGroupTree::handleEvent (const CEventDescriptor& event) (x < (_XReal+getHrcIconXEnd(_Lines[_OverLine].Depth + _Lines[_OverLine].getNumAdditionnalBitmap())))) bIcon = true; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown) { if (bText) { @@ -807,7 +807,7 @@ bool CGroupTree::handleEvent (const CEventDescriptor& event) } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { // line selection if (bText) diff --git a/code/ryzom/client/src/interface_v3/group_tree.h b/code/ryzom/client/src/interface_v3/group_tree.h index c2a299c01..444a0fe4d 100644 --- a/code/ryzom/client/src/interface_v3/group_tree.h +++ b/code/ryzom/client/src/interface_v3/group_tree.h @@ -213,7 +213,7 @@ public: virtual void draw(); - virtual bool handleEvent (const CEventDescriptor& eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor& eventDesc); void reset(); diff --git a/code/ryzom/client/src/interface_v3/group_wheel.cpp b/code/ryzom/client/src/interface_v3/group_wheel.cpp index 51a6390f9..91cc53dd2 100644 --- a/code/ryzom/client/src/interface_v3/group_wheel.cpp +++ b/code/ryzom/client/src/interface_v3/group_wheel.cpp @@ -43,13 +43,13 @@ bool CInterfaceGroupWheel::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) } // ***************************************************************************************************************** -bool CInterfaceGroupWheel::handleEvent(const CEventDescriptor &event) +bool CInterfaceGroupWheel::handleEvent(const NLGUI::CEventDescriptor &event) { if (CInterfaceGroup::handleEvent(event)) return true; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { CInterfaceManager *im = CInterfaceManager::getInstance(); if (eventDesc.getWheel() > 0 && _AHWheelUp) diff --git a/code/ryzom/client/src/interface_v3/group_wheel.h b/code/ryzom/client/src/interface_v3/group_wheel.h index 67f7c9c09..a3b3f7c23 100644 --- a/code/ryzom/client/src/interface_v3/group_wheel.h +++ b/code/ryzom/client/src/interface_v3/group_wheel.h @@ -31,7 +31,7 @@ public: CInterfaceGroupWheel(const TCtorParam ¶m); /// Coming from CInterfaceElement virtual bool parse(xmlNodePtr cur, CInterfaceGroup * parentGroup); - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); private: IActionHandler *_AHWheelUp; CStringShared _AHWheelUpParams; diff --git a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp index 5723952ee..87a20d35a 100644 --- a/code/ryzom/client/src/interface_v3/input_handler_manager.cpp +++ b/code/ryzom/client/src/interface_v3/input_handler_manager.cpp @@ -163,12 +163,12 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) // if there was some control capturing the mouse, warn them that they lost the focus if (pIM->getCapturePointerLeft()) { - pIM->getCapturePointerLeft()->handleEvent(CEventDescriptorSetFocus(pEvent->Get)); + pIM->getCapturePointerLeft()->handleEvent(NLGUI::CEventDescriptorSetFocus(pEvent->Get)); } pIM->setCapturePointerLeft(NULL); if (pIM->getCapturePointerRight()) { - pIM->getCapturePointerRight()->handleEvent(CEventDescriptorSetFocus(pEvent->Get)); + pIM->getCapturePointerRight()->handleEvent(NLGUI::CEventDescriptorSetFocus(pEvent->Get)); } pIM->setCapturePointerRight(NULL); UserControls.stopFreeLook(); @@ -191,7 +191,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) && (ClientCfg.R2EDEnabled || R2::getEditor().getCurrentTool()) ) { - R2::getEditor().handleEvent(CEventDescriptorSetFocus(pEvent->Get)); + R2::getEditor().handleEvent(NLGUI::CEventDescriptorSetFocus(pEvent->Get)); } } @@ -224,7 +224,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) event == EventStringId) { // if not handled, post to Action Manager - if( !pIM->handleEvent( CEventDescriptorKey((const CEventKey &) event) ) ) + if( !pIM->handleEvent( NLGUI::CEventDescriptorKey((const CEventKey &) event) ) ) { // See if handled by editor bool handled = false; @@ -232,7 +232,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) && (ClientCfg.R2EDEnabled || R2::getEditor().getCurrentTool()) ) { - handled = R2::getEditor().handleEvent(CEventDescriptorKey((const CEventKey &) event) ); + handled = R2::getEditor().handleEvent(NLGUI::CEventDescriptorKey((const CEventKey &) event) ); } if (!handled) { @@ -282,7 +282,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) CViewPointer &rIP = *pIM->getPointer(); - CEventDescriptorMouse eventDesc; + NLGUI::CEventDescriptorMouse eventDesc; sint32 x,y; rIP.getPointerDispPos (x, y); eventDesc.setX (x); @@ -326,12 +326,12 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) // handle Event if(pEvent->Button & leftButton) { - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mouseleftdown); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mouseleftdown); handled|= pIM->handleEvent (eventDesc); } if(pEvent->Button & rightButton) { - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mouserightdown); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mouserightdown); handled|= pIM->handleEvent (eventDesc); } } @@ -350,12 +350,12 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) // handle Event if(pEvent->Button & leftButton) { - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mouseleftup); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mouseleftup); handled|= pIM->handleEvent (eventDesc); } if(pEvent->Button & rightButton) { - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mouserightup); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mouserightup); handled|= pIM->handleEvent (eventDesc); } } @@ -369,12 +369,12 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) // handle Event if(pEvent->Button & leftButton) { - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mouseleftdblclk); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mouseleftdblclk); handled|= pIM->handleEvent (eventDesc); } if(pEvent->Button & rightButton) { - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mouserightdblclk); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mouserightdblclk); handled|= pIM->handleEvent (eventDesc); } @@ -395,7 +395,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) // handle Event now. if (_MouseWheel != 0) { - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mousewheel); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mousewheel); eventDesc.setWheel(_MouseWheel); handled|= pIM->handleEvent (eventDesc); _MouseWheel = 0; @@ -429,7 +429,7 @@ void CInputHandlerManager::operator ()(const NLMISC::CEvent &event) // *************************************************************************** -bool CInputHandlerManager::updateMousePos(NLMISC::CEventMouse &event, CEventDescriptorMouse &eventDesc) +bool CInputHandlerManager::updateMousePos(NLMISC::CEventMouse &event, NLGUI::CEventDescriptorMouse &eventDesc) { if (!IsMouseFreeLook()) { @@ -461,7 +461,7 @@ bool CInputHandlerManager::updateMousePos(NLMISC::CEventMouse &event, CEventDes eventDesc.setY (y); // handle Event now. - eventDesc.setEventTypeExtended(CEventDescriptorMouse::mousemove); + eventDesc.setEventTypeExtended(NLGUI::CEventDescriptorMouse::mousemove); return pIM->handleEvent (eventDesc); } } @@ -470,7 +470,7 @@ bool CInputHandlerManager::updateMousePos(NLMISC::CEventMouse &event, CEventDes // *************************************************************************** -void CInputHandlerManager::CComboKey::init(const CEventDescriptorKey &rDK) +void CInputHandlerManager::CComboKey::init(const NLGUI::CEventDescriptorKey &rDK) { Key= rDK.getKey(); CtrlFlags= 0; @@ -493,7 +493,7 @@ bool CInputHandlerManager::CComboKey::operator<(const CComboKey &c) const // *************************************************************************** -bool CInputHandlerManager::isComboKeyChat(const CEventDescriptorKey &edk) const +bool CInputHandlerManager::isComboKeyChat(const NLGUI::CEventDescriptorKey &edk) const { CComboKey ckey; ckey.init(edk); diff --git a/code/ryzom/client/src/interface_v3/input_handler_manager.h b/code/ryzom/client/src/interface_v3/input_handler_manager.h index 23a5afeb5..9f152c87c 100644 --- a/code/ryzom/client/src/interface_v3/input_handler_manager.h +++ b/code/ryzom/client/src/interface_v3/input_handler_manager.h @@ -96,7 +96,7 @@ public: * Basics events such as KeyA, KeyB etc.. should be in this config file. * Combo Keys like Ctrl+A (select all) should be in this config file too. */ - bool isComboKeyChat(const CEventDescriptorKey &edk) const; + bool isComboKeyChat(const NLGUI::CEventDescriptorKey &edk) const; /** Pump The Events of The setuped EventServer (ie Driver->EventServer). @@ -165,7 +165,7 @@ private: { CtrlFlags= 0; } - void init(const CEventDescriptorKey &rDK); + void init(const NLGUI::CEventDescriptorKey &rDK); bool operator<(const CComboKey &c) const; }; @@ -178,7 +178,7 @@ private: void parseKey(xmlNodePtr cur, std::vector &out); // return true if handled - bool updateMousePos(NLMISC::CEventMouse &event, CEventDescriptorMouse &eventDesc); + bool updateMousePos(NLMISC::CEventMouse &event, NLGUI::CEventDescriptorMouse &eventDesc); }; diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index 23e7dda44..2d654a7ba 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -546,7 +546,7 @@ void CInterface3DScene::draw () } // ---------------------------------------------------------------------------- -bool CInterface3DScene::handleEvent (const CEventDescriptor &event) +bool CInterface3DScene::handleEvent (const NLGUI::CEventDescriptor &event) { if (!_UserInteraction) return false; @@ -554,12 +554,12 @@ bool CInterface3DScene::handleEvent (const CEventDescriptor &event) if (!_Active) return false; // if focus is lost then cancel rotation / zoom - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &eds = (const CEventDescriptorSystem &) event; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::setfocus) + const NLGUI::CEventDescriptorSystem &eds = (const NLGUI::CEventDescriptorSystem &) event; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::setfocus) { - const CEventDescriptorSetFocus &edsf = (const CEventDescriptorSetFocus &) eds; + const NLGUI::CEventDescriptorSetFocus &edsf = (const NLGUI::CEventDescriptorSetFocus &) eds; if (edsf.hasFocus() == false) { _MouseLDown = false; @@ -568,9 +568,9 @@ bool CInterface3DScene::handleEvent (const CEventDescriptor &event) } } } - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if ((CInterfaceManager::getInstance()->getCapturePointerLeft() != this) && (CInterfaceManager::getInstance()->getCapturePointerRight() != this) && (!((eventDesc.getX() >= _XReal) && @@ -579,7 +579,7 @@ bool CInterface3DScene::handleEvent (const CEventDescriptor &event) (eventDesc.getY() <= (_YReal+ _HReal))))) return false; - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { _MouseLDown = true; _MouseLDownX = eventDesc.getX(); @@ -588,12 +588,12 @@ bool CInterface3DScene::handleEvent (const CEventDescriptor &event) pIM->setCapturePointerLeft(this); // Because we are not just a control return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { _MouseLDown = false; return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown) { _MouseRDown = true; _MouseRDownX = eventDesc.getX(); @@ -602,12 +602,12 @@ bool CInterface3DScene::handleEvent (const CEventDescriptor &event) pIM->setCapturePointerRight(this); // Because we are not just a control return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { _MouseRDown = false; return true; } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousemove) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousemove) { if (_MouseLDown) { diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.h b/code/ryzom/client/src/interface_v3/interface_3d_scene.h index 7c0e94854..339497f43 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.h +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.h @@ -60,7 +60,7 @@ public: virtual void draw (); - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); virtual CInterfaceElement* getElement (const std::string &id); diff --git a/code/ryzom/client/src/interface_v3/interface_group.cpp b/code/ryzom/client/src/interface_v3/interface_group.cpp index a088b2c0c..1a75cf4cb 100644 --- a/code/ryzom/client/src/interface_v3/interface_group.cpp +++ b/code/ryzom/client/src/interface_v3/interface_group.cpp @@ -92,7 +92,7 @@ void CInterfaceGroup::setIdRecurse(const std::string &id) // ------------------------------------------------------------------------------------------------ -void CInterfaceGroup::notifyActiveCalled(const CEventDescriptorActiveCalledOnParent &desc) +void CInterfaceGroup::notifyActiveCalled(const NLGUI::CEventDescriptorActiveCalledOnParent &desc) { // notify children that the 'active' state of this group has changed for(std::vector::iterator it = _ChildrenGroups.begin(); it != _ChildrenGroups.end(); ++it) @@ -121,7 +121,7 @@ void CInterfaceGroup::setActive(bool state) pIM->runActionHandler (_AHOnDeactive, this, _AHOnDeactiveParams); } - notifyActiveCalled(CEventDescriptorActiveCalledOnParent(state)); + notifyActiveCalled(NLGUI::CEventDescriptorActiveCalledOnParent(state)); } } @@ -685,7 +685,7 @@ bool CInterfaceGroup::isChildGroup(const CInterfaceGroup *group) const } // ------------------------------------------------------------------------------------------------ -bool CInterfaceGroup::handleEvent (const CEventDescriptor &event) +bool CInterfaceGroup::handleEvent (const NLGUI::CEventDescriptor &event) { if (CCtrlBase::handleEvent(event)) return true; if (!_Active) @@ -693,19 +693,19 @@ bool CInterfaceGroup::handleEvent (const CEventDescriptor &event) CInterfaceManager *im = CInterfaceManager::getInstance(); - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - CEventDescriptorSystem &eds = (CEventDescriptorSystem&)event; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::activecalledonparent) + NLGUI::CEventDescriptorSystem &eds = (NLGUI::CEventDescriptorSystem&)event; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::activecalledonparent) { // notify all childrens - notifyActiveCalled((CEventDescriptorActiveCalledOnParent &) eds); + notifyActiveCalled((NLGUI::CEventDescriptorActiveCalledOnParent &) eds); } } - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - const CEventDescriptorMouse &eventDesc = (const CEventDescriptorMouse &)event; + const NLGUI::CEventDescriptorMouse &eventDesc = (const NLGUI::CEventDescriptorMouse &)event; if (!isIn(eventDesc.getX(), eventDesc.getY())) return false; @@ -733,7 +733,7 @@ bool CInterfaceGroup::handleEvent (const CEventDescriptor &event) } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { if (_AHOnLeftClick != NULL) { @@ -742,7 +742,7 @@ bool CInterfaceGroup::handleEvent (const CEventDescriptor &event) } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { if (_AHOnRightClick != NULL) { @@ -750,7 +750,7 @@ bool CInterfaceGroup::handleEvent (const CEventDescriptor &event) return true; } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mousewheel) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mousewheel) { // handle the Mouse Wheel only if interesting if (_H>_MaxH) diff --git a/code/ryzom/client/src/interface_v3/interface_group.h b/code/ryzom/client/src/interface_v3/interface_group.h index 432176704..f9bc949eb 100644 --- a/code/ryzom/client/src/interface_v3/interface_group.h +++ b/code/ryzom/client/src/interface_v3/interface_group.h @@ -76,7 +76,7 @@ public: sint32 getMinUsedW() const; /// Coming from CCtrlBase - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); void executeControl (const std::string &sControlName); @@ -319,7 +319,7 @@ protected: void doUpdateCoords(); // notify children controls & groups that 'active' has been called on one of their parent - void notifyActiveCalled(const CEventDescriptorActiveCalledOnParent &desc); + void notifyActiveCalled(const NLGUI::CEventDescriptorActiveCalledOnParent &desc); protected: diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 12f08577e..41d736448 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -1332,8 +1332,8 @@ void CInterfaceManager::updateFrameEvents() } // send clock tick msg to ctrl that are captured - CEventDescriptorSystem clockTick; - clockTick.setEventTypeExtended(CEventDescriptorSystem::clocktick); + NLGUI::CEventDescriptorSystem clockTick; + clockTick.setEventTypeExtended(NLGUI::CEventDescriptorSystem::clocktick); if (_CapturePointerLeft) { _CapturePointerLeft->handleEvent(clockTick); @@ -2671,7 +2671,7 @@ uint CInterfaceManager::getDepth (CCtrlBase *ctrl, CInterfaceGroup *pNewCurrentW } // ------------------------------------------------------------------------------------------------ -bool CInterfaceManager::handleEvent (const CEventDescriptor& event) +bool CInterfaceManager::handleEvent (const NLGUI::CEventDescriptor& event) { bool handled= false; @@ -2680,18 +2680,18 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) if (_ActiveAnims[i]->isDisableButtons()) return false; - if (event.getType() == CEventDescriptor::key) + if (event.getType() == NLGUI::CEventDescriptor::key) { - CEventDescriptorKey &eventDesc = (CEventDescriptorKey&)event; + NLGUI::CEventDescriptorKey &eventDesc = (NLGUI::CEventDescriptorKey&)event; _LastEventKeyDesc = eventDesc; // Any Key event disable the ContextHelp disableContextHelp(); // Hide menu if the key is pushed -// if ((eventDesc.getKeyEventType() == CEventDescriptorKey::keydown) && !_ModalStack.empty() && !eventDesc.getKeyAlt() && !eventDesc.getKeyCtrl() && !eventDesc.getKeyShift()) +// if ((eventDesc.getKeyEventType() == NLGUI::CEventDescriptorKey::keydown) && !_ModalStack.empty() && !eventDesc.getKeyAlt() && !eventDesc.getKeyCtrl() && !eventDesc.getKeyShift()) // Hide menu (or popup menu) is ESCAPE pressed - if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == KeyESCAPE ) + if( eventDesc.getKeyEventType() == NLGUI::CEventDescriptorKey::keychar && eventDesc.getChar() == KeyESCAPE ) { if(_ModalStack.size() > 0) { @@ -2702,7 +2702,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) } // Manage "quit window" If the Key is ESCAPE, no captureKeyboard - if( eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == KeyESCAPE ) + if( eventDesc.getKeyEventType() == NLGUI::CEventDescriptorKey::keychar && eventDesc.getChar() == KeyESCAPE ) { // Get the last escapable active top window. NB: this is ergonomically better. CInterfaceGroup *win= getLastEscapableTopWindow(); @@ -2729,7 +2729,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) } // Manage complex "Enter" - if (eventDesc.getKeyEventType() == CEventDescriptorKey::keychar && eventDesc.getChar() == KeyRETURN) + if (eventDesc.getKeyEventType() == NLGUI::CEventDescriptorKey::keychar && eventDesc.getChar() == KeyRETURN) { // If the top window has Enter AH CInterfaceGroup *tw= getTopWindow(); @@ -2802,9 +2802,9 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) return result; } } - else if (event.getType() == CEventDescriptor::mouse && _MouseHandlingEnabled ) + else if (event.getType() == NLGUI::CEventDescriptor::mouse && _MouseHandlingEnabled ) { - CEventDescriptorMouse &eventDesc = (CEventDescriptorMouse&)event; + NLGUI::CEventDescriptorMouse &eventDesc = (NLGUI::CEventDescriptorMouse&)event; // First thing to do : Capture handling if (_CapturePointerLeft != NULL) @@ -2817,7 +2817,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) _WindowUnder = ptr?ptr->getId():""; // Any Mouse event but move disable the ContextHelp - if(eventDesc.getEventTypeExtended() != CEventDescriptorMouse::mousemove) + if(eventDesc.getEventTypeExtended() != NLGUI::CEventDescriptorMouse::mousemove) { disableContextHelp(); } @@ -2844,8 +2844,8 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) { // If there is a handler on click out launch it if (pNewCurrentWnd != mwi.ModalWindow) - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown || - (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown)) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown || + (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown)) if (!mwi.ModalHandlerClickOut.empty()) runActionHandler(mwi.ModalHandlerClickOut,NULL,mwi.ModalClickOutParams); @@ -2855,8 +2855,8 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) // NB: don't force handle==true because to quit a modal does not avoid other actions // quit if click outside - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown || - (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown)) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown || + (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown)) { clickedOutModalWindow = dynamic_cast((CInterfaceGroup*)mwi.ModalWindow); // disable the modal @@ -2885,7 +2885,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) } // Manage LeftClick. - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) { if ((pNewCurrentWnd != NULL) && (_ModalStack.empty()) && (pNewCurrentWnd->getOverlappable())) { @@ -2937,7 +2937,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) } // Manage RightClick - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightdown) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightdown) { if ((pNewCurrentWnd != NULL) && (_ModalStack.empty()) && (pNewCurrentWnd->getOverlappable())) { @@ -2981,7 +2981,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) handled |= _CapturePointerRight->handleEvent(event); } } - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) { if (!handled) if (pNewCurrentWnd != NULL) @@ -3001,7 +3001,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) { if (((pNewCurrentWnd != NULL) && _ModalStack.empty()) || ((!_ModalStack.empty() && _ModalStack.back().ModalWindow == pNewCurrentWnd))) { - CEventDescriptorMouse ev2 = eventDesc; + NLGUI::CEventDescriptorMouse ev2 = eventDesc; sint32 x= eventDesc.getX(), y = eventDesc.getY(); if (pNewCurrentWnd) { @@ -3011,13 +3011,13 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) } // After handle event of a left click, may set window Top if movable (infos etc...) - //if( (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftdown) && pNewCurrentWnd->isMovable() ) + //if( (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftdown) && pNewCurrentWnd->isMovable() ) // setTopWindow(pNewCurrentWnd); } } // Put here to let a chance to the window to handle if the capture dont - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) { if (_CapturePointerLeft != NULL) { @@ -3039,7 +3039,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) if(mwi.ModalExitClickR) { // quit if click right - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouserightup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouserightup) // disable the modal disableModalWindow(); } @@ -3048,7 +3048,7 @@ bool CInterfaceManager::handleEvent (const CEventDescriptor& event) if(mwi.ModalExitClickL) { // quit if click right - if (eventDesc.getEventTypeExtended() == CEventDescriptorMouse::mouseleftup) + if (eventDesc.getEventTypeExtended() == NLGUI::CEventDescriptorMouse::mouseleftup) // disable the modal disableModalWindow(); } diff --git a/code/ryzom/client/src/interface_v3/interface_manager.h b/code/ryzom/client/src/interface_v3/interface_manager.h index 577edbda7..7fe26fc3e 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.h +++ b/code/ryzom/client/src/interface_v3/interface_manager.h @@ -338,7 +338,7 @@ public: /// Handle The Event. return true if the interfaceManager catch it and if must not send to the Game Action Manager - bool handleEvent (const CEventDescriptor &eventDesc); + bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); void runActionHandler (const std::string &AHName, CCtrlBase *pCaller, const std::string &Params=std::string("")); void runActionHandler (IActionHandler *ah, CCtrlBase *pCaller, @@ -704,7 +704,7 @@ public: } // Description of the last key event that called an action handler - const CEventDescriptorKey& getLastEventKeyDesc() const { return _LastEventKeyDesc; } + const NLGUI::CEventDescriptorKey& getLastEventKeyDesc() const { return _LastEventKeyDesc; } void notifyMailAvailable(); void notifyForumUpdated(); @@ -1034,7 +1034,7 @@ private: sint32 _CurrentPlayerCharac[CHARACTERISTICS::NUM_CHARACTERISTICS]; // Description of the last key event that called an action handler - CEventDescriptorKey _LastEventKeyDesc; + NLGUI::CEventDescriptorKey _LastEventKeyDesc; // observers for copying database branch changes CServerToLocalAutoCopy ServerToLocalAutoCopyInventory; diff --git a/code/ryzom/client/src/r2/displayer_visual_group.cpp b/code/ryzom/client/src/r2/displayer_visual_group.cpp index c5f3e19e3..fed72c85a 100644 --- a/code/ryzom/client/src/r2/displayer_visual_group.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_group.cpp @@ -131,7 +131,7 @@ public: _Parent->getCorner(winX, winY, _ParentPosRef); return contains(x - winX, y - winY); } - virtual bool handleEvent (const CEventDescriptor &/* event */) + virtual bool handleEvent (const NLGUI::CEventDescriptor &/* event */) { return false; } diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index e831cf8a2..859b89520 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -4739,17 +4739,17 @@ void CEditor::autoSave() } // ********************************************************************************************************* -bool CEditor::handleEvent (const CEventDescriptor &eventDesc) +bool CEditor::handleEvent (const NLGUI::CEventDescriptor &eventDesc) { //H_AUTO(R2_CEditor_handleEvent ) CHECK_EDITOR if (ConnectionWanted || !_CurrentTool) return false; // TMP special case for connection - if (eventDesc.getType() == CEventDescriptor::system) + if (eventDesc.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &eds = (const CEventDescriptorSystem &) eventDesc; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::setfocus) + const NLGUI::CEventDescriptorSystem &eds = (const NLGUI::CEventDescriptorSystem &) eventDesc; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::setfocus) { - const CEventDescriptorSetFocus &edsf = (const CEventDescriptorSetFocus &) eds; + const NLGUI::CEventDescriptorSetFocus &edsf = (const NLGUI::CEventDescriptorSetFocus &) eds; if (edsf.hasFocus() == false) { // cancel current tool diff --git a/code/ryzom/client/src/r2/editor.h b/code/ryzom/client/src/r2/editor.h index 89b470db0..1c793b3d5 100644 --- a/code/ryzom/client/src/r2/editor.h +++ b/code/ryzom/client/src/r2/editor.h @@ -250,7 +250,7 @@ public: * Handle an user input event * \return true if the event was handled by the editor */ - bool handleEvent (const CEventDescriptor &eventDesc); + bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); // Handle copy, reaches the editor if no edit box is currently active void copy(); diff --git a/code/ryzom/client/src/r2/instance_map_deco.cpp b/code/ryzom/client/src/r2/instance_map_deco.cpp index ea351dca6..476326b19 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.cpp +++ b/code/ryzom/client/src/r2/instance_map_deco.cpp @@ -41,7 +41,7 @@ void CInstanceMapDeco::CCtrlButtonEntity::getContextHelp(ucstring &help) const } // ********************************************************************************************************* -bool CInstanceMapDeco::CCtrlButtonEntity::handleEvent(const CEventDescriptor &/* event */) +bool CInstanceMapDeco::CCtrlButtonEntity::handleEvent(const NLGUI::CEventDescriptor &/* event */) { //H_AUTO(R2_CCtrlButtonEntity_handleEvent) return false; // just a display with tooltip capability diff --git a/code/ryzom/client/src/r2/instance_map_deco.h b/code/ryzom/client/src/r2/instance_map_deco.h index f81a3f022..6f0f62977 100644 --- a/code/ryzom/client/src/r2/instance_map_deco.h +++ b/code/ryzom/client/src/r2/instance_map_deco.h @@ -80,7 +80,7 @@ private: CCtrlButtonEntity(CInstance &instance) : CCtrlButton(TCtorParam()), _Instance(instance) {} // from IDisplayerUIHandle virtual CInstance &getDisplayedInstance() { return _Instance; } - virtual bool handleEvent (const CEventDescriptor &event); + virtual bool handleEvent (const NLGUI::CEventDescriptor &event); private: CInstance &_Instance; protected: diff --git a/code/ryzom/client/src/r2/tool.cpp b/code/ryzom/client/src/r2/tool.cpp index 94854fd51..a97296590 100644 --- a/code/ryzom/client/src/r2/tool.cpp +++ b/code/ryzom/client/src/r2/tool.cpp @@ -760,42 +760,42 @@ void CTool::setMouseCursor(const char *cursorTexture) } // *************************************************************** -bool CTool::handleEvent(const CEventDescriptor &event) +bool CTool::handleEvent(const NLGUI::CEventDescriptor &event) { //H_AUTO(R2_CTool_handleEvent) bool handled = false; - if (event.getType() == CEventDescriptor::mouse) + if (event.getType() == NLGUI::CEventDescriptor::mouse) { - CEventDescriptorMouse &eventDesc = (CEventDescriptorMouse&)event; + NLGUI::CEventDescriptorMouse &eventDesc = (NLGUI::CEventDescriptorMouse&)event; switch(eventDesc.getEventTypeExtended()) { - case CEventDescriptorMouse::mousemove: + case NLGUI::CEventDescriptorMouse::mousemove: handled = onMouseMove(); break; - case CEventDescriptorMouse::mouseleftdown: + case NLGUI::CEventDescriptorMouse::mouseleftdown: handled = onMouseLeftButtonDown(); //if (handled) nlwarning("onMouseLeftButtonDown handled"); break; - case CEventDescriptorMouse::mouserightdown: + case NLGUI::CEventDescriptorMouse::mouserightdown: handled = onMouseRightButtonDown(); //if (handled) nlwarning("onMouseRightButtonDown handled"); break; - case CEventDescriptorMouse::mouseleftup: + case NLGUI::CEventDescriptorMouse::mouseleftup: handled = onMouseLeftButtonUp(); //if (handled) nlwarning("onMouseLeftButtonUp handled"); break; - case CEventDescriptorMouse::mouserightup: + case NLGUI::CEventDescriptorMouse::mouserightup: handled = onMouseRightButtonUp(); //if (handled) nlwarning("onMouseRightButtonUp handled"); break; } } - if (event.getType() == CEventDescriptor::system) + if (event.getType() == NLGUI::CEventDescriptor::system) { - const CEventDescriptorSystem &eds = (const CEventDescriptorSystem &) event; - if (eds.getEventTypeExtended() == CEventDescriptorSystem::setfocus) + const NLGUI::CEventDescriptorSystem &eds = (const NLGUI::CEventDescriptorSystem &) event; + if (eds.getEventTypeExtended() == NLGUI::CEventDescriptorSystem::setfocus) { - const CEventDescriptorSetFocus &edsf = (const CEventDescriptorSetFocus &) eds; + const NLGUI::CEventDescriptorSetFocus &edsf = (const NLGUI::CEventDescriptorSetFocus &) eds; if (edsf.hasFocus() == true) { onFocusGained(); diff --git a/code/ryzom/client/src/r2/tool.h b/code/ryzom/client/src/r2/tool.h index 05a62eb48..4e5613c55 100644 --- a/code/ryzom/client/src/r2/tool.h +++ b/code/ryzom/client/src/r2/tool.h @@ -26,7 +26,10 @@ // class CInterfaceManager; -class CEventDescriptor; +namespace NLGUI +{ + class CEventDescriptor; +} class CLuaObject; class CGroupMap; @@ -119,7 +122,7 @@ public: * * \return true if the event has been handled by the tool */ - virtual bool handleEvent (const CEventDescriptor &eventDesc); + virtual bool handleEvent (const NLGUI::CEventDescriptor &eventDesc); // virtual void onFocusGained() {} // the app window gained the focus (there's no 'focus lost' event here because it reset current tool, so 'CTooll::cancel' will be called instead) // IMPORTANT : Reacting to this should be unnecessary, as lost focus reset the current tool,