LLPanelEditWearable Class Reference

Inheritance diagram for LLPanelEditWearable:

Inheritance graph
[legend]
Collaboration diagram for LLPanelEditWearable:

Collaboration graph
[legend]
List of all members.

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 ()
LLSubpartgetCurrentSubpart ()
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 ()
virtual void redo ()
virtual BOOL canRedo ()

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, S32mTextureList
std::map< LLString, S32mColorList
std::map< ESubpart, LLSubpart * > mSubpartList
ESubpart mCurrentSubpart
LLUndoBuffermUndoBuffer

Detailed Description

Definition at line 377 of file llfloatercustomize.cpp.


Constructor & Destructor Documentation

LLPanelEditWearable::LLPanelEditWearable ( EWearableType  type  ) 

Definition at line 444 of file llfloatercustomize.cpp.

References LLUndoWearable::create(), mUndoBuffer, and S32.

LLPanelEditWearable::~LLPanelEditWearable (  )  [virtual]

Definition at line 478 of file llfloatercustomize.cpp.

References gEditMenuHandler, mSubpartList, mUndoBuffer, and NULL.


Member Function Documentation

void LLPanelEditWearable::addColorSwatch ( LLVOAvatar::ETextureIndex  te,
const LLString name 
)

Definition at line 696 of file llfloatercustomize.cpp.

References LLPanel::childSetCommitCallback(), mColorList, and onColorCommit().

Referenced by LLFloaterCustomize::initWearablePanels().

void LLPanelEditWearable::addSubpart ( const LLString name,
ESubpart  id,
LLSubpart part 
)

Definition at line 491 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 731 of file llfloatercustomize.cpp.

References LLPanel::childSetCommitCallback(), LLViewerUICtrlFactory::getTexturePickerByName(), mTextureList, onTextureCommit(), PERM_NONE, LLTextureCtrl::setAllowNoTexture(), LLTextureCtrl::setDefaultImageAssetID(), LLTextureCtrl::setImmediateFilterPermMask(), and LLTextureCtrl::setNonImmediateFilterPermMask().

Referenced by LLFloaterCustomize::initWearablePanels().

void LLPanelEditWearable::addVisualParamToUndoBuffer ( S32  param_id,
F32  current_weight 
)

Definition at line 989 of file llfloatercustomize.cpp.

References LLUndoBuffer::getNextAction(), mUndoBuffer, and LLUndoWearable::setVisualParam().

Referenced by LLScrollingPanelParam::onHintMouseDown(), and LLScrollingPanelParam::onSliderMouseDown().

BOOL LLPanelEditWearable::canRedo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1010 of file llfloatercustomize.cpp.

References LLUndoBuffer::canRedo(), and mUndoBuffer.

BOOL LLPanelEditWearable::canUndo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1005 of file llfloatercustomize.cpp.

References LLUndoBuffer::canUndo(), and mUndoBuffer.

void LLPanelEditWearable::draw (  )  [virtual]

Reimplemented from LLPanel.

Definition at line 801 of file llfloatercustomize.cpp.

References LLPermissions::allowCopyBy(), LLPermissions::allowModifyBy(), LLInventoryModel::appendPath(), LLPanel::childSetEnabled(), LLPanel::childSetTextArg(), LLPanel::childSetVisible(), LLPanel::draw(), FALSE, gAgent, gEditMenuHandler, LLAgent::getAvatarObject(), LLVOAvatar::getClothesColor(), LLViewerUICtrlFactory::getColorSwatchByName(), LLAgent::getGroupID(), LLTextureEntry::getID(), LLAgent::getID(), LLFocusMgr::getKeyboardFocus(), LLWearable::getName(), LLInventoryItem::getPermissions(), LLCharacter::getSex(), LLPrimitive::getTE(), LLViewerUICtrlFactory::getTexturePickerByName(), LLWearable::getType(), LLView::getVisible(), LLAgent::getWearable(), LLAgent::getWearableInventoryItem(), LLAgent::getWearableItem(), gFloaterCustomize, gFocusMgr, gInventory, IMG_DEFAULT_AVATAR, LLViewerInventoryItem::isComplete(), isDirty(), LLFloater::isFrontmost(), LLFloater::isMinimized(), mCanTakeOff, mColorList, mSubpartList, mTextureList, mType, LLUUID::null, NULL, S32, LLColorSwatchCtrl::set(), TRUE, and LLWearable::typeToTypeLabel().

LLSubpart* LLPanelEditWearable::getCurrentSubpart (  )  [inline]

Definition at line 394 of file llfloatercustomize.cpp.

References mCurrentSubpart, and mSubpartList.

Referenced by LLFloaterCustomize::getEditGroup().

ESubpart LLPanelEditWearable::getDefaultSubpart (  ) 

Definition at line 778 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_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().

