/** @file * @author Edouard DUPIN * @copyright 2011, Edouard DUPIN, all right reserved * @license MPL v2.0 (see license file) */ #pragma once #include #include #include #include #include #include namespace ewol { namespace widget { class Scroll; using Scroll = ememory::Ptr; using ScrollWeak = ememory::WeakPtr; class Scroll : public ewol::widget::Container { public: // properties eproperty::Range propertyLimit; //!< Set the limitation of the ratio in the sreen eproperty::Value propertyShapeVert; //!< Vertical shaper name eproperty::Value propertyShapeHori; //!< Horizontal shaper name eproperty::Value propertyHover; //!< Horizontal shaper name public: enum highSpeedMode { speedModeDisable, speedModeInit, speedModeEnableFinger, // Specific for touchpad speedModeEnableHorizontal, // Specific for mouse speedModeEnableVertical, // Specific for mouse speedModeGrepEndEvent }; private: ewol::compositing::Shaper this.shaperH; //!< Compositing theme Horizontal. ewol::compositing::Shaper this.shaperV; //!< Compositing theme Vertical. private: float this.pixelScrolling; Vector2f this.highSpeedStartPos; enum highSpeedMode this.highSpeedMode; int this.highSpeedButton; KeyType this.highSpeedType; protected: Scroll(); void init() ; public: DECLARE_WIDGET_FACTORY(Scroll, "Scroll"); ~Scroll(); public: void onChangeSize() ; void calculateMinMaxSize() ; void onRegenerateDisplay() ; boolean onEventInput( ewol::event::Input _event) ; void systemDraw( ewol::DrawProperty _displayProp) ; Widget getWidgetAtPos( Vector2f _pos) ; protected: void onDraw() ; protected: void onChangePropertyLimit(); void onChangePropertyShapeVert(); void onChangePropertyShapeHori(); }; } }