00001 00032 // Display of a "Top Pick" used both for the global top picks in the 00033 // Find directory, and also for each individual user's picks in their 00034 // profile. 00035 00036 #ifndef LL_LLPANELPICK_H 00037 #define LL_LLPANELPICK_H 00038 00039 #include "llpanel.h" 00040 #include "v3dmath.h" 00041 #include "lluuid.h" 00042 00043 class LLButton; 00044 class LLCheckBoxCtrl; 00045 class LLIconCtrl; 00046 class LLLineEditor; 00047 class LLTextBox; 00048 class LLTextEditor; 00049 class LLTextureCtrl; 00050 class LLUICtrl; 00051 class LLMessageSystem; 00052 00053 class LLPanelPick : public LLPanel 00054 { 00055 public: 00056 LLPanelPick(BOOL top_pick); 00057 /*virtual*/ ~LLPanelPick(); 00058 00059 void reset(); 00060 00061 /*virtual*/ BOOL postBuild(); 00062 00063 /*virtual*/ void draw(); 00064 00065 /*virtual*/ void refresh(); 00066 00067 // Setup a new pick, including creating an id, giving a sane 00068 // initial position, etc. 00069 void initNewPick(); 00070 00071 // We need to know the creator id so the database knows which partition 00072 // to query for the pick data. 00073 void setPickID(const LLUUID& pick_id, const LLUUID& creator_id); 00074 00075 // Schedules the panel to request data 00076 // from the server next time it is drawn. 00077 void markForServerRequest(); 00078 00079 std::string getPickName(); 00080 const LLUUID& getPickID() const { return mPickID; } 00081 const LLUUID& getPickCreatorID() const { return mCreatorID; } 00082 00083 void sendPickInfoRequest(); 00084 void sendPickInfoUpdate(); 00085 00086 static void processPickInfoReply(LLMessageSystem* msg, void**); 00087 00088 protected: 00089 static void onClickTeleport(void* data); 00090 static void onClickMap(void* data); 00091 //static void onClickLandmark(void* data); 00092 static void onClickSet(void* data); 00093 00094 static void onCommitAny(LLUICtrl* ctrl, void* data); 00095 00096 protected: 00097 BOOL mTopPick; 00098 LLUUID mPickID; 00099 LLUUID mCreatorID; 00100 LLUUID mParcelID; 00101 00102 // Data will be requested on first draw 00103 BOOL mDataRequested; 00104 BOOL mDataReceived; 00105 00106 LLString mSimName; 00107 LLVector3d mPosGlobal; 00108 00109 LLTextureCtrl* mSnapshotCtrl; 00110 LLLineEditor* mNameEditor; 00111 LLTextEditor* mDescEditor; 00112 LLLineEditor* mLocationEditor; 00113 00114 LLButton* mTeleportBtn; 00115 LLButton* mMapBtn; 00116 00117 LLTextBox* mSortOrderText; 00118 LLLineEditor* mSortOrderEditor; 00119 LLCheckBoxCtrl* mEnabledCheck; 00120 LLButton* mSetBtn; 00121 00122 typedef std::list<LLPanelPick*> panel_list_t; 00123 static panel_list_t sAllPanels; 00124 }; 00125 00126 #endif // LL_LLPANELPICK_H