From 1b742aa93317da0c02e438bca821891b1b7e641d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Liru=20F=C3=A6rs?= Date: Fri, 28 Feb 2020 22:33:37 -0500 Subject: [PATCH] Menu finals and overrides --- indra/newview/llfloateravatarlist.cpp | 20 +- indra/newview/llviewermenu.cpp | 1092 ++++++++++++------------- 2 files changed, 556 insertions(+), 556 deletions(-) diff --git a/indra/newview/llfloateravatarlist.cpp b/indra/newview/llfloateravatarlist.cpp index bedba75e5..427997c02 100644 --- a/indra/newview/llfloateravatarlist.cpp +++ b/indra/newview/llfloateravatarlist.cpp @@ -363,45 +363,45 @@ static void cmd_teleport(const LLAvatarListEntry* entry); namespace { typedef LLMemberListener view_listener_t; - class RadarTrack : public view_listener_t + class RadarTrack final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().onClickTrack(); return true; } }; - class RadarFocus : public view_listener_t + class RadarFocus final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::setFocusAvatar(LFIDBearer::getActiveSelectedID()); return true; } }; - class RadarFocusPrev : public view_listener_t + class RadarFocusPrev final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().focusOnPrev(userdata.asInteger()); return true; } }; - class RadarFocusNext : public view_listener_t + class RadarFocusNext final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().focusOnNext(userdata.asInteger()); return true; } }; - class RadarAnnounceKeys : public view_listener_t + class RadarAnnounceKeys final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterAvatarList::instance().sendKeys(); return true; diff --git a/indra/newview/llviewermenu.cpp b/indra/newview/llviewermenu.cpp index 1b1d6d42c..5f712de8e 100644 --- a/indra/newview/llviewermenu.cpp +++ b/indra/newview/llviewermenu.cpp @@ -480,7 +480,7 @@ void reset_vertex_buffers(void *user_data) gPipeline.resetVertexBuffers(); } -class LLMenuParcelObserver : public LLParcelObserver +class LLMenuParcelObserver final : public LLParcelObserver { public: LLMenuParcelObserver(); @@ -1700,9 +1700,9 @@ void init_server_menu(LLMenuGL* menu) ////////////////////// /* -class LLAdvancedToggleWireframe : public view_listener_t +class LLAdvancedToggleWireframe final : public view_listener_t { - bool handleEvent(const LLSD& userdata) + bool handleEvent(const LLSD& userdata) override */ void advanced_toggle_wireframe(void*) { @@ -1724,9 +1724,9 @@ class LLAdvancedToggleWireframe : public view_listener_t /* }; -class LLAdvancedCheckWireframe : public view_listener_t +class LLAdvancedCheckWireframe final : public view_listener_t { - bool handleEvent(const LLSD& userdata) + bool handleEvent(const LLSD& userdata) override */ BOOL advanced_check_wireframe(void*) { @@ -1772,9 +1772,9 @@ void cleanup_menus() // Object pie menu //----------------------------------------------------------------------------- -class LLObjectReportAbuse : public view_listener_t +class LLObjectReportAbuse final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (objectp) @@ -1786,9 +1786,9 @@ class LLObjectReportAbuse : public view_listener_t }; // Enabled it you clicked an object -class LLObjectEnableReportAbuse : public view_listener_t +class LLObjectEnableReportAbuse final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLSelectMgr::getInstance()->getSelection()->getObjectCount() != 0; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -1796,9 +1796,9 @@ class LLObjectEnableReportAbuse : public view_listener_t } }; -class LLObjectTouch : public view_listener_t +class LLObjectTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_touch(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(), &LLToolPie::getInstance()->getPick()); return true; @@ -1861,9 +1861,9 @@ bool enable_object_touch(const LLSD& userdata) }; // One object must have touch sensor -class LLObjectEnableTouch : public view_listener_t +class LLObjectEnableTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_touch(userdata)); return true; @@ -1892,9 +1892,9 @@ void handle_object_open() // LLFloaterOpenObject::show(); } -class LLObjectOpen : public view_listener_t +class LLObjectOpen final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_open(); return true; @@ -1914,9 +1914,9 @@ bool enable_object_open() return root->allowOpen(); } -class LLObjectEnableOpen : public view_listener_t +class LLObjectEnableOpen final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_open()); @@ -1924,18 +1924,18 @@ class LLObjectEnableOpen : public view_listener_t } }; -class LLViewJoystickFlycam : public view_listener_t +class LLViewJoystickFlycam final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_toggle_flycam(); return true; } }; -class LLViewCheckJoystickFlycam : public view_listener_t +class LLViewCheckJoystickFlycam final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLViewerJoystick::getInstance()->getOverrideCamera(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -1949,9 +1949,9 @@ void handle_toggle_flycam() LLViewerJoystick::getInstance()->toggleFlycam(); } -class LLObjectBuild : public view_listener_t +class LLObjectBuild final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (gAgentCamera.getFocusOnAvatar() && !LLToolMgr::getInstance()->inEdit() && gSavedSettings.getBOOL("EditCameraMovement") ) { @@ -2043,9 +2043,9 @@ void handle_object_edit() return; } -class LLObjectEdit : public view_listener_t +class LLObjectEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_edit(); return true; @@ -2092,9 +2092,9 @@ bool add_object_to_blacklist( const LLUUID& id, const std::string& entry_name ) } // Derenderizer. Originally by Phox. -class LLObjectDerender : public view_listener_t +class LLObjectDerender final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* slct = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(!slct)return true; @@ -2246,9 +2246,9 @@ void reload_objects(LLTextureReloader& texture_list, LLViewerObject::const_child } } -class LLAvatarReloadTextures : public view_listener_t +class LLAvatarReloadTextures final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) @@ -2279,9 +2279,9 @@ class LLAvatarReloadTextures : public view_listener_t return true; } }; -class LLObjectReloadTextures : public view_listener_t +class LLObjectReloadTextures final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject::vobj_list_t object_list; @@ -2301,9 +2301,9 @@ class LLObjectReloadTextures : public view_listener_t //--------------------------------------------------------------------------- // Land pie menu //--------------------------------------------------------------------------- -class LLLandBuild : public view_listener_t +class LLLandBuild final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerParcelMgr::getInstance()->deselectLand(); @@ -2333,18 +2333,18 @@ class LLLandBuild : public view_listener_t } }; -class LLLandBuyPass : public view_listener_t +class LLLandBuyPass final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLPanelLandGeneral::onClickBuyPass((void *)FALSE); return true; } }; -class LLLandEnableBuyPass : public view_listener_t +class LLLandEnableBuyPass final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLPanelLandGeneral::enableBuyPass(nullptr); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -2414,9 +2414,9 @@ bool enable_object_edit() return enable; } -class LLEnableEdit : public view_listener_t +class LLEnableEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_edit()); return true; @@ -2429,17 +2429,17 @@ bool enable_object_select_in_pathfinding_linksets() return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetEditableLinksets(); } -class LLObjectEnablePFLinksetsSelected : public view_listener_t +class LLObjectEnablePFLinksetsSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return enable_object_select_in_pathfinding_linksets(); } }; -class LLObjectPFCharactersSelected : public view_listener_t +class LLObjectPFCharactersSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterPathfindingCharacters::openCharactersWithSelectedObjects(); return true; @@ -2451,26 +2451,26 @@ bool enable_object_select_in_pathfinding_characters() return LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLSelectMgr::getInstance()->selectGetViewableCharacters(); } -class LLObjectEnablePFCharactersSelected : public view_listener_t +class LLObjectEnablePFCharactersSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return enable_object_select_in_pathfinding_characters(); } }; -class LLSelfRemoveAllAttachments : public view_listener_t +class LLSelfRemoveAllAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAppearanceMgr::instance().removeAllAttachmentsFromAvatar(); return true; } }; -class LLSelfEnableRemoveAllAttachments : public view_listener_t +class LLSelfEnableRemoveAllAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = false; if (isAgentAvatarValid()) @@ -2495,9 +2495,9 @@ class LLSelfEnableRemoveAllAttachments : public view_listener_t } }; -class LLSelfVisibleScriptInfo : public view_listener_t +class LLSelfVisibleScriptInfo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LLViewerRegion* region = gAgent.getRegion()) gMenuHolder->findControl(userdata["control"].asString())->setValue(!region->getCapability("AttachmentResources").empty()); @@ -2515,9 +2515,9 @@ BOOL enable_has_attachments(void*) // Avatar pie menu //--------------------------------------------------------------------------- -class LLObjectFollow : public view_listener_t +class LLObjectFollow final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // follow a given avatar by ID LLViewerObject* objectp = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -2556,18 +2556,18 @@ bool enable_object_mute() } } -class LLObjectEnableMute : public view_listener_t +class LLObjectEnableMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_mute()); return true; } }; -class LLObjectMute : public view_listener_t +class LLObjectMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if (!object) return true; @@ -2625,9 +2625,9 @@ class LLObjectMute : public view_listener_t }; // -class LLObjectEnableCopyUUID : public view_listener_t +class LLObjectEnableCopyUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = (object != nullptr); @@ -2636,9 +2636,9 @@ class LLObjectEnableCopyUUID : public view_listener_t } }; -class LLObjectCopyUUID : public view_listener_t +class LLObjectCopyUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(object) @@ -2649,9 +2649,9 @@ class LLObjectCopyUUID : public view_listener_t } }; -class LLObjectData : public view_listener_t +class LLObjectData final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); if(object) @@ -2678,9 +2678,9 @@ class LLObjectData : public view_listener_t } }; -class LLSyncAnimations : public view_listener_t +class LLSyncAnimations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { void resync_anims(); resync_anims(); @@ -2688,9 +2688,9 @@ class LLSyncAnimations : public view_listener_t } }; -class LLCanIHasKillEmAll : public view_listener_t +class LLCanIHasKillEmAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); bool new_value = false; @@ -2706,9 +2706,9 @@ class LLCanIHasKillEmAll : public view_listener_t } }; -class LLOHGOD : public view_listener_t +class LLOHGOD final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); bool new_value = false; @@ -2725,9 +2725,9 @@ class LLOHGOD : public view_listener_t } }; -class LLPowerfulWizard : public view_listener_t +class LLPowerfulWizard final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* objpos = LLSelectMgr::getInstance()->getSelection()->getFirstRootObject(); if(objpos) @@ -2761,9 +2761,9 @@ class LLPowerfulWizard : public view_listener_t } }; -class LLKillEmAll : public view_listener_t +class LLKillEmAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // Originally by SimmanFederal // Moved here by a big fat fuckin dog. @@ -2803,9 +2803,9 @@ class LLKillEmAll : public view_listener_t } }; -class LLObjectMeasure : public view_listener_t +class LLObjectMeasure final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { static LLVector3 startMeasurePoint = LLVector3::zero; static bool startpoint_set = false; @@ -2842,9 +2842,9 @@ class LLObjectMeasure : public view_listener_t } }; -class LLObjectPFLinksetsSelected : public view_listener_t +class LLObjectPFLinksetsSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterPathfindingLinksets::openLinksetsWithSelectedObjects(); return true; @@ -2892,18 +2892,18 @@ void handle_go_to(const LLVector3d& pos) LLFirstUse::useGoTo(); } -class LLGoToObject : public view_listener_t +class LLGoToObject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_go_to(LLToolPie::instance().getPick().mPosGlobal); return true; } }; -class LLAvatarReportAbuse : public view_listener_t +class LLAvatarReportAbuse final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(avatar) @@ -2918,9 +2918,9 @@ class LLAvatarReportAbuse : public view_listener_t // Object backup //--------------------------------------------------------------------------- -class LLObjectEnableExport : public view_listener_t +class LLObjectEnableExport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { ExportPolicy export_policy = LFSimFeatureHandler::instance().exportPolicy(); bool can_export_any = false; @@ -2938,36 +2938,36 @@ class LLObjectEnableExport : public view_listener_t } }; -class LLObjectExport : public view_listener_t +class LLObjectExport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectBackup::getInstance()->exportObject(); return true; } }; -class LLObjectEnableImport : public view_listener_t +class LLObjectEnableImport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(TRUE); return true; } }; -class LLObjectImport : public view_listener_t +class LLObjectImport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectBackup::getInstance()->importObject(FALSE); return true; } }; -class LLObjectImportUpload : public view_listener_t +class LLObjectImportUpload final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectBackup::getInstance()->importObject(TRUE); return true; @@ -3033,9 +3033,9 @@ void handle_avatar_freeze(const LLSD& avatar_id) } } -class LLAvatarFreeze : public view_listener_t +class LLAvatarFreeze final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_avatar_freeze(LLUUID::null); return true; @@ -3053,27 +3053,27 @@ void do_script_count(bool del, LLViewerObject* object = nullptr) } } -class LLScriptCount : public view_listener_t +class LLScriptCount final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { do_script_count(false, userdata["data"].asString() == "agent" ? gAgentAvatarp : nullptr); return true; } }; -class LLScriptDelete : public view_listener_t +class LLScriptDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { do_script_count(true); return true; } }; -class LLObjectVisibleScriptCount : public view_listener_t +class LLObjectVisibleScriptCount final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = userdata["data"].asString() == "agent" ? gAgentAvatarp : LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); bool new_value = (object != nullptr); @@ -3083,9 +3083,9 @@ class LLObjectVisibleScriptCount : public view_listener_t } }; -class LLObjectEnableScriptDelete : public view_listener_t +class LLObjectEnableScriptDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { auto objects = LLSelectMgr::getInstance()->getSelection(); LLViewerObject* object = objects->getPrimaryObject(); @@ -3108,18 +3108,18 @@ class LLObjectEnableScriptDelete : public view_listener_t } }; -class LLAvatarVisibleDebug : public view_listener_t +class LLAvatarVisibleDebug final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.isGodlike()); return true; } }; -class LLAvatarDebug : public view_listener_t +class LLAvatarDebug final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (isAgentAvatarValid()) { @@ -3256,9 +3256,9 @@ void handle_avatar_eject(const LLSD& avatar_id) } } -class LLAvatarEject : public view_listener_t +class LLAvatarEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_avatar_eject(LLUUID::null); return true; @@ -3266,9 +3266,9 @@ class LLAvatarEject : public view_listener_t }; -class LLAvatarCopyUUID : public view_listener_t +class LLAvatarCopyUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(!avatar) return true; @@ -3278,9 +3278,9 @@ class LLAvatarCopyUUID : public view_listener_t } }; -class LLAvatarClientUUID : public view_listener_t +class LLAvatarClientUUID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); if(!avatar) return true; @@ -3324,18 +3324,18 @@ bool enable_freeze_eject(const LLSD& avatar_id) return new_value; } -class LLAvatarEnableFreezeEject : public view_listener_t +class LLAvatarEnableFreezeEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_freeze_eject(LLUUID::null)); return true; } }; -class LLAvatarGiveCard : public view_listener_t +class LLAvatarGiveCard final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LL_INFOS() << "handle_give_card()" << LL_ENDL; LLViewerObject* dest = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); @@ -3453,9 +3453,9 @@ bool enable_buy_object() } -class LLObjectEnableBuy : public view_listener_t +class LLObjectEnableBuy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = enable_buy_object(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -3576,9 +3576,9 @@ void handle_dump_focus(void *) LL_INFOS() << "Keyboard focus " << (ctrl ? ctrl->getName() : "(none)") << LL_ENDL; } -class LLSelfSitOrStand : public view_listener_t +class LLSelfSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.stopAutoPilot(true); if (gAgentAvatarp && gAgentAvatarp->isSitting()) @@ -3612,9 +3612,9 @@ bool enable_sitdown_self() // return isAgentAvatarValid() && !gAgentAvatarp->isSitting() && !gAgent.getFlying(); } -class LLSelfEnableSitOrStand : public view_listener_t +class LLSelfEnableSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string label; std::string sit_text; @@ -3751,7 +3751,7 @@ void handle_fake_away_status(void*) // /* -class LLHaveCallingcard : public LLInventoryCollectFunctor +class LLHaveCallingcard final : public LLInventoryCollectFunctor { public: LLHaveCallingcard(const LLUUID& agent_id); @@ -3797,9 +3797,9 @@ BOOL is_agent_mappable(const LLUUID& agent_id) // Enable a menu item when you don't have someone's card. -class LLAvatarEnableAddFriend : public view_listener_t +class LLAvatarEnableAddFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); // bool new_value = avatar && !LLAvatarActions::isFriend(avatar->getID()); @@ -3836,9 +3836,9 @@ void request_friendship(const LLUUID& dest_id) } -class LLEditEnableCustomizeAvatar : public view_listener_t +class LLEditEnableCustomizeAvatar final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gAgentAvatarp && gAgentAvatarp->isFullyLoaded() && @@ -3849,9 +3849,9 @@ class LLEditEnableCustomizeAvatar : public view_listener_t }; -class LLEditEnableChangeDisplayname : public view_listener_t +class LLEditEnableChangeDisplayname final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarName::useDisplayNames()); return true; @@ -3938,9 +3938,9 @@ void handle_object_sit_or_stand() handle_object_sit(object, pick.mObjectOffset); } -class LLObjectSitOrStand : public view_listener_t +class LLObjectSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_object_sit_or_stand(); return true; @@ -3960,9 +3960,9 @@ void near_sit_down_point(BOOL success, void *) } } -class LLLandSit : public view_listener_t +class LLLandSit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.2.1f) | Modified: RLVa-1.2.1f if ( (rlv_handler_t::isEnabled()) && ((!RlvActions::canStand()) || (gRlvHandler.hasBehaviour(RLV_BHVR_SIT))) ) @@ -3988,28 +3988,28 @@ class LLLandSit : public view_listener_t } }; -class LLCreateLandmarkCallback : public LLInventoryCallback +class LLCreateLandmarkCallback final : public LLInventoryCallback { public: - /*virtual*/ void fire(const LLUUID& inv_item) + void fire(const LLUUID& inv_item) override { LL_INFOS() << "Created landmark with inventory id " << inv_item << LL_ENDL; } }; -class LLWorldFly : public view_listener_t +class LLWorldFly final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.toggleFlying(); return true; } }; -class LLWorldEnableFly : public view_listener_t +class LLWorldEnableFly final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.enableFlying()); return true; @@ -4101,9 +4101,9 @@ void handle_reset_view() } } -class LLViewResetView : public view_listener_t +class LLViewResetView final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_reset_view(); return true; @@ -4146,36 +4146,36 @@ void reset_view_final( BOOL proceed ) } -class LLViewResetPresetAngles : public view_listener_t +class LLViewResetPresetAngles final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgentCamera.resetPresetOffsets(); return true; } }; -class LLViewLookAtLastChatter : public view_listener_t +class LLViewLookAtLastChatter final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgentCamera.lookAtLastChat(); return true; } }; -class LLViewFullscreen : public view_listener_t +class LLViewFullscreen final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gViewerWindow->toggleFullscreen(TRUE); return true; } }; -class LLViewDefaultUISize : public view_listener_t +class LLViewDefaultUISize final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gSavedSettings.setF32("UIScaleFactor", 1.0f); gSavedSettings.setBOOL("UIAutoScale", FALSE); @@ -4184,9 +4184,9 @@ class LLViewDefaultUISize : public view_listener_t } }; -class LLEditDuplicate : public view_listener_t +class LLEditDuplicate final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_REZ)) && @@ -4204,9 +4204,9 @@ class LLEditDuplicate : public view_listener_t } }; -class LLEditEnableDuplicate : public view_listener_t +class LLEditEnableDuplicate final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDuplicate(); // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) @@ -4628,9 +4628,9 @@ static void derez_objects(EDeRezDestination dest, const LLUUID& dest_id) derez_objects(dest, dest_id, first_region, error, nullptr); } -class LLToolsTakeCopy : public view_listener_t +class LLToolsTakeCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_take_copy(); return true; @@ -4657,13 +4657,13 @@ void handle_take_copy() } // You can return an object to its owner if it is on your land. -class LLObjectReturn : public view_listener_t +class LLObjectReturn final : public view_listener_t { public: LLObjectReturn() : mFirstRegion(nullptr) {} private: - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) return true; // [RLVa:KB] - Checked: 2010-03-24 (RLVa-1.4.0a) | Modified: RLVa-1.0.0b @@ -4707,9 +4707,9 @@ private: // Allow return to owner if one or more of the selected items is // over land you own. -class LLObjectEnableReturn : public view_listener_t +class LLObjectEnableReturn final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LLSelectMgr::getInstance()->getSelection()->isEmpty()) { @@ -4942,9 +4942,9 @@ void handle_buy_or_take() } } -class LLToolsBuyOrTake : public view_listener_t +class LLToolsBuyOrTake final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_buy_or_take(); return true; @@ -4956,9 +4956,9 @@ bool visible_take_object() return !is_selection_buy_not_take() && enable_take(); } -class LLToolsEnableBuyOrTake : public view_listener_t +class LLToolsEnableBuyOrTake final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool is_buy = is_selection_buy_not_take(); bool new_value = is_buy ? enable_buy_object() : enable_take(); @@ -5092,9 +5092,9 @@ void handle_buy() } } -class LLObjectBuy : public view_listener_t +class LLObjectBuy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_buy(); return true; @@ -5141,9 +5141,9 @@ BOOL sitting_on_selection() return (gAgentAvatarp->isSitting() && gAgentAvatarp->getRoot() == root_object); } -class LLToolsSaveToInventory : public view_listener_t +class LLToolsSaveToInventory final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool enable_save_into_inventory(); if(enable_save_into_inventory()) @@ -5154,9 +5154,9 @@ class LLToolsSaveToInventory : public view_listener_t } }; -class LLToolsSaveToObjectInventory : public view_listener_t +class LLToolsSaveToObjectInventory final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectNode* node = LLSelectMgr::getInstance()->getSelection()->getFirstRootNode(); if(node && (node->mValid) && (!node->mFromTaskID.isNull())) @@ -5168,25 +5168,25 @@ class LLToolsSaveToObjectInventory : public view_listener_t } }; -class LLToolsEnablePathfinding : public view_listener_t +class LLToolsEnablePathfinding final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return (LLPathfindingManager::getInstance() != nullptr) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion(); } }; -class LLToolsEnablePathfindingView : public view_listener_t +class LLToolsEnablePathfindingView final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return (LLPathfindingManager::getInstance() != nullptr) && LLPathfindingManager::getInstance()->isPathfindingEnabledForCurrentRegion() && LLPathfindingManager::getInstance()->isPathfindingViewEnabled(); } }; -class LLToolsDoPathfindingRebakeRegion : public view_listener_t +class LLToolsDoPathfindingRebakeRegion final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool hasPathfinding = (LLPathfindingManager::getInstance() != nullptr); @@ -5199,9 +5199,9 @@ class LLToolsDoPathfindingRebakeRegion : public view_listener_t } }; -class LLToolsEnablePathfindingRebakeRegion : public view_listener_t +class LLToolsEnablePathfindingRebakeRegion final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool returnValue = false; @@ -5217,9 +5217,9 @@ class LLToolsEnablePathfindingRebakeRegion : public view_listener_t }; // Round the position of all root objects to the grid -class LLToolsSnapObjectXY : public view_listener_t +class LLToolsSnapObjectXY final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { F64 snap_size = (F64)gSavedSettings.getF32("GridResolution"); @@ -5264,9 +5264,9 @@ class LLToolsSnapObjectXY : public view_listener_t }; // Determine if the option to cycle between linked prims is shown -class LLToolsEnableSelectNextPart : public view_listener_t +class LLToolsEnableSelectNextPart final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gSavedSettings.getBOOL("EditLinkedParts") && !LLSelectMgr::getInstance()->getSelection()->isEmpty()); @@ -5278,9 +5278,9 @@ class LLToolsEnableSelectNextPart : public view_listener_t // Cycle selection through linked children in selected object. // FIXME: Order of children list is not always the same as sim's idea of link order. This may confuse // resis. Need link position added to sim messages to address this. -class LLToolsSelectNextPart : public view_listener_t +class LLToolsSelectNextPart final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { S32 object_count = LLSelectMgr::getInstance()->getSelection()->getObjectCount(); if (gSavedSettings.getBOOL("EditLinkedParts") && object_count) @@ -5362,9 +5362,9 @@ class LLToolsSelectNextPart : public view_listener_t // otherwise. this allows the handle_link method to more finely check // the selection and give an error message when the uer has a // reasonable expectation for the link to work, but it will fail. -class LLToolsEnableLink : public view_listener_t +class LLToolsEnableLink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLSelectMgr::getInstance()->enableLinkObjects(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5372,17 +5372,17 @@ class LLToolsEnableLink : public view_listener_t } }; -class LLToolsLink : public view_listener_t +class LLToolsLink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return LLSelectMgr::getInstance()->linkObjects(); } }; -class LLToolsEnableUnlink : public view_listener_t +class LLToolsEnableUnlink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLSelectMgr::getInstance()->enableUnlinkObjects(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5390,9 +5390,9 @@ class LLToolsEnableUnlink : public view_listener_t } }; -class LLToolsUnlink : public view_listener_t +class LLToolsUnlink final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::getInstance()->unlinkObjects(); return true; @@ -5400,18 +5400,18 @@ class LLToolsUnlink : public view_listener_t }; -class LLToolsStopAllAnimations : public view_listener_t +class LLToolsStopAllAnimations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.stopCurrentAnimations(); return true; } }; -class LLToolsReleaseKeys : public view_listener_t +class LLToolsReleaseKeys final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a | OK if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedAttachmentPoint(RLV_LOCK_REMOVE)) ) @@ -5423,9 +5423,9 @@ class LLToolsReleaseKeys : public view_listener_t } }; -class LLToolsEnableReleaseKeys : public view_listener_t +class LLToolsEnableReleaseKeys final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a gMenuHolder->findControl(userdata["control"].asString())->setValue(gAgent.anyControlGrabbed() && @@ -5437,9 +5437,9 @@ class LLToolsEnableReleaseKeys : public view_listener_t }; -class LLEditEnableCut : public view_listener_t +class LLEditEnableCut final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canCut(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5447,9 +5447,9 @@ class LLEditEnableCut : public view_listener_t } }; -class LLEditCut : public view_listener_t +class LLEditCut final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5459,9 +5459,9 @@ class LLEditCut : public view_listener_t } }; -class LLEditEnableCopy : public view_listener_t +class LLEditEnableCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canCopy(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5469,9 +5469,9 @@ class LLEditEnableCopy : public view_listener_t } }; -class LLEditCopy : public view_listener_t +class LLEditCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5481,9 +5481,9 @@ class LLEditCopy : public view_listener_t } }; -class LLEditEnablePaste : public view_listener_t +class LLEditEnablePaste final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canPaste(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5491,9 +5491,9 @@ class LLEditEnablePaste : public view_listener_t } }; -class LLEditPaste : public view_listener_t +class LLEditPaste final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5503,9 +5503,9 @@ class LLEditPaste : public view_listener_t } }; -class LLEditEnableDelete : public view_listener_t +class LLEditEnableDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDoDelete(); @@ -5522,9 +5522,9 @@ class LLEditEnableDelete : public view_listener_t } }; -class LLEditDelete : public view_listener_t +class LLEditDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) // NOTE: we want to disable delete on objects but not disable delete on text @@ -5558,9 +5558,9 @@ bool enable_object_return() (gAgent.isGodlike() || can_derez(DRD_RETURN_TO_OWNER))); } -class LLObjectEnableDelete : public view_listener_t +class LLObjectEnableDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_delete()); return true; @@ -5631,9 +5631,9 @@ void handle_object_return() } } -class LLObjectDelete : public view_listener_t +class LLObjectDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-05 (RLVa-1.0.0b) if ( (rlv_handler_t::isEnabled()) && (!rlvCanDeleteOrReturn()) ) @@ -5667,9 +5667,9 @@ void handle_force_delete(void*) LLSelectMgr::getInstance()->selectForceDelete(); } -class LLViewEnableJoystickFlycam : public view_listener_t +class LLViewEnableJoystickFlycam final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gSavedSettings.getBOOL("JoystickEnabled") && gSavedSettings.getBOOL("JoystickFlycamEnabled")); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5677,9 +5677,9 @@ class LLViewEnableJoystickFlycam : public view_listener_t } }; -class LLViewEnableLastChatter : public view_listener_t +class LLViewEnableLastChatter final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // *TODO: add check that last chatter is in range bool new_value = (gAgentCamera.cameraThirdPerson() && gAgent.getLastChatter().notNull()); @@ -5688,9 +5688,9 @@ class LLViewEnableLastChatter : public view_listener_t } }; -class LLEditEnableDeselect : public view_listener_t +class LLEditEnableDeselect final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canDeselect(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5698,9 +5698,9 @@ class LLEditEnableDeselect : public view_listener_t } }; -class LLEditDeselect : public view_listener_t +class LLEditDeselect final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5710,9 +5710,9 @@ class LLEditDeselect : public view_listener_t } }; -class LLEditEnableSelectAll : public view_listener_t +class LLEditEnableSelectAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canSelectAll(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5721,9 +5721,9 @@ class LLEditEnableSelectAll : public view_listener_t }; -class LLEditSelectAll : public view_listener_t +class LLEditSelectAll final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler ) { @@ -5734,9 +5734,9 @@ class LLEditSelectAll : public view_listener_t }; -class LLEditEnableUndo : public view_listener_t +class LLEditEnableUndo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canUndo(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5744,9 +5744,9 @@ class LLEditEnableUndo : public view_listener_t } }; -class LLEditUndo : public view_listener_t +class LLEditUndo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canUndo() ) { @@ -5756,9 +5756,9 @@ class LLEditUndo : public view_listener_t } }; -class LLEditEnableRedo : public view_listener_t +class LLEditEnableRedo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canRedo(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5766,9 +5766,9 @@ class LLEditEnableRedo : public view_listener_t } }; -class LLEditRedo : public view_listener_t +class LLEditRedo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if( LLEditMenuHandler::gEditMenuHandler && LLEditMenuHandler::gEditMenuHandler->canRedo() ) { @@ -5895,9 +5895,9 @@ void handle_reload_settings(void*) gColors.loadFromFileLegacy(color_file, FALSE, TYPE_COL4U); } -class LLWorldSetHomeLocation : public view_listener_t +class LLWorldSetHomeLocation final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // we just send the message and let the server check for failure cases // server will echo back a "Home position set." alert if it succeeds @@ -5907,9 +5907,9 @@ class LLWorldSetHomeLocation : public view_listener_t } }; -class LLWorldTeleportHome : public view_listener_t +class LLWorldTeleportHome final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.teleportHome(); return true; @@ -5922,27 +5922,27 @@ void toggle_sit() gAgent.setControlFlags(gAgentAvatarp->isSitting() ? AGENT_CONTROL_STAND_UP : AGENT_CONTROL_SIT_ON_GROUND); } -class LLWorldSitOnGround : public view_listener_t +class LLWorldSitOnGround final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { toggle_sit(); return true; } }; -class LLWorldFakeAway : public view_listener_t +class LLWorldFakeAway final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_fake_away_status(nullptr); return true; } }; -class LLWorldEnableSitOnGround : public view_listener_t +class LLWorldEnableSitOnGround final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = (gAgentAvatarp); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -5950,9 +5950,9 @@ class LLWorldEnableSitOnGround : public view_listener_t } }; -class LLWorldSetAway : public view_listener_t +class LLWorldSetAway final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (gAgent.getAFK()) { @@ -5966,9 +5966,9 @@ class LLWorldSetAway : public view_listener_t } }; -class LLWorldSetBusy : public view_listener_t +class LLWorldSetBusy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool busy = !gAgent.isDoNotDisturb(); gAgent.setDoNotDisturb(busy); @@ -5978,9 +5978,9 @@ class LLWorldSetBusy : public view_listener_t } }; -class LLWorldCreateLandmark : public view_listener_t +class LLWorldCreateLandmark final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-09-28 (RLVa-1.4.5) | Added: RLVa-1.0.0 if (gRlvHandler.hasBehaviour(RLV_BHVR_SHOWLOC)) @@ -6022,9 +6022,9 @@ class LLWorldCreateLandmark : public view_listener_t } }; -class LLToolsLookAtSelection : public view_listener_t +class LLToolsLookAtSelection final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_look_at_selection(userdata); return true; @@ -6069,9 +6069,9 @@ void handle_look_at_selection(const LLSD& param) } } -class LLAvatarInviteToGroup : public view_listener_t +class LLAvatarInviteToGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); // if(avatar) @@ -6085,9 +6085,9 @@ class LLAvatarInviteToGroup : public view_listener_t } }; -class LLAvatarAddFriend : public view_listener_t +class LLAvatarAddFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); // if(avatar && !LLAvatarActions::isFriend(avatar->getID())) @@ -6101,9 +6101,9 @@ class LLAvatarAddFriend : public view_listener_t } }; -class LLAvatarResetSkeleton: public view_listener_t +class LLAvatarResetSkeleton final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); if (avatar) @@ -6114,9 +6114,9 @@ class LLAvatarResetSkeleton: public view_listener_t } }; -class LLAvatarEnableResetSkeleton: public view_listener_t +class LLAvatarEnableResetSkeleton final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); return avatar != nullptr; @@ -6124,9 +6124,9 @@ class LLAvatarEnableResetSkeleton: public view_listener_t }; -class LLAvatarResetSkeletonAndAnimations : public view_listener_t +class LLAvatarResetSkeletonAndAnimations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); if (avatar) @@ -6188,9 +6188,9 @@ void handle_give_money_dialog(LLViewerObject* obj) } } -class LLPayObject : public view_listener_t +class LLPayObject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_give_money_dialog(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject()); return true; @@ -6267,9 +6267,9 @@ bool enable_object_sit(/*LLUICtrl* ctrl*/) return !sitting_on_sel && is_object_sittable(); } -class LLObjectEnableSitOrStand : public view_listener_t +class LLObjectEnableSitOrStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value; @@ -6310,9 +6310,9 @@ class LLObjectEnableSitOrStand : public view_listener_t } }; -class LLEnablePayObject : public view_listener_t +class LLEnablePayObject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_pay_avatar() || enable_pay_object(LLSelectMgr::getInstance()->getSelection()->getPrimaryObject())); return true; @@ -6352,9 +6352,9 @@ void handle_viewer_disable_message_log(void*) // TomY TODO: Move! void show_floater(const std::string& floater_name); -class LLShowFloater : public view_listener_t +class LLShowFloater final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_floater(userdata.asString()); return true; @@ -6362,9 +6362,9 @@ class LLShowFloater : public view_listener_t }; bool floater_visible(const std::string& floater_name); -class LLFloaterVisible : public view_listener_t +class LLFloaterVisible final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(floater_visible(userdata["data"].asString())); return true; @@ -6382,9 +6382,9 @@ bool callback_show_url(const LLSD& notification, const LLSD& response) return false; } -class LLPromptShowURL : public view_listener_t +class LLPromptShowURL final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string param = userdata.asString(); std::string::size_type offset = param.find(","); @@ -6422,9 +6422,9 @@ bool callback_show_file(const LLSD& notification, const LLSD& response) return false; } -class LLPromptShowFile : public view_listener_t +class LLPromptShowFile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string param = userdata.asString(); std::string::size_type offset = param.find(","); @@ -6445,9 +6445,9 @@ class LLPromptShowFile : public view_listener_t } }; -class LLShowAgentProfile : public view_listener_t +class LLShowAgentProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLUUID agent_id; if (userdata.asString() == "agent") @@ -6479,9 +6479,9 @@ class LLShowAgentProfile : public view_listener_t } }; -class LLLandEdit : public view_listener_t +class LLLandEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2009-07-04 (RLVa-1.0.0b) if ( (rlv_handler_t::isEnabled()) && (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) ) @@ -6516,9 +6516,9 @@ class LLLandEdit : public view_listener_t } }; -class LLWorldEnableBuyLand : public view_listener_t +class LLWorldEnableBuyLand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLViewerParcelMgr::getInstance()->canAgentBuyParcel( LLViewerParcelMgr::getInstance()->selectionEmpty() @@ -6536,9 +6536,9 @@ BOOL enable_buy_land(void*) LLViewerParcelMgr::getInstance()->getParcelSelection()->getParcel(), false); } -class LLWorldVisibleDestinations : public view_listener_t +class LLWorldVisibleDestinations final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool visible(!LFSimFeatureHandler::instance().destinationGuideURL().empty()); gMenuHolder->findControl(userdata["control"].asString())->setValue(visible); @@ -6546,14 +6546,14 @@ class LLWorldVisibleDestinations : public view_listener_t } }; -class LLObjectAttachToAvatar : public view_listener_t +class LLObjectAttachToAvatar final : public view_listener_t { public: LLObjectAttachToAvatar(bool replace) : mReplace(replace) {} static void setObjectSelection(LLObjectSelectionHandle selection) { sObjectSelection = selection; } private: - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { setObjectSelection(LLSelectMgr::getInstance()->getSelection()); LLViewerObject* selectedObject = sObjectSelection->getFirstRootObject(); @@ -6716,9 +6716,9 @@ void callback_attachment_drop(const LLSD& notification, const LLSD& response) return; } -class LLAttachmentDrop : public view_listener_t +class LLAttachmentDrop final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-03-15 (RLVa-1.2.0e) | Modified: RLVa-1.0.5 if (rlv_handler_t::isEnabled()) @@ -6833,9 +6833,9 @@ void detach_label(std::string& label, void* user_data) } } -class LLAttachmentDetach : public view_listener_t +class LLAttachmentDetach final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // Called when the user clicked on an object attached to them // and selected "Detach". @@ -6888,7 +6888,7 @@ class LLAttachmentDetach : public view_listener_t //Adding an observer for a Jira 2422 and needs to be a fetch observer //for Jira 3119 -class LLWornItemFetchedObserver : public LLInventoryFetchItemsObserver +class LLWornItemFetchedObserver final : public LLInventoryFetchItemsObserver { public: LLWornItemFetchedObserver(const LLUUID& worn_item_id) : @@ -6906,9 +6906,9 @@ protected: }; // You can only drop items on parcels where you can build. -class LLAttachmentEnableDrop : public view_listener_t +class LLAttachmentEnableDrop final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL can_build = gAgent.isGodlike() || (LLViewerParcelMgr::getInstance()->allowAgentBuild()); @@ -7005,9 +7005,9 @@ BOOL enable_detach(const LLSD&) return FALSE; } -class LLAttachmentEnableDetach : public view_listener_t +class LLAttachmentEnableDetach final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = enable_detach(); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7096,9 +7096,9 @@ BOOL object_is_wearable() // Also for seeing if object can be attached. See above. -class LLObjectEnableWear : public view_listener_t +class LLObjectEnableWear final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool is_wearable = object_selected_and_point_valid(nullptr); gMenuHolder->findControl(userdata["control"].asString())->setValue(is_wearable); @@ -7120,9 +7120,9 @@ BOOL object_attached(void *user_data) // return attachment->getNumObjects() > 0; } -class LLAvatarSendIM : public view_listener_t +class LLAvatarSendIM final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLVOAvatar* avatar = find_avatar_from_object( LLSelectMgr::getInstance()->getSelection()->getPrimaryObject() ); // if(avatar) @@ -7198,9 +7198,9 @@ void queue_actions(LLFloaterScriptQueue* q, const std::string& msg) } } -class LLToolsSelectedScriptAction : public view_listener_t +class LLToolsSelectedScriptAction final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.0f) | Modified: RLVa-1.0.5a // We'll allow resetting the scripts of objects on a non-attachable attach point since they wouldn't be able to circumvent anything @@ -7423,9 +7423,9 @@ void menu_toggle_double_click_control(void* user_data) // these are used in the gl menus to set control values, generically. -class LLToggleControl : public view_listener_t +class LLToggleControl final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLControlVariable* control(gSavedSettings.getControl(userdata.asString())); control->set(!control->get()); @@ -7433,9 +7433,9 @@ class LLToggleControl : public view_listener_t } }; -class LLTogglePerAccountControl : public view_listener_t +class LLTogglePerAccountControl final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLControlVariable* control(gSavedPerAccountSettings.getControl(userdata.asString())); control->set(!control->get()); @@ -7478,9 +7478,9 @@ void menu_toggle_attached_particles(void* user_data) LLPipeline::sRenderAttachedParticles = gSavedSettings.getBOOL("RenderAttachedParticles"); } -class LLSomethingSelected : public view_listener_t +class LLSomethingSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = !(LLSelectMgr::getInstance()->getSelection()->isEmpty()); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7488,9 +7488,9 @@ class LLSomethingSelected : public view_listener_t } }; -class LLSomethingSelectedNoHUD : public view_listener_t +class LLSomethingSelectedNoHUD final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLObjectSelectionHandle selection = LLSelectMgr::getInstance()->getSelection(); bool new_value = !(selection->isEmpty()) && !(selection->getSelectType() == SELECT_TYPE_HUD); @@ -7525,18 +7525,18 @@ static bool is_editable_selected() return (LLSelectMgr::getInstance()->getSelection()->getFirstEditableObject() != nullptr); } -class LLEditableSelected : public view_listener_t +class LLEditableSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(is_editable_selected()); return true; } }; -class LLEditableSelectedMono : public view_listener_t +class LLEditableSelectedMono final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerRegion* region = gAgent.getRegion(); if(region && gMenuHolder && gMenuHolder->findControl(userdata["control"].asString())) @@ -7550,9 +7550,9 @@ class LLEditableSelectedMono : public view_listener_t } }; -class LLToolsEnableTakeCopy : public view_listener_t +class LLToolsEnableTakeCopy final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(enable_object_take_copy()); return true; @@ -7573,9 +7573,9 @@ bool enable_object_take_copy() || !gAgent.isGodlike()) # endif { - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* obj) + bool apply(LLViewerObject* obj) override { // return (!obj->permCopy() || obj->isAttachment()); // [RLVa:KB] - Checked: 2010-04-01 (RLVa-1.2.0c) | Modified: RLVa-1.0.0g @@ -7596,17 +7596,17 @@ bool enable_object_take_copy() } // -class LLToolsEnableAdminDelete : public view_listener_t +class LLToolsEnableAdminDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerObject* object = LLSelectMgr::getInstance()->getSelection()->getPrimaryObject(); return (object != nullptr); } }; -class LLToolsAdminDelete : public view_listener_t +class LLToolsAdminDelete final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::getInstance()->selectForceDelete(); return true; @@ -7618,9 +7618,9 @@ BOOL enable_selection_you_own_all(void*) { if (LLSelectMgr::getInstance()) { - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* obj) + bool apply(LLViewerObject* obj) override { return (!obj->permYouOwner()); } @@ -7639,9 +7639,9 @@ BOOL enable_selection_you_own_one(void*) { if (LLSelectMgr::getInstance()) { - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* obj) + virtual bool apply(LLViewerObject* obj) override { return (obj->permYouOwner()); } @@ -7656,7 +7656,7 @@ BOOL enable_selection_you_own_one(void*) return TRUE; } -class LLHasAsset : public LLInventoryCollectFunctor +class LLHasAsset final : public LLInventoryCollectFunctor { public: LLHasAsset(const LLUUID& id) : mAssetID(id), mHasAsset(FALSE) {} @@ -7731,9 +7731,9 @@ BOOL enable_save_into_task_inventory(void*) return FALSE; } -class LLToolsEnableSaveToObjectInventory : public view_listener_t +class LLToolsEnableSaveToObjectInventory final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = enable_save_into_task_inventory(nullptr); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7742,9 +7742,9 @@ class LLToolsEnableSaveToObjectInventory : public view_listener_t }; -class LLViewEnableMouselook : public view_listener_t +class LLViewEnableMouselook final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // You can't go directly from customize avatar to mouselook. // TODO: write code with appropriate dialogs to handle this transition. @@ -7754,9 +7754,9 @@ class LLViewEnableMouselook : public view_listener_t } }; -class LLToolsEnableToolNotPie : public view_listener_t +class LLToolsEnableToolNotPie final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = ( LLToolMgr::getInstance()->getBaseTool() != LLToolPie::getInstance() ); gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -7764,9 +7764,9 @@ class LLToolsEnableToolNotPie : public view_listener_t } }; -class LLWorldEnableCreateLandmark : public view_listener_t +class LLWorldEnableCreateLandmark final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = gAgent.isGodlike() || (gAgent.getRegion() && gAgent.getRegion()->getAllowLandmark()); @@ -7778,9 +7778,9 @@ class LLWorldEnableCreateLandmark : public view_listener_t } }; -class LLWorldEnableSetHomeLocation : public view_listener_t +class LLWorldEnableSetHomeLocation final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = gAgent.isGodlike() || (gAgent.getRegion() && gAgent.getRegion()->getAllowSetHome()); @@ -7789,9 +7789,9 @@ class LLWorldEnableSetHomeLocation : public view_listener_t } }; -class LLWorldEnableTeleportHome : public view_listener_t +class LLWorldEnableTeleportHome final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerRegion* regionp = gAgent.getRegion(); bool agent_on_prelude = (regionp && regionp->isPrelude()); @@ -7836,9 +7836,9 @@ BOOL check_show_xui_names(void *) return gSavedSettings.getBOOL("ShowXUINames"); } -class LLToolsSelectOnlyMyObjects : public view_listener_t +class LLToolsSelectOnlyMyObjects final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL cur_val = gSavedSettings.getBOOL("SelectOwnedOnly"); @@ -7848,9 +7848,9 @@ class LLToolsSelectOnlyMyObjects : public view_listener_t } }; -class LLToolsSelectOnlyMovableObjects : public view_listener_t +class LLToolsSelectOnlyMovableObjects final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL cur_val = gSavedSettings.getBOOL("SelectMovableOnly"); @@ -7860,9 +7860,9 @@ class LLToolsSelectOnlyMovableObjects : public view_listener_t } }; -class LLToolsSelectBySurrounding : public view_listener_t +class LLToolsSelectBySurrounding final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::sRectSelectInclusive = !LLSelectMgr::sRectSelectInclusive; @@ -7871,9 +7871,9 @@ class LLToolsSelectBySurrounding : public view_listener_t } }; -class LLToolsShowSelectionHighlights : public view_listener_t +class LLToolsShowSelectionHighlights final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLControlVariable *ctrl = gSavedSettings.getControl("RenderHighlightSelections"); ctrl->setValue(!ctrl->getValue().asBoolean()); @@ -7881,9 +7881,9 @@ class LLToolsShowSelectionHighlights : public view_listener_t } }; -class LLToolsShowHiddenSelection : public view_listener_t +class LLToolsShowHiddenSelection final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // TomY TODO Merge these LLSelectMgr::sRenderHiddenSelections = !LLSelectMgr::sRenderHiddenSelections; @@ -7893,9 +7893,9 @@ class LLToolsShowHiddenSelection : public view_listener_t } }; -class LLToolsShowSelectionLightRadius : public view_listener_t +class LLToolsShowSelectionLightRadius final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // TomY TODO merge these LLSelectMgr::sRenderLightRadius = !LLSelectMgr::sRenderLightRadius; @@ -7905,9 +7905,9 @@ class LLToolsShowSelectionLightRadius : public view_listener_t } }; -class LLToolsEditLinkedParts : public view_listener_t +class LLToolsEditLinkedParts final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL select_individuals = gSavedSettings.getBOOL("EditLinkedParts"); if (select_individuals) @@ -8432,14 +8432,14 @@ void force_error_driver_crash(void *) LLAppViewer::instance()->forceErrorDriverCrash(); } -class LLToolsUseSelectionForGrid : public view_listener_t +class LLToolsUseSelectionForGrid final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLSelectMgr::getInstance()->clearGridObjects(); - struct f : public LLSelectedObjectFunctor + struct f final : public LLSelectedObjectFunctor { - virtual bool apply(LLViewerObject* objectp) + bool apply(LLViewerObject* objectp) override { LLSelectMgr::getInstance()->addGridObject(objectp); return true; @@ -8613,18 +8613,18 @@ BOOL get_visibility(void* user_data) } // TomY TODO: Get rid of these? -class LLViewShowHoverTips : public view_listener_t +class LLViewShowHoverTips final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLHoverView::sShowHoverTips = !LLHoverView::sShowHoverTips; return true; } }; -class LLViewCheckShowHoverTips : public view_listener_t +class LLViewCheckShowHoverTips final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLHoverView::sShowHoverTips; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -8633,9 +8633,9 @@ class LLViewCheckShowHoverTips : public view_listener_t }; // TomY TODO: Get rid of these? -class LLViewHighlightTransparent : public view_listener_t +class LLViewHighlightTransparent final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-11 (RLVa-1.2.0e) | Modified: RLVa-1.0.0b | OK if ( (gRlvHandler.hasBehaviour(RLV_BHVR_EDIT)) && (!LLDrawPoolAlpha::sShowDebugAlpha)) @@ -8647,9 +8647,9 @@ class LLViewHighlightTransparent : public view_listener_t } }; -class LLViewCheckHighlightTransparent : public view_listener_t +class LLViewCheckHighlightTransparent final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLDrawPoolAlpha::sShowDebugAlpha; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -8657,9 +8657,9 @@ class LLViewCheckHighlightTransparent : public view_listener_t } }; -class LLViewToggleRenderType : public view_listener_t +class LLViewToggleRenderType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string type = userdata.asString(); if (type == "hideparticles") @@ -8670,9 +8670,9 @@ class LLViewToggleRenderType : public view_listener_t } }; -class LLViewCheckRenderType : public view_listener_t +class LLViewCheckRenderType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string type = userdata["data"].asString(); bool new_value = false; @@ -8685,9 +8685,9 @@ class LLViewCheckRenderType : public view_listener_t } }; -class LLViewShowHUDAttachments : public view_listener_t +class LLViewShowHUDAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-04-19 (RLVa-1.2.1a) | Modified: RLVa-1.0.0c if ( (rlv_handler_t::isEnabled()) && (gRlvAttachmentLocks.hasLockedHUD()) && (LLPipeline::sShowHUDAttachments) ) @@ -8699,9 +8699,9 @@ class LLViewShowHUDAttachments : public view_listener_t } }; -class LLViewCheckHUDAttachments : public view_listener_t +class LLViewCheckHUDAttachments final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = LLPipeline::sShowHUDAttachments; gMenuHolder->findControl(userdata["control"].asString())->setValue(new_value); @@ -8709,9 +8709,9 @@ class LLViewCheckHUDAttachments : public view_listener_t } }; -class LLEditEnableTakeOff : public view_listener_t +class LLEditEnableTakeOff final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_value = false; std::string control_name = userdata["control"].asString(); @@ -8731,9 +8731,9 @@ class LLEditEnableTakeOff : public view_listener_t } }; -class LLEditTakeOff : public view_listener_t +class LLEditTakeOff final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string clothing = userdata.asString(); if (clothing == "all") @@ -8771,9 +8771,9 @@ class LLEditTakeOff : public view_listener_t } }; -class LLToolsSelectTool : public view_listener_t +class LLToolsSelectTool final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::string tool_name = userdata.asString(); if (tool_name == "focus") @@ -8801,9 +8801,9 @@ class LLToolsSelectTool : public view_listener_t }; /// WINDLIGHT callbacks -class LLWorldEnvSettings : public view_listener_t +class LLWorldEnvSettings final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { // [RLVa:KB] - Checked: 2010-03-18 (RLVa-1.2.0a) | Modified: RLVa-1.0.0g if (gRlvHandler.hasBehaviour(RLV_BHVR_SETENV)) @@ -8837,9 +8837,9 @@ class LLWorldEnvSettings : public view_listener_t } }; -class LLWorldEnableEnvSettings : public view_listener_t +class LLWorldEnableEnvSettings final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool result = false; std::string tod = userdata.asString(); @@ -8876,26 +8876,26 @@ class LLWorldEnableEnvSettings : public view_listener_t } }; -class SinguCloseAllDialogs : public view_listener_t +class SinguCloseAllDialogs final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gNotifyBoxView->deleteAllChildren(); return true; } }; -class SinguEnableStreamingAudioDisplay : public view_listener_t +class SinguEnableStreamingAudioDisplay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { return handle_ticker_enabled(nullptr); } }; -class SinguPoseStand : public view_listener_t +class SinguPoseStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (current_pose.isNull()) set_current_pose("038fcec9-5ebd-8a8e-0e2e-6e71a0a1ac53"); @@ -8905,27 +8905,27 @@ class SinguPoseStand : public view_listener_t } }; -class SinguCheckPoseStand : public view_listener_t +class SinguCheckPoseStand final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(handle_check_pose(nullptr)); return true; } }; -class SinguRebake : public view_listener_t +class SinguRebake final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_rebake_textures(nullptr); return true; } }; -class SinguVisibleDebugConsole : public view_listener_t +class SinguVisibleDebugConsole final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerRegion* region = gAgent.getRegion(); gMenuHolder->findControl(userdata["control"].asString())->setValue(region && !(region->getCapability("SimConsoleAsync").empty() || region->getCapability("SimConsole").empty())); @@ -8933,9 +8933,9 @@ class SinguVisibleDebugConsole : public view_listener_t } }; -class SinguUrlAction : public view_listener_t +class SinguUrlAction final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLUrlAction::clickAction(userdata.asStringRef(), true); return true; @@ -8952,54 +8952,54 @@ static void visible_inv_floater(const LLSD& userdata, const std::string& field) gMenuHolder->findControl(userdata["control"].asString())->setValue(!!LFFloaterInvPanel::getInstance(LLSD().with(field, userdata["data"]))); } -class ShowInvFloaterID : public view_listener_t +class ShowInvFloaterID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_inv_floater(userdata, "id"); return true; } }; -class VisibleInvFloaterID : public view_listener_t +class VisibleInvFloaterID final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { visible_inv_floater(userdata, "id"); return true; } }; -class ShowInvFloaterName : public view_listener_t +class ShowInvFloaterName final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_inv_floater(userdata, "name"); return true; } }; -class VisibleInvFloaterName : public view_listener_t +class VisibleInvFloaterName final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { visible_inv_floater(userdata, "name"); return true; } }; -class ShowInvFloaterType : public view_listener_t +class ShowInvFloaterType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_inv_floater(userdata, "type"); return true; } }; -class VisibleInvFloaterType : public view_listener_t +class VisibleInvFloaterType final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { visible_inv_floater(userdata, "type"); return true; @@ -9028,27 +9028,27 @@ void show_web_floater(const std::string& type) LLFloaterWebContent::showInstance(type, p); } -class ShowWebFloater : public view_listener_t +class ShowWebFloater final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { show_web_floater(userdata.asStringRef()); return true; } }; -class VisibleSecondLife : public view_listener_t +class VisibleSecondLife final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(gHippoGridManager->getCurrentGrid()->isSecondLife()); return true; } }; -class VisibleNotSecondLife : public view_listener_t +class VisibleNotSecondLife final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(!gHippoGridManager->getConnectedGrid()->isSecondLife()); return true; @@ -9158,63 +9158,63 @@ void copy_profile_uri(const LLUUID& id, const LFIDBearer::Type& type) gViewerWindow->getWindow()->copyTextToClipboard(get_wslurl_for(id, type)); } -class ListEnableAnySelected : public view_listener_t +class ListEnableAnySelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() != 0); return true; } }; -class ListEnableMultipleSelected : public view_listener_t +class ListEnableMultipleSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() > 1); return true; } }; -class ListEnableSingleSelected : public view_listener_t +class ListEnableSingleSelected final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() == 1); return true; } }; -class ListEnableCall : public view_listener_t +class ListEnableCall final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarActions::canCall()); return true; } }; -class ListEnableIsFriend : public view_listener_t +class ListEnableIsFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarActions::isFriend(LFIDBearer::getActiveSelectedID())); return true; } }; -class ListEnableIsNotFriend : public view_listener_t +class ListEnableIsNotFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(!LLAvatarActions::isFriend(LFIDBearer::getActiveSelectedID())); return true; } }; -class ListEnableUnmute : public view_listener_t +class ListEnableUnmute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool are_blocked = false; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9226,9 +9226,9 @@ class ListEnableUnmute : public view_listener_t } }; -class ListEnableMute : public view_listener_t +class ListEnableMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool blockable = false; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9249,18 +9249,18 @@ class ListEnableMute : public view_listener_t } }; -class ListEnableOfferTeleport : public view_listener_t +class ListEnableOfferTeleport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLAvatarActions::canOfferTeleport(LFIDBearer::getActiveSelectedIDs())); return true; } }; -class ListVisibleWebProfile : public view_listener_t +class ListVisibleWebProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveNumSelected() && !(gSavedSettings.getBOOL("UseWebProfiles") || gSavedSettings.getString("WebProfileURL").empty())); return true; @@ -9268,9 +9268,9 @@ class ListVisibleWebProfile : public view_listener_t }; void ban_from_group(const uuid_vec_t& ids); -class ListBanFromGroup : public view_listener_t +class ListBanFromGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { ban_from_group(LFIDBearer::getActiveSelectedIDs()); return true; @@ -9279,7 +9279,7 @@ class ListBanFromGroup : public view_listener_t void copy_from_ids(const uuid_vec_t & ids, std::function func); -class ListCopyNames : public view_listener_t +class ListCopyNames final : public view_listener_t { static std::string getGroupName(const LLUUID& id) { @@ -9306,7 +9306,7 @@ class ListCopyNames : public view_listener_t return LLExperienceCache::instance().get(id)[LLExperienceCache::NAME]; } - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLWString str; const auto& type = LFIDBearer::getActiveType(); @@ -9318,81 +9318,81 @@ class ListCopyNames : public view_listener_t return true; } }; -class ListCopySLURL : public view_listener_t +class ListCopySLURL final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { copy_profile_uri(LFIDBearer::getActiveSelectedID(), LFIDBearer::getActiveType()); return true; } }; -class ListCopyUUIDs : public view_listener_t +class ListCopyUUIDs final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::copyUUIDs(LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListInviteToGroup : public view_listener_t +class ListInviteToGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::inviteToGroup(LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListOfferTeleport : public view_listener_t +class ListOfferTeleport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::offerTeleport(LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListPay : public view_listener_t +class ListPay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::pay(LFIDBearer::getActiveSelectedID()); return true; } }; -class ListRemoveFriend : public view_listener_t +class ListRemoveFriend final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::removeFriendDialog(LFIDBearer::getActiveSelectedID()); return true; } }; -class ListRequestFriendship : public view_listener_t +class ListRequestFriendship final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::requestFriendshipDialog(LFIDBearer::getActiveSelectedID()); return true; } }; -class ListRequestTeleport : public view_listener_t +class ListRequestTeleport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::teleportRequest(LFIDBearer::getActiveSelectedID()); return true; } }; -class ListShare : public view_listener_t +class ListShare final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::share(LFIDBearer::getActiveSelectedID()); return true; @@ -9405,9 +9405,9 @@ bool can_show_web_profile() } void show_log_browser(const LLUUID& id, const LFIDBearer::Type& type); -class ListShowLog : public view_listener_t +class ListShowLog final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const LLUUID& id : LFIDBearer::getActiveSelectedIDs()) show_log_browser(id, LFIDBearer::getActiveType()); @@ -9415,9 +9415,9 @@ class ListShowLog : public view_listener_t } }; -class ListShowProfile : public view_listener_t +class ListShowProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { switch (LFIDBearer::getActiveType()) { @@ -9431,45 +9431,45 @@ class ListShowProfile : public view_listener_t } }; -class ListShowWebProfile : public view_listener_t +class ListShowWebProfile final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::showProfiles(LFIDBearer::getActiveSelectedIDs(), true); return true; } }; -class ListStartAdhocCall : public view_listener_t +class ListStartAdhocCall final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::startAdhocCall(LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListStartCall : public view_listener_t +class ListStartCall final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { (LFIDBearer::getActiveType() == LFIDBearer::GROUP ? LLGroupActions::startCall : LLAvatarActions::startCall)(LFIDBearer::getActiveSelectedID()); return true; } }; -class ListStartConference : public view_listener_t +class ListStartConference final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::startConference(LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListStartIM : public view_listener_t +class ListStartIM final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { const auto&& im = LFIDBearer::getActiveType() == LFIDBearer::GROUP ? [](const LLUUID& id) { LLGroupActions::startIM(id); } : LLAvatarActions::startIM; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9493,9 +9493,9 @@ static const LLVector3d get_active_pos() return get_av_pos(id); } -class ListTeleportTo : public view_listener_t +class ListTeleportTo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { const auto& pos = get_active_pos(); if (!pos.isExactlyZero()) @@ -9504,18 +9504,18 @@ class ListTeleportTo : public view_listener_t } }; -class ListStalk : public view_listener_t +class ListStalk final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLAvatarActions::showOnMap(LFIDBearer::getActiveSelectedID()); return true; } }; -class ListStalkable : public view_listener_t +class ListStalkable final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { BOOL is_agent_mappable(const LLUUID& agent_id); const auto& ids = LFIDBearer::getActiveSelectedIDs(); @@ -9524,9 +9524,9 @@ class ListStalkable : public view_listener_t } }; -class ListAbuseReport : public view_listener_t +class ListAbuseReport final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (LFIDBearer::getActiveType() == LFIDBearer::EXPERIENCE) LLFloaterReporter::showFromExperience(LFIDBearer::getActiveSelectedID()); @@ -9544,18 +9544,18 @@ void set_experience_permission(const char* perm, const uuid_vec_t& ids) cache.setExperiencePermission(id, perm, boost::bind(LLFloaterExperienceProfile::experiencePermissionResults, id, _1)); } -class ListExperienceAllow : public view_listener_t +class ListExperienceAllow final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { set_experience_permission("Allow", LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListExperienceForget : public view_listener_t +class ListExperienceForget final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { if (!gAgent.getRegion()) return true; auto& cache = LLExperienceCache::instance(); @@ -9565,9 +9565,9 @@ class ListExperienceForget : public view_listener_t } }; -class ListExperienceBlock : public view_listener_t +class ListExperienceBlock final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { set_experience_permission("Block", LFIDBearer::getActiveSelectedIDs()); return true; @@ -9593,9 +9593,9 @@ void parcel_mod_notice_callback(const uuid_vec_t& ids, S32 choice, boost::functi } bool is_nearby(const LLUUID& id); -class ListIsNearby : public view_listener_t +class ListIsNearby final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { const auto& id = LFIDBearer::getActiveSelectedID(); gMenuHolder->findControl(userdata["control"].asString())->setValue(LFIDBearer::getActiveType() == LFIDBearer::OBJECT ? !!gObjectList.findObject(id) : is_nearby(id)); @@ -9603,18 +9603,18 @@ class ListIsNearby : public view_listener_t } }; -class ListFollow : public view_listener_t +class ListFollow final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.startFollowPilot(LFIDBearer::getActiveSelectedID(), true, gSavedSettings.getF32("SinguFollowDistance")); return true; } }; -class ListGoTo : public view_listener_t +class ListGoTo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { const auto& pos = get_active_pos(); if (!pos.isExactlyZero()) @@ -9624,9 +9624,9 @@ class ListGoTo : public view_listener_t }; void track_av(const LLUUID& id); -class ListTrack : public view_listener_t +class ListTrack final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { track_av(LFIDBearer::getActiveSelectedID()); return true; @@ -9638,9 +9638,9 @@ void confirm_eject(const uuid_vec_t& ids) { LLNotificationsUtil::add("EjectAvatarFullname", create_args(ids, "AVATAR_NAME"), LLSD(), boost::bind(parcel_mod_notice_callback, ids, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2), send_eject)); } -class ListEject : public view_listener_t +class ListEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { confirm_eject(LFIDBearer::getActiveSelectedIDs()); return true; @@ -9652,9 +9652,9 @@ void confirm_freeze(const uuid_vec_t& ids) { LLNotificationsUtil::add("FreezeAvatarFullname", create_args(ids, "AVATAR_NAME"), LLSD(), boost::bind(parcel_mod_notice_callback, ids, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2), send_freeze)); } -class ListFreeze : public view_listener_t +class ListFreeze final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { confirm_freeze(LFIDBearer::getActiveSelectedIDs()); return true; @@ -9691,9 +9691,9 @@ void confirm_estate_ban(const uuid_vec_t& ids) { LLNotificationsUtil::add("EstateBanUser", create_args(ids, "EVIL_USER"), LLSD(), boost::bind(estate_bulk_eject, ids, true, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2))); } -class ListEstateBan : public view_listener_t +class ListEstateBan final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { confirm_estate_ban(LFIDBearer::getActiveSelectedIDs()); return true; @@ -9704,18 +9704,18 @@ void confirm_estate_kick(const uuid_vec_t& ids) { LLNotificationsUtil::add("EstateKickUser", create_args(ids, "EVIL_USER"), LLSD(), boost::bind(estate_bulk_eject, ids, false, boost::bind(LLNotificationsUtil::getSelectedOption, _1, _2))); } -class ListEstateEject : public view_listener_t +class ListEstateEject final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { confirm_estate_kick(LFIDBearer::getActiveSelectedIDs()); return true; } }; -class ListToggleMute : public view_listener_t +class ListToggleMute final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLAvatarActions::toggleBlock(id); @@ -9723,9 +9723,9 @@ class ListToggleMute : public view_listener_t } }; -class ListIsInGroup : public view_listener_t +class ListIsInGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { auto in_group = false; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9736,9 +9736,9 @@ class ListIsInGroup : public view_listener_t } }; -class ListNotInGroup : public view_listener_t +class ListNotInGroup final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { auto in_group = true; for (const auto& id : LFIDBearer::getActiveSelectedIDs()) @@ -9749,9 +9749,9 @@ class ListNotInGroup : public view_listener_t } }; -class ListLeave : public view_listener_t +class ListLeave final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLGroupActions::leave(id); @@ -9759,9 +9759,9 @@ class ListLeave : public view_listener_t } }; -class ListJoin : public view_listener_t +class ListJoin final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLGroupActions::join(id); @@ -9769,9 +9769,9 @@ class ListJoin : public view_listener_t } }; -class ListActivate : public view_listener_t +class ListActivate final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { for (const auto& id : LFIDBearer::getActiveSelectedIDs()) LLGroupActions::activate(id); @@ -9779,18 +9779,18 @@ class ListActivate : public view_listener_t } }; -class ListObjectCamTo : public view_listener_t +class ListObjectCamTo final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgentCamera.lookAtObject(LFIDBearer::getActiveSelectedID(), false); return true; } }; -class ListObjectSit : public view_listener_t +class ListObjectSit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gAgent.stopAutoPilot(true); handle_object_sit(gObjectList.findObject(LFIDBearer::getActiveSelectedID())); @@ -9798,18 +9798,18 @@ class ListObjectSit : public view_listener_t } }; -class ListObjectPay : public view_listener_t +class ListObjectPay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { handle_give_money_dialog(gObjectList.findObject(LFIDBearer::getActiveSelectedID())); return true; } }; -class ListObjectEnablePay : public view_listener_t +class ListObjectEnablePay final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { const auto& ids = LFIDBearer::getActiveSelectedIDs(); gMenuHolder->findControl(userdata["control"].asString())->setValue(ids.size() == 1 && enable_pay_object(gObjectList.findObject(ids[0]))); @@ -9824,9 +9824,9 @@ void list_for_each_object(std::function func) func(obj); } -class ListObjectTouch : public view_listener_t +class ListObjectTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { list_for_each_object([](LLViewerObject* obj) { if (enable_object_touch(obj)) handle_object_touch(obj); }); return true; @@ -9842,18 +9842,18 @@ bool list_has_valid_object(std::function func) } // One object must have touch sensor -class ListObjectEnableTouch : public view_listener_t +class ListObjectEnableTouch final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(list_has_valid_object([](LLViewerObject* obj){ return enable_object_touch(obj); })); return true; } }; -class ListObjectEdit : public view_listener_t +class ListObjectEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { std::vector objs; auto func = rlv_handler_t::isEnabled() ? static_cast>([&objs](LLViewerObject* obj) { if (gRlvHandler.canEdit(obj)) objs.push_back(obj); }) : [&objs](LLViewerObject* obj) { if (obj) objs.push_back(obj); }; @@ -9878,9 +9878,9 @@ class ListObjectEdit : public view_listener_t } }; -class ListObjectCanEdit : public view_listener_t +class ListObjectCanEdit final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { bool new_selection = userdata["data"].asBoolean(); auto& selmgr = LLSelectMgr::instance(); @@ -9908,45 +9908,45 @@ class ListObjectDerender final : public view_listener_t } }; -class MediaCtrlCopyURL : public view_listener_t +class MediaCtrlCopyURL final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { get_focused()->onCopyURL(); return true; } }; -class MediaCtrlWebInspector : public view_listener_t +class MediaCtrlWebInspector final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { get_focused()->onOpenWebInspector(); return true; } }; -class MediaCtrlViewSource : public view_listener_t +class MediaCtrlViewSource final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { get_focused()->onShowSource(); return true; } }; -struct MarketplaceViewSortAction : view_listener_t +struct MarketplaceViewSortAction final : view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLFloaterMarketplaceListings::findInstance()->mPanelListings->onViewSortMenuItemClicked(userdata); return true; } }; -struct MarketplaceViewSortCheckItem : view_listener_t +struct MarketplaceViewSortCheckItem final : view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString()) ->setValue(LLFloaterMarketplaceListings::findInstance()->mPanelListings->onViewSortMenuItemCheck(userdata["data"])); @@ -9963,12 +9963,12 @@ void addMenu(view_listener_t *menu, const std::string& name) void initialize_menus() { // A parameterized event handler used as ctrl-8/9/0 zoom controls below. - class LLZoomer : public view_listener_t + class LLZoomer final : public view_listener_t { public: // The "mult" parameter says whether "val" is a multiplier or used to set the value. LLZoomer(F32 val, bool mult=true) : mVal(val), mMult(mult) {} - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLViewerCamera& inst(LLViewerCamera::instance()); F32 new_fov_rad = mMult ? inst.getDefaultFOV() * mVal : mVal; @@ -10327,17 +10327,17 @@ void initialize_menus() addMenu(new MarketplaceViewSortAction, "Marketplace.ViewSort.Action"); addMenu(new MarketplaceViewSortCheckItem, "Marketplace.ViewSort.CheckItem"); - class LLViewBuildMode : public view_listener_t + class LLViewBuildMode final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { LLToolMgr::getInstance()->toggleBuildMode(); return true; } }; - class LLViewCheckBuildMode : public view_listener_t + class LLViewCheckBuildMode final : public view_listener_t { - bool handleEvent(LLPointer event, const LLSD& userdata) + bool handleEvent(LLPointer event, const LLSD& userdata) override { gMenuHolder->findControl(userdata["control"].asString())->setValue(LLToolMgr::getInstance()->inEdit()); return true;