[DEV] update to the rework of ewol
This commit is contained in:
parent
247045c204
commit
42e042943c
35
license.txt
35
license.txt
@ -1,26 +1,15 @@
|
||||
=====================================================================
|
||||
== Copyright 2010 Edouard DUPIN, all right reserved ==
|
||||
=====================================================================
|
||||
Edn (Editeur De N'ours) : Source code editor
|
||||
Copyright (C) Copyright 2010 Edouard DUPIN
|
||||
|
||||
Edn (Editeur De N'ours) is a FREE software.
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.
|
||||
|
||||
Terms of license:
|
||||
|
||||
You can:
|
||||
- Redistribute the sources code and binaries.
|
||||
- Modify the Sources code.
|
||||
- Use a part of the sources (less than 50%) in an other software, just write somewhere "Edn is great" visible by the user (on your product or on your website with a link to my page).
|
||||
- Redistribute the modification only if you want.
|
||||
- Send me the bug-fix (it could be great).
|
||||
- Pay me a beer or some other things.
|
||||
- Print the source code on WC paper ...
|
||||
You can NOT:
|
||||
- Earn money with this Software (But I can).
|
||||
- Add malware in the Sources.
|
||||
- Do something bad with the sources.
|
||||
- Use it to travel in the space with a toaster.
|
||||
|
||||
I reserve the right to change this license. If it change the version of the copy you have keep its own license
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
@ -1,29 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferManager.cpp
|
||||
* @brief Editeur De N'ours : Text Buffer manager (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferManager.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferManager.h
|
||||
* @brief Editeur De N'ours : Text Buffer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __BUFFER_MANAGER_H__
|
||||
|
@ -1,28 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferText.cpp
|
||||
* @brief Editeur De N'ours : Text Buffer (edit only ASCII text File) (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 19/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferText.h>
|
||||
@ -30,11 +13,9 @@
|
||||
#include <etk/unicode.h>
|
||||
|
||||
#include <ewol/ewol.h>
|
||||
#include <ewol/oObject/OObject.h>
|
||||
#include <ewol/widget/WidgetManager.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
#include <ewol/font/Font.h>
|
||||
#include <ewol/ClipBoard.h>
|
||||
#include <ewol/clipBoard.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
@ -395,14 +376,10 @@ int32_t BufferText::Display(ewol::Text& OOText,
|
||||
DrawLineNumber(&OOText, x_base, sizeY, nbColoneForLineNumber, currentLineID, y);
|
||||
int32_t pixelX = x_base + SEPARATION_SIZE_LINE_NUMBER;
|
||||
|
||||
clipping_ts drawClipping;
|
||||
drawClipping.x = 0;
|
||||
drawClipping.y = 0;
|
||||
drawClipping.w = sizeX;
|
||||
drawClipping.h = sizeY;
|
||||
|
||||
etk::Vector3D<float> drawClippingPos(0,0,-0.5);
|
||||
etk::Vector3D<float> drawClippingSize(sizeX, sizeY, 1);
|
||||
OOText.SetClippingWidth(etk::Vector3D<float>((float)pixelX, 0.0f, -0.5f),
|
||||
etk::Vector3D<float>((float)(sizeX - drawClipping.x), (float)sizeY, 0.5f) );
|
||||
etk::Vector3D<float>((float)(sizeX - drawClippingPos.x), (float)sizeY, 0.5f) );
|
||||
|
||||
// Clear the line intexation :
|
||||
m_elmentList.Clear();
|
||||
@ -516,244 +493,14 @@ int32_t BufferText::Display(ewol::Text& OOText,
|
||||
OOText.SetPos(tmpCursorPosition);
|
||||
OOText.SetColor(ColorizeManager::Get(COLOR_CODE_CURSOR));
|
||||
OOText.SetColorBg(ColorizeManager::Get(COLOR_CODE_CURSOR));
|
||||
OOText.PrintCursor(ewol::IsSetInsert());
|
||||
#warning TODO ...
|
||||
OOText.PrintCursor(false);// TODO : ewol::IsSetInsert());
|
||||
}
|
||||
// set the maximum size for the display ...
|
||||
SetMaximumSize(maxSize);
|
||||
int64_t stopTime2 = ewol::GetTime();
|
||||
APPL_DEBUG("DRAW text (brut) = " << stopTime2 - stopTime << " micro-s");
|
||||
|
||||
|
||||
|
||||
#ifdef QSDFQSDFSDFQS_QSDFQSDf_QSDFQSDF___QSDFQSDFQ
|
||||
|
||||
|
||||
int32_t selStart, selEnd, selRectStart, selRectEnd;
|
||||
bool selIsRect;
|
||||
int32_t selHave;
|
||||
|
||||
int32_t letterWidth = OOText.GetSize("A").x;
|
||||
int32_t letterHeight = OOText.GetHeight();
|
||||
|
||||
int32_t displayStartLineId = offsetY / letterHeight - 1;
|
||||
displayStartLineId = etk_max(0, displayStartLineId);
|
||||
int32_t y = - offsetY + displayStartLineId*letterHeight;
|
||||
|
||||
// update the display position with the scroll ofset :
|
||||
int32_t displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, displayStartLineId);
|
||||
etk::Vector2D<float> maxSize;
|
||||
maxSize.x = 0.0;
|
||||
maxSize.y = m_EdnBuf.NumberOfLines() * letterHeight;
|
||||
int32_t nbColoneForLineNumber = GetLineNumberNumberOfElement();
|
||||
|
||||
// update the number of element that can be displayed
|
||||
m_displaySize.x = (sizeX/letterWidth) + 1 - nbColoneForLineNumber;
|
||||
m_displaySize.y = (sizeY/letterHeight) + 1;
|
||||
APPL_VERBOSE("main DIPLAY " << m_displaySize.x << " char * " << m_displaySize.y << " char");
|
||||
|
||||
selHave = m_EdnBuf.GetSelectionPos(selStart, selEnd, selIsRect, selRectStart, selRectEnd);
|
||||
|
||||
colorInformation_ts * HLColor = NULL;
|
||||
|
||||
int32_t iii, new_i;
|
||||
// Get color :
|
||||
Colorize * myColor = ColorizeManager::Get("normal");
|
||||
Colorize * myColorSel = ColorizeManager::Get("SelectedText");
|
||||
draw::Color & myColorSpace = ColorizeManager::Get(COLOR_CODE_SPACE);
|
||||
draw::Color & myColorTab = ColorizeManager::Get(COLOR_CODE_TAB);
|
||||
Colorize * selectColor = NULL;
|
||||
int mylen = m_EdnBuf.Size();
|
||||
int32_t x_base=nbColoneForLineNumber*letterWidth;
|
||||
int32_t idX = 0;
|
||||
|
||||
OOColored.SetColor(ColorizeManager::Get(COLOR_CODE_BASIC_BG));
|
||||
OOColored.Rectangle( 0, 0, sizeX, sizeY);
|
||||
|
||||
int64_t startTime = ewol::GetTime();
|
||||
int displayLines = 0;
|
||||
// Regenerate the colorizing if necessary ...
|
||||
displayHLData_ts m_displayLocalSyntax;
|
||||
m_EdnBuf.HightlightGenerateLines(m_displayLocalSyntax, displayStartBufferPos, m_displaySize.y);
|
||||
|
||||
int64_t stopTime = ewol::GetTime();
|
||||
APPL_DEBUG("Parsing Highlight = " << stopTime - startTime << " micro-s");
|
||||
|
||||
uniChar_t displayChar[MAX_EXP_CHAR_LEN];
|
||||
memset(displayChar, 0, sizeof(uniChar_t)*MAX_EXP_CHAR_LEN);
|
||||
etk::UString myStringToDisplay;
|
||||
// draw the lineNumber :
|
||||
int32_t currentLineID = displayStartLineId+1;
|
||||
APPL_VERBOSE("Start display of text buffer [" << displayStartBufferPos<< ".." << mylen << "]");
|
||||
APPL_VERBOSE("cursor Pos : " << m_cursorPos << "start at pos=" << displayStartBufferPos);
|
||||
|
||||
// note corection of the openGl invertion system :
|
||||
y = sizeY - y;
|
||||
y -= letterHeight;
|
||||
|
||||
OOColored.clippingDisable();
|
||||
OOText.clippingDisable();
|
||||
DrawLineNumber(&OOText, &OOColored, x_base, sizeY, nbColoneForLineNumber, currentLineID, y);
|
||||
int32_t pixelX = x_base + SEPARATION_SIZE_LINE_NUMBER;
|
||||
|
||||
clipping_ts drawClipping;
|
||||
drawClipping.x = 0;
|
||||
drawClipping.y = 0;
|
||||
drawClipping.w = sizeX;
|
||||
drawClipping.h = sizeY;
|
||||
|
||||
clipping_ts drawClippingTextArea;
|
||||
drawClippingTextArea.x = pixelX;
|
||||
drawClippingTextArea.y = 0;
|
||||
drawClippingTextArea.w = sizeX - drawClipping.x;
|
||||
drawClippingTextArea.h = sizeY;
|
||||
|
||||
OOText.clippingSet(drawClippingTextArea);
|
||||
OOColored.clippingSet(drawClippingTextArea);
|
||||
|
||||
// Clear the line intexation :
|
||||
m_elmentList.Clear();
|
||||
// every char element is register to find the diplay pos when mouse event arrive
|
||||
CharElement tmpElementProperty;
|
||||
tmpElementProperty.m_yOffset = y;
|
||||
tmpElementProperty.m_xOffset = 0;
|
||||
tmpElementProperty.m_ySize = 10;
|
||||
tmpElementProperty.m_bufferPos = displayStartBufferPos;
|
||||
m_elmentList.PushBack(tmpElementProperty);
|
||||
|
||||
float lineMaxSize = 0.0;
|
||||
for (iii=displayStartBufferPos; iii<mylen && displayLines >=0 && y >= -2*letterHeight; iii = new_i) {
|
||||
//APPL_DEBUG("display pos =" << y);
|
||||
int displaywidth;
|
||||
uint32_t currentChar = '\0';
|
||||
new_i = iii;
|
||||
// update the element buffer pos:
|
||||
tmpElementProperty.m_bufferPos = new_i;
|
||||
displaywidth = m_EdnBuf.GetExpandedChar(new_i, idX, displayChar, currentChar);
|
||||
int32_t drawSize = 0;
|
||||
|
||||
// update display position :
|
||||
etk::Vector2D<float> textPos;
|
||||
textPos.x = pixelX-offsetX;
|
||||
textPos.y = y;
|
||||
// update X pos
|
||||
tmpElementProperty.m_xOffset = textPos.x;
|
||||
tmpElementProperty.m_yOffset = textPos.y;
|
||||
|
||||
//APPL_INFO("diplay element=" << new_i);
|
||||
if (currentChar!='\n') {
|
||||
selectColor = myColor;
|
||||
HLColor = m_EdnBuf.GetElementColorAtPosition(m_displayLocalSyntax, iii);
|
||||
if (NULL != HLColor) {
|
||||
if (NULL != HLColor->patern) {
|
||||
selectColor = HLColor->patern->GetColor();
|
||||
}
|
||||
}
|
||||
bool haveBg = false;
|
||||
if( true == selHave
|
||||
&& selStart <= iii
|
||||
&& selEnd > iii)
|
||||
{
|
||||
selectColor = myColorSel;
|
||||
OOColored.SetColor(selectColor->GetBG());
|
||||
haveBg = selectColor->HaveBg();
|
||||
} else {
|
||||
if( ' ' == currentChar
|
||||
&& true == globals::IsSetDisplaySpaceChar() )
|
||||
{
|
||||
OOColored.SetColor(myColorSpace);
|
||||
haveBg = true;
|
||||
} else if( '\t' == currentChar
|
||||
&& true == globals::IsSetDisplaySpaceChar() )
|
||||
{
|
||||
OOColored.SetColor(myColorTab);
|
||||
haveBg = true;
|
||||
} else {
|
||||
OOColored.SetColor(selectColor->GetBG());
|
||||
haveBg = selectColor->HaveBg();
|
||||
}
|
||||
}
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
tmpElementProperty.m_ySize = OOText.GetHeight();
|
||||
OOText.SetColor(selectColor->GetFG());
|
||||
OOText.SetBold(selectColor->GetBold());
|
||||
OOText.SetItalic(selectColor->GetItalic());
|
||||
myStringToDisplay = displayChar;
|
||||
drawSize = OOText.Text(textPos, myStringToDisplay);
|
||||
#else
|
||||
ewol::font::mode_te tmpMode = ewol::font::Regular;
|
||||
if (true == selectColor->GetItalic() ) {
|
||||
if (true == selectColor->GetBold() ) {
|
||||
tmpMode = ewol::font::BoldItalic;
|
||||
} else {
|
||||
tmpMode = ewol::font::Italic;
|
||||
}
|
||||
} else {
|
||||
if (true == selectColor->GetBold() ) {
|
||||
tmpMode = ewol::font::Bold;
|
||||
} else {
|
||||
tmpMode = ewol::font::Regular;
|
||||
}
|
||||
}
|
||||
tmpElementProperty.m_ySize = OOText.GetHeight();
|
||||
//tmpElementProperty.m_yOffset += tmpElementProperty.m_ySize;
|
||||
OOText.SetColor(selectColor->GetFG());
|
||||
// TODO : Remove this unreallistic leak of time
|
||||
myStringToDisplay = displayChar;
|
||||
drawSize = OOText.Text(textPos, myStringToDisplay, tmpMode);
|
||||
#endif
|
||||
//APPL_DEBUG("add element : " << tmpElementProperty.m_yOffset << "," << tmpElementProperty.m_xOffset);
|
||||
m_elmentList.PushBack(tmpElementProperty);
|
||||
|
||||
if (true == haveBg ) {
|
||||
OOColored.Rectangle(textPos.x, y, drawSize, letterHeight);
|
||||
}
|
||||
}
|
||||
idX += displaywidth;
|
||||
// display cursor :
|
||||
if (m_cursorPos == iii) {
|
||||
// display the cursor:
|
||||
DrawCursor(&OOColored, pixelX - offsetX, y, letterHeight, letterWidth, drawClippingTextArea);
|
||||
}
|
||||
lineMaxSize += drawSize;
|
||||
pixelX += drawSize;
|
||||
// move to next line ...
|
||||
if (currentChar=='\n') {
|
||||
maxSize.x = etk_max(lineMaxSize, maxSize.x);
|
||||
lineMaxSize = 0.0;
|
||||
idX =0;
|
||||
pixelX = x_base + SEPARATION_SIZE_LINE_NUMBER;
|
||||
y -= letterHeight;
|
||||
//APPL_DEBUG("display pos =" << y);
|
||||
displayLines++;
|
||||
currentLineID++;
|
||||
OOColored.clippingDisable();
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
OOText.clippingDisable();
|
||||
OOText.SetBold(false);
|
||||
OOText.SetItalic(false);
|
||||
DrawLineNumber(&OOText, &OOColored, x_base, sizeY, nbColoneForLineNumber, currentLineID, y);
|
||||
OOText.clippingEnable();
|
||||
#else
|
||||
OOText.clippingDisable();
|
||||
DrawLineNumber(&OOText, &OOColored, x_base, sizeY, nbColoneForLineNumber, currentLineID, y);
|
||||
OOText.clippingEnable();
|
||||
#endif
|
||||
OOColored.clippingEnable();
|
||||
// add elements :
|
||||
m_elmentList.PushBack(tmpElementProperty);
|
||||
}
|
||||
}
|
||||
//APPL_DEBUG("end at pos buf =" << iii << " / " << m_EdnBuf.Size());
|
||||
// special case : the cursor is at the end of the buffer...
|
||||
if (m_cursorPos == iii) {
|
||||
DrawCursor(&OOColored, pixelX - offsetX, y, letterHeight, letterWidth, drawClippingTextArea);
|
||||
}
|
||||
// set the maximum size for the display ...
|
||||
SetMaximumSize(maxSize);
|
||||
int64_t stopTime2 = ewol::GetTime();
|
||||
APPL_DEBUG("DRAW text (brut) = " << stopTime2 - stopTime << " micro-s");
|
||||
|
||||
#endif
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
@ -813,7 +560,8 @@ int32_t BufferText::GetMousePosition(etk::Vector2D<float> pos)
|
||||
// TODO : Simplify selection ....
|
||||
void BufferText::MouseEvent(etk::Vector2D<float> pos)
|
||||
{
|
||||
if (true == ewol::IsSetShift() ) {
|
||||
#warning TODO ...
|
||||
if (false){ // TODO : true == ewol::IsSetShift() ) {
|
||||
MouseSelectFromCursorTo(pos);
|
||||
} else {
|
||||
// Get the caracter mouse position
|
||||
@ -868,7 +616,7 @@ void BufferText::MouseSelectFromCursorTo(etk::Vector2D<float> pos)
|
||||
m_EdnBuf.Select(selStart, m_cursorPos);
|
||||
}
|
||||
}
|
||||
Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
Copy(ewol::clipBoard::clipboardSelection);
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
|
||||
@ -889,7 +637,7 @@ void BufferText::MouseEventDouble(void)
|
||||
m_EdnBuf.Select(beginPos, endPos);
|
||||
m_cursorPos = endPos;
|
||||
}
|
||||
Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
Copy(ewol::clipBoard::clipboardSelection);
|
||||
// no else
|
||||
}
|
||||
|
||||
@ -905,7 +653,7 @@ void BufferText::MouseEventTriple(void)
|
||||
{
|
||||
m_EdnBuf.Select(m_EdnBuf.StartOfLine(m_cursorPos), m_EdnBuf.EndOfLine(m_cursorPos));
|
||||
m_cursorPos = m_EdnBuf.EndOfLine(m_cursorPos);
|
||||
Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
Copy(ewol::clipBoard::clipboardSelection);
|
||||
}
|
||||
|
||||
void BufferText::RemoveLine(void)
|
||||
@ -921,7 +669,7 @@ void BufferText::SelectAll(void)
|
||||
{
|
||||
m_EdnBuf.Select(0, m_EdnBuf.Size());
|
||||
m_cursorPos = m_EdnBuf.Size();
|
||||
Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
Copy(ewol::clipBoard::clipboardSelection);
|
||||
}
|
||||
|
||||
void BufferText::SelectNone(void)
|
||||
@ -966,12 +714,14 @@ void BufferText::SetInsertPosition(int32_t newPos, bool insertChar)
|
||||
return;
|
||||
}
|
||||
|
||||
#warning TODO ...
|
||||
if( false == haveSelectionActive
|
||||
&& true == ewol::IsSetShift() )
|
||||
&& false) //true == ewol::IsSetShift() )
|
||||
{
|
||||
// new selection
|
||||
m_EdnBuf.Select(rememberCursorPos, m_cursorPos);
|
||||
} else if( true == ewol::IsSetShift()
|
||||
#warning TODO ...
|
||||
} else if( false//true == ewol::IsSetShift()
|
||||
&& true == haveSelectionActive)
|
||||
{
|
||||
// update selection
|
||||
@ -1059,45 +809,45 @@ bool BufferText::TextDMoveDown(int32_t offset)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void BufferText::cursorMove(ewol::eventKbMoveType_te moveTypeEvent)
|
||||
void BufferText::cursorMove(ewol::keyEvent::keyboard_te moveTypeEvent)
|
||||
{
|
||||
bool needUpdatePosition = true;
|
||||
// check selection event ...
|
||||
switch(moveTypeEvent) {
|
||||
case ewol::EVENT_KB_MOVE_TYPE_LEFT:
|
||||
case ewol::keyEvent::keyboardLeft:
|
||||
//APPL_INFO("keyEvent : <LEFT>");
|
||||
if (m_cursorPos > 0) {
|
||||
SetInsertPosition(m_cursorPos - 1);
|
||||
}
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_RIGHT:
|
||||
case ewol::keyEvent::keyboardRight:
|
||||
//APPL_INFO("keyEvent : <RIGHT>");
|
||||
if (m_cursorPos < m_EdnBuf.Size() ) {
|
||||
SetInsertPosition(m_cursorPos + 1);
|
||||
}
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_UP:
|
||||
case ewol::keyEvent::keyboardUp:
|
||||
//APPL_INFO("keyEvent : <UP>");
|
||||
TextDMoveUp(1);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_DOWN:
|
||||
case ewol::keyEvent::keyboardDown:
|
||||
//APPL_INFO("keyEvent : <DOWN>");
|
||||
// check if we have enought line ...
|
||||
TextDMoveDown(1);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_PAGE_UP:
|
||||
case ewol::keyEvent::keyboardPageUp:
|
||||
//APPL_INFO("keyEvent : <PAGE-UP>");
|
||||
TextDMoveUp(m_displaySize.y);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_PAGE_DOWN:
|
||||
case ewol::keyEvent::keyboardPageDown:
|
||||
//APPL_INFO("keyEvent : <PAGE-DOWN>");
|
||||
TextDMoveDown(m_displaySize.y);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_START:
|
||||
case ewol::keyEvent::keyboardStart:
|
||||
//APPL_INFO("keyEvent : <Start of line>");
|
||||
SetInsertPosition(m_EdnBuf.StartOfLine(m_cursorPos) );
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_END:
|
||||
case ewol::keyEvent::keyboardEnd:
|
||||
//APPL_INFO("keyEvent : <End of line>");
|
||||
SetInsertPosition(m_EdnBuf.EndOfLine(m_cursorPos) );
|
||||
break;
|
||||
@ -1200,7 +950,8 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
m_EdnBuf.ReplaceSelected(tmpVect);
|
||||
SetInsertPosition(SelectionStart+tmpVect.Size(), true);
|
||||
} else {
|
||||
if (true == ewol::IsSetShift() ) {
|
||||
#warning TODO ...
|
||||
if (false){//true == ewol::IsSetShift() ) {
|
||||
m_cursorPos = m_EdnBuf.UnIndent();
|
||||
} else {
|
||||
m_cursorPos = m_EdnBuf.Indent();
|
||||
@ -1209,7 +960,8 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
}
|
||||
} else if (unicodeData == '\n') {
|
||||
etk::Vector<int8_t> tmpVect;
|
||||
if (true == ewol::IsSetShift()) {
|
||||
#warning TODO ...
|
||||
if (false){//true == ewol::IsSetShift()) {
|
||||
tmpVect.PushBack('\r');
|
||||
} else {
|
||||
tmpVect.PushBack('\n');
|
||||
|
@ -1,28 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferText.h
|
||||
* @brief Editeur De N'ours : Text Buffer (edit only ASCII text File) (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 19/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __BUFFER_TEXT_H__
|
||||
#define __BUFFER_TEXT_H__
|
||||
|
||||
@ -116,7 +99,7 @@ class BufferText
|
||||
int32_t offsetX, int32_t offsetY,
|
||||
int32_t sizeX, int32_t sizeY);
|
||||
void AddChar(uniChar_t unicodeData);
|
||||
void cursorMove(ewol::eventKbMoveType_te moveTypeEvent);
|
||||
void cursorMove(ewol::keyEvent::keyboard_te moveTypeEvent);
|
||||
void MouseSelectFromCursorTo(etk::Vector2D<float> pos);
|
||||
void MouseEvent(etk::Vector2D<float> pos);
|
||||
void MouseEventDouble(void);
|
||||
|
@ -1,29 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EdnBuf.cpp
|
||||
* @brief Editeur De N'ours : Buffer for internal Data (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/03/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <etk/unicode.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
|
@ -1,27 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EdnBuf.h
|
||||
* @brief Editeur De N'ours : Buffer for internal Data (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/03/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __EDN_BUF_H__
|
||||
#define __EDN_BUF_H__
|
||||
|
||||
|
@ -1,29 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EdnBufHistory.cpp
|
||||
* @brief Editeur De N'ours : history of buffer modification (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 24/03/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <EdnBufHistory.h>
|
||||
|
@ -1,28 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EdnBufHistory.h
|
||||
* @brief Editeur De N'ours : history of buffer modification (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 24/03/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __EDN_BUFFER_HISTORY_H__
|
||||
#define __EDN_BUFFER_HISTORY_H__
|
||||
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EdnBuf_HighLight.cpp
|
||||
* @brief Editeur De N'ours : Buffer for internal Data - section highlight (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/03/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EdnBuf_History.cpp
|
||||
* @brief Editeur De N'ours : Buffer for internal Data - section history (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/03/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file EdnBuf_Selection.cpp
|
||||
* @brief Editeur De N'ours : Buffer for internal Data - section selection (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 23/03/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Colorise.cpp
|
||||
* @brief Editeur De N'ours : Colirising system
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
|
@ -1,30 +1,14 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Colorize.h
|
||||
* @brief Editeur De N'ours : Colirizing system (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __COLORIZE_H__
|
||||
#define __COLORIZE_H__
|
||||
#include <draw/Color.h>
|
||||
#include <etk/UString.h>
|
||||
|
||||
class Colorize {
|
||||
|
@ -1,27 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ColorizeManager.cpp
|
||||
* @brief Editeur De N'ours : Colorising Manager
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <ColorizeManager.h>
|
||||
|
@ -1,33 +1,17 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ColorizeManager.h
|
||||
* @brief Editeur De N'ours : Colorising Manager (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __COLORIZE_MANAGER_H__
|
||||
#define __COLORIZE_MANAGER_H__
|
||||
|
||||
#include <Colorize.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <draw/Color.h>
|
||||
#include <ewol/widget/Widget.h>
|
||||
|
||||
typedef enum {
|
||||
|
@ -1,27 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Debug.h
|
||||
* @brief Editeur De N'ours : log implementation
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/06/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
const char * applLog = "edn ";
|
||||
|
@ -1,32 +1,15 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Debug.h
|
||||
* @brief Application log implementation
|
||||
* @author Edouard DUPIN
|
||||
* @date 10/04/2012
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __DEBUG_H__
|
||||
#define __DEBUG_H__
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <etk/types.h>
|
||||
#include <etk/Debug.h>
|
||||
|
||||
extern const char * applLog;
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferViewer.cpp
|
||||
* @brief Editeur De N'ours : main textViewer diplayer
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
@ -94,7 +77,7 @@ void BufferView::RemoveAllElement(void)
|
||||
*/
|
||||
void BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::List::OnReceiveMessage(CallerObject, eventId, data);
|
||||
widget::List::OnReceiveMessage(CallerObject, eventId, data);
|
||||
if (eventId == ednMsgBufferListChange) {
|
||||
// clean The list
|
||||
RemoveAllElement();
|
||||
@ -196,9 +179,9 @@ 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, float x, float y)
|
||||
bool BufferView::OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y)
|
||||
{
|
||||
if (1 == IdInput && typeEvent == ewol::EVENT_INPUT_TYPE_SINGLE) {
|
||||
if (1 == IdInput && typeEvent == ewol::keyEvent::statusSingle) {
|
||||
APPL_INFO("Event on List : IdInput=" << IdInput << " colomn=" << colomn << " raw=" << raw );
|
||||
if( raw>=0
|
||||
&& raw<m_list.Size()
|
||||
|
@ -1,27 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferView.h
|
||||
* @brief Editeur De N'ours : main List Buffer Viewer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 09/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __BUFFER_VIEW_H__
|
||||
#define __BUFFER_VIEW_H__
|
||||
|
||||
@ -50,7 +34,7 @@ namespace appl
|
||||
};
|
||||
};
|
||||
|
||||
class BufferView : public ewol::List
|
||||
class BufferView : public widget::List
|
||||
{
|
||||
private:
|
||||
int32_t m_selectedIdRequested;
|
||||
@ -60,29 +44,23 @@ class BufferView : public ewol::List
|
||||
// Constructeur
|
||||
BufferView(void);
|
||||
~BufferView(void);
|
||||
/**
|
||||
* @brief Get the current Object type of the EObject
|
||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
||||
* @param[in] objectType type description
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
// Derived function
|
||||
const char * const GetObjectType(void) { return "ApplBufferView"; };
|
||||
/**
|
||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
||||
* @param[in] eventId Message registered by this class
|
||||
* @param[in] data Data registered by this class
|
||||
* @return ---
|
||||
*/
|
||||
// Derived function
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
||||
protected:
|
||||
// function call to display the list :
|
||||
virtual draw::Color GetBasicBG(void);
|
||||
// Derived function
|
||||
virtual uint32_t GetNuberOfColomn(void);
|
||||
// Derived function
|
||||
virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, draw::Color &fg, draw::Color &bg);
|
||||
// Derived function
|
||||
virtual uint32_t GetNuberOfRaw(void);
|
||||
// Derived function
|
||||
virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg);
|
||||
virtual bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
|
||||
// Derived function
|
||||
virtual bool OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
|
||||
void RemoveAllElement(void);
|
||||
};
|
||||
|
||||
|
@ -1,27 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file CodeView.cpp
|
||||
* @brief Editeur De N'ours : Code Viewer Widget
|
||||
* This is an abstraction
|
||||
* @author Edouard DUPIN
|
||||
* @date 05/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <CodeView.h>
|
||||
@ -31,7 +13,7 @@
|
||||
#include <CodeView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <ewol/ClipBoard.h>
|
||||
#include <ewol/clipBoard.h>
|
||||
#include <SearchData.h>
|
||||
|
||||
#include <ewol/widget/WidgetManager.h>
|
||||
@ -233,10 +215,10 @@ void CodeView::OnRegenerateDisplay(void)
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData)
|
||||
bool CodeView::OnEventKb(ewol::keyEvent::status_te typeEvent, uniChar_t unicodeData)
|
||||
{
|
||||
//APPL_DEBUG("KB EVENT : \"" << UTF8_data << "\" size=" << strlen(UTF8_data) << "type=" << (int32_t)typeEvent);
|
||||
if (typeEvent == ewol::EVENT_KB_TYPE_DOWN) {
|
||||
if (typeEvent == ewol::keyEvent::statusDown) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->AddChar(unicodeData);
|
||||
@ -247,9 +229,9 @@ bool CodeView::OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData)
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent)
|
||||
bool CodeView::OnEventKbMove(ewol::keyEvent::status_te typeEvent, ewol::keyEvent::keyboard_te moveTypeEvent)
|
||||
{
|
||||
if (typeEvent == ewol::EVENT_KB_TYPE_DOWN) {
|
||||
if (typeEvent == ewol::keyEvent::statusDown) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->cursorMove(moveTypeEvent);
|
||||
@ -283,7 +265,7 @@ void CodeView::OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID)
|
||||
* @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, etk::Vector2D<float> pos)
|
||||
bool CodeView::OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, etk::Vector2D<float> pos)
|
||||
{
|
||||
etk::Vector2D<float> relativePos = RelativePosition(pos);
|
||||
// corection for the openGl abstraction
|
||||
@ -304,7 +286,7 @@ bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::even
|
||||
|
||||
if (1 == IdInput) {
|
||||
#ifndef __MODE__Touch
|
||||
if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
|
||||
if (ewol::keyEvent::statusDown == typeEvent) {
|
||||
m_buttunOneSelected = true;
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
// TODO : Set something good
|
||||
@ -313,16 +295,16 @@ bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::even
|
||||
tmpBuffer->MouseEvent(limitedPos);
|
||||
}
|
||||
MarkToRedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_UP == typeEvent) {
|
||||
} else if (ewol::keyEvent::statusUp == typeEvent) {
|
||||
m_buttunOneSelected = false;
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
tmpBuffer->Copy(ewol::clipBoard::clipboardSelection);
|
||||
}
|
||||
MarkToRedraw();
|
||||
} else
|
||||
#endif
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
if (ewol::keyEvent::statusSingle == typeEvent) {
|
||||
#ifdef __MODE__Touch
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
@ -333,19 +315,19 @@ bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::even
|
||||
#else
|
||||
// nothing to do ...
|
||||
#endif
|
||||
} else if (ewol::EVENT_INPUT_TYPE_DOUBLE == typeEvent) {
|
||||
} else if (ewol::keyEvent::statusDouble == typeEvent) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->MouseEventDouble();
|
||||
}
|
||||
MarkToRedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_TRIPLE == typeEvent) {
|
||||
} else if (ewol::keyEvent::statusTriple == typeEvent) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->MouseEventTriple();
|
||||
}
|
||||
MarkToRedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_MOVE == typeEvent) {
|
||||
} else if (ewol::keyEvent::statusMove == typeEvent) {
|
||||
if (true == m_buttunOneSelected) {
|
||||
int xxx, yyy;
|
||||
xxx = relativePos.x;
|
||||
@ -366,13 +348,13 @@ bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::even
|
||||
}
|
||||
}
|
||||
} else if (2 == IdInput) {
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
if (ewol::keyEvent::statusSingle == typeEvent) {
|
||||
// TODO : Set something good
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->MouseEvent(limitedPos);
|
||||
}
|
||||
ewol::clipBoard::Request(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
ewol::clipBoard::Request(ewol::clipBoard::clipboardSelection);
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
}
|
||||
}
|
||||
@ -390,7 +372,7 @@ bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::even
|
||||
*/
|
||||
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
||||
widget::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
||||
APPL_DEBUG("Extern Event : " << CallerObject << " type : " << eventId << " data=\"" << data << "\"");
|
||||
|
||||
if(eventId == ednMsgBufferId) {
|
||||
@ -414,15 +396,15 @@ void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * event
|
||||
} else if (eventId == ednMsgGuiCopy) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Copy(ewol::clipBoard::CLIPBOARD_STD);
|
||||
tmpBuffer->Copy(ewol::clipBoard::clipboardStd);
|
||||
}
|
||||
} else if (eventId == ednMsgGuiCut) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
tmpBuffer->Cut(ewol::clipBoard::CLIPBOARD_STD);
|
||||
tmpBuffer->Cut(ewol::clipBoard::clipboardStd);
|
||||
}
|
||||
} else if (eventId == ednMsgGuiPaste) {
|
||||
ewol::clipBoard::Request(ewol::clipBoard::CLIPBOARD_STD);
|
||||
ewol::clipBoard::Request(ewol::clipBoard::clipboardStd);
|
||||
} else if (eventId == ednMsgGuiUndo) {
|
||||
BufferText* tmpBuffer = BufferManager::Get(m_bufferID);
|
||||
if (NULL!=tmpBuffer) {
|
||||
@ -526,14 +508,14 @@ void CodeView::OnGetFocus(void)
|
||||
/*
|
||||
ewol::widgetMessageMultiCast::Send(GetWidgetId(), ednMsgBufferId, m_bufferID);
|
||||
*/
|
||||
ewol::KeyboardShow();
|
||||
ewol::Keyboard(true);
|
||||
APPL_INFO("Focus - In");
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnLostFocus(void)
|
||||
{
|
||||
ewol::KeyboardHide();
|
||||
ewol::Keyboard(false);
|
||||
APPL_INFO("Focus - out");
|
||||
}
|
||||
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file CodeView.h
|
||||
* @brief Editeur De N'ours : Code Viewer Widget (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 05/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __CODE_VIEW_H__
|
||||
@ -31,26 +14,20 @@
|
||||
#include <BufferManager.h>
|
||||
#include <appl/globalMsg.h>
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <ewol/widget/WidgetScrolled.h>
|
||||
#include <ewol/ResourceManager.h>
|
||||
#include <ewol/compositing/Text.h>
|
||||
#include <ewol/compositing/Drawing.h>
|
||||
|
||||
class CodeView :public ewol::WidgetScrooled
|
||||
class CodeView :public widget::WidgetScrooled
|
||||
{
|
||||
public:
|
||||
void Init(void);
|
||||
CodeView(etk::UString fontName, int32_t fontSize);
|
||||
CodeView(void);
|
||||
virtual ~CodeView(void);
|
||||
/**
|
||||
* @brief Get the current Object type of the EObject
|
||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
||||
* @param[in] objectType type description
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
// Derived function
|
||||
const char * const GetObjectType(void) { return "ApplCodeView"; };
|
||||
// Derived function
|
||||
virtual bool CalculateMinSize(void);
|
||||
private:
|
||||
etk::UString m_label;
|
||||
@ -64,37 +41,22 @@ class CodeView :public ewol::WidgetScrooled
|
||||
ewol::Text m_displayText;
|
||||
ewol::Drawing m_displayDrawing;
|
||||
public:
|
||||
// Derived function
|
||||
virtual void OnRegenerateDisplay(void);
|
||||
/**
|
||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
||||
* @param[in] eventId Message registered by this class
|
||||
* @param[in] data Data registered by this class
|
||||
* @return ---
|
||||
*/
|
||||
// Derived function
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
||||
public:
|
||||
/**
|
||||
* @brief Event on an input of this Widget
|
||||
* @param[in] type Type of the input (ewol::INPUT_TYPE_MOUSE/ewol::INPUT_TYPE_FINGER ...)
|
||||
* @param[in] IdInput Id of the current Input (PC : left=1, right=2, middle=3, none=0 / Tactil : first finger=1 , second=2 (only on this widget, no knowledge at ouside finger))
|
||||
* @param[in] typeEvent ewol type of event like EVENT_INPUT_TYPE_DOWN/EVENT_INPUT_TYPE_MOVE/EVENT_INPUT_TYPE_UP/EVENT_INPUT_TYPE_SINGLE/EVENT_INPUT_TYPE_DOUBLE/...
|
||||
* @param[in] pos Absolute position of the event
|
||||
* @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, etk::Vector2D<float> pos);
|
||||
virtual bool OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData);
|
||||
virtual bool OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent);
|
||||
/**
|
||||
* @brief Event on a past event ==> this event is asynchronous due to all system does not support direct getting datas
|
||||
* @note : need to have focus ...
|
||||
* @param[in] mode Mode of data requested
|
||||
* @return ---
|
||||
*/
|
||||
// Derived function
|
||||
virtual bool OnEventInput(ewol::keyEvent::type_te type, int32_t IdInput, ewol::keyEvent::status_te typeEvent, etk::Vector2D<float> pos);
|
||||
// Derived function
|
||||
virtual bool OnEventKb(ewol::keyEvent::status_te typeEvent, uniChar_t unicodeData);
|
||||
// Derived function
|
||||
virtual bool OnEventKbMove(ewol::keyEvent::status_te typeEvent, ewol::keyEvent::keyboard_te moveTypeEvent);
|
||||
// Derived function
|
||||
virtual void OnEventClipboard(ewol::clipBoard::clipboardListe_te clipboardID);
|
||||
|
||||
// Derived function
|
||||
virtual void OnGetFocus(void);
|
||||
// Derived function
|
||||
virtual void OnLostFocus(void);
|
||||
public:
|
||||
void SetFontSize(int32_t size);
|
||||
|
@ -1,28 +1,12 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file MainWindows.cpp
|
||||
* @brief Editeur De N'ours : main Windows diplayer (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <MainWindows.h>
|
||||
@ -45,7 +29,6 @@
|
||||
#include <ewol/widget/meta/FileChooser.h>
|
||||
#include <ewol/widget/meta/Parameter.h>
|
||||
#include <ewol/widget/WidgetManager.h>
|
||||
#include <ewol/ResourceManager.h>
|
||||
#include <ewol/eObject/EObject.h>
|
||||
|
||||
|
||||
@ -57,14 +40,14 @@
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
|
||||
class ParameterAboutGui : public ewol::SizerVert
|
||||
class ParameterAboutGui : public widget::SizerVert
|
||||
{
|
||||
public :
|
||||
ParameterAboutGui(void)
|
||||
{
|
||||
ewol::Spacer* mySpacer = NULL;
|
||||
widget::Spacer* mySpacer = NULL;
|
||||
|
||||
mySpacer = new ewol::Spacer();
|
||||
mySpacer = new widget::Spacer();
|
||||
if (NULL == mySpacer) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -102,7 +85,7 @@ class ParameterAboutGui : public ewol::SizerVert
|
||||
|
||||
void AddElement(etk::UString label, bool bold=false, bool italic=false)
|
||||
{
|
||||
ewol::Label* myLabel = new ewol::Label(label);
|
||||
widget::Label* myLabel = new widget::Label(label);
|
||||
if (NULL == myLabel) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -118,31 +101,31 @@ const char * l_smoothChick = "tmpEvent_smooth";
|
||||
const char * l_smoothMin = "tmpEvent_minChange";
|
||||
const char * l_smoothMax = "tmpEvent_maxChange";
|
||||
|
||||
|
||||
/*
|
||||
extern float DF_SoftEdge_min;
|
||||
extern float DF_SoftEdge_max;
|
||||
extern int32_t DF_SoftEdge;
|
||||
ewol::Slider* tmpSliderMin = NULL;
|
||||
ewol::Slider* tmpSliderMax = NULL;
|
||||
|
||||
widget::Slider* tmpSliderMin = NULL;
|
||||
widget::Slider* tmpSliderMax = NULL;
|
||||
*/
|
||||
#undef __class__
|
||||
#define __class__ "MainWindows"
|
||||
|
||||
MainWindows::MainWindows(void)
|
||||
{
|
||||
APPL_DEBUG("CREATE WINDOWS ... ");
|
||||
ewol::SizerVert * mySizerVert = NULL;
|
||||
ewol::SizerVert * mySizerVert2 = NULL;
|
||||
ewol::SizerHori * mySizerHori = NULL;
|
||||
widget::SizerVert * mySizerVert = NULL;
|
||||
widget::SizerVert * mySizerVert2 = NULL;
|
||||
widget::SizerHori * mySizerHori = NULL;
|
||||
//ewol::Button * myButton = NULL;
|
||||
CodeView * myCodeView = NULL;
|
||||
BufferView * myBufferView = NULL;
|
||||
ewol::Menu * myMenu = NULL;
|
||||
widget::Menu * myMenu = NULL;
|
||||
|
||||
mySizerVert = new ewol::SizerVert();
|
||||
mySizerVert = new widget::SizerVert();
|
||||
SetSubWidget(mySizerVert);
|
||||
|
||||
mySizerHori = new ewol::SizerHori();
|
||||
mySizerHori = new widget::SizerHori();
|
||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||
myBufferView = new BufferView();
|
||||
myBufferView->SetExpendX(false);
|
||||
@ -151,7 +134,7 @@ MainWindows::MainWindows(void)
|
||||
myBufferView->SetFillY(true);
|
||||
mySizerHori->SubWidgetAdd(myBufferView);
|
||||
|
||||
mySizerVert2 = new ewol::SizerVert();
|
||||
mySizerVert2 = new widget::SizerVert();
|
||||
mySizerHori->SubWidgetAdd(mySizerVert2);
|
||||
|
||||
// main buffer Area :
|
||||
@ -167,14 +150,14 @@ MainWindows::MainWindows(void)
|
||||
mySizerVert2->SubWidgetAdd(mySearch);
|
||||
#ifdef APPL_BUFFER_FONT_DISTANCE_FIELD
|
||||
{
|
||||
ewol::SizerHori * mySizerHori2 = new ewol::SizerHori();
|
||||
widget::SizerHori * mySizerHori2 = new widget::SizerHori();
|
||||
mySizerVert2->SubWidgetAdd(mySizerHori2);
|
||||
|
||||
ewol::CheckBox* tmpCheck = new ewol::CheckBox("smooth");
|
||||
widget::CheckBox* tmpCheck = new widget::CheckBox("smooth");
|
||||
mySizerHori2->SubWidgetAdd(tmpCheck);
|
||||
tmpCheck->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_smoothChick);
|
||||
|
||||
ewol::Slider* tmpSlider = new ewol::Slider();
|
||||
widget::Slider* tmpSlider = new widget::Slider();
|
||||
mySizerHori2->SubWidgetAdd(tmpSlider);
|
||||
tmpSlider->RegisterOnEvent(this, ewolEventSliderChange, l_smoothMin);
|
||||
tmpSlider->SetExpendX(true);
|
||||
@ -183,7 +166,7 @@ MainWindows::MainWindows(void)
|
||||
tmpSlider->SetValue(0450);
|
||||
tmpSliderMin = tmpSlider;
|
||||
|
||||
tmpSlider = new ewol::Slider();
|
||||
tmpSlider = new widget::Slider();
|
||||
mySizerHori2->SubWidgetAdd(tmpSlider);
|
||||
tmpSlider->RegisterOnEvent(this, ewolEventSliderChange, l_smoothMax);
|
||||
tmpSlider->SetExpendX(true);
|
||||
@ -194,26 +177,26 @@ MainWindows::MainWindows(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
mySizerHori = new ewol::SizerHori();
|
||||
mySizerHori = new widget::SizerHori();
|
||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||
|
||||
myMenu = new ewol::Menu();
|
||||
myMenu = new widget::Menu();
|
||||
mySizerHori->SubWidgetAdd(myMenu);
|
||||
int32_t idMenuFile = myMenu->AddTitle("File");
|
||||
(void)myMenu->Add(idMenuFile, "New", "", ednMsgGuiNew);
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenuFile, "Open", "icon/Load.svg", ednMsgGuiOpen);
|
||||
(void)myMenu->Add(idMenuFile, "Close", "icon/Close.svg", ednMsgGuiClose, "current");
|
||||
(void)myMenu->Add(idMenuFile, "Open", "THEME:GUI:Load.svg", ednMsgGuiOpen);
|
||||
(void)myMenu->Add(idMenuFile, "Close", "THEME:GUI:Close.svg", ednMsgGuiClose, "current");
|
||||
(void)myMenu->Add(idMenuFile, "Close (all)", "", ednMsgGuiClose, "All");
|
||||
(void)myMenu->Add(idMenuFile, "Save", "icon/Save.svg", ednMsgGuiSave, "current");
|
||||
(void)myMenu->Add(idMenuFile, "Save", "THEME:GUI:Save.svg", ednMsgGuiSave, "current");
|
||||
(void)myMenu->Add(idMenuFile, "Save As ...", "", ednMsgGuiSaveAs);
|
||||
(void)myMenu->AddSpacer();
|
||||
//(void)myMenu->Add(idMenuFile, "Exit", "", ednMsgGuiExit);
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenuFile, "Properties", "icon/Parameter.svg", ednMsgProperties);
|
||||
(void)myMenu->Add(idMenuFile, "Properties", "THEME:GUI:Parameter.svg", ednMsgProperties);
|
||||
int32_t idMenuEdit = myMenu->AddTitle("Edit");
|
||||
(void)myMenu->Add(idMenuEdit, "Undo", "icon/Undo.svg", ednMsgGuiUndo);
|
||||
(void)myMenu->Add(idMenuEdit, "Redo", "icon/Redo.svg", ednMsgGuiRedo);
|
||||
(void)myMenu->Add(idMenuEdit, "Undo", "THEME:GUI:Undo.svg", ednMsgGuiUndo);
|
||||
(void)myMenu->Add(idMenuEdit, "Redo", "THEME:GUI:Redo.svg", ednMsgGuiRedo);
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenuEdit, "Copy", "", ednMsgGuiCopy, "STD");
|
||||
(void)myMenu->Add(idMenuEdit, "Cut", "", ednMsgGuiCut, "STD");
|
||||
@ -224,8 +207,8 @@ MainWindows::MainWindows(void)
|
||||
(void)myMenu->Add(idMenuEdit, "Un-Select","", ednMsgGuiSelect, "NONE");
|
||||
(void)myMenu->Add(idMenuEdit, "Goto line ...","", ednMsgGuiGotoLine, "???");
|
||||
int32_t idMenuSearch = myMenu->AddTitle("Search");
|
||||
(void)myMenu->Add(idMenuSearch, "Search", "icon/Search.svg", ednMsgGuiSearch);
|
||||
(void)myMenu->Add(idMenuSearch, "Replace", "icon/Replace.svg", ednMsgGuiReplace);
|
||||
(void)myMenu->Add(idMenuSearch, "Search", "THEME:GUI:Search.svg", ednMsgGuiSearch);
|
||||
(void)myMenu->Add(idMenuSearch, "Replace", "THEME:GUI:Replace.svg", ednMsgGuiReplace);
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenuSearch, "Find (previous)","", ednMsgGuiFind, "Previous");
|
||||
(void)myMenu->Add(idMenuSearch, "Find (next)", "", ednMsgGuiFind, "Next");
|
||||
@ -246,11 +229,35 @@ MainWindows::MainWindows(void)
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenugDisplay, "Reload OpenGl Shader", "", ednMsgGuiReloadShader);
|
||||
|
||||
m_widgetLabelFileName = new ewol::Label("FileName");
|
||||
m_widgetLabelFileName = new widget::Label("FileName");
|
||||
m_widgetLabelFileName->SetExpendX(true);
|
||||
m_widgetLabelFileName->SetFillY(true);
|
||||
mySizerHori->SubWidgetAdd(m_widgetLabelFileName);
|
||||
|
||||
|
||||
|
||||
// add generic shortcut ...
|
||||
// (shift, control, alt, meta, uniChar_t unicodeValue, const char * generateEventId, etk::UString& data)
|
||||
ShortCutAdd("ctrl+o", ednMsgGuiOpen, "", true);
|
||||
ShortCutAdd("ctrl+n", ednMsgGuiNew, "", true);
|
||||
|
||||
ShortCutAdd("ctrl+s", ednMsgGuiSave, "current", true);
|
||||
ShortCutAdd("ctrl+shift+s", ednMsgGuiSave, "All", true);
|
||||
|
||||
ShortCutAdd("ctrl+q", ednMsgGuiClose, "current", true);
|
||||
ShortCutAdd("ctrl+shift+q", ednMsgGuiClose, "All", true);
|
||||
|
||||
ShortCutAdd("ctrl+z", ednMsgGuiUndo, "", true);
|
||||
ShortCutAdd("ctrl+shift+z", ednMsgGuiRedo, "", true);
|
||||
|
||||
ShortCutAdd("ctrl+l", ednMsgGuiGotoLine, "???", true);
|
||||
|
||||
ShortCutAdd("ctrl+f", ednMsgGuiSearch, "", true);
|
||||
ShortCutAdd("F12", ednMsgGuiReloadShader, "", true);
|
||||
|
||||
ShortCutAdd("ctrl+d", ednMsgGuiCtags, "Jump", true);
|
||||
|
||||
|
||||
|
||||
// Generic event ...
|
||||
RegisterMultiCast(ednMsgGuiSaveAs);
|
||||
RegisterMultiCast(ednMsgProperties);
|
||||
@ -285,7 +292,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
//APPL_INFO("Receive Event from the main windows ... : \"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||
// Open file Section ...
|
||||
if (eventId == ednMsgGuiOpen) {
|
||||
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
|
||||
widget::FileChooser* tmpWidget = new widget::FileChooser();
|
||||
tmpWidget->SetTitle("Open Files ...");
|
||||
tmpWidget->SetValidateLabel("Open");
|
||||
if (BufferManager::GetSelected()!=-1) {
|
||||
@ -315,7 +322,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
APPL_ERROR("Request saveAs on non existant Buffer ID=" << m_currentSavingAsIdBuffer);
|
||||
} else {
|
||||
BufferText* myBuffer = BufferManager::Get(m_currentSavingAsIdBuffer);
|
||||
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
|
||||
widget::FileChooser* tmpWidget = new widget::FileChooser();
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -369,7 +376,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
// TODO : Set the Title ....
|
||||
} else if (eventId == ednMsgProperties) {
|
||||
// Request the parameter GUI
|
||||
ewol::Parameter* tmpWidget = new ewol::Parameter();
|
||||
widget::Parameter* tmpWidget = new widget::Parameter();
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -385,7 +392,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
tmpSubWidget = new ParameterAboutGui();
|
||||
tmpWidget->MenuAdd("About", "", tmpSubWidget);
|
||||
}
|
||||
} else if (eventId == l_smoothChick) {
|
||||
}/* else if (eventId == l_smoothChick) {
|
||||
if (data == "true") {
|
||||
DF_SoftEdge = 1;
|
||||
} else {
|
||||
@ -407,7 +414,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
DF_SoftEdge_min = DF_SoftEdge_max;
|
||||
tmpSliderMin->SetValue(DF_SoftEdge_min*1000.0);
|
||||
}
|
||||
} else if (eventId == ednMsgGuiReloadShader) {
|
||||
} */else if (eventId == ednMsgGuiReloadShader) {
|
||||
ewol::resource::ReLoadResources();
|
||||
ewol::ForceRedrawAll();
|
||||
}
|
||||
|
@ -1,27 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file MainWindows.h
|
||||
* @brief Editeur De N'ours : main Windows diplayer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __MAIN_WINDOWS_H__
|
||||
#define __MAIN_WINDOWS_H__
|
||||
|
||||
@ -37,32 +21,16 @@ class MainWindows : public ewol::Windows
|
||||
{
|
||||
private:
|
||||
int32_t m_currentSavingAsIdBuffer;
|
||||
ewol::Label* m_widgetLabelFileName;
|
||||
widget::Label* m_widgetLabelFileName;
|
||||
public:
|
||||
// Constructeur
|
||||
MainWindows(void);
|
||||
~MainWindows(void);
|
||||
/**
|
||||
* @brief Get the current Object type of the EObject
|
||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
||||
* @param[in] objectType type description
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
// Derived function
|
||||
const char * const GetObjectType(void) { return "MainWindows"; };
|
||||
/**
|
||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
||||
* @param[in] eventId Message registered by this class
|
||||
* @param[in] data Data registered by this class
|
||||
* @return ---
|
||||
*/
|
||||
// Derived function
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
||||
/**
|
||||
* @brief Inform object that an other object is removed ...
|
||||
* @param[in] removeObject Pointer on the EObject remeved ==> the user must remove all reference on this EObject
|
||||
* @note : Sub classes must call this class
|
||||
* @return ---
|
||||
*/
|
||||
// Derived function
|
||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||
};
|
||||
|
||||
|
@ -1,29 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Search.cpp
|
||||
* @brief Editeur De N'ours : Search system
|
||||
* @author Edouard DUPIN
|
||||
* @date 03/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#include "appl/global.h"
|
||||
#include "Search.h"
|
||||
#include "SearchData.h"
|
||||
@ -31,7 +13,7 @@
|
||||
#include "MainWindows.h"
|
||||
#include "appl/globalMsg.h"
|
||||
|
||||
#include <ewol/widget/ButtonImage.h>
|
||||
#include <ewol/widget/Button.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
@ -54,9 +36,9 @@ Search::Search(void) :
|
||||
{
|
||||
m_forward = false;
|
||||
|
||||
ewol::ButtonImage * myButtonImage = NULL;
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("THEME:GUI:Remove.svg");
|
||||
//widget::ButtonImage * myButtonImage = NULL;
|
||||
/*
|
||||
myButtonImage = new widget::ButtonImage("THEME:GUI:Remove.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
@ -64,8 +46,8 @@ Search::Search(void) :
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventHideBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
m_searchEntry = new ewol::Entry();
|
||||
*/
|
||||
m_searchEntry = new widget::Entry();
|
||||
if (NULL == m_searchEntry) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
@ -75,8 +57,8 @@ Search::Search(void) :
|
||||
m_searchEntry->SetFillX(true);
|
||||
SubWidgetAdd(m_searchEntry);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("THEME:GUI:Search.svg");
|
||||
/*
|
||||
myButtonImage = new widget::ButtonImage("THEME:GUI:Search.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
@ -84,8 +66,8 @@ Search::Search(void) :
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventSearchBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
m_replaceEntry = new ewol::Entry();
|
||||
*/
|
||||
m_replaceEntry = new widget::Entry();
|
||||
if (NULL == m_replaceEntry) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
@ -95,8 +77,8 @@ Search::Search(void) :
|
||||
m_replaceEntry->SetFillX(true);
|
||||
SubWidgetAdd(m_replaceEntry);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("THEME:GUI:Replace.svg");
|
||||
/*
|
||||
myButtonImage = new widget::ButtonImage("THEME:GUI:Replace.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
@ -105,7 +87,7 @@ Search::Search(void) :
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("THEME:GUI:CaseSensitive.svg");
|
||||
myButtonImage = new widget::ButtonImage("THEME:GUI:CaseSensitive.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
@ -129,7 +111,7 @@ Search::Search(void) :
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("THEME:GUI:Up.svg");
|
||||
myButtonImage = new widget::ButtonImage("THEME:GUI:Up.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
@ -140,7 +122,7 @@ Search::Search(void) :
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventForwardCb);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
*/
|
||||
RegisterMultiCast(ednMsgGuiSearch);
|
||||
// basicly hiden ...
|
||||
Hide();
|
||||
@ -161,7 +143,7 @@ Search::~Search(void)
|
||||
*/
|
||||
void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::SizerHori::OnReceiveMessage(CallerObject, eventId, data);
|
||||
widget::SizerHori::OnReceiveMessage(CallerObject, eventId, data);
|
||||
//APPL_INFO("Search receive message : \"" << eventId << "\" data=\"" << data << "\"");
|
||||
if ( eventId == l_eventSearchEntry) {
|
||||
SearchData::SetSearch(data);
|
||||
@ -242,7 +224,7 @@ void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId
|
||||
*/
|
||||
void Search::OnObjectRemove(ewol::EObject * removeObject)
|
||||
{
|
||||
ewol::SizerHori::OnObjectRemove(removeObject);
|
||||
widget::SizerHori::OnObjectRemove(removeObject);
|
||||
if (removeObject == m_searchEntry) {
|
||||
m_searchEntry = NULL;
|
||||
}
|
||||
|
@ -1,28 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Search.h
|
||||
* @brief Editeur De N'ours : Search system (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 03/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __SEARCH_H__
|
||||
#define __SEARCH_H__
|
||||
|
||||
@ -30,7 +13,7 @@
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
|
||||
class Search : public ewol::SizerHori
|
||||
class Search : public widget::SizerHori
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
@ -60,8 +43,8 @@ class Search : public ewol::SizerHori
|
||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||
private:
|
||||
bool m_forward;
|
||||
ewol::Entry * m_searchEntry;
|
||||
ewol::Entry * m_replaceEntry;
|
||||
widget::Entry * m_searchEntry;
|
||||
widget::Entry * m_replaceEntry;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file SearchData.cpp
|
||||
* @brief Editeur De N'ours : Search Data element (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 02/02/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/global.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file SearchData.h
|
||||
* @brief Editeur De N'ours : Search Data element (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 02/02/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __SEARCH_DATA_H__
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file TagFileList.cpp
|
||||
* @brief Editeur De N'ours : Tags list display to jump (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 16/10/2012
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/tool.h>
|
||||
@ -106,9 +89,9 @@ bool appl::TagFileList::GetElement(int32_t colomn, int32_t raw, etk::UString &my
|
||||
};
|
||||
|
||||
|
||||
bool appl::TagFileList::OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y)
|
||||
bool appl::TagFileList::OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y)
|
||||
{
|
||||
if (typeEvent == ewol::EVENT_INPUT_TYPE_SINGLE) {
|
||||
if (typeEvent == ewol::keyEvent::statusSingle) {
|
||||
EWOL_INFO("Event on List : IdInput=" << IdInput << " colomn=" << colomn << " raw=" << raw );
|
||||
if (1 == IdInput) {
|
||||
int32_t previousRaw = m_selectedLine;
|
||||
|
@ -1,33 +1,14 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file TagFileList.h
|
||||
* @brief Editeur De N'ours : Tags list display to jump (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 16/10/2012
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __APPL_CTAGS_LIST_H__
|
||||
#define __APPL_CTAGS_LIST_H__
|
||||
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <ewol/widget/List.h>
|
||||
|
||||
@ -44,7 +25,7 @@ namespace appl {
|
||||
TagListElement(etk::UString& file, int32_t line) : filename(file), fileLine(line) {};
|
||||
~TagListElement(void) {};
|
||||
};
|
||||
class TagFileList : public ewol::List
|
||||
class TagFileList : public widget::List
|
||||
{
|
||||
private:
|
||||
int32_t m_selectedLine;
|
||||
@ -58,7 +39,7 @@ namespace appl {
|
||||
bool GetTitle(int32_t colomn, etk::UString &myTitle, draw::Color &fg, draw::Color &bg);
|
||||
uint32_t GetNuberOfRaw(void);
|
||||
bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, draw::Color &fg, draw::Color &bg);
|
||||
bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
|
||||
bool OnItemEvent(int32_t IdInput, ewol::keyEvent::status_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
|
||||
/**
|
||||
* @brief Get the current Object type of the EObject
|
||||
* @note In Embended platforme, it is many time no -rtti flag, then it is not possible to use dynamic cast ==> this will replace it
|
||||
|
@ -1,51 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file TagFileSelection.cpp
|
||||
* @brief Editeur De N'ours : Tags list selection to jump (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 16/10/2012
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ewol/widget/meta/FileChooser.cpp
|
||||
* @brief ewol File chooser meta widget system (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 29/12/2011
|
||||
* @par Project
|
||||
* ewol
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2011 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
|
||||
*
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Gui/TagFileSelection.h>
|
||||
@ -77,13 +35,13 @@ appl::TagFileSelection::TagFileSelection(void)
|
||||
AddEventId(applEventctagsSelection);
|
||||
AddEventId(applEventctagsCancel);
|
||||
|
||||
ewol::Label* myWidgetTitle = NULL;
|
||||
ewol::Button* myWidgetValidate = NULL;
|
||||
ewol::Button* myWidgetCancel = NULL;
|
||||
widget::Label* myWidgetTitle = NULL;
|
||||
widget::Button* myWidgetValidate = NULL;
|
||||
widget::Button* myWidgetCancel = NULL;
|
||||
|
||||
ewol::SizerVert * mySizerVert = NULL;
|
||||
ewol::SizerHori * mySizerHori = NULL;
|
||||
ewol::Spacer * mySpacer = NULL;
|
||||
widget::SizerVert * mySizerVert = NULL;
|
||||
widget::SizerHori * mySizerHori = NULL;
|
||||
widget::Spacer * mySpacer = NULL;
|
||||
#if defined(__TARGET_OS__Android)
|
||||
SetDisplayRatio(0.90);
|
||||
#elif defined(__TARGET_OS__Windows)
|
||||
@ -92,7 +50,7 @@ appl::TagFileSelection::TagFileSelection(void)
|
||||
SetDisplayRatio(0.80);
|
||||
#endif
|
||||
|
||||
mySizerVert = new ewol::SizerVert();
|
||||
mySizerVert = new widget::SizerVert();
|
||||
if (NULL == mySizerVert) {
|
||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -100,19 +58,19 @@ appl::TagFileSelection::TagFileSelection(void)
|
||||
// set it in the pop-up-system :
|
||||
SubWidgetSet(mySizerVert);
|
||||
|
||||
mySizerHori = new ewol::SizerHori();
|
||||
mySizerHori = new widget::SizerHori();
|
||||
if (NULL == mySizerHori) {
|
||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||
mySpacer = new ewol::Spacer();
|
||||
mySpacer = new widget::Spacer();
|
||||
if (NULL == mySpacer) {
|
||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
mySpacer->SetExpendX(true);
|
||||
mySizerHori->SubWidgetAdd(mySpacer);
|
||||
}
|
||||
myWidgetValidate = new ewol::Button("Jump");
|
||||
myWidgetValidate = new widget::Button("Jump");
|
||||
if (NULL == myWidgetValidate) {
|
||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -120,7 +78,7 @@ appl::TagFileSelection::TagFileSelection(void)
|
||||
myWidgetValidate->RegisterOnEvent(this, ewolEventButtonPressed, applEventctagsSelection);
|
||||
mySizerHori->SubWidgetAdd(myWidgetValidate);
|
||||
}
|
||||
myWidgetCancel = new ewol::Button("Cancel");
|
||||
myWidgetCancel = new widget::Button("Cancel");
|
||||
if (NULL == myWidgetCancel) {
|
||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -143,7 +101,7 @@ appl::TagFileSelection::TagFileSelection(void)
|
||||
mySizerVert->SubWidgetAdd(m_listTag);
|
||||
}
|
||||
|
||||
myWidgetTitle = new ewol::Label("Ctags Jump Selection ...");
|
||||
myWidgetTitle = new widget::Label("Ctags Jump Selection ...");
|
||||
if (NULL == myWidgetTitle) {
|
||||
EWOL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -216,7 +174,7 @@ void appl::TagFileSelection::AddCtagsNewItem(etk::UString file, int32_t line)
|
||||
void appl::TagFileSelection::OnObjectRemove(ewol::EObject * removeObject)
|
||||
{
|
||||
// First step call parrent :
|
||||
ewol::PopUp::OnObjectRemove(m_listTag);
|
||||
widget::PopUp::OnObjectRemove(m_listTag);
|
||||
// second step find if in all the elements ...
|
||||
if(removeObject == m_listTag) {
|
||||
m_listTag = NULL;
|
||||
|
@ -1,32 +1,14 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file TagFileSelection.h
|
||||
* @brief Editeur De N'ours : Tags list selection to jump (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 16/10/2012
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __APPL_CTAGS_SELECTION_H__
|
||||
#define __APPL_CTAGS_SELECTION_H__
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <ewol/widget/PopUp.h>
|
||||
#include <appl/Gui/TagFileList.h>
|
||||
@ -35,7 +17,7 @@ extern const char * const applEventctagsSelection;
|
||||
extern const char * const applEventctagsCancel;
|
||||
|
||||
namespace appl {
|
||||
class TagFileSelection : public ewol::PopUp
|
||||
class TagFileSelection : public widget::PopUp
|
||||
{
|
||||
private:
|
||||
appl::TagFileList* m_listTag;
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Highlight.c
|
||||
* @brief Editeur De N'ours : Hightlightning Specific
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Highlight.h
|
||||
* @brief Editeur De N'ours : Hightlightning Specific (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#ifndef __HIGHLIGHT_H__
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file HighlightManager.cpp
|
||||
* @brief Editeur De N'ours : Hightlining Manager
|
||||
* @author Edouard DUPIN
|
||||
* @date 16/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
|
@ -1,28 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file HighlightManager.h
|
||||
* @brief Editeur De N'ours : Hightlining Manager (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __HIGHLIGHT_MANAGER_H__
|
||||
#define __HIGHLIGHT_MANAGER_H__
|
||||
|
||||
|
@ -1,27 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file HighlightPattern.cpp
|
||||
* @brief Editeur De N'ours : Hightlight Patern (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <HighlightPattern.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file HighlightPattern.h
|
||||
* @brief Editeur De N'ours : Hightlight Patern (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <Highlight.h>
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file CTagsManager.cpp
|
||||
* @brief Editeur De N'ours : Ctags manager : acces to the ctags file (Sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 15/07/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
@ -158,13 +141,13 @@ void CTagsManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * e
|
||||
} else if (eventId == ednMsgGuiCtags) {
|
||||
if (data == "Load") {
|
||||
APPL_INFO("Request opening ctag file");
|
||||
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
|
||||
widget::FileChooser* tmpWidget = new widget::FileChooser();
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
tmpWidget->SetTitle("Open Exuberant Ctags File");
|
||||
tmpWidget->SetValidateLabel("Open");
|
||||
PopUpWidgetPush(tmpWidget);
|
||||
ewol::WindowsPopUpAdd(tmpWidget);
|
||||
tmpWidget->RegisterOnEvent(this, ewolEventFileChooserValidate, ednEventPopUpCtagsLoadFile);
|
||||
}
|
||||
} else if (data == "ReLoad") {
|
||||
@ -240,7 +223,7 @@ void CTagsManager::JumpTo(void)
|
||||
{
|
||||
if (NULL != m_ctagFile) {
|
||||
// get the middle button of the clipboard ==> represent the current selection ...
|
||||
etk::UString data = ewol::clipBoard::Get(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
etk::UString data = ewol::clipBoard::Get(ewol::clipBoard::clipboardSelection);
|
||||
APPL_DEBUG("clipboard data : \"" << data << "\"");
|
||||
if (data.Size() == 0) {
|
||||
APPL_INFO("No current selection");
|
||||
@ -271,7 +254,7 @@ void CTagsManager::JumpTo(void)
|
||||
PrintTag(&entry);
|
||||
tmpWidget->AddCtagsNewItem(myfile.GetName(), lineID);
|
||||
} while (tagsFindNext (m_ctagFile, &entry) == TagSuccess);
|
||||
PopUpWidgetPush(tmpWidget);
|
||||
ewol::WindowsPopUpAdd(tmpWidget);
|
||||
tmpWidget->RegisterOnEvent(this, applEventctagsSelection);
|
||||
}
|
||||
} else {
|
||||
|
@ -1,28 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file CTagsManager.h
|
||||
* @brief Editeur De N'ours : Ctags manager : acces to the ctags file (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 15/07/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __C_TAGS_MANAGER_H__
|
||||
#define __C_TAGS_MANAGER_H__
|
||||
|
||||
|
@ -1,33 +1,16 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file tools_Globals.cpp
|
||||
* @brief Editeur De N'ours : Globals Values
|
||||
* @author Edouard DUPIN
|
||||
* @date 05/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/global.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/eObject/EObject.h>
|
||||
#include <ewol/ResourceManager.h>
|
||||
#include <ewol/renderer/ResourceManager.h>
|
||||
#include <etk/os/FSNode.h>
|
||||
|
||||
#undef __class__
|
||||
@ -132,10 +115,10 @@ static const char * const l_changeRounded = "edn-event-change-rounded";
|
||||
|
||||
globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
||||
{
|
||||
ewol::CheckBox* myCheckbox = NULL;
|
||||
ewol::Spacer* mySpacer = NULL;
|
||||
widget::CheckBox* myCheckbox = NULL;
|
||||
widget::Spacer* mySpacer = NULL;
|
||||
|
||||
mySpacer = new ewol::Spacer();
|
||||
mySpacer = new widget::Spacer();
|
||||
if (NULL == mySpacer) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -143,7 +126,7 @@ globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
||||
mySpacer->SetExpendY(true);
|
||||
SubWidgetAdd(mySpacer);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Automatic Indentation");
|
||||
myCheckbox = new widget::CheckBox("Automatic Indentation");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -152,7 +135,7 @@ globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeIndentation);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Display space char (' ')");
|
||||
myCheckbox = new widget::CheckBox("Display space char (' ')");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -161,7 +144,7 @@ globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeSpace);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Display tabulation char ('\\t')");
|
||||
myCheckbox = new widget::CheckBox("Display tabulation char ('\\t')");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -170,7 +153,7 @@ globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeTabulation);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Display end of line ('\\n')");
|
||||
myCheckbox = new widget::CheckBox("Display end of line ('\\n')");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -179,7 +162,7 @@ globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeEndOfLine);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("switch Rounded/default");
|
||||
myCheckbox = new widget::CheckBox("switch Rounded/default");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
@ -205,7 +188,7 @@ globals::ParameterGlobalsGui::~ParameterGlobalsGui(void)
|
||||
*/
|
||||
void globals::ParameterGlobalsGui::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::SizerVert::OnReceiveMessage(CallerObject, eventId, data);
|
||||
widget::SizerVert::OnReceiveMessage(CallerObject, eventId, data);
|
||||
|
||||
if (eventId == l_changeEndOfLine) {
|
||||
if (data == "true") {
|
||||
|
@ -1,33 +1,15 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file appl/global.h
|
||||
* @brief Editeur De N'ours : Globals Values (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 05/12/2010
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __TOOLS_GLOBALS_H__
|
||||
#define __TOOLS_GLOBALS_H__
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <etk/Types.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
|
||||
|
||||
@ -53,7 +35,7 @@ namespace globals
|
||||
|
||||
bool OrderTheBufferList(void);
|
||||
|
||||
class ParameterGlobalsGui : public ewol::SizerVert
|
||||
class ParameterGlobalsGui : public widget::SizerVert
|
||||
{
|
||||
public :
|
||||
ParameterGlobalsGui(void);
|
||||
|
@ -1,26 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file MsgBroadcast.cpp
|
||||
* @brief Editeur De N'ours : message beetween thread and GUI elements ... (Souces)
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/02/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <appl/globalMsg.h>
|
||||
|
@ -1,28 +1,11 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file appl/globalMsg.h
|
||||
* @brief Editeur De N'ours : message beetween thread and GUI elements ... (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/02/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __MSG_BROADCAST_H__
|
||||
#define __MSG_BROADCAST_H__
|
||||
|
||||
|
@ -1,29 +1,12 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file init.cpp
|
||||
* @brief Editeur De N'ours : main fonction
|
||||
* @author Edouard DUPIN
|
||||
* @date 26/01/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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*
|
||||
* @copyright 2010, Edouard DUPIN, all right reserved
|
||||
*
|
||||
* @license GPL v3 (see license file)
|
||||
*/
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <etk/types.h>
|
||||
#include <etk/UString.h>
|
||||
#include <ewol/ewol.h>
|
||||
#include <ewol/eObject/EObject.h>
|
||||
@ -42,7 +25,8 @@
|
||||
#include <readtags.h>
|
||||
#include <CTagsManager.h>
|
||||
#include <globalMsg.h>
|
||||
#include <ewol/font/FontManager.h>
|
||||
#include <ewol/config.h>
|
||||
#include <ewol/commandLine.h>
|
||||
|
||||
MainWindows * basicWindows = NULL;
|
||||
|
||||
@ -52,7 +36,7 @@ MainWindows * basicWindows = NULL;
|
||||
* @param std IO
|
||||
* @return std IO
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
int main(int argc, const char *argv[])
|
||||
{
|
||||
// only one things to do :
|
||||
return ewol::Run(argc, argv);
|
||||
@ -79,14 +63,10 @@ void APP_Init(void)
|
||||
#endif
|
||||
ewol::ChangeSize(etk::Vector2D<int32_t>(800, 600));
|
||||
etk::InitDefaultFolder(PROJECT_NAME);
|
||||
|
||||
ewol::font::SetDefaultFont("FreeSerif");
|
||||
//ewol::font::SetDefaultFont("Font/freefont/FreeSerif.ttf");
|
||||
//ewol::font::SetDefaultFont("Font/ACharmingFont.ttf");
|
||||
#ifdef __TARGET_OS__Android
|
||||
ewol::font::SetDefaultSize(19);
|
||||
ewol::config::FontSetDefault("FreeSerif", 19);
|
||||
#else
|
||||
ewol::font::SetDefaultSize(14);
|
||||
ewol::config::FontSetDefault("FreeSerif", 14);
|
||||
#endif
|
||||
// init internal global value
|
||||
globals::init();
|
||||
@ -121,35 +101,14 @@ void APP_Init(void)
|
||||
return;
|
||||
}
|
||||
// create the specific windows
|
||||
ewol::DisplayWindows(basicWindows);
|
||||
|
||||
// add generic shortcut ...
|
||||
// (shift, control, alt, meta, uniChar_t unicodeValue, const char * generateEventId, etk::UString& data)
|
||||
ewol::shortCut::Add("ctrl+o", ednMsgGuiOpen, "");
|
||||
ewol::shortCut::Add("ctrl+n", ednMsgGuiNew, "");
|
||||
|
||||
ewol::shortCut::Add("ctrl+s", ednMsgGuiSave, "current");
|
||||
ewol::shortCut::Add("ctrl+shift+s", ednMsgGuiSave, "All");
|
||||
|
||||
ewol::shortCut::Add("ctrl+q", ednMsgGuiClose, "current");
|
||||
ewol::shortCut::Add("ctrl+shift+q", ednMsgGuiClose, "All");
|
||||
|
||||
ewol::shortCut::Add("ctrl+z", ednMsgGuiUndo, "");
|
||||
ewol::shortCut::Add("ctrl+shift+z", ednMsgGuiRedo, "");
|
||||
|
||||
ewol::shortCut::Add("ctrl+l", ednMsgGuiGotoLine, "???");
|
||||
|
||||
ewol::shortCut::Add("ctrl+f", ednMsgGuiSearch, "");
|
||||
ewol::shortCut::Add("F12", ednMsgGuiReloadShader, "");
|
||||
|
||||
ewol::shortCut::Add("ctrl+d", ednMsgGuiCtags, "Jump");
|
||||
ewol::WindowsSet(basicWindows);
|
||||
|
||||
|
||||
// add files
|
||||
APPL_INFO("show list of files : ");
|
||||
bool ctagDetected = false;
|
||||
for( int32_t iii=0 ; iii<ewol::CmdLine::Nb(); iii++) {
|
||||
etk::UString tmpppp = ewol::CmdLine::Get(iii);
|
||||
for( int32_t iii=0 ; iii<ewol::commandLine::Size(); iii++) {
|
||||
etk::UString tmpppp = ewol::commandLine::Get(iii);
|
||||
if (tmpppp == "-t") {
|
||||
ctagDetected = true;
|
||||
} else if (true == ctagDetected) {
|
||||
@ -179,7 +138,7 @@ void APP_UnInit(void)
|
||||
{
|
||||
APPL_INFO("==> Un-Init Edn (START)");
|
||||
// Remove windows :
|
||||
ewol::DisplayWindows(NULL);
|
||||
ewol::WindowsSet(NULL);
|
||||
|
||||
cTagsManager::UnInit();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user