summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelgroup.h
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2009-08-12 01:12:27 +0000
committerSteven Bennetts <steve@lindenlab.com>2009-08-12 01:12:27 +0000
commit0bf4b5f2222ffb8171be094613363427f3b8470a (patch)
tree4b742d6815f44a85c98113e9c5a3017eafc5968d /indra/newview/llpanelgroup.h
parent8d7e56f219d0915e2c4a19baf2809dbc6ede7fa5 (diff)
merge https://svn.aws.productengine.com/secondlife/export-from-ll@1277 https://svn.aws.productengine.com/secondlife/pe/stable-1@1297 -> viewer-2-0
Fixes: EXT 208 EXT 366 EXT-211 EXT-245 EXT-246 EXT-278 EXT-279 EXT-280 EXT-298 EXT-301 EXT-304 EXT-311 EXT-317 EXT-318 EXT-319 EXT-339 EXT-343 EXT-344 EXT-346 EXT-349 EXT-350 EXT-351 EXT-354 EXT-355 EXT-358 EXT-360 EXT-362 EXT-369 EXT-372 EXT-374 EXT-381 EXT-382 EXT-383 EXT-395 EXT-396 EXT-412 Other changes: Movement & Caemra controls work Profile and Me panel refactoring Notification refactoring
Diffstat (limited to 'indra/newview/llpanelgroup.h')
-rw-r--r--indra/newview/llpanelgroup.h99
1 files changed, 42 insertions, 57 deletions
diff --git a/indra/newview/llpanelgroup.h b/indra/newview/llpanelgroup.h
index 55c7494a44..e5e1d1b6ad 100644
--- a/indra/newview/llpanelgroup.h
+++ b/indra/newview/llpanelgroup.h
@@ -45,93 +45,79 @@ class LLPanelGroupTab;
class LLTabContainer;
class LLAgent;
-class LLPanelGroupTabObserver
-{
-public:
- LLPanelGroupTabObserver() {};
- virtual ~LLPanelGroupTabObserver(){};
- virtual void tabChanged() = 0;
-};
class LLPanelGroup : public LLPanel,
- public LLGroupMgrObserver,
- public LLPanelGroupTabObserver
+ public LLGroupMgrObserver
{
public:
- LLPanelGroup(const LLUUID& group_id);
+ LLPanelGroup();
virtual ~LLPanelGroup();
virtual BOOL postBuild();
- static void onBtnOK(void*);
- static void onBtnCancel(void*);
- static void onBtnApply(void*);
- static void onBtnRefresh(void*);
- void handleClickTab();
-
void setGroupID(const LLUUID& group_id);
- void selectTab(std::string tab_name);
-
- // Called when embedded in a floater during a close attempt.
- BOOL canClose();
-
- // Checks if the current tab needs to be applied, and tries to switch to the requested tab.
- BOOL attemptTransition();
-
- // Switches to the requested tab (will close() if requested is NULL)
- void transitionToTab();
-
- void updateTabVisibility();
-
- // Used by attemptTransition to query the user's response to a tab that needs to apply.
- bool handleNotifyCallback(const LLSD& notification, const LLSD& response);
- bool apply();
- void refreshData();
- void closePanel();
void draw();
+ void onOpen(const LLSD& key);
+
// Group manager observer trigger.
virtual void changed(LLGroupChange gc);
- // PanelGroupTab observer trigger
- virtual void tabChanged();
-
- void setAllowEdit(BOOL v) { mAllowEdit = v; }
-
void showNotice(const std::string& subject,
const std::string& message,
const bool& has_inventory,
const std::string& inventory_name,
LLOfferInfo* inventory_offer);
+
+ void notifyObservers();
+
+ bool apply();
+ void refreshData();
+
+ virtual void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
+
+ void setAllowEdit(BOOL v) { mAllowEdit = v; }
+
+
+ static void refreshCreatedGroup(const LLUUID& group_id);
+
+ static void showNotice(const std::string& subject,
+ const std::string& message,
+ const LLUUID& group_id,
+ const bool& has_inventory,
+ const std::string& inventory_name,
+ LLOfferInfo* inventory_offer);
+
+
protected:
- LLPanelGroupTab* mCurrentTab;
- LLPanelGroupTab* mRequestedTab;
- LLTabContainer* mTabContainer;
- BOOL mIgnoreTransition;
+ void onBtnCreate();
+ void onBackBtnClick();
- LLButton* mApplyBtn;
+ static void onBtnApply(void*);
+ static void onBtnRefresh(void*);
+
+
+protected:
+ bool apply(LLPanelGroupTab* tab);
LLTimer mRefreshTimer;
- BOOL mForceClose;
+ BOOL mAllowEdit;
std::string mDefaultNeedsApplyMesg;
std::string mWantApplyMesg;
- BOOL mAllowEdit;
- BOOL mShowingNotifyDialog;
+ std::vector<LLPanelGroupTab* > mTabs;
+
};
class LLPanelGroupTab : public LLPanel
{
public:
- LLPanelGroupTab(const LLUUID& group_id);
+ LLPanelGroupTab();
virtual ~LLPanelGroupTab();
- // Factory that returns a new LLPanelGroupFoo tab.
- static void* createTab(void* data);
-
// Triggered when the tab becomes active.
virtual void activate() { }
@@ -168,20 +154,19 @@ public:
void setAllowEdit(BOOL v) { mAllowEdit = v; }
- void addObserver(LLPanelGroupTabObserver *obs);
- void removeObserver(LLPanelGroupTabObserver *obs);
- void notifyObservers();
+ virtual void setGroupID(const LLUUID& id) {mGroupID = id;};
+
+ void notifyObservers() {};
+
+ const LLUUID& getGroupID() const { return mGroupID;}
protected:
LLUUID mGroupID;
- LLTabContainer* mTabContainer;
std::string mHelpText;
BOOL mAllowEdit;
BOOL mHasModal;
- typedef std::set<LLPanelGroupTabObserver*> observer_list_t;
- observer_list_t mObservers;
};
#endif // LL_LLPANELGROUP_H