Label.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <ewol/debug.hpp>
11 #include <ewol/widget/Widget.hpp>
12 #include <ewol/widget/Manager.hpp>
14 #include <esignal/Signal.hpp>
15 
16 namespace ewol {
17  namespace widget {
18  class Label;
19  using LabelShared = ememory::SharedPtr<ewol::widget::Label>;
20  using LabelWeak = ememory::WeakPtr<ewol::widget::Label>;
24  class Label : public ewol::Widget {
25  public: // signals
26  esignal::Signal<> signalPressed;
27  public: // properties
30  private:
32  std::u32string m_value;
34  int32_t m_colorDefaultFgText;
35  int32_t m_colorDefaultBgText;
36  protected:
41  Label();
42  void init() override;
43  public:
44  DECLARE_WIDGET_FACTORY(Label, "Label");
48  virtual ~Label();
49  protected:
50  void onDraw() override;
51  public:
52  void calculateMinMaxSize() override;
53  void onRegenerateDisplay() override;
54  bool onEventInput(const ewol::event::Input& _event) override;
55  bool loadXML(const exml::Element& _node) override;
56  protected:
57  virtual void onChangePropertyValue();
58  virtual void onChangePropertyAutoTranslate();
59  };
60  };
61 };
62 
Definition: Label.hpp:24
void onDraw() override
Common widget drawing function (called by the drawing thread [Android, X11, ...]) ...
Definition: Input.hpp:12
void onRegenerateDisplay() override
Event generated when a redraw is needed.
Definition: Text.hpp:22
virtual ~Label()
destructor
Label()
Constructor.
eproperty::Value< bool > propertyAutoTranslate
if at true the data is translate automaticaly translate.
Definition: Label.hpp:28
bool onEventInput(const ewol::event::Input &_event) override
Event on an input of this Widget (finger, mouse, stilet)
Definition: Area.hpp:16
Widget class is the main widget interface, it hase some generic properties: :** known his parent :** ...
Definition: Widget.hpp:73
bool loadXML(const exml::Element &_node) override
load properties with an XML node.
void calculateMinMaxSize() override
calculate the minimum and maximum size (need to estimate expend properties of the widget) ...
eproperty::Value< std::string > propertyValue
decorated text to display.
Definition: Label.hpp:29