[DEV] Change the ETK vector and matrix
This commit is contained in:
@@ -121,19 +121,19 @@ bool Buffer::NeedToUpdateDisplayPosition(void)
|
||||
return tmpVal;
|
||||
}
|
||||
|
||||
Vector2D<float> Buffer::GetBorderSize(void)
|
||||
etk::Vector2D<float> Buffer::GetBorderSize(void)
|
||||
{
|
||||
Vector2D<float> tmpVal;
|
||||
etk::Vector2D<float> tmpVal;
|
||||
tmpVal.x = 30;
|
||||
tmpVal.y = 30;
|
||||
return tmpVal;
|
||||
}
|
||||
|
||||
|
||||
Vector2D<float> Buffer::GetPosition(int32_t fontId,bool& centerRequested)
|
||||
etk::Vector2D<float> Buffer::GetPosition(int32_t fontId,bool& centerRequested)
|
||||
{
|
||||
centerRequested = false;
|
||||
Vector2D<float> tmpVal;
|
||||
etk::Vector2D<float> tmpVal;
|
||||
tmpVal.x = 0;
|
||||
tmpVal.y = 0;
|
||||
return tmpVal;
|
||||
|
@@ -27,7 +27,7 @@
|
||||
#define __BUFFER_H__
|
||||
|
||||
#include <etk/UString.h>
|
||||
#include <etk/File.h>
|
||||
#include <etk/os/File.h>
|
||||
#include <etk/unicode.h>
|
||||
#include <ewol/ewol.h>
|
||||
|
||||
@@ -101,8 +101,8 @@ class Buffer {
|
||||
}
|
||||
virtual void AddChar(uniChar_t unicodeData) {};
|
||||
virtual void cursorMove(ewol::eventKbMoveType_te moveTypeEvent) {};
|
||||
virtual void MouseSelectFromCursorTo(Vector2D<float> pos) {};
|
||||
virtual void MouseEvent(Vector2D<float> pos) {};
|
||||
virtual void MouseSelectFromCursorTo(etk::Vector2D<float> pos) {};
|
||||
virtual void MouseEvent(etk::Vector2D<float> pos) {};
|
||||
virtual void MouseEventDouble(void) {};
|
||||
virtual void MouseEventTriple(void) {};
|
||||
virtual void RemoveLine(void) {};
|
||||
@@ -127,15 +127,15 @@ class Buffer {
|
||||
// moving with cursor change position:
|
||||
private:
|
||||
bool m_updatePositionRequested; //!< if a position xhange in the windows ...
|
||||
Vector2D<float> m_maximumSize; //!< current maxSize of the buffer
|
||||
etk::Vector2D<float> m_maximumSize; //!< current maxSize of the buffer
|
||||
protected:
|
||||
void RequestUpdateOfThePosition(void) { m_updatePositionRequested = true; };
|
||||
void SetMaximumSize(Vector2D<float> maxSize) { m_maximumSize = maxSize; };
|
||||
void SetMaximumSize(etk::Vector2D<float> maxSize) { m_maximumSize = maxSize; };
|
||||
public:
|
||||
bool NeedToUpdateDisplayPosition(void);
|
||||
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; };
|
||||
virtual etk::Vector2D<float> GetBorderSize(void); // this is to requested the minimum size for the buffer that is not consider as visible ...
|
||||
virtual etk::Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
etk::Vector2D<float> GetMaxSize(void) { return m_maximumSize; };
|
||||
protected:
|
||||
bool m_fileModify; //!<
|
||||
// naming
|
||||
|
@@ -87,7 +87,7 @@ int32_t BufferEmpty::Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
int32_t letterHeight = OOTextNormal.GetHeight();
|
||||
#endif
|
||||
|
||||
Vector2D<float> textPos;
|
||||
etk::Vector2D<float> textPos;
|
||||
textPos.x = 20;
|
||||
textPos.y = sizeY - 20 - letterHeight;
|
||||
etk::UString tmpDisplay ;
|
||||
|
@@ -214,7 +214,7 @@ void BufferText::DrawLineNumber(ewol::TEXT_DISPLAY_TYPE* OOText, ewol::OObject2D
|
||||
OOColored->Rectangle( 0, positionY, sizeX+0.5*SEPARATION_SIZE_LINE_NUMBER, sizeY);
|
||||
OOText->SetColor(ColorizeManager::Get(COLOR_CODE_LINE_NUMBER));
|
||||
|
||||
Vector2D<float> textPos;
|
||||
etk::Vector2D<float> textPos;
|
||||
textPos.x = 1;
|
||||
textPos.y = positionY;
|
||||
etk::UString tmppp = tmpLineNumber;
|
||||
@@ -309,7 +309,7 @@ int32_t BufferText::Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
|
||||
// update the display position with the scroll ofset :
|
||||
int32_t displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, displayStartLineId);
|
||||
Vector2D<float> maxSize;
|
||||
etk::Vector2D<float> maxSize;
|
||||
maxSize.x = 0.0;
|
||||
maxSize.y = m_EdnBuf.NumberOfLines() * letterHeight;
|
||||
int32_t nbColoneForLineNumber = GetLineNumberNumberOfElement();
|
||||
@@ -415,7 +415,7 @@ int32_t BufferText::Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
int32_t drawSize = 0;
|
||||
|
||||
// update display position :
|
||||
Vector2D<float> textPos;
|
||||
etk::Vector2D<float> textPos;
|
||||
textPos.x = pixelX-offsetX;
|
||||
textPos.y = y;
|
||||
// update X pos
|
||||
@@ -540,7 +540,7 @@ int32_t BufferText::Display(ewol::TEXT_DISPLAY_TYPE& OOTextNormal,
|
||||
|
||||
|
||||
|
||||
int32_t BufferText::GetMousePosition(Vector2D<float> pos)
|
||||
int32_t BufferText::GetMousePosition(etk::Vector2D<float> pos)
|
||||
{
|
||||
bool inLineDone=false;
|
||||
//APPL_DEBUG("try to find in : " << width << "," << height);
|
||||
@@ -591,7 +591,7 @@ int32_t BufferText::GetMousePosition(Vector2D<float> pos)
|
||||
*
|
||||
*/
|
||||
// TODO : Simplify selection ....
|
||||
void BufferText::MouseEvent(Vector2D<float> pos)
|
||||
void BufferText::MouseEvent(etk::Vector2D<float> pos)
|
||||
{
|
||||
if (true == ewol::IsSetShift() ) {
|
||||
MouseSelectFromCursorTo(pos);
|
||||
@@ -621,7 +621,7 @@ void BufferText::MouseEvent(Vector2D<float> pos)
|
||||
* @todo : Set the move up and DOWN...
|
||||
*
|
||||
*/
|
||||
void BufferText::MouseSelectFromCursorTo(Vector2D<float> pos)
|
||||
void BufferText::MouseSelectFromCursorTo(etk::Vector2D<float> pos)
|
||||
{
|
||||
// Get the caracter mouse position
|
||||
int32_t newPos = GetMousePosition(pos);
|
||||
@@ -900,11 +900,11 @@ void BufferText::cursorMove(ewol::eventKbMoveType_te moveTypeEvent)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Vector2D<float> BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
etk::Vector2D<float> BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
{
|
||||
centerRequested = m_centerRequested;
|
||||
m_centerRequested = false;
|
||||
Vector2D<float> outputPosition;
|
||||
etk::Vector2D<float> outputPosition;
|
||||
|
||||
// Display position (Y mode):
|
||||
APPL_INFO("change the position : " << m_cursorPos);
|
||||
@@ -932,7 +932,7 @@ Vector2D<float> BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
/* if we request a center :
|
||||
} else {
|
||||
// center the line at the middle of the screen :
|
||||
Vector2D<float> outputPosition;
|
||||
etk::Vector2D<float> outputPosition;
|
||||
//APPL_DEBUG(" -------------------------------------------------");
|
||||
outputPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
|
||||
//APPL_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << outputPosition.y);
|
||||
|
@@ -70,8 +70,8 @@ class BufferText : public Buffer {
|
||||
#endif
|
||||
void AddChar(uniChar_t unicodeData);
|
||||
void cursorMove(ewol::eventKbMoveType_te moveTypeEvent);
|
||||
void MouseSelectFromCursorTo(Vector2D<float> pos);
|
||||
void MouseEvent(Vector2D<float> pos);
|
||||
void MouseSelectFromCursorTo(etk::Vector2D<float> pos);
|
||||
void MouseEvent(etk::Vector2D<float> pos);
|
||||
void MouseEventDouble(void);
|
||||
void MouseEventTriple(void);
|
||||
|
||||
@@ -100,7 +100,7 @@ class BufferText : public Buffer {
|
||||
|
||||
// Direct buffer IO
|
||||
EdnBuf m_EdnBuf; //!< buffer associated on this displayer
|
||||
Vector2D<float> m_displaySize; //!< number of char displayable in the screan
|
||||
etk::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 ...
|
||||
@@ -112,13 +112,13 @@ class BufferText : public Buffer {
|
||||
private:
|
||||
bool m_centerRequested;
|
||||
public:
|
||||
virtual Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
virtual etk::Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
private:
|
||||
bool TextDMoveUp(int32_t offset);
|
||||
bool TextDMoveDown(int32_t offset);
|
||||
void SetInsertPosition(int32_t newPosition, bool insertChar = false);
|
||||
|
||||
int32_t GetMousePosition(Vector2D<float> pos);
|
||||
int32_t GetMousePosition(etk::Vector2D<float> pos);
|
||||
|
||||
void DrawLineNumber(ewol::TEXT_DISPLAY_TYPE* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY, int32_t nbColomn, int32_t lineNumber, int32_t positionY);
|
||||
void DrawCursor(ewol::OObject2DColored* OOColored, int32_t x, int32_t y, int32_t letterHeight, int32_t letterWidth, clipping_ts &clip);
|
||||
|
Reference in New Issue
Block a user