[DEV] remove etk_min and etk_max & etk::Color<> interface

This commit is contained in:
Edouard DUPIN 2014-07-03 21:03:26 +02:00
parent 4942765ccf
commit b9a1c026fa
4 changed files with 11 additions and 14 deletions

View File

@ -8,6 +8,7 @@
#include <etk/types.h>
#include <etk/stdTools.h>
#include <appl/Buffer.h>
#include <appl/debug.h>
#include <ewol/context/clipBoard.h>
@ -871,7 +872,7 @@ void appl::Buffer::cleanHighLight() {
appl::HighlightInfo* appl::Buffer::getElementColorAtPosition(int64_t _pos, int64_t &_starPos) {
int32_t start = etk_max(0, _starPos-1);
int32_t start = std::max((int64_t)0, _starPos-1);
for (size_t iii = start; iii < m_HLDataPass1.size(); ++iii) {
_starPos = iii;
if ( m_HLDataPass1[iii].beginStart <= _pos
@ -909,7 +910,7 @@ void appl::Buffer::hightlightGenerateLines(appl::DisplayHLData& _MData, const ap
endSearch = m_HLDataPass1.size();
}
int64_t kkk;
for (kkk = etk_max(startId, 0); kkk < endSearch; ++kkk) {
for (kkk = std::max(startId, (int64_t)0); kkk < endSearch; ++kkk) {
// empty section :
if (kkk == 0) {
if (HLStartPos < m_HLDataPass1[kkk].beginStart) {
@ -961,7 +962,7 @@ void appl::Buffer::hightlightGenerateLines(appl::DisplayHLData& _MData, const ap
appl::HighlightInfo* appl::Buffer::getElementColorAtPosition(appl::DisplayHLData& _MData, int64_t _pos) {
int64_t start = etk_max(0, _MData.posHLPass2-1);
int64_t start = std::max((int64_t)0, _MData.posHLPass2-1);
for (int64_t iii=start; iii<(int32_t)_MData.HLData.size(); iii++) {
_MData.posHLPass2 = iii;
if( _MData.HLData[iii].beginStart <= _pos

View File

@ -381,14 +381,14 @@ namespace appl {
* @return position of the start selection.
*/
int64_t getStartSelectionPos() {
return etk_min(m_cursorPos, m_cursorSelectPos);
return std::min(m_cursorPos, m_cursorSelectPos);
}
/**
* @brief Get the Stop position of the selection.
* @return position of the stop selection.
*/
int64_t getStopSelectionPos() {
return etk_max(m_cursorPos, m_cursorSelectPos);
return std::max(m_cursorPos, m_cursorSelectPos);
}
protected:
float m_cursorPreferredCol; //!< position of the cursor when up and down is done.

View File

@ -138,7 +138,7 @@ void appl::TextViewer::onRegenerateDisplay() {
vec3 tmpCursorPosition(0, 0, -1);
float tmpCursorLenght = -1.0;
// real display ...
m_displayText.setColor(etk::Color<>(0, 0, 0, 256));
m_displayText.setColor(etk::Color<>(0, 0, 0, 255));
float countNbLine = 1;
int32_t countColomn = 0;
// the siplay string :
@ -220,12 +220,12 @@ void appl::TextViewer::onRegenerateDisplay() {
if (*it == u32char::Return) {
countNbLine += 1;
countColomn = 0;
maxSizeX = etk_max(m_displayText.getPos().x(), maxSizeX);
maxSizeX = std::max(m_displayText.getPos().x(), maxSizeX);
// Display the end line position only if we have the focus ...
if (DisplayCursorAndSelection == true) {
if (it >= selectPosStart && it < selectPosStop) {
ewol::compositing::Drawing& draw = m_displayText.getDrawing();
draw.setColor(etk::Color<>(0xFF0000FF));
draw.setColor(etk::Color<>(0xFF, 0x00, 0x00, 0xFF));
draw.setPos(m_displayText.getPos() + tmpLetterSize/4.0f);
draw.rectangle(m_displayText.getPos() + tmpLetterSize*3.0f/4.0f);
}
@ -281,7 +281,7 @@ void appl::TextViewer::onRegenerateDisplay() {
tmpCursorPosition = m_displayText.getPos();
tmpCursorLenght = 5;
}
maxSizeX = etk_max(m_displayText.getPos().x(), maxSizeX);
maxSizeX = std::max(m_displayText.getPos().x(), maxSizeX);
// Display cursor only if we have the focus ...
if ( tmpCursorPosition.z() != -1
&& getFocus() == true) {

View File

@ -1,5 +1 @@
<<<<<<< HEAD
1.1.1
=======
1.2-dev
>>>>>>> 2939038... [TAG] create 1.2-dev tag
1.2-dev