diff options
author | Mark Palange <palange@lindenlab.com> | 2009-01-13 03:46:56 +0000 |
---|---|---|
committer | Mark Palange <palange@lindenlab.com> | 2009-01-13 03:46:56 +0000 |
commit | 446c55538e1fb12d8a1feb541edf99c16bb29121 (patch) | |
tree | 022ca3c10bd2e0326098719cdffb65f9465ab08f /indra/llui/llmenugl.h | |
parent | 5476aca88e4b34d4d145f3a0b04fce95402c7b1f (diff) |
svn merge -r106055-107012 svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer_1-22/
merge RC5 changes into trunk, plus add'l localization xml (all newly added) files that should have been added with RC0-RC4 merge, but weren't.
Diffstat (limited to 'indra/llui/llmenugl.h')
-rw-r--r-- | indra/llui/llmenugl.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/indra/llui/llmenugl.h b/indra/llui/llmenugl.h index 30398fb8f8..a2ef968bcd 100644 --- a/indra/llui/llmenugl.h +++ b/indra/llui/llmenugl.h @@ -90,6 +90,7 @@ public: static const LLColor4& getHighlightFGColor() { return sHighlightForeground; } LLMenuItemGL( const std::string& name, const std::string& label, KEY key = KEY_NONE, MASK = MASK_NONE ); + virtual ~LLMenuItemGL() {}; virtual void setValue(const LLSD& value) { setLabel(value.asString()); } @@ -562,8 +563,11 @@ private: class LLMenuItemBranchGL : public LLMenuItemGL { public: - LLMenuItemBranchGL( const std::string& name, const std::string& label, LLMenuGL* branch, + LLMenuItemBranchGL( const std::string& name, const std::string& label, LLHandle<LLView> branch, KEY key = KEY_NONE, MASK mask = MASK_NONE ); + + virtual ~LLMenuItemBranchGL(); + virtual LLXMLNodePtr getXML(bool save_children = true) const; virtual std::string getType() const { return "menu"; } @@ -590,11 +594,11 @@ public: virtual BOOL handleKeyHere(KEY key, MASK mask); - virtual BOOL isActive() const { return isOpen() && mBranch->getHighlightedItem(); } + virtual BOOL isActive() const { return isOpen() && getBranch()->getHighlightedItem(); } - virtual BOOL isOpen() const { return mBranch->isOpen(); } + virtual BOOL isOpen() const { return getBranch() && getBranch()->isOpen(); } - LLMenuGL *getBranch() const { return mBranch; } + LLMenuGL *getBranch() const { return (LLMenuGL*)(mBranch.get()); } virtual void updateBranchParent( LLView* parentp ); @@ -603,14 +607,14 @@ public: virtual void draw(); - virtual void setEnabledSubMenus(BOOL enabled) { mBranch->setEnabledSubMenus(enabled); } + virtual void setEnabledSubMenus(BOOL enabled) { if(getBranch()) getBranch()->setEnabledSubMenus(enabled); } virtual void openMenu(); virtual LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const; private: - LLMenuGL* mBranch; + LLHandle<LLView> mBranch; }; // end class LLMenuItemBranchGL |