Remove old coord type
This commit is contained in:
parent
8e85f28fc8
commit
0e651c71ae
@ -37,13 +37,6 @@ namespace ewol {
|
||||
#include <etk/VectorType.h>
|
||||
|
||||
namespace ewol {
|
||||
extern "C" {
|
||||
// TODO : Remove this bu coord2D_ts
|
||||
typedef struct {
|
||||
etkFloat_t x;
|
||||
etkFloat_t y;
|
||||
} coord;
|
||||
}
|
||||
typedef enum {
|
||||
EVENT_INPUT_TYPE_DOWN,
|
||||
EVENT_INPUT_TYPE_MOVE,
|
||||
@ -100,9 +93,6 @@ namespace ewol {
|
||||
|
||||
char* GetCharTypeMoveEvent(eventKbMoveType_te type);
|
||||
|
||||
#define EWOL_EVENT_AREA (0)
|
||||
#define EWOL_EVENT_SHORTCUT (1)
|
||||
// TODO : Remove this and set it at the Windows only ...
|
||||
extern "C" {
|
||||
typedef struct {
|
||||
const char * generateEventId; //!< event generate ID (to be unique it was pointer on the string name)
|
||||
@ -129,26 +119,26 @@ namespace ewol {
|
||||
// ----------------------------------------------------------------------------------------------------------------
|
||||
protected:
|
||||
// internal element calculated by the system
|
||||
coord m_origin; //!< internal ... I do not really known how i can use it ...
|
||||
coord m_size; //!< internal : current size of the widget
|
||||
coord m_minSize; //!< user define the minimum size of the widget
|
||||
coord2D_ts m_origin; //!< internal ... I do not really known how i can use it ...
|
||||
coord2D_ts m_size; //!< internal : current size of the widget
|
||||
coord2D_ts m_minSize; //!< user define the minimum size of the widget
|
||||
// user configuaration
|
||||
coord m_userMinSize; //!< user define the minimum size of the widget
|
||||
coord2D_ts m_userMinSize; //!< user define the minimum size of the widget
|
||||
bool m_userExpendX;
|
||||
bool m_userExpendY;
|
||||
bool m_userFillX;
|
||||
bool m_userFillY;
|
||||
public:
|
||||
void SetOrigin(etkFloat_t x, etkFloat_t y) { m_origin.x=x; m_origin.y=y;};
|
||||
coord GetOrigin(void) { return m_origin; };
|
||||
coord2D_ts GetOrigin(void) { return m_origin; };
|
||||
virtual bool CalculateSize(etkFloat_t availlableX, etkFloat_t availlableY); // this generate the current size ...
|
||||
//update the min Size ... and the expend parameters for the sizer
|
||||
virtual bool CalculateMinSize(void) {m_minSize.x = m_userMinSize.x; m_minSize.y = m_userMinSize.y; MarkToReedraw(); return true; };
|
||||
virtual void SetMinSize(etkFloat_t x=-1, etkFloat_t y=-1) { m_userMinSize.x = x; m_userMinSize.y = y; };
|
||||
coord GetMinSize(void) { return m_minSize; };
|
||||
coord GetSize(void) { return m_size; };
|
||||
coord2D_ts GetMinSize(void) { return m_minSize; };
|
||||
coord2D_ts GetSize(void) { return m_size; };
|
||||
void SetCurrentSise(etkFloat_t x=-1, etkFloat_t y=-1) { m_size.x = x; m_size.y = y; MarkToReedraw();};
|
||||
coord GetCurrentSize(void) { return m_size; };
|
||||
coord2D_ts GetCurrentSize(void) { return m_size; };
|
||||
virtual void SetExpendX(bool newExpend=false) { m_userExpendX = newExpend; };
|
||||
virtual bool CanExpentX(void) { return m_userExpendX; };
|
||||
virtual void SetExpendY(bool newExpend=false) { m_userExpendY = newExpend; };
|
||||
|
@ -35,7 +35,7 @@ extern "C" {
|
||||
};
|
||||
|
||||
static pthread_mutex_t localMutex;
|
||||
|
||||
static bool IsInit = false;
|
||||
|
||||
// internal element of the widget manager :
|
||||
static etk::VectorType<widgetList_ts> m_widgetList; // all widget allocated ==> all time increment ... never removed ...
|
||||
@ -54,6 +54,7 @@ void ewol::widgetManager::Init(void)
|
||||
m_widgetList.Clear();
|
||||
m_focusWidgetDefault = NULL;
|
||||
m_focusWidgetCurrent = NULL;
|
||||
IsInit = true;
|
||||
}
|
||||
|
||||
void ewol::widgetManager::UnInit(void)
|
||||
@ -66,15 +67,16 @@ void ewol::widgetManager::UnInit(void)
|
||||
ewol::widgetManager::RemoveAllMarkWidget();
|
||||
|
||||
EWOL_INFO(" Remove missing user widget");
|
||||
for(int32_t iii=0; iii<m_widgetList.Size(); iii++) {
|
||||
if (m_widgetList[iii].widgetPointer!=NULL) {
|
||||
EWOL_WARNING("Un-Removed widget ... id=" << iii);
|
||||
FocusRemoveIfRemove(m_widgetList[iii].widgetPointer);
|
||||
delete(m_widgetList[iii].widgetPointer);
|
||||
m_widgetList[iii].widgetPointer=NULL;
|
||||
while(0<m_widgetList.Size()) {
|
||||
if (m_widgetList[0].widgetPointer!=NULL) {
|
||||
MarkWidgetToBeRemoved(m_widgetList[0].widgetPointer);
|
||||
}
|
||||
}
|
||||
m_widgetList.Clear();
|
||||
// local acces ==> this control the mutex Lock
|
||||
RemoveAllMarkWidget();
|
||||
|
||||
IsInit = false;
|
||||
|
||||
int ret = pthread_mutex_destroy(&localMutex);
|
||||
EWOL_ASSERT(ret == 0, "Error destroying Mutex ...");
|
||||
}
|
||||
@ -116,6 +118,7 @@ void ewol::widgetManager::Rm(ewol::Widget * newWidget)
|
||||
// Remove Element
|
||||
m_widgetDeletedList.Erase(iii);
|
||||
//Normal remove of the widget ...
|
||||
//EWOL_DEBUG("Remove element " << iii);
|
||||
return;
|
||||
}
|
||||
}
|
||||
@ -253,7 +256,9 @@ void ewol::widgetManager::GetDoubleBufferFlipFlop(void)
|
||||
|
||||
void ewol::widgetManager::GetDoubleBufferStartDraw(void)
|
||||
{
|
||||
pthread_mutex_lock(&localMutex);
|
||||
if (IsInit) {
|
||||
pthread_mutex_lock(&localMutex);
|
||||
}
|
||||
}
|
||||
|
||||
bool ewol::widgetManager::GetDoubleBufferNeedDraw(void)
|
||||
@ -267,7 +272,9 @@ bool ewol::widgetManager::GetDoubleBufferNeedDraw(void)
|
||||
|
||||
void ewol::widgetManager::GetDoubleBufferStopDraw(void)
|
||||
{
|
||||
pthread_mutex_unlock(&localMutex);
|
||||
if (IsInit) {
|
||||
pthread_mutex_unlock(&localMutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -312,21 +319,29 @@ void ewol::widgetManager::MarkWidgetToBeRemoved(ewol::Widget * expectedWidget)
|
||||
|
||||
void ewol::widgetManager::RemoveAllMarkWidget(void)
|
||||
{
|
||||
etk::VectorType<widgetList_ts> m_widgetDeletedList_tmp = m_widgetDeletedList;
|
||||
pthread_mutex_lock(&localMutex);
|
||||
// flip/Flop all the widget registered :
|
||||
for(int32_t iii=0; iii<m_widgetDeletedList_tmp.Size(); iii++) {
|
||||
if (NULL != m_widgetDeletedList_tmp[iii].widgetPointer) {
|
||||
delete(m_widgetDeletedList_tmp[iii].widgetPointer);
|
||||
m_widgetDeletedList_tmp[iii].widgetPointer = NULL;
|
||||
if (IsInit) {
|
||||
pthread_mutex_lock(&localMutex);
|
||||
etk::VectorType<widgetList_ts> m_widgetDeletedList_tmp = m_widgetDeletedList;
|
||||
/*
|
||||
if (m_widgetDeletedList.Size() > 0 ) {
|
||||
EWOL_DEBUG("NB element to remove : " << m_widgetDeletedList.Size());
|
||||
}
|
||||
}
|
||||
pthread_mutex_unlock(&localMutex);
|
||||
|
||||
if (m_widgetDeletedList.Size() != 0 ) {
|
||||
EWOL_CRITICAL("Memory leak ==> not all the widget are auto-removed nb = " << m_widgetDeletedList.Size());
|
||||
// in every case clean the list ...
|
||||
m_widgetDeletedList.Clear();
|
||||
*/
|
||||
// flip/Flop all the widget registered :
|
||||
for(int32_t iii=0; iii<m_widgetDeletedList_tmp.Size(); iii++) {
|
||||
if (NULL != m_widgetDeletedList_tmp[iii].widgetPointer) {
|
||||
delete(m_widgetDeletedList_tmp[iii].widgetPointer);
|
||||
m_widgetDeletedList_tmp[iii].widgetPointer = NULL;
|
||||
}
|
||||
}
|
||||
/*
|
||||
if (m_widgetDeletedList.Size() > 0 ) {
|
||||
EWOL_CRITICAL("Memory leak ==> not all the widget are auto-removed nb = " << m_widgetDeletedList.Size());
|
||||
// in every case clean the list ...
|
||||
m_widgetDeletedList.Clear();
|
||||
}
|
||||
*/
|
||||
pthread_mutex_unlock(&localMutex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -80,7 +80,7 @@ bool ewol::Windows::CalculateSize(etkFloat_t availlableX, etkFloat_t availlableY
|
||||
int32_t keyboardHigh = 0;
|
||||
if (NULL != m_keyBoardwidget && false == m_keyBoardwidget->IsHide() ) {
|
||||
m_keyBoardwidget->CalculateMinSize();
|
||||
coord tmpSize = m_keyBoardwidget->GetMinSize();
|
||||
coord2D_ts tmpSize = m_keyBoardwidget->GetMinSize();
|
||||
keyboardHigh = (int32_t)tmpSize.y;
|
||||
m_keyBoardwidget->SetOrigin(0, m_size.y - keyboardHigh);
|
||||
m_keyBoardwidget->CalculateSize(m_size.x, keyboardHigh);
|
||||
@ -106,7 +106,7 @@ bool ewol::Windows::CalculateSize(etkFloat_t availlableX, etkFloat_t availlableY
|
||||
bool ewol::Windows::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y)
|
||||
{
|
||||
if (NULL != m_keyBoardwidget && false == m_keyBoardwidget->IsHide() ) {
|
||||
coord tmpSize = m_keyBoardwidget->GetMinSize();
|
||||
coord2D_ts tmpSize = m_keyBoardwidget->GetMinSize();
|
||||
if (y > m_size.y - tmpSize.y) {
|
||||
m_keyBoardwidget->GenEventInput(IdInput, typeEvent, x, y);
|
||||
return true;
|
||||
|
@ -247,8 +247,8 @@ void EWOL_SystemStart(void)
|
||||
// init the thread :
|
||||
EWOL_DEBUG("Create the thread");
|
||||
pthread_attr_init(&androidJniThreadAttr);
|
||||
//pthread_attr_setdetachstate(&androidJniThreadAttr, PTHREAD_CREATE_JOINABLE)
|
||||
pthread_attr_setdetachstate(&androidJniThreadAttr, PTHREAD_CREATE_DETACHED);
|
||||
pthread_attr_setdetachstate(&androidJniThreadAttr, PTHREAD_CREATE_JOINABLE);
|
||||
//pthread_attr_setdetachstate(&androidJniThreadAttr, PTHREAD_CREATE_DETACHED);
|
||||
//pthread_attr_setscope( &androidJniThreadAttr, PTHREAD_SCOPE_SYSTEM);
|
||||
/* // note android does not permit to change the thread priority ...
|
||||
// try to set prio :
|
||||
|
@ -69,8 +69,8 @@ bool ewol::ContextMenu::CalculateSize(etkFloat_t availlableX, etkFloat_t availla
|
||||
m_size.y = availlableY;
|
||||
|
||||
if (NULL != m_subWidget) {
|
||||
coord subWidgetSize;
|
||||
coord subWidgetOrigin;
|
||||
coord2D_ts subWidgetSize;
|
||||
coord2D_ts subWidgetOrigin;
|
||||
subWidgetSize = m_subWidget->GetMinSize();
|
||||
if (true == m_subWidget->CanExpentX()) {
|
||||
subWidgetSize.x = m_size.x;
|
||||
@ -142,7 +142,7 @@ bool ewol::ContextMenu::CalculateMinSize(void)
|
||||
m_minSize.y = 50.0;
|
||||
if (NULL != m_subWidget) {
|
||||
m_subWidget->CalculateMinSize();
|
||||
coord tmpSize = m_subWidget->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget->GetMinSize();
|
||||
m_minSize.x = tmpSize.x;
|
||||
m_minSize.y = tmpSize.y;
|
||||
}
|
||||
@ -205,8 +205,8 @@ void ewol::ContextMenu::OnRegenerateDisplay(void)
|
||||
AddOObject(BGOObjects);
|
||||
|
||||
if (NULL != m_subWidget) {
|
||||
coord tmpSize = m_subWidget->GetSize();
|
||||
coord tmpOrigin = m_subWidget->GetOrigin();
|
||||
coord2D_ts tmpSize = m_subWidget->GetSize();
|
||||
coord2D_ts tmpOrigin = m_subWidget->GetOrigin();
|
||||
|
||||
// display border ...
|
||||
BGOObjects->SetColor(m_colorBorder);
|
||||
@ -246,8 +246,8 @@ void ewol::ContextMenu::OnRegenerateDisplay(void)
|
||||
bool ewol::ContextMenu::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y)
|
||||
{
|
||||
if (NULL != m_subWidget) {
|
||||
coord tmpSize = m_subWidget->GetSize();
|
||||
coord tmpOrigin = m_subWidget->GetOrigin();
|
||||
coord2D_ts tmpSize = m_subWidget->GetSize();
|
||||
coord2D_ts tmpOrigin = m_subWidget->GetOrigin();
|
||||
if( (tmpOrigin.x <= x && tmpOrigin.x + tmpSize.x >= x)
|
||||
&& (tmpOrigin.y <= y && tmpOrigin.y + tmpSize.y >= y) )
|
||||
{
|
||||
|
@ -155,8 +155,8 @@ bool ewol::Menu::OnEventAreaExternal(int32_t widgetID, const char * generateEven
|
||||
newPosition.y = y;
|
||||
ewol::Widget * eventFromWidget = ewol::widgetManager::Get(widgetID);
|
||||
if (NULL != eventFromWidget) {
|
||||
coord tmpOri = eventFromWidget->GetOrigin();
|
||||
coord tmpSize = eventFromWidget->GetSize();
|
||||
coord2D_ts tmpOri = eventFromWidget->GetOrigin();
|
||||
coord2D_ts tmpSize = eventFromWidget->GetSize();
|
||||
// calculate the correct position
|
||||
newPosition.x = tmpOri.x + tmpSize.x/2;
|
||||
newPosition.y = tmpOri.y + tmpSize.y;
|
||||
|
@ -60,8 +60,8 @@ bool ewol::PopUp::CalculateSize(etkFloat_t availlableX, etkFloat_t availlableY)
|
||||
m_size.y = availlableY;
|
||||
|
||||
if (NULL != m_subWidget) {
|
||||
coord subWidgetSize;
|
||||
coord subWidgetOrigin;
|
||||
coord2D_ts subWidgetSize;
|
||||
coord2D_ts subWidgetOrigin;
|
||||
subWidgetSize = m_subWidget->GetMinSize();
|
||||
if (true == m_subWidget->CanExpentX()) {
|
||||
subWidgetSize.x = m_size.x;
|
||||
@ -97,7 +97,7 @@ bool ewol::PopUp::CalculateMinSize(void)
|
||||
m_minSize.y = 50.0;
|
||||
if (NULL != m_subWidget) {
|
||||
m_subWidget->CalculateMinSize();
|
||||
coord tmpSize = m_subWidget->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget->GetMinSize();
|
||||
m_minSize.x = tmpSize.x;
|
||||
m_minSize.y = tmpSize.y;
|
||||
}
|
||||
@ -164,8 +164,8 @@ void ewol::PopUp::OnRegenerateDisplay(void)
|
||||
BGOObjects->Rectangle(0, 0, m_size.x, m_size.y);
|
||||
// set the area in white ...
|
||||
if (NULL != m_subWidget) {
|
||||
coord tmpSize = m_subWidget->GetSize();
|
||||
coord tmpOrigin = m_subWidget->GetOrigin();
|
||||
coord2D_ts tmpSize = m_subWidget->GetSize();
|
||||
coord2D_ts tmpOrigin = m_subWidget->GetOrigin();
|
||||
BGOObjects->SetColor(m_colorBackGroung);
|
||||
BGOObjects->Rectangle(tmpOrigin.x, tmpOrigin.y, tmpSize.x, tmpSize.y);
|
||||
}
|
||||
@ -178,8 +178,8 @@ void ewol::PopUp::OnRegenerateDisplay(void)
|
||||
bool ewol::PopUp::OnEventInput(int32_t IdInput, eventInputType_te typeEvent, etkFloat_t x, etkFloat_t y)
|
||||
{
|
||||
if (NULL != m_subWidget) {
|
||||
coord tmpSize = m_subWidget->GetSize();
|
||||
coord tmpOrigin = m_subWidget->GetOrigin();
|
||||
coord2D_ts tmpSize = m_subWidget->GetSize();
|
||||
coord2D_ts tmpOrigin = m_subWidget->GetOrigin();
|
||||
if( (tmpOrigin.x <= x && tmpOrigin.x + tmpSize.x >= x)
|
||||
&& (tmpOrigin.y <= y && tmpOrigin.y + tmpSize.y >= y) )
|
||||
{
|
||||
|
@ -53,7 +53,7 @@ bool ewol::SizerHori::CalculateSize(etkFloat_t availlableX, etkFloat_t availlabl
|
||||
int32_t nbWidgetNotFixedSize=0;
|
||||
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
|
||||
if (NULL != m_subWidget[iii]) {
|
||||
coord tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
unexpendableSize += tmpSize.x;
|
||||
if (false == m_subWidget[iii]->CanExpentX()) {
|
||||
nbWidgetFixedSize++;
|
||||
@ -70,12 +70,12 @@ bool ewol::SizerHori::CalculateSize(etkFloat_t availlableX, etkFloat_t availlabl
|
||||
sizeToAddAtEveryOne=0;
|
||||
}
|
||||
}
|
||||
coord tmpOrigin;
|
||||
coord2D_ts tmpOrigin;
|
||||
tmpOrigin.x = 0;
|
||||
tmpOrigin.y = 0;
|
||||
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
|
||||
if (NULL != m_subWidget[iii]) {
|
||||
coord tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
// Set the origin :
|
||||
//EWOL_DEBUG("Set ORIGIN : " << tmpOrigin.x << "," << tmpOrigin.y << ")");
|
||||
m_subWidget[iii]->SetOrigin(tmpOrigin.x, tmpOrigin.y);
|
||||
@ -110,7 +110,7 @@ bool ewol::SizerHori::CalculateMinSize(void)
|
||||
if (true == m_subWidget[iii]->CanExpentY()) {
|
||||
m_userExpendY = true;
|
||||
}
|
||||
coord tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
m_minSize.x += tmpSize.x;
|
||||
if (tmpSize.y>m_minSize.y) {
|
||||
m_minSize.y = tmpSize.y;
|
||||
@ -239,8 +239,8 @@ bool ewol::SizerHori::OnEventInput(int32_t IdInput, eventInputType_te typeEvent,
|
||||
{
|
||||
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
|
||||
if (NULL != m_subWidget[iii]) {
|
||||
coord tmpSize = m_subWidget[iii]->GetSize();
|
||||
coord tmpOrigin = m_subWidget[iii]->GetOrigin();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetSize();
|
||||
coord2D_ts tmpOrigin = m_subWidget[iii]->GetOrigin();
|
||||
if( (tmpOrigin.x <= x && tmpOrigin.x + tmpSize.x >= x)
|
||||
&& (tmpOrigin.y <= y && tmpOrigin.y + tmpSize.y >= y) )
|
||||
{
|
||||
|
@ -54,7 +54,7 @@ bool ewol::SizerVert::CalculateSize(etkFloat_t availlableX, etkFloat_t availlabl
|
||||
int32_t nbWidgetNotFixedSize=0;
|
||||
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
|
||||
if (NULL != m_subWidget[iii]) {
|
||||
coord tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
unexpendableSize += tmpSize.y;
|
||||
if (false == m_subWidget[iii]->CanExpentY()) {
|
||||
nbWidgetFixedSize++;
|
||||
@ -72,12 +72,12 @@ bool ewol::SizerVert::CalculateSize(etkFloat_t availlableX, etkFloat_t availlabl
|
||||
sizeToAddAtEveryOne=0;
|
||||
}
|
||||
}
|
||||
coord tmpOrigin;
|
||||
coord2D_ts tmpOrigin;
|
||||
tmpOrigin.x = 0;
|
||||
tmpOrigin.y = 0;
|
||||
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
|
||||
if (NULL != m_subWidget[iii]) {
|
||||
coord tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
// Set the origin :
|
||||
//EWOL_DEBUG("Set ORIGIN : " << tmpOrigin.x << "," << tmpOrigin.y << ")");
|
||||
m_subWidget[iii]->SetOrigin(tmpOrigin.x, tmpOrigin.y);
|
||||
@ -112,7 +112,7 @@ bool ewol::SizerVert::CalculateMinSize(void)
|
||||
if (true == m_subWidget[iii]->CanExpentY()) {
|
||||
m_userExpendY = true;
|
||||
}
|
||||
coord tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetMinSize();
|
||||
//EWOL_DEBUG(" Get minSize[" << iii << "] ("<< tmpSize.x << "," << tmpSize.y << ")");
|
||||
m_minSize.y += tmpSize.y;
|
||||
if (tmpSize.x>m_minSize.x) {
|
||||
@ -239,8 +239,8 @@ bool ewol::SizerVert::OnEventInput(int32_t IdInput, eventInputType_te typeEvent,
|
||||
{
|
||||
for (int32_t iii=0; iii<m_subWidget.Size(); iii++) {
|
||||
if (NULL != m_subWidget[iii]) {
|
||||
coord tmpSize = m_subWidget[iii]->GetSize();
|
||||
coord tmpOrigin = m_subWidget[iii]->GetOrigin();
|
||||
coord2D_ts tmpSize = m_subWidget[iii]->GetSize();
|
||||
coord2D_ts tmpOrigin = m_subWidget[iii]->GetOrigin();
|
||||
if( (tmpOrigin.x <= x && tmpOrigin.x + tmpSize.x >= x)
|
||||
&& (tmpOrigin.y <= y && tmpOrigin.y + tmpSize.y >= y) )
|
||||
{
|
||||
|
@ -44,11 +44,11 @@ namespace ewol {
|
||||
class WidgetScrooled : virtual public ewol::Widget
|
||||
{
|
||||
protected:
|
||||
coord m_originScrooled;
|
||||
coord m_maxSize;
|
||||
coord2D_ts m_originScrooled;
|
||||
coord2D_ts m_maxSize;
|
||||
private:
|
||||
etkFloat_t m_pixelScrolling;
|
||||
coord m_highSpeedStartPos;
|
||||
coord2D_ts m_highSpeedStartPos;
|
||||
highSpeedMode_te m_highSpeedMode;
|
||||
public:
|
||||
WidgetScrooled(void);
|
||||
|
@ -62,7 +62,10 @@ ewol::Keyboard::Keyboard(void)
|
||||
|
||||
ewol::Keyboard::~Keyboard(void)
|
||||
{
|
||||
|
||||
if (NULL != m_subWidget) {
|
||||
ewol::widgetManager::MarkWidgetToBeRemoved(m_subWidget);
|
||||
m_subWidget = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
#define ADD_BUTTON(upperWidget,widget,text,event) do { \
|
||||
@ -231,7 +234,7 @@ bool ewol::Keyboard::CalculateSize(etkFloat_t availlableX, etkFloat_t availlable
|
||||
m_size.y = availlableY;
|
||||
|
||||
if (NULL != m_subWidget) {
|
||||
coord subWidgetSize;
|
||||
coord2D_ts subWidgetSize;
|
||||
subWidgetSize = m_subWidget->GetMinSize();
|
||||
if (true == m_subWidget->CanExpentX()) {
|
||||
subWidgetSize.x = m_size.x;
|
||||
@ -243,7 +246,7 @@ bool ewol::Keyboard::CalculateSize(etkFloat_t availlableX, etkFloat_t availlable
|
||||
subWidgetSize.x = (int32_t)subWidgetSize.x;
|
||||
subWidgetSize.y = (int32_t)subWidgetSize.y;
|
||||
|
||||
m_subWidget->SetOrigin(m_origin.x, m_origin.y);
|
||||
m_subWidget->SetOrigin(0, 0);
|
||||
m_subWidget->CalculateSize(subWidgetSize.x, subWidgetSize.y);
|
||||
}
|
||||
MarkToReedraw();
|
||||
@ -259,7 +262,7 @@ bool ewol::Keyboard::CalculateMinSize(void)
|
||||
m_minSize.y = 50.0;
|
||||
if (NULL != m_subWidget) {
|
||||
m_subWidget->CalculateMinSize();
|
||||
coord tmpSize = m_subWidget->GetMinSize();
|
||||
coord2D_ts tmpSize = m_subWidget->GetMinSize();
|
||||
m_minSize.x = tmpSize.x;
|
||||
m_minSize.y = tmpSize.y;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user