remove etkFloat_t element and coord2D_ts with float and Vector2D<float>

This commit is contained in:
Edouard Dupin 2012-07-01 10:13:24 +02:00
parent df8d2772da
commit 0d79b55112
13 changed files with 35 additions and 35 deletions

View File

@ -54,7 +54,7 @@
</rule>
<rule name="condition">
<color>boolean</color>
<start>==|&lt;=|&gt;=|!=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</start>
<start>==|&lt;=|&gt;=|~=|&lt;{1,2}|&gt;{1,2}|&amp;&amp;|\{|\}|</start>
</rule>
</pass2>
</EdnLang>

View File

@ -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;

View File

@ -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

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -367,4 +367,4 @@ colorInformation_ts * EdnBuf::GetElementColorAtPosition(displayHLData_ts & MData
}
}
return GetElementColorAtPosition(pos, MData.posHLPass1);
}
}

View File

@ -186,7 +186,7 @@ bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToW
return true;
}
bool BufferView::OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, etkFloat_t x, etkFloat_t y)
bool BufferView::OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y)
{
if (1 == IdInput && typeEvent == ewol::EVENT_INPUT_TYPE_SINGLE) {
APPL_INFO("Event on List : IdInput=" << IdInput << " colomn=" << colomn << " raw=" << raw );

View File

@ -69,7 +69,7 @@ class BufferView : public ewol::List
virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &bg);
virtual uint32_t GetNuberOfRaw(void);
virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg);
virtual bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, etkFloat_t x, etkFloat_t y);
virtual bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
private:
int32_t m_selectedIdRequested;
int32_t m_selectedID;

View File

@ -87,7 +87,7 @@ CodeView::~CodeView(void)
*/
void CodeView::UpdateNumberOfLineReference(int32_t bufferID)
{
coord2D_ts tmpCoord;
Vector2D<float> tmpCoord;
tmpCoord.x = 0;
tmpCoord.y = 0;
if (m_lineNumberList.Size()<=bufferID) {
@ -182,9 +182,9 @@ void CodeView::OnRegenerateDisplay(void)
if(true == BufferManager::Get(m_bufferID)->NeedToUpdateDisplayPosition() ) {
coord2D_ts borderWidth = BufferManager::Get(m_bufferID)->GetBorderSize();
Vector2D<float> borderWidth = BufferManager::Get(m_bufferID)->GetBorderSize();
bool centerRequested = false;
coord2D_ts currentPosition = BufferManager::Get(m_bufferID)->GetPosition(m_OObjectTextNormal[m_currentCreateId].GetFontID(), centerRequested);
Vector2D<float> currentPosition = BufferManager::Get(m_bufferID)->GetPosition(m_OObjectTextNormal[m_currentCreateId].GetFontID(), centerRequested);
SetScrollingPositionDynamic(borderWidth, currentPosition, centerRequested);
} // else : nothing to do ...
@ -238,9 +238,9 @@ bool CodeView::OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveTy
* @return true the event is used
* @return false the event is not used
*/
bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, coord2D_ts pos)
bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D<float> pos)
{
coord2D_ts relativePos = RelativePosition(pos);
Vector2D<float> relativePos = RelativePosition(pos);
if (m_bufferID < 0) {
return false;
}

View File

@ -63,7 +63,7 @@ class CodeView :public ewol::WidgetScrooled
color_ts m_textColorBg; //!< Background color
int32_t m_bufferID;
bool m_buttunOneSelected;
etk::VectorType<coord2D_ts> m_lineNumberList;
etk::VectorType<Vector2D<float> > m_lineNumberList;
void UpdateNumberOfLineReference(int32_t bufferID);
// drawing elements :
ewol::OObject2DTextColored m_OObjectTextNormal[NB_BOUBLE_BUFFER];
@ -92,7 +92,7 @@ class CodeView :public ewol::WidgetScrooled
* @return true the event is used
* @return false the event is not used
*/
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, coord2D_ts pos);
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D<float> pos);
virtual bool OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData);
virtual bool OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent);

View File

@ -93,7 +93,7 @@ etk::UString CTagsManager::GetFolder(etk::UString &inputString)
return out;
}
bool CTagsManager::OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y)
bool CTagsManager::OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, float x, float y)
{
/*
switch (id)
@ -348,7 +348,7 @@ void CTagsManager::JumpTo(void)
// get the middle button of the clipboard ==> represent the current selection ...
ClipBoard::Get(COPY_MIDDLE_BUTTON, data);
if (data.Size() == 0) {
APPL_INFO("No current Sélection");
APPL_INFO("No current S\E9lection");
}
tagEntry entry;
data.PushBack('\0');

View File

@ -50,7 +50,7 @@ class CTagsManager: public etk::Singleton<CTagsManager>, public ewol::Widget
~CTagsManager(void);
public:
virtual bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y);
virtual bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, float x, float y);
private:
int32_t m_currentSelectedID;
void LoadTagFile(void);