simplify the EObject class

This commit is contained in:
Edouard DUPIN 2012-07-24 17:51:25 +02:00
parent 5677af8e69
commit c824f361c2
65 changed files with 55 additions and 1646 deletions

View File

@ -358,7 +358,7 @@ void ewol::audio::effects::Play(int32_t effectId, float xxx, float yyy)
EWOL_ERROR("effect ID : " << effectId << " ==> has been removed");
return;
}
EWOL_ERROR("effect play : " << effectId );
EWOL_VERBOSE("effect play : " << effectId );
// try to find an empty slot :
for (int32_t iii=0; iii<ListEffectsPlaying.Size(); iii++) {
if (ListEffectsPlaying[iii]->IsFree()) {

View File

@ -160,39 +160,6 @@ int32_t ewol::EObject::GetId(void)
return m_uniqueId;
};
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT = "EObject";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::EObject::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT) {
return true;
} else {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::EObject::GetObjectType(void)
{
return ewol::TYPE_EOBJECT;
}
/**
* @brief Add a specific event Id in the list to prevent wrong link on a EObject

View File

@ -75,21 +75,13 @@ namespace ewol {
*/
int32_t GetId(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EObject"; };
protected:
/**
* @brief Add a specific event Id in the list to prevent wrong link on a EObject
@ -147,12 +139,8 @@ namespace ewol {
*/
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
};
extern const char * const TYPE_EOBJECT;
};
#define EWOL_CAST_EOBJECT(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT,ewol::EObject,curentPointer)
#endif

View File

@ -108,44 +108,6 @@ ewol::Widget::Widget(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET = "Widget";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Widget::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET) {
return true;
} else {
if(true == ewol::EObject::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Widget::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET;
}
/**
* @brief Set the widget hidden
* @param ---

View File

@ -122,13 +122,6 @@ namespace ewol {
*/
// TODO : Set this in private if possible ...
virtual ~Widget(void) { };
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
@ -136,7 +129,7 @@ namespace ewol {
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolWidget"; };
/**
* @brief This will be equivalent at the destructor @ref ~Widget
* @note this fuction "mark" the widget as removed an inform the widget manager that the widget has been removed by the user.

View File

@ -70,43 +70,6 @@ ewol::Windows::~Windows(void)
m_popUpWidgetList[m_currentCreateId].Clear();
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_WINDOWS = "Windows";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Windows::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_WINDOWS << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_WINDOWS) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_WINDOWS << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Windows::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_WINDOWS;
}
bool ewol::Windows::CalculateSize(float availlableX, float availlableY)
{

View File

@ -37,21 +37,13 @@ namespace ewol {
public:
Windows(void);
virtual ~Windows(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolWindows"; };
// internal event at ewol system :
public:
void SysDraw(void);
@ -111,10 +103,7 @@ namespace ewol {
virtual void OnObjectRemove(ewol::EObject * removeObject);
};
extern const char * const TYPE_EOBJECT_WIDGET_WINDOWS;
};
#define EWOL_CAST_WIDGET_WINDOWS(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_WINDOWS,ewol::Windows,curentPointer)
#endif

View File

@ -104,43 +104,6 @@ void ewol::Button::SetImage(etk::UString imageName)
MarkToReedraw();
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_BUTTON = "Button";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Button::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_BUTTON << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_BUTTON) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_BUTTON << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Button::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_BUTTON;
}
void ewol::Button::SetPadding(Vector2D<float> newPadding)
{

View File

@ -45,21 +45,13 @@ namespace ewol {
public:
Button(void);
Button(etk::UString newLabel);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolButton"; };
void Init(void);
virtual ~Button(void);
virtual bool CalculateMinSize(void);
@ -103,9 +95,6 @@ namespace ewol {
*/
void WIDGET_ButtonInit(void);
extern const char * const TYPE_EOBJECT_WIDGET_BUTTON;
};
#define EWOL_CAST_WIDGET_BUTTON(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_BUTTON,ewol::Button,curentPointer)
#endif

View File

@ -87,44 +87,6 @@ ewol::ButtonColor::~ButtonColor(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_BUTTON_COLOR = "ButtonColor";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ButtonColor::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_BUTTON_COLOR << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_BUTTON_COLOR) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_BUTTON_COLOR << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ButtonColor::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_BUTTON_COLOR;
}
void ewol::ButtonColor::SetPadding(Vector2D<float> newPadding)
{
@ -309,22 +271,19 @@ void ewol::ButtonColor::SetCurrentColor(color_ts color)
void ewol::ButtonColor::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
{
if (eventId == ewolEventColorChooserChange) {
//==> this is an internal event ...
ewol::ColorChooser * myColorChooser = EWOL_CAST_WIDGET_COLOR_CHOOSER(CallerObject);
if (NULL != myColorChooser) {
color_ts tmpColor = myColorChooser->GetColor();
m_selectedColor = tmpColor;
m_textColorBg = m_selectedColor;
char colorText[256];
sprintf(colorText, "#%02X%02X%02X%02X",
(uint8_t)(tmpColor.red * 0xFF),
(uint8_t)(tmpColor.green * 0xFF),
(uint8_t)(tmpColor.blue * 0xFF),
(uint8_t)(tmpColor.alpha * 0xFF));
//set the new label ...
SetLabel(colorText);
GenerateEventId(ewolEventButtonColorChange);
}
// TODO : Parse the input color ...
//color_ts tmpColor(data);
color_ts tmpColor;
m_selectedColor = tmpColor;
m_textColorBg = m_selectedColor;
char colorText[256];
sprintf(colorText, "#%02X%02X%02X%02X",
(uint8_t)(tmpColor.red * 0xFF),
(uint8_t)(tmpColor.green * 0xFF),
(uint8_t)(tmpColor.blue * 0xFF),
(uint8_t)(tmpColor.alpha * 0xFF));
//set the new label ...
SetLabel(colorText);
GenerateEventId(ewolEventButtonColorChange);
}
}

View File

@ -39,21 +39,13 @@ namespace ewol {
public:
ButtonColor(void);
ButtonColor(etk::UString newLabel);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolButtonColor"; };
void Init(void);
virtual ~ButtonColor(void);
virtual bool CalculateMinSize(void);
@ -104,9 +96,6 @@ namespace ewol {
*/
void WIDGET_ButtonColorInit(void);
extern const char * const TYPE_EOBJECT_WIDGET_BUTTON_COLOR;
};
#define EWOL_CAST_WIDGET_BUTTON_COLOR(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_BUTTON_COLOR,ewol::ButtonColor,curentPointer)
#endif

View File

@ -100,43 +100,6 @@ void ewol::ButtonImage::SetImageSelected(etk::UString imageName, color_ts col)
MarkToReedraw();
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_BUTTON_IMAGE = "ButtonImage";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ButtonImage::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_BUTTON_IMAGE << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_BUTTON_IMAGE) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_BUTTON_IMAGE << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ButtonImage::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_BUTTON_IMAGE;
}
void ewol::ButtonImage::SetValue(bool val)
{

View File

@ -35,21 +35,13 @@ namespace ewol {
{
public:
ButtonImage(etk::UString image, color_ts col=0xFFFFFFFF);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolButtonImage"; };
void Init(void);
virtual ~ButtonImage(void);
void SetImage(etk::UString imageName, color_ts col=0xFFFFFFFF);
@ -108,9 +100,6 @@ namespace ewol {
*/
void WIDGET_ButtonImageInit(void);
extern const char * const TYPE_EOBJECT_WIDGET_BUTTON_IMAGE;
};
#define EWOL_CAST_WIDGET_BUTTON_IMAGE(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_BUTTON_IMAGE,ewol::ButtonImage,curentPointer)
#endif

View File

@ -63,44 +63,6 @@ ewol::CheckBox::~CheckBox(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_CHECKBOX = "CheckBox";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::CheckBox::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_CHECKBOX << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_CHECKBOX) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_CHECKBOX << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::CheckBox::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_CHECKBOX;
}
bool ewol::CheckBox::CalculateMinSize(void)
{

View File

@ -37,21 +37,13 @@ namespace ewol {
public:
CheckBox(void);
CheckBox(etk::UString newLabel);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolCheckBox"; };
void Init(void);
virtual ~CheckBox(void);
virtual bool CalculateMinSize(void);
@ -79,10 +71,6 @@ namespace ewol {
virtual bool OnEventKb(eventKbType_te typeEvent, uniChar_t unicodeData);
};
extern const char * const TYPE_EOBJECT_WIDGET_CHECKBOX;
};
#define EWOL_CAST_WIDGET_CHECKBOX(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_CHECKBOX,ewol::CheckBox,curentPointer)
#endif

View File

@ -57,44 +57,6 @@ ewol::ColorBar::~ColorBar(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_COLOR_BAR = "ColorBar";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ColorBar::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_COLOR_BAR << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_COLOR_BAR) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_COLOR_BAR << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ColorBar::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_COLOR_BAR;
}
bool ewol::ColorBar::CalculateMinSize(void)
{

View File

@ -37,21 +37,13 @@ namespace ewol {
public:
ColorBar(void);
virtual ~ColorBar(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolColorBar"; };
virtual bool CalculateMinSize(void);
color_ts GetCurrentColor(void);
void SetCurrentColor(color_ts newOne);
@ -74,10 +66,6 @@ namespace ewol {
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, eventInputType_te typeEvent, Vector2D<float> pos);
};
extern const char * const TYPE_EOBJECT_WIDGET_COLOR_BAR;
};
#define EWOL_CAST_WIDGET_COLOR_BAR(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_COLOR_BAR,ewol::ColorBar,curentPointer)
#endif

View File

@ -56,45 +56,6 @@ ewol::ContextMenu::~ContextMenu(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_CONTEXT_MENU = "ContextMenu";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ContextMenu::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_CONTEXT_MENU << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_CONTEXT_MENU) {
return true;
} else {
if(true == ewol::EObject::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_CONTEXT_MENU << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ContextMenu::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_CONTEXT_MENU;
}
bool ewol::ContextMenu::CalculateSize(float availlableX, float availlableY)
{
EWOL_DEBUG("CalculateSize(" << availlableX << "," << availlableY << ")");

View File

@ -43,21 +43,13 @@ namespace ewol {
public:
ContextMenu(void);
virtual ~ContextMenu(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolContextMenu"; };
public:
virtual bool CalculateSize(float availlableX, float availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void); //update the min Size ... and the expend parameters for the sizer
@ -106,10 +98,6 @@ namespace ewol {
virtual void OnFlipFlopEvent(void);
};
extern const char * const TYPE_EOBJECT_WIDGET_CONTEXT_MENU;
};
#define EWOL_CAST_WIDGET_CONTEXT_MENU(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_CONTEXT_MENU,ewol::ContextMenu,curentPointer)
#endif

View File

@ -43,44 +43,6 @@ ewol::Drawable::~Drawable(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_DRAWABLE = "Drawable";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Drawable::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_DRAWABLE << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_DRAWABLE) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_DRAWABLE << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Drawable::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_DRAWABLE;
}
void ewol::Drawable::AddOObject(ewol::OObject* newObject, int32_t pos)
{

View File

@ -34,13 +34,6 @@ namespace ewol {
public:
Drawable(void);
virtual ~Drawable(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
@ -48,7 +41,7 @@ namespace ewol {
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolDrawable"; };
private:
etk::VectorType<ewol::OObject*> m_listOObject[NB_BOUBLE_BUFFER]; //!< generic element to display...
@ -59,12 +52,7 @@ namespace ewol {
virtual void OnDraw(DrawProperty& displayProp);
};
extern const char * const TYPE_EOBJECT_WIDGET_DRAWABLE;
};
#define EWOL_CAST_WIDGET_DRAWABLE(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_DRAWABLE,ewol::Drawable,curentPointer)
#endif

View File

@ -81,44 +81,6 @@ ewol::Entry::~Entry(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_ENTRY = "Entry";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Entry::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_ENTRY << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_ENTRY) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_ENTRY << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Entry::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_ENTRY;
}
bool ewol::Entry::CalculateMinSize(void)
{
int32_t fontId = GetDefaultFontId();

View File

@ -40,21 +40,13 @@ namespace ewol {
Entry(void);
Entry(etk::UString newData);
virtual ~Entry(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolEntry"; };
void Init(void);
virtual bool CalculateMinSize(void);
void SetValue(etk::UString newData);
@ -106,10 +98,6 @@ namespace ewol {
virtual void OnLostFocus(void);
};
extern const char * const TYPE_EOBJECT_WIDGET_ENTRY;
};
#define EWOL_CAST_WIDGET_ENTRY(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_ENTRY,ewol::Entry,curentPointer)
#endif

View File

@ -80,44 +80,6 @@ ewol::Image::~Image(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_IMAGE = "Image";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Image::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_IMAGE << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_IMAGE) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_IMAGE << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Image::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_IMAGE;
}
void ewol::Image::SetPadding(Vector2D<float> newPadding)
{
m_padding = newPadding;

View File

@ -36,21 +36,13 @@ namespace ewol {
{
public:
Image(etk::UString dataFile, int32_t size=-1); // automatic considering in the appl Data older
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolImage"; };
void Init(void);
virtual ~Image(void);
virtual bool CalculateMinSize(void);
@ -84,9 +76,6 @@ namespace ewol {
*/
void WIDGET_ImageInit(void);
extern const char * const TYPE_EOBJECT_WIDGET_IMAGE;
};
#define EWOL_CAST_WIDGET_IMAGE(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_IMAGE,ewol::Image,curentPointer)
#endif

View File

@ -127,43 +127,6 @@ ewol::Joystick::~Joystick(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_JOYSTICK = "Joystick";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Joystick::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_JOYSTICK << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_JOYSTICK) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_JOYSTICK << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Joystick::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_JOYSTICK;
}
/**
* @brief Parrent set the possible diplay size of the current widget whith his own possibilities
@ -275,7 +238,8 @@ bool ewol::Joystick::OnEventInput(ewol::inputType_te type, int32_t IdInput, even
if(ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
GenerateEventId(ewolEventJoystickEnable);
} else {
GenerateEventId(ewolEventJoystickMove);
etk::UString tmp = etk::UString("distance=") + etk::UString(m_distance) + etk::UString("angle=") + etk::UString(m_angle+M_PI/2);
GenerateEventId(ewolEventJoystickMove, tmp);
}
//teta += M_PI/2;
//EWOL_DEBUG("TETA = " << (m_angle*180/M_PI) << " deg distance = " << m_distance);

View File

@ -57,21 +57,13 @@ namespace ewol {
public:
Joystick(void);
virtual ~Joystick(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "Ewol"; };
/**
* @brief Parrent set the possible diplay size of the current widget whith his own possibilities
* By default this save the widget availlable size in the widget size
@ -150,10 +142,6 @@ namespace ewol {
*/
void WIDGET_JoystickDefaultForeground(etk::UString imageNameInData);
extern const char * const TYPE_EOBJECT_WIDGET_JOYSTICK;
};
#define EWOL_CAST_WIDGET_JOYSTICK(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_JOYSTICK,ewol::Joystick,curentPointer)
#endif

View File

@ -62,44 +62,6 @@ ewol::Label::~Label(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_LABEL = "Label";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Label::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_LABEL << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_LABEL) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_LABEL << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Label::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_LABEL;
}
bool ewol::Label::CalculateMinSize(void)
{
int32_t fontId = GetDefaultFontId();

View File

@ -37,21 +37,13 @@ namespace ewol {
public:
Label(void);
Label(etk::UString newLabel);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolLabel"; };
void Init(void);
virtual ~Label(void);
virtual bool CalculateMinSize(void);
@ -74,10 +66,6 @@ namespace ewol {
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, eventInputType_te typeEvent, Vector2D<float> pos);
};
extern const char * const TYPE_EOBJECT_WIDGET_LABEL;
};
#define EWOL_CAST_WIDGET_LABEL(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_LABEL,ewol::Label,curentPointer)
#endif

View File

@ -43,45 +43,6 @@ ewol::Layer::~Layer(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_LAYER = __class__;
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Layer::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_LAYER << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_LAYER) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_LAYER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Layer::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_LAYER;
}
bool ewol::Layer::CalculateSize(float availlableX, float availlableY)
{
//EWOL_DEBUG("Update Size");

View File

@ -35,21 +35,13 @@ namespace ewol {
public:
Layer(void);
virtual ~Layer(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolLayer"; };
public:
virtual bool CalculateSize(float availlableX, float availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void); //update the min Size ... and the expend parameters for the sizer
@ -94,10 +86,6 @@ namespace ewol {
virtual void OnObjectRemove(ewol::EObject * removeObject);
};
extern const char * const TYPE_EOBJECT_WIDGET_LAYER;
};
#define EWOL_CAST_WIDGET_LAYER(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_LAYER,ewol::Layer,curentPointer)
#endif

View File

@ -61,44 +61,6 @@ ewol::List::~List(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_LIST = "List";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::List::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_LIST << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_LIST) {
return true;
} else {
if(true == ewol::WidgetScrooled::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_LIST << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::List::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_LIST;
}
bool ewol::List::CalculateMinSize(void)
{
/*int32_t fontId = GetDefaultFontId();

View File

@ -36,21 +36,13 @@ namespace ewol {
public:
List(void);
void Init(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolList"; };
virtual ~List(void);
virtual bool CalculateMinSize(void);
void SetLabel(etk::UString newLabel);
@ -115,10 +107,6 @@ namespace ewol {
virtual void OnLostFocus(void);
};
extern const char * const TYPE_EOBJECT_WIDGET_LIST;
};
#define EWOL_CAST_WIDGET_LIST(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_LIST,ewol::List,curentPointer)
#endif

View File

@ -38,11 +38,6 @@ extern const char * const ewolEventFSFileValidate = "ewol-event-file-system-fi
extern const char * const ewolEventFSFolderSelect = "ewol-event-file-system-folder-select";
extern const char * const ewolEventFSFolderValidate = "ewol-event-file-system-folder-validate";
//!< EObject name :
extern const char * const TYPE_EOBJECT_WIDGET_FILE_LIST = "FileChooserFileList";
static void SortElementList(etk::VectorType<ewol::elementFS *> &list)
{
etk::VectorType<ewol::elementFS *> tmpList = list;
@ -323,37 +318,3 @@ bool ewol::ListFileSystem::OnItemEvent(int32_t IdInput, ewol::eventInputType_te
return false;
}
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ListFileSystem::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_WIDGET_FILE_LIST << "\" != NULL(pointer) ");
return false;
}
if (objectType == TYPE_EOBJECT_WIDGET_FILE_LIST) {
return true;
} else {
if(true == ewol::List::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_WIDGET_FILE_LIST << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ListFileSystem::GetObjectType(void)
{
return TYPE_EOBJECT_WIDGET_FILE_LIST;
}

View File

@ -32,9 +32,6 @@ extern const char * const ewolEventFSFileValidate;
extern const char * const ewolEventFSFolderSelect;
extern const char * const ewolEventFSFolderValidate;
//!< EObject name :
extern const char * const TYPE_EOBJECT_WIDGET_FILE_LIST;
namespace ewol {
typedef enum {
EFS_FOLDER,
@ -75,21 +72,13 @@ namespace ewol {
uint32_t GetNuberOfRaw(void);
bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg);
bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const GetObjectType(void);
const char * const GetObjectType(void) { return "EwolListFileSystem"; };
public:
// extern API :
void SetFolder(etk::UString newFolder);
@ -106,7 +95,5 @@ namespace ewol {
};
};
#define EWOL_CAST_WIDGET_FILE_LIST(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_FILE_LIST,FileChooserFileList,curentPointer)
#endif

View File

@ -47,44 +47,6 @@ ewol::Menu::~Menu(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_MENU = "Menu";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Menu::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_MENU << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_MENU) {
return true;
} else {
if(true == ewol::SizerHori::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_MENU << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Menu::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_MENU;
}
void ewol::Menu::SubWidgetRemoveAll(void)
{
Clear();
@ -210,7 +172,7 @@ void ewol::Menu::OnReceiveMessage(ewol::EObject * CallerObject, const char * eve
}
// Get the button widget :
Vector2D<float> newPosition;
ewol::Widget * eventFromWidget = EWOL_CAST_WIDGET(CallerObject);
ewol::Widget * eventFromWidget = static_cast<ewol::Widget*>(CallerObject);
if (NULL != eventFromWidget) {
Vector2D<float> tmpOri = eventFromWidget->GetOrigin();
Vector2D<float> tmpSize = eventFromWidget->GetSize();

View File

@ -50,13 +50,6 @@ namespace ewol {
public:
Menu(void);
virtual ~Menu(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
@ -64,7 +57,7 @@ namespace ewol {
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolMenu"; };
private:
virtual void SubWidgetRemoveAll(void);
virtual void SubWidgetAdd(ewol::Widget* newWidget);
@ -97,10 +90,6 @@ namespace ewol {
virtual void OnObjectRemove(ewol::EObject * removeObject);
};
extern const char * const TYPE_EOBJECT_WIDGET_MENU;
};
#define EWOL_CAST_WIDGET_MENU(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_MENU,ewol::Menu,curentPointer)
#endif

View File

@ -55,45 +55,6 @@ ewol::PopUp::~PopUp(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_POP_UP = "PopUp";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::PopUp::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_POP_UP << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_POP_UP) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_POP_UP << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::PopUp::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_POP_UP;
}
bool ewol::PopUp::CalculateSize(float availlableX, float availlableY)
{
//EWOL_DEBUG("CalculateSize(" << availlableX << "," << availlableY << ")");

View File

@ -36,21 +36,13 @@ namespace ewol {
public:
PopUp(void);
virtual ~PopUp(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolPopUp"; };
public:
virtual bool CalculateSize(float availlableX, float availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void); //update the min Size ... and the expend parameters for the sizer
@ -95,10 +87,6 @@ namespace ewol {
virtual void OnObjectRemove(ewol::EObject * removeObject);
};
extern const char * const TYPE_EOBJECT_WIDGET_POP_UP;
};
#define EWOL_CAST_WIDGET_POP_UP(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_POP_UP,ewol::PopUp,curentPointer)
#endif

View File

@ -54,46 +54,6 @@ ewol::ProgressBar::~ProgressBar(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_PROGRESS_BAR = "ProgressBar";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ProgressBar::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_PROGRESS_BAR << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_PROGRESS_BAR) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_PROGRESS_BAR << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ProgressBar::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_PROGRESS_BAR;
}
bool ewol::ProgressBar::CalculateMinSize(void)
{
m_minSize.x = etk_max(m_userMinSize.x, 40);

View File

@ -36,21 +36,13 @@ namespace ewol {
public:
ProgressBar(void);
virtual ~ProgressBar(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolProgressBar"; };
virtual bool CalculateMinSize(void);
void ValueSet(float val);
float ValueGet(void);
@ -64,10 +56,6 @@ namespace ewol {
virtual void OnRegenerateDisplay(void);
};
extern const char * const TYPE_EOBJECT_WIDGET_PROGRESS_BAR;
};
#define EWOL_CAST_WIDGET_PROGRESS_BAR(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_PROGRESS_BAR,ewol::ProgressBar,curentPointer)
#endif

View File

@ -56,44 +56,6 @@ ewol::Scene::~Scene(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_SCENE = "Scene";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Scene::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SCENE << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_SCENE) {
return true;
} else {
if(true == ewol::WidgetScrooled::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SCENE << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Scene::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_SCENE;
}
void ewol::Scene::OnRegenerateDisplay(void)
{

View File

@ -43,21 +43,13 @@ namespace ewol {
public:
Scene(void);
virtual ~Scene(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolScene"; };
virtual void OnRegenerateDisplay(void);
/**
@ -108,10 +100,6 @@ namespace ewol {
*/
void WIDGET_SceneInit(void);
extern const char * const TYPE_EOBJECT_WIDGET_SCENE;
};
#define EWOL_CAST_WIDGET_SCENE(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_SCENE,ewol::Scene,curentPointer)
#endif

View File

@ -42,45 +42,6 @@ ewol::SizerHori::~SizerHori(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_SIZER_HORI = "SizerHori";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::SizerHori::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SIZER_HORI << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_SIZER_HORI) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SIZER_HORI << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::SizerHori::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_SIZER_HORI;
}
bool ewol::SizerHori::CalculateSize(float availlableX, float availlableY)
{
//EWOL_DEBUG("Update Size");

View File

@ -35,13 +35,6 @@ namespace ewol {
public:
SizerHori(void);
virtual ~SizerHori(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
@ -49,7 +42,7 @@ namespace ewol {
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolSizerHori"; };
public:
virtual bool CalculateSize(float availlableX, float availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void); //update the min Size ... and the expend parameters for the sizer
@ -93,10 +86,6 @@ namespace ewol {
virtual void OnObjectRemove(ewol::EObject * removeObject);
};
extern const char * const TYPE_EOBJECT_WIDGET_SIZER_HORI;
};
#define EWOL_CAST_WIDGET_SIZER_HORI(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_SIZER_HORI,ewol::SizerHori,curentPointer)
#endif

View File

@ -43,45 +43,6 @@ ewol::SizerVert::~SizerVert(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_SIZER_VERT = "SizerVert";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::SizerVert::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SIZER_VERT << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_SIZER_VERT) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SIZER_VERT << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::SizerVert::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_SIZER_VERT;
}
bool ewol::SizerVert::CalculateSize(float availlableX, float availlableY)
{
//EWOL_DEBUG("Update Size");

View File

@ -35,21 +35,13 @@ namespace ewol {
public:
SizerVert(void);
virtual ~SizerVert(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolSizerVert"; };
public:
virtual bool CalculateSize(float availlableX, float availlableY); // this generate the current size ...
virtual bool CalculateMinSize(void); //update the min Size ... and the expend parameters for the sizer
@ -94,10 +86,6 @@ namespace ewol {
virtual void OnObjectRemove(ewol::EObject * removeObject);
};
extern const char * const TYPE_EOBJECT_WIDGET_SIZER_VERT;
};
#define EWOL_CAST_WIDGET_SIZER_VERT(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_SIZER_VERT,ewol::SizerVert,curentPointer)
#endif

View File

@ -60,46 +60,6 @@ ewol::Slider::~Slider(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_SLIDER = "Slider";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Slider::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SLIDER << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_SLIDER) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SLIDER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Slider::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_SLIDER;
}
bool ewol::Slider::CalculateMinSize(void)
{
m_minSize.x = etk_max(m_userMinSize.x, 40);

View File

@ -37,21 +37,13 @@ namespace ewol {
public:
Slider(void);
virtual ~Slider(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolSlider"; } ;
virtual bool CalculateMinSize(void);
void SetValue(int32_t val);
int32_t GetValue(void);
@ -79,10 +71,6 @@ namespace ewol {
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, eventInputType_te typeEvent, Vector2D<float> pos);
};
extern const char * const TYPE_EOBJECT_WIDGET_SLIDER;
};
#define EWOL_CAST_WIDGET_SLIDER(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_SLIDER,ewol::Slider,curentPointer)
#endif

View File

@ -45,44 +45,6 @@ ewol::Spacer::~Spacer(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_SPACER = "Spacer";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Spacer::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SPACER << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_SPACER) {
return true;
} else {
if(true == ewol::Drawable::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SPACER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Spacer::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_SPACER;
}
bool ewol::Spacer::CalculateMinSize(void)
{
m_minSize.x = m_localSize;

View File

@ -35,21 +35,13 @@ namespace ewol {
public:
Spacer(void);
virtual ~Spacer(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolSpacer"; };
virtual bool CalculateMinSize(void);
void SetSize(float size);
/**
@ -67,10 +59,6 @@ namespace ewol {
color_ts m_color;
};
extern const char * const TYPE_EOBJECT_WIDGET_SPACER;
};
#define EWOL_CAST_WIDGET_SPACER(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_SPACER,ewol::Spacer,curentPointer)
#endif

View File

@ -49,45 +49,6 @@ ewol::WSlider::~WSlider(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_W_SLIDER = __class__;
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::WSlider::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_W_SLIDER << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_W_SLIDER) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_W_SLIDER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::WSlider::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_W_SLIDER;
}
bool ewol::WSlider::CalculateSize(float availlableX, float availlableY)
{
//EWOL_DEBUG("Update Size");

View File

@ -35,21 +35,13 @@ namespace ewol {
public:
WSlider(void);
virtual ~WSlider(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolWSlider"; };
private:
Vector2D<bool> m_underExpend; // expend of the uner elements ...
public:
@ -106,10 +98,6 @@ namespace ewol {
virtual void PeriodicCall(int64_t localTime);
};
extern const char * const TYPE_EOBJECT_WIDGET_W_SLIDER;
};
#define EWOL_CAST_WIDGET_W_SLIDER(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_W_SLIDER,ewol::WSlider,curentPointer)
#endif

View File

@ -50,43 +50,6 @@ ewol::WidgetScrooled::~WidgetScrooled(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_SCROOLED = "WidgetScrooled";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::WidgetScrooled::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SCROOLED << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_SCROOLED) {
return true;
} else {
if(true == ewol::Widget::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_SCROOLED << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::WidgetScrooled::GetObjectType(void)
{
return ewol::TYPE_EOBJECT;
}
#define SCROLL_BAR_SPACE (15)
void ewol::WidgetScrooled::OnRegenerateDisplay(void)

View File

@ -64,21 +64,13 @@ namespace ewol {
public:
WidgetScrooled(void);
virtual ~WidgetScrooled(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolWidgetScrooled"; };
virtual void OnRegenerateDisplay(void);
virtual void OnDraw(DrawProperty& displayProp);
/**
@ -134,10 +126,6 @@ namespace ewol {
void SetLimitScrolling(float poucentageLimit) { m_limitScrolling = etk_avg(0.1, poucentageLimit,0.9); };
};
extern const char * const TYPE_EOBJECT_WIDGET_SCROOLED;
};
#define EWOL_CAST_WIDGET_SCROOLED(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_SCROOLED,ewol::WidgetScrooled,curentPointer)
#endif

View File

@ -122,44 +122,6 @@ ewol::ColorChooser::~ColorChooser(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_COLOR_CHOOSER = "ColorChooser";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ColorChooser::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_COLOR_CHOOSER << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_COLOR_CHOOSER) {
return true;
} else {
if(true == ewol::SizerVert::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_COLOR_CHOOSER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ColorChooser::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_COLOR_CHOOSER;
}
void ewol::ColorChooser::SetColor(color_ts newColor)
{
m_currentColor = newColor;
@ -220,7 +182,8 @@ void ewol::ColorChooser::OnReceiveMessage(ewol::EObject * CallerObject, const ch
if (NULL != m_widgetAlpha) {
m_widgetAlpha->SetValue(m_currentColor.alpha);
}
GenerateEventId(ewolEventColorChooserChange);
// TODO : send the real color ...
GenerateEventId(ewolEventColorChooserChange, "0x51452563");
} else if (eventColorSpecificHasChange == eventId) {
// Slider has changes his color ==> get the one change ...
if (CallerObject == m_widgetRed) {
@ -236,9 +199,10 @@ void ewol::ColorChooser::OnReceiveMessage(ewol::EObject * CallerObject, const ch
m_currentColor.alpha = m_widgetAlpha->GetValue();
}
if (NULL != m_widgetColorBar) {
m_widgetColorBar->SetCurrentColor(m_currentColor);
m_widgetColorBar->SetCurrentColor(m_currentColor);
}
GenerateEventId(ewolEventColorChooserChange);
// TODO : send the real color ...
GenerateEventId(ewolEventColorChooserChange, "0x51452563");
}
};

View File

@ -43,21 +43,13 @@ namespace ewol {
public:
ColorChooser(void);
~ColorChooser(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolColorChooser"; };
/**
* @brief Receive a message from an other EObject with a specific eventId and data
* @param[in] CallerObject Pointer on the EObject that information came from
@ -85,10 +77,6 @@ namespace ewol {
color_ts m_currentColor;
};
extern const char * const TYPE_EOBJECT_WIDGET_COLOR_CHOOSER;
};
#define EWOL_CAST_WIDGET_COLOR_CHOOSER(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_COLOR_CHOOSER,ewol::ColorChooser,curentPointer)
#endif

View File

@ -265,45 +265,6 @@ ewol::FileChooser::~FileChooser(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_FILE_CHOOSER = "FileChooser";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::FileChooser::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_FILE_CHOOSER << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_FILE_CHOOSER) {
return true;
} else {
if(true == ewol::PopUp::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_FILE_CHOOSER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::FileChooser::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_FILE_CHOOSER;
}
void ewol::FileChooser::SetTitle(etk::UString label)
{
if (NULL == m_widgetTitle) {

View File

@ -43,21 +43,13 @@ namespace ewol {
public:
FileChooser(void);
~FileChooser(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolFileChooser"; };
/**
* @brief Receive a message from an other EObject with a specific eventId and data
* @param[in] CallerObject Pointer on the EObject that information came from
@ -93,10 +85,6 @@ namespace ewol {
etk::UString m_file;
};
extern const char * const TYPE_EOBJECT_WIDGET_FILE_CHOOSER;
};
#define EWOL_CAST_WIDGET_FILE_CHOOSER(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_FILE_CHOOSER,ewol::FileChooser,curentPointer)
#endif

View File

@ -176,45 +176,6 @@ ewol::Parameter::~Parameter(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_PARAMETER = "Parameter";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::Parameter::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_PARAMETER << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_PARAMETER) {
return true;
} else {
if(true == ewol::PopUp::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_PARAMETER << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::Parameter::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_PARAMETER;
}
void ewol::Parameter::SetTitle(etk::UString label)
{
if (NULL == m_widgetTitle) {

View File

@ -44,21 +44,13 @@ namespace ewol {
public:
Parameter(void);
~Parameter(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolParameter"; };
/**
* @brief Receive a message from an other EObject with a specific eventId and data
* @param[in] CallerObject Pointer on the EObject that information came from
@ -88,10 +80,6 @@ namespace ewol {
ewol::WSlider* m_wSlider;
};
extern const char * const TYPE_EOBJECT_WIDGET_PARAMETER;
};
#define EWOL_CAST_WIDGET_PARAMETER(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_PARAMETER,ewol::Parameter,curentPointer)
#endif

View File

@ -31,10 +31,6 @@
extern const char * const ewolEventParameterListSelect = "ewol-event-parameter-list-select";
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_PARAMETER_LIST = "ParameterList";
#include <ewol/widget/List.h>
#include <ewol/OObject.h>
@ -71,40 +67,6 @@ ewol::ParameterList::~ParameterList(void)
MenuClear();
}
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::ParameterList::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_PARAMETER_LIST << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_PARAMETER_LIST) {
return true;
} else {
if(true == ewol::WidgetScrooled::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_PARAMETER_LIST << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::ParameterList::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_PARAMETER_LIST;
}
bool ewol::ParameterList::CalculateMinSize(void)
{

View File

@ -35,8 +35,6 @@ extern const char * const ewolEventParameterListSelect;
namespace ewol {
extern const char * const TYPE_EOBJECT_WIDGET_PARAMETER_LIST;
class elementPL
{
public :
@ -60,21 +58,13 @@ namespace ewol {
etk::VectorType<ewol::elementPL *> m_list;
public:
ParameterList(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolParameterList"; };
virtual ~ParameterList(void);
virtual bool CalculateMinSize(void);
void SetLabel(etk::UString newLabel);

View File

@ -127,45 +127,6 @@ ewol::StdPopUp::~StdPopUp(void)
}
//!< EObject name :
extern const char * const ewol::TYPE_EOBJECT_WIDGET_STD_POP_UP = "StdPopUp";
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
bool ewol::StdPopUp::CheckObjectType(const char * const objectType)
{
if (NULL == objectType) {
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_STD_POP_UP << "\" != NULL(pointer) ");
return false;
}
if (objectType == ewol::TYPE_EOBJECT_WIDGET_STD_POP_UP) {
return true;
} else {
if(true == ewol::PopUp::CheckObjectType(objectType)) {
return true;
}
EWOL_ERROR("check error : \"" << ewol::TYPE_EOBJECT_WIDGET_STD_POP_UP << "\" != \"" << objectType << "\"");
return false;
}
}
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
const char * const ewol::StdPopUp::GetObjectType(void)
{
return ewol::TYPE_EOBJECT_WIDGET_STD_POP_UP;
}
void ewol::StdPopUp::SetTitle(etk::UString label)
{

View File

@ -44,21 +44,13 @@ namespace ewol {
public:
StdPopUp(void);
~StdPopUp(void);
/**
* @brief Check if the object has the specific type.
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type of the object we want to check
* @return true if the object is compatible, otherwise false
*/
virtual bool CheckObjectType(const char * const objectType);
/**
* @brief Get the current Object type of the EObject
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
* @param[in] objectType type description
* @return true if the object is compatible, otherwise false
*/
virtual const char * const GetObjectType(void);
virtual const char * const GetObjectType(void) { return "EwolPopUp"; };
virtual bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, float x, float y);
void SetTitle(etk::UString text);
void SetComment(etk::UString text);
@ -69,10 +61,6 @@ namespace ewol {
ewol::widget::Button* m_button[6];
};
extern const char * const TYPE_EOBJECT_WIDGET_STD_POP_UP;
};
#define EWOL_CAST_WIDGET_STD_POP_UP(curentPointer) EWOL_CAST(ewol::TYPE_EOBJECT_WIDGET_STD_POP_UP,ewol::StdPopUp,curentPointer)
#endif