Public Member Functions | |
LLPanelEditWearable (EWearableType type) | |
virtual | ~LLPanelEditWearable () |
virtual BOOL | postBuild () |
virtual void | draw () |
virtual BOOL | isDirty () const |
void | addSubpart (const LLString &name, ESubpart id, LLSubpart *part) |
void | addTextureDropTarget (LLVOAvatar::ETextureIndex te, const LLString &name, const LLUUID &default_image_id, BOOL allow_no_texture) |
void | addColorSwatch (LLVOAvatar::ETextureIndex te, const LLString &name) |
const char * | getLabel () |
EWearableType | getType () |
LLSubpart * | getCurrentSubpart () |
ESubpart | getDefaultSubpart () |
void | setSubpart (ESubpart subpart) |
void | switchToDefaultSubpart () |
void | setWearable (LLWearable *wearable, U32 perm_mask, BOOL is_complete) |
void | addVisualParamToUndoBuffer (S32 param_id, F32 current_weight) |
void | setUIPermissions (U32 perm_mask, BOOL is_complete) |
virtual void | setVisible (BOOL visible) |
virtual void | undo () |
virtual BOOL | canUndo () const |
virtual void | redo () |
virtual BOOL | canRedo () const |
Static Public Member Functions | |
static void | onBtnSubpart (void *userdata) |
static void | onBtnTakeOff (void *userdata) |
static void | onBtnRandomize (void *userdata) |
static void | onBtnSave (void *userdata) |
static void | onBtnSaveAs (void *userdata) |
static void | onSaveAsCommit (LLWearableSaveAsDialog *save_as_dialog, void *userdata) |
static void | onBtnRevert (void *userdata) |
static void | onBtnTakeOffDialog (S32 option, void *userdata) |
static void | onBtnCreateNew (void *userdata) |
static void | onTextureCommit (LLUICtrl *ctrl, void *userdata) |
static void | onColorCommit (LLUICtrl *ctrl, void *userdata) |
static void | onCommitSexChange (LLUICtrl *, void *userdata) |
static void | onSelectAutoWearOption (S32 option, void *data) |
Private Attributes | |
EWearableType | mType |
BOOL | mCanTakeOff |
std::map< LLString, S32 > | mTextureList |
std::map< LLString, S32 > | mColorList |
std::map< ESubpart, LLSubpart * > | mSubpartList |
ESubpart | mCurrentSubpart |
LLUndoBuffer * | mUndoBuffer |
Definition at line 378 of file llfloatercustomize.cpp.
LLPanelEditWearable::LLPanelEditWearable | ( | EWearableType | type | ) |
Definition at line 445 of file llfloatercustomize.cpp.
References LLUndoWearable::create(), mUndoBuffer, and S32.
LLPanelEditWearable::~LLPanelEditWearable | ( | ) | [virtual] |
Definition at line 479 of file llfloatercustomize.cpp.
References LLEditMenuHandler::gEditMenuHandler, mSubpartList, mUndoBuffer, and NULL.
BOOL LLPanelEditWearable::postBuild | ( | void | ) | [virtual] |
Reimplemented from LLPanel.
Definition at line 453 of file llfloatercustomize.cpp.
References LLAssetType::AT_CLOTHING, LLPanel::childSetAction(), LLPanel::childSetValue(), LLPanel::childSetVisible(), gAgent, LLAgent::isTeen(), mCanTakeOff, mType, onBtnCreateNew(), onBtnRevert(), onBtnSave(), onBtnSaveAs(), onBtnTakeOff(), TRUE, LLWearable::typeToAssetType(), WT_UNDERPANTS, and WT_UNDERSHIRT.
void LLPanelEditWearable::draw | ( | void | ) | [virtual] |
Reimplemented from LLPanel.
Definition at line 802 of file llfloatercustomize.cpp.
References LLPermissions::allowCopyBy(), LLPermissions::allowModifyBy(), LLInventoryModel::appendPath(), LLPanel::childSetEnabled(), LLPanel::childSetTextArg(), LLPanel::childSetVisible(), LLPanel::draw(), FALSE, gAgent, LLEditMenuHandler::gEditMenuHandler, LLAgent::getAvatarObject(), LLVOAvatar::getClothesColor(), LLAgent::getGroupID(), LLTextureEntry::getID(), LLAgent::getID(), LLFocusMgr::getKeyboardFocus(), LLWearable::getName(), LLInventoryItem::getPermissions(), LLCharacter::getSex(), LLPrimitive::getTE(), LLWearable::getType(), LLAgent::getWearable(), LLAgent::getWearableInventoryItem(), LLAgent::getWearableItem(), gFocusMgr, gInventory, IMG_DEFAULT_AVATAR, LLViewerInventoryItem::isComplete(), isDirty(), LLFloater::isFrontmost(), LLFloater::isMinimized(), mCanTakeOff, mColorList, mSubpartList, mTextureList, mType, LLUUID::null, NULL, S32, LLColorSwatchCtrl::set(), LLTextureCtrl::setImageAssetID(), TRUE, and LLWearable::typeToTypeLabel().
BOOL LLPanelEditWearable::isDirty | ( | ) | const [virtual] |
Reimplemented from LLUICtrl.
Definition at line 1018 of file llfloatercustomize.cpp.
References FALSE, gAgent, LLAgent::getWearable(), LLWearable::isDirty(), mType, and TRUE.
Referenced by draw().
Definition at line 492 of file llfloatercustomize.cpp.
References LLPanel::childSetAction(), LLSubpart::mButtonName, mSubpartList, and onBtnSubpart().
Referenced by LLFloaterCustomize::initWearablePanels().
void LLPanelEditWearable::addTextureDropTarget | ( | LLVOAvatar::ETextureIndex | te, | |
const LLString & | name, | |||
const LLUUID & | default_image_id, | |||
BOOL | allow_no_texture | |||
) |
Definition at line 732 of file llfloatercustomize.cpp.
References LLPanel::childSetCommitCallback(), mTextureList, onTextureCommit(), PERM_NONE, LLTextureCtrl::setAllowNoTexture(), LLTextureCtrl::setDefaultImageAssetID(), LLTextureCtrl::setImmediateFilterPermMask(), and LLTextureCtrl::setNonImmediateFilterPermMask().
Referenced by LLFloaterCustomize::initWearablePanels().
void LLPanelEditWearable::addColorSwatch | ( | LLVOAvatar::ETextureIndex | te, | |
const LLString & | name | |||
) |
Definition at line 697 of file llfloatercustomize.cpp.
References LLPanel::childSetCommitCallback(), mColorList, and onColorCommit().
Referenced by LLFloaterCustomize::initWearablePanels().
const char* LLPanelEditWearable::getLabel | ( | void | ) | [inline] |
Definition at line 392 of file llfloatercustomize.cpp.
References mType, and LLWearable::typeToTypeLabel().
EWearableType LLPanelEditWearable::getType | ( | ) | [inline] |
Definition at line 393 of file llfloatercustomize.cpp.
References mType.
Referenced by LLFloaterCustomize::updateInventoryUI(), and LLFloaterCustomize::updateScrollingPanelUI().
LLSubpart* LLPanelEditWearable::getCurrentSubpart | ( | ) | [inline] |
Definition at line 395 of file llfloatercustomize.cpp.
References mCurrentSubpart, and mSubpartList.
Referenced by LLFloaterCustomize::getEditGroup().
ESubpart LLPanelEditWearable::getDefaultSubpart | ( | ) |
Definition at line 779 of file llfloatercustomize.cpp.
References llassert, mType, SUBPART_EYES, SUBPART_GLOVES, SUBPART_HAIR_COLOR, SUBPART_JACKET, SUBPART_PANTS, SUBPART_SHAPE_WHOLE, SUBPART_SHIRT, SUBPART_SHOES, SUBPART_SKIN_COLOR, SUBPART_SKIRT, SUBPART_SOCKS, SUBPART_UNDERPANTS, SUBPART_UNDERSHIRT, WT_EYES, WT_GLOVES, WT_HAIR, WT_JACKET, WT_PANTS, WT_SHAPE, WT_SHIRT, WT_SHOES, WT_SKIN, WT_SKIRT, WT_SOCKS, WT_UNDERPANTS, and WT_UNDERSHIRT.
Referenced by switchToDefaultSubpart().
void LLPanelEditWearable::setSubpart | ( | ESubpart | subpart | ) |
Definition at line 514 of file llfloatercustomize.cpp.
References FALSE, gAgent, LLFloaterCustomize::generateVisualParamHints(), get_if_there(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLCharacter::getFirstVisualParam(), LLVOAvatar::getJoint(), LLPermissions::getMaskOwner(), LLCharacter::getNextVisualParam(), LLInventoryItem::getPermissions(), LLCharacter::getSex(), LLAgent::getWearableInventoryItem(), gMorphView, gSavedSettings, LLViewerInventoryItem::isComplete(), llassert, LLSubpart::mCameraOffset, mCurrentSubpart, LLSubpart::mEditGroup, mSubpartList, LLSubpart::mTargetJoint, LLSubpart::mTargetOffset, mType, NULL, PERM_MODIFY, LLMorphView::setCameraDistToDefault(), LLMorphView::setCameraOffset(), LLMorphView::setCameraTargetJoint(), LLMorphView::setCameraTargetOffset(), LLButton::setToggleState(), setUIPermissions(), TRUE, LLMorphView::updateCamera(), LLFloaterCustomize::updateScrollingPanelUI(), and VISUAL_PARAM_GROUP_TWEAKABLE.
Referenced by onBtnSubpart(), and switchToDefaultSubpart().
void LLPanelEditWearable::switchToDefaultSubpart | ( | ) |
Definition at line 993 of file llfloatercustomize.cpp.
References getDefaultSubpart(), and setSubpart().
Referenced by LLFloaterCustomize::switchToDefaultSubpart().
void LLPanelEditWearable::setWearable | ( | LLWearable * | wearable, | |
U32 | perm_mask, | |||
BOOL | is_complete | |||
) |
Definition at line 978 of file llfloatercustomize.cpp.
References LLUndoBuffer::flushActions(), mUndoBuffer, and setUIPermissions().
Referenced by LLFloaterCustomize::setWearable().
Definition at line 987 of file llfloatercustomize.cpp.
References LLUndoBuffer::getNextAction(), mUndoBuffer, and LLUndoWearable::setVisualParam().
Referenced by LLScrollingPanelParam::onHintMouseDown(), and LLScrollingPanelParam::onSliderMouseDown().
Definition at line 1073 of file llfloatercustomize.cpp.
References LLPanel::childSetEnabled(), LLPanel::childSetVisible(), FALSE, mColorList, mTextureList, PERM_COPY, PERM_MODIFY, and TRUE.
Referenced by setSubpart(), setWearable(), and LLFloaterCustomize::updateInventoryUI().
void LLPanelEditWearable::setVisible | ( | BOOL | visible | ) | [virtual] |
Reimplemented from LLView.
Definition at line 998 of file llfloatercustomize.cpp.
References LLPanel::childSetEnabled(), FALSE, LLEditMenuHandler::gEditMenuHandler, mColorList, NULL, and LLView::setVisible().
virtual void LLPanelEditWearable::undo | ( | ) | [inline, virtual] |
Reimplemented from LLEditMenuHandler.
Definition at line 409 of file llfloatercustomize.cpp.
References mUndoBuffer, and LLUndoBuffer::undoAction().
virtual BOOL LLPanelEditWearable::canUndo | ( | ) | const [inline, virtual] |
Reimplemented from LLEditMenuHandler.
Definition at line 410 of file llfloatercustomize.cpp.
References LLUndoBuffer::canUndo(), and mUndoBuffer.
virtual void LLPanelEditWearable::redo | ( | ) | [inline, virtual] |
Reimplemented from LLEditMenuHandler.
Definition at line 411 of file llfloatercustomize.cpp.
References mUndoBuffer, and LLUndoBuffer::redoAction().
virtual BOOL LLPanelEditWearable::canRedo | ( | ) | const [inline, virtual] |
Reimplemented from LLEditMenuHandler.
Definition at line 412 of file llfloatercustomize.cpp.
References LLUndoBuffer::canRedo(), and mUndoBuffer.
void LLPanelEditWearable::onBtnSubpart | ( | void * | userdata | ) | [static] |
Definition at line 504 of file llfloatercustomize.cpp.
References LLFloaterCustomize::getCurrentWearablePanel(), and setSubpart().
Referenced by addSubpart().
void LLPanelEditWearable::onBtnTakeOff | ( | void * | userdata | ) | [static] |
Definition at line 616 of file llfloatercustomize.cpp.
References gAgent, LLAgent::getWearable(), and LLAgent::removeWearable().
Referenced by postBuild().
void LLPanelEditWearable::onBtnRandomize | ( | void * | userdata | ) | [static] |
Definition at line 581 of file llfloatercustomize.cpp.
References LLPermissions::allowModifyBy(), gAgent, LLAgent::getAvatarObject(), LLAgent::getGroupID(), LLAgent::getID(), LLInventoryItem::getPermissions(), LLCharacter::getSex(), LLAgent::getWearableInventoryItem(), gSavedSettings, LLViewerInventoryItem::isComplete(), LLControlGroup::setU32(), LLUndoWearable::setWearable(), SEX_MALE, LLFloaterCustomize::spawnWearableAppearance(), SUBPART_SHAPE_WHOLE, TRUE, and LLFloaterCustomize::updateScrollingPanelList().
Referenced by LLFloaterCustomize::initWearablePanels().
void LLPanelEditWearable::onBtnSave | ( | void * | userdata | ) | [static] |
Definition at line 630 of file llfloatercustomize.cpp.
References gAgent, and LLAgent::saveWearable().
Referenced by postBuild().
void LLPanelEditWearable::onBtnSaveAs | ( | void * | userdata | ) | [static] |
Definition at line 637 of file llfloatercustomize.cpp.
References gAgent, LLWearable::getName(), LLAgent::getWearable(), onSaveAsCommit(), and LLWearableSaveAsDialog::startModal().
Referenced by postBuild().
void LLPanelEditWearable::onSaveAsCommit | ( | LLWearableSaveAsDialog * | save_as_dialog, | |
void * | userdata | |||
) | [static] |
Definition at line 650 of file llfloatercustomize.cpp.
References FALSE, gAgent, LLAgent::getAvatarObject(), LLWearableSaveAsDialog::getItemName(), and LLAgent::saveWearableAs().
Referenced by onBtnSaveAs().
void LLPanelEditWearable::onBtnRevert | ( | void * | userdata | ) | [static] |
Definition at line 662 of file llfloatercustomize.cpp.
References gAgent, and LLAgent::revertWearable().
Referenced by postBuild().
static void LLPanelEditWearable::onBtnTakeOffDialog | ( | S32 | option, | |
void * | userdata | |||
) | [static] |
void LLPanelEditWearable::onBtnCreateNew | ( | void * | userdata | ) | [static] |
Definition at line 669 of file llfloatercustomize.cpp.
References LLViewerWindow::alertXml(), gViewerWindow, and onSelectAutoWearOption().
Referenced by postBuild().
void LLPanelEditWearable::onTextureCommit | ( | LLUICtrl * | ctrl, | |
void * | userdata | |||
) | [static] |
Definition at line 749 of file llfloatercustomize.cpp.
References gAgent, LLAgent::getAvatarObject(), LLViewerImage::getID(), LLViewerImageList::getImage(), LLTextureCtrl::getImageAssetID(), LLView::getName(), LLViewerObject::getTEImage(), gImageList, IMG_DEFAULT_AVATAR, LLUUID::isNull(), LLAgent::sendAgentSetAppearance(), LLVOAvatar::setLocTexTE(), LLUndoWearable::setTexture(), and TRUE.
Referenced by addTextureDropTarget().
void LLPanelEditWearable::onColorCommit | ( | LLUICtrl * | ctrl, | |
void * | userdata | |||
) | [static] |
Definition at line 704 of file llfloatercustomize.cpp.
References gAgent, LLColorSwatchCtrl::get(), LLAgent::getAvatarObject(), LLVOAvatar::getClothesColor(), LLView::getName(), LLVisualParamHint::requestHintUpdates(), LLAgent::sendAgentSetAppearance(), LLVOAvatar::setClothesColor(), LLUndoWearable::setColor(), and TRUE.
Referenced by addColorSwatch().
void LLPanelEditWearable::onCommitSexChange | ( | LLUICtrl * | , | |
void * | userdata | |||
) | [static] |
Definition at line 1035 of file llfloatercustomize.cpp.
References LLFloaterCustomize::clearScrollingPanelList(), gAgent, LLAgent::getAvatarObject(), LLVisualParam::getID(), LLControlGroup::getU32(), LLCharacter::getVisualParam(), LLVisualParam::getWeight(), gSavedSettings, LLAgent::isWearableModifiable(), LLAgent::sendAgentSetAppearance(), LLVisualParam::setWeight(), SEX_FEMALE, SEX_MALE, SUBPART_SHAPE_WHOLE, TRUE, LLVOAvatar::updateSexDependentLayerSets(), and LLVOAvatar::updateVisualParams().
Referenced by LLFloaterCustomize::initWearablePanels().
void LLPanelEditWearable::onSelectAutoWearOption | ( | S32 | option, | |
void * | data | |||
) | [static] |
Definition at line 674 of file llfloatercustomize.cpp.
References create_inventory_item(), LLWearableList::createNewWearable(), LLInventoryModel::findCategoryUUIDForType(), gAgent, LLWearable::getAssetType(), LLAgent::getAvatarObject(), LLWearable::getDescription(), LLAgent::getID(), LLPermissions::getMaskNextOwner(), LLWearable::getName(), LLWearable::getPermissions(), LLAgent::getSessionID(), LLWearable::getTransactionID(), LLWearable::getType(), gInventory, gWearableList, LLInventoryType::IT_WEARABLE, and NULL.
Referenced by onBtnCreateNew().
EWearableType LLPanelEditWearable::mType [private] |
Definition at line 434 of file llfloatercustomize.cpp.
Referenced by draw(), getDefaultSubpart(), getLabel(), getType(), isDirty(), postBuild(), and setSubpart().
BOOL LLPanelEditWearable::mCanTakeOff [private] |
std::map<LLString, S32> LLPanelEditWearable::mTextureList [private] |
Definition at line 436 of file llfloatercustomize.cpp.
Referenced by addTextureDropTarget(), draw(), and setUIPermissions().
std::map<LLString, S32> LLPanelEditWearable::mColorList [private] |
Definition at line 437 of file llfloatercustomize.cpp.
Referenced by addColorSwatch(), draw(), setUIPermissions(), and setVisible().
std::map<ESubpart, LLSubpart*> LLPanelEditWearable::mSubpartList [private] |
Definition at line 438 of file llfloatercustomize.cpp.
Referenced by addSubpart(), draw(), getCurrentSubpart(), setSubpart(), and ~LLPanelEditWearable().
ESubpart LLPanelEditWearable::mCurrentSubpart [private] |
Definition at line 439 of file llfloatercustomize.cpp.
Referenced by getCurrentSubpart(), and setSubpart().
LLUndoBuffer* LLPanelEditWearable::mUndoBuffer [private] |
Definition at line 440 of file llfloatercustomize.cpp.
Referenced by addVisualParamToUndoBuffer(), canRedo(), canUndo(), LLPanelEditWearable(), redo(), setWearable(), undo(), and ~LLPanelEditWearable().