diff options
Diffstat (limited to 'indra/newview/llfloatergesture.h')
-rw-r--r-- | indra/newview/llfloatergesture.h | 43 |
1 files changed, 36 insertions, 7 deletions
diff --git a/indra/newview/llfloatergesture.h b/indra/newview/llfloatergesture.h index 9c1ab27cb0..14e132900d 100644 --- a/indra/newview/llfloatergesture.h +++ b/indra/newview/llfloatergesture.h @@ -36,10 +36,10 @@ #ifndef LL_LLFLOATERGESTURE_H #define LL_LLFLOATERGESTURE_H +#include <vector> #include "llfloater.h" - -#include "lldarray.h" +#include "llinventoryobserver.h" class LLScrollContainer; class LLView; @@ -51,31 +51,60 @@ class LLGestureOptions; class LLScrollListCtrl; class LLFloaterGestureObserver; class LLFloaterGestureInventoryObserver; +class LLMultiGesture; +class LLMenuGL; class LLFloaterGesture -: public LLFloater +: public LLFloater, LLInventoryFetchDescendentsObserver { + LOG_CLASS(LLFloaterGesture); public: LLFloaterGesture(const LLSD& key); virtual ~LLFloaterGesture(); virtual BOOL postBuild(); - + virtual void done (); void refreshAll(); + /** + * @brief Add new scrolllistitem into gesture_list. + * @param item_id inventory id of gesture + * @param gesture can be NULL , if item was not loaded yet + */ + void addGesture(const LLUUID& item_id, LLMultiGesture* gesture, LLCtrlListInterface * list); protected: // Reads from the gesture manager's list of active gestures // and puts them in this list. void buildGestureList(); - - void onClickInventory(); + void playGesture(LLUUID item_id); +private: + void addToCurrentOutFit(); + /** + * @brief This method is using to collect selected items. + * In some places gesture_list can be rebuilt by gestureObservers during iterating data from LLScrollListCtrl::getAllSelected(). + * Therefore we have to copy these items to avoid viewer crash. + * @see LLFloaterGesture::onActivateBtnClick + */ + void getSelectedIds(std::vector<LLUUID>& ids); + bool isActionEnabled(const LLSD& command); + /** + * @brief Activation rules: + * According to Gesture Spec: + * 1. If all selected gestures are active: set to inactive + * 2. If all selected gestures are inactive: set to active + * 3. If selected gestures are in a mixed state: set all to active + */ + void onActivateBtnClick(); void onClickEdit(); void onClickPlay(); void onClickNew(); void onCommitList(); + void onCopyPastAction(const LLSD& command); + void onDeleteSelected(); -protected: LLUUID mSelectedID; + LLUUID mGestureFolderID; + LLScrollListCtrl* mGestureList; LLFloaterGestureObserver* mObserver; }; |