summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpick.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2009-08-05 16:10:15 -0400
committerNat Goodspeed <nat@lindenlab.com>2009-08-05 16:10:15 -0400
commit07129bf928f79246849e66b396fab44a7a228216 (patch)
treee4e19b342540450ff84dad75f90d5acb5b3d6269 /indra/newview/llpanelpick.h
parent03ebc43132331b9a8dcb3c418ec9c319a6beddda (diff)
parentdc62495da6e5c153c0df57fdbce6b0f40c0208f2 (diff)
Merge recent changes
Diffstat (limited to 'indra/newview/llpanelpick.h')
-rw-r--r--indra/newview/llpanelpick.h56
1 files changed, 37 insertions, 19 deletions
diff --git a/indra/newview/llpanelpick.h b/indra/newview/llpanelpick.h
index 8ada1a39fb..15b0d6c541 100644
--- a/indra/newview/llpanelpick.h
+++ b/indra/newview/llpanelpick.h
@@ -41,7 +41,6 @@
class LLTextureCtrl;
class LLMessageSystem;
-class LLPanelMeProfile;
class LLAvatarPropertiesObserver;
class LLPanelPick : public LLPanel, public LLAvatarPropertiesObserver
@@ -51,6 +50,7 @@ public:
LLPanelPick(BOOL edit_mode = FALSE);
/*virtual*/ ~LLPanelPick();
+ // switches the panel to the VIEW mode and resets controls
void reset();
/*virtual*/ BOOL postBuild();
@@ -59,47 +59,61 @@ public:
// initial position, etc.
void createNewPick();
+ //initializes the panel with data of the pick with id = pick_id
+ //owned by the avatar with id = creator_id
void init(LLUUID creator_id, LLUUID pick_id);
/*virtual*/ void processProperties(void* data, EAvatarProcessorType type);
+ // switches the panel to either View or Edit mode
void setEditMode(BOOL edit_mode);
- //TODO redo panel toggling
- void setPanelMeProfile(LLPanelMeProfile* meProfilePanel);
+ // because this panel works in two modes (edit/view) we are
+ // free from managing two panel for editing and viewing picks and so
+ // are free from controlling switching between them in the parent panel (e.g. Me Profile)
+ // but that causes such a complication that we cannot set a callback for a "Back" button
+ // from the parent panel only once, so we have to preserve that callback
+ // in the pick panel and set it for the back button everytime postBuild() is called.
+ void setExitCallback(commit_callback_t cb);
+
+ static void teleport(const LLVector3d& position);
+ static void showOnMap(const LLVector3d& position);
+
protected:
- void setName(std::string name);
- void setDesc(std::string desc);
- void setLocation(std::string location);
+ void setPickName(std::string name);
+ void setPickDesc(std::string desc);
+ void setPickLocation(std::string location);
- std::string getName();
- std::string getDesc();
- std::string getLocation();
+ std::string getPickName();
+ std::string getPickDesc();
+ std::string getPickLocation();
void sendUpdate();
+ void requestData();
+
void init(LLPickData *pick_data);
+ void updateButtons();
+
//-----------------------------------------
// "PICK INFO" (VIEW MODE) BUTTON HANDLERS
//-----------------------------------------
- static void onClickEdit(void* data);
- static void onClickTeleport(void* data);
- static void onClickMap(void* data);
- static void onClickBack(void* data);
+ void onClickEdit();
+ void onClickTeleport();
+ void onClickMap();
//-----------------------------------------
// "EDIT PICK" (EDIT MODE) BUTTON HANDLERS
//-----------------------------------------
- static void onClickSet(void* data);
- static void onClickSave(void* data);
- static void onClickCancel(void* data);
+ void onClickSet();
+ void onClickSave();
+ void onClickCancel();
protected:
BOOL mEditMode;
LLTextureCtrl* mSnapshotCtrl;
- BOOL mDataRequested;
BOOL mDataReceived;
LLUUID mPickId;
@@ -108,8 +122,12 @@ protected:
LLUUID mParcelId;
std::string mSimName;
- //TODO redo panel toggling
- LLPanelMeProfile* mMeProfilePanel;
+ //These strings are used to keep non-wrapped text
+ std::string mName;
+ std::string mDesc;
+ std::string mLocation;
+
+ commit_callback_t mBackCb;
};
#endif // LL_LLPANELPICK_H