diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llfloaterurldisplay.cpp | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/linden/indra/newview/llfloaterurldisplay.cpp b/linden/indra/newview/llfloaterurldisplay.cpp new file mode 100644 index 0000000..82db380 --- /dev/null +++ b/linden/indra/newview/llfloaterurldisplay.cpp | |||
@@ -0,0 +1,84 @@ | |||
1 | /** | ||
2 | * @file llpreviewlandmark.cpp | ||
3 | * @brief LLFloaterURLDisplayList class implementation | ||
4 | * | ||
5 | * $LicenseInfo:firstyear=2002&license=internal$ | ||
6 | * | ||
7 | * Copyright (c) 2002-2007, Linden Research, Inc. | ||
8 | * | ||
9 | * The following source code is PROPRIETARY AND CONFIDENTIAL. Use of | ||
10 | * this source code is governed by the Linden Lab Source Code Disclosure | ||
11 | * Agreement ("Agreement") previously entered between you and Linden | ||
12 | * Lab. By accessing, using, copying, modifying or distributing this | ||
13 | * software, you acknowledge that you have been informed of your | ||
14 | * obligations under the Agreement and agree to abide by those obligations. | ||
15 | * | ||
16 | * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO | ||
17 | * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, | ||
18 | * COMPLETENESS OR PERFORMANCE. | ||
19 | * $/LicenseInfo$ | ||
20 | */ | ||
21 | |||
22 | #include "llviewerprecompiledheaders.h" | ||
23 | |||
24 | #include "llfloaterurldisplay.h" | ||
25 | |||
26 | #include "llpanelplace.h" | ||
27 | #include "llvieweruictrlfactory.h" | ||
28 | |||
29 | #include "v3dmath.h" | ||
30 | |||
31 | //////////////////////////////////////////////////////////////////////////// | ||
32 | // LLFloaterURLDisplay | ||
33 | |||
34 | |||
35 | LLFloaterURLDisplay::LLFloaterURLDisplay(const LLSD& sd) | ||
36 | { | ||
37 | mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterURLDisplay::createPlaceDetail, this); | ||
38 | gUICtrlFactory->buildFloater(this, "floater_preview_url.xml", &getFactoryMap()); | ||
39 | this->setVisible(false); | ||
40 | } | ||
41 | |||
42 | LLFloaterURLDisplay::~LLFloaterURLDisplay() | ||
43 | { | ||
44 | } | ||
45 | |||
46 | void LLFloaterURLDisplay::displayParcelInfo(U64 region_handle, const LLVector3& pos_local) | ||
47 | { | ||
48 | mRegionHandle = region_handle; | ||
49 | mRegionPosition = pos_local; | ||
50 | LLVector3d pos_global = from_region_handle(region_handle); | ||
51 | pos_global += (LLVector3d)pos_local; | ||
52 | |||
53 | LLUUID region_id; // don't know this | ||
54 | LLUUID landmark_asset_id; // don't know this either | ||
55 | mPlacePanel->displayParcelInfo(pos_local, landmark_asset_id, region_id, pos_global); | ||
56 | |||
57 | this->setVisible(true); | ||
58 | this->setFrontmost(true); | ||
59 | } | ||
60 | |||
61 | void LLFloaterURLDisplay::setSnapshotDisplay(const LLUUID& snapshot_id) | ||
62 | { | ||
63 | mPlacePanel->setSnapshot(snapshot_id); | ||
64 | } | ||
65 | |||
66 | void LLFloaterURLDisplay::setName(const std::string& name) | ||
67 | { | ||
68 | mPlacePanel->setName(name); | ||
69 | } | ||
70 | |||
71 | void LLFloaterURLDisplay::setLocationString(const std::string& name) | ||
72 | { | ||
73 | mPlacePanel->setLocationString(name); | ||
74 | } | ||
75 | |||
76 | // static | ||
77 | void* LLFloaterURLDisplay::createPlaceDetail(void* userdata) | ||
78 | { | ||
79 | LLFloaterURLDisplay *self = (LLFloaterURLDisplay*)userdata; | ||
80 | self->mPlacePanel = new LLPanelPlace(); | ||
81 | gUICtrlFactory->buildPanel(self->mPlacePanel, "panel_place.xml"); | ||
82 | |||
83 | return self->mPlacePanel; | ||
84 | } | ||