diff options
Diffstat (limited to 'indra/newview/llpanelpicks.h')
-rw-r--r-- | indra/newview/llpanelpicks.h | 77 |
1 files changed, 52 insertions, 25 deletions
diff --git a/indra/newview/llpanelpicks.h b/indra/newview/llpanelpicks.h index bb1ee06780..e0e7f69532 100644 --- a/indra/newview/llpanelpicks.h +++ b/indra/newview/llpanelpicks.h @@ -37,13 +37,16 @@ #include "v3dmath.h" #include "lluuid.h" #include "llavatarpropertiesprocessor.h" +#include "llpanelavatar.h" +#include "llregistry.h" +class LLPanelProfile; class LLMessageSystem; class LLVector3d; class LLPanelProfileTab; -class LLPanelMeProfile; class LLPanelPick; class LLAgent; +class LLMenuGL; class LLPickItem; @@ -51,46 +54,72 @@ class LLPanelPicks : public LLPanelProfileTab { public: - LLPanelPicks(const LLUUID& avatar_id = LLUUID::null); - LLPanelPicks(const Params& params ); + LLPanelPicks(); ~LLPanelPicks(); static void* create(void* data); - static void teleport(const LLVector3d& position); - - static void showOnMap(const LLVector3d& position); - /*virtual*/ BOOL postBuild(void); - /*virtual*/ void onActivate(const LLUUID& id); + /*virtual*/ void onOpen(const LLSD& key); void processProperties(void* data, EAvatarProcessorType type); void updateData(); - void setPanelMeProfile(LLPanelMeProfile*); - void clear(); - //*TODO implement - //LLPickItem& getSelectedPick(); + // returns the selected pick item + LLPickItem* getSelectedPickItem(); + + // removes the specified pick item + void removePickItem(LLPickItem* pick_item); + + /*virtual*/ BOOL handleRightMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleMouseDown(S32 x, S32 y, MASK mask); + /*virtual*/ BOOL handleDoubleClick(S32 x, S32 y, MASK mask); + + //*NOTE top down approch when panel toggling is done only by + // parent panels failed to work (picks related code was in me profile panel) + void setProfilePanel(LLPanelProfile* profile_panel); private: - static void onClickInfo(void* data); - static void onClickNew(void* data); - static void onClickDelete(void* data); - static void onClickTeleport(void* data); - static void onClickMap(void* data); + void onClickDelete(); + void onClickTeleport(); + void onClickMap(); + + //------------------------------------------------ + // Callbacks which require panel toggling + //------------------------------------------------ + void onClickNew(); + void onClickInfo(); + void onClickBack(); + void onClickMenuEdit(); + + void buildPickPanel(); bool callbackDelete(const LLSD& notification, const LLSD& response); + bool callbackTeleport(const LLSD& notification, const LLSD& response); + void reshapePicksList(); + void reshapePickItem(LLView* const pick_item, const S32 last_bottom, const S32 newWidth); + LLView* getPicksList() const; void updateButtons(); - typedef std::vector<LLPickItem*> picture_list_t; + void setSelectedPickItem(LLPickItem* item); + + BOOL isMouseInPick(S32 x, S32 y); + + LLPanelProfile* getProfilePanel(); + + + typedef std::list<LLPickItem*> picture_list_t; picture_list_t mPickItemList; - LLPanelMeProfile* mMeProfilePanel; + LLMenuGL* mPopupMenu; + LLPickItem* mSelectedPickItem; + LLPanelProfile* mProfilePanel; + LLPanelPick* mPickPanel; }; class LLPickItem : public LLPanel, public LLAvatarPropertiesObserver @@ -103,13 +132,11 @@ public: void init(LLPickData* pick_data); - void setPictureName(const std::string& name); - - void setPictureDescription(const std::string& descr); + void setPickName(const std::string& name); - void setPicture(); + void setPickDesc(const std::string& descr); - void setPictureId(const LLUUID& id); + void setPickId(const LLUUID& id); void setCreatorId(const LLUUID& id) {mCreatorID = id;}; @@ -139,7 +166,7 @@ public: protected: - LLUUID mPicID; + LLUUID mPickID; LLUUID mCreatorID; LLUUID mParcelID; LLUUID mSnapshotID; |