From 40d6de087b0f63fa08de430c1dafc8d451833b32 Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Thu, 23 Feb 2012 22:34:12 +0100 Subject: [PATCH] change text display --- AndroidManifest.xml | 1 + jni/edn/Buffer/BufferEmpty.cpp | 9 ++------- jni/edn/Buffer/BufferText.cpp | 26 ++++++++++++++++---------- 3 files changed, 19 insertions(+), 17 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 9d26d2b..6ab881c 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -18,4 +18,5 @@ + diff --git a/jni/edn/Buffer/BufferEmpty.cpp b/jni/edn/Buffer/BufferEmpty.cpp index 5f7b00c..ea08728 100644 --- a/jni/edn/Buffer/BufferEmpty.cpp +++ b/jni/edn/Buffer/BufferEmpty.cpp @@ -82,22 +82,17 @@ int32_t BufferEmpty::Display(ewol::OObject2DTextColored& OOTextNormal, coord2D_ts textPos; textPos.x = 20; textPos.y = 20; - clipping_ts drawClipping; - drawClipping.x = 0; - drawClipping.y = 0; - drawClipping.w = sizeX; - drawClipping.h = sizeY; myColor = ColorizeManager::Get("normal"); OOTextNormal.SetColor(myColor->GetFG()); etk::UString tmpDisplay = "edn - Editeur De N'ours"; - OOTextBold.Text(textPos, drawClipping, tmpDisplay); + OOTextBold.Text(textPos, tmpDisplay); myColor = ColorizeManager::Get("commentDoxygen"); OOTextNormal.SetColor(myColor->GetFG()); textPos.y = (int32_t)(textPos.y + letterHeight*1.30); tmpDisplay = "No Buffer Availlable to display"; - OOTextNormal.Text(textPos, drawClipping, tmpDisplay); + OOTextNormal.Text(textPos, tmpDisplay); color_ts bgColor; //!< Text color diff --git a/jni/edn/Buffer/BufferText.cpp b/jni/edn/Buffer/BufferText.cpp index 67321d5..26a23de 100644 --- a/jni/edn/Buffer/BufferText.cpp +++ b/jni/edn/Buffer/BufferText.cpp @@ -169,6 +169,8 @@ void BufferText::Save(void) m_EdnBuf.DumpIn(myFile); fclose(myFile); SetModify(false); + } else { + EDN_ERROR("Can not open in writing the specify file"); } } @@ -250,14 +252,8 @@ void BufferText::DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObjec coord2D_ts textPos; textPos.x = 1; textPos.y = positionY; - clipping_ts drawClipping; - drawClipping.x = 0; - drawClipping.y = 0; - drawClipping.w = sizeX; - drawClipping.h = sizeY; - // TODO : Remove this unreallistic leak of time etk::UString tmppp = tmpLineNumber; - OOText->Text(textPos, drawClipping, tmppp); + OOText->Text(textPos, tmppp); } #define CURSOR_WIDTH (5) @@ -267,7 +263,7 @@ void BufferText::CursorDisplay(ewol::OObject2DColored* OOColored, int32_t x, int color_ts & tmpppppp = ColorizeManager::Get(COLOR_CODE_CURSOR); OOColored->SetColor(tmpppppp); if (true == ewol::IsSetInsert()) { - OOColored->Rectangle( x, y, letterWidth, letterHeight, clip); + OOColored->Rectangle( x, y, letterWidth, letterHeight); } else { // TODO : Clipping //if (x >= clip.x) { @@ -427,6 +423,12 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal, drawClippingTextArea.w = sizeX - drawClipping.x; drawClippingTextArea.h = sizeY; + OOTextNormal.clippingSet(drawClippingTextArea); + OOTextBold.clippingSet(drawClippingTextArea); + OOTextItalic.clippingSet(drawClippingTextArea); + OOTextBoldItalic.clippingSet(drawClippingTextArea); + OOColored.clippingSet(drawClippingTextArea); + for (iii=m_displayStartBufferPos; iii