#include <llpreviewtexture.h>


Public Member Functions | |
| LLPreviewTexture (const std::string &name, const LLRect &rect, const std::string &title, const LLUUID &item_uuid, const LLUUID &object_id, BOOL show_keep_discard=FALSE) | |
| LLPreviewTexture (const std::string &name, const LLRect &rect, const std::string &title, const LLUUID &asset_id, BOOL copy_to_inv=FALSE) | |
| ~LLPreviewTexture () | |
| virtual void | draw () |
| virtual BOOL | canSaveAs () const |
| virtual void | saveAs () |
| virtual void | loadAsset () |
| virtual EAssetStatus | getAssetStatus () |
Static Public Member Functions | |
| static void | saveToFile (void *userdata) |
| static void | onFileLoadedForSave (BOOL success, LLViewerImage *src_vi, LLImageRaw *src, LLImageRaw *aux_src, S32 discard_level, BOOL final, void *userdata) |
Protected Member Functions | |
| void | init () |
| virtual const char * | getTitleName () const |
Private Member Functions | |
| void | updateDimensions () |
Private Attributes | |
| LLUUID | mImageID |
| LLPointer< LLViewerImage > | mImage |
| BOOL | mLoadingFullImage |
| LLString | mSaveFileName |
| LLFrameTimer | mSavedFileTimer |
| BOOL | mShowKeepDiscard |
| BOOL | mCopyToInv |
| BOOL | mIsCopyable |
| S32 | mLastHeight |
| S32 | mLastWidth |
Definition at line 42 of file llpreviewtexture.h.
| LLPreviewTexture::LLPreviewTexture | ( | const std::string & | name, | |
| const LLRect & | rect, | |||
| const std::string & | title, | |||
| const LLUUID & | item_uuid, | |||
| const LLUUID & | object_id, | |||
| BOOL | show_keep_discard = FALSE | |||
| ) |
Definition at line 59 of file llpreviewtexture.cpp.
References gAgent, LLInventoryItem::getAssetUUID(), LLPermissions::getGroup(), LLFloater::getHost(), LLAgent::getID(), LLPreview::getItem(), LLPermissions::getMaskBase(), LLPermissions::getMaskEveryone(), LLPermissions::getMaskGroup(), LLPermissions::getOwner(), LLInventoryItem::getPermissions(), LLView::getRect(), init(), LLAgent::isInGroup(), mImageID, mIsCopyable, LLRectBase< Type >::mLeft, LLRectBase< Type >::mTop, PERM_ITEM_UNRESTRICTED, PERM_NONE, LLFloater::setTitle(), LLView::translate(), and TRUE.

| LLPreviewTexture::LLPreviewTexture | ( | const std::string & | name, | |
| const LLRect & | rect, | |||
| const std::string & | title, | |||
| const LLUUID & | asset_id, | |||
| BOOL | copy_to_inv = FALSE | |||
| ) |
Definition at line 110 of file llpreviewtexture.cpp.
References LLView::getRect(), init(), LLRectBase< Type >::mLeft, LLRectBase< Type >::mTop, LLFloater::setTitle(), and LLView::translate().

| LLPreviewTexture::~LLPreviewTexture | ( | ) |
Definition at line 145 of file llpreviewtexture.cpp.
References LLWindow::decBusyCount(), LLView::getWindow(), mImage, mLoadingFullImage, and NULL.

| void LLPreviewTexture::draw | ( | void | ) | [virtual] |
Reimplemented from LLPreview.
Definition at line 194 of file llpreviewtexture.cpp.
References LLFontGL::BOTTOM, LLPreview::draw(), LLFontGL::DROP_SHADOW, LLRectBase< Type >::getHeight(), LLView::getRect(), LLRectBase< Type >::getWidth(), gl_draw_scaled_image(), gl_rect_2d(), gl_rect_2d_checkerboard(), LLFrameTimer::hasExpired(), LLFloater::isMinimized(), LLFontGL::LEFT, llfloor(), MAX_IMAGE_AREA, LLRectBase< Type >::mBottom, LLPreview::mClientRect, mImage, LLRectBase< Type >::mLeft, mLoadingFullImage, mSavedFileTimer, LLPointer< Type >::notNull(), PREVIEW_BORDER_WIDTH, LLFontGL::renderUTF8(), RESIZE_HANDLE_WIDTH, S32, LLFontGL::sSansSerif, LLRectBase< Type >::stretch(), updateDimensions(), and LLColor4::white.

| BOOL LLPreviewTexture::canSaveAs | ( | ) | const [virtual] |
Reimplemented from LLFloater.
Definition at line 291 of file llpreviewtexture.cpp.
References mImage, mIsCopyable, mLoadingFullImage, and LLPointer< Type >::notNull().

| void LLPreviewTexture::saveAs | ( | ) | [virtual] |
Reimplemented from LLFloater.
Definition at line 298 of file llpreviewtexture.cpp.
References LLFilePicker::FFSAVE_TGA, LLFilePicker::getFirstFile(), LLFilePicker::getSaveFile(), LLView::getWindow(), LLWindow::incBusyCount(), LLFilePicker::instance(), mImage, LLPreview::mItemUUID, mLoadingFullImage, mSaveFileName, onFileLoadedForSave(), and TRUE.

| void LLPreviewTexture::loadAsset | ( | ) | [virtual] |
Reimplemented from LLPreview.
Definition at line 480 of file llpreviewtexture.cpp.
References LLViewerImage::BOOST_PREVIEW, FALSE, LLViewerImageList::getImage(), gImageList, LLPreview::mAssetStatus, mImage, mImageID, MIPMAP_TRUE, and LLPreview::PREVIEW_ASSET_LOADING.

| LLPreview::EAssetStatus LLPreviewTexture::getAssetStatus | ( | ) | [virtual] |
Reimplemented from LLPreview.
Definition at line 487 of file llpreviewtexture.cpp.
References LLPreview::mAssetStatus, mImage, LLPointer< Type >::notNull(), and LLPreview::PREVIEW_ASSET_LOADED.

| static void LLPreviewTexture::saveToFile | ( | void * | userdata | ) | [static] |
| void LLPreviewTexture::onFileLoadedForSave | ( | BOOL | success, | |
| LLViewerImage * | src_vi, | |||
| LLImageRaw * | src, | |||
| LLImageRaw * | aux_src, | |||
| S32 | discard_level, | |||
| BOOL | final, | |||
| void * | userdata | |||
| ) | [static] |
Definition at line 320 of file llpreviewtexture.cpp.
References LLViewerWindow::alertXml(), LLUICtrl::clear(), FALSE, gViewerWindow, NULL, SECONDS_TO_SHOW_FILE_SAVED_MSG, and LLPreview::sInstances.
Referenced by saveAs().


| void LLPreviewTexture::init | ( | void | ) | [protected] |
Reimplemented from LLPanel.
Definition at line 156 of file llpreviewtexture.cpp.
References LLUICtrlFactory::buildFloater(), LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), LLPanel::childSetPrevalidate(), LLPanel::childSetText(), LLInventoryItem::getDescription(), LLSingleton< LLUICtrlFactory >::getInstance(), LLPreview::getItem(), mCopyToInv, mShowKeepDiscard, LLPreview::onBtnCopyToInv(), LLPreview::onDiscardBtn(), LLPreview::onKeepBtn(), LLPreview::onText(), and LLLineEditor::prevalidatePrintableNotPipe().
Referenced by LLPreviewTexture().


| virtual const char* LLPreviewTexture::getTitleName | ( | ) | const [inline, protected, virtual] |
| void LLPreviewTexture::updateDimensions | ( | ) | [private] |
Definition at line 380 of file llpreviewtexture.cpp.
References LLFloaterView::adjustToFitScreen(), BTN_HEIGHT, LLPanel::childGetRect(), LLPanel::childSetTextArg(), CLIENT_RECT_VPAD, FALSE, LLRectBase< Type >::getCenterX(), LLRectBase< Type >::getHeight(), LLFloater::getHost(), LLFloater::getMinHeight(), LLFloater::getMinWidth(), LLView::getRect(), LLRectBase< Type >::getWidth(), LLViewerWindow::getWindowHeight(), LLViewerWindow::getWindowWidth(), gFloaterView, LLMultiFloater::growToFit(), gViewerWindow, llclamp(), llformat(), llmax(), llmin(), LLPANEL_BORDER_WIDTH, LLRectBase< Type >::mBottom, LLPreview::mClientRect, mCopyToInv, mImage, mLastHeight, mLastWidth, LLRectBase< Type >::mLeft, mShowKeepDiscard, LLRectBase< Type >::mTop, LLPreview::mUserResized, PREVIEW_BORDER, PREVIEW_HEADER_SIZE, PREVIEW_PAD, PREVIEW_RESIZE_HANDLE_SIZE, LLFloater::reshape(), S32, LLRectBase< Type >::setLeftTopAndSize(), and LLView::setOrigin().
Referenced by draw().


LLUUID LLPreviewTexture::mImageID [private] |
Definition at line 86 of file llpreviewtexture.h.
Referenced by LLPreviewTexture(), and loadAsset().
LLPointer<LLViewerImage> LLPreviewTexture::mImage [private] |
Definition at line 87 of file llpreviewtexture.h.
Referenced by canSaveAs(), draw(), getAssetStatus(), loadAsset(), saveAs(), updateDimensions(), and ~LLPreviewTexture().
BOOL LLPreviewTexture::mLoadingFullImage [private] |
Definition at line 88 of file llpreviewtexture.h.
Referenced by canSaveAs(), draw(), saveAs(), and ~LLPreviewTexture().
LLString LLPreviewTexture::mSaveFileName [private] |
BOOL LLPreviewTexture::mShowKeepDiscard [private] |
BOOL LLPreviewTexture::mCopyToInv [private] |
BOOL LLPreviewTexture::mIsCopyable [private] |
Definition at line 96 of file llpreviewtexture.h.
Referenced by canSaveAs(), and LLPreviewTexture().
S32 LLPreviewTexture::mLastHeight [private] |
S32 LLPreviewTexture::mLastWidth [private] |
1.5.5