remove etkFloat_t element and coord2D_ts with float and Vector2D<float>
This commit is contained in:
@@ -117,19 +117,19 @@ bool Buffer::NeedToUpdateDisplayPosition(void)
|
||||
return tmpVal;
|
||||
}
|
||||
|
||||
coord2D_ts Buffer::GetBorderSize(void)
|
||||
Vector2D<float> Buffer::GetBorderSize(void)
|
||||
{
|
||||
coord2D_ts tmpVal;
|
||||
Vector2D<float> tmpVal;
|
||||
tmpVal.x = 30;
|
||||
tmpVal.y = 30;
|
||||
return tmpVal;
|
||||
}
|
||||
|
||||
|
||||
coord2D_ts Buffer::GetPosition(int32_t fontId,bool& centerRequested)
|
||||
Vector2D<float> Buffer::GetPosition(int32_t fontId,bool& centerRequested)
|
||||
{
|
||||
centerRequested = false;
|
||||
coord2D_ts tmpVal;
|
||||
Vector2D<float> tmpVal;
|
||||
tmpVal.x = 0;
|
||||
tmpVal.y = 0;
|
||||
return tmpVal;
|
||||
|
@@ -117,15 +117,15 @@ class Buffer {
|
||||
// moving with cursor change position:
|
||||
private:
|
||||
bool m_updatePositionRequested; //!< if a position xhange in the windows ...
|
||||
coord2D_ts m_maximumSize; //!< current maxSize of the buffer
|
||||
Vector2D<float> m_maximumSize; //!< current maxSize of the buffer
|
||||
protected:
|
||||
void RequestUpdateOfThePosition(void) { m_updatePositionRequested = true; };
|
||||
void SetMaximumSize(coord2D_ts maxSize) { m_maximumSize = maxSize; };
|
||||
void SetMaximumSize(Vector2D<float> maxSize) { m_maximumSize = maxSize; };
|
||||
public:
|
||||
bool NeedToUpdateDisplayPosition(void);
|
||||
virtual coord2D_ts GetBorderSize(void); // this is to requested the minimum size for the buffer that is not consider as visible ...
|
||||
virtual coord2D_ts GetPosition(int32_t fontId, bool& centerRequested);
|
||||
coord2D_ts GetMaxSize(void) { return m_maximumSize; };
|
||||
virtual Vector2D<float> GetBorderSize(void); // this is to requested the minimum size for the buffer that is not consider as visible ...
|
||||
virtual Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
Vector2D<float> GetMaxSize(void) { return m_maximumSize; };
|
||||
protected:
|
||||
bool m_fileModify; //!<
|
||||
// naming
|
||||
|
@@ -79,7 +79,7 @@ int32_t BufferEmpty::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
int32_t fontId = OOTextNormal.GetFontID();
|
||||
int32_t letterHeight = ewol::GetHeight(fontId);
|
||||
|
||||
coord2D_ts textPos;
|
||||
Vector2D<float> textPos;
|
||||
textPos.x = 20;
|
||||
textPos.y = 20;
|
||||
|
||||
|
@@ -214,7 +214,7 @@ void BufferText::DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObjec
|
||||
OOColored->Rectangle( 0, positionY, sizeX+0.5*SEPARATION_SIZE_LINE_NUMBER, sizeY);
|
||||
OOText->SetColor(ColorizeManager::Get(COLOR_CODE_LINE_NUMBER));
|
||||
|
||||
coord2D_ts textPos;
|
||||
Vector2D<float> textPos;
|
||||
textPos.x = 1;
|
||||
textPos.y = positionY;
|
||||
etk::UString tmppp = tmpLineNumber;
|
||||
@@ -299,7 +299,7 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
|
||||
// update the display position with the scroll ofset :
|
||||
int32_t displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, displayStartLineId);
|
||||
coord2D_ts maxSize;
|
||||
Vector2D<float> maxSize;
|
||||
maxSize.x = 0.0;
|
||||
maxSize.y = m_EdnBuf.NumberOfLines() * letterHeight;
|
||||
int32_t nbColoneForLineNumber = GetLineNumberNumberOfElement();
|
||||
@@ -370,7 +370,7 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
OOTextBoldItalic.clippingSet(drawClippingTextArea);
|
||||
OOColored.clippingSet(drawClippingTextArea);
|
||||
|
||||
etkFloat_t lineMaxSize = 0.0;
|
||||
float lineMaxSize = 0.0;
|
||||
for (iii=displayStartBufferPos; iii<mylen && displayLines < m_displaySize.y ; iii = new_i) {
|
||||
//APPL_DEBUG("diplay element=" << iii);
|
||||
int displaywidth;
|
||||
@@ -411,7 +411,7 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
haveBg = selectColor->HaveBg();
|
||||
}
|
||||
}
|
||||
coord2D_ts textPos;
|
||||
Vector2D<float> textPos;
|
||||
textPos.x = pixelX-offsetX;
|
||||
textPos.y = y;
|
||||
if (true == selectColor->GetItalic() ) {
|
||||
@@ -849,11 +849,11 @@ void BufferText::cursorMove(ewol::eventKbMoveType_te moveTypeEvent)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
coord2D_ts BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
Vector2D<float> BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
{
|
||||
centerRequested = m_centerRequested;
|
||||
m_centerRequested = false;
|
||||
coord2D_ts outputPosition;
|
||||
Vector2D<float> outputPosition;
|
||||
|
||||
// Display position (Y mode):
|
||||
APPL_INFO("change the position : " << m_cursorPos);
|
||||
@@ -867,8 +867,8 @@ coord2D_ts BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
|
||||
// get font porperties :
|
||||
// TODO : change this :
|
||||
etkFloat_t letterWidth = ewol::GetWidth(fontId, "A");
|
||||
etkFloat_t letterHeight = ewol::GetHeight(fontId);
|
||||
float letterWidth = ewol::GetWidth(fontId, "A");
|
||||
float letterHeight = ewol::GetHeight(fontId);
|
||||
outputPosition.x *= letterWidth;
|
||||
outputPosition.y *= letterHeight;
|
||||
return outputPosition;
|
||||
@@ -876,7 +876,7 @@ coord2D_ts BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
/* if we request a center :
|
||||
} else {
|
||||
// center the line at the middle of the screen :
|
||||
coord2D_ts outputPosition;
|
||||
Vector2D<float> outputPosition;
|
||||
//APPL_DEBUG(" -------------------------------------------------");
|
||||
outputPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
|
||||
//APPL_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << outputPosition.y);
|
||||
|
@@ -85,7 +85,7 @@ class BufferText : public Buffer {
|
||||
|
||||
// Direct buffer IO
|
||||
EdnBuf m_EdnBuf; //!< buffer associated on this displayer
|
||||
coord2D_ts m_displaySize; //!< number of char displayable in the screan
|
||||
Vector2D<float> m_displaySize; //!< number of char displayable in the screan
|
||||
// Cursor :
|
||||
int32_t m_cursorPos; //!< position in the buffer of the cursor
|
||||
int32_t m_cursorPreferredCol; //!< colomn of the last up and down ...
|
||||
@@ -96,7 +96,7 @@ class BufferText : public Buffer {
|
||||
private:
|
||||
bool m_centerRequested;
|
||||
public:
|
||||
virtual coord2D_ts GetPosition(int32_t fontId, bool& centerRequested);
|
||||
virtual Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
private:
|
||||
bool TextDMoveUp(int32_t offset);
|
||||
bool TextDMoveDown(int32_t offset);
|
||||
|
@@ -367,4 +367,4 @@ colorInformation_ts * EdnBuf::GetElementColorAtPosition(displayHLData_ts & MData
|
||||
}
|
||||
}
|
||||
return GetElementColorAtPosition(pos, MData.posHLPass1);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user