Scroll.hpp
Go to the documentation of this file.
1 
6 #pragma once
7 
8 #include <etk/types.hpp>
9 #include <ewol/debug.hpp>
13 #include <ewol/widget/Manager.hpp>
14 
15 namespace ewol {
16  namespace widget {
17  class Scroll;
18  using ScrollShared = ememory::SharedPtr<ewol::widget::Scroll>;
19  using ScrollWeak = ememory::WeakPtr<ewol::widget::Scroll>;
21  public: // properties
26  public:
27  enum highSpeedMode {
28  speedModeDisable,
29  speedModeInit,
30  speedModeEnableFinger, // Specific for touchpad
31  speedModeEnableHorizontal, // Specific for mouse
32  speedModeEnableVertical, // Specific for mouse
33  speedModeGrepEndEvent
34  };
35  private:
36  ewol::compositing::Shaper m_shaperH;
37  ewol::compositing::Shaper m_shaperV;
38  private:
39  float m_pixelScrolling;
40  vec2 m_highSpeedStartPos;
41  enum highSpeedMode m_highSpeedMode;
42  int32_t m_highSpeedButton;
43  enum gale::key::type m_highSpeedType;
44  protected:
45  Scroll();
46  void init() override;
47  public:
48  DECLARE_WIDGET_FACTORY(Scroll, "Scroll");
49  virtual ~Scroll();
50  public:
51  void onChangeSize() override;
52  void calculateMinMaxSize() override;
53  void onRegenerateDisplay() override;
54  bool onEventInput(const ewol::event::Input& _event) override;
55  void systemDraw(const ewol::DrawProperty& _displayProp) override;
56  ewol::WidgetShared getWidgetAtPos(const vec2& _pos) override;
57  protected:
58  void onDraw() override;
59  protected:
60  virtual void onChangePropertyLimit();
61  virtual void onChangePropertyShapeVert();
62  virtual void onChangePropertyShapeHori();
63  };
64  }
65 }
66 
Definition: DrawProperty.hpp:15
Definition: Input.hpp:12
the Cotainer widget is a widget that have an only one subWidget
Definition: Container.hpp:21
eproperty::Value< std::string > propertyShapeHori
Horizontal shaper name.
Definition: Scroll.hpp:24
void calculateMinMaxSize() override
calculate the minimum and maximum size (need to estimate expend properties of the widget) ...
Definition: Area.hpp:16
void onChangeSize() override
Parent have set the size and the origin. the container need to update the subwidget property...
eproperty::Value< bool > propertyHover
Horizontal shaper name.
Definition: Scroll.hpp:25
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
eproperty::Value< std::string > propertyShapeVert
Vertical shaper name.
Definition: Scroll.hpp:23
Definition: Scroll.hpp:20
bool onEventInput(const ewol::event::Input &_event) override
Event on an input of this Widget (finger, mouse, stilet)
eproperty::Range< vec2 > propertyLimit
Set the limitation of the ratio in the sreen.
Definition: Scroll.hpp:22
the Shaper system is a basic theme configuration for every widget, it corespond at a background displ...
Definition: Shaper.hpp:39
void onDraw() override
Common widget drawing function (called by the drawing thread [Android, X11, ...]) ...
void onRegenerateDisplay() override
Event generated when a redraw is needed.
ewol::WidgetShared getWidgetAtPos(const vec2 &_pos) override
get the widget at the specific windows absolute position