/** @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 #include #include #include namespace ewol { namespace widget { enum spinPosition { /** show like: * *------------------------* * | | * *------------------------* */ spinPosition_noneNone, /** show like: * *--------------------*---* * | | | * *--------------------*---* */ spinPosition_noneRight, /** show like: * *---*--------------------* * | | | * *---*--------------------* */ spinPosition_leftNone, /** show like: * *---*----------------*---* * | | | | * *---*----------------*---* */ spinPosition_leftRight, /** show like: * *---*---*----------------* * | | | | * *---*---*----------------* */ spinPosition_leftLeft, /** show like: * *----------------*---*---* * | | | | * *----------------*---*---* */ spinPosition_RightRight }; class SpinBase; using SpinBase = ememory::Ptr; using SpinBaseWeak = ememory::WeakPtr; /** * @ingroup ewolWidgetGroup */ class SpinBase : public ewol::widget::Sizer { public: // properties list: eproperty::Value propertyShape; //!< Shape of the widget eproperty::List propertySpinMode; //!< How to display the spin base public: UN_DECLARE_FACTORY(SpinBase); protected: ememory::Ptr this.config; int this.confIdEntryShaper; int this.confIdUpShaper; int this.confIdDownShaper; int this.confIdUpData; int this.confIdDownData; protected: /** * @brief Constructor * @param[in] _mode The mode to display the elements */ SpinBase(); void init() ; public: /** * @brief Destructor */ ~SpinBase(); protected: ewol::widget::Entry this.widgetEntry; ewol::widget::Button this.widgetButtonDown; ewol::widget::Button this.widgetButtonUp; void updateGui(); public: boolean loadXML( exml::Element _node) ; protected: void onChangePropertySpinMode(); void onChangePropertyShape(); }; } }