Select.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <vector>
9 #include <etk/types.hpp>
11 
12 namespace ewol {
13  namespace widget {
14  class Select;
15  using SelectShared = ememory::SharedPtr<ewol::widget::Select>;
16  using SelectWeak = ememory::WeakPtr<ewol::widget::Select>;
21  class Select : public ewol::widget::SpinBase {
22  public: // signals
23  esignal::Signal<int32_t> signalValue;
24  public: // properties
26  protected:
31  Select();
32  public:
33  DECLARE_WIDGET_FACTORY(Select, "Select");
37  virtual ~Select();
38  protected:
39  class Element {
40  public:
41  int32_t m_value;
42  std::string m_name;
43  bool m_selected;
44  public:
45  Element(int32_t _value, std::string _name, bool _selected=false);
46  };
47  std::vector<ewol::widget::Select::Element> m_listElement;
48  public:
49  void optionSelectDefault();
50  void optionRemove(int32_t _value);
51  void optionClear();
52  void optionAdd(int32_t _value, std::string _name);
53  protected:
54  bool loadXML(const exml::Element& _node) override;
55  void updateGui() override;
56  protected:
57  void onCallbackOpenMenu();
58  void onCallbackLabelPressed(int32_t _value);
59  protected:
60  esignal::Connection m_connectionEntry;
61  esignal::Connection m_connectionButton;
62  protected:
63  virtual void onChangePropertyValue();
64  };
65  };
66 };
a composed Select is a Select with an inside composed with the specify XML element ==> this permit to...
Definition: Select.hpp:21
eproperty::Value< int32_t > propertyValue
Current state of the Select.
Definition: Select.hpp:25
Definition: Select.hpp:39
Definition: Area.hpp:16
bool loadXML(const exml::Element &_node) override
load properties with an XML node.
Select()
Constructor.
virtual ~Select()
Destructor.
Definition: SpinBase.hpp:64