[DEV] corection widget slider
This commit is contained in:
parent
5fae28a6ed
commit
48e53b0bf2
@ -50,6 +50,11 @@ void ewol::compositing::Shaper::unLoadProgram(void) {
|
||||
ewol::resource::Program::release(m_GLprogram);
|
||||
ewol::resource::TextureFile::release(m_resourceTexture);
|
||||
ewol::resource::ConfigFile::release(m_config);
|
||||
m_confIdPaddingX = -1;
|
||||
m_confIdPaddingY = -1;
|
||||
m_confIdChangeTime = -1;
|
||||
m_confProgramFile = -1;
|
||||
m_confImageFile = -1;
|
||||
}
|
||||
|
||||
void ewol::compositing::Shaper::loadProgram(void) {
|
||||
|
@ -55,6 +55,7 @@ namespace ewol {
|
||||
* @return false == > some error occured
|
||||
*/
|
||||
bool loadFromString(const std::string& _composerXmlString);
|
||||
protected:
|
||||
/**
|
||||
* @brief Register an Event an named widget. @see registerOnEvent
|
||||
* @param[in] _subWidgetName Name of the subWidget.
|
||||
@ -67,6 +68,7 @@ namespace ewol {
|
||||
const char * _eventId,
|
||||
const char * _eventIdgenerated = NULL,
|
||||
const std::string& _overloadData="");
|
||||
public:
|
||||
/**
|
||||
* @brief Register an Event an named widget. @see registerOnEvent
|
||||
* @param[in] _destinationObject pointer on the object that might be call when an event is generated
|
||||
|
@ -24,6 +24,7 @@
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/Scroll.h>
|
||||
#include <ewol/widget/PopUp.h>
|
||||
#include <ewol/widget/WSlider.h>
|
||||
#include <vector>
|
||||
|
||||
#undef __class__
|
||||
@ -56,6 +57,7 @@ ewol::widget::Manager::Manager(void) :
|
||||
ewol::widget::Scroll::init(*this);
|
||||
ewol::widget::ContextMenu::init(*this);
|
||||
ewol::widget::PopUp::init(*this);
|
||||
ewol::widget::WSlider::init(*this);
|
||||
}
|
||||
|
||||
ewol::widget::Manager::~Manager(void) {
|
||||
|
@ -107,6 +107,19 @@ void ewol::widget::WSlider::calculateSize(const vec2& _availlable) {
|
||||
markToRedraw();
|
||||
}
|
||||
|
||||
void ewol::widget::WSlider::subWidgetSelectSetVectorId(int32_t _id) {
|
||||
if (_id<0) {
|
||||
EWOL_ERROR("Can not change to a widget not present : vectID=" << _id);
|
||||
return;
|
||||
}
|
||||
if (_id != m_windowsDestination) {
|
||||
m_windowsRequested = _id;
|
||||
generateEventId(eventStartSlide);
|
||||
periodicCallEnable();
|
||||
markToRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
void ewol::widget::WSlider::subWidgetSelectSet(int32_t _id) {
|
||||
int32_t elementID = -1;
|
||||
// search element in the list :
|
||||
@ -118,16 +131,7 @@ void ewol::widget::WSlider::subWidgetSelectSet(int32_t _id) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (elementID<0) {
|
||||
EWOL_ERROR("Can not change to a widget not present : uid="<<_id);
|
||||
return;
|
||||
}
|
||||
if (elementID != m_windowsDestination) {
|
||||
m_windowsRequested = elementID;
|
||||
generateEventId(eventStartSlide);
|
||||
periodicCallEnable();
|
||||
markToRedraw();
|
||||
}
|
||||
subWidgetSelectSetVectorId(elementID);
|
||||
}
|
||||
|
||||
void ewol::widget::WSlider::subWidgetSelectSet(ewol::Widget* _widgetPointer) {
|
||||
@ -138,7 +142,7 @@ void ewol::widget::WSlider::subWidgetSelectSet(ewol::Widget* _widgetPointer) {
|
||||
for (size_t iii=0; iii<m_subWidget.size(); iii++) {
|
||||
if (m_subWidget[iii] != NULL) {
|
||||
if (m_subWidget[iii] == _widgetPointer) {
|
||||
subWidgetSelectSet(iii);
|
||||
subWidgetSelectSetVectorId(iii);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -154,7 +158,7 @@ void ewol::widget::WSlider::subWidgetSelectSet(const std::string& _widgetName) {
|
||||
for (size_t iii=0; iii<m_subWidget.size(); iii++) {
|
||||
if (m_subWidget[iii] != NULL) {
|
||||
if (m_subWidget[iii]->getName() == _widgetName) {
|
||||
subWidgetSelectSet(iii);
|
||||
subWidgetSelectSetVectorId(iii);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,7 @@ namespace ewol {
|
||||
static const char* const eventStartSlide;
|
||||
static const char* const eventStopSlide;
|
||||
// Config list of properties
|
||||
// TODO : remove the dynamic transition and set this in annimation ...
|
||||
static const char* const configMode;
|
||||
enum sladingMode {
|
||||
sladingTransitionVert,
|
||||
@ -40,6 +41,12 @@ namespace ewol {
|
||||
int32_t m_windowsDestination; //!< widget destinated viewed
|
||||
int32_t m_windowsRequested; //!< widget destination requested when change in modification in progress
|
||||
float m_slidingProgress; //!< ratio progression of a sliding
|
||||
protected:
|
||||
/**
|
||||
* @brief Generate the move on the specific vector ID (This is not a public acces, because the vector can have some null pointer inside ...)
|
||||
* @param[in] _id Id in the vector
|
||||
*/
|
||||
void subWidgetSelectSetVectorId(int32_t _id);
|
||||
public:
|
||||
/**
|
||||
* @brief Select a new subwidget to display
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user