Update Makefile suite AND add text clipping in X at end (first step)

This commit is contained in:
Edouard Dupin 2011-12-30 10:44:44 +01:00
parent 61932a171f
commit 4d06072529
24 changed files with 164 additions and 129 deletions

View File

@ -3,17 +3,20 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := etk
LOCAL_STATIC_LIBRARIES :=
LOCAL_STATIC_LIBRARIES := libzip
LOCAL_C_INCLUDES :=
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_CFLAGS := -D__PLATFORM__Android \
-Wno-write-strings \
-DDATA_IN_APK \
-DETK_DEBUG_LEVEL=3
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk

View File

@ -3,7 +3,7 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := etk
LOCAL_STATIC_LIBRARIES :=
LOCAL_STATIC_LIBRARIES := libzip
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)

View File

@ -70,7 +70,7 @@ void TOOLS_DisplayTime(void);
#define ETK_DBG_COMMON(libName, color, info, data) do { \
etk::cout << color; \
/*TOOLS_DisplayTime();*/ \
/*TOOLS_DisplayFuncName(__LINE__, __class__, __func__, libName);*/ \
TOOLS_DisplayFuncName(__LINE__, __class__, __func__, libName); \
etk::cout << "[" << info << "] " << data; \
etk::cout << ETK_BASH_COLOR_NORMAL <<etk::endl; \
}while(0)

View File

@ -295,6 +295,8 @@ void etk::File::SetCompleateName(etk::String &newFilename, etk::FileType_te type
}
if (-1 == m_idZipFile) {
TK_ERROR("File Does not existed ... in APK : \"" << tmpFilename << "\"");
} else {
TK_INFO("File existed ... in APK : \"" << tmpFilename << "\" ==> id=" << m_idZipFile);
}
#else
//etk::String tmpFilename = destFilename;

View File

@ -5,7 +5,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ewol
LOCAL_STATIC_LIBRARIES := libetk libtinyxml libzip libpng
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/../libzip/ $(LOCAL_PATH)/../libpng/ $(LOCAL_PATH)/../libtinyxml/ $(LOCAL_PATH)/../libetk/
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_LDLIBS := -lGLESv1_CM -ldl -llog -lz

View File

@ -5,7 +5,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ewol
LOCAL_STATIC_LIBRARIES := etk tinyxml libzip libpng
LOCAL_C_INCLUDES := -I$(LOCAL_PATH) -I$(LOCAL_PATH)/../libzip/ -I$(LOCAL_PATH)/../libpng/ -I$(LOCAL_PATH)/../libtinyxml/ -I$(LOCAL_PATH)/../libetk/
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_LDLIBS := -lGL -lGLU -lz -lX11 -lXxf86vm `pkg-config --libs freetype2`

View File

@ -89,18 +89,19 @@ namespace ewol
void DrawText(int32_t fontID,
coord2D_ts & drawPosition,
coord2D_ts & clipSize,
const char * utf8String,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex);
/*
void DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const uniChar_t * unicodeString,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex);
*/
int32_t LoadFont(etk::File fontFileName);
void DrawText(etkFloat_t x, etkFloat_t y, const char * myString);
};

View File

