WSlider.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 <esignal/Signal.hpp>
13 
14 namespace ewol {
15  namespace widget {
16  class WSlider;
17  using WSliderShared = ememory::SharedPtr<ewol::widget::WSlider>;
18  using WSliderWeak = ememory::WeakPtr<ewol::widget::WSlider>;
23  public:
24  enum sladingMode {
25  sladingTransitionVert,
26  sladingTransitionHori,
27  sladingTransition_count,
28  };
29  public: // signals:
30  esignal::Signal<> signalStartSlide;
31  esignal::Signal<> signalStopSlide;
32  public: // properties:
36  protected:
37  WSlider();
38  public:
39  DECLARE_WIDGET_FACTORY(WSlider, "WSlider");
40  virtual ~WSlider();
41  private:
42  int32_t m_windowsSources;
43  int32_t m_windowsDestination;
44  int32_t m_windowsRequested;
45  float m_slidingProgress;
46  protected:
51  void subWidgetSelectSetVectorId(int32_t _id);
52  public:
57  void subWidgetSelectSet(int32_t _id);
62  void subWidgetSelectSet(const ewol::WidgetShared& _widgetPointer);
67  void subWidgetSelectSet(const std::string& _widgetName);
68  public:
69  void onChangeSize() override;
70  void systemDraw(const ewol::DrawProperty& _displayProp) override;
71  void onRegenerateDisplay() override;
72  ewol::WidgetShared getWidgetAtPos(const vec2& _pos) override;
73  protected:
74  esignal::Connection m_PCH;
75 
79  void periodicCall(const ewol::event::Time& _event);
80  protected:
81  virtual void onChangePropertySelectWidget();
82  virtual void onChangePropertyTransitionMode();
83  };
84  }
85  std::ostream& operator <<(std::ostream& _os, const enum ewol::widget::WSlider::sladingMode _obj);
86 }
87 
void subWidgetSelectSet(int32_t _id)
Select a new subwidget to display.
void onRegenerateDisplay() override
Event generated when a redraw is needed.
the Cotainer widget is a widget that have an only one subWidget
Definition: ContainerN.hpp:22
Definition: DrawProperty.hpp:15
Definition: Time.hpp:14
Definition: Area.hpp:16
esignal::Connection m_PCH
Periodic call handle to remove it when needed.
Definition: WSlider.hpp:74
void onChangeSize() override
Parent have set the size and the origin. the container need to update the subwidget property...
eproperty::Value< std::string > propertySelectWidget
current select configuration
Definition: WSlider.hpp:35
Definition: WSlider.hpp:22
void systemDraw(const ewol::DrawProperty &_displayProp) override
{SYSTEM} extern interface to request a draw ... (called by the drawing thread [Android, X11, ...]) This function generate a clipping with the viewport openGL system. Like this a widget draw can not draw over an other widget
void subWidgetSelectSetVectorId(int32_t _id)
Generate the move on the specific vector ID (This is not a public acces, because the vector can have ...
eproperty::List< enum sladingMode > propertyTransitionMode
mode to slide the widgets
Definition: WSlider.hpp:34
eproperty::Range< float > propertyTransitionSpeed
speed of the transition (default 1 == > 1s)
Definition: WSlider.hpp:33
ewol::WidgetShared getWidgetAtPos(const vec2 &_pos) override
get the widget at the specific windows absolute position
void periodicCall(const ewol::event::Time &_event)
Periodic call to update grapgic display.