LLPreview Class Reference

#include <llpreview.h>

Inheritance diagram for LLPreview:

Inheritance graph
[legend]
Collaboration diagram for LLPreview:

Collaboration graph
[legend]

List of all members.

Public Types

enum  e_asset_status { PREVIEW_ASSET_ERROR, PREVIEW_ASSET_UNLOADED, PREVIEW_ASSET_LOADING, PREVIEW_ASSET_LOADED }
typedef enum
LLPreview::e_asset_status 
EAssetStatus

Public Member Functions

 LLPreview (const std::string &name)
 LLPreview (const std::string &name, const LLRect &rect, const std::string &title, const LLUUID &item_uuid, const LLUUID &object_uuid, BOOL allow_resize=FALSE, S32 min_width=0, S32 min_height=0, LLPointer< LLViewerInventoryItem > inv_item=NULL)
virtual ~LLPreview ()
void setItemID (const LLUUID &item_id)
void setObjectID (const LLUUID &object_id)
void setSourceID (const LLUUID &source_id)
const LLViewerInventoryItemgetItem () const
virtual BOOL handleMouseDown (S32 x, S32 y, MASK mask)
virtual BOOL handleMouseUp (S32 x, S32 y, MASK mask)
virtual BOOL handleHover (S32 x, S32 y, MASK mask)
virtual void open ()
virtual bool saveItem (LLPointer< LLInventoryItem > *itemptr)
void setAuxItem (const LLInventoryItem *item)
void addKeepDiscardButtons ()
void userSetShape (const LLRect &new_rect)
void userResized ()
virtual void loadAsset ()
virtual EAssetStatus getAssetStatus ()
void setNotecardInfo (const LLUUID &notecard_inv_id, const LLUUID &object_id)
virtual void draw ()
void refreshFromItem (const LLInventoryItem *item)

Static Public Member Functions

static LLPreviewfind (const LLUUID &item_uuid)
static LLPreviewshow (const LLUUID &item_uuid, BOOL take_focus=TRUE)
static void hide (const LLUUID &item_uuid, BOOL no_saving=FALSE)
static void rename (const LLUUID &item_uuid, const std::string &new_name)
static bool save (const LLUUID &item_uuid, LLPointer< LLInventoryItem > *itemptr)
static void onBtnCopyToInv (void *userdata)
static void onKeepBtn (void *data)
static void onDiscardBtn (void *data)
static LLPreviewgetFirstPreviewForSource (const LLUUID &source_id)

Protected Types

typedef std::map< LLUUID,
LLPreview * > 
preview_map_t
typedef std::multimap< LLUUID,
LLHandle< LLFloater > > 
preview_multimap_t

Protected Member Functions

virtual void onCommit ()
void addDescriptionUI ()
virtual void changed (U32 mask)
virtual const char * getTitleName () const

Static Protected Member Functions

static void onText (LLUICtrl *, void *userdata)
static void onRadio (LLUICtrl *, void *userdata)

Protected Attributes

BOOL mDirty
LLUUID mItemUUID
LLUUID mSourceID
LLUUID mObjectUUID
LLRect mClientRect
LLPointer< LLInventoryItemmAuxItem
LLButtonmCopyToInvBtn
BOOL mForceClose
BOOL mUserResized
BOOL mCloseAfterSave
EAssetStatus mAssetStatus
LLUUID mNotecardInventoryID
LLUUID mObjectID
LLPointer< LLViewerInventoryItemmItem

Static Protected Attributes

static preview_multimap_t sPreviewsBySource
static preview_map_t sInstances


Detailed Description

Definition at line 67 of file llpreview.h.


Member Typedef Documentation

typedef std::map<LLUUID, LLPreview*> LLPreview::preview_map_t [protected]

Definition at line 164 of file llpreview.h.

typedef std::multimap<LLUUID, LLHandle<LLFloater> > LLPreview::preview_multimap_t [protected]

Definition at line 165 of file llpreview.h.


Member Enumeration Documentation

Enumerator:
PREVIEW_ASSET_ERROR 
PREVIEW_ASSET_UNLOADED 
PREVIEW_ASSET_LOADING 
PREVIEW_ASSET_LOADED 

Definition at line 70 of file llpreview.h.


Constructor & Destructor Documentation

LLPreview::LLPreview ( const std::string &  name  ) 

Definition at line 62 of file llpreview.cpp.

References LLInventoryModel::addObserver(), FALSE, gInventory, mAuxItem, and LLFloater::setAutoFocus().

Here is the call graph for this function:

LLPreview::LLPreview ( const std::string &  name,
const LLRect rect,
const std::string &  title,
const LLUUID item_uuid,
const LLUUID object_uuid,
BOOL  allow_resize = FALSE,
S32  min_width = 0,
S32  min_height = 0,
LLPointer< LLViewerInventoryItem inv_item = NULL 
)

Definition at line 79 of file llpreview.cpp.

