diff options
author | Andrei Karas <akaras@inbox.ru> | 2013-05-31 22:10:04 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2013-05-31 22:10:04 +0300 |
commit | ce59f2855e3d52615b133478a101c016b0122ba8 (patch) | |
tree | 5a3159efb2c9df48c79288418bbb535ab6a6c6f2 /src/gui/widgets/dropdown.h | |
parent | 639d8883192accdc502ec11ea2bfee474320c06e (diff) | |
download | mv-ce59f2855e3d52615b133478a101c016b0122ba8.tar.gz mv-ce59f2855e3d52615b133478a101c016b0122ba8.tar.bz2 mv-ce59f2855e3d52615b133478a101c016b0122ba8.tar.xz mv-ce59f2855e3d52615b133478a101c016b0122ba8.zip |
improve dropdown.
Diffstat (limited to 'src/gui/widgets/dropdown.h')
-rw-r--r-- | src/gui/widgets/dropdown.h | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/gui/widgets/dropdown.h b/src/gui/widgets/dropdown.h index 4c6120dfa..da0251260 100644 --- a/src/gui/widgets/dropdown.h +++ b/src/gui/widgets/dropdown.h @@ -104,11 +104,11 @@ class DropDown final : public gcn::ActionListener, void mouseWheelMovedDown(gcn::MouseEvent& mouseEvent) override; - void setSelectedString(std::string str); + void setSelectedString(const std::string &str); std::string getSelectedString() const A_WARN_UNUSED; - void valueChanged(const gcn::SelectionEvent& event); + void valueChanged(const gcn::SelectionEvent& event) override; void updateSelection(); @@ -124,7 +124,7 @@ class DropDown final : public gcn::ActionListener, void setSelected(int selected); - void setListModel(gcn::ListModel *listModel); + void setListModel(gcn::ListModel *const listModel); gcn::ListModel *getListModel(); @@ -132,9 +132,9 @@ class DropDown final : public gcn::ActionListener, void removeSelectionListener(SelectionListener* selectionListener); - gcn::Rectangle getChildrenArea(); + gcn::Rectangle getChildrenArea() override; - void action(const gcn::ActionEvent &actionEvent); + void action(const gcn::ActionEvent &actionEvent) override; void distributeValueChangedEvent(); @@ -146,7 +146,6 @@ class DropDown final : public gcn::ActionListener, */ void drawButton(gcn::Graphics *graphics); - bool mExtended; PopupList *mPopup; gcn::Color mShadowColor; gcn::Color mHighlightColor; @@ -154,15 +153,17 @@ class DropDown final : public gcn::ActionListener, int mImagePadding; int mSpacing; gcn::Color mForegroundColor2; - - bool mDroppedDown; - bool mPushed; int mFoldedUpHeight; - bool mIsDragged; + typedef std::list<SelectionListener*> SelectionListenerList; SelectionListenerList mSelectionListeners; typedef SelectionListenerList::iterator SelectionListenerIterator; + bool mExtended; + bool mDroppedDown; + bool mPushed; + bool mIsDragged; + // Add own Images. static int instances; static Image *buttons[2][2]; |