const char* LLPanelEditWearable::getLabel ( void   )  [inline]

Definition at line 391 of file llfloatercustomize.cpp.

References mType, and LLWearable::typeToTypeLabel().

EWearableType LLPanelEditWearable::getType (  )  [inline]

Definition at line 392 of file llfloatercustomize.cpp.

References mType.

Referenced by LLFloaterCustomize::updateInventoryUI(), and LLFloaterCustomize::updateScrollingPanelUI().

BOOL LLPanelEditWearable::isDirty (  )  const [virtual]

Reimplemented from LLUICtrl.

Definition at line 1040 of file llfloatercustomize.cpp.

References FALSE, gAgent, LLAgent::getWearable(), LLWearable::isDirty(), mType, and TRUE.

Referenced by draw().

void LLPanelEditWearable::onBtnCreateNew ( void userdata  )  [static]

Definition at line 668 of file llfloatercustomize.cpp.

References LLViewerWindow::alertXml(), gViewerWindow, and onSelectAutoWearOption().

Referenced by postBuild().

void LLPanelEditWearable::onBtnRandomize ( void userdata  )  [static]

Definition at line 580 of file llfloatercustomize.cpp.

References LLPermissions::allowModifyBy(), gAgent, LLAgent::getAvatarObject(), LLAgent::getGroupID(), LLAgent::getID(), LLInventoryItem::getPermissions(), LLCharacter::getSex(), LLAgent::getWearableInventoryItem(), gFloaterCustomize, gSavedSettings, LLViewerInventoryItem::isComplete(), LLControlGroup::setU32(), SEX_MALE, LLFloaterCustomize::spawnWearableAppearance(), SUBPART_SHAPE_WHOLE, TRUE, and LLFloaterCustomize::updateScrollingPanelList().

Referenced by LLFloaterCustomize::initWearablePanels().

void LLPanelEditWearable::onBtnRevert ( void userdata  )  [static]

Definition at line 661 of file llfloatercustomize.cpp.

References gAgent, and LLAgent::revertWearable().

Referenced by postBuild().

void LLPanelEditWearable::onBtnSave ( void userdata  )  [static]

Definition at line 629 of file llfloatercustomize.cpp.

References gAgent, and LLAgent::saveWearable().

Referenced by postBuild().

void LLPanelEditWearable::onBtnSaveAs ( void userdata  )  [static]

Definition at line 636 of file llfloatercustomize.cpp.

References gAgent, LLWearable::getName(), LLAgent::getWearable(), onSaveAsCommit(), and LLWearableSaveAsDialog::startModal().

Referenced by postBuild().

void LLPanelEditWearable::onBtnSubpart ( void userdata  )  [static]

Definition at line 503 of file llfloatercustomize.cpp.

References LLFloaterCustomize::getCurrentWearablePanel(), gFloaterCustomize, and setSubpart().

Referenced by addSubpart().

void LLPanelEditWearable::onBtnTakeOff ( void userdata  )  [static]

Definition at line 615 of file llfloatercustomize.cpp.

References gAgent, LLAgent::getWearable(), and LLAgent::removeWearable().

Referenced by postBuild().

static void LLPanelEditWearable::onBtnTakeOffDialog ( S32  option,
void userdata 
) [static]

void LLPanelEditWearable::onColorCommit ( LLUICtrl ctrl,
void userdata 
) [static]

Definition at line 703 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 1057 of file llfloatercustomize.cpp.

References LLFloaterCustomize::clearScrollingPanelList(), gAgent, LLAgent::getAvatarObject(), LLControlGroup::getU32(), LLCharacter::getVisualParam(), gFloaterCustomize, gSavedSettings, LLAgent::isWearableModifiable(), param, LLAgent::sendAgentSetAppearance(), SEX_FEMALE, SEX_MALE, SUBPART_SHAPE_WHOLE, TRUE, LLVOAvatar::updateSexDependentLayerSets(), and LLVOAvatar::updateVisualParams().

Referenced by LLFloaterCustomize::initWearablePanels().

void LLPanelEditWearable::onSaveAsCommit ( LLWearableSaveAsDialog save_as_dialog,
void userdata 
) [static]

Definition at line 649 of file llfloatercustomize.cpp.

References FALSE, gAgent, LLAgent::getAvatarObject(), LLWearableSaveAsDialog::getItemName(), and LLAgent::saveWearableAs().

Referenced by onBtnSaveAs().

void LLPanelEditWearable::onSelectAutoWearOption ( S32  option,
void data 
) [static]

Definition at line 673 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().

void LLPanelEditWearable::onTextureCommit ( LLUICtrl ctrl,
void userdata 
) [static]

Definition at line 748 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().

BOOL LLPanelEditWearable::postBuild (  )  [virtual]

Reimplemented from LLPanel.

Definition at line 452 of file llfloatercustomize.cpp.

