libAlgAudio  v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ModuleSelector.hpp
Go to the documentation of this file.
1 #ifndef MODULESELECTOR_HPP
2 #define MODULESELECTOR_HPP
3 /*
4 This file is part of AlgAudio.
5 
6 AlgAudio, Copyright (C) 2015 CeTA - Audiovisual Technology Center
7 
8 AlgAudio is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Lesser General Public License as
10 published by the Free Software Foundation, either version 3 of the
11 License, or (at your option) any later version.
12 
13 AlgAudio is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Lesser General Public License for more details.
17 
18 You should have received a copy of the GNU Lesser General Public License
19 along with AlgAudio. If not, see <http://www.gnu.org/licenses/>.
20 */
21 
22 #include "Window.hpp"
23 #include "UI/UIBox.hpp"
24 #include "UI/UIAnimDrawer.hpp"
25 #include "UI/UIList.hpp"
26 #include "UI/UILabel.hpp"
27 #include "UI/UIMarginBox.hpp"
28 #include "UI/UISeparator.hpp"
29 
30 namespace AlgAudio{
31 
34 class ModuleSelector : public UIHBox{
35 public:
36  static std::shared_ptr<ModuleSelector> Create(std::weak_ptr<Window> parent_window);
41  void Populate() {PopulateLvl1();}
43  void Expose();
45  void Hide();
46  bool IsExposed() {return exposed; }
47 private:
48  ModuleSelector(std::weak_ptr<Window> parent_window);
49  void PopulateLvl1();
50  void PopulateLvl2();
51  void ShowLvl2();
52  void init();
53  bool exposed = false;
54  std::shared_ptr<UIHBox> drawersbox;
55  std::shared_ptr<UIAnimDrawer> drawerlvl1;
56  std::shared_ptr<UIAnimDrawer> drawerlvl2;
57  std::shared_ptr<UIList> listlvl1;
58  std::shared_ptr<UIList> listlvl2;
59  std::shared_ptr<UIMarginBox> description_box;
60  std::shared_ptr<UILabel> description_label;
61  std::shared_ptr<UISeparator> lvl1_separator;
62  std::shared_ptr<UISeparator> lvl2_separator;
63  std::shared_ptr<UIVBox> lvl1_box;
64  std::shared_ptr<UIVBox> lvl2_box;
65 
66  Subscription lvl1_anim_end_wait;
67  Subscription lvl2_anim_end_wait;
68 
69  std::string lvl1_selection = "";
70 };
71 
72 } //namespace AlgAudio
73 #endif // MODULESELECTOR_HPP
Definition: UIBox.hpp:92
void Populate()
Definition: ModuleSelector.hpp:41
static std::shared_ptr< ModuleSelector > Create(std::weak_ptr< Window > parent_window)
bool IsExposed()
Definition: ModuleSelector.hpp:46
Definition: ModuleSelector.hpp:34
Signal< std::string > on_complete
Definition: ModuleSelector.hpp:40
Definition: Alertable.hpp:26
Definition: Signal.hpp:44