References LLInventoryModel::addObserver(), FALSE, gInventory, mAuxItem, mItemUUID, LLUUID::notNull(), LLFloater::setAutoFocus(), and sInstances.

Here is the call graph for this function:

LLPreview::~LLPreview (  )  [virtual]


Member Function Documentation

void LLPreview::setItemID ( const LLUUID item_id  ) 

Definition at line 127 of file llpreview.cpp.

References mItemUUID, LLUUID::notNull(), and sInstances.

Referenced by LLPreviewGesture::init().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLPreview::setObjectID ( const LLUUID object_id  ) 

Definition at line 142 of file llpreview.cpp.

References mObjectUUID.

Referenced by LLPreviewGesture::init().

Here is the caller graph for this function:

void LLPreview::setSourceID ( const LLUUID source_id  ) 

Definition at line 147 of file llpreview.cpp.

References LLFloater::getHandle(), mSourceID, LLUUID::notNull(), and sPreviewsBySource.

Referenced by LLEmbeddedNotecardOpener::fire(), open_landmark(), open_notecard(), and open_texture().

Here is the call graph for this function:

Here is the caller graph for this function:

const LLViewerInventoryItem * LLPreview::getItem (  )  const

LLPreview * LLPreview::find ( const LLUUID item_uuid  )  [static]

LLPreview * LLPreview::show ( const LLUUID item_uuid,
BOOL  take_focus = TRUE 
) [static]

void LLPreview::hide ( const LLUUID item_uuid,
BOOL  no_saving = FALSE 
) [static]

void LLPreview::rename ( const LLUUID item_uuid,
const std::string &  new_name 
) [static]

Definition at line 356 of file llpreview.cpp.

References LLFloater::setTitle(), and sInstances.

Referenced by LLObjectBridge::renameItem(), and LLItemBridge::renameItem().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLPreview::save ( const LLUUID item_uuid,
LLPointer< LLInventoryItem > *  itemptr 
) [static]

Definition at line 323 of file llpreview.cpp.

References find(), and saveItem().

Referenced by LLViewerTextEditor::onNotecardDialog().

Here is the call graph for this function:

Here is the caller graph for this function:

BOOL LLPreview::handleMouseDown ( S32  x,
S32  y,
MASK  mask 
) [virtual]

BOOL LLPreview::handleMouseUp ( S32  x,
S32  y,
MASK  mask 
) [virtual]

Reimplemented from LLView.

Definition at line 383 of file llpreview.cpp.

References gFocusMgr, LLView::handleMouseUp(), LLView::hasMouseCapture(), NULL, LLFocusMgr::setMouseCapture(), and TRUE.

Here is the call graph for this function:

BOOL LLPreview::handleHover ( S32  x,
S32  y,
MASK  mask 
) [virtual]

void LLPreview::open ( void   )  [virtual]

Reimplemented from LLFloater.

Reimplemented in LLPreviewLSL, and LLLiveLSLEditor.

Definition at line 428 of file llpreview.cpp.

References getAssetStatus(), LLFloater::getFloaterHost(), LLFloater::getHost(), loadAsset(), LLFloater::open(), and PREVIEW_ASSET_UNLOADED.

Referenced by LLTaskSoundBridge::openSoundPreview(), LLPreviewGesture::show(), show(), LLFloaterAvatarInfo::show(), and LLFloaterAvatarInfo::showFromProfile().

Here is the call graph for this function:

Here is the caller graph for this function:

bool LLPreview::saveItem ( LLPointer< LLInventoryItem > *  itemptr  )  [virtual]

Reimplemented in LLPreviewNotecard.

Definition at line 438 of file llpreview.cpp.

Referenced by save().

Here is the caller graph for this function:

void LLPreview::setAuxItem ( const LLInventoryItem item  )  [inline]

Definition at line 100 of file llpreview.h.

References mAuxItem.

Referenced by LLViewerTextEditor::openEmbeddedTexture().

Here is the caller graph for this function:

void LLPreview::onBtnCopyToInv ( void *  userdata  )  [static]

Definition at line 445 of file llpreview.cpp.

References copy_inventory_from_notecard(), copy_inventory_item(), gAgent, LLAgent::getID(), LLPermissions::getOwner(), LLInventoryItem::getPermissions(), LLInventoryObject::getUUID(), LLUUID::notNull(), LLUUID::null, and NULL.

Referenced by LLPreviewTexture::init().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLPreview::addKeepDiscardButtons (  ) 

void LLPreview::onKeepBtn ( void *  data  )  [static]

Definition at line 474 of file llpreview.cpp.

Referenced by LLPreviewTexture::init(), and LLPreviewNotecard::LLPreviewNotecard().

Here is the caller graph for this function:

void LLPreview::onDiscardBtn ( void *  data  )  [static]

void LLPreview::userSetShape ( const LLRect new_rect  )  [virtual]