References LLAssetType::AT_CLOTHING, LLPanel::childSetAction(), LLPanel::childSetValue(), LLPanel::childSetVisible(), gAgent, LLControlGroup::getString(), gViewerArt, LLAgent::isTeen(), mCanTakeOff, mType, onBtnCreateNew(), onBtnRevert(), onBtnSave(), onBtnSaveAs(), onBtnTakeOff(), TRUE, LLWearable::typeToAssetType(), WT_UNDERPANTS, and WT_UNDERSHIRT.

void LLPanelEditWearable::redo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 1000 of file llfloatercustomize.cpp.

References mUndoBuffer, and LLUndoBuffer::redoAction().

void LLPanelEditWearable::setSubpart ( ESubpart  subpart  ) 

Definition at line 513 of file llfloatercustomize.cpp.

References FALSE, gAgent, LLFloaterCustomize::generateVisualParamHints(), get_if_there(), LLAgent::getAvatarObject(), LLControlGroup::getBOOL(), LLUICtrlFactory::getButtonByName(), LLCharacter::getFirstVisualParam(), LLVOAvatar::getJoint(), LLPermissions::getMaskOwner(), LLCharacter::getNextVisualParam(), LLInventoryItem::getPermissions(), LLCharacter::getSex(), LLAgent::getWearableInventoryItem(), gFloaterCustomize, gMorphView, gSavedSettings, LLViewerInventoryItem::isComplete(), llassert, LLSubpart::mCameraOffset, mCurrentSubpart, LLSubpart::mEditGroup, mSubpartList, LLSubpart::mTargetJoint, LLSubpart::mTargetOffset, mType, NULL, param, 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::setUIPermissions ( U32  perm_mask,
BOOL  is_complete 
)

Definition at line 1095 of file llfloatercustomize.cpp.

References LLPanel::childSetEnabled(), LLPanel::childSetVisible(), FALSE, mColorList, mTextureList, PERM_COPY, PERM_MODIFY, and TRUE.

Referenced by setSubpart(), and setWearable().

void LLPanelEditWearable::setVisible ( BOOL  visible  )  [virtual]

Reimplemented from LLView.

Definition at line 1020 of file llfloatercustomize.cpp.

References LLPanel::childSetEnabled(), FALSE, gEditMenuHandler, mColorList, NULL, and LLView::setVisible().

void LLPanelEditWearable::setWearable ( LLWearable wearable,
U32  perm_mask,
BOOL  is_complete 
)

Definition at line 980 of file llfloatercustomize.cpp.

References LLUndoBuffer::flushActions(), mUndoBuffer, and setUIPermissions().

Referenced by LLFloaterCustomize::setWearable().

void LLPanelEditWearable::switchToDefaultSubpart (  ) 

Definition at line 1015 of file llfloatercustomize.cpp.

References getDefaultSubpart(), and setSubpart().

Referenced by LLFloaterCustomize::switchToDefaultSubpart().

void LLPanelEditWearable::undo (  )  [virtual]

Reimplemented from LLEditMenuHandler.

Definition at line 995 of file llfloatercustomize.cpp.

References mUndoBuffer, and LLUndoBuffer::undoAction().


Member Data Documentation

BOOL LLPanelEditWearable::mCanTakeOff [private]

Definition at line 434 of file llfloatercustomize.cpp.

Referenced by draw(), and postBuild().

std::map<LLString, S32> LLPanelEditWearable::mColorList [private]

Definition at line 436 of file llfloatercustomize.cpp.

Referenced by addColorSwatch(), draw(), setUIPermissions(), and setVisible().

ESubpart LLPanelEditWearable::mCurrentSubpart [private]

Definition at line 438 of file llfloatercustomize.cpp.

Referenced by getCurrentSubpart(), and setSubpart().

std::map<ESubpart, LLSubpart*> LLPanelEditWearable::mSubpartList [private]

Definition at line 437 of file llfloatercustomize.cpp.

Referenced by addSubpart(), draw(), getCurrentSubpart(), setSubpart(), and ~LLPanelEditWearable().

std::map<LLString, S32> LLPanelEditWearable::mTextureList [private]

Definition at line 435 of file llfloatercustomize.cpp.

Referenced by addTextureDropTarget(), draw(), and setUIPermissions().

EWearableType LLPanelEditWearable::mType [private]

Definition at line 433 of file llfloatercustomize.cpp.

Referenced by draw(), getDefaultSubpart(), getLabel(), getType(), isDirty(), postBuild(), and setSubpart().

LLUndoBuffer* LLPanelEditWearable::mUndoBuffer [private]

Definition at line 439 of file llfloatercustomize.cpp.

Referenced by addVisualParamToUndoBuffer(), canRedo(), canUndo(), LLPanelEditWearable(), redo(), setWearable(), undo(), and ~LLPanelEditWearable().


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