From 127ad0aac581e592f924b3449562f55b1193b339 Mon Sep 17 00:00:00 2001 From: Edouard Dupin Date: Wed, 28 Sep 2011 09:16:33 +0200 Subject: [PATCH] Little clean --- Sources/Buffer/BufferAnchor.cpp | 38 ---------------------- Sources/Buffer/BufferAnchor.h | 56 --------------------------------- Sources/Buffer/BufferText.cpp | 36 --------------------- Sources/Buffer/BufferText.h | 8 ----- 4 files changed, 138 deletions(-) delete mode 100644 Sources/Buffer/BufferAnchor.cpp delete mode 100644 Sources/Buffer/BufferAnchor.h diff --git a/Sources/Buffer/BufferAnchor.cpp b/Sources/Buffer/BufferAnchor.cpp deleted file mode 100644 index 7302e62..0000000 --- a/Sources/Buffer/BufferAnchor.cpp +++ /dev/null @@ -1,38 +0,0 @@ -/** - ******************************************************************************* - * @file BufferAnchor.cpp - * @brief Editeur De N'ours : anchor on a secific buffer (Sources) - * @author Edouard DUPIN - * @date 11/09/2011 - * @par Project - * Edn - * - * @par Copyright - * Copyright 2010 Edouard DUPIN, all right reserved - * - * This software is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY. - * - * Licence summary : - * You can modify and redistribute the sources code and binaries. - * You can send me the bug-fix - * You can not earn money with this Software (if the source extract from Edn - * represent less than 50% of original Sources) - * Term of the licence in in the file licence.txt. - * - ******************************************************************************* - */ - - -#include "BufferAnchor.h" - -BufferAnchor::BufferAnchor(void) -{ - -} - -BufferAnchor::~BufferAnchor(void) -{ - -} - diff --git a/Sources/Buffer/BufferAnchor.h b/Sources/Buffer/BufferAnchor.h deleted file mode 100644 index be4ac18..0000000 --- a/Sources/Buffer/BufferAnchor.h +++ /dev/null @@ -1,56 +0,0 @@ -/** - ******************************************************************************* - * @file BufferAnchor.h - * @brief Editeur De N'ours : anchor on a secific buffer (header) - * @author Edouard DUPIN - * @date 11/09/2011 - * @par Project - * Edn - * - * @par Copyright - * Copyright 2010 Edouard DUPIN, all right reserved - * - * This software is distributed in the hope that it will be useful, but WITHOUT - * ANY WARRANTY. - * - * Licence summary : - * You can modify and redistribute the sources code and binaries. - * You can send me the bug-fix - * You can not earn money with this Software (if the source extract from Edn - * represent less than 50% of original Sources) - * Term of the licence in in the file licence.txt. - * - ******************************************************************************* - */ - -#ifndef __BUFFER_ANCHOR_H__ -#define __BUFFER_ANCHOR_H__ - -#include "Display.h" -#include "charset.h" -#include "Edn.h" - - -class BufferAnchor -{ - public : - BufferAnchor(void); - ~BufferAnchor(void); - MoveAnchor(int32_t offsetLine); - //BufModification(...); - bool DisplayUpdateFirstLine(void); - bool DisplayUpdateNextLine(void); - private : - int32_t m_lineId; - int32_t m_bufferPos; - public: - int32_t m_lineNumber; - int32_t m_posStart; - int32_t m_posStop; - int32_t m_selectionPosStart; - int32_t m_selectionPosStop; -}; - - -#endif - diff --git a/Sources/Buffer/BufferText.cpp b/Sources/Buffer/BufferText.cpp index c45f6db..281a8c5 100644 --- a/Sources/Buffer/BufferText.cpp +++ b/Sources/Buffer/BufferText.cpp @@ -56,8 +56,6 @@ void BufferText::BasicInit(void) m_nbColoneForLineNumber = 1; // init the link with the buffer manager myColorManager = ColorizeManager::getInstance(); - // Init Selection mode : - SelectionEnd(); //EDN_INFO("Init"); // new mode : m_cursorPos = 0; @@ -175,28 +173,6 @@ BufferText::~BufferText(void) } -void BufferText::SelectionStart(void) -{ - // start a nex selection - SelectionCheckMode(); - //EDN_DEBUG("SELECT_start"); -} - -void BufferText::SelectionEnd(void) -{ - //EDN_DEBUG("SELECT_stop"); -} - -void BufferText::SelectionCheckMode(void) -{ - /* - if (true == globals::IsSetCtrl() ) { - } else { - } - */ -} - - /** * @brief * @@ -728,18 +704,6 @@ bool BufferText::TextDMoveDown(int32_t offset) void BufferText::cursorMove(int32_t gtkKey) { bool needUpdatePosition = true; - // check selection event ... - /* - if (true == globals::IsSetShift() ) { - if ( CURSOR_MODE_NORMAL == cursorMode) { - SelectionStart(); - } else { - SelectionCheckMode(); - } - } else { - SelectionEnd(); - } - */ switch(gtkKey) { # ifdef USE_GTK_VERSION_3_0 case GDK_KEY_Left: diff --git a/Sources/Buffer/BufferText.h b/Sources/Buffer/BufferText.h index 20f3111..c2108e4 100644 --- a/Sources/Buffer/BufferText.h +++ b/Sources/Buffer/BufferText.h @@ -87,10 +87,6 @@ class BufferText : public Buffer { // Direct buffer IO EdnBuf m_EdnBuf; //!< buffer associated on this displayer - //position_ts m_displayStart; //!< position where the display is starting - //position_ts m_displaySize; //!< number of char displayable in the screan - //int32_t m_displayStartBufferPos; //!< position where the buffer start - // Cursor : int32_t m_cursorPos; //!< position in the buffer of the cursor int32_t m_cursorPreferredCol; //!< colomn of the last up and down ... @@ -104,10 +100,6 @@ class BufferText : public Buffer { void CleanSelectLine(void); - void SelectionStart(void); - void SelectionEnd(void); - void SelectionCheckMode(void); - void CheckAndUpdateLineForModification(uint32_t lineID); bool TextDMoveUp(int32_t offset); bool TextDMoveDown(int32_t offset);