diff options
author | Andrew Dyukov <adyukov@productengine.com> | 2010-01-14 17:42:21 +0200 |
---|---|---|
committer | Andrew Dyukov <adyukov@productengine.com> | 2010-01-14 17:42:21 +0200 |
commit | eb800ade7eb27038823e12f667901ea32c14160d (patch) | |
tree | 809577184c70d83a551bf0beb101a685a7ac4400 /indra/newview/llnearbychatbar.h | |
parent | b91a3967a44cbae619775922a57e100db7235385 (diff) |
At last! Implemented normal task EXT-3477 (Change gesture list implementation).
Created a new widget consisting of button and scrollist. List is added to NonSideTrayView
to properly draw it without using topcontrol (because it caused problems).
This commit also fixes following bugs:
EXT-3301 (Opening Gestures on Bottom Tray Disables Move Button)
EXT-3190 (No bottom tray's context menu appears if right mouse click was perform over enabled Gesture button)
EXT-2610 ('Gesture' btn: floater opens on OnMouseDown)
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llnearbychatbar.h')
-rw-r--r-- | indra/newview/llnearbychatbar.h | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/indra/newview/llnearbychatbar.h b/indra/newview/llnearbychatbar.h index 224118e088..d9a7403611 100644 --- a/indra/newview/llnearbychatbar.h +++ b/indra/newview/llnearbychatbar.h @@ -42,33 +42,52 @@ #include "llspeakers.h" -class LLGestureComboBox - : public LLComboBox - , public LLGestureManagerObserver +class LLGestureComboList + : public LLGestureManagerObserver + , public LLUICtrl { public: - struct Params : public LLInitParam::Block<Params, LLComboBox::Params> { }; + struct Params : public LLInitParam::Block<Params, LLUICtrl::Params> + { + Optional<LLButton::Params> combo_button; + Optional<LLScrollListCtrl::Params> combo_list; + + Params(); + }; + protected: - LLGestureComboBox(const Params&); + friend class LLUICtrlFactory; + LLGestureComboList(const Params&); + std::vector<LLMultiGesture*> mGestures; + std::string mLabel; + LLSD::Integer mViewAllItemIndex; + public: - ~LLGestureComboBox(); + ~LLGestureComboList(); + + LLCtrlListInterface* getListInterface() { return (LLCtrlListInterface*)mList; }; + virtual void showList(); + virtual void hideList(); + virtual BOOL handleKey(KEY key, MASK mask, BOOL called_from_parent); + + S32 getCurrentIndex() const; + void onItemSelected(const LLSD& data); + void sortByName(bool ascending = true); void refreshGestures(); void onCommitGesture(); - virtual void draw(); + void onButtonCommit(); + virtual LLSD getValue() const; // LLGestureManagerObserver trigger virtual void changed() { refreshGestures(); } -protected: - - virtual void showList(); +private: - LLFrameTimer mGestureLabelTimer; - std::vector<LLMultiGesture*> mGestures; - std::string mLabel; - LLSD::Integer mViewAllItemIndex; + LLButton* mButton; + LLScrollListCtrl* mList; + S32 mLastSelectedIndex; }; class LLNearbyChatBar |