diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-05 21:48:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-05 21:48:30 +0300 |
commit | 6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed (patch) | |
tree | 79a54d4c838c85df29b1b95702b71a95c43ceb5a /src/guichan/widgets/dropdown.cpp | |
parent | d1bb1b375d657f0821ccfebf18fa1c3873314690 (diff) | |
download | manaverse-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.gz manaverse-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.bz2 manaverse-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.tar.xz manaverse-6fee84f3838bdd900e8cfc4a1e4d7f15f35bd6ed.zip |
Improve constructors in some classes.
Diffstat (limited to 'src/guichan/widgets/dropdown.cpp')
-rw-r--r-- | src/guichan/widgets/dropdown.cpp | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/src/guichan/widgets/dropdown.cpp b/src/guichan/widgets/dropdown.cpp index c446b869d..39248ab73 100644 --- a/src/guichan/widgets/dropdown.cpp +++ b/src/guichan/widgets/dropdown.cpp @@ -59,29 +59,26 @@ namespace gcn { DropDown::DropDown(ListModel *const listModel, ScrollArea *const scrollArea, - ListBox *const listBox) + ListBox *const listBox) : + ActionListener(), + BasicContainer(), + KeyListener(), + MouseListener(), + FocusListener(), + SelectionListener(), + mDroppedDown(false), + mPushed(false), + mFoldedUpHeight(0), + mInternalScrollArea(!scrollArea), + mScrollArea(mInternalScrollArea ? new ScrollArea : scrollArea), + mInternalListBox(!listBox), + mListBox(mInternalListBox ? new ListBox() : listBox), + mIsDragged(false) { setWidth(100); setFocusable(true); - mDroppedDown = false; - mPushed = false; - mIsDragged = false; setInternalFocusHandler(&mInternalFocusHandler); - - mInternalScrollArea = (!scrollArea); - mInternalListBox = (!listBox); - - if (mInternalScrollArea) - mScrollArea = new ScrollArea(); - else - mScrollArea = scrollArea; - - if (mInternalListBox) - mListBox = new ListBox(); - else - mListBox = listBox; - mScrollArea->setContent(mListBox); add(mScrollArea); |