sys: rework internal compilation ok

This commit is contained in:
Edouard Dupin 2011-09-18 13:35:24 +02:00
parent 7fbfe1f86a
commit 03484cc85d
8 changed files with 173 additions and 148 deletions

View File

@ -53,7 +53,10 @@ Buffer::Buffer()
tmpAnchor.m_idAnchor = -1;
tmpAnchor.m_lineId = 0;
tmpAnchor.m_bufferPos = 0;
m_AnchorList .PushBack(tmpAnchor);
m_AnchorList.PushBack(tmpAnchor);
m_lineWidth = 10;
m_lineHeight = 10;
}
/**
@ -158,7 +161,7 @@ void Buffer::SetLineDisplay(uint32_t lineNumber)
* @return ---
*
*/
void Buffer::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, position_ts &displayStart, position_ts &displaySize)
void Buffer::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor)
{
return;
}
@ -174,10 +177,9 @@ void Buffer::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, position_t
* @todo : Set the move up and DOWN...
*
*/
position_ts Buffer::MouseSelectFromCursorTo(int32_t width, int32_t height)
void Buffer::MouseSelectFromCursorTo(int32_t width, int32_t height)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
@ -190,10 +192,9 @@ position_ts Buffer::MouseSelectFromCursorTo(int32_t width, int32_t height)
* @return ---
*
*/
position_ts Buffer::MouseEvent(int32_t width, int32_t height)
void Buffer::MouseEvent(int32_t width, int32_t height)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
/**
@ -204,10 +205,9 @@ position_ts Buffer::MouseEvent(int32_t width, int32_t height)
* @return ---
*
*/
position_ts Buffer::MouseEventDouble(void)
void Buffer::MouseEventDouble(void)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
/**
@ -218,10 +218,9 @@ position_ts Buffer::MouseEventDouble(void)
* @return ---
*
*/
position_ts Buffer::MouseEventTriple(void)
void Buffer::MouseEventTriple(void)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
@ -260,10 +259,9 @@ void Buffer::ScrollUp(void)
* @return ---
*
*/
position_ts Buffer::cursorMove(int32_t gtkKey)
void Buffer::cursorMove(int32_t gtkKey)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
/**
@ -274,22 +272,19 @@ position_ts Buffer::cursorMove(int32_t gtkKey)
* @return ---
*
*/
position_ts Buffer::AddChar(char * UTF8data)
void Buffer::AddChar(char * UTF8data)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
position_ts Buffer::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp)
void Buffer::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
position_ts Buffer::Replace(Edn::String &data)
void Buffer::Replace(Edn::String &data)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
int32_t Buffer::FindLine(Edn::String &data)
@ -298,10 +293,9 @@ int32_t Buffer::FindLine(Edn::String &data)
return 0;
}
position_ts Buffer::JumpAtLine(int32_t newLine)
void Buffer::JumpAtLine(int32_t newLine)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
@ -341,10 +335,9 @@ void Buffer::Copy(int8_t clipboardID)
* @return ---
*
*/
position_ts Buffer::Cut(int8_t clipboardID)
void Buffer::Cut(int8_t clipboardID)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
@ -356,40 +349,34 @@ position_ts Buffer::Cut(int8_t clipboardID)
* @return ---
*
*/
position_ts Buffer::Paste(int8_t clipboardID)
void Buffer::Paste(int8_t clipboardID)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
position_ts Buffer::RemoveLine(void)
void Buffer::RemoveLine(void)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do;
}
position_ts Buffer::SelectAll(void)
void Buffer::SelectAll(void)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
position_ts Buffer::SelectNone(void)
void Buffer::SelectNone(void)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
position_ts Buffer::Undo(void)
void Buffer::Undo(void)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
position_ts Buffer::Redo(void)
void Buffer::Redo(void)
{
position_ts tmp = {0,0};
return tmp;
// nothing to do
}
@ -426,7 +413,7 @@ void Buffer::AnchorRm(int32_t anchorID)
}
bool Buffer::AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor, position_ts &size, int32_t sizePixelX, int32_t sizePixelY)
bool Buffer::AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor)
{
EDN_ERROR("AnchorID="<< anchorID << " Main buffer ==> can not manage Anchor (type buffer specific)");
return false;
@ -440,6 +427,32 @@ bool Buffer::AnchorNext(bufferAnchor_ts & anchor)
}
void Buffer::AnchorSetSize(int32_t anchorID, int32_t sizePixelX, int32_t sizePixelY)
{
int32_t localID = AnchorRealId(anchorID);
if (localID >=0) {
m_AnchorList[localID].m_displaySize.x = sizePixelX / m_lineWidth;
m_AnchorList[localID].m_displaySize.y = sizePixelY / m_lineHeight;
}
}
void Buffer::AnchorSetStartOffset(int32_t anchorID, int32_t offsetX, int32_t offsetY)
{
int32_t localID = AnchorRealId(anchorID);
if (localID >=0) {
m_AnchorList[localID].m_displayStart.x += offsetX;
if (0<m_AnchorList[localID].m_displayStart.x) {
m_AnchorList[localID].m_displayStart.x = 0;
}
m_AnchorList[localID].m_displayStart.y += offsetY;
if (0<m_AnchorList[localID].m_displayStart.y) {
m_AnchorList[localID].m_displayStart.y = 0;
}
}
}
int32_t Buffer::AnchorRealId(int32_t anchorID)
{
//EDN_DEBUG("Get real ID : " << anchorID << " in the anchor list size()=" << m_AnchorList.Size());

View File

@ -44,18 +44,23 @@ extern "C"
}infoStatBuffer_ts;
typedef struct {
int32_t m_idAnchor;
int32_t m_lineId;
int32_t m_bufferPos;
int32_t m_idAnchor; //!< reference id of the anchor (real id of the upper displayer of CodeView)
bool m_curent; //!< set at true if the anchor is a reference with the curent display
int32_t m_lineId; //!< first line ID to display
int32_t m_bufferPos; //!< position of the first lineId
position_ts m_displayStart; //!< start display position
position_ts m_displaySize; //!< size of the curent display
} bufferAnchorReference_ts;
typedef struct {
int32_t m_lineNumber;
int32_t m_nbIterationMax;
int32_t m_posStart;
int32_t m_posStop;
int32_t m_selectionPosStart;
int32_t m_selectionPosStop;
position_ts m_displayStart; //!< start display position
position_ts m_displaySize; //!< size of the curent display
int32_t m_lineNumber; //!< current line-number id
int32_t m_nbIterationMax; //!< number of cycle needed to end the dispalay
int32_t m_posStart; //!< position of the start of the line
int32_t m_posStop; //!< position of the end of the line
int32_t m_selectionPosStart; //!< position of the selection start
int32_t m_selectionPosStop; //!< position of the selection stop
} bufferAnchor_ts;
}
@ -99,19 +104,19 @@ class Buffer {
virtual void GetInfo(infoStatBuffer_ts &infoToUpdate);
virtual void SetLineDisplay(uint32_t lineNumber);
virtual void DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, position_ts &displayStart, position_ts &displaySize);
virtual void DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor);
// return the new cursor position ...
virtual position_ts AddChar(char * UTF8data);
virtual position_ts cursorMove(int32_t gtkKey);
virtual position_ts MouseSelectFromCursorTo(int32_t width, int32_t height);
virtual position_ts MouseEvent(int32_t width, int32_t height);
virtual position_ts MouseEventDouble(void);
virtual position_ts MouseEventTriple(void);
virtual position_ts RemoveLine(void);
virtual position_ts SelectAll(void);
virtual position_ts SelectNone(void);
virtual position_ts Undo(void);
virtual position_ts Redo(void);
virtual void AddChar(char * UTF8data);
virtual void cursorMove(int32_t gtkKey);
virtual void MouseSelectFromCursorTo(int32_t width, int32_t height);
virtual void MouseEvent(int32_t width, int32_t height);
virtual void MouseEventDouble(void);
virtual void MouseEventTriple(void);
virtual void RemoveLine(void);
virtual void SelectAll(void);
virtual void SelectNone(void);
virtual void Undo(void);
virtual void Redo(void);
virtual void SetCharset(charset_te newCharset) {};
@ -120,12 +125,12 @@ class Buffer {
//virtual void SelectAll(void);
virtual void Copy(int8_t clipboardID);
virtual position_ts Cut(int8_t clipboardID);
virtual position_ts Paste(int8_t clipboardID);
virtual position_ts Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp);
virtual position_ts Replace(Edn::String &data);
virtual void Cut(int8_t clipboardID);
virtual void Paste(int8_t clipboardID);
virtual void Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp);
virtual void Replace(Edn::String &data);
virtual int32_t FindLine(Edn::String &data);
virtual position_ts JumpAtLine(int32_t newLine);
virtual void JumpAtLine(int32_t newLine);
virtual int32_t GetCurrentLine(void);
protected:
@ -138,10 +143,14 @@ class Buffer {
public:
void AnchorAdd(int32_t anchorID);
void AnchorRm(int32_t anchorID);
virtual bool AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor, position_ts &size, int32_t sizePixelX, int32_t sizePixelY);
virtual bool AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor);
virtual bool AnchorNext(bufferAnchor_ts & anchor);
void AnchorSetSize(int32_t anchorID, int32_t sizePixelX, int32_t sizePixelY);
void AnchorSetStartOffset(int32_t anchorID, int32_t offsetX, int32_t offsetY);
protected:
int32_t m_lineWidth;
int32_t m_lineHeight;
int32_t AnchorRealId(int32_t anchorID);
Edn::VectorType<bufferAnchorReference_ts> m_AnchorList; //!< list of all line anchor in the current buffer

View File

@ -42,7 +42,8 @@
*/
BufferEmpty::BufferEmpty()
{
m_lineWidth = Display::GetFontWidth();
m_lineHeight = Display::GetFontHeight();
}
/**
@ -67,7 +68,7 @@ BufferEmpty::~BufferEmpty(void)
* @return ---
*
*/
void BufferEmpty::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, position_ts &displayStart, position_ts &displaySize)
void BufferEmpty::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor)
{
EDN_DEBUG("Request draw : " << anchor.m_lineNumber);
ColorizeManager * myColorManager = ColorizeManager::getInstance();
@ -89,13 +90,15 @@ void BufferEmpty::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, posit
bool BufferEmpty::AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor, position_ts &size, int32_t sizePixelX, int32_t sizePixelY)
bool BufferEmpty::AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor)
{
int32_t localID = AnchorRealId(anchorID);
if (localID >=0) {
EDN_DEBUG("Request anchor");
size.x = sizePixelX / Display::GetFontWidth();
size.y = sizePixelY / Display::GetFontHeight();
anchor.m_displaySize.x = m_AnchorList[localID].m_displaySize.x;
anchor.m_displaySize.y = m_AnchorList[localID].m_displaySize.y;
anchor.m_displayStart.x = m_AnchorList[localID].m_displayStart.x;
anchor.m_displayStart.y = m_AnchorList[localID].m_displayStart.y;
anchor.m_nbIterationMax = 2;
anchor.m_lineNumber = m_AnchorList[localID].m_lineId;
anchor.m_posStart = -1;

View File

@ -32,8 +32,8 @@ class BufferEmpty : public Buffer {
public:
BufferEmpty(void);
virtual ~BufferEmpty(void);
void DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, position_ts &displayStart, position_ts &displaySize);
bool AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor, position_ts &size, int32_t sizePixelX, int32_t sizePixelY);
void DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor);
bool AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor);
bool AnchorNext(bufferAnchor_ts & anchor);
};

View File

@ -52,9 +52,6 @@ extern "C"
*/
void BufferText::BasicInit(void)
{
// set the first element that is displayed
m_displayStartBufferPos = 0;
// set the number of the lineNumber;
m_nbColoneForLineNumber = 1;
// init the link with the buffer manager
@ -66,11 +63,9 @@ void BufferText::BasicInit(void)
m_cursorPos = 0;
m_cursorPreferredCol = -1;
m_cursorOn = true;
//m_cursorMode = CURSOR_DISPLAY_MODE_NORMAL;
m_displayStart.x = 0;
m_displayStart.y = 0;
m_displaySize.x = 200;
m_displaySize.y = 20;
m_lineWidth = Display::GetFontWidth();
m_lineHeight = Display::GetFontHeight();
}
@ -231,10 +226,9 @@ void BufferText::SetLineDisplay(uint32_t lineNumber)
void BufferText::DrawLineNumber(DrawerManager &drawer, int32_t lineNumber)
void BufferText::DrawLineNumber(DrawerManager &drawer, int32_t lineNumber, int32_t positionY)
{
int32_t letterHeight = Display::GetFontHeight();
int32_t positionY = letterHeight * (lineNumber - m_displayStart.y - 1);
char tmpLineNumber[50];
sprintf(tmpLineNumber, g_pointerForTheDisplayLine[m_nbColoneForLineNumber-1], lineNumber);
drawer.Text(myColorManager->Get(COLOR_CODE_LINE_NUMBER), 1, positionY, tmpLineNumber);
@ -267,12 +261,16 @@ void BufferText::UpdatePointerNumber(void)
}
void BufferText::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, position_ts &displayStart, position_ts &displaySize)
void BufferText::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor)
{
// TODO : Avec ca ca ne peux pas marcher...
position_ts displayStart;
position_ts displaySize;
int32_t letterHeight = Display::GetFontHeight();
int32_t letterWidth = Display::GetFontWidth();
int32_t positionY = letterHeight * (anchor.m_lineNumber - displayStart.y - 1);
int32_t idX = 0;
int32_t pixelX = m_nbColoneForLineNumber*letterWidth + 3;
@ -288,7 +286,7 @@ void BufferText::DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, positi
// clean the current Line
drawer.Rectangle(myColorManager->Get(COLOR_CODE_BASIC_BG), 0, positionY, drawer.GetWidth(), letterHeight);
DrawLineNumber(drawer, anchor.m_lineNumber);
DrawLineNumber(drawer, anchor.m_lineNumber, positionY);
bool selHave = anchor.m_selectionPosStart == -1 ? false : true;
char displayChar[MAX_EXP_CHAR_LEN];
@ -402,8 +400,9 @@ void BufferText::GetMousePosition(int32_t width, int32_t height, int32_t &x, int
if (x < 0) {
x = 0;
}
x += m_displayStart.x;
y += m_displayStart.y;
// TODO : REWORK
//x += m_displayStart.x;
//y += m_displayStart.y;
//EDN_DEBUG("BufferText::GetMousePosition(" << width << "," << height << "); ==> (" << x << "," << y << ")" );
}
@ -582,6 +581,8 @@ void BufferText::ScrollUp(void)
*/
void BufferText::MoveUpDown(int32_t ofset)
{
// TODO : REWORK
/*
if (ofset >= 0) {
int32_t nbLine = m_EdnBuf.NumberOfLines();
if (m_displayStart.y+ofset+3 > nbLine) {
@ -600,7 +601,7 @@ void BufferText::MoveUpDown(int32_t ofset)
m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStart.y);
}
}
*/
}
@ -786,7 +787,8 @@ void BufferText::cursorMove(int32_t gtkKey)
case GDK_Page_Up:
# endif
//EDN_INFO("keyEvent : <PAGE-UP>");
TextDMoveUp(m_displaySize.x);
// TODO : REWORK
//TextDMoveUp(m_displaySize.x);
break;
# ifdef USE_GTK_VERSION_3_0
case GDK_KEY_Page_Down:
@ -794,7 +796,8 @@ void BufferText::cursorMove(int32_t gtkKey)
case GDK_Page_Down:
# endif
//EDN_INFO("keyEvent : <PAGE-DOWN>");
TextDMoveDown(m_displaySize.x);
// TODO : REWORK
//TextDMoveDown(m_displaySize.x);
break;
# ifdef USE_GTK_VERSION_3_0
case GDK_KEY_Begin:
@ -833,6 +836,8 @@ void BufferText::cursorMove(int32_t gtkKey)
*/
void BufferText::UpdateWindowsPosition(bool centerPage)
{
// TODO : REWORK
/*
if (centerPage == false) {
// Display position (Y mode):
//EDN_INFO("BufferText::UpdateWindowsPosition() m_displayStart(" << m_displayStart.x << "," << m_displayStart.y << ") m_displaySize(" << m_displaySize.x << "," <<m_displaySize.y << ")");
@ -875,11 +880,11 @@ void BufferText::UpdateWindowsPosition(bool centerPage)
//EDN_DEBUG(" display size : " << m_displaySize.y);
m_displayStart.y = cursorPosition.y - m_displaySize.y/2;
m_displayStart.y = edn_max(m_displayStart.y, 0);
m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStart.y);
//EDN_DEBUG(" display start : " << m_displayStart.x << "x" << m_displayStart.y);
//EDN_DEBUG(" -------------------------------------------------");
}
*/
}
@ -891,9 +896,8 @@ void BufferText::UpdateWindowsPosition(bool centerPage)
* @return ---
*
*/
position_ts BufferText::AddChar(char * UTF8data)
void BufferText::AddChar(char * UTF8data)
{
position_ts tmp = {0,0};
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
bool SelectionIsRect;
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
@ -1037,9 +1041,8 @@ int32_t BufferText::FindLine(Edn::String &data)
}
}
position_ts BufferText::JumpAtLine(int32_t newLine)
void BufferText::JumpAtLine(int32_t newLine)
{
position_ts tmp = {0,0};
int32_t positionLine = m_EdnBuf.CountForwardNLines(0, newLine);
m_EdnBuf.Unselect(SELECTION_PRIMARY);
EDN_DEBUG("jump at the line : " << newLine );
@ -1062,9 +1065,8 @@ int32_t BufferText::GetCurrentLine(void)
position_ts BufferText::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp)
void BufferText::Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp)
{
position_ts tmp = {0,0};
EDN_INFO("Search data : \"" << data << "\"");
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
@ -1151,9 +1153,8 @@ position_ts BufferText::Search(Edn::String &data, bool back, bool caseSensitive,
}
position_ts BufferText::Replace(Edn::String &data)
void BufferText::Replace(Edn::String &data)
{
position_ts tmp = {0,0};
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
bool SelectionIsRect;
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
@ -1195,10 +1196,8 @@ void BufferText::Copy(int8_t clipboardID)
* @return ---
*
*/
position_ts BufferText::Cut(int8_t clipboardID)
void BufferText::Cut(int8_t clipboardID)
{
position_ts tmp = {0,0};
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
bool SelectionIsRect;
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
@ -1224,9 +1223,8 @@ position_ts BufferText::Cut(int8_t clipboardID)
* @return ---
*
*/
position_ts BufferText::Paste(int8_t clipboardID)
void BufferText::Paste(int8_t clipboardID)
{
position_ts tmp = {0,0};
Edn::VectorType<int8_t> mVect;
// copy data from the click board :
ClipBoard::Get(clipboardID, mVect);
@ -1250,9 +1248,8 @@ position_ts BufferText::Paste(int8_t clipboardID)
}
position_ts BufferText::Undo(void)
void BufferText::Undo(void)
{
position_ts tmp = {0,0};
int32_t newPos = m_EdnBuf.Undo();
if (newPos >= 0) {
SetInsertPosition(newPos, true);
@ -1261,9 +1258,8 @@ position_ts BufferText::Undo(void)
}
}
position_ts BufferText::Redo(void)
void BufferText::Redo(void)
{
position_ts tmp = {0,0};
int32_t newPos = m_EdnBuf.Redo();
if (newPos >= 0) {
SetInsertPosition(newPos, true);
@ -1279,16 +1275,19 @@ void BufferText::SetCharset(charset_te newCharset)
}
bool BufferText::AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor, position_ts &size, int32_t sizePixelX, int32_t sizePixelY)
bool BufferText::AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor)
{
int32_t localID = AnchorRealId(anchorID);
if (localID >=0) {
// update internal sise of the width of lineID
UpdatePointerNumber();
// Updata uper size of display
size.x = sizePixelX / Display::GetFontWidth();
size.y = sizePixelY / Display::GetFontHeight();
anchor.m_nbIterationMax = size.y;
anchor.m_displaySize.x = m_AnchorList[localID].m_displaySize.x;
anchor.m_displaySize.y = m_AnchorList[localID].m_displaySize.y;
anchor.m_displayStart.x = m_AnchorList[localID].m_displayStart.x;
anchor.m_displayStart.y = m_AnchorList[localID].m_displayStart.y;
// TODO : Test de display non complet...
anchor.m_nbIterationMax = anchor.m_displaySize.y - 4;
// update to buffer position
anchor.m_lineNumber = m_AnchorList[localID].m_lineId;
anchor.m_posStart = m_AnchorList[localID].m_bufferPos;

View File

@ -47,34 +47,34 @@ class BufferText : public Buffer {
void GetInfo(infoStatBuffer_ts &infoToUpdate);
void SetLineDisplay(uint32_t lineNumber);
void DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor, position_ts &displayStart, position_ts &displaySize);
position_ts AddChar(char * UTF8data);
position_ts cursorMove(int32_t gtkKey);
position_ts MouseSelectFromCursorTo(int32_t width, int32_t height);
position_ts MouseEvent(int32_t width, int32_t height);
position_ts MouseEventDouble(void);
position_ts MouseEventTriple(void);
void DrawLine(DrawerManager &drawer, bufferAnchor_ts &anchor);
void AddChar(char * UTF8data);
void cursorMove(int32_t gtkKey);
void MouseSelectFromCursorTo(int32_t width, int32_t height);
void MouseEvent(int32_t width, int32_t height);
void MouseEventDouble(void);
void MouseEventTriple(void);
void ScrollDown(void);
void ScrollUp(void);
void Copy(int8_t clipboardID);
position_ts Cut(int8_t clipboardID);
position_ts Paste(int8_t clipboardID);
void Cut(int8_t clipboardID);
void Paste(int8_t clipboardID);
position_ts Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp);
position_ts Replace(Edn::String &data);
void Search(Edn::String &data, bool back, bool caseSensitive, bool wrap, bool regExp);
void Replace(Edn::String &data);
int32_t FindLine(Edn::String &data);
position_ts JumpAtLine(int32_t newLine);
void JumpAtLine(int32_t newLine);
int32_t GetCurrentLine(void);
position_ts RemoveLine(void);
position_ts SelectAll(void);
position_ts SelectNone(void);
position_ts Undo(void);
position_ts Redo(void);
void RemoveLine(void);
void SelectAll(void);
void SelectNone(void);
void Undo(void);
void Redo(void);
void SetCharset(charset_te newCharset);
bool AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor, position_ts &size, int32_t sizePixelX, int32_t sizePixelY);
bool AnchorGet(int32_t anchorID, bufferAnchor_ts & anchor);
bool AnchorNext(bufferAnchor_ts & anchor);
protected:
void NameChange(void);
@ -115,7 +115,7 @@ class BufferText : public Buffer {
void GetMousePosition(int32_t width, int32_t height, int32_t &x, int32_t &y);
void MoveUpDown(int32_t ofset);
void DrawLineNumber(DrawerManager &drawer, int32_t lineNumber);
void DrawLineNumber(DrawerManager &drawer, int32_t lineNumber, int32_t positionY);
void UpdatePointerNumber(void);

View File

@ -240,9 +240,10 @@ gboolean CodeView::CB_displayDraw( GtkWidget *widget, GdkEventExpose *event, gpo
#endif
bufferAnchor_ts anchor;
bool enableToWrite = tmpBuf->AnchorGet(self->m_displayUniqueId, anchor, self->m_displaySize, self->m_shawableAreaX, self->m_shawableAreaY);
tmpBuf->AnchorSetSize(self->m_displayUniqueId, self->m_shawableAreaX, self->m_shawableAreaY);
bool enableToWrite = tmpBuf->AnchorGet(self->m_displayUniqueId, anchor);
while (true == enableToWrite) {
tmpBuf->DrawLine(monDrawer, anchor, self->m_displayStart, self->m_displaySize);
tmpBuf->DrawLine(monDrawer, anchor);
enableToWrite = tmpBuf->AnchorNext(anchor);
}
monDrawer.Flush();

View File

@ -55,8 +55,8 @@ class CodeView : public MsgBroadcast
// main windows widget :
GtkWidget * m_widget;
int32_t m_displayUniqueId;
position_ts m_displayStart; //!< position where the display is starting
position_ts m_displaySize; //!< number of char displayable in the screan
//position_ts m_displayStart; //!< position where the display is starting
//position_ts m_displaySize; //!< number of char displayable in the screan
// récupération des proprieter général...
BufferManager * m_bufferManager;
ColorizeManager * m_colorManager;