Sizer.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/Manager.hpp>
12 #include <etk/Color.hpp>
14 
15 namespace ewol {
16  namespace widget {
17  class Sizer;
18  using SizerShared = ememory::SharedPtr<ewol::widget::Sizer>;
19  using SizerWeak = ememory::WeakPtr<ewol::widget::Sizer>;
24  public:
25  enum displayMode {
28  };
29  enum animation {
35  //animationZoom //!< element came from zooming
36  };
37  public: // properties:
42  protected:
47  Sizer();
48  public:
49  DECLARE_WIDGET_FACTORY(Sizer, "Sizer");
53  virtual ~Sizer();
54  public:
55  void onChangeSize() override;
56  void calculateMinMaxSize() override;
57  // overwrite the set fuction to start annimations ...
58  int32_t subWidgetAdd(ewol::WidgetShared _newWidget) override;
59  int32_t subWidgetAddStart(ewol::WidgetShared _newWidget) override;
60  void subWidgetRemove(ewol::WidgetShared _newWidget) override;
61  void subWidgetUnLink(ewol::WidgetShared _newWidget) override;
62  protected:
63  virtual void onChangePropertyMode();
64  virtual void onChangePropertyBorderSize();
65  };
66  }
67 }
68 
eproperty::Value< gale::Dimension > propertyBorderSize
Border size needed for all the display.
Definition: Sizer.hpp:39
the Cotainer widget is a widget that have an only one subWidget
Definition: ContainerN.hpp:22
eproperty::List< enum displayMode > propertyMode
Methode to display the widget list (vert/hory ...)
Definition: Sizer.hpp:38
eproperty::Value< float > propertyAnimationTime
Time in second to generate animation.
Definition: Sizer.hpp:41
int32_t subWidgetAdd(ewol::WidgetShared _newWidget) override
add at end position a Widget (note : This system use an inverted phylisophie (button to top...
Horizontal mode.
Definition: Sizer.hpp:27
element came from the buttom
Definition: Sizer.hpp:32
int32_t subWidgetAddStart(ewol::WidgetShared _newWidget) override
add at start position a Widget (note : This system use an inverted phylisophie (button to top...
element came from the Left
Definition: Sizer.hpp:33
displayMode
Definition: Sizer.hpp:25
Definition: Area.hpp:16
element came from the top
Definition: Sizer.hpp:31
Vertical mode.
Definition: Sizer.hpp:26
void subWidgetRemove(ewol::WidgetShared _newWidget) override
remove definitly a widget from the system and this layer.
eproperty::List< enum animation > propertyAnimation
Methode add and remove element (animation)
Definition: Sizer.hpp:40
virtual ~Sizer()
Destructor.
animation
Definition: Sizer.hpp:29
element came from the right
Definition: Sizer.hpp:34
void calculateMinMaxSize() override
calculate the minimum and maximum size (need to estimate expend properties of the widget) ...
No annimation.
Definition: Sizer.hpp:30
void subWidgetUnLink(ewol::WidgetShared _newWidget) override
Just unlick the specify widget, this function does not remove it from the system (if you can...
Sizer()
Constructor.
void onChangeSize() override
Parent have set the size and the origin. the container need to update the subwidget property...
Definition: Sizer.hpp:23