libAlgAudio  v1.99-440-g08538e5-dirty
The development library for AlgAudio framework.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
UIVisibilityBase.hpp
Go to the documentation of this file.
1 #ifndef UIVISIBILITYBASE_HPP
2 #define UIVISIBILITYBASE_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 namespace AlgAudio{
22 
24 public:
25  enum class DisplayMode{
26  Visible,
27  EmptySpace,
28  Invisible,
29  };
32  if(m == display_mode) return;
33  display_mode = m;
35  }
40  inline bool IsDrawn() const {return display_mode == DisplayMode::Visible;}
42  inline bool IsInvisible() const {return display_mode == DisplayMode::Invisible; }
43 
46 
47 protected:
48  UIVisibilityBase() {} // Only construcible when inherited
49 
51 };
52 
53 } // namespace AlgAudio
54 
55 #endif // UIVISIBILITYBASE_HPP
Signal on_display_mode_changed
Definition: UIVisibilityBase.hpp:45
Definition: UIVisibilityBase.hpp:23
DisplayMode
Definition: UIVisibilityBase.hpp:25
bool Happen(Types...t)
Definition: Signal.hpp:187
bool IsDrawn() const
Definition: UIVisibilityBase.hpp:40
bool IsInvisible() const
Definition: UIVisibilityBase.hpp:42
Definition: Alertable.hpp:26
DisplayMode display_mode
Definition: UIVisibilityBase.hpp:50
void SetDisplayMode(DisplayMode m)
Definition: UIVisibilityBase.hpp:31
UIVisibilityBase()
Definition: UIVisibilityBase.hpp:48
Definition: Signal.hpp:145