LLFloaterTexturePicker Class Reference

Inheritance diagram for LLFloaterTexturePicker:

Inheritance graph
[legend]
Collaboration diagram for LLFloaterTexturePicker:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LLFloaterTexturePicker (LLTextureCtrl *owner, const LLRect &rect, const std::string &label, PermissionMask immediate_filter_perm_mask, PermissionMask non_immediate_filter_perm_mask, BOOL can_apply_immediately)
virtual ~LLFloaterTexturePicker ()
virtual BOOL handleDragAndDrop (S32 x, S32 y, MASK mask, BOOL drop, EDragAndDropType cargo_type, void *cargo_data, EAcceptance *accept, LLString &tooltip_msg)
virtual void draw ()
virtual BOOL handleKeyHere (KEY key, MASK mask, BOOL called_from_parent)
virtual void onClose (bool app_quitting)
virtual BOOL postBuild ()
void setImageID (const LLUUID &image_asset_id)
void updateImageStats ()
const LLUUIDgetAssetID ()
const LLUUIDfindItemID (const LLUUID &asset_id, BOOL copyable_only)
void setCanApplyImmediately (BOOL b)
void setDirty (BOOL b)
BOOL isDirty () const
void setActive (BOOL active)
LLTextureCtrlgetOwner () const
void setOwner (LLTextureCtrl *owner)
void stopUsingPipette ()
PermissionMask getFilterPermMask ()
void updateFilterPermMask ()
void commitIfImmediateSet ()

Static Public Member Functions

static void onBtnSetToDefault (void *userdata)
static void onBtnSelect (void *userdata)
static void onBtnCancel (void *userdata)
static void onBtnPipette (void *userdata)
static void onBtnWhite (void *userdata)
static void onBtnNone (void *userdata)
static void onBtnClear (void *userdata)
static void onSelectionChange (const std::deque< LLFolderViewItem * > &items, BOOL user_action, void *data)
static void onShowFolders (LLUICtrl *ctrl, void *userdata)
static void onApplyImmediateCheck (LLUICtrl *ctrl, void *userdata)
static void onSearchEdit (const LLString &search_string, void *user_data)
static void onTextureSelect (const LLTextureEntry &te, void *data)

Protected Attributes

LLPointer< LLViewerImagemTexturep
LLTextureCtrlmOwner
LLUUID mImageAssetID
LLUUID mWhiteImageAssetID
LLUUID mSpecialCurrentImageAssetID
LLUUID mOriginalImageAssetID
std::string mLabel
LLTextBoxmTentativeLabel
LLTextBoxmResolutionLabel
LLString mPendingName
BOOL mIsDirty
BOOL mActive
LLSearchEditormSearchEdit
LLInventoryPanelmInventoryPanel
PermissionMask mImmediateFilterPermMask
PermissionMask mNonImmediateFilterPermMask
BOOL mCanApplyImmediately
BOOL mNoCopyTextureSelected
F32 mContextConeOpacity
LLSaveFolderState mSavedFolderState

Detailed Description

Definition at line 103 of file lltexturectrl.cpp.


Constructor & Destructor Documentation

LLFloaterTexturePicker::LLFloaterTexturePicker ( LLTextureCtrl owner,
const LLRect rect,
const std::string &  label,
PermissionMask  immediate_filter_perm_mask,
PermissionMask  non_immediate_filter_perm_mask,
BOOL  can_apply_immediately 
)

Definition at line 189 of file lltexturectrl.cpp.

References LLUICtrlFactory::buildFloater(), LLPanel::childSetAction(), LLPanel::childSetCommitCallback(), LLPanel::childSetEnabled(), LLPanel::childSetValue(), LLPanel::childSetVisible(), FALSE, findItemID(), LLControlGroup::getBOOL(), LLPanel::getCtrlByNameAndType(), LLFolderView::getFilter(), LLInventoryPanel::getRootFolder(), LLUICtrlFactory::getTextBoxByName(), gSavedSettings, gUICtrlFactory, LLInventoryType::IT_SNAPSHOT, LLInventoryType::IT_TEXTURE, LLInventoryFilter::markDefault(), mCanApplyImmediately, mImageAssetID, mInventoryPanel, mNoCopyTextureSelected, mResolutionLabel, mSavedFolderState, mSearchEdit, mTentativeLabel, onApplyImmediateCheck(), onBtnCancel(), onBtnNone(), onBtnPipette(), onBtnSelect(), onBtnSetToDefault(), onBtnWhite(), onSearchEdit(), onSelectionChange(), onShowFolders(), LLInventoryPanel::setAllowMultiSelect(), LLSaveFolderState::setApply(), LLFloater::setCanMinimize(), LLInventoryPanel::setFilterPermMask(), LLInventoryPanel::setFilterTypes(), LLSearchEditor::setSearchCallback(), LLInventoryPanel::setSelectCallback(), LLInventoryPanel::setSelection(), LLInventoryPanel::setShowFolderState(), LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS, TAKE_FOCUS_NO, updateFilterPermMask(), WIDGET_TYPE_INVENTORY_PANEL, and WIDGET_TYPE_SEARCH_EDITOR.

