[DEV] update at the new distance field
This commit is contained in:
parent
e2b365cffb
commit
46b95656bd
@ -69,6 +69,11 @@ appl::TextViewer::~TextViewer(void) {
|
|||||||
appl::ViewerManager::release(m_viewerManager);
|
appl::ViewerManager::release(m_viewerManager);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void appl::TextViewer::changeZoom(float _range) {
|
||||||
|
m_displayText.setFontSize(m_displayText.getSize() + _range);
|
||||||
|
markToRedraw();
|
||||||
|
}
|
||||||
|
|
||||||
bool appl::TextViewer::calculateMinSize(void) {
|
bool appl::TextViewer::calculateMinSize(void) {
|
||||||
m_minSize.setValue(50,50);
|
m_minSize.setValue(50,50);
|
||||||
return true;
|
return true;
|
||||||
@ -98,7 +103,7 @@ void appl::TextViewer::onRegenerateDisplay(void) {
|
|||||||
if (m_buffer == NULL) {
|
if (m_buffer == NULL) {
|
||||||
m_maxSize.setX(256);
|
m_maxSize.setX(256);
|
||||||
m_maxSize.setY(256);
|
m_maxSize.setY(256);
|
||||||
m_displayText.setTextAlignement(10, m_size.x()-20, ewol::compositing::Text::alignLeft);
|
m_displayText.setTextAlignement(10, m_size.x()-20, ewol::compositing::alignLeft);
|
||||||
m_displayText.setRelPos(vec3(10, 0, 0));
|
m_displayText.setRelPos(vec3(10, 0, 0));
|
||||||
std::string tmpString("<br/>\n"
|
std::string tmpString("<br/>\n"
|
||||||
"<font color=\"red\">\n"
|
"<font color=\"red\">\n"
|
||||||
@ -574,7 +579,7 @@ appl::Buffer::Iterator appl::TextViewer::getMousePosition(const vec2& _relativeP
|
|||||||
} else {
|
} else {
|
||||||
//note : Without this condithion the time od selection change to 0.6 ms to 8ms ...
|
//note : Without this condithion the time od selection change to 0.6 ms to 8ms ...
|
||||||
//APPL_DEBUG("check : " << -_relativePos.y() << ">=" << positionCurentDisplay.y());
|
//APPL_DEBUG("check : " << -_relativePos.y() << ">=" << positionCurentDisplay.y());
|
||||||
m_displayText.print(stringToDisplay[kkk]);
|
m_displayText.printChar(stringToDisplay[kkk]);
|
||||||
++countColomn;
|
++countColomn;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -943,7 +948,7 @@ appl::Buffer::Iterator appl::TextViewer::getPosSize(const appl::Buffer::Iterator
|
|||||||
if (stringToDisplay[kkk] == u32char::Return) {
|
if (stringToDisplay[kkk] == u32char::Return) {
|
||||||
return it;
|
return it;
|
||||||
} else {
|
} else {
|
||||||
m_displayText.print(stringToDisplay[kkk]);
|
m_displayText.printChar(stringToDisplay[kkk]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (m_displayText.getPos().x() >= _distance) {
|
if (m_displayText.getPos().x() >= _distance) {
|
||||||
@ -972,7 +977,7 @@ float appl::TextViewer::getScreenSize(const appl::Buffer::Iterator& _startLinePo
|
|||||||
if (stringToDisplay[kkk] == u32char::Return) {
|
if (stringToDisplay[kkk] == u32char::Return) {
|
||||||
return m_displayText.getPos().x() + 2; // TODO : Add the +2 for the end of line ...
|
return m_displayText.getPos().x() + 2; // TODO : Add the +2 for the end of line ...
|
||||||
} else {
|
} else {
|
||||||
m_displayText.print(stringToDisplay[kkk]);
|
m_displayText.printChar(stringToDisplay[kkk]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ret = m_displayText.getPos().x();
|
ret = m_displayText.getPos().x();
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
|
|
||||||
#include <ewol/widget/WidgetScrolled.h>
|
#include <ewol/widget/WidgetScrolled.h>
|
||||||
#include <ewol/compositing/Text.h>
|
#include <ewol/compositing/Text.h>
|
||||||
|
#include <ewol/compositing/TextDF.h>
|
||||||
#include <ewol/compositing/Drawing.h>
|
#include <ewol/compositing/Drawing.h>
|
||||||
#include <appl/BufferManager.h>
|
#include <appl/BufferManager.h>
|
||||||
#include <appl/Gui/ViewerManager.h>
|
#include <appl/Gui/ViewerManager.h>
|
||||||
@ -66,6 +67,7 @@ namespace appl {
|
|||||||
virtual void onEventClipboard(enum ewol::context::clipBoard::clipboardListe _clipboardID);
|
virtual void onEventClipboard(enum ewol::context::clipBoard::clipboardListe _clipboardID);
|
||||||
virtual void onGetFocus(void);
|
virtual void onGetFocus(void);
|
||||||
virtual void onLostFocus(void);
|
virtual void onLostFocus(void);
|
||||||
|
virtual void changeZoom(float _range);
|
||||||
private:
|
private:
|
||||||
float m_lastOffsetDisplay; //!< Line number ofssed in the display
|
float m_lastOffsetDisplay; //!< Line number ofssed in the display
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user