Reimplemented from LLFloater.

Definition at line 531 of file llpreview.cpp.

References LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), userResized(), and LLFloater::userSetShape().

Here is the call graph for this function:

void LLPreview::userResized (  )  [inline]

Definition at line 113 of file llpreview.h.

References mUserResized, and TRUE.

Referenced by LLMultiPreview::userSetShape(), and userSetShape().

Here is the caller graph for this function:

virtual void LLPreview::loadAsset (  )  [inline, virtual]

Reimplemented in LLFloaterAvatarInfo, LLPreviewGesture, LLPreviewLandmark, LLPreviewNotecard, LLPreviewLSL, LLLiveLSLEditor, and LLPreviewTexture.

Definition at line 115 of file llpreview.h.

References mAssetStatus, and PREVIEW_ASSET_LOADED.

Referenced by LLMultiPreview::open(), open(), and LLMultiPreview::tabOpen().

Here is the caller graph for this function:

virtual EAssetStatus LLPreview::getAssetStatus (  )  [inline, virtual]

Reimplemented in LLFloaterAvatarInfo, LLPreviewLandmark, and LLPreviewTexture.

Definition at line 116 of file llpreview.h.

References mAssetStatus.

Referenced by LLPreviewLSL::LLPreviewLSL(), LLMultiPreview::open(), open(), and LLMultiPreview::tabOpen().

Here is the caller graph for this function:

LLPreview * LLPreview::getFirstPreviewForSource ( const LLUUID source_id  )  [static]

Definition at line 520 of file llpreview.cpp.

References NULL, and sPreviewsBySource.

void LLPreview::setNotecardInfo ( const LLUUID notecard_inv_id,
const LLUUID object_id 
) [inline]

Definition at line 119 of file llpreview.h.

References mNotecardInventoryID, and mObjectID.

Referenced by LLViewerTextEditor::openEmbeddedTexture().

Here is the caller graph for this function:

void LLPreview::draw ( void   )  [virtual]

Reimplemented from LLFloater.

Reimplemented in LLFloaterAvatarInfo, LLPreviewLandmark, LLPreviewNotecard, LLLiveLSLEditor, and LLPreviewTexture.

Definition at line 251 of file llpreview.cpp.

References LLFloater::draw(), FALSE, getItem(), mDirty, and refreshFromItem().

Referenced by LLPreviewTexture::draw(), LLPreviewNotecard::draw(), and LLPreviewLandmark::draw().

Here is the call graph for this function:

Here is the caller graph for this function:

void LLPreview::refreshFromItem ( const LLInventoryItem item  ) 

void LLPreview::onCommit (  )  [protected, virtual]

void LLPreview::addDescriptionUI (  )  [protected]

void LLPreview::onText ( LLUICtrl ,
void *  userdata 
) [static, protected]

void LLPreview::onRadio ( LLUICtrl ,
void *  userdata 
) [static, protected]

Definition at line 282 of file llpreview.cpp.

void LLPreview::changed ( U32  mask  )  [protected, virtual]

Implements LLInventoryObserver.

Definition at line 246 of file llpreview.cpp.

References mDirty, and TRUE.

virtual const char* LLPreview::getTitleName (  )  const [inline, protected, virtual]

Reimplemented in LLPreviewAnim, LLPreviewGesture, LLPreviewLandmark, LLPreviewNotecard, LLPreviewLSL, LLPreviewSound, and LLPreviewTexture.

Definition at line 137 of file llpreview.h.

Referenced by refreshFromItem().

Here is the caller graph for this function:


Member Data Documentation

BOOL LLPreview::mDirty [protected]

Reimplemented in LLPreviewGesture.

Definition at line 136 of file llpreview.h.

Referenced by changed(), and draw().

Definition at line 141 of file llpreview.h.

Referenced by setSourceID(), and ~LLPreview().

Definition at line 150 of file llpreview.h.

Referenced by LLPreview(), and setAuxItem().

Definition at line 151 of file llpreview.h.

Definition at line 154 of file llpreview.h.

Referenced by LLPreviewNotecard::canClose(), LLPreviewGesture::canClose(), and hide().

Definition at line 156 of file llpreview.h.

Referenced by LLPreviewTexture::updateDimensions(), and userResized().

Definition at line 167 of file llpreview.h.

Referenced by getFirstPreviewForSource(), setSourceID(), and ~LLPreview().

Definition at line 169 of file llpreview.h.

Referenced by setNotecardInfo().

Reimplemented in LLPreviewAnim, LLPreviewNotecard, and LLLiveLSLEditor.

Definition at line 170 of file llpreview.h.

Referenced by setNotecardInfo().

Reimplemented in LLLiveLSLEditor.

Definition at line 171 of file llpreview.h.

Referenced by getItem().


The documentation for this class was generated from the following files:

Generated on Fri May 16 09:00:17 2008 for SecondLife by  doxygen 1.5.5