LLFloaterTexturePicker::~LLFloaterTexturePicker (  )  [virtual]

Definition at line 283 of file lltexturectrl.cpp.


Member Function Documentation

void LLFloaterTexturePicker::commitIfImmediateSet (  ) 

Definition at line 669 of file lltexturectrl.cpp.

References LLSD::asBoolean(), LLPanel::childGetValue(), mNoCopyTextureSelected, mOwner, LLTextureCtrl::onFloaterCommit(), and LLTextureCtrl::TEXTURE_CHANGE.

Referenced by handleDragAndDrop(), handleKeyHere(), and onApplyImmediateCheck().

void LLFloaterTexturePicker::draw (  )  [virtual]

Reimplemented from LLFloater.

Definition at line 480 of file lltexturectrl.cpp.

References LLColor4::black, LLViewerImage::BOOST_PREVIEW, border, BORDER_PAD, LLFocusMgr::childHasKeyboardFocus(), LLFocusMgr::childHasMouseCapture(), LLPanel::childSetEnabled(), LLPanel::childSetValue(), CONTEXT_CONE_IN_ALPHA, CONTEXT_CONE_OUT_ALPHA, CONTEXT_FADE_TIME, LLFloater::draw(), LLView::drawChild(), f, FALSE, FOOTER_HEIGHT, LLTextureCtrl::getAllowNoTexture(), LLToolMgr::getCurrentTool(), LLTextureCtrl::getDefaultImageAssetID(), LLControlGroup::getF32(), LLInventoryPanel::getFilterSubString(), LLRectBase< Type >::getHeight(), LLViewerImageList::getImage(), LLCriticalDamp::getInterpolant(), LLView::getLocalRect(), LLUICtrl::getTentative(), LLView::getVisible(), LLRectBase< Type >::getWidth(), gFocusMgr, gImageList, gl_draw_scaled_image(), gl_draw_x(), gl_rect_2d(), gl_rect_2d_checkerboard(), glBegin, glColor4f, glEnd, LLColor4::grey, gSavedSettings, gToolMgr, gToolPipette, HPAD, IMMEDIATE_NO, LLView::isInVisibleChain(), LLFloater::isMinimized(), LLUUID::isNull(), lerp(), LLFLOATER_HEADER_SIZE, LLView::localRectToOtherView(), mActive, LLRectBase< Type >::mBottom, mCanApplyImmediately, mContextConeOpacity, LLFloater::mDragHandle, mImageAssetID, mInventoryPanel, MIPMAP_YES, mIsDirty, LLRectBase< Type >::mLeft, mNoCopyTextureSelected, mOwner, LLView::mRect, LLRectBase< Type >::mRight, mSearchEdit, mTentativeLabel, mTexturep, LLRectBase< Type >::mTop, mWhiteImageAssetID, LLUUID::notNull(), NULL, LLSearchEditor::setText(), LLView::setVisible(), LLRectBase< Type >::stretch(), TEX_PICKER_MIN_HEIGHT, TEX_PICKER_MIN_WIDTH, TEXTURE_INVENTORY_PADDING, TRUE, and updateImageStats().

const LLUUID & LLFloaterTexturePicker::findItemID ( const LLUUID asset_id,
BOOL  copyable_only 
)

Definition at line 626 of file lltexturectrl.cpp.

References LLPermissions::allowCopyBy(), LLInventoryModel::collectDescendentsIf(), LLDynamicArray< Type, BlockSize >::count(), gAgent, LLAgent::getGroupID(), LLAgent::getID(), gInventory, i, LLInventoryModel::INCLUDE_TRASH, LLUUID::null, and S32.

Referenced by LLFloaterTexturePicker(), LLTextureCtrl::onFloaterCommit(), and setImageID().

const LLUUID& LLFloaterTexturePicker::getAssetID (  )  [inline]

Definition at line 130 of file lltexturectrl.cpp.

References mImageAssetID.

Referenced by LLTextureCtrl::onFloaterCommit().

PermissionMask LLFloaterTexturePicker::getFilterPermMask (  ) 

Definition at line 663 of file lltexturectrl.cpp.

References LLSD::asBoolean(), LLPanel::childGetValue(), mImmediateFilterPermMask, and mNonImmediateFilterPermMask.

LLTextureCtrl* LLFloaterTexturePicker::getOwner (  )  const [inline]

Definition at line 138 of file lltexturectrl.cpp.

References mOwner.

BOOL LLFloaterTexturePicker::handleDragAndDrop ( S32  x,
S32  y,
MASK  mask,
BOOL  drop,
EDragAndDropType  cargo_type,
void cargo_data,
EAcceptance accept,
LLString tooltip_msg 
) [virtual]

Reimplemented from LLView.

Definition at line 364 of file lltexturectrl.cpp.

References ACCEPT_NO, ACCEPT_YES_SINGLE, LLPermissions::allowCopyBy(), LLPermissions::allowModifyBy(), LLPermissions::allowOperationBy(), commitIfImmediateSet(), DAD_TEXTURE, FALSE, gAgent, LLInventoryItem::getAssetUUID(), LLAgent::getID(), LLView::getName(), LLInventoryItem::getPermissions(), lldebugst, llendl, mImmediateFilterPermMask, PERM_COPY, PERM_MODIFY, PERM_TRANSFER, setImageID(), and TRUE.

BOOL LLFloaterTexturePicker::handleKeyHere ( KEY  key,
MASK  mask,
BOOL  called_from_parent 
) [virtual]

Reimplemented from LLPanel.

Definition at line 415 of file lltexturectrl.cpp.

References commitIfImmediateSet(), FALSE, LLUICtrl::focusFirstItem(), gAgent, LLFolderView::getCurSelectedItem(), LLAgent::getInventoryRootID(), LLFolderView::getItemByID(), LLInventoryPanel::getRootFolder(), LLPanel::handleKeyHere(), LLUICtrl::hasFocus(), KEY_DOWN, KEY_RETURN, KEY_UP, MASK_NONE, mInventoryPanel, mSearchEdit, LLFolderView::scrollToShowSelection(), LLFolderView::setFocus(), LLFolderView::setSelection(), and TRUE.

BOOL LLFloaterTexturePicker::isDirty (  )  const [inline, virtual]

Reimplemented from LLUICtrl.

Definition at line 135 of file lltexturectrl.cpp.

References mIsDirty.

Referenced by LLTextureCtrl::onFloaterCommit().

void LLFloaterTexturePicker::onApplyImmediateCheck ( LLUICtrl ctrl,
void userdata 
) [static]

Definition at line 807 of file lltexturectrl.cpp.

References commitIfImmediateSet(), LLCheckBoxCtrl::get(), gSavedSettings, LLControlGroup::setBOOL(), and updateFilterPermMask().

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onBtnCancel ( void userdata  )  [static]

Definition at line 719 of file lltexturectrl.cpp.

References FALSE, and LLTextureCtrl::TEXTURE_CANCEL.

Referenced by LLFloaterTexturePicker().

static void LLFloaterTexturePicker::onBtnClear ( void userdata  )  [static]

void LLFloaterTexturePicker::onBtnNone ( void userdata  )  [static]

Definition at line 699 of file lltexturectrl.cpp.

References LLUUID::null.

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onBtnPipette ( void userdata  )  [static]

Definition at line 743 of file lltexturectrl.cpp.

References LLToolMgr::clearTransientTool(), gToolMgr, gToolPipette, onTextureSelect(), LLToolPipette::setSelectCallback(), and LLToolMgr::setTransientTool().

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onBtnSelect ( void userdata  )  [static]

Definition at line 732 of file lltexturectrl.cpp.

References LLTextureCtrl::TEXTURE_SELECT.

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onBtnSetToDefault ( void userdata  )  [static]

Definition at line 679 of file lltexturectrl.cpp.

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onBtnWhite ( void userdata  )  [static]

Definition at line 690 of file lltexturectrl.cpp.

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onClose ( bool  app_quitting  )  [virtual]

Reimplemented from LLFloater.

Definition at line 454 of file lltexturectrl.cpp.

References LLFloater::destroy(), mOwner, LLTextureCtrl::onFloaterClose(), and stopUsingPipette().

void LLFloaterTexturePicker::onSearchEdit ( const LLString search_string,
void user_data 
) [static]

Definition at line 823 of file lltexturectrl.cpp.

References LLFolderViewFolder::applyFunctorRecursively(), FALSE, LLInventoryPanel::getFilterSubString(), LLInventoryPanel::getRootFolder(), LLFolderView::isFilterModified(), mInventoryPanel, mSavedFolderState, LLFolderView::scrollToShowSelection(), LLSaveFolderState::setApply(), LLInventoryPanel::setFilterSubString(), LLStringBase< char >::toUpper(), and TRUE.

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onSelectionChange ( const std::deque< LLFolderViewItem * > &  items,
BOOL  user_action,
void data 
) [static]

Definition at line 765 of file lltexturectrl.cpp.

References LLPermissions::allowCopyBy(), FALSE, gAgent, LLInventoryItem::getAssetUUID(), LLAgent::getID(), LLInventoryModel::getItem(), LLInventoryItem::getPermissions(), gInventory, and TRUE.

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onShowFolders ( LLUICtrl ctrl,
void userdata 
) [static]

Definition at line 791 of file lltexturectrl.cpp.

References LLCheckBoxCtrl::get(), mInventoryPanel, LLInventoryPanel::setShowFolderState(), LLInventoryFilter::SHOW_NO_FOLDERS, and LLInventoryFilter::SHOW_NON_EMPTY_FOLDERS.

Referenced by LLFloaterTexturePicker().

void LLFloaterTexturePicker::onTextureSelect ( const LLTextureEntry te,
void data 
) [static]

Definition at line 860 of file lltexturectrl.cpp.

References LLPermissions::allowCopyBy(), FALSE, gAgent, LLAgent::getID(), LLTextureEntry::getID(), LLInventoryModel::getItem(), LLInventoryItem::getPermissions(), gInventory, gToolPipette, LLUUID::notNull(), LLToolPipette::setResult(), and TRUE.

Referenced by onBtnPipette().

BOOL LLFloaterTexturePicker::postBuild (  )  [virtual]

Reimplemented from LLPanel.

Definition at line 465 of file lltexturectrl.cpp.

References LLPanel::childGetText(), mLabel, LLPanel::postBuild(), LLFloater::setTitle(), and TRUE.

void LLFloaterTexturePicker::setActive ( BOOL  active  ) 

Definition at line 313 of file lltexturectrl.cpp.

References LLPanel::childGetValue(), mActive, and stopUsingPipette().

Referenced by LLTextureCtrl::setEnabled(), and LLTextureCtrl::setValid().

void LLFloaterTexturePicker::setCanApplyImmediately ( BOOL  b  ) 

Definition at line 322 of file lltexturectrl.cpp.

References LLPanel::childSetValue(), FALSE, mCanApplyImmediately, and updateFilterPermMask().

Referenced by LLTextureCtrl::setCanApplyImmediately().

void LLFloaterTexturePicker::setDirty ( BOOL  b  )  [inline]

Definition at line 134 of file lltexturectrl.cpp.

References mIsDirty.

Referenced by LLTextureCtrl::setImageAssetID().

void LLFloaterTexturePicker::setImageID ( const LLUUID image_asset_id  ) 

Definition at line 287 of file lltexturectrl.cpp.

References LLPermissions::allowCopyBy(), LLPanel::childSetValue(), LLInventoryPanel::clearSelection(), FALSE, findItemID(), gAgent, LLAgent::getID(), LLInventoryModel::getItem(), LLInventoryItem::getPermissions(), gInventory, LLUUID::isNull(), mActive, mImageAssetID, mInventoryPanel, mIsDirty, mNoCopyTextureSelected, LLInventoryPanel::setSelection(), TAKE_FOCUS_NO, and TRUE.

Referenced by handleDragAndDrop(), and LLTextureCtrl::setImageAssetID().

void LLFloaterTexturePicker::setOwner ( LLTextureCtrl owner  )  [inline]

Definition at line 139 of file lltexturectrl.cpp.

References mOwner.

Referenced by LLTextureCtrl::closeFloater(), and LLTextureCtrl::onFloaterClose().

void LLFloaterTexturePicker::stopUsingPipette (  ) 

Definition at line 332 of file lltexturectrl.cpp.

References LLToolMgr::clearTransientTool(), LLToolMgr::getCurrentTool(), gToolMgr, and gToolPipette.

Referenced by onClose(), and setActive().

void LLFloaterTexturePicker::updateFilterPermMask (  ) 

Definition at line 818 of file lltexturectrl.cpp.

Referenced by LLFloaterTexturePicker(), onApplyImmediateCheck(), and setCanApplyImmediately().

void LLFloaterTexturePicker::updateImageStats (  ) 

Definition at line 340 of file lltexturectrl.cpp.

References gAgent, LLAgent::isGodlike(), llformat(), mResolutionLabel, mTexturep, LLPointer< Type >::notNull(), LLTextBox::setTextArg(), and LLFloater::setTitle().

Referenced by draw().


Member Data Documentation

BOOL LLFloaterTexturePicker::mActive [protected]

Definition at line 177 of file lltexturectrl.cpp.

Referenced by draw(), setActive(), and setImageID().

BOOL LLFloaterTexturePicker::mCanApplyImmediately [protected]

Definition at line 183 of file lltexturectrl.cpp.

Referenced by draw(), LLFloaterTexturePicker(), and setCanApplyImmediately().

F32 LLFloaterTexturePicker::mContextConeOpacity [protected]

Definition at line 185 of file lltexturectrl.cpp.

Referenced by draw().

LLUUID LLFloaterTexturePicker::mImageAssetID [protected]

Definition at line 164 of file lltexturectrl.cpp.

Referenced by draw(), getAssetID(), LLFloaterTexturePicker(), and setImageID().

PermissionMask LLFloaterTexturePicker::mImmediateFilterPermMask [protected]

Definition at line 181 of file lltexturectrl.cpp.

Referenced by getFilterPermMask(), and handleDragAndDrop().

LLInventoryPanel* LLFloaterTexturePicker::mInventoryPanel [protected]

Definition at line 180 of file lltexturectrl.cpp.

Referenced by draw(), handleKeyHere(), LLFloaterTexturePicker(), onSearchEdit(), onShowFolders(), and setImageID().

BOOL LLFloaterTexturePicker::mIsDirty [protected]

Definition at line 176 of file lltexturectrl.cpp.

Referenced by draw(), isDirty(), setDirty(), and setImageID().

std::string LLFloaterTexturePicker::mLabel [protected]

Reimplemented from LLPanel.

Definition at line 170 of file lltexturectrl.cpp.

Referenced by postBuild().

BOOL LLFloaterTexturePicker::mNoCopyTextureSelected [protected]

Definition at line 184 of file lltexturectrl.cpp.

Referenced by commitIfImmediateSet(), draw(), LLFloaterTexturePicker(), and setImageID().

PermissionMask LLFloaterTexturePicker::mNonImmediateFilterPermMask [protected]

Definition at line 182 of file lltexturectrl.cpp.

Referenced by getFilterPermMask().

LLUUID LLFloaterTexturePicker::mOriginalImageAssetID [protected]

Definition at line 168 of file lltexturectrl.cpp.

LLTextureCtrl* LLFloaterTexturePicker::mOwner [protected]

Definition at line 162 of file lltexturectrl.cpp.

Referenced by commitIfImmediateSet(), draw(), getOwner(), onClose(), and setOwner().

LLString LLFloaterTexturePicker::mPendingName [protected]

Definition at line 175 of file lltexturectrl.cpp.

LLTextBox* LLFloaterTexturePicker::mResolutionLabel [protected]

Definition at line 173 of file lltexturectrl.cpp.

Referenced by LLFloaterTexturePicker(), and updateImageStats().

LLSaveFolderState LLFloaterTexturePicker::mSavedFolderState [protected]

Definition at line 186 of file lltexturectrl.cpp.

Referenced by LLFloaterTexturePicker(), and onSearchEdit().

LLSearchEditor* LLFloaterTexturePicker::mSearchEdit [protected]

Definition at line 179 of file lltexturectrl.cpp.

Referenced by draw(), handleKeyHere(), and LLFloaterTexturePicker().

LLUUID LLFloaterTexturePicker::mSpecialCurrentImageAssetID [protected]

Definition at line 167 of file lltexturectrl.cpp.

LLTextBox* LLFloaterTexturePicker::mTentativeLabel [protected]

Definition at line 172 of file lltexturectrl.cpp.

Referenced by draw(), and LLFloaterTexturePicker().

LLPointer<LLViewerImage> LLFloaterTexturePicker::mTexturep [protected]

Definition at line 161 of file lltexturectrl.cpp.

Referenced by draw(), and updateImageStats().

LLUUID LLFloaterTexturePicker::mWhiteImageAssetID [protected]

Definition at line 166 of file lltexturectrl.cpp.

Referenced by draw().


The documentation for this class was generated from the following file:
Generated on Thu Jul 1 06:11:21 2010 for Second Life Viewer by  doxygen 1.4.7