#include <llfloaterimagepreview.h>
Public Member Functions | |
LLFloaterImagePreview (const char *filename) | |
virtual | ~LLFloaterImagePreview () |
virtual BOOL | postBuild () |
BOOL | handleMouseDown (S32 x, S32 y, MASK mask) |
BOOL | handleMouseUp (S32 x, S32 y, MASK mask) |
BOOL | handleHover (S32 x, S32 y, MASK mask) |
BOOL | handleScrollWheel (S32 x, S32 y, S32 clicks) |
Static Public Member Functions | |
static void | onMouseCaptureLostImagePreview (LLMouseHandler *) |
static void | setUploadAmount (S32 amount) |
Protected Member Functions | |
void | draw () |
bool | loadImage (const char *filename) |
Static Protected Member Functions | |
static void | onPreviewTypeCommit (LLUICtrl *, void *) |
Protected Attributes | |
LLPointer< LLImageRaw > | mRawImagep |
LLImagePreviewAvatar * | mAvatarPreview |
LLImagePreviewSculpted * | mSculptedPreview |
S32 | mLastMouseX |
S32 | mLastMouseY |
LLRect | mPreviewRect |
LLRectf | mPreviewImageRect |
GLuint | mGLName |
Static Protected Attributes | |
static S32 | sUploadAmount = 10 |
Definition at line 102 of file llfloaterimagepreview.h.
LLFloaterImagePreview::LLFloaterImagePreview | ( | const char * | filename | ) |
Definition at line 71 of file llfloaterimagepreview.cpp.
References loadImage(), LLFloaterNameDesc::mFilenameAndPath, mGLName, mLastMouseX, and mLastMouseY.
LLFloaterImagePreview::~LLFloaterImagePreview | ( | ) | [virtual] |
Definition at line 134 of file llfloaterimagepreview.cpp.
References mAvatarPreview, mGLName, mRawImagep, mSculptedPreview, and NULL.
BOOL LLFloaterImagePreview::postBuild | ( | void | ) | [virtual] |
Reimplemented from LLFloaterNameDesc.
Definition at line 83 of file llfloaterimagepreview.cpp.
References LLPanel::childDisable(), LLPanel::childEnable(), LLPanel::childGetSelectionInterface(), LLPanel::childHide(), LLPanel::childSetCommitCallback(), LLPanel::childSetLabelArg(), LLPanel::childShow(), FALSE, LLView::getRect(), LL_IMAGE_REZ_LOSSLESS_CUTOFF, llformat(), mAvatarPreview, mPreviewImageRect, mPreviewRect, mRawImagep, mSculptedPreview, LLPointer< Type >::notNull(), NULL, onPreviewTypeCommit(), LLFloaterNameDesc::postBuild(), PREF_BUTTON_HEIGHT, PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT, LLCtrlSelectionInterface::selectFirstItem(), LLRectBase< Type >::set(), LLImagePreviewSculpted::setPreviewTarget(), LLImagePreviewAvatar::setPreviewTarget(), sUploadAmount, and TRUE.
Reimplemented from LLFloater.
Definition at line 427 of file llfloaterimagepreview.cpp.
References LLFloater::bringToFront(), gViewerWindow, LLFloater::handleMouseDown(), LLViewerWindow::hideCursor(), mLastMouseX, mLastMouseY, mPreviewRect, LLRectBase< Type >::pointInRect(), LLViewerWindow::setMouseCapture(), and TRUE.
Reimplemented from LLView.
Definition at line 445 of file llfloaterimagepreview.cpp.
References FALSE, gViewerWindow, LLView::handleMouseUp(), LLViewerWindow::setMouseCapture(), and LLViewerWindow::showCursor().
Reimplemented from LLView.
Definition at line 455 of file llfloaterimagepreview.cpp.
References LLPanel::childGetSelectionInterface(), LLCtrlSelectionInterface::getFirstSelectedIndex(), LLRectBase< Type >::getHeight(), LLRectBase< Type >::getWidth(), gViewerWindow, LLView::handleHover(), LLView::hasMouseCapture(), MASK_ALT, MASK_ORBIT, MASK_PAN, mAvatarPreview, LLRectBase< Type >::mBottom, mLastMouseX, mLastMouseY, LLRectBase< Type >::mLeft, mPreviewImageRect, mPreviewRect, LLRectBase< Type >::mRight, mSculptedPreview, LLRectBase< Type >::mTop, LLImagePreviewSculpted::pan(), LLImagePreviewAvatar::pan(), LLRectBase< Type >::pointInRect(), LLImagePreviewSculpted::refresh(), LLImagePreviewAvatar::refresh(), LLImagePreviewSculpted::rotate(), LLImagePreviewAvatar::rotate(), LLViewerWindow::setCursor(), LLUI::setCursorPositionLocal(), LLRectBase< Type >::stretch(), LLRectBase< Type >::translate(), TRUE, UI_CURSOR_TOOLCAMERA, UI_CURSOR_TOOLPAN, UI_CURSOR_TOOLZOOMIN, LLImagePreviewSculpted::zoom(), and LLImagePreviewAvatar::zoom().
Reimplemented from LLView.
Definition at line 575 of file llfloaterimagepreview.cpp.
References mAvatarPreview, mPreviewRect, mSculptedPreview, LLRectBase< Type >::pointInRect(), LLImagePreviewSculpted::refresh(), LLImagePreviewAvatar::refresh(), TRUE, LLImagePreviewSculpted::zoom(), and LLImagePreviewAvatar::zoom().
void LLFloaterImagePreview::onMouseCaptureLostImagePreview | ( | LLMouseHandler * | handler | ) | [static] |
Definition at line 593 of file llfloaterimagepreview.cpp.
References gViewerWindow, and LLViewerWindow::showCursor().
static void LLFloaterImagePreview::setUploadAmount | ( | S32 | amount | ) | [inline, static] |
Definition at line 116 of file llfloaterimagepreview.h.
References sUploadAmount.
Referenced by process_economy_data().
void LLFloaterImagePreview::onPreviewTypeCommit | ( | LLUICtrl * | ctrl, | |
void * | userdata | |||
) | [static, protected] |
Definition at line 150 of file llfloaterimagepreview.cpp.
References LLPanel::childGetSelectionInterface(), FALSE, LLCtrlSelectionInterface::getFirstSelectedIndex(), mAvatarPreview, mRawImagep, mSculptedPreview, LLImagePreviewSculpted::refresh(), LLImagePreviewAvatar::refresh(), S32, LLImagePreviewSculpted::setPreviewTarget(), LLImagePreviewAvatar::setPreviewTarget(), and TRUE.
Referenced by postBuild().
void LLFloaterImagePreview::draw | ( | void | ) | [protected, virtual] |
Reimplemented from LLFloater.
Definition at line 209 of file llfloaterimagepreview.cpp.
References LLGLImmediate::begin(), LLImageGL::bindExternalTexture(), LLDynamicTexture::bindTexture(), LLPanel::childGetSelectionInterface(), LLGLImmediate::color3f(), LLFloater::draw(), LLGLImmediate::end(), indra::ipc::russ::format(), LLCtrlSelectionInterface::getFirstSelectedIndex(), LLView::getRect(), LLRectBase< Type >::getWidth(), gGL, gl_rect_2d_checkerboard(), mAvatarPreview, LLRectBase< Type >::mBottom, mGLName, LLRectBase< Type >::mLeft, mPreviewImageRect, mPreviewRect, mRawImagep, LLRectBase< Type >::mRight, mSculptedPreview, LLRectBase< Type >::mTop, LLPointer< Type >::notNull(), PREF_BUTTON_HEIGHT, PREVIEW_HPAD, PREVIEW_TEXTURE_HEIGHT, LLVertexBuffer::QUADS, r, LLImagePreviewSculpted::setTexture(), LLImagePreviewAvatar::setTexture(), stop_glerror, LLGLImmediate::texCoord2f(), LLDynamicTexture::unbindTexture(), LLImageGL::unbindTexture(), and LLGLImmediate::vertex2i().
bool LLFloaterImagePreview::loadImage | ( | const char * | filename | ) | [protected] |
Definition at line 317 of file llfloaterimagepreview.cpp.
References codec, IMG_CODEC_BMP, IMG_CODEC_INVALID, IMG_CODEC_JPEG, IMG_CODEC_PNG, IMG_CODEC_TGA, MAX_STRING, and mRawImagep.
Referenced by LLFloaterImagePreview().
LLPointer<LLImageRaw> LLFloaterImagePreview::mRawImagep [protected] |
Definition at line 123 of file llfloaterimagepreview.h.
Referenced by draw(), loadImage(), onPreviewTypeCommit(), postBuild(), and ~LLFloaterImagePreview().
Definition at line 124 of file llfloaterimagepreview.h.
Referenced by draw(), handleHover(), handleScrollWheel(), onPreviewTypeCommit(), postBuild(), and ~LLFloaterImagePreview().
Definition at line 125 of file llfloaterimagepreview.h.
Referenced by draw(), handleHover(), handleScrollWheel(), onPreviewTypeCommit(), postBuild(), and ~LLFloaterImagePreview().
S32 LLFloaterImagePreview::mLastMouseX [protected] |
Definition at line 126 of file llfloaterimagepreview.h.
Referenced by handleHover(), handleMouseDown(), and LLFloaterImagePreview().
S32 LLFloaterImagePreview::mLastMouseY [protected] |
Definition at line 127 of file llfloaterimagepreview.h.
Referenced by handleHover(), handleMouseDown(), and LLFloaterImagePreview().
LLRect LLFloaterImagePreview::mPreviewRect [protected] |
Definition at line 128 of file llfloaterimagepreview.h.
Referenced by draw(), handleHover(), handleMouseDown(), handleScrollWheel(), and postBuild().
LLRectf LLFloaterImagePreview::mPreviewImageRect [protected] |
Definition at line 129 of file llfloaterimagepreview.h.
Referenced by draw(), handleHover(), and postBuild().
GLuint LLFloaterImagePreview::mGLName [protected] |
Definition at line 130 of file llfloaterimagepreview.h.
Referenced by draw(), LLFloaterImagePreview(), and ~LLFloaterImagePreview().
S32 LLFloaterImagePreview::sUploadAmount = 10 [static, protected] |
Definition at line 132 of file llfloaterimagepreview.h.
Referenced by postBuild(), and setUploadAmount().