aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelavatar.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelavatar.h101
1 files changed, 56 insertions, 45 deletions
diff --git a/linden/indra/newview/llpanelavatar.h b/linden/indra/newview/llpanelavatar.h
index 81cfe02..3e8bffd 100644
--- a/linden/indra/newview/llpanelavatar.h
+++ b/linden/indra/newview/llpanelavatar.h
@@ -59,35 +59,61 @@ enum EOnlineStatus
59 ONLINE_STATUS_YES = 1 59 ONLINE_STATUS_YES = 1
60}; 60};
61 61
62class LLPanelAvatarFirstLife 62// Base class for all sub-tabs inside the avatar profile. Many of these
63: public LLPanel 63// panels need to keep track of the parent panel (to get the avatar id)
64// and only request data from the database when they are first drawn. JC
65class LLPanelAvatarTab : public LLPanel
64{ 66{
65public: 67public:
66 LLPanelAvatarFirstLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar); 68 LLPanelAvatarTab(const std::string& name, const LLRect &rect,
67 /*virtual*/ ~LLPanelAvatarFirstLife(); 69 LLPanelAvatar* panel_avatar);
68 /*virtual*/ BOOL postBuild(void);
69 70
70 void enableControls(BOOL own_avatar); 71 // Calls refresh() once per frame when panel is visible
72 /*virtual*/ void draw();
71 73
72protected: 74 LLPanelAvatar* getPanelAvatar() const { return mPanelAvatar; }
75
76 void setDataRequested(bool requested) { mDataRequested = requested; }
77 bool isDataRequested() const { return mDataRequested; }
78
79 // If the data for this tab has not yet been requested,
80 // send the request. Used by tabs that are filled in only
81 // when they are first displayed.
82 // type is one of "notes", "classifieds", "picks"
83 void sendAvatarProfileRequestIfNeeded(const char* type);
84
85private:
73 LLPanelAvatar* mPanelAvatar; 86 LLPanelAvatar* mPanelAvatar;
87 bool mDataRequested;
88};
89
90
91class LLPanelAvatarFirstLife : public LLPanelAvatarTab
92{
93public:
94 LLPanelAvatarFirstLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar);
95
96 /*virtual*/ BOOL postBuild(void);
97
98 void enableControls(BOOL own_avatar);
74}; 99};
75 100
76 101
77class LLPanelAvatarSecondLife 102class LLPanelAvatarSecondLife
78: public LLPanel 103: public LLPanelAvatarTab
79{ 104{
80public: 105public:
81 LLPanelAvatarSecondLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar ); 106 LLPanelAvatarSecondLife(const std::string& name, const LLRect &rect, LLPanelAvatar* panel_avatar );
82 /*virtual*/ ~LLPanelAvatarSecondLife();
83 107
84 /*virtual*/ BOOL postBuild(void); 108 /*virtual*/ BOOL postBuild(void);
85 /*virtual*/ void draw(); 109 /*virtual*/ void refresh();
86 110
87 static void onClickImage( void *userdata); 111 static void onClickImage( void *userdata);
88 static void onClickFriends( void *userdata); 112 static void onClickFriends( void *userdata);
89 static void onDoubleClickGroup(void* userdata); 113 static void onDoubleClickGroup(void* userdata);
90 static void onClickPublishHelp(void *userdata); 114 static void onClickPublishHelp(void *userdata);
115 static void onClickPartnerHelp(void *userdata);
116 static void onClickPartnerHelpLoadURL(S32 option, void* userdata);
91 117
92 // Clear out the controls anticipating new network data. 118 // Clear out the controls anticipating new network data.
93 void clearControls(); 119 void clearControls();
@@ -97,15 +123,14 @@ public:
97 123
98 void setPartnerID(LLUUID id) { mPartnerID = id; } 124 void setPartnerID(LLUUID id) { mPartnerID = id; }
99 125
100protected: 126private:
101 LLPanelAvatar* mPanelAvatar;
102
103 LLUUID mPartnerID; 127 LLUUID mPartnerID;
104}; 128};
105 129
130
106// WARNING! The order of the inheritance here matters!! Do not change. - KLW 131// WARNING! The order of the inheritance here matters!! Do not change. - KLW
107class LLPanelAvatarWeb : 132class LLPanelAvatarWeb :
108 public LLPanel 133 public LLPanelAvatarTab
109#if LL_LIBXUL_ENABLED 134#if LL_LIBXUL_ENABLED
110 , public LLWebBrowserCtrlObserver 135 , public LLWebBrowserCtrlObserver
111#endif 136#endif
@@ -132,17 +157,17 @@ public:
132 virtual void onLocationChange( const EventType& eventIn ); 157 virtual void onLocationChange( const EventType& eventIn );
133#endif 158#endif
134 159
135protected: 160private:
136 LLPanelAvatar* mPanelAvatar;
137 std::string mURL; 161 std::string mURL;
138 LLWebBrowserCtrl* mWebBrowser; 162 LLWebBrowserCtrl* mWebBrowser;
139}; 163};
140 164
141class LLPanelAvatarAdvanced : public LLPanel 165
166class LLPanelAvatarAdvanced : public LLPanelAvatarTab
142{ 167{
143public: 168public:
144 LLPanelAvatarAdvanced(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar); 169 LLPanelAvatarAdvanced(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
145 /*virtual*/ ~LLPanelAvatarAdvanced(); 170
146 /*virtual*/ BOOL postBuild(void); 171 /*virtual*/ BOOL postBuild(void);
147 172
148 void enableControls(BOOL own_avatar); 173 void enableControls(BOOL own_avatar);
@@ -153,8 +178,7 @@ public:
153 U32* skills_mask, std::string& skills_text, 178 U32* skills_mask, std::string& skills_text,
154 std::string& languages_text); 179 std::string& languages_text);
155 180
156protected: 181private:
157 LLPanelAvatar* mPanelAvatar;
158 S32 mWantToCount; 182 S32 mWantToCount;
159 S32 mSkillsCount; 183 S32 mSkillsCount;
160 LLCheckBoxCtrl *mWantToCheck[8]; 184 LLCheckBoxCtrl *mWantToCheck[8];
@@ -164,35 +188,31 @@ protected:
164}; 188};
165 189
166 190
167class LLPanelAvatarNotes : public LLPanel 191class LLPanelAvatarNotes : public LLPanelAvatarTab
168{ 192{
169public: 193public:
170 LLPanelAvatarNotes(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar); 194 LLPanelAvatarNotes(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
171 /*virtual*/ ~LLPanelAvatarNotes(); 195
172 /*virtual*/ BOOL postBuild(void); 196 /*virtual*/ BOOL postBuild(void);
173 197
174 void enableControls(BOOL own_avatar); 198 /*virtual*/ void refresh();
175 199
176 static void onCommitNotes(LLUICtrl* field, void* userdata); 200 void clearControls();
177 201
178protected: 202 static void onCommitNotes(LLUICtrl* field, void* userdata);
179 LLPanelAvatar* mPanelAvatar;
180}; 203};
181 204
182 205
183class LLPanelAvatarClassified : public LLPanel 206class LLPanelAvatarClassified : public LLPanelAvatarTab
184{ 207{
185public: 208public:
186 LLPanelAvatarClassified(const LLString& name, const LLRect& rect, LLPanelAvatar* panel_avatar); 209 LLPanelAvatarClassified(const LLString& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
187 /*virtual*/ ~LLPanelAvatarClassified();
188 210
189 /*virtual*/ BOOL postBuild(void); 211 /*virtual*/ BOOL postBuild(void);
190 /*virtual*/ void draw();
191 212
192 void refresh(); 213 /*virtual*/ void refresh();
193 214
194 void apply(); 215 void apply();
195 void enableControls(BOOL own_avatar);
196 216
197 BOOL titleIsValid(); 217 BOOL titleIsValid();
198 218
@@ -209,23 +229,17 @@ private:
209 229
210 static void callbackDelete(S32 option, void* data); 230 static void callbackDelete(S32 option, void* data);
211 static void callbackNew(S32 option, void* data); 231 static void callbackNew(S32 option, void* data);
212
213private:
214 LLPanelAvatar* mPanelAvatar;
215}; 232};
216 233
217class LLPanelAvatarPicks : public LLPanel 234
235class LLPanelAvatarPicks : public LLPanelAvatarTab
218{ 236{
219public: 237public:
220 LLPanelAvatarPicks(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar); 238 LLPanelAvatarPicks(const std::string& name, const LLRect& rect, LLPanelAvatar* panel_avatar);
221 /*virtual*/ ~LLPanelAvatarPicks();
222 239
223 /*virtual*/ BOOL postBuild(void); 240 /*virtual*/ BOOL postBuild(void);
224 /*virtual*/ void draw();
225
226 void refresh();
227 241
228 void enableControls(BOOL own_avatar); 242 /*virtual*/ void refresh();
229 243
230 // Delete all the pick sub-panels from the tab container 244 // Delete all the pick sub-panels from the tab container
231 void deletePickPanels(); 245 void deletePickPanels();
@@ -240,9 +254,6 @@ private:
240 static void onClickDelete(void* data); 254 static void onClickDelete(void* data);
241 255
242 static void callbackDelete(S32 option, void* data); 256 static void callbackDelete(S32 option, void* data);
243
244private:
245 LLPanelAvatar* mPanelAvatar;
246}; 257};
247 258
248 259