@ -296,7 +296,7 @@ void ewol::UnloadFont(int32_t id)
/*
void ewol::DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const uniChar_t * unicodeString,
@ -304,6 +304,8 @@ void ewol::DrawText(int32_t fontID,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex)
{
EWOL_TODO("previous code does not work at all");
if(fontID>=s_listLoadedFonts.Size() || fontID < 0) {
EWOL_WARNING("try to display text with an fontID that does not existed " << fontID);
return;
@ -348,14 +350,15 @@ void ewol::DrawText(int32_t fontID,
}
drawPosition.x = posDrawX;
}
*/
void ewol::DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const char * utf8String,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
etk::VectorType<texCoord_ts> & coordTex)
void ewol::DrawText(int32_t fontID, // Id of the desire font
coord2D_ts & drawPosition, // position to start the writing (can be < 0) ==> no check
coord2D_ts & clipSize, // clipping size
const char * utf8String, // my UTF8 string
uint32_t & fontTextureId, // return the fontID needed to display this string
etk::VectorType<coord2D_ts> & coord, // return the coordonates
etk::VectorType<texCoord_ts> & coordTex) // return the texture coordonates
{
// TODO : This code des not work, why ????
/*
@ -403,83 +406,62 @@ void ewol::DrawText(int32_t fontID,
charIndex = 0;
}
etkFloat_t sizeWidth = listOfElement[charIndex].width;
// check the clipping
if (clipSize.x>0 && posDrawX+sizeWidth > clipSize.x) {
// TODO : Create a better clipping methode ...
break;
}
// 0x01 == 0x20 == ' ';
if (tmpChar != 0x01) {
#if !defined(__PLATFORM__Android)
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
texCoord_ts tmpTex;
tmpTex.u = listOfElement[charIndex].posStop.u;
tmpTex.v = listOfElement[charIndex].posStart.v;
coordTex.PushBack(tmpTex);
coordTex.PushBack(listOfElement[charIndex].posStop);
tmpTex.u = listOfElement[charIndex].posStart.u;
tmpTex.v = listOfElement[charIndex].posStop.v;
coordTex.PushBack(tmpTex);
// set display positions :
/*int32_t xxxx = posDrawX;
int32_t yyyy = drawPosition.y;*/
coord2D_ts tmpCoord;
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
coord.PushBack(tmpCoord);
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX;
coord.PushBack(tmpCoord);
#else
// NOTE : Android does not support the Quads elements ...
/* Step 1 :
* ********
* ******
* ****
* **
*
*/
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
texCoord_ts tmpTex;
tmpTex.u = listOfElement[charIndex].posStop.u;
tmpTex.v = listOfElement[charIndex].posStart.v;
coordTex.PushBack(tmpTex);
coordTex.PushBack(listOfElement[charIndex].posStop);
// set display positions :
coord2D_ts tmpCoord;
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
coord.PushBack(tmpCoord);
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
/* Step 2 :
*
* **
* ****
* ******
* ********
*/
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
coordTex.PushBack(listOfElement[charIndex].posStop);
tmpTex.u = listOfElement[charIndex].posStart.u;
tmpTex.v = listOfElement[charIndex].posStop.v;
coordTex.PushBack(tmpTex);
// set display positions :
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX;
coord.PushBack(tmpCoord);
#endif
// NOTE : Android does not support the Quads elements ...
/* Step 1 :
* ********
* ******
* ****
* **
*
*/
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
texCoord_ts tmpTex;
tmpTex.u = listOfElement[charIndex].posStop.u;
tmpTex.v = listOfElement[charIndex].posStart.v;
coordTex.PushBack(tmpTex);
coordTex.PushBack(listOfElement[charIndex].posStop);
// set display positions :
coord2D_ts tmpCoord;
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
coord.PushBack(tmpCoord);
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
/* Step 2 :
*
* **
* ****
* ******
* ********
*/
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
coordTex.PushBack(listOfElement[charIndex].posStop);
tmpTex.u = listOfElement[charIndex].posStart.u;
tmpTex.v = listOfElement[charIndex].posStop.v;
coordTex.PushBack(tmpTex);
// set display positions :
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX;
coord.PushBack(tmpCoord);
}
posDrawX += sizeWidth;
}

View File

@ -519,7 +519,7 @@ void ewol::UnloadFont(int32_t id)
/*
void ewol::DrawText(int32_t fontID,
coord2D_ts & drawPosition,
const uniChar_t * unicodeString,
@ -570,10 +570,11 @@ void ewol::DrawText(int32_t fontID,
}
drawPosition.x = posDrawX;
}
*/
void ewol::DrawText(int32_t fontID,
coord2D_ts & drawPosition,
coord2D_ts & clipSize,
const char * utf8String,
uint32_t & fontTextureId,
etk::VectorType<coord2D_ts> & coord,
@ -624,8 +625,22 @@ void ewol::DrawText(int32_t fontID,
charIndex = 0;
}
etkFloat_t sizeWidth = listOfElement[charIndex].width;
// check the clipping
if (clipSize.x>0 && posDrawX+sizeWidth > clipSize.x) {
// TODO : Create a better clipping methode ...
break;
}
// 0x01 == 0x20 == ' ';
if (tmpChar != 0x01) {
// NOTE : Android does not support the Quads elements ...
/* Step 1 :
* ********
* ******
* ****
* **
*
*/
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
texCoord_ts tmpTex;
@ -633,12 +648,7 @@ void ewol::DrawText(int32_t fontID,
tmpTex.v = listOfElement[charIndex].posStart.v;
coordTex.PushBack(tmpTex);
coordTex.PushBack(listOfElement[charIndex].posStop);
tmpTex.u = listOfElement[charIndex].posStart.u;
tmpTex.v = listOfElement[charIndex].posStop.v;
coordTex.PushBack(tmpTex);
// set display positions :
/*int32_t xxxx = posDrawX;
int32_t yyyy = drawPosition.y;*/
coord2D_ts tmpCoord;
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
@ -647,6 +657,29 @@ void ewol::DrawText(int32_t fontID,
coord.PushBack(tmpCoord);
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
/* Step 2 :
*
* **
* ****
* ******
* ********
*/
// set texture coordonates :
coordTex.PushBack(listOfElement[charIndex].posStart);
coordTex.PushBack(listOfElement[charIndex].posStop);
tmpTex.u = listOfElement[charIndex].posStart.u;
tmpTex.v = listOfElement[charIndex].posStop.v;
coordTex.PushBack(tmpTex);
// set display positions :
tmpCoord.x = posDrawX;
tmpCoord.y = drawPosition.y;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX + sizeWidth;
tmpCoord.y = drawPosition.y + size;
coord.PushBack(tmpCoord);
tmpCoord.x = posDrawX;
coord.PushBack(tmpCoord);
}

View File

@ -69,19 +69,14 @@ void ewol::OObject2DText::Draw(void)
glEnableClientState( GL_TEXTURE_COORD_ARRAY ); // Enable Texture Coord Arrays
glVertexPointer( 2, oglTypeFloat_t, 0, &m_coord[0] );
glTexCoordPointer( 2, oglTypeFloat_t, 0, &m_coordTex[0] );
#if !defined(__PLATFORM__Android)
glDrawArrays( GL_QUADS, 0, m_coord.Size());
#else
// NOTE : Android does not support the Quads elements ...
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
#endif
glDrawArrays( GL_TRIANGLES, 0, m_coord.Size());
//EWOL_DEBUG("request draw of " << m_coord.Size() << " elements");
glDisableClientState( GL_VERTEX_ARRAY ); // Disable Vertex Arrays
glDisableClientState( GL_TEXTURE_COORD_ARRAY ); // Disable Texture Coord Arrays
glDisable(GL_TEXTURE_2D);
}
void ewol::OObject2DText::Text(etkFloat_t x, etkFloat_t y, const char* utf8String)
void ewol::OObject2DText::Text(etkFloat_t x, etkFloat_t y, const char* utf8String, int32_t clippingPositionX)
{
m_FontTextureId = 0;
m_coord.Clear();
@ -92,7 +87,10 @@ void ewol::OObject2DText::Text(etkFloat_t x, etkFloat_t y, const char* utf8Strin
coord2D_ts drawPosition;
drawPosition.x = x;
drawPosition.y = y;
ewol::DrawText(m_FontId, drawPosition, utf8String, m_FontTextureId, m_coord, m_coordTex);
coord2D_ts clipSize;
clipSize.x = clippingPositionX;
clipSize.y = -1;
ewol::DrawText(m_FontId, drawPosition, clipSize, utf8String, m_FontTextureId, m_coord, m_coordTex);
}
void ewol::OObject2DText::UpdateOrigin(etkFloat_t x, etkFloat_t y)

View File

@ -37,7 +37,7 @@ namespace ewol {
public:
virtual void Draw(void);
// set a specific text
void Text(etkFloat_t x, etkFloat_t y, const char* utf8String);
void Text(etkFloat_t x, etkFloat_t y, const char* utf8String, int32_t clippingPositionX);
protected:
int32_t m_FontId; //!< font internal ID
color_ts m_textColorFg; //!< text color ...

View File

@ -82,7 +82,7 @@ ewol::Windows::Windows(void)
AddOObject(myOObject, "leftBoutton");
ewol::OObject2DText * myOObjectText = new ewol::OObject2DText();
myOObjectText->Text(62, 2, "My Title ...");
myOObjectText->Text(62, 2, "My Title ...", m_size.x-2);
AddOObject(myOObjectText, "Title");
}
}

View File

@ -54,12 +54,12 @@ static etkFloat_t m_width = 320;
static etkFloat_t m_height = 480;
ewol::Windows* m_uniqueWindows = NULL;
static int32_t times(char* tmpVar)
static int64_t GetCurrentTime(void)
{
struct timeval now;
gettimeofday(&now, NULL);
return (long)(now.tv_sec*1000 + now.tv_usec/1000);
//EWOL_VERBOSE("current time : " << now.tv_sec << "s " << now.tv_usec << "us");
return (int64_t)((int64_t)now.tv_sec*(int64_t)1000 + (int64_t)now.tv_usec/(int64_t)1000);
}
@ -123,12 +123,13 @@ void EWOL_NativeEventInputMotion(int pointerID, float x, float y )
void EWOL_NativeEventInputState(int pointerID, bool isUp, float x, float y )
{
//EWOL_INFO("Event : Input ID=" << pointerID << " [" << isUp << "] x=" << x << " y=" << y);
if (isUp) {
//EWOL_INFO("Event : Input ID=" << pointerID << " [DOWN] x=" << x << " y=" << y);
if(0<=pointerID && pointerID < NB_MAX_INPUT ) {
// Send Down message
if (NULL != m_uniqueWindows) {
//EWOL_DEBUG("ANDROID bt=" << pointerID+1 << " event : **=\"ButtonPress\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
EWOL_DEBUG("ANDROID bt=" << pointerID+1 << " event : **=\"ButtonPress\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
m_uniqueWindows->GenEventInput(pointerID+1, ewol::EVENT_INPUT_TYPE_DOWN, (etkFloat_t)x, (etkFloat_t)y);
}
// Check double or triple click event ...
@ -158,7 +159,7 @@ void EWOL_NativeEventInputState(int pointerID, bool isUp, float x, float y )
if(0<=pointerID && pointerID < NB_MAX_INPUT ) {
// Send Down message
if (NULL != m_uniqueWindows) {
//EWOL_DEBUG("ANDROID bt=" << pointerID+1 << " event : **=\"ButtonRelease\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
EWOL_DEBUG("ANDROID bt=" << pointerID+1 << " event : **=\"ButtonRelease\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
m_uniqueWindows->GenEventInput(pointerID+1, ewol::EVENT_INPUT_TYPE_UP, (etkFloat_t)x, (etkFloat_t)y);
}
if (m_previousBouttonId != pointerID+1) {
@ -170,15 +171,15 @@ void EWOL_NativeEventInputState(int pointerID, bool isUp, float x, float y )
m_previousTime = 0;
m_previousDouble = false;
} else {
int64_t currentTime = times(NULL); // return the tic in 10ms
//EWOL_DEBUG("time is : " << currentTime << " "<< currentTime/100 <<"s " << (currentTime%100)*10 << "ms");
int64_t currentTime = GetCurrentTime(); // return the tic in 10ms
//EWOL_DEBUG("time is : " << (int)currentTime << " "<< (int)(currentTime/100) <<"s " << (int)((currentTime%100)*10) << "ms");
if (currentTime - m_previousTime >= SEPARATED_CLICK_TIME) {
//check if the same area click :
if( abs(m_previousDown_x - x) < OFFSET_MOVE_CLICKED
&& abs(m_previousDown_y - y) < OFFSET_MOVE_CLICKED )
{
// might generate an sigle event :
//EWOL_DEBUG("ANDROID event : ** = \"ButtonClickedSingle\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
EWOL_DEBUG("ANDROID event : ** = \"ButtonClickedSingle\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
m_uniqueWindows->GenEventInput(pointerID+1, ewol::EVENT_INPUT_TYPE_SINGLE, (etkFloat_t)x, (etkFloat_t)y);
m_previous_x = m_previousDown_x;
m_previous_y = m_previousDown_y;
@ -201,12 +202,12 @@ void EWOL_NativeEventInputState(int pointerID, bool isUp, float x, float y )
{
// might generate an sigle event :
if (false == m_previousDouble) {
//EWOL_DEBUG("ANDROID event : ** = \"ButtonClickedDouble\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
EWOL_DEBUG("ANDROID event : ** = \"ButtonClickedDouble\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
m_uniqueWindows->GenEventInput(pointerID+1, ewol::EVENT_INPUT_TYPE_DOUBLE, (etkFloat_t)x, (etkFloat_t)y);
m_previousTime = currentTime;
m_previousDouble = true;
} else {
//EWOL_DEBUG("ANDROID event : ** = \"ButtonClickedTriple\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
EWOL_DEBUG("ANDROID event : ** = \"ButtonClickedTriple\" (" << (etkFloat_t)x << "," << (etkFloat_t)y << ")");
m_uniqueWindows->GenEventInput(pointerID+1, ewol::EVENT_INPUT_TYPE_TRIPLE, (etkFloat_t)x, (etkFloat_t)y);
// reset values ...
m_previousDown_x = -1;
@ -299,7 +300,7 @@ void EWOL_NativeRender(void)
if (sDemoStopped) {
curTime = sTimeStopped + sTimeOffset;
} else {
curTime =times(NULL) + sTimeOffset;
curTime =GetCurrentTime() + sTimeOffset;
if (sTimeOffsetInit == 0) {
sTimeOffsetInit = 1;
sTimeOffset = -curTime;

View File

@ -50,6 +50,11 @@
#include <sys/times.h>
static int64_t GetCurrentTime(void)
{
return times(NULL);
}
#undef __class__
#define __class__ "guiAbstraction"
@ -543,7 +548,7 @@ namespace guiAbstraction {
m_previousTime = 0;
m_previousDouble = false;
} else {
int64_t currentTime = times(NULL); // return the tic in 10ms
int64_t currentTime = GetCurrentTime(); // return the tic in 10ms
//EWOL_DEBUG("time is : " << currentTime << " "<< currentTime/100 <<"s " << (currentTime%100)*10 << "ms");
if (currentTime - m_previousTime >= SEPARATED_CLICK_TIME) {
//check if the same area click :

View File

@ -137,7 +137,7 @@ void ewol::Button::OnRegenerateDisplay(void)
int32_t fontHeight = ewol::GetHeight(fontId);
int32_t fontWidth = ewol::GetWidth(fontId, m_label.c_str());
*/
tmpText->Text(tmpTextOriginX, tmpTextOriginY, m_label.c_str());
tmpText->Text(tmpTextOriginX, tmpTextOriginY, m_label.c_str(), m_size.x - borderSize - 2*paddingSize);
ewol::OObject2DColored * tmpOObjects = new ewol::OObject2DColored;
tmpOObjects->SetColor(m_textColorBg);

View File

@ -116,7 +116,7 @@ void ewol::CheckBox::OnRegenerateDisplay(void)
//int32_t fontWidth = ewol::GetWidth(fontId, m_label.c_str());
int32_t posy = (m_size.y - fontHeight - 6)/2 + 3;
//int32_t posx = (m_size.x - fontWidth - 6)/2 + 25;
tmpText->Text(boxSize+5, posy, m_label.c_str());
tmpText->Text(boxSize+5, posy, m_label.c_str(), m_size.x - (boxSize+5));
ewol::OObject2DColored * tmpOObjects = new ewol::OObject2DColored;

View File

@ -135,7 +135,7 @@ void ewol::Entry::OnRegenerateDisplay(void)
tmpSizeY -= 2*m_paddingSize;
ewol::OObject2DText * tmpText = new ewol::OObject2DText("", -1, m_textColorFg);
tmpText->Text(tmpTextOriginX, tmpTextOriginY, m_data.c_str() + m_displayStartPosition);
tmpText->Text(tmpTextOriginX, tmpTextOriginY, m_data.c_str() + m_displayStartPosition, m_size.x - (m_borderSize + 2*m_paddingSize));
ewol::OObject2DColored * tmpOObjects = new ewol::OObject2DColored;
tmpOObjects->SetColor(m_textColorBg);

View File

@ -101,7 +101,7 @@ void ewol::Label::OnRegenerateDisplay(void)
tmpOriginY += paddingSize;
ewol::OObject2DText * tmpText = new ewol::OObject2DText("", -1, m_textColorFg);
tmpText->Text(tmpOriginX, tmpOriginY, m_label.c_str());
tmpText->Text(tmpOriginX, tmpOriginY, m_label.c_str(), m_size.x - 2*paddingSize);
AddOObject(tmpText, "LabelText");

View File

@ -95,8 +95,10 @@ void ewol::List::OnRegenerateDisplay(void)
BGOObjects->SetColor(basicBG);
BGOObjects->Rectangle(0, 0, m_size.x, m_size.y);
uint32_t displayableRaw = m_size.y / (minHeight + 2*m_paddingSize);
for(uint32_t iii=0; iii<nbRaw; iii++) {
// We display only compleate lines ...
for(uint32_t iii=0; iii<nbRaw && iii<displayableRaw; iii++) {
etk::String myTextToWrite;
color_ts fg;
color_ts bg;
@ -106,7 +108,7 @@ void ewol::List::OnRegenerateDisplay(void)
tmpOriginYBG += minHeight+2*m_paddingSize;
ewol::OObject2DText * tmpText = new ewol::OObject2DText("", -1, fg);
tmpText->Text(tmpOriginX, tmpOriginY, myTextToWrite.c_str());
tmpText->Text(tmpOriginX, tmpOriginY, myTextToWrite.c_str(), m_size.x - (2*m_paddingSize));
AddOObject(tmpText);
tmpOriginY += minHeight + 2* m_paddingSize;
}

View File

@ -20,7 +20,9 @@ LOCAL_MODULE := libpng
LOCAL_CFLAGS := -DPNG_NO_LIMITS_H
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk

View File

@ -22,6 +22,8 @@ LOCAL_MODULE := libpng
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk

View File

@ -5,7 +5,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := tinyxml
LOCAL_STATIC_LIBRARIES :=
LOCAL_C_INCLUDES :=
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)

View File

@ -18,7 +18,9 @@ include $(CLEAR_VARS)
LOCAL_MODULE := libzip
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
LOCAL_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk

View File

@ -20,6 +20,8 @@ LOCAL_MODULE := libzip
LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
# load the common sources file of the platform
include $(LOCAL_PATH)/file.mk