llfloaterurldisplay.cpp

Go to the documentation of this file.
00001 
00022 #include "llviewerprecompiledheaders.h"
00023 
00024 #include "llfloaterurldisplay.h"
00025 
00026 #include "llpanelplace.h"
00027 #include "llvieweruictrlfactory.h"
00028 
00029 #include "v3dmath.h"
00030 
00032 // LLFloaterURLDisplay
00033 
00034 
00035 LLFloaterURLDisplay::LLFloaterURLDisplay(const LLSD& sd)
00036 {       
00037         mFactoryMap["place_details_panel"] = LLCallbackMap(LLFloaterURLDisplay::createPlaceDetail, this);
00038         gUICtrlFactory->buildFloater(this, "floater_preview_url.xml", &getFactoryMap());
00039         this->setVisible(false);
00040 }
00041 
00042 LLFloaterURLDisplay::~LLFloaterURLDisplay()
00043 {
00044 }
00045 
00046 void LLFloaterURLDisplay::displayParcelInfo(U64 region_handle, const LLVector3& pos_local)
00047 {
00048         mRegionHandle = region_handle;
00049         mRegionPosition = pos_local;
00050         LLVector3d pos_global = from_region_handle(region_handle);
00051         pos_global += (LLVector3d)pos_local;
00052 
00053         LLUUID region_id;                       // don't know this
00054         LLUUID landmark_asset_id;       // don't know this either
00055         mPlacePanel->displayParcelInfo(pos_local, landmark_asset_id, region_id, pos_global);
00056 
00057         this->setVisible(true);
00058         this->setFrontmost(true);
00059 }
00060 
00061 void LLFloaterURLDisplay::setSnapshotDisplay(const LLUUID& snapshot_id)
00062 {
00063         mPlacePanel->setSnapshot(snapshot_id);
00064 }
00065 
00066 void LLFloaterURLDisplay::setName(const std::string& name)
00067 {
00068         mPlacePanel->setName(name);
00069 }
00070 
00071 void LLFloaterURLDisplay::setLocationString(const std::string& name)
00072 {
00073         mPlacePanel->setLocationString(name);
00074 }
00075 
00076 // static
00077 void* LLFloaterURLDisplay::createPlaceDetail(void* userdata)
00078 {
00079         LLFloaterURLDisplay *self = (LLFloaterURLDisplay*)userdata;
00080         self->mPlacePanel = new LLPanelPlace();
00081         gUICtrlFactory->buildPanel(self->mPlacePanel, "panel_place.xml");
00082 
00083         return self->mPlacePanel;
00084 }

Generated on Thu Jul 1 06:08:36 2010 for Second Life Viewer by  doxygen 1.4.7