Compare commits
72 Commits
Author | SHA1 | Date | |
---|---|---|---|
0fc8934d93 | |||
04c86769d6 | |||
d3e963749b | |||
9640f3c527 | |||
c992d4a830 | |||
761fabbac8 | |||
2a7a0d0d9b | |||
c36a9d21f3 | |||
96047c36e8 | |||
a20f3e4063 | |||
7ee4747cc2 | |||
4012d75279 | |||
d58bda6896 | |||
64be551b35 | |||
53c34d0894 | |||
9de7bafcb5 | |||
1d3ed3f200 | |||
694e73a29c | |||
0dbef0d349 | |||
4e7eac1399 | |||
12cd1db0e1 | |||
ae2bea1918 | |||
d1708610c7 | |||
628c10ff3a | |||
e10e633949 | |||
750e663eca | |||
33c6de5450 | |||
0d4b7188c0 | |||
10d0fb5674 | |||
fee00e79c7 | |||
7146a00371 | |||
2e974251fa | |||
0d79b55112 | |||
df8d2772da | |||
aea60950ff | |||
a210af5627 | |||
c594be7a5f | |||
d19586c4d8 | |||
e5a06889b6 | |||
4676ea0a63 | |||
8e4e0a52b6 | |||
65b0fc5b19 | |||
f390a594a3 | |||
bbb1ea0a93 | |||
277045cde4 | |||
11e10e6db8 | |||
c2729b4c67 | |||
6340cc409e | |||
4821093048 | |||
a904f30b34 | |||
21b786f920 | |||
a0f3beba5c | |||
a3c58a6c33 | |||
845232656b | |||
cd2b72d369 | |||
5cc4a1a779 | |||
586cd62f44 | |||
5d1837eb69 | |||
247aac0684 | |||
13e2af9125 | |||
dde852cbe1 | |||
a01c87e49b | |||
28ddde0c83 | |||
5e86641caf | |||
c75fb80736 | |||
f2bcd9052b | |||
de9d630fee | |||
a99eba9a1f | |||
2997133eee | |||
495cab7d27 | |||
e6ee6e0cd1 | |||
3372645356 |
15
.gitignore
vendored
@@ -2,16 +2,9 @@
|
||||
###################################
|
||||
# folders
|
||||
###################################
|
||||
CVS
|
||||
.svn
|
||||
.gitk-tmp.*
|
||||
Object/
|
||||
doxygen/API/
|
||||
doxygen/ALL/
|
||||
bin/
|
||||
gen/
|
||||
linux/
|
||||
obj/
|
||||
out/
|
||||
Sources/ewolAndroidAbstraction.cpp
|
||||
|
||||
###################################
|
||||
# backup files
|
||||
@@ -32,10 +25,6 @@ obj/
|
||||
*.so
|
||||
*.pyc
|
||||
tags
|
||||
edn
|
||||
out
|
||||
edn_debug
|
||||
edn_release
|
||||
|
||||
###################################
|
||||
# Packages #
|
||||
|
@@ -7,4 +7,4 @@
|
||||
# location of the SDK. This is only used by Ant
|
||||
# For customization when using a Version Control System, please read the
|
||||
# header note.
|
||||
sdk.dir=/home/heero/dev/perso/android/sdk-r15
|
||||
sdk.dir=/home/heero/dev/perso/android/sdk
|
@@ -8,4 +8,4 @@
|
||||
# project structure.
|
||||
|
||||
# Project target.
|
||||
target=Google Inc.:Google APIs:13
|
||||
target=android-15
|
Before Width: | Height: | Size: 6.4 KiB After Width: | Height: | Size: 6.4 KiB |
50
Makefile
@@ -3,57 +3,13 @@
|
||||
### Some Preject properties : ###
|
||||
###############################################################################
|
||||
|
||||
PROJECT_PATH=$(shell pwd)
|
||||
ifeq ($(PLATFORM), Linux)
|
||||
PROJECT_NDK?=$(PROJECT_PATH)/../ewol/
|
||||
else ifeq ($(PLATFORM), Android)
|
||||
PROJECT_NDK?=$(PROJECT_PATH)/../android/ndk-r7/
|
||||
PROJECT_SDK?=$(PROJECT_PATH)/../android/sdk-r15/
|
||||
endif
|
||||
|
||||
|
||||
PROJECT_MODULE?=$(PROJECT_PATH)/../
|
||||
|
||||
EWOL_FOLDER=$(PROJECT_MODULE)ewol
|
||||
|
||||
# group name or constructor ... (no dot, no MAJ no Numerical char)
|
||||
PROJECT_VENDOR=heeroyui
|
||||
# Binary name ... (no dot, no MAJ no Numerical char)
|
||||
PROJECT_NAME=edn
|
||||
|
||||
#dependence of the librairies :
|
||||
#PROJECT_LIB_DEPENDENCY= ewol
|
||||
|
||||
PROJECT_FILE_DIRECTORY=jni
|
||||
|
||||
# get the tag of the current project :
|
||||
PROJECT_VERSION_TAG=$(shell git describe --tags)
|
||||
#$(info Project version TAG : $(PROJECT_VERSION_TAG))
|
||||
|
||||
PROJECT_VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
||||
#$(info Project version TAG Short: $(PROJECT_VERSION_TAG_SHORT))
|
||||
|
||||
# enable or disable debug :
|
||||
DEBUG:=1
|
||||
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
PROJECT_CXXFLAGS = -DPROJECT_DEBUG_LEVEL=1
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_NDEBUG
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
||||
else
|
||||
PROJECT_CXXFLAGS = -DPROJECT_DEBUG_LEVEL=3
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||
endif
|
||||
PROJECT_CXXFLAGS+= -DPROJECT_VERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
|
||||
PROJECT_CXXFLAGS+= -I$(EWOL_FOLDER)/Sources/
|
||||
|
||||
PROJECT_LDFLAGS= -L$(EWOL_FOLDER)
|
||||
|
||||
#include the specific platefom makefile
|
||||
include $(EWOL_FOLDER)/Build/Makefile.$(PLATFORM).mk
|
||||
USER_PACKAGES=$(shell pwd)/Sources/
|
||||
|
||||
# include basic makefile for EWOL
|
||||
include $(shell pwd)/../ewol/Build/Makefile.mk
|
||||
|
||||
|
340
Makefile_old
@@ -1,340 +0,0 @@
|
||||
##################################################################################################################
|
||||
# #
|
||||
# Fichier : Makefile #
|
||||
# #
|
||||
# Type : Makefile d'un programme complet #
|
||||
# #
|
||||
# Auteur : Heero Yui #
|
||||
# #
|
||||
# Evolutions : Date Auteur Raison #
|
||||
# 2010-01-29 Heero Yui Mise en place d'un makefile ultra simple #
|
||||
# 2011-07-14 Heero Yui Rework the current dorder includion (simplification) #
|
||||
# #
|
||||
# Notes : This makefile might be edited with an editor compatible with escape char and carrer return #
|
||||
# char #
|
||||
# #
|
||||
# Concu Pour le projet edn #
|
||||
# #
|
||||
##################################################################################################################
|
||||
export F_GRAS=[1m
|
||||
export F_INVERSER=[7m
|
||||
export F_SOUSLIGNER=[4m
|
||||
export F_NORMALE=[m
|
||||
export F_NOIR=[31m
|
||||
export F_ROUGE=[31m
|
||||
export F_VERT=[32m
|
||||
export F_MARRON=[33m
|
||||
export F_BLUE=[34m
|
||||
export F_VIOLET=[35m
|
||||
export F_CYAN=[36m
|
||||
export F_GRIS=[37m
|
||||
export CADRE_HAUT_BAS=' $(F_INVERSER) $(F_NORMALE)'
|
||||
export CADRE_COTERS='
|
||||
$(F_INVERSER) $(F_NORMALE) $(F_INVERSER) $(F_NORMALE)'
|
||||
|
||||
VERSION_TAG=$(shell git describe --tags)
|
||||
#$(info $(VERSION_TAG))
|
||||
|
||||
VERSION_TAG_SHORT=$(shell git describe --tags --abbrev=0)
|
||||
#$(info $(VERSION_TAG_SHORT))
|
||||
|
||||
VERSION_BUILD_TIME=$(shell date)
|
||||
#$(info $(VERSION_BUILD_TIME))
|
||||
|
||||
###############################################################################
|
||||
### Compilateur base system ###
|
||||
###############################################################################
|
||||
CXX=g++
|
||||
CC=gcc
|
||||
AR=ar
|
||||
|
||||
DEBUG:=1
|
||||
|
||||
###############################################################################
|
||||
### Compilation Define ###
|
||||
###############################################################################
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
DEFINE= -DEDN_DEBUG_LEVEL=1 -DNDEBUG -DVERSION_TAG_NAME="\"$(VERSION_TAG)-release\""
|
||||
else
|
||||
DEFINE= -DEDN_DEBUG_LEVEL=3 -DVERSION_TAG_NAME="\"$(VERSION_TAG)-debug\""
|
||||
endif
|
||||
DEFINE+= -DVERSION_BUILD_TIME="\"$(VERSION_BUILD_TIME)\""
|
||||
|
||||
GTKFLAGS=
|
||||
ifeq ($(shell if `pkg-config --exists gtk+-3.0` ; then echo "yes"; else echo "no"; fi), yes)
|
||||
GTKFLAGS= `pkg-config --cflags --libs gtk+-3.0` -DUSE_GTK_VERSION_3_0
|
||||
else
|
||||
ifeq ($(shell if `pkg-config --exists gtk+-2.0` ; then echo "yes"; else echo "no"; fi), yes)
|
||||
GTKFLAGS= `pkg-config --cflags --libs gtk+-2.0` -DUSE_GTK_VERSION_2_0
|
||||
else
|
||||
$(error No GTK 3.0 or 2.0 librairies ...)
|
||||
endif
|
||||
endif
|
||||
|
||||
###############################################################################
|
||||
### Basic Cfags ###
|
||||
###############################################################################
|
||||
|
||||
# basic GTK librairy
|
||||
CXXFLAGS= $(GTKFLAGS)
|
||||
# Linux thread system
|
||||
CXXFLAGS+= -lpthread
|
||||
# Enable debug (cgdb edn)
|
||||
CXXFLAGS+= -g -O0
|
||||
#CXXFLAGS+= -O2
|
||||
# display all flags
|
||||
CXXFLAGS+= -Wall
|
||||
# ...
|
||||
CXXFLAGS+= -D_REENTRANT
|
||||
# internal defines
|
||||
CXXFLAGS+= $(DEFINE)
|
||||
|
||||
CFLAGS= $(CXXFLAGS) -std=c99
|
||||
|
||||
# basic GTK librairy
|
||||
LDFLAGS= $(GTKFLAGS)
|
||||
# Linux thread system
|
||||
LDFLAGS+= -lpthread
|
||||
# Dynamic connection of the CALLBACK of the GUI
|
||||
LDFLAGS+= -Wl,--export-dynamic
|
||||
|
||||
###############################################################################
|
||||
### Project Name ###
|
||||
###############################################################################
|
||||
PROG_NAME=edn
|
||||
|
||||
###############################################################################
|
||||
### Basic Project description Files ###
|
||||
###############################################################################
|
||||
FILE_DIRECTORY=Sources
|
||||
OUTPUT_NAME_RELEASE=$(PROG_NAME)_release
|
||||
OUTPUT_NAME_DEBUG=$(PROG_NAME)_debug
|
||||
OBJECT_DIR=Object
|
||||
|
||||
ifeq ("$(DEBUG)", "0")
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/release
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_RELEASE)
|
||||
else
|
||||
OBJECT_DIRECTORY=$(OBJECT_DIR)/debug
|
||||
OUTPUT_NAME = $(OUTPUT_NAME_DEBUG)
|
||||
endif
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Generique dependency ###
|
||||
###############################################################################
|
||||
MAKE_DEPENDENCE=Makefile
|
||||
|
||||
###############################################################################
|
||||
### Files Listes ###
|
||||
###############################################################################
|
||||
|
||||
# tiny XML (extern OPEN Sources) :
|
||||
CXXFILES = tools/tinyXML/tinyxml.cpp \
|
||||
tools/tinyXML/tinyxmlparser.cpp \
|
||||
tools/tinyXML/tinyxmlerror.cpp \
|
||||
tools/tinyXML/tinystr.cpp
|
||||
|
||||
# ExuberantCtags reading file tools (extern OPEN Sources) :
|
||||
CXXFILES+= ctags/readtags.cpp \
|
||||
ctags/CTagsManager.cpp
|
||||
|
||||
|
||||
# Globals debug tool:
|
||||
CXXFILES+= tools/debug/tools_debug.cpp \
|
||||
tools/globals/tools_globals.cpp \
|
||||
tools/memory/toolsMemory.cpp
|
||||
|
||||
# Buffers internal:
|
||||
CXXFILES+= tools/EdnTemplate/EdnVectorBuf.cpp \
|
||||
tools/EdnBuf/EdnBuf.cpp \
|
||||
tools/EdnBuf/EdnBuf_HighLight.cpp \
|
||||
tools/EdnBuf/EdnBuf_History.cpp \
|
||||
tools/EdnBuf/EdnBuf_Selection.cpp \
|
||||
tools/EdnBuf/EdnBufHistory.cpp
|
||||
|
||||
|
||||
# Tools internal:
|
||||
CXXFILES+= tools/Display/Display.cpp \
|
||||
tools/ClipBoard/ClipBoard.cpp \
|
||||
tools/MsgBroadcast/MsgBroadcast.cpp \
|
||||
tools/MsgBroadcast/AccelKey.cpp \
|
||||
tools/charset/charsetTable.cpp \
|
||||
tools/charset/charset.cpp \
|
||||
tools/NameSpaceEdn/File.cpp \
|
||||
tools/NameSpaceEdn/String.cpp \
|
||||
tools/NameSpaceEdn/RegExp.cpp
|
||||
|
||||
# Gui:
|
||||
CXXFILES+= CustumWidget/BufferView/BufferView.cpp \
|
||||
CustumWidget/CodeView/CodeView.cpp \
|
||||
GuiTools/WindowsManager/WindowsManager.cpp \
|
||||
GuiTools/MainWindows/MainWindows.cpp \
|
||||
GuiTools/MainWindows/StatusBar.cpp \
|
||||
GuiTools/MainWindows/MenuBar.cpp \
|
||||
GuiTools/MainWindows/ToolBar.cpp \
|
||||
GuiTools/Search/Search.cpp \
|
||||
GuiTools/Search/SearchData.cpp
|
||||
|
||||
# Basic Interface :
|
||||
CXXFILES+= Buffer/Buffer.cpp \
|
||||
Buffer/BufferText.cpp \
|
||||
Buffer/BufferEmpty.cpp \
|
||||
Buffer/BufferManager.cpp \
|
||||
Colorize/Colorize.cpp \
|
||||
Colorize/ColorizeManager.cpp \
|
||||
Highlight/HighlightPattern.cpp \
|
||||
Highlight/Highlight.cpp \
|
||||
Highlight/HighlightManager.cpp
|
||||
|
||||
# Main entry file :
|
||||
CXXFILES+= init.cpp
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Liste of folder where .h can be ###
|
||||
###############################################################################
|
||||
LISTE_MODULES = $(dir $(CXXFILES))
|
||||
INCLUDE_DIRECTORY = $(addprefix -I$(FILE_DIRECTORY)/, $(LISTE_MODULES))
|
||||
|
||||
###############################################################################
|
||||
### Build Object Files List ###
|
||||
###############################################################################
|
||||
OBJ = $(addprefix $(OBJECT_DIRECTORY)/, $(CXXFILES:.cpp=.o))
|
||||
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Main Part of Makefile ###
|
||||
###############################################################################
|
||||
all: build
|
||||
|
||||
-include $(OBJ:.o=.d)
|
||||
|
||||
build: .encadrer .versionFile $(OUTPUT_NAME)
|
||||
|
||||
|
||||
.encadrer:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo '
|
||||
DEBUT DE COMPILATION DU PROGRAMME :'$(CADRE_COTERS)
|
||||
@echo '
|
||||
Repertoire Sources : $(FILE_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
|
||||
Repertoire object : $(OBJECT_DIRECTORY)/'$(CADRE_COTERS)
|
||||
@echo '
|
||||
Binaire de sortie : $(F_VIOLET)$(OUTPUT_NAME) $(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@mkdir -p $(addprefix $(OBJECT_DIRECTORY)/, $(LISTE_MODULES))
|
||||
|
||||
|
||||
FILE_IMAGES= data/imagesSources/*.png
|
||||
|
||||
|
||||
.versionFile :
|
||||
@rm -f $(OBJECT_DIRECTORY)/GuiTools/WindowsManager/WindowsManager.o
|
||||
|
||||
|
||||
# Tool used to create a binary version of every element png or other needed by the application
|
||||
pngToCpp: tools/pngToCpp/pngToCpp.c
|
||||
@echo $(F_ROUGE)"
|
||||
(bin) $@"$(F_NORMALE)
|
||||
@$(CXX) $< -o $@
|
||||
@strip -s $@
|
||||
|
||||
# Generate basic
|
||||
$(FILE_DIRECTORY)/GuiTools/myImage.cpp: $(FILE_IMAGES) $(MAKE_DEPENDENCE) pngToCpp
|
||||
@echo $(F_BLUE)"
|
||||
(.cpp) *.png ==> $@"$(F_NORMALE)
|
||||
@./pngToCpp $@ $(FILE_IMAGES)
|
||||
|
||||
|
||||
# build C++
|
||||
$(OBJECT_DIRECTORY)/%.o: $(FILE_DIRECTORY)/%.cpp $(MAKE_DEPENDENCE)
|
||||
@echo $(F_VERT)"
|
||||
(.o) $<"$(F_NORMALE)
|
||||
@$(CXX) $< -c -o $@ $(INCLUDE_DIRECTORY) $(CXXFLAGS) -MMD
|
||||
|
||||
# build binary Release Mode
|
||||
$(OUTPUT_NAME_RELEASE): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
|
||||
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $(PROG_NAME)
|
||||
|
||||
# build binary Debug Mode
|
||||
$(OUTPUT_NAME_DEBUG): $(OBJ) $(MAKE_DEPENDENCE)
|
||||
@echo $(F_ROUGE)"
|
||||
(bin) $@ "$(F_NORMALE)
|
||||
@$(CXX) $(OBJ) $(LDFLAGS) -o $@
|
||||
@cp $@ $(PROG_NAME)
|
||||
|
||||
clean:
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' CLEANING : $(F_VIOLET)$(OUTPUT_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo Remove Folder : $(OBJECT_DIR)
|
||||
@rm -rf $(OBJECT_DIR)
|
||||
@echo Remove File : $(PROG_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@rm -f $(PROG_NAME) $(OUTPUT_NAME_DEBUG) $(OUTPUT_NAME_RELEASE)
|
||||
@echo Remove File : pngToCpp
|
||||
@rm -f pngToCpp
|
||||
@echo Remove File : $(FILE_DIRECTORY)/GuiTools/myImage.*
|
||||
@rm -f $(FILE_DIRECTORY)/GuiTools/myImage.*
|
||||
@echo Remove doxygen files : doxygen/*
|
||||
@rm -rf doxygen
|
||||
@rm -f doxygen.log
|
||||
@echo Remove temporary files *.bck
|
||||
@rm -f `find . -name "*.bck"`
|
||||
|
||||
count:
|
||||
wc -l Makefile `find $(FILE_DIRECTORY)/ -name "*.cpp"` `find $(FILE_DIRECTORY)/ -name "*.h"`
|
||||
|
||||
install: .encadrer .versionFile $(OUTPUT_NAME_RELEASE)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo ' INSTALL : $(F_VIOLET)$(OUTPUT_NAME_RELEASE)=>$(PROG_NAME)$(F_NORMALE)'$(CADRE_COTERS)
|
||||
@echo $(CADRE_HAUT_BAS)
|
||||
@echo $(F_ROUGE)"
|
||||
(stripped) $(OUTPUT_NAME_RELEASE) => $(PROG_NAME) "$(F_NORMALE)
|
||||
@cp $(OUTPUT_NAME_RELEASE) $(PROG_NAME)
|
||||
@strip -s $(PROG_NAME)
|
||||
@echo $(F_VERT)"
|
||||
(copy) $(PROG_NAME) /usr/bin/ "$(F_NORMALE)
|
||||
@cp -vf $(PROG_NAME) /usr/bin/
|
||||
@echo $(F_VERT)"
|
||||
(data) data/* ==> /usr/share/edn/ "$(F_NORMALE)
|
||||
@mkdir -p /usr/share/edn/
|
||||
@rm -rf /usr/share/edn/*
|
||||
@cp -vf data/*.xml /usr/share/edn/
|
||||
@mkdir -p /usr/share/edn/images/
|
||||
@cp -vf data/imagesSources/icone.png /usr/share/edn/images/
|
||||
@cp -vf data/imagesSources/delete-24px.png /usr/share/edn/images/
|
||||
# gnome adding for the program at the list (manage icone in .xpm)
|
||||
@cp -vf data/edn.desktop /usr/share/applications/
|
||||
@cp -vf data/imagesSources/icone.png /usr/share/app-install/icons/Edn.png
|
||||
@cp -vf data/imagesSources/icone.xpm /usr/share/pixmaps/Edn.xpm
|
||||
|
||||
|
||||
# http://alp.developpez.com/tutoriels/debian/creer-paquet/
|
||||
package: .encadrer
|
||||
@echo 'Create Folders ...'
|
||||
@mkdir -p package/$(PROG_NAME)/DEBIAN/
|
||||
@mkdir -p package/$(PROG_NAME)/usr/bin/
|
||||
@mkdir -p package/$(PROG_NAME)/usr/share/doc/
|
||||
@mkdir -p package/$(PROG_NAME)/usr/share/edn/
|
||||
# Create the control file
|
||||
@echo "Package: "$(PROG_NAME) > package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Version: "$(VERSION_TAG_SHORT) >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Section: Development,Editors" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Priority: optional" >>package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Architecture: all" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Depends: bash" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Maintainer: Mr DUPIN Edouard <yui.heero@gmail.com>" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "Description: Text editor for sources code with ctags management" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
@echo "" >> package/$(PROG_NAME)/DEBIAN/control
|
||||
# Create the PostRm
|
||||
@echo "#!/bin/bash" > package/$(PROG_NAME)/DEBIAN/postrm
|
||||
@echo "rm ~/."$(PROG_NAME) >> package/$(PROG_NAME)/DEBIAN/postrm
|
36
README.md
@@ -10,19 +10,45 @@ Instructions
|
||||
|
||||
download the software :
|
||||
|
||||
mkdir yourDevFolder
|
||||
cd yourDevFolder
|
||||
git clone git://github.com/HeeroYui/ewol.git
|
||||
cd ewol
|
||||
git submodule init
|
||||
git submodule update
|
||||
cd ..
|
||||
git clone git://github.com/HeeroYui/edn.git
|
||||
cd edn
|
||||
|
||||
Compile software and install :
|
||||
(debug) Compile software & Run debug version:
|
||||
|
||||
sudo make DEBUG=0 install
|
||||
make DEBUG=1
|
||||
or
|
||||
make CLANG=1 DEBUG=1
|
||||
./out_LINUX/debug/obj/usr/bin/edn -l6 yourFile.txt
|
||||
Note : -l6 corespond at the LOG level to display
|
||||
|
||||
Run Software :
|
||||
(release) Compile software & install & run:
|
||||
|
||||
make
|
||||
./install.sh
|
||||
edn exemple.txt
|
||||
|
||||
License
|
||||
=======
|
||||
(Android) Compile software & install
|
||||
|
||||
cd yourDevFolder
|
||||
mkdir andoid
|
||||
cd android
|
||||
download here in "sdk" and "ndk" the coresponding SDK and NDK of Android:
|
||||
http://developer.android.com/tools/sdk/ndk/index.html
|
||||
http://developer.android.com/sdk/index.html
|
||||
==> you need to download sub package of the NDK (refer to the NDK doccumentation) but only supported android version >4.0
|
||||
cd ../edn
|
||||
make PLATFORM=Android
|
||||
make PLATFORM=Android install
|
||||
|
||||
License (like GPL)
|
||||
==================
|
||||
|
||||
You can:
|
||||
- Redistribute the sources code and binaries.
|
||||
|
43
Sources/Android.mk
Normal file
@@ -0,0 +1,43 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
||||
# name of the librairy
|
||||
LOCAL_MODULE := ednpackage
|
||||
|
||||
# get the tag of the current project :
|
||||
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
|
||||
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
|
||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
||||
|
||||
# name of the dependency
|
||||
LOCAL_STATIC_LIBRARIES := ewol
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(addprefix $(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST))))
|
||||
|
||||
LOCAL_SRC_FILES := ewolAndroidAbstraction.cpp \
|
||||
$(FILE_LIST)
|
||||
|
||||
LOCAL_LDLIBS := -llog -landroid
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
LOCAL_CFLAGS := -D__MODE__Touch \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\"" \
|
||||
-DAPPL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\""
|
||||
else
|
||||
LOCAL_CFLAGS := -D__MODE__Touch \
|
||||
-DMODE_RELEASE \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\"" \
|
||||
-DAPPL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\""
|
||||
endif
|
||||
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
||||
NDK_MODULE_PATH := $(LOCAL_PATH)/../../
|
||||
|
||||
|
||||
$(call import-module,ewol/Sources)
|
40
Sources/Linux.mk
Normal file
@@ -0,0 +1,40 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
||||
# name of the librairy
|
||||
LOCAL_MODULE := edn
|
||||
|
||||
# get the tag of the current project :
|
||||
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
|
||||
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
|
||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
||||
|
||||
# name of the dependency
|
||||
LOCAL_STATIC_LIBRARIES := ewol
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(addprefix $(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST))))
|
||||
|
||||
LOCAL_SRC_FILES := $(FILE_LIST)
|
||||
|
||||
|
||||
LOCAL_LDLIBS :=
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
LOCAL_CFLAGS := -DPROJECT_NAME="\"$(LOCAL_MODULE)\"" \
|
||||
-DAPPL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\""
|
||||
else
|
||||
LOCAL_CFLAGS := -DMODE_RELEASE \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\"" \
|
||||
-DAPPL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\""
|
||||
endif
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
NDK_MODULE_PATH := $(LOCAL_PATH)/../../
|
||||
|
||||
|
||||
$(call import-module,ewol/Sources)
|
40
Sources/Windows.mk
Normal file
@@ -0,0 +1,40 @@
|
||||
LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
||||
# name of the librairy
|
||||
LOCAL_MODULE := edn
|
||||
|
||||
# get the tag of the current project :
|
||||
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
|
||||
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
|
||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
||||
|
||||
# name of the dependency
|
||||
LOCAL_STATIC_LIBRARIES := ewol
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(addprefix $(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST))))
|
||||
|
||||
LOCAL_SRC_FILES := $(FILE_LIST)
|
||||
|
||||
|
||||
LOCAL_LDLIBS :=
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
LOCAL_CFLAGS := -DPROJECT_NAME="\"$(LOCAL_MODULE)\"" \
|
||||
-DAPPL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\""
|
||||
else
|
||||
LOCAL_CFLAGS := -DMODE_RELEASE \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\"" \
|
||||
-DAPPL_VERSION_TAG_NAME="\"$(LOCAL_VERSION_TAG_SHORT)-$(BUILD_DIRECTORY_MODE)\""
|
||||
endif
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
NDK_MODULE_PATH := $(LOCAL_PATH)/../../
|
||||
|
||||
|
||||
$(call import-module,ewol/Sources)
|
136
Sources/appl/Buffer/Buffer.cpp
Normal file
@@ -0,0 +1,136 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Buffer.c
|
||||
* @brief Editeur De N'ours : Text Buffer
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <Buffer.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "Buffer"
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Buffer::Buffer()
|
||||
{
|
||||
static int32_t fileBasicID = 0;
|
||||
m_updatePositionRequested = false;
|
||||
m_fileModify = true;
|
||||
m_haveName = false;
|
||||
etk::UString mString = "Untitle - ";
|
||||
mString += fileBasicID++;
|
||||
SetFileName(mString);
|
||||
m_haveName = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Buffer::Buffer(etk::File &newName)
|
||||
{
|
||||
m_fileModify = false;
|
||||
SetFileName(newName);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
Buffer::~Buffer(void)
|
||||
{
|
||||
|
||||
}
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool Buffer::IsModify(void)
|
||||
{
|
||||
return m_fileModify;
|
||||
}
|
||||
|
||||
void Buffer::SetModify(bool status)
|
||||
{
|
||||
if (status != m_fileModify) {
|
||||
m_fileModify = status;
|
||||
// TODO : Remove from here
|
||||
etk::UString data = "Modify";
|
||||
ewol::EObjectMessageMultiCast::AnonymousSend(ednMsgBufferState, data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool Buffer::NeedToUpdateDisplayPosition(void)
|
||||
{
|
||||
bool tmpVal = m_updatePositionRequested;
|
||||
m_updatePositionRequested = false;
|
||||
return tmpVal;
|
||||
}
|
||||
|
||||
Vector2D<float> Buffer::GetBorderSize(void)
|
||||
{
|
||||
Vector2D<float> tmpVal;
|
||||
tmpVal.x = 30;
|
||||
tmpVal.y = 30;
|
||||
return tmpVal;
|
||||
}
|
||||
|
||||
|
||||
Vector2D<float> Buffer::GetPosition(int32_t fontId,bool& centerRequested)
|
||||
{
|
||||
centerRequested = false;
|
||||
Vector2D<float> tmpVal;
|
||||
tmpVal.x = 0;
|
||||
tmpVal.y = 0;
|
||||
return tmpVal;
|
||||
}
|
@@ -28,7 +28,6 @@
|
||||
|
||||
#include <etk/UString.h>
|
||||
#include <etk/File.h>
|
||||
#include <Display.h>
|
||||
#include <etk/unicode.h>
|
||||
#include <ewol/ewol.h>
|
||||
|
||||
@@ -73,45 +72,60 @@ class Buffer {
|
||||
return m_haveName;
|
||||
}
|
||||
|
||||
virtual void Save(void);
|
||||
virtual void Save(void) {};
|
||||
bool IsModify(void);
|
||||
protected:
|
||||
void SetModify(bool status);
|
||||
virtual void NameChange(void) { /*EDN_DEBUG("check name change ==> no HL change possible");*/};
|
||||
virtual void NameChange(void) { /*APPL_DEBUG("check name change ==> no HL change possible");*/};
|
||||
public:
|
||||
virtual void GetInfo(infoStatBuffer_ts &infoToUpdate);
|
||||
virtual void SetLineDisplay(uint32_t lineNumber);
|
||||
virtual void GetInfo(infoStatBuffer_ts &infoToUpdate) {};
|
||||
virtual void SetLineDisplay(uint32_t lineNumber) {};
|
||||
|
||||
virtual int32_t Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
ewol::OObject2DTextColored& OOTextBold,
|
||||
ewol::OObject2DTextColored& OOTextItalic,
|
||||
ewol::OObject2DTextColored& OOTextBoldItalic,
|
||||
ewol::OObject2DColored& OOColored, int32_t offsetX, int32_t offsetY, int32_t sizeX, int32_t sizeY);
|
||||
virtual void AddChar(uniChar_t unicodeData);
|
||||
virtual void cursorMove(ewol::eventKbMoveType_te moveTypeEvent);
|
||||
virtual void MouseSelectFromCursorTo(int32_t fontId, int32_t width, int32_t height);
|
||||
virtual void MouseEvent(int32_t fontId, int32_t width, int32_t height);
|
||||
virtual void MouseEventDouble(void);
|
||||
virtual void MouseEventTriple(void);
|
||||
virtual void RemoveLine(void);
|
||||
virtual void SelectAll(void);
|
||||
virtual void SelectNone(void);
|
||||
virtual void Undo(void);
|
||||
virtual void Redo(void);
|
||||
ewol::OObject2DColored& OOColored, int32_t offsetX, int32_t offsetY, int32_t sizeX, int32_t sizeY)
|
||||
{
|
||||
return ERR_NONE;
|
||||
}
|
||||
virtual void AddChar(uniChar_t unicodeData) {};
|
||||
virtual void cursorMove(ewol::eventKbMoveType_te moveTypeEvent) {};
|
||||
virtual void MouseSelectFromCursorTo(int32_t fontId, int32_t width, int32_t height) {};
|
||||
virtual void MouseEvent(int32_t fontId, int32_t width, int32_t height) {};
|
||||
virtual void MouseEventDouble(void) {};
|
||||
virtual void MouseEventTriple(void) {};
|
||||
virtual void RemoveLine(void) {};
|
||||
virtual void SelectAll(void) {};
|
||||
virtual void SelectNone(void) {};
|
||||
virtual void Undo(void) {};
|
||||
virtual void Redo(void) {};
|
||||
virtual void SetCharset(unicode::charset_te newCharset) {};
|
||||
|
||||
//virtual void SelectAll(void);
|
||||
virtual void Copy(int8_t clipboardID);
|
||||
virtual void Cut(int8_t clipboardID);
|
||||
virtual void Paste(int8_t clipboardID);
|
||||
virtual void Search(etk::UString &data, bool back, bool caseSensitive, bool wrap, bool regExp);
|
||||
virtual void Replace(etk::UString &data);
|
||||
virtual int32_t FindLine(etk::UString &data);
|
||||
virtual void JumpAtLine(int32_t newLine);
|
||||
virtual int32_t GetCurrentLine(void);
|
||||
virtual void Copy(int8_t clipboardID) {};
|
||||
virtual void Cut(int8_t clipboardID) {};
|
||||
virtual void Paste(int8_t clipboardID) {};
|
||||
virtual void Search(etk::UString &data, bool back, bool caseSensitive, bool wrap, bool regExp) {};
|
||||
virtual void Replace(etk::UString &data) {};
|
||||
virtual int32_t FindLine(etk::UString &data) { return 0; };
|
||||
virtual void JumpAtLine(int32_t newLine) {};
|
||||
virtual int32_t GetCurrentLine(void) { return 0; };
|
||||
|
||||
virtual int32_t GetNumberOfLine(void) { return 1; };
|
||||
|
||||
// moving with cursor change position:
|
||||
private:
|
||||
bool m_updatePositionRequested; //!< if a position xhange in the windows ...
|
||||
Vector2D<float> m_maximumSize; //!< current maxSize of the buffer
|
||||
protected:
|
||||
void RequestUpdateOfThePosition(void) { m_updatePositionRequested = true; };
|
||||
void SetMaximumSize(Vector2D<float> maxSize) { m_maximumSize = maxSize; };
|
||||
public:
|
||||
bool NeedToUpdateDisplayPosition(void);
|
||||
virtual Vector2D<float> GetBorderSize(void); // this is to requested the minimum size for the buffer that is not consider as visible ...
|
||||
virtual Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
Vector2D<float> GetMaxSize(void) { return m_maximumSize; };
|
||||
protected:
|
||||
bool m_fileModify; //!<
|
||||
// naming
|
@@ -23,8 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferEmpty.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <MainWindows.h>
|
||||
@@ -79,9 +79,9 @@ int32_t BufferEmpty::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
int32_t fontId = OOTextNormal.GetFontID();
|
||||
int32_t letterHeight = ewol::GetHeight(fontId);
|
||||
|
||||
coord2D_ts textPos;
|
||||
Vector2D<float> textPos;
|
||||
textPos.x = 20;
|
||||
textPos.y = 20;
|
||||
textPos.y = sizeY - 20 - letterHeight;
|
||||
|
||||
myColor = ColorizeManager::Get("normal");
|
||||
OOTextBold.SetColor(myColor->GetFG());
|
||||
@@ -90,17 +90,11 @@ int32_t BufferEmpty::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
|
||||
myColor = ColorizeManager::Get("commentDoxygen");
|
||||
OOTextNormal.SetColor(myColor->GetFG());
|
||||
textPos.y = (int32_t)(textPos.y + letterHeight*1.30);
|
||||
textPos.y = (int32_t)(textPos.y - letterHeight*1.30);
|
||||
tmpDisplay = "No Buffer Availlable to display";
|
||||
OOTextNormal.Text(textPos, tmpDisplay);
|
||||
|
||||
|
||||
color_ts bgColor; //!< Text color
|
||||
bgColor.red = 1.0;
|
||||
bgColor.green = 1.0;
|
||||
bgColor.blue = 1.0;
|
||||
bgColor.alpha = 1.0;
|
||||
OOColored.SetColor(bgColor);
|
||||
OOColored.SetColor(etk::color::white);
|
||||
OOColored.Rectangle( 0, 0, sizeX, sizeY);
|
||||
|
||||
return ERR_NONE;
|
@@ -24,8 +24,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
#include <ewol/EObjectManager.h>
|
||||
@@ -39,7 +39,16 @@ class classBufferManager: public ewol::EObject
|
||||
// Constructeur
|
||||
classBufferManager(void);
|
||||
~classBufferManager(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
|
||||
*/
|
||||
const char * const GetObjectType(void)
|
||||
{
|
||||
return "ApplBufferManager";
|
||||
}
|
||||
public:
|
||||
/**
|
||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||
@@ -71,7 +80,7 @@ class classBufferManager: public ewol::EObject
|
||||
|
||||
private:
|
||||
|
||||
etk::VectorType<Buffer*> listBuffer; //!< element List of the char Elements
|
||||
etk::Vector<Buffer*> listBuffer; //!< element List of the char Elements
|
||||
|
||||
void RemoveAll(void); //!< remove all buffer
|
||||
int32_t m_idSelected;
|
||||
@@ -79,7 +88,6 @@ class classBufferManager: public ewol::EObject
|
||||
};
|
||||
|
||||
|
||||
|
||||
// Constructeur
|
||||
/**
|
||||
* @brief
|
||||
@@ -113,12 +121,12 @@ classBufferManager::classBufferManager(void)
|
||||
classBufferManager::~classBufferManager(void)
|
||||
{
|
||||
//clean All Buffer
|
||||
EDN_INFO("~classBufferManager::RemoveAll();");
|
||||
APPL_INFO("~classBufferManager::RemoveAll();");
|
||||
RemoveAll();
|
||||
// clear The list of Buffer
|
||||
EDN_INFO("~classBufferManager::listBuffer.Clear();");
|
||||
APPL_INFO("~classBufferManager::listBuffer.Clear();");
|
||||
listBuffer.Clear();
|
||||
EDN_INFO("~classBufferManager::delete(BufferNotExiste);");
|
||||
APPL_INFO("~classBufferManager::delete(BufferNotExiste);");
|
||||
delete(BufferNotExiste);
|
||||
}
|
||||
|
||||
@@ -137,15 +145,15 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
if (eventId == ednMsgBufferId) {
|
||||
// select a new buffer ID :
|
||||
if (data == "") {
|
||||
EDN_ERROR("Request select buffer ID = \"\" ");
|
||||
APPL_ERROR("Request select buffer ID = \"\" ");
|
||||
} else {
|
||||
int32_t newID = -1;
|
||||
sscanf(data.Utf8Data(), "%d", &newID);
|
||||
sscanf(data.c_str(), "%d", &newID);
|
||||
if(true == Exist(newID)) {
|
||||
m_idSelected = newID;
|
||||
} else {
|
||||
m_idSelected = -1;
|
||||
EDN_ERROR("Request a non existant ID : " << newID << " reset to -1...");
|
||||
APPL_ERROR("Request a non existant ID : " << newID << " reset to -1...");
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednMsgGuiNew) {
|
||||
@@ -163,11 +171,14 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
m_idSelected = newOne;
|
||||
SendMultiCast(ednMsgBufferId, m_idSelected);
|
||||
SendMultiCast(ednMsgBufferListChange);
|
||||
} else {
|
||||
// TODO : notify user that we can not open the request file...
|
||||
APPL_ERROR("Can not open the file : \"" << myFile << "\"");
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednMsgGuiSave) {
|
||||
if (data == "") {
|
||||
EDN_ERROR("Null data for close file ... ");
|
||||
APPL_ERROR("Null data for close file ... ");
|
||||
} else {
|
||||
if (data == "current") {
|
||||
// Check buffer existence
|
||||
@@ -181,9 +192,9 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
}
|
||||
} else {
|
||||
int32_t newId;
|
||||
sscanf(data.Utf8Data(), "%d", &newId);
|
||||
sscanf(data.c_str(), "%d", &newId);
|
||||
if (false == Exist(newId)) {
|
||||
EDN_ERROR("Request a save As with a non existant ID=" << newId);
|
||||
APPL_ERROR("Request a save As with a non existant ID=" << newId);
|
||||
} else {
|
||||
// If no name ==> request a Gui display ...
|
||||
if (Get(newId)->HaveName() == false) {
|
||||
@@ -197,7 +208,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
}
|
||||
} else if (eventId == ednMsgGuiClose) {
|
||||
if (data == "") {
|
||||
EDN_ERROR("Null data for close file ... ");
|
||||
APPL_ERROR("Null data for close file ... ");
|
||||
} else {
|
||||
if (data == "All") {
|
||||
|
||||
@@ -205,11 +216,11 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
int32_t closeID = -1;
|
||||
if (data == "current") {
|
||||
closeID = m_idSelected;
|
||||
EDN_DEBUG("Close specific buffer ID" << closeID);
|
||||
APPL_DEBUG("Close specific buffer ID" << closeID);
|
||||
} else {
|
||||
// close specific buffer ...
|
||||
sscanf(data.Utf8Data(), "%d", &closeID);
|
||||
EDN_DEBUG("Close specific buffer ID="<< closeID);
|
||||
sscanf(data.c_str(), "%d", &closeID);
|
||||
APPL_DEBUG("Close specific buffer ID="<< closeID);
|
||||
}
|
||||
if(true == Exist(closeID)) {
|
||||
// Get the new display buffer
|
||||
@@ -232,28 +243,28 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
}
|
||||
}
|
||||
// set it to the currect display
|
||||
SendMultiCast(ednMsgBufferId, destBuffer);
|
||||
m_idSelected = destBuffer;
|
||||
SendMultiCast(ednMsgBufferId, destBuffer);
|
||||
}
|
||||
// Remove requested buffer
|
||||
Remove(closeID);
|
||||
SendMultiCast(ednMsgBufferListChange);
|
||||
} else {
|
||||
EDN_ERROR("Request Close of a non existant ID : " << closeID);
|
||||
APPL_ERROR("Request Close of a non existant ID : " << closeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednMsgCodeViewSelectedId) {
|
||||
//Change the selected buffer
|
||||
if (data == "") {
|
||||
EDN_ERROR("Null data for changing buffer ID file ... ");
|
||||
APPL_ERROR("Null data for changing buffer ID file ... ");
|
||||
} else {
|
||||
int32_t newId;
|
||||
sscanf(data.Utf8Data(), "%d", &newId);
|
||||
sscanf(data.c_str(), "%d", &newId);
|
||||
if (true == Exist(newId)) {
|
||||
m_idSelected = newId;
|
||||
} else {
|
||||
EDN_ERROR("code biew request the selection of an non -existant buffer ==> reset to -1");
|
||||
APPL_ERROR("code biew request the selection of an non -existant buffer ==> reset to -1");
|
||||
m_idSelected = -1;
|
||||
}
|
||||
SendMultiCast(ednMsgBufferId, m_idSelected);
|
||||
@@ -267,7 +278,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
if(true == Exist(dataID)) {
|
||||
// If no name ==> request a Gui display ...
|
||||
if (Get(dataID)->HaveName() == false) {
|
||||
SendMessage(EDN_MSG__GUI_SHOW_SAVE_AS, dataID);
|
||||
SendMessage(APPL_MSG__GUI_SHOW_SAVE_AS, dataID);
|
||||
} else {
|
||||
Get(dataID)->Save();
|
||||
}
|
||||
@@ -333,12 +344,16 @@ int32_t classBufferManager::Create(void)
|
||||
*/
|
||||
int32_t classBufferManager::Open(etk::File &myFile)
|
||||
{
|
||||
// TODO : Check here if the file is already open ==> and display it if needed
|
||||
// allocate a new Buffer
|
||||
Buffer *myBuffer = new BufferText(myFile);
|
||||
// Add at the list of element
|
||||
listBuffer.PushBack(myBuffer);
|
||||
return listBuffer.Size() - 1;
|
||||
if (false == Exist(myFile)) {
|
||||
// allocate a new Buffer
|
||||
Buffer *myBuffer = new BufferText(myFile);
|
||||
// Add at the list of element
|
||||
listBuffer.PushBack(myBuffer);
|
||||
return listBuffer.Size() - 1;
|
||||
} else {
|
||||
// the buffer already existed ==> we open it ...
|
||||
return GetId(myFile);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -355,10 +370,10 @@ Buffer * classBufferManager::Get(int32_t BufferID)
|
||||
if (NULL != listBuffer[BufferID]) {
|
||||
return listBuffer[BufferID];
|
||||
} else {
|
||||
EDN_ERROR("non existing Buffer " << BufferID);
|
||||
APPL_ERROR("non existing Buffer " << BufferID);
|
||||
}
|
||||
} else {
|
||||
EDN_ERROR("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.Size());
|
||||
APPL_ERROR("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.Size());
|
||||
}
|
||||
return BufferNotExiste;
|
||||
}
|
||||
@@ -445,7 +460,7 @@ bool classBufferManager::Remove(int32_t BufferID)
|
||||
// TODO : Check if it saved...
|
||||
/*
|
||||
if (false == IsSaved(BufferID) ) {
|
||||
EDN_INFO("Buffer " << BufferID << " : Not Saved", BufferID);
|
||||
APPL_INFO("Buffer " << BufferID << " : Not Saved", BufferID);
|
||||
}
|
||||
*/
|
||||
// Delete the Buffer
|
||||
@@ -456,11 +471,11 @@ bool classBufferManager::Remove(int32_t BufferID)
|
||||
*/
|
||||
return true;
|
||||
} else {
|
||||
EDN_INFO("non existing Buffer " << BufferID);
|
||||
APPL_INFO("non existing Buffer " << BufferID);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
EDN_INFO("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.Size());
|
||||
APPL_INFO("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.Size());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -514,7 +529,7 @@ void BufferManager::UnInit(void)
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return;
|
||||
}
|
||||
ewol::EObjectManager::MarkToRemoved(localManager);
|
||||
delete(localManager);
|
||||
localManager = NULL;
|
||||
}
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include <Buffer.h>
|
||||
#include <BufferText.h>
|
||||
#include <BufferEmpty.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/Widget.h>
|
||||
|
||||
namespace BufferManager
|
@@ -23,11 +23,9 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <ClipBoard.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferText.h>
|
||||
#include <toolsMemory.h>
|
||||
#include <etk/RegExp.h>
|
||||
#include <etk/unicode.h>
|
||||
|
||||
@@ -36,6 +34,7 @@
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <ewol/Widget.h>
|
||||
#include <ewol/Font.h>
|
||||
#include <ewol/ClipBoard.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
@@ -67,6 +66,7 @@ void BufferText::BasicInit(void)
|
||||
//m_cursorMode = CURSOR_DISPLAY_MODE_NORMAL;
|
||||
m_displaySize.x = 200;
|
||||
m_displaySize.y = 20;
|
||||
m_centerRequested = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ void BufferText::BasicInit(void)
|
||||
void BufferText::NameChange(void)
|
||||
{
|
||||
// Find HL system
|
||||
//EDN_DEBUG("check name change");
|
||||
//APPL_DEBUG("check name change");
|
||||
if (true == HighlightManager::Exist(m_fileName)) {
|
||||
Highlight * myHL = HighlightManager::Get(m_fileName);
|
||||
// Set the new HL
|
||||
@@ -105,7 +105,7 @@ BufferText::BufferText()
|
||||
{
|
||||
BasicInit();
|
||||
SetModify(true);
|
||||
EDN_INFO("New(Empty-Buffer)");
|
||||
APPL_INFO("New(Empty-Buffer)");
|
||||
}
|
||||
|
||||
|
||||
@@ -121,11 +121,11 @@ BufferText::BufferText(etk::File &fileName) : Buffer(fileName)
|
||||
{
|
||||
BasicInit();
|
||||
NameChange();
|
||||
EDN_INFO("Add Data from file(" << GetFileName() << ")");
|
||||
APPL_INFO("Add Data from file(" << GetFileName() << ")");
|
||||
FILE * myFile = NULL;
|
||||
// try to open the file. if not existed, new file
|
||||
|
||||
myFile = fopen(fileName.GetCompleateName().Utf8Data(), "r");
|
||||
myFile = fopen(fileName.GetCompleateName().c_str(), "r");
|
||||
if (NULL != myFile) {
|
||||
m_EdnBuf.DumpFrom(myFile);
|
||||
// close the input file
|
||||
@@ -133,10 +133,10 @@ BufferText::BufferText(etk::File &fileName) : Buffer(fileName)
|
||||
SetModify(false);
|
||||
} else {
|
||||
// fichier inexistant... creation d'un nouveaux
|
||||
EDN_WARNING("No File ==> created a new one(" << GetFileName() << ")");
|
||||
APPL_WARNING("No File ==> created a new one(" << GetFileName() << ")");
|
||||
SetModify(true);
|
||||
}
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
|
||||
|
||||
@@ -150,15 +150,15 @@ BufferText::BufferText(etk::File &fileName) : Buffer(fileName)
|
||||
*/
|
||||
void BufferText::Save(void)
|
||||
{
|
||||
EDN_INFO("Save File : \"" << GetFileName() << "\"" );
|
||||
APPL_INFO("Save File : \"" << GetFileName() << "\"" );
|
||||
FILE * myFile = NULL;
|
||||
myFile = fopen(GetFileName().GetCompleateName().Utf8Data(), "w");
|
||||
myFile = fopen(GetFileName().GetCompleateName().c_str(), "w");
|
||||
if (NULL != myFile) {
|
||||
m_EdnBuf.DumpIn(myFile);
|
||||
fclose(myFile);
|
||||
SetModify(false);
|
||||
} else {
|
||||
EDN_ERROR("Can not open in writing the specify file");
|
||||
APPL_ERROR("Can not open in writing the specify file");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -174,7 +174,7 @@ void BufferText::Save(void)
|
||||
*/
|
||||
BufferText::~BufferText(void)
|
||||
{
|
||||
EDN_INFO("Delete(BufferText)");
|
||||
APPL_INFO("Delete(BufferText)");
|
||||
}
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ void BufferText::DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObjec
|
||||
OOColored->Rectangle( 0, positionY, sizeX+0.5*SEPARATION_SIZE_LINE_NUMBER, sizeY);
|
||||
OOText->SetColor(ColorizeManager::Get(COLOR_CODE_LINE_NUMBER));
|
||||
|
||||
coord2D_ts textPos;
|
||||
Vector2D<float> textPos;
|
||||
textPos.x = 1;
|
||||
textPos.y = positionY;
|
||||
etk::UString tmppp = tmpLineNumber;
|
||||
@@ -225,7 +225,7 @@ void BufferText::DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObjec
|
||||
#define CURSOR_THICKNESS (1.2)
|
||||
void BufferText::DrawCursor(ewol::OObject2DColored* OOColored, int32_t x, int32_t y, int32_t letterHeight, int32_t letterWidth, clipping_ts &clip)
|
||||
{
|
||||
color_ts & tmpppppp = ColorizeManager::Get(COLOR_CODE_CURSOR);
|
||||
etk::Color & tmpppppp = ColorizeManager::Get(COLOR_CODE_CURSOR);
|
||||
OOColored->SetColor(tmpppppp);
|
||||
if (true == ewol::IsSetInsert()) {
|
||||
OOColored->Rectangle( x, y, letterWidth, letterHeight);
|
||||
@@ -250,16 +250,16 @@ int32_t BufferText::GetLineNumberNumberOfElement(void)
|
||||
int32_t nbColoneForLineNumber = 1;
|
||||
// get the number of line in the buffer
|
||||
int32_t maxNumberLine = m_EdnBuf.NumberOfLines();
|
||||
if (10 > maxNumberLine) { nbColoneForLineNumber = 1;
|
||||
} else if (100 > maxNumberLine) { nbColoneForLineNumber = 2;
|
||||
} else if (1000 > maxNumberLine) { nbColoneForLineNumber = 3;
|
||||
} else if (10000 > maxNumberLine) { nbColoneForLineNumber = 4;
|
||||
} else if (100000 > maxNumberLine) { nbColoneForLineNumber = 5;
|
||||
} else if (1000000 > maxNumberLine) { nbColoneForLineNumber = 6;
|
||||
} else if (1000000 > maxNumberLine) { nbColoneForLineNumber = 7;
|
||||
} else if (10000000 > maxNumberLine) { nbColoneForLineNumber = 8;
|
||||
} else if (100000000 > maxNumberLine) { nbColoneForLineNumber = 9;
|
||||
} else { nbColoneForLineNumber = 10;
|
||||
if (10 > maxNumberLine) { nbColoneForLineNumber = 1;
|
||||
} else if (100 > maxNumberLine) { nbColoneForLineNumber = 2;
|
||||
} else if (1000 > maxNumberLine) { nbColoneForLineNumber = 3;
|
||||
} else if (10000 > maxNumberLine) { nbColoneForLineNumber = 4;
|
||||
} else if (100000 > maxNumberLine) { nbColoneForLineNumber = 5;
|
||||
} else if (1000000 > maxNumberLine) { nbColoneForLineNumber = 6;
|
||||
} else if (10000000 > maxNumberLine) { nbColoneForLineNumber = 7;
|
||||
} else if (100000000 > maxNumberLine) { nbColoneForLineNumber = 8;
|
||||
} else if (1000000000 > maxNumberLine) { nbColoneForLineNumber = 9;
|
||||
} else { nbColoneForLineNumber = 10;
|
||||
}
|
||||
return nbColoneForLineNumber;
|
||||
}
|
||||
@@ -293,29 +293,32 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
int32_t letterWidth = ewol::GetWidth(fontId, "A");
|
||||
int32_t letterHeight = ewol::GetHeight(fontId);
|
||||
|
||||
int32_t displayStartLineId = offsetY / letterHeight;
|
||||
int32_t displayStartLineId = offsetY / letterHeight - 1;
|
||||
displayStartLineId = etk_max(0, displayStartLineId);
|
||||
uint32_t y = - offsetY + displayStartLineId*letterHeight;
|
||||
|
||||
// update the display position with the scroll ofset :
|
||||
int32_t displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, displayStartLineId);
|
||||
|
||||
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;
|
||||
EDN_VERBOSE("main DIPLAY " << m_displaySize.x << " char * " << m_displaySize.y << " char");
|
||||
APPL_VERBOSE("main DIPLAY " << m_displaySize.x << " char * " << m_displaySize.y << " char");
|
||||
|
||||
selHave = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, selStart, selEnd, selIsRect, selRectStart, selRectEnd);
|
||||
selHave = m_EdnBuf.GetSelectionPos(selStart, selEnd, selIsRect, selRectStart, selRectEnd);
|
||||
|
||||
colorInformation_ts * HLColor = NULL;
|
||||
|
||||
uint32_t y = 0;
|
||||
int32_t iii, new_i;
|
||||
// Get color :
|
||||
Colorize * myColor = ColorizeManager::Get("normal");
|
||||
Colorize * myColorSel = ColorizeManager::Get("SelectedText");
|
||||
color_ts & myColorSpace = ColorizeManager::Get(COLOR_CODE_SPACE);
|
||||
color_ts & myColorTab = ColorizeManager::Get(COLOR_CODE_TAB);
|
||||
etk::Color & myColorSpace = ColorizeManager::Get(COLOR_CODE_SPACE);
|
||||
etk::Color & myColorTab = ColorizeManager::Get(COLOR_CODE_TAB);
|
||||
Colorize * selectColor = NULL;
|
||||
ewol::OObject2DTextColored* OOTextSelected = NULL;
|
||||
|
||||
@@ -326,23 +329,26 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
OOColored.SetColor(ColorizeManager::Get(COLOR_CODE_BASIC_BG));
|
||||
OOColored.Rectangle( 0, 0, sizeX, sizeY);
|
||||
|
||||
int64_t startTime = GetCurrentTime();
|
||||
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 = GetCurrentTime();
|
||||
EDN_DEBUG("Parsing Highlight = " << stopTime - startTime << " milli-s");
|
||||
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;
|
||||
EDN_VERBOSE("Start display of text buffer [" << displayStartBufferPos<< ".." << mylen << "]");
|
||||
EDN_VERBOSE("cursor Pos : " << m_cursorPos << "start at pos=" << displayStartBufferPos);
|
||||
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;
|
||||
|
||||
OOTextNormal.clippingDisable();
|
||||
OOColored.clippingDisable();
|
||||
@@ -367,14 +373,15 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
OOTextBoldItalic.clippingSet(drawClippingTextArea);
|
||||
OOColored.clippingSet(drawClippingTextArea);
|
||||
|
||||
float lineMaxSize = 0.0;
|
||||
for (iii=displayStartBufferPos; iii<mylen && displayLines < m_displaySize.y ; iii = new_i) {
|
||||
//EDN_DEBUG("diplay element=" << iii);
|
||||
//APPL_DEBUG("diplay element=" << iii);
|
||||
int displaywidth;
|
||||
uint32_t currentChar = '\0';
|
||||
new_i = iii;
|
||||
displaywidth = m_EdnBuf.GetExpandedChar(new_i, idX, displayChar, currentChar);
|
||||
int32_t drawSize = 0;
|
||||
//EDN_INFO("diplay element=" << new_i);
|
||||
//APPL_INFO("diplay element=" << new_i);
|
||||
if (currentChar!='\n') {
|
||||
selectColor = myColor;
|
||||
HLColor = m_EdnBuf.GetElementColorAtPosition(m_displayLocalSyntax, iii);
|
||||
@@ -407,7 +414,7 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
haveBg = selectColor->HaveBg();
|
||||
}
|
||||
}
|
||||
coord2D_ts textPos;
|
||||
Vector2D<float> textPos;
|
||||
textPos.x = pixelX-offsetX;
|
||||
textPos.y = y;
|
||||
if (true == selectColor->GetItalic() ) {
|
||||
@@ -438,12 +445,15 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
// 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;
|
||||
y -= letterHeight;
|
||||
displayLines++;
|
||||
currentLineID++;
|
||||
OOTextNormal.clippingDisable();
|
||||
@@ -457,9 +467,10 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
if (m_cursorPos == iii) {
|
||||
DrawCursor(&OOColored, pixelX - offsetX, y, letterHeight, letterWidth, drawClippingTextArea);
|
||||
}
|
||||
|
||||
int64_t stopTime2 = GetCurrentTime();
|
||||
EDN_DEBUG("DRAW text (brut) = " << stopTime2 - stopTime << " milli-s");
|
||||
// set the maximum size for the display ...
|
||||
SetMaximumSize(maxSize);
|
||||
int64_t stopTime2 = ewol::GetTime();
|
||||
APPL_DEBUG("DRAW text (brut) = " << stopTime2 - stopTime << " micro-s");
|
||||
|
||||
return ERR_NONE;
|
||||
}
|
||||
@@ -491,11 +502,11 @@ int32_t BufferText::GetMousePosition(int32_t fontId, int32_t width, int32_t heig
|
||||
int32_t pixelX = 0;
|
||||
int32_t startLinePosition = m_EdnBuf.CountForwardNLines(0, lineOffset);
|
||||
if (width <= 0) {
|
||||
EDN_DEBUG(" Element : Befor the start of the line ... ==> END");
|
||||
APPL_DEBUG(" Element : Befor the start of the line ... ==> END");
|
||||
return startLinePosition;
|
||||
}
|
||||
EDN_VERBOSE("Get id element : x=" << width << "px y=" << height << "px");
|
||||
EDN_VERBOSE(" line offset = " << lineOffset);
|
||||
APPL_VERBOSE("Get id element : x=" << width << "px y=" << height << "px");
|
||||
APPL_VERBOSE(" line offset = " << lineOffset);
|
||||
for (iii=startLinePosition; iii<mylen; iii = new_i) {
|
||||
int displaywidth;
|
||||
uint32_t currentChar = '\0';
|
||||
@@ -503,21 +514,21 @@ int32_t BufferText::GetMousePosition(int32_t fontId, int32_t width, int32_t heig
|
||||
displaywidth = m_EdnBuf.GetExpandedChar(new_i, idX, displayChar, currentChar);
|
||||
if (currentChar!='\n') {
|
||||
int32_t drawSize = ewol::GetWidth(fontId, displayChar);
|
||||
EDN_VERBOSE(" Element : " << currentChar << "=\"" << (char)currentChar << "\" display offset=" << pixelX << "px width=" << drawSize << "px");
|
||||
APPL_VERBOSE(" Element : " << currentChar << "=\"" << (char)currentChar << "\" display offset=" << pixelX << "px width=" << drawSize << "px");
|
||||
pixelX += drawSize;
|
||||
if (width <= pixelX) {
|
||||
EDN_VERBOSE(" Find IT ==> END");
|
||||
APPL_VERBOSE(" Find IT ==> END");
|
||||
// find position ...
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
EDN_VERBOSE(" Element : \"\\n\" display width=---px ==> end of line ==> END");
|
||||
APPL_VERBOSE(" Element : \"\\n\" display width=---px ==> end of line ==> END");
|
||||
// end of line ... exit cycle
|
||||
break;
|
||||
}
|
||||
idX += displaywidth;
|
||||
}
|
||||
EDN_VERBOSE("BufferText::GetMousePosition(" << width << "," << height << "); ==> " << iii );
|
||||
APPL_VERBOSE("BufferText::GetMousePosition(" << width << "," << height << "); ==> " << iii );
|
||||
return iii;
|
||||
}
|
||||
|
||||
@@ -545,9 +556,9 @@ void BufferText::MouseEvent(int32_t fontId, int32_t width, int32_t height)
|
||||
/*if (m_cursorPreferredCol < 0) {
|
||||
m_cursorPreferredCol = posX;
|
||||
}*/
|
||||
m_EdnBuf.Unselect(SELECTION_PRIMARY);
|
||||
m_EdnBuf.Unselect();
|
||||
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -569,8 +580,8 @@ void BufferText::MouseSelectFromCursorTo(int32_t fontId, int32_t width, int32_t
|
||||
|
||||
int32_t selStart, selEnd, selRectStart, selRectEnd;
|
||||
bool selIsRect;
|
||||
int32_t selHave = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, selStart, selEnd, selIsRect, selRectStart, selRectEnd);
|
||||
//EDN_DEBUG("BufferText:: " << selHave << " = BufGetSelectionPos(SELECTION_PRIMARY," << selStart << "," << selEnd << "," << selIsRect << "," << selRectStart << "," << selRectEnd << ");" );
|
||||
int32_t selHave = m_EdnBuf.GetSelectionPos(selStart, selEnd, selIsRect, selRectStart, selRectEnd);
|
||||
//APPL_DEBUG("BufferText:: " << selHave << " = BufGetSelectionPos(SELECTION_PRIMARY," << selStart << "," << selEnd << "," << selIsRect << "," << selRectStart << "," << selRectEnd << ");" );
|
||||
int32_t rememberCursorPos = m_cursorPos;
|
||||
// move the cursor
|
||||
SetInsertPosition(newPos);
|
||||
@@ -581,15 +592,16 @@ void BufferText::MouseSelectFromCursorTo(int32_t fontId, int32_t width, int32_t
|
||||
}*/
|
||||
|
||||
if (false == selHave) {
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, rememberCursorPos, m_cursorPos);
|
||||
m_EdnBuf.Select(rememberCursorPos, m_cursorPos);
|
||||
} else {
|
||||
if (rememberCursorPos == selStart) {
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, m_cursorPos, selEnd);
|
||||
m_EdnBuf.Select(m_cursorPos, selEnd);
|
||||
} else {
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, selStart, m_cursorPos);
|
||||
m_EdnBuf.Select(selStart, m_cursorPos);
|
||||
}
|
||||
}
|
||||
RequestPositionUpdate();
|
||||
Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
|
||||
|
||||
@@ -606,9 +618,10 @@ void BufferText::MouseEventDouble(void)
|
||||
{
|
||||
int32_t beginPos, endPos;
|
||||
if (true == m_EdnBuf.SelectAround(m_cursorPos, beginPos, endPos)) {
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, beginPos, endPos);
|
||||
m_EdnBuf.Select(beginPos, endPos);
|
||||
m_cursorPos = endPos;
|
||||
}
|
||||
Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
// no else
|
||||
}
|
||||
|
||||
@@ -622,8 +635,9 @@ void BufferText::MouseEventDouble(void)
|
||||
*/
|
||||
void BufferText::MouseEventTriple(void)
|
||||
{
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, m_EdnBuf.StartOfLine(m_cursorPos), m_EdnBuf.EndOfLine(m_cursorPos));
|
||||
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);
|
||||
}
|
||||
|
||||
void BufferText::RemoveLine(void)
|
||||
@@ -632,18 +646,19 @@ void BufferText::RemoveLine(void)
|
||||
int32_t stop = m_EdnBuf.EndOfLine(m_cursorPos);
|
||||
m_EdnBuf.Remove(start, stop+1);
|
||||
SetInsertPosition(start);
|
||||
SetModify(true);
|
||||
SetModify(true);
|
||||
}
|
||||
|
||||
void BufferText::SelectAll(void)
|
||||
{
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, 0, m_EdnBuf.Size());
|
||||
m_EdnBuf.Select(0, m_EdnBuf.Size());
|
||||
m_cursorPos = m_EdnBuf.Size();
|
||||
Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
}
|
||||
|
||||
void BufferText::SelectNone(void)
|
||||
{
|
||||
m_EdnBuf.Unselect(SELECTION_PRIMARY);
|
||||
m_EdnBuf.Unselect();
|
||||
}
|
||||
|
||||
|
||||
@@ -659,13 +674,13 @@ void BufferText::SetInsertPosition(int32_t newPos, bool insertChar)
|
||||
{
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
int32_t rememberCursorPos = m_cursorPos;
|
||||
|
||||
//EDN_DEBUG("newPos=" << newPos);
|
||||
//APPL_DEBUG("newPos=" << newPos);
|
||||
|
||||
// unselect buffer:
|
||||
m_EdnBuf.Unselect(SELECTION_PRIMARY);
|
||||
m_EdnBuf.Unselect();
|
||||
/* make sure new position is ok, do nothing if it hasn't changed */
|
||||
if (newPos != m_cursorPos) {
|
||||
if (newPos < 0){
|
||||
@@ -683,19 +698,19 @@ void BufferText::SetInsertPosition(int32_t newPos, bool insertChar)
|
||||
return;
|
||||
}
|
||||
|
||||
if( false == haveSelectionActive
|
||||
&& true == ewol::IsSetShift() )
|
||||
if( false == haveSelectionActive
|
||||
&& true == ewol::IsSetShift() )
|
||||
{
|
||||
// new selection
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, rememberCursorPos, m_cursorPos);
|
||||
} else if( true == ewol::IsSetShift()
|
||||
&& true == haveSelectionActive)
|
||||
m_EdnBuf.Select(rememberCursorPos, m_cursorPos);
|
||||
} else if( true == ewol::IsSetShift()
|
||||
&& true == haveSelectionActive)
|
||||
{
|
||||
// update selection
|
||||
if (rememberCursorPos == SelectionStart) {
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, m_cursorPos, SelectionEnd);
|
||||
m_EdnBuf.Select(m_cursorPos, SelectionEnd);
|
||||
} else {
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, SelectionStart, m_cursorPos);
|
||||
m_EdnBuf.Select(SelectionStart, m_cursorPos);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -720,10 +735,10 @@ bool BufferText::TextDMoveUp(int32_t offset)
|
||||
|
||||
// Get the previous line
|
||||
prevLineStartPos = m_EdnBuf.CountBackwardNLines(lineStartPos, offset);
|
||||
//EDN_INFO("Move Line UP result : prevLineStartPos=" << prevLineStartPos);
|
||||
//APPL_INFO("Move Line UP result : prevLineStartPos=" << prevLineStartPos);
|
||||
// Get the display char position
|
||||
newPos = m_EdnBuf.CountForwardDispChars(prevLineStartPos, column);
|
||||
//EDN_INFO("Move to colomn : column=" << column << " newPos=" << newPos);
|
||||
//APPL_INFO("Move to colomn : column=" << column << " newPos=" << newPos);
|
||||
|
||||
// move the cursor
|
||||
SetInsertPosition(newPos);
|
||||
@@ -754,10 +769,10 @@ bool BufferText::TextDMoveDown(int32_t offset)
|
||||
}
|
||||
// get the next line :
|
||||
nextLineStartPos = m_EdnBuf.CountForwardNLines(lineStartPos, offset);
|
||||
//EDN_INFO("Move Line DOWN result : nextLineStartPos=" << nextLineStartPos);
|
||||
//APPL_INFO("Move Line DOWN result : nextLineStartPos=" << nextLineStartPos);
|
||||
// Get the display char position
|
||||
newPos = m_EdnBuf.CountForwardDispChars(nextLineStartPos, column);
|
||||
//EDN_INFO("Move to colomn : column=" << column << " newPos=" << newPos);
|
||||
//APPL_INFO("Move to colomn : column=" << column << " newPos=" << newPos);
|
||||
|
||||
SetInsertPosition(newPos);
|
||||
// if a preferred column wasn't aleady established, establish it
|
||||
@@ -782,49 +797,49 @@ void BufferText::cursorMove(ewol::eventKbMoveType_te moveTypeEvent)
|
||||
// check selection event ...
|
||||
switch(moveTypeEvent) {
|
||||
case ewol::EVENT_KB_MOVE_TYPE_LEFT:
|
||||
//EDN_INFO("keyEvent : <LEFT>");
|
||||
//APPL_INFO("keyEvent : <LEFT>");
|
||||
if (m_cursorPos > 0) {
|
||||
SetInsertPosition(m_cursorPos - 1);
|
||||
}
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_RIGHT:
|
||||
//EDN_INFO("keyEvent : <RIGHT>");
|
||||
//APPL_INFO("keyEvent : <RIGHT>");
|
||||
if (m_cursorPos < m_EdnBuf.Size() ) {
|
||||
SetInsertPosition(m_cursorPos + 1);
|
||||
}
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_UP:
|
||||
//EDN_INFO("keyEvent : <UP>");
|
||||
//APPL_INFO("keyEvent : <UP>");
|
||||
TextDMoveUp(1);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_DOWN:
|
||||
//EDN_INFO("keyEvent : <DOWN>");
|
||||
//APPL_INFO("keyEvent : <DOWN>");
|
||||
// check if we have enought line ...
|
||||
TextDMoveDown(1);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_PAGE_UP:
|
||||
//EDN_INFO("keyEvent : <PAGE-UP>");
|
||||
//APPL_INFO("keyEvent : <PAGE-UP>");
|
||||
TextDMoveUp(m_displaySize.y);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_PAGE_DOWN:
|
||||
//EDN_INFO("keyEvent : <PAGE-DOWN>");
|
||||
//APPL_INFO("keyEvent : <PAGE-DOWN>");
|
||||
TextDMoveDown(m_displaySize.y);
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_START:
|
||||
//EDN_INFO("keyEvent : <Start of line>");
|
||||
//APPL_INFO("keyEvent : <Start of line>");
|
||||
SetInsertPosition(m_EdnBuf.StartOfLine(m_cursorPos) );
|
||||
break;
|
||||
case ewol::EVENT_KB_MOVE_TYPE_END:
|
||||
//EDN_INFO("keyEvent : <End of line>");
|
||||
//APPL_INFO("keyEvent : <End of line>");
|
||||
SetInsertPosition(m_EdnBuf.EndOfLine(m_cursorPos) );
|
||||
break;
|
||||
default:
|
||||
//LastUpDownCursorPosition = -1;
|
||||
//LastUpDownoutputPosition = -1;
|
||||
needUpdatePosition = false;
|
||||
break;
|
||||
}
|
||||
if ( true == needUpdatePosition) {
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -837,81 +852,49 @@ void BufferText::cursorMove(ewol::eventKbMoveType_te moveTypeEvent)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool BufferText::RequestPositionRequest(coord2D_ts& newPos)
|
||||
Vector2D<float> BufferText::GetPosition(int32_t fontId, bool& centerRequested)
|
||||
{
|
||||
if (-1 == m_requestDisplayPos.x || -1 == m_requestDisplayPos.y) {
|
||||
return false;
|
||||
}
|
||||
newPos = m_requestDisplayPos;
|
||||
m_requestDisplayPos.x = -1;
|
||||
m_requestDisplayPos.y = -1;
|
||||
return true;
|
||||
}
|
||||
centerRequested = m_centerRequested;
|
||||
m_centerRequested = false;
|
||||
Vector2D<float> outputPosition;
|
||||
|
||||
// Display position (Y mode):
|
||||
APPL_INFO("change the position : " << m_cursorPos);
|
||||
// get the line id of the curent position of the cursor :
|
||||
outputPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
|
||||
// get the first position of the current line
|
||||
int32_t lineStartPos = m_EdnBuf.StartOfLine(m_cursorPos);
|
||||
// count the number of char in the line (real displayed char with whar like <kjkj>)
|
||||
outputPosition.x = m_EdnBuf.CountDispChars(lineStartPos, m_cursorPos);
|
||||
APPL_INFO("Curent cursor pos=" << outputPosition);
|
||||
|
||||
// get font porperties :
|
||||
// TODO : change this :
|
||||
float letterWidth = ewol::GetWidth(fontId, "A");
|
||||
float letterHeight = ewol::GetHeight(fontId);
|
||||
outputPosition.x *= letterWidth;
|
||||
outputPosition.y *= letterHeight;
|
||||
return outputPosition;
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void BufferText::RequestPositionUpdate(bool centerPage)
|
||||
{
|
||||
m_requestDisplayPos.x = -1;
|
||||
m_requestDisplayPos.y = -1;
|
||||
#if 0
|
||||
if (centerPage == false) {
|
||||
/*
|
||||
// Display position (Y mode):
|
||||
//EDN_INFO("BufferText::RequestPositionUpdate() m_displayStart(" << m_displayStartPixelX << "px," << m_displayStartLineId << "id) m_displaySize(" << m_displaySize.x << "," <<m_displaySize.y << ")");
|
||||
coord2D_ts cursorPosition;
|
||||
cursorPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
|
||||
int32_t lineStartPos = m_EdnBuf.StartOfLine(m_cursorPos);
|
||||
cursorPosition.x = m_EdnBuf.CountDispChars(lineStartPos, m_cursorPos);
|
||||
//EDN_INFO("BufferText::RequestPositionUpdate() curent cursor position : (" << cursorPosition.x << "," << cursorPosition.y << ")");
|
||||
|
||||
if (m_displayStartLineId > (int32_t)cursorPosition.y - globals::getNbLineBorder() ) {
|
||||
m_displayStartLineId = cursorPosition.y - globals::getNbLineBorder();
|
||||
if (m_displayStartLineId < 0) {
|
||||
m_displayStartLineId = 0;
|
||||
}
|
||||
} else if (m_displayStartLineId + m_displaySize.y <= (int32_t)cursorPosition.y + globals::getNbLineBorder() ) {
|
||||
m_displayStartLineId = cursorPosition.y - m_displaySize.y + globals::getNbLineBorder() + 1;
|
||||
}
|
||||
// Display position (X mode):
|
||||
//EDN_INFO("cursorPosition X : " << cursorPosition.y << " windows " << m_displayStartLineId << "=>" << m_displayStartPixelX + m_displaySize.x);
|
||||
if (m_displayStartPixelX > cursorPosition.x - globals::getNbColoneBorder() ) {
|
||||
m_displayStartPixelX = cursorPosition.x - globals::getNbColoneBorder();
|
||||
if (m_displayStartPixelX < 0) {
|
||||
m_displayStartPixelX = 0;
|
||||
}
|
||||
} else if (m_displayStartPixelX + m_displaySize.x <= cursorPosition.x + globals::getNbColoneBorder() ) {
|
||||
m_displayStartPixelX = cursorPosition.x - m_displaySize.x + globals::getNbColoneBorder() + 1;
|
||||
}
|
||||
|
||||
//update the buffer position ID :
|
||||
m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStartLineId);
|
||||
*/
|
||||
/* if we request a center :
|
||||
} else {
|
||||
// center the line at the middle of the screen :
|
||||
coord2D_ts cursorPosition;
|
||||
//EDN_DEBUG(" -------------------------------------------------");
|
||||
cursorPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
|
||||
//EDN_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << cursorPosition.y);
|
||||
cursorPosition.x = 0;
|
||||
Vector2D<float> outputPosition;
|
||||
//APPL_DEBUG(" -------------------------------------------------");
|
||||
outputPosition.y = m_EdnBuf.CountLines(0, m_cursorPos);
|
||||
//APPL_DEBUG(" cursor position : " << m_cursorPos << " ==> ligne=" << outputPosition.y);
|
||||
outputPosition.x = 0;
|
||||
|
||||
m_displayStartPixelX = 0;
|
||||
//EDN_DEBUG(" display size : " << m_displaySize.y);
|
||||
m_displayStartLineId = cursorPosition.y - m_displaySize.y/2;
|
||||
//APPL_DEBUG(" display size : " << m_displaySize.y);
|
||||
m_displayStartLineId = outputPosition.y - m_displaySize.y/2;
|
||||
m_displayStartLineId = edn_max(m_displayStartLineId, 0);
|
||||
|
||||
m_displayStartBufferPos = m_EdnBuf.CountForwardNLines(0, m_displayStartLineId);
|
||||
//EDN_DEBUG(" display start : " << m_displayStartPixelX << "x" << m_displayStartLineId);
|
||||
//EDN_DEBUG(" -------------------------------------------------");
|
||||
//APPL_DEBUG(" display start : " << m_displayStartPixelX << "x" << m_displayStartLineId);
|
||||
//APPL_DEBUG(" -------------------------------------------------");
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
@@ -927,10 +910,10 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
{
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
if (unicodeData == 0x09) {
|
||||
if (false == haveSelectionActive) {
|
||||
etk::VectorType<int8_t> tmpVect;
|
||||
etk::Vector<int8_t> tmpVect;
|
||||
tmpVect.PushBack(0x09);
|
||||
m_EdnBuf.Insert(m_cursorPos, tmpVect);
|
||||
SetInsertPosition(m_cursorPos+1, true);
|
||||
@@ -939,20 +922,20 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
// count the number of line :
|
||||
int32_t nbSelectedLines = m_EdnBuf.CountLines(SelectionStart, SelectionEnd);
|
||||
if (0 == nbSelectedLines) {
|
||||
etk::VectorType<int8_t> tmpVect;
|
||||
etk::Vector<int8_t> tmpVect;
|
||||
tmpVect.PushBack(0x09);
|
||||
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, tmpVect);
|
||||
m_EdnBuf.ReplaceSelected(tmpVect);
|
||||
SetInsertPosition(SelectionStart+tmpVect.Size(), true);
|
||||
} else {
|
||||
if (true == ewol::IsSetShift() ) {
|
||||
m_cursorPos = m_EdnBuf.UnIndent(SELECTION_PRIMARY);
|
||||
m_cursorPos = m_EdnBuf.UnIndent();
|
||||
} else {
|
||||
m_cursorPos = m_EdnBuf.Indent(SELECTION_PRIMARY);
|
||||
m_cursorPos = m_EdnBuf.Indent();
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (unicodeData == '\n') {
|
||||
etk::VectorType<int8_t> tmpVect;
|
||||
etk::Vector<int8_t> tmpVect;
|
||||
if (true == ewol::IsSetShift()) {
|
||||
tmpVect.PushBack('\r');
|
||||
} else {
|
||||
@@ -983,24 +966,24 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
m_EdnBuf.Insert(m_cursorPos, tmpVect);
|
||||
SetInsertPosition(m_cursorPos+tmpVect.Size(), true);
|
||||
} else {
|
||||
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, tmpVect);
|
||||
m_EdnBuf.ReplaceSelected(tmpVect);
|
||||
SetInsertPosition(SelectionStart+tmpVect.Size(), true);
|
||||
}
|
||||
} else if (unicodeData == 0x7F ) {
|
||||
//EDN_INFO("keyEvent : <Suppr> pos=" << m_cursorPos);
|
||||
//APPL_INFO("keyEvent : <Suppr> pos=" << m_cursorPos);
|
||||
if (false == haveSelectionActive) {
|
||||
m_EdnBuf.Remove(m_cursorPos, m_cursorPos+1);
|
||||
} else {
|
||||
m_EdnBuf.RemoveSelected(SELECTION_PRIMARY);
|
||||
m_EdnBuf.RemoveSelected();
|
||||
SetInsertPosition(SelectionStart, true);
|
||||
}
|
||||
} else if (unicodeData == 0x08) {
|
||||
//EDN_INFO("keyEvent : <Del> pos=" << m_cursorPos);
|
||||
//APPL_INFO("keyEvent : <Del> pos=" << m_cursorPos);
|
||||
if (false == haveSelectionActive) {
|
||||
m_EdnBuf.Remove(m_cursorPos-1, m_cursorPos);
|
||||
SetInsertPosition(m_cursorPos-1, true);
|
||||
} else {
|
||||
m_EdnBuf.RemoveSelected(SELECTION_PRIMARY);
|
||||
m_EdnBuf.RemoveSelected();
|
||||
SetInsertPosition(SelectionStart, true);
|
||||
}
|
||||
} else {
|
||||
@@ -1008,14 +991,14 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
if (true == m_EdnBuf.GetUTF8Mode()) {
|
||||
char tmpUTF8[16];
|
||||
unicode::convertUnicodeToUtf8(unicodeData, tmpUTF8);
|
||||
etk::VectorType<int8_t> tmpVect;
|
||||
etk::Vector<int8_t> tmpVect;
|
||||
int32_t localOfset = strlen(tmpUTF8);
|
||||
tmpVect.PushBack((int8_t*)tmpUTF8, localOfset);
|
||||
if (false == haveSelectionActive) {
|
||||
m_EdnBuf.Insert(m_cursorPos, tmpVect);
|
||||
SetInsertPosition(m_cursorPos+localOfset, true);
|
||||
} else {
|
||||
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, tmpVect);
|
||||
m_EdnBuf.ReplaceSelected(tmpVect);
|
||||
SetInsertPosition(SelectionStart+localOfset, true);
|
||||
}
|
||||
} else {
|
||||
@@ -1023,33 +1006,33 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
char output_ISO;
|
||||
unicode::convertUnicodeToIso(m_EdnBuf.GetCharsetType(), unicodeData, output_ISO);
|
||||
//printf(" insert : \"%s\"==> 0x%08x=%d ", UTF8data, (unsigned int)output_ISO, (int)output_ISO);
|
||||
etk::VectorType<int8_t> tmpVect;
|
||||
etk::Vector<int8_t> tmpVect;
|
||||
tmpVect.PushBack(output_ISO);
|
||||
if (false == haveSelectionActive) {
|
||||
m_EdnBuf.Insert(m_cursorPos, tmpVect);
|
||||
SetInsertPosition(m_cursorPos+1, true);
|
||||
} else {
|
||||
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, tmpVect);
|
||||
m_EdnBuf.ReplaceSelected(tmpVect);
|
||||
SetInsertPosition(SelectionStart+1, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
SetModify(true);
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
|
||||
|
||||
int32_t BufferText::FindLine(etk::UString &data)
|
||||
{
|
||||
if ( 0 == data.Size()) {
|
||||
EDN_WARNING("no search data");
|
||||
APPL_WARNING("no search data");
|
||||
return 0;
|
||||
}
|
||||
EDN_INFO("Search data line : \"" << data << "\"");
|
||||
etk::VectorType<uniChar_t> mVectSearch;
|
||||
APPL_INFO("Search data line : \"" << data << "\"");
|
||||
etk::Vector<uniChar_t> mVectSearch;
|
||||
mVectSearch = data.GetVector();
|
||||
//EDN_INFO("search data Forward : startSearchPos=" << startSearchPos );
|
||||
//APPL_INFO("search data Forward : startSearchPos=" << startSearchPos );
|
||||
/*
|
||||
int32_t foundPos;
|
||||
bool findSomething = m_EdnBuf.SearchForward(0, mVectSearch, &foundPos, true);
|
||||
@@ -1060,17 +1043,18 @@ int32_t BufferText::FindLine(etk::UString &data)
|
||||
return 0;
|
||||
}
|
||||
*/
|
||||
EDN_TODO("Remove for now ...");
|
||||
APPL_TODO("Remove for now ...");
|
||||
return 0;
|
||||
}
|
||||
|
||||
void BufferText::JumpAtLine(int32_t newLine)
|
||||
{
|
||||
int32_t positionLine = m_EdnBuf.CountForwardNLines(0, newLine);
|
||||
m_EdnBuf.Unselect(SELECTION_PRIMARY);
|
||||
EDN_DEBUG("jump at the line : " << newLine );
|
||||
m_EdnBuf.Unselect();
|
||||
APPL_DEBUG("jump at the line : " << newLine );
|
||||
SetInsertPosition(positionLine);
|
||||
RequestPositionUpdate(true);
|
||||
m_centerRequested = true;
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1090,11 +1074,11 @@ int32_t BufferText::GetCurrentLine(void)
|
||||
|
||||
void BufferText::Search(etk::UString &data, bool back, bool caseSensitive, bool wrap, bool regExp)
|
||||
{
|
||||
EDN_INFO("Search data : \"" << data << "\"");
|
||||
APPL_INFO("Search data : \"" << data << "\"");
|
||||
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
|
||||
int32_t startSearchPos = m_cursorPos;
|
||||
if (true == haveSelectionActive) {
|
||||
@@ -1106,51 +1090,46 @@ void BufferText::Search(etk::UString &data, bool back, bool caseSensitive, bool
|
||||
}
|
||||
|
||||
if ( 0 == data.Size()) {
|
||||
EDN_WARNING("no search data");
|
||||
APPL_WARNING("no search data");
|
||||
return;
|
||||
}
|
||||
etk::VectorType<uniChar_t> mVectSearch;
|
||||
mVectSearch = data.GetVector();
|
||||
EDN_TODO("Remove for now ...");
|
||||
/*
|
||||
if (false == back) {
|
||||
//EDN_INFO("search data Forward : startSearchPos=" << startSearchPos );
|
||||
//APPL_INFO("search data Forward : startSearchPos=" << startSearchPos );
|
||||
int32_t foundPos;
|
||||
bool findSomething = m_EdnBuf.SearchForward(startSearchPos, mVectSearch, &foundPos, caseSensitive);
|
||||
int32_t foundPosEnd;
|
||||
bool findSomething = m_EdnBuf.SearchForward(startSearchPos, data, &foundPos, &foundPosEnd, caseSensitive);
|
||||
if( false == findSomething
|
||||
&& true == wrap)
|
||||
{
|
||||
//EDN_INFO("WrapMode !!! 0 ==> end");
|
||||
findSomething = m_EdnBuf.SearchForward(0, mVectSearch, &foundPos, caseSensitive);
|
||||
//APPL_INFO("WrapMode !!! 0 ==> end");
|
||||
findSomething = m_EdnBuf.SearchForward(0, data, &foundPos, &foundPosEnd, caseSensitive);
|
||||
}
|
||||
// if find data :
|
||||
if (true == findSomething) {
|
||||
// select new position
|
||||
int32_t endSelectionPos = foundPos+mVectSearch.Size();
|
||||
SetInsertPosition(endSelectionPos);
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, foundPos, endSelectionPos);
|
||||
RequestPositionUpdate();
|
||||
SetInsertPosition(foundPosEnd);
|
||||
m_EdnBuf.Select(foundPos, foundPosEnd);
|
||||
}
|
||||
} else {
|
||||
//EDN_INFO("search data Backward : " << data.GetDirectPointer() );
|
||||
//APPL_INFO("search data Backward : " << data.GetDirectPointer() );
|
||||
int32_t foundPos;
|
||||
bool findSomething = m_EdnBuf.SearchBackward(startSearchPos, mVectSearch, &foundPos, caseSensitive);
|
||||
int32_t foundPosEnd;
|
||||
bool findSomething = m_EdnBuf.SearchBackward(startSearchPos, data, &foundPos, &foundPosEnd, caseSensitive);
|
||||
if( false == findSomething
|
||||
&& true == wrap)
|
||||
{
|
||||
//EDN_INFO("WrapMode !!! end ==> 0");
|
||||
findSomething = m_EdnBuf.SearchBackward(m_EdnBuf.Size(), mVectSearch, &foundPos, caseSensitive);
|
||||
//APPL_INFO("WrapMode !!! end ==> 0");
|
||||
findSomething = m_EdnBuf.SearchBackward(m_EdnBuf.Size(), data, &foundPos, &foundPosEnd, caseSensitive);
|
||||
}
|
||||
// if find data :
|
||||
if (true == findSomething) {
|
||||
// select new position
|
||||
int32_t endSelectionPos = foundPos+mVectSearch.Size();
|
||||
SetInsertPosition(foundPos);
|
||||
m_EdnBuf.Select(SELECTION_PRIMARY, foundPos, endSelectionPos);
|
||||
RequestPositionUpdate();
|
||||
m_EdnBuf.Select(foundPos, foundPosEnd);
|
||||
}
|
||||
}
|
||||
*/
|
||||
m_centerRequested = true;
|
||||
RequestUpdateOfThePosition();
|
||||
}
|
||||
|
||||
|
||||
@@ -1158,13 +1137,11 @@ void BufferText::Replace(etk::UString &data)
|
||||
{
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
if (true == haveSelectionActive) {
|
||||
// Replace Data :
|
||||
etk::VectorType<uniChar_t> myData = data.GetVector();
|
||||
EDN_TODO("Remove for now ...");
|
||||
//m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, myData);
|
||||
//SetInsertPosition(SelectionStart + myData.Size());
|
||||
int32_t size = m_EdnBuf.ReplaceSelected(data);
|
||||
SetInsertPosition(SelectionStart + size);
|
||||
}
|
||||
SetModify(true);
|
||||
}
|
||||
@@ -1180,15 +1157,13 @@ void BufferText::Replace(etk::UString &data)
|
||||
*/
|
||||
void BufferText::Copy(int8_t clipboardID)
|
||||
{
|
||||
etk::VectorType<uniChar_t> mVect;
|
||||
etk::UString mVect;
|
||||
// get the curent selected data
|
||||
if (true == m_EdnBuf.SelectHasSelection(SELECTION_PRIMARY) ) {
|
||||
//m_EdnBuf.GetSelectionText(SELECTION_PRIMARY, mVect);
|
||||
EDN_TODO("Remove for now ...");
|
||||
if (true == m_EdnBuf.SelectHasSelection() ) {
|
||||
m_EdnBuf.GetSelectionText(mVect);
|
||||
}
|
||||
// copy data in the click board :
|
||||
//ClipBoard::Set(clipboardID, mVect);
|
||||
EDN_TODO("Remove for now ...");
|
||||
ewol::clipBoard::Set(clipboardID, mVect);
|
||||
}
|
||||
|
||||
|
||||
@@ -1205,17 +1180,17 @@ void BufferText::Cut(int8_t clipboardID)
|
||||
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
|
||||
// copy data
|
||||
Copy(clipboardID);
|
||||
// remove data :
|
||||
if (true == haveSelectionActive ) {
|
||||
EDN_INFO("REMOVE SELECTION");
|
||||
m_EdnBuf.RemoveSelected(SELECTION_PRIMARY);
|
||||
APPL_INFO("REMOVE SELECTION");
|
||||
m_EdnBuf.RemoveSelected();
|
||||
m_cursorPos = SelectionStart;
|
||||
}
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
SetModify(true);
|
||||
}
|
||||
|
||||
@@ -1230,28 +1205,24 @@ void BufferText::Cut(int8_t clipboardID)
|
||||
*/
|
||||
void BufferText::Paste(int8_t clipboardID)
|
||||
{
|
||||
etk::VectorType<uniChar_t> mVect;
|
||||
|
||||
EDN_TODO("Remove for now ...");
|
||||
/*
|
||||
// copy data from the click board :
|
||||
ClipBoard::Get(clipboardID, mVect);
|
||||
etk::UString mVect;
|
||||
// copy data from the click board :
|
||||
ewol::clipBoard::Get(clipboardID, mVect);
|
||||
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SELECTION_PRIMARY, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = m_EdnBuf.GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
|
||||
if (true == haveSelectionActive ) {
|
||||
// replace data
|
||||
m_EdnBuf.ReplaceSelected(SELECTION_PRIMARY, mVect );
|
||||
m_cursorPos = SelectionStart + mVect.Size();
|
||||
int32_t size = m_EdnBuf.ReplaceSelected(mVect );
|
||||
m_cursorPos = SelectionStart + size;
|
||||
} else {
|
||||
// insert data
|
||||
m_EdnBuf.Insert(m_cursorPos, mVect);
|
||||
m_cursorPos += mVect.Size();
|
||||
int32_t size = m_EdnBuf.Insert(m_cursorPos, mVect);
|
||||
m_cursorPos += size;
|
||||
}
|
||||
*/
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
SetModify(true);
|
||||
}
|
||||
|
||||
@@ -1261,7 +1232,7 @@ void BufferText::Undo(void)
|
||||
int32_t newPos = m_EdnBuf.Undo();
|
||||
if (newPos >= 0) {
|
||||
SetInsertPosition(newPos, true);
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
SetModify(true);
|
||||
}
|
||||
}
|
||||
@@ -1271,7 +1242,7 @@ void BufferText::Redo(void)
|
||||
int32_t newPos = m_EdnBuf.Redo();
|
||||
if (newPos >= 0) {
|
||||
SetInsertPosition(newPos, true);
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
SetModify(true);
|
||||
}
|
||||
}
|
@@ -85,7 +85,7 @@ class BufferText : public Buffer {
|
||||
|
||||
// Direct buffer IO
|
||||
EdnBuf m_EdnBuf; //!< buffer associated on this displayer
|
||||
coord2D_ts m_displaySize; //!< number of char displayable in the screan
|
||||
Vector2D<float> m_displaySize; //!< number of char displayable in the screan
|
||||
// Cursor :
|
||||
int32_t m_cursorPos; //!< position in the buffer of the cursor
|
||||
int32_t m_cursorPreferredCol; //!< colomn of the last up and down ...
|
||||
@@ -93,13 +93,10 @@ class BufferText : public Buffer {
|
||||
|
||||
// internal function
|
||||
void BasicInit(void);
|
||||
// moving the current position of the display windows ...
|
||||
private:
|
||||
coord2D_ts m_requestDisplayPos; //!< number of char displayable in the screan
|
||||
void RequestPositionUpdate(bool centerPage = false);
|
||||
bool m_centerRequested;
|
||||
public:
|
||||
bool RequestPositionRequest(coord2D_ts& newPos);
|
||||
|
||||
virtual Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
private:
|
||||
bool TextDMoveUp(int32_t offset);
|
||||
bool TextDMoveDown(int32_t offset);
|
@@ -23,9 +23,10 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <etk/Types.h>
|
||||
#include <etk/unicode.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <EdnBuf.h>
|
||||
|
||||
|
||||
@@ -55,18 +56,10 @@ EdnBuf::EdnBuf(void)
|
||||
m_useTabs = true;
|
||||
|
||||
// Current selection
|
||||
m_selectionList[SELECTION_PRIMARY].selected = false;
|
||||
m_selectionList[SELECTION_PRIMARY].zeroWidth = false;
|
||||
m_selectionList[SELECTION_PRIMARY].rectangular = false;
|
||||
m_selectionList[SELECTION_PRIMARY].start = m_selectionList[SELECTION_PRIMARY].end = 0;
|
||||
m_selectionList[SELECTION_SECONDARY].selected = false;
|
||||
m_selectionList[SELECTION_SECONDARY].zeroWidth = false;
|
||||
m_selectionList[SELECTION_SECONDARY].rectangular = false;
|
||||
m_selectionList[SELECTION_SECONDARY].start = m_selectionList[SELECTION_SECONDARY].end = 0;
|
||||
m_selectionList[SELECTION_HIGHTLIGHT].selected = false;
|
||||
m_selectionList[SELECTION_HIGHTLIGHT].zeroWidth = false;
|
||||
m_selectionList[SELECTION_HIGHTLIGHT].rectangular = false;
|
||||
m_selectionList[SELECTION_HIGHTLIGHT].start = m_selectionList[SELECTION_HIGHTLIGHT].end = 0;
|
||||
m_selectionList.selected = false;
|
||||
m_selectionList.zeroWidth = false;
|
||||
m_selectionList.rectangular = false;
|
||||
m_selectionList.start = m_selectionList.end = 0;
|
||||
|
||||
// charset :
|
||||
m_isUtf8 = false;
|
||||
@@ -115,7 +108,7 @@ bool EdnBuf::DumpFrom(FILE *myFile)
|
||||
{
|
||||
if (true == m_data.DumpFrom(myFile) ) {
|
||||
// set no selection
|
||||
UpdateSelections(0, 0, m_data.Size() );
|
||||
UpdateSelection(0, 0, m_data.Size() );
|
||||
// generate HighLight
|
||||
CleanHighLight();
|
||||
GenerateHighLightAt(0, m_data.Size());
|
||||
@@ -126,7 +119,7 @@ bool EdnBuf::DumpFrom(FILE *myFile)
|
||||
}
|
||||
|
||||
|
||||
void EdnBuf::GetAll(etk::VectorType<int8_t> &text)
|
||||
void EdnBuf::GetAll(etk::Vector<int8_t> &text)
|
||||
{
|
||||
// Clean output vector
|
||||
text.Clear();
|
||||
@@ -135,9 +128,9 @@ void EdnBuf::GetAll(etk::VectorType<int8_t> &text)
|
||||
}
|
||||
|
||||
|
||||
void EdnBuf::SetAll(etk::VectorType<int8_t> &text)
|
||||
void EdnBuf::SetAll(etk::Vector<int8_t> &text)
|
||||
{
|
||||
etk::VectorType<int8_t> deletedText;
|
||||
etk::Vector<int8_t> deletedText;
|
||||
|
||||
// extract all data of the buffer :
|
||||
GetAll(deletedText);
|
||||
@@ -149,19 +142,39 @@ void EdnBuf::SetAll(etk::VectorType<int8_t> &text)
|
||||
m_data.Insert(0, text);
|
||||
|
||||
// Zero all of the existing selections
|
||||
UpdateSelections(0, deletedText.Size(), 0);
|
||||
UpdateSelection(0, deletedText.Size(), 0);
|
||||
|
||||
// Call the modification Event Manager
|
||||
eventModification(0, m_data.Size(), deletedText);
|
||||
}
|
||||
|
||||
void EdnBuf::GetRange(int32_t start, int32_t end, etk::VectorType<int8_t> &output)
|
||||
void EdnBuf::GetRange(int32_t start, int32_t end, etk::Vector<int8_t> &output)
|
||||
{
|
||||
// Remove all data ...
|
||||
output.Clear();
|
||||
// import data :
|
||||
m_data.Get(start, end-start, output);
|
||||
//EDN_DEBUG("request start=" << start << " end="<< end << " size="<< end-start << " result size=" << output.Size() );
|
||||
//APPL_DEBUG("request start=" << start << " end="<< end << " size="<< end-start << " result size=" << output.Size() );
|
||||
}
|
||||
|
||||
void EdnBuf::GetRange(int32_t start, int32_t end, etk::UString &output)
|
||||
{
|
||||
// Remove all data ...
|
||||
output = "";
|
||||
// import data :
|
||||
etk::Vector<int8_t> localOutput;
|
||||
m_data.Get(start, end-start, localOutput);
|
||||
// transcript in UNICODE ...
|
||||
if (true == m_isUtf8) {
|
||||
localOutput.PushBack('\0');
|
||||
output = (char*)&localOutput[0];
|
||||
} else {
|
||||
etk::Vector<uniChar_t> tmpUnicodeData;
|
||||
// transform in unicode :
|
||||
convertIsoToUnicode(m_charsetType, localOutput, tmpUnicodeData);
|
||||
output = tmpUnicodeData;
|
||||
}
|
||||
//APPL_DEBUG("request start=" << start << " end="<< end << " size="<< end-start << " result size=" << output.Size() );
|
||||
}
|
||||
|
||||
|
||||
@@ -189,18 +202,30 @@ int8_t EdnBuf::operator[] (int32_t pos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::Insert(int32_t pos, etk::VectorType<int8_t> &insertText)
|
||||
int32_t EdnBuf::Insert(int32_t pos, etk::Vector<int8_t> &insertText)
|
||||
{
|
||||
// if pos is not contiguous to existing text, make it
|
||||
pos = edn_average(0, pos, m_data.Size() );
|
||||
pos = etk_avg(0, pos, m_data.Size() );
|
||||
// insert Data
|
||||
insert(pos, insertText);
|
||||
int32_t sizeInsert=LocalInsert(pos, insertText);
|
||||
|
||||
// Call the redisplay ...
|
||||
etk::VectorType<int8_t> deletedText;
|
||||
etk::Vector<int8_t> deletedText;
|
||||
eventModification(pos, insertText.Size(), deletedText);
|
||||
return sizeInsert;
|
||||
}
|
||||
int32_t EdnBuf::Insert(int32_t pos, etk::UString &insertText)
|
||||
{
|
||||
// if pos is not contiguous to existing text, make it
|
||||
pos = etk_avg(0, pos, m_data.Size() );
|
||||
// insert Data
|
||||
int32_t sizeInsert=LocalInsert(pos, insertText);
|
||||
|
||||
// Call the redisplay ...
|
||||
etk::Vector<int8_t> deletedText;
|
||||
eventModification(pos, insertText.Size(), deletedText);
|
||||
return sizeInsert;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Replace data in the buffer
|
||||
@@ -209,16 +234,53 @@ void EdnBuf::Insert(int32_t pos, etk::VectorType<int8_t> &insertText)
|
||||
* @param[in] end Position ended in the buffer
|
||||
* @param[in] insertText Test to set in the range [start..end]
|
||||
*
|
||||
* @return ---
|
||||
* @return nb Octet inserted
|
||||
*
|
||||
*/
|
||||
void EdnBuf::Replace(int32_t start, int32_t end, etk::VectorType<int8_t> &insertText)
|
||||
int32_t EdnBuf::Replace(int32_t start, int32_t end, etk::Vector<int8_t> &insertText)
|
||||
{
|
||||
etk::VectorType<int8_t> deletedText;
|
||||
if (end-start == 0) {
|
||||
return 0;
|
||||
}
|
||||
etk::Vector<int8_t> deletedText;
|
||||
GetRange(start, end, deletedText);
|
||||
m_data.Replace(start, end-start, insertText);
|
||||
// update internal elements
|
||||
eventModification(start, insertText.Size(), deletedText);
|
||||
return insertText.Size();
|
||||
}
|
||||
|
||||
int32_t EdnBuf::Replace(int32_t start, int32_t end, etk::UString &insertText)
|
||||
{
|
||||
if (end-start == 0) {
|
||||
return 0;
|
||||
}
|
||||
etk::Vector<int8_t> deletedText;
|
||||
GetRange(start, end, deletedText);
|
||||
etk::Vector<int8_t> tmpInsertText;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = insertText.c_str();
|
||||
while (*tmpPointer != '\0') {
|
||||
tmpInsertText.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::Vector<unsigned int> tmppp = insertText.GetVector();
|
||||
convertUnicodeToIso(m_charsetType, tmppp, tmpInsertText);
|
||||
}
|
||||
if (tmpInsertText.Size()>0) {
|
||||
if (tmpInsertText[tmpInsertText.Size()-1] == '\0') {
|
||||
tmpInsertText.PopBack();
|
||||
}
|
||||
}
|
||||
if (tmpInsertText.Size()>0) {
|
||||
if (tmpInsertText[tmpInsertText.Size()-1] == '\0') {
|
||||
tmpInsertText.PopBack();
|
||||
}
|
||||
}
|
||||
m_data.Replace(start, end-start, tmpInsertText);
|
||||
// update internal elements
|
||||
eventModification(start, tmpInsertText.Size(), deletedText);
|
||||
return tmpInsertText.Size();
|
||||
}
|
||||
|
||||
|
||||
@@ -234,15 +296,15 @@ void EdnBuf::Replace(int32_t start, int32_t end, etk::VectorType<int8_t> &insert
|
||||
void EdnBuf::Remove(int32_t start, int32_t end)
|
||||
{
|
||||
|
||||
etk::VectorType<int8_t> deletedText;
|
||||
etk::Vector<int8_t> deletedText;
|
||||
// Make sure the arguments make sense
|
||||
if (start > end) {
|
||||
int32_t temp = start;
|
||||
start = end;
|
||||
end = temp;
|
||||
}
|
||||
start = edn_average(0 , start, m_data.Size());
|
||||
end = edn_average(0 , end, m_data.Size());
|
||||
start = etk_avg(0 , start, m_data.Size());
|
||||
end = etk_avg(0 , end, m_data.Size());
|
||||
|
||||
// Remove and redisplay
|
||||
GetRange(start, end, deletedText);
|
||||
@@ -251,21 +313,21 @@ void EdnBuf::Remove(int32_t start, int32_t end)
|
||||
}
|
||||
|
||||
|
||||
int32_t EdnBuf::Indent(selectionType_te select)
|
||||
int32_t EdnBuf::Indent(void)
|
||||
{
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = GetSelectionPos(select, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
|
||||
if (false == haveSelectionActive) {
|
||||
return SelectionEnd;
|
||||
}
|
||||
// Disable selection:
|
||||
Unselect(select);
|
||||
Unselect();
|
||||
// Get Range :
|
||||
int32_t l_start = StartOfLine(SelectionStart);
|
||||
int32_t l_end = EndOfLine(SelectionEnd);
|
||||
etk::VectorType<int8_t> l_tmpData;
|
||||
etk::Vector<int8_t> l_tmpData;
|
||||
GetRange(l_start, l_end, l_tmpData);
|
||||
|
||||
l_tmpData.Insert(0, '\n');
|
||||
@@ -285,26 +347,26 @@ int32_t EdnBuf::Indent(selectionType_te select)
|
||||
Replace(l_start, l_end, l_tmpData);
|
||||
// Set the new selection :
|
||||
l_end = l_start + l_tmpData.Size();
|
||||
Select(select, l_start, l_end);
|
||||
Select(l_start, l_end);
|
||||
// Return the position of the cursor
|
||||
return l_end;
|
||||
}
|
||||
|
||||
int32_t EdnBuf::UnIndent(selectionType_te select)
|
||||
int32_t EdnBuf::UnIndent(void)
|
||||
{
|
||||
int32_t SelectionStart, SelectionEnd, SelectionRectStart, SelectionRectEnd;
|
||||
bool SelectionIsRect;
|
||||
bool haveSelectionActive = GetSelectionPos(select, SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
bool haveSelectionActive = GetSelectionPos(SelectionStart, SelectionEnd, SelectionIsRect, SelectionRectStart, SelectionRectEnd);
|
||||
|
||||
if (false == haveSelectionActive) {
|
||||
return SelectionEnd;
|
||||
}
|
||||
// Disable selection:
|
||||
Unselect(select);
|
||||
Unselect();
|
||||
// Get Range :
|
||||
int32_t l_start = StartOfLine(SelectionStart);
|
||||
int32_t l_end = EndOfLine(SelectionEnd);
|
||||
etk::VectorType<int8_t> l_tmpData;
|
||||
etk::Vector<int8_t> l_tmpData;
|
||||
GetRange(l_start, l_end, l_tmpData);
|
||||
|
||||
l_tmpData.Insert(0, '\n');
|
||||
@@ -331,7 +393,7 @@ int32_t EdnBuf::UnIndent(selectionType_te select)
|
||||
Replace(l_start, l_end, l_tmpData);
|
||||
// Set the new selection :
|
||||
l_end = l_start + l_tmpData.Size();
|
||||
Select(select, l_start, l_end);
|
||||
Select(l_start, l_end);
|
||||
// Return the position of the cursor
|
||||
return l_end;
|
||||
}
|
||||
@@ -346,7 +408,7 @@ int32_t EdnBuf::UnIndent(selectionType_te select)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::GetLineText(int32_t pos, etk::VectorType<int8_t> &text)
|
||||
void EdnBuf::GetLineText(int32_t pos, etk::Vector<int8_t> &text)
|
||||
{
|
||||
GetRange( StartOfLine(pos), EndOfLine(pos), text);
|
||||
}
|
||||
@@ -480,7 +542,7 @@ int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, char outUTF8[MAX_E
|
||||
sprintf(outUTF8, "<? ? ? ?>");
|
||||
}
|
||||
if (0 == size) {
|
||||
EDN_ERROR("plop");
|
||||
APPL_ERROR("plop");
|
||||
}
|
||||
pos+=size;
|
||||
return strlen(outUTF8);
|
||||
@@ -573,13 +635,13 @@ int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, uniChar_t outUnico
|
||||
unicode::Utf8_SizeElement(tmpString, 6 , size, baseValid);
|
||||
currentChar = 0;
|
||||
if (true == baseValid) {
|
||||
uniChar_t *tmp = outUnicode;
|
||||
for (int32_t k=0; k<size; k++) {
|
||||
*tmp++ = tmpString[k];
|
||||
char tmp[20];
|
||||
for (int32_t kkk=0; kkk<size; kkk++) {
|
||||
tmp[kkk] = tmpString[kkk];
|
||||
tmp[kkk+1] = '\0';
|
||||
}
|
||||
*tmp = '\0';
|
||||
unicode::convertIsoToUnicode(m_charsetType, c, outUnicode[0]);
|
||||
|
||||
unicode::convertUtf8ToUnicode(tmp, outUnicode[0]);
|
||||
outUnicode[1] = 0;
|
||||
} else {
|
||||
outUnicode[0] = '<';
|
||||
outUnicode[1] = '?';
|
||||
@@ -589,7 +651,7 @@ int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, uniChar_t outUnico
|
||||
outUnicode[5] = 0;
|
||||
}
|
||||
if (0 == size) {
|
||||
EDN_ERROR("plop");
|
||||
APPL_ERROR("plop");
|
||||
}
|
||||
pos+=size;
|
||||
int32_t outSize = 0;
|
||||
@@ -705,14 +767,14 @@ int32_t EdnBuf::CountDispChars(int32_t lineStartPos, int32_t targetPos)
|
||||
int32_t charCount = 0;
|
||||
|
||||
char expandedChar[MAX_EXP_CHAR_LEN];
|
||||
//EDN_DEBUG("lineStartPos="<< lineStartPos << " targetPos=" << targetPos);
|
||||
//APPL_DEBUG("lineStartPos="<< lineStartPos << " targetPos=" << targetPos);
|
||||
while( myPosIt
|
||||
&& myPosIt.Position() < targetPos )
|
||||
{
|
||||
charCount += ExpandCharacter(*myPosIt, charCount, expandedChar);
|
||||
myPosIt++;
|
||||
}
|
||||
//EDN_DEBUG(" result=" << charCount);
|
||||
//APPL_DEBUG(" result=" << charCount);
|
||||
return charCount;
|
||||
}
|
||||
|
||||
@@ -779,9 +841,9 @@ int32_t EdnBuf::CountLines(int32_t startPos, int32_t endPos)
|
||||
* @return number of line found
|
||||
*
|
||||
*/
|
||||
int32_t EdnBuf::CountLines(etk::VectorType<int8_t> &data)
|
||||
int32_t EdnBuf::CountLines(etk::Vector<int8_t> &data)
|
||||
{
|
||||
etk::VectorType<int8_t>::Iterator myPosIt = data.Begin();
|
||||
etk::Vector<int8_t>::Iterator myPosIt = data.Begin();
|
||||
int32_t lineCount = 0;
|
||||
|
||||
while(myPosIt) {
|
||||
@@ -840,19 +902,19 @@ int32_t EdnBuf::CountForwardNLines(int32_t startPos, int32_t nLines)
|
||||
}
|
||||
EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos);
|
||||
int32_t lineCount = 0;
|
||||
//EDN_INFO("startPos=" << startPos << " nLines=" << nLines);
|
||||
//APPL_INFO("startPos=" << startPos << " nLines=" << nLines);
|
||||
while(myPosIt)
|
||||
{
|
||||
if ('\n' == *myPosIt) {
|
||||
lineCount++;
|
||||
if (lineCount == nLines) {
|
||||
//EDN_INFO(" ==> (1) at position=" << myPosIt.Position()+1 );
|
||||
//APPL_INFO(" ==> (1) at position=" << myPosIt.Position()+1 );
|
||||
return myPosIt.Position()+1;
|
||||
}
|
||||
}
|
||||
myPosIt++;
|
||||
}
|
||||
//EDN_INFO(" ==> (2) at position=" << myPosIt.Position() );
|
||||
//APPL_INFO(" ==> (2) at position=" << myPosIt.Position() );
|
||||
return myPosIt.Position();
|
||||
}
|
||||
|
||||
@@ -873,7 +935,7 @@ int32_t EdnBuf::CountBackwardNLines(int32_t startPos, int32_t nLines)
|
||||
} else if (startPos > m_data.Size() ) {
|
||||
startPos = m_data.Size();
|
||||
}
|
||||
//EDN_INFO("startPos=" << startPos << " nLines=" << nLines);
|
||||
//APPL_INFO("startPos=" << startPos << " nLines=" << nLines);
|
||||
|
||||
EdnVectorBuf::Iterator myPosIt = m_data.Position(startPos-1);
|
||||
int32_t lineCount = -1;
|
||||
@@ -882,13 +944,13 @@ int32_t EdnBuf::CountBackwardNLines(int32_t startPos, int32_t nLines)
|
||||
if ('\n' == *myPosIt) {
|
||||
lineCount++;
|
||||
if (lineCount >= nLines) {
|
||||
//EDN_INFO(" ==> (1) at position=" << myPosIt.Position()+1 );
|
||||
//APPL_INFO(" ==> (1) at position=" << myPosIt.Position()+1 );
|
||||
return myPosIt.Position()+1;
|
||||
}
|
||||
}
|
||||
myPosIt--;
|
||||
}
|
||||
//EDN_INFO(" ==> (2) at position=0");
|
||||
//APPL_INFO(" ==> (2) at position=0");
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -904,10 +966,10 @@ bool EdnBuf::charMatch(char first, char second, bool caseSensitive)
|
||||
}
|
||||
}
|
||||
if(first == second) {
|
||||
//EDN_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> true");
|
||||
//APPL_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> true");
|
||||
return true;
|
||||
} else {
|
||||
//EDN_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> false");
|
||||
//APPL_DEBUG("charMatch(" << first << ", " << second << ", " << caseSensitive << ") ==> false");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -923,13 +985,25 @@ bool EdnBuf::charMatch(char first, char second, bool caseSensitive)
|
||||
* @return false ==> not found data
|
||||
*
|
||||
*/
|
||||
bool EdnBuf::SearchForward(int32_t startPos, etk::VectorType<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive)
|
||||
bool EdnBuf::SearchForward(int32_t startPos, etk::UString &search, int32_t *foundPos, int32_t *foundPosEnd, bool caseSensitive)
|
||||
{
|
||||
etk::Vector<int8_t> searchVect;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = search.c_str();
|
||||
while (*tmpPointer != '\0') {
|
||||
searchVect.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::Vector<unsigned int> tmppp = search.GetVector();
|
||||
convertUnicodeToIso(m_charsetType, tmppp, searchVect);
|
||||
}
|
||||
// remove the '\0' at the end of the string ...
|
||||
searchVect.PopBack();
|
||||
int32_t position;
|
||||
int32_t searchLen = searchVect.Size();
|
||||
int32_t dataLen = m_data.Size();
|
||||
char currentChar = '\0';
|
||||
//EDN_INFO(" startPos=" << startPos << " searchLen=" << searchLen);
|
||||
APPL_INFO(" startPos=" << startPos << " searchLen=" << searchLen);
|
||||
for (position=startPos; position<dataLen - (searchLen-1); position++) {
|
||||
currentChar = m_data[position];
|
||||
if (true == charMatch(currentChar, searchVect[0], caseSensitive)) {
|
||||
@@ -944,11 +1018,13 @@ bool EdnBuf::SearchForward(int32_t startPos, etk::VectorType<int8_t> &searchVect
|
||||
}
|
||||
if (true == found) {
|
||||
*foundPos = position;
|
||||
*foundPosEnd = position + searchVect.Size();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
*foundPos = m_data.Size();
|
||||
*foundPosEnd = m_data.Size();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -964,12 +1040,25 @@ bool EdnBuf::SearchForward(int32_t startPos, etk::VectorType<int8_t> &searchVect
|
||||
* @return false ==> not found data
|
||||
*
|
||||
*/
|
||||
bool EdnBuf::SearchBackward(int32_t startPos, etk::VectorType<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive)
|
||||
bool EdnBuf::SearchBackward(int32_t startPos, etk::UString &search, int32_t *foundPos, int32_t *foundPosEnd, bool caseSensitive)
|
||||
{
|
||||
etk::Vector<int8_t> searchVect;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = search.c_str();
|
||||
while (*tmpPointer != '\0') {
|
||||
searchVect.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::Vector<unsigned int> tmppp = search.GetVector();
|
||||
convertUnicodeToIso(m_charsetType, tmppp, searchVect);
|
||||
}
|
||||
// remove the '\0' at the end of the string ...
|
||||
searchVect.PopBack();
|
||||
|
||||
int32_t position;
|
||||
int32_t searchLen = searchVect.Size();
|
||||
char currentChar = '\0';
|
||||
//EDN_INFO(" startPos=" << startPos << " searchLen=" << searchLen);
|
||||
//APPL_INFO(" startPos=" << startPos << " searchLen=" << searchLen);
|
||||
for (position=startPos; position>=searchLen-1; position--) {
|
||||
currentChar = m_data[position];
|
||||
if (true == charMatch(currentChar, searchVect[searchLen-1], caseSensitive)) {
|
||||
@@ -984,11 +1073,13 @@ bool EdnBuf::SearchBackward(int32_t startPos, etk::VectorType<int8_t> &searchVec
|
||||
}
|
||||
if (true == found) {
|
||||
*foundPos = position - (searchLen-1);
|
||||
*foundPosEnd = position + searchVect.Size();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
*foundPos = m_data.Size();
|
||||
*foundPosEnd = m_data.Size();
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1000,10 +1091,10 @@ static bool isChar(char value)
|
||||
|| '_' == value
|
||||
|| '~' == value)
|
||||
{
|
||||
//EDN_DEBUG(" is a char \"" << value << "\"");
|
||||
//APPL_DEBUG(" is a char \"" << value << "\"");
|
||||
return true;
|
||||
}
|
||||
//EDN_DEBUG(" is NOT a char \"" << value << "\"");
|
||||
//APPL_DEBUG(" is NOT a char \"" << value << "\"");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1014,7 +1105,7 @@ bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos)
|
||||
if( '\t' == currentChar
|
||||
|| ' ' == currentChar)
|
||||
{
|
||||
EDN_DEBUG("select spacer");
|
||||
APPL_DEBUG("select spacer");
|
||||
// special case we are looking for separation
|
||||
for (beginPos=startPos; beginPos>=0; beginPos--) {
|
||||
currentChar = m_data[beginPos];
|
||||
@@ -1036,7 +1127,7 @@ bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos)
|
||||
}
|
||||
return true;
|
||||
} else if( true == isChar(currentChar)){
|
||||
EDN_DEBUG("select normal Char");
|
||||
APPL_DEBUG("select normal Char");
|
||||
// Search back
|
||||
for (beginPos=startPos; beginPos>=0; beginPos--) {
|
||||
currentChar = m_data[beginPos];
|
||||
@@ -1055,7 +1146,7 @@ bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos)
|
||||
return true;
|
||||
} else {
|
||||
char comparechar = currentChar;
|
||||
EDN_DEBUG("select same char");
|
||||
APPL_DEBUG("select same char");
|
||||
// Search back
|
||||
for (beginPos=startPos; beginPos>=0; beginPos--) {
|
||||
currentChar = m_data[beginPos];
|
||||
@@ -1090,15 +1181,34 @@ bool EdnBuf::SelectAround(int32_t startPos, int32_t &beginPos, int32_t &endPos)
|
||||
* @return number of element inserted.
|
||||
*
|
||||
*/
|
||||
int32_t EdnBuf::insert(int32_t pos, etk::VectorType<int8_t> &insertText)
|
||||
int32_t EdnBuf::LocalInsert(int32_t pos, etk::Vector<int8_t> &insertText)
|
||||
{
|
||||
// Insert data in buffer
|
||||
m_data.Insert(pos, insertText);
|
||||
// update the current selected area
|
||||
UpdateSelections(pos, 0, insertText.Size() );
|
||||
UpdateSelection(pos, 0, insertText.Size() );
|
||||
// return the number of element inserted ...
|
||||
return insertText.Size();
|
||||
}
|
||||
int32_t EdnBuf::LocalInsert(int32_t pos, etk::UString &insertText)
|
||||
{
|
||||
etk::Vector<int8_t> tmpInsertText;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = insertText.c_str();
|
||||
while (*tmpPointer != '\0') {
|
||||
tmpInsertText.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::Vector<unsigned int> tmppp = insertText.GetVector();
|
||||
convertUnicodeToIso(m_charsetType, tmppp, tmpInsertText);
|
||||
}
|
||||
if (tmpInsertText.Size()>0) {
|
||||
if (tmpInsertText[tmpInsertText.Size()-1] == '\0') {
|
||||
tmpInsertText.PopBack();
|
||||
}
|
||||
}
|
||||
return LocalInsert(pos, tmpInsertText);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -1111,19 +1221,19 @@ int32_t EdnBuf::insert(int32_t pos, etk::VectorType<int8_t> &insertText)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::eventModification(int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText)
|
||||
void EdnBuf::eventModification(int32_t pos, int32_t nInserted, etk::Vector<int8_t> &deletedText)
|
||||
{
|
||||
if( 0 == deletedText.Size()
|
||||
&& 0 == nInserted)
|
||||
{
|
||||
// we do nothing ...
|
||||
//EDN_INFO("EdnBuf::eventModification(pos="<<pos<<", ... , nRestyled=" << nRestyled << ", deletedText=\"" << textDisplay << "\");");
|
||||
//APPL_INFO("EdnBuf::eventModification(pos="<<pos<<", ... , nRestyled=" << nRestyled << ", deletedText=\"" << textDisplay << "\");");
|
||||
} else {
|
||||
EDN_INFO("(pos="<<pos<<", nDeleted="<<deletedText.Size()<<", nInserted=" << nInserted << ", deletedText=\"xx???xx\");");
|
||||
APPL_INFO("(pos="<<pos<<", nDeleted="<<deletedText.Size()<<", nInserted=" << nInserted << ", deletedText=\"xx???xx\");");
|
||||
// update the number of lines :
|
||||
//CountNumberOfLines(); //==> not efficent methode ...
|
||||
// ==> better methode : just update the number of line added and removed ...
|
||||
//EDN_INFO(" add=" << CountLines(pos, pos+nInserted) << " lines | remove="<< CountLines(deletedText) << " lines");
|
||||
//APPL_INFO(" add=" << CountLines(pos, pos+nInserted) << " lines | remove="<< CountLines(deletedText) << " lines");
|
||||
m_nbLine += CountLines(pos, pos+nInserted) - CountLines(deletedText);
|
||||
// Update histories
|
||||
if (false == m_isUndoProcessing) {
|
@@ -58,16 +58,8 @@ typedef struct {
|
||||
int32_t rectEnd; //!< Indent of right edge of rect. selection
|
||||
} selection;
|
||||
|
||||
typedef enum{
|
||||
SELECTION_PRIMARY,
|
||||
SELECTION_SECONDARY,
|
||||
SELECTION_HIGHTLIGHT,
|
||||
SELECTION_SIZE
|
||||
}selectionType_te;
|
||||
|
||||
|
||||
typedef struct {
|
||||
etk::VectorType<colorInformation_ts> HLData;
|
||||
etk::Vector<colorInformation_ts> HLData;
|
||||
int32_t posHLPass1;
|
||||
int32_t posHLPass2;
|
||||
}displayHLData_ts;
|
||||
@@ -82,21 +74,24 @@ class EdnBuf {
|
||||
// destructer
|
||||
~EdnBuf(void);
|
||||
// public function :
|
||||
void GetAll( etk::VectorType<int8_t> &text);
|
||||
void SetAll( etk::VectorType<int8_t> &text);
|
||||
void GetRange( int32_t start, int32_t end, etk::VectorType<int8_t> &output);
|
||||
void GetAll( etk::Vector<int8_t> &text);
|
||||
void SetAll( etk::Vector<int8_t> &text);
|
||||
void GetRange( int32_t start, int32_t end, etk::Vector<int8_t> &output);
|
||||
void GetRange( int32_t start, int32_t end, etk::UString &output);
|
||||
bool DumpIn( FILE *myFile);
|
||||
bool DumpFrom( FILE *myFile);
|
||||
// replace with operator [] ...
|
||||
int8_t operator[] (int32_t);
|
||||
void Insert( int32_t pos, etk::VectorType<int8_t> &insertText);
|
||||
void Replace( int32_t start, int32_t end, etk::VectorType<int8_t> &insertText);
|
||||
int32_t Insert( int32_t pos, etk::Vector<int8_t> &insertText);
|
||||
int32_t Insert( int32_t pos, etk::UString &insertText);
|
||||
int32_t Replace( int32_t start, int32_t end, etk::Vector<int8_t> &insertText);
|
||||
int32_t Replace( int32_t start, int32_t end, etk::UString &insertText);
|
||||
void Remove( int32_t start, int32_t end);
|
||||
int32_t Indent( selectionType_te select);
|
||||
int32_t UnIndent( selectionType_te select);
|
||||
int32_t Indent( void);
|
||||
int32_t UnIndent( void);
|
||||
|
||||
|
||||
void GetLineText( int32_t pos, etk::VectorType<int8_t> &text);
|
||||
void GetLineText( int32_t pos, etk::Vector<int8_t> &text);
|
||||
int32_t StartOfLine( int32_t pos);
|
||||
int32_t EndOfLine( int32_t pos);
|
||||
|
||||
@@ -108,37 +103,38 @@ class EdnBuf {
|
||||
int32_t CountForwardDispChars( int32_t lineStartPos, int32_t nChars);
|
||||
int32_t CountLines( int32_t startPos, int32_t endPos);
|
||||
int32_t CountLines( void);
|
||||
int32_t CountLines( etk::VectorType<int8_t> &data);
|
||||
int32_t CountLines( etk::Vector<int8_t> &data);
|
||||
int32_t CountForwardNLines( int32_t startPos, int32_t nLines);
|
||||
int32_t CountBackwardNLines( int32_t startPos, int32_t nLines);
|
||||
|
||||
bool SearchForward( int32_t startPos, etk::VectorType<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive = true);
|
||||
bool SearchBackward( int32_t startPos, etk::VectorType<int8_t> &searchVect, int32_t *foundPos, bool caseSensitive = true);
|
||||
bool SearchForward( int32_t startPos, etk::UString &search, int32_t *foundPos, int32_t *foundPosEnd, bool caseSensitive = true);
|
||||
bool SearchBackward( int32_t startPos, etk::UString &search, int32_t *foundPos, int32_t *foundPosEnd, bool caseSensitive = true);
|
||||
bool SearchForward( int32_t startPos, char searchChar, int32_t *foundPos);
|
||||
bool SearchBackward( int32_t startPos, char searchChar, int32_t *foundPos);
|
||||
bool SelectAround( int32_t startPos, int32_t &beginPos, int32_t &endPos);
|
||||
|
||||
// Buffer Size system :
|
||||
int32_t Size(void) { return m_data.Size(); };
|
||||
int32_t NumberOfLines(void) {return m_nbLine;};
|
||||
int32_t NumberOfLines(void) { return m_nbLine; };
|
||||
|
||||
// -----------------------------------------
|
||||
// selection remember...
|
||||
// -----------------------------------------
|
||||
public:
|
||||
bool SelectHasSelection( selectionType_te select);
|
||||
void Select( selectionType_te select, int32_t start, int32_t end);
|
||||
void Unselect( selectionType_te select);
|
||||
void RectSelect( selectionType_te select, int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd);
|
||||
bool GetSelectionPos( selectionType_te select, int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd);
|
||||
void GetSelectionText( selectionType_te select, etk::VectorType<int8_t> &text);
|
||||
void RemoveSelected( selectionType_te select);
|
||||
void ReplaceSelected( selectionType_te select, etk::VectorType<int8_t> &text);
|
||||
bool SelectHasSelection(void);
|
||||
void Select( int32_t start, int32_t end);
|
||||
void Unselect( void);
|
||||
void RectSelect( int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd);
|
||||
bool GetSelectionPos( int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd);
|
||||
void GetSelectionText( etk::Vector<int8_t> &text);
|
||||
void GetSelectionText( etk::UString &text);
|
||||
void RemoveSelected( void);
|
||||
int32_t ReplaceSelected( etk::Vector<int8_t> &text);
|
||||
int32_t ReplaceSelected( etk::UString &text);
|
||||
private:
|
||||
// current selection of the buffer
|
||||
selection m_selectionList[SELECTION_SIZE]; //!< Selection area of the buffer
|
||||
void UpdateSelection( selectionType_te select, int32_t pos, int32_t nDeleted, int32_t nInserted);
|
||||
void UpdateSelections( int32_t pos, int32_t nDeleted, int32_t nInserted);
|
||||
selection m_selectionList; //!< Selection area of the buffer
|
||||
void UpdateSelection( int32_t pos, int32_t nDeleted, int32_t nInserted);
|
||||
|
||||
// -----------------------------------------
|
||||
// History section :
|
||||
@@ -149,15 +145,15 @@ class EdnBuf {
|
||||
private:
|
||||
bool m_isUndoProcessing;
|
||||
bool m_isRedoProcessing;
|
||||
etk::VectorType<EdnBufHistory*> m_historyUndo;
|
||||
etk::VectorType<EdnBufHistory*> m_historyRedo;
|
||||
etk::Vector<EdnBufHistory*> m_historyUndo;
|
||||
etk::Vector<EdnBufHistory*> m_historyRedo;
|
||||
|
||||
// -----------------------------------------
|
||||
// hightlight section :
|
||||
// -----------------------------------------
|
||||
private:
|
||||
Highlight * m_Highlight; //!< internal link with the Highlight system
|
||||
etk::VectorType<colorInformation_ts> m_HLDataPass1; //!< colorisation position in the current buffer pass 1
|
||||
etk::Vector<colorInformation_ts> m_HLDataPass1; //!< colorisation position in the current buffer pass 1
|
||||
void RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded);
|
||||
void GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos=0);
|
||||
void CleanHighLight(void);
|
||||
@@ -201,10 +197,11 @@ class EdnBuf {
|
||||
void removeSelected( selection &sel);
|
||||
void replaceSelected( selection &sel, const char *text);
|
||||
|
||||
void eventModification( int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText);
|
||||
void eventModification( int32_t pos, int32_t nInserted, etk::Vector<int8_t> &deletedText);
|
||||
|
||||
|
||||
int32_t insert( int32_t pos, etk::VectorType<int8_t> &insertText);
|
||||
int32_t LocalInsert( int32_t pos, etk::Vector<int8_t> &insertText);
|
||||
int32_t LocalInsert( int32_t pos, etk::UString &insertText);
|
||||
|
||||
bool charMatch( char first, char second, bool caseSensitive = true);
|
||||
};
|
@@ -24,8 +24,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <EdnBufHistory.h>
|
||||
|
||||
|
||||
@@ -34,22 +34,22 @@
|
||||
|
||||
EdnBufHistory::EdnBufHistory(void)
|
||||
{
|
||||
//EDN_INFO("EdnBufHistory new");
|
||||
//APPL_INFO("EdnBufHistory new");
|
||||
m_pos = 0;
|
||||
m_nInserted = 0;
|
||||
}
|
||||
|
||||
EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText)
|
||||
EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, etk::Vector<int8_t> &deletedText)
|
||||
{
|
||||
//EDN_INFO("EdnBufHistory new + data");
|
||||
//APPL_INFO("EdnBufHistory new + data");
|
||||
m_pos = pos;
|
||||
m_nInserted = nInserted;
|
||||
m_deletedText = deletedText;
|
||||
}
|
||||
|
||||
void EdnBufHistory::Set(int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText)
|
||||
void EdnBufHistory::Set(int32_t pos, int32_t nInserted, etk::Vector<int8_t> &deletedText)
|
||||
{
|
||||
//EDN_INFO("EdnBufHistory new + data");
|
||||
//APPL_INFO("EdnBufHistory new + data");
|
||||
m_pos = pos;
|
||||
m_nInserted = nInserted;
|
||||
m_deletedText = deletedText;
|
||||
@@ -75,7 +75,7 @@ int32_t EdnBufHistory::getnbInserted(void)
|
||||
return m_nInserted;
|
||||
}
|
||||
|
||||
void EdnBufHistory::getData(etk::VectorType<int8_t> &deletedText)
|
||||
void EdnBufHistory::getData(etk::Vector<int8_t> &deletedText)
|
||||
{
|
||||
deletedText = m_deletedText;
|
||||
}
|
@@ -27,22 +27,22 @@
|
||||
#define __EDN_BUFFER_HISTORY_H__
|
||||
|
||||
|
||||
#include <etk/VectorType.h>
|
||||
#include <etk/Vector.h>
|
||||
|
||||
class EdnBufHistory{
|
||||
public:
|
||||
EdnBufHistory(void);
|
||||
EdnBufHistory(int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText);
|
||||
EdnBufHistory(int32_t pos, int32_t nInserted, etk::Vector<int8_t> &deletedText);
|
||||
~EdnBufHistory(void);
|
||||
void Set(int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText);
|
||||
void Set(int32_t pos, int32_t nInserted, etk::Vector<int8_t> &deletedText);
|
||||
int32_t getPos(void);
|
||||
int32_t getnbDeleted(void);
|
||||
int32_t getnbInserted(void);
|
||||
void getData(etk::VectorType<int8_t> &deletedText);
|
||||
void getData(etk::Vector<int8_t> &deletedText);
|
||||
private:
|
||||
int32_t m_pos;
|
||||
int32_t m_nInserted;
|
||||
etk::VectorType<int8_t> m_deletedText;
|
||||
etk::Vector<int8_t> m_deletedText;
|
||||
};
|
||||
|
||||
#endif
|
@@ -23,8 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <EdnBuf.h>
|
||||
|
||||
|
||||
@@ -57,7 +57,7 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
return;
|
||||
}
|
||||
// normal case
|
||||
//EDN_INFO("(pos="<<pos<<", nbDeleted="<<nbDeleted<<", nbAdded=" << nbAdded << "\");");
|
||||
//APPL_INFO("(pos="<<pos<<", nbDeleted="<<nbDeleted<<", nbAdded=" << nbAdded << "\");");
|
||||
int32_t i;
|
||||
/*
|
||||
for (i=0; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||
@@ -65,7 +65,7 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
if (NULL != m_HLDataPass1[i].patern ) {
|
||||
ploppp = ((HighlightPattern*)m_HLDataPass1[i].patern)->GetName();
|
||||
}
|
||||
EDN_DEBUG("HighLight (previous) element id=" << i << " S=" << m_HLDataPass1[i].beginStart << " E=" << m_HLDataPass1[i].endStop << " patern name=" << ploppp );
|
||||
APPL_DEBUG("HighLight (previous) element id=" << i << " S=" << m_HLDataPass1[i].beginStart << " E=" << m_HLDataPass1[i].endStop << " patern name=" << ploppp );
|
||||
}
|
||||
*/
|
||||
int32_t posEnd = pos + nbDeleted;
|
||||
@@ -85,31 +85,31 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
} else if(-1 == startId) {
|
||||
if (0 == stopId){
|
||||
m_HLDataPass1.Erase(0);
|
||||
//EDN_DEBUG("1 * Erase 0");
|
||||
//APPL_DEBUG("1 * Erase 0");
|
||||
} else {
|
||||
m_HLDataPass1.EraseLen(0,stopId);
|
||||
//EDN_DEBUG("2 * Erase 0->" << stopId);
|
||||
//APPL_DEBUG("2 * Erase 0->" << stopId);
|
||||
}
|
||||
} else if(-1 == stopId) {
|
||||
//EDN_DEBUG("3 * Erase " << startId+1 << "-> end");
|
||||
//APPL_DEBUG("3 * Erase " << startId+1 << "-> end");
|
||||
m_HLDataPass1.EraseLen(startId+1, m_HLDataPass1.Size() - startId);
|
||||
stopId = -1;
|
||||
} else {
|
||||
int32_t currentSize = m_HLDataPass1.Size();
|
||||
//EDN_DEBUG("4 * Erase " << startId+1 << "->" << stopId << " in " << currentSize << " elements" );
|
||||
//APPL_DEBUG("4 * Erase " << startId+1 << "->" << stopId << " in " << currentSize << " elements" );
|
||||
m_HLDataPass1.EraseLen(startId+1, stopId - startId);
|
||||
if (stopId == currentSize-1) {
|
||||
stopId = -1;
|
||||
}
|
||||
}
|
||||
//EDN_DEBUG("new size=" << (int32_t)m_HLDataPass1.Size()-1);
|
||||
//APPL_DEBUG("new size=" << (int32_t)m_HLDataPass1.Size()-1);
|
||||
/*
|
||||
for (i=0; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||
etk::UString ploppp;
|
||||
if (NULL != m_HLDataPass1[i].patern ) {
|
||||
ploppp = ((HighlightPattern*)m_HLDataPass1[i].patern)->GetName();
|
||||
}
|
||||
EDN_DEBUG("HighLight (Middle) element id=" << i << " S=" << m_HLDataPass1[i].beginStart << " E=" << m_HLDataPass1[i].endStop << " patern name=" << ploppp );
|
||||
APPL_DEBUG("HighLight (Middle) element id=" << i << " S=" << m_HLDataPass1[i].beginStart << " E=" << m_HLDataPass1[i].endStop << " patern name=" << ploppp );
|
||||
}
|
||||
*/
|
||||
// update position after the range position :
|
||||
@@ -120,7 +120,7 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
elemStart = startId+1;
|
||||
}
|
||||
for (i=elemStart; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||
//EDN_DEBUG("move element=" << i);
|
||||
//APPL_DEBUG("move element=" << i);
|
||||
m_HLDataPass1[i].beginStart += nbAdded - nbDeleted;
|
||||
m_HLDataPass1[i].beginStop += nbAdded - nbDeleted;
|
||||
m_HLDataPass1[i].endStart += nbAdded - nbDeleted;
|
||||
@@ -130,16 +130,16 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
if( -1 == startId
|
||||
&& -1 == stopId)
|
||||
{
|
||||
//EDN_DEBUG("******* Regenerate ALL");
|
||||
//APPL_DEBUG("******* Regenerate ALL");
|
||||
GenerateHighLightAt(0, m_data.Size());
|
||||
} else if(-1 == startId) {
|
||||
//EDN_DEBUG("******* Regenerate START");
|
||||
//APPL_DEBUG("******* Regenerate START");
|
||||
GenerateHighLightAt(0, m_HLDataPass1[0].beginStart, 0);
|
||||
} else if(-1 == stopId) {
|
||||
//EDN_DEBUG("******* Regenerate STOP");
|
||||
//APPL_DEBUG("******* Regenerate STOP");
|
||||
GenerateHighLightAt(m_HLDataPass1[m_HLDataPass1.Size() -1].endStop, m_data.Size(), m_HLDataPass1.Size());
|
||||
} else {
|
||||
//EDN_DEBUG("******* Regenerate RANGE");
|
||||
//APPL_DEBUG("******* Regenerate RANGE");
|
||||
GenerateHighLightAt(m_HLDataPass1[startId].endStop, m_HLDataPass1[startId+1].beginStart, startId+1);
|
||||
}
|
||||
} else {
|
||||
@@ -152,12 +152,12 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
if (NULL != m_HLDataPass1[i].patern ) {
|
||||
ploppp = ((HighlightPattern*)m_HLDataPass1[i].patern)->GetName();
|
||||
}
|
||||
EDN_DEBUG("HighLight (end) element id=" << i << " S=" << m_HLDataPass1[i].beginStart << " E=" << m_HLDataPass1[i].endStop << " patern name=" << ploppp );
|
||||
APPL_DEBUG("HighLight (end) element id=" << i << " S=" << m_HLDataPass1[i].beginStart << " E=" << m_HLDataPass1[i].endStop << " patern name=" << ploppp );
|
||||
}
|
||||
*/
|
||||
//GTimeVal timeStop;
|
||||
//g_get_current_time(&timeStop);
|
||||
//EDN_DEBUG("HL General = " << timeStop.tv_usec - timeStart.tv_usec << " micro-s");
|
||||
//APPL_DEBUG("HL General = " << timeStop.tv_usec - timeStart.tv_usec << " micro-s");
|
||||
}
|
||||
|
||||
void EdnBuf::FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t &startId, int32_t &stopId, bool backPreviousNotEnded)
|
||||
@@ -232,14 +232,14 @@ void EdnBuf::FindMainHighLightPosition(int32_t startPos, int32_t endPos, int32_t
|
||||
}
|
||||
/*
|
||||
if (-1 != startId && startId < (int32_t)m_HLDataPass1.Size()) {
|
||||
EDN_DEBUG("==> BEGIN : start="<<m_HLDataPass1[startId].beginStart<<", stop="<<m_HLDataPass1[startId].endStop<<" id=" << startId << "/" << (int32_t)m_HLDataPass1.Size()-1);
|
||||
APPL_DEBUG("==> BEGIN : start="<<m_HLDataPass1[startId].beginStart<<", stop="<<m_HLDataPass1[startId].endStop<<" id=" << startId << "/" << (int32_t)m_HLDataPass1.Size()-1);
|
||||
} else {
|
||||
EDN_DEBUG("==> BEGIN : start=???, stop=??? id=" << startId);
|
||||
APPL_DEBUG("==> BEGIN : start=???, stop=??? id=" << startId);
|
||||
}
|
||||
if (-1 != stopId && stopId < (int32_t)m_HLDataPass1.Size()) {
|
||||
EDN_DEBUG("==> END : start="<<m_HLDataPass1[stopId].beginStart<<", stop="<<m_HLDataPass1[stopId].endStop<<" id=" << stopId<< "/" << (int32_t)m_HLDataPass1.Size()-1);
|
||||
APPL_DEBUG("==> END : start="<<m_HLDataPass1[stopId].beginStart<<", stop="<<m_HLDataPass1[stopId].endStop<<" id=" << stopId<< "/" << (int32_t)m_HLDataPass1.Size()-1);
|
||||
} else {
|
||||
EDN_DEBUG("==> END : start=???, stop=??? id=" << stopId);
|
||||
APPL_DEBUG("==> END : start=???, stop=??? id=" << stopId);
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -252,7 +252,7 @@ void EdnBuf::GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos)
|
||||
if (NULL == m_Highlight) {
|
||||
return;
|
||||
}
|
||||
//EDN_DEBUG("area : ("<<pos<<","<<endPos<<") insert at : " << addinPos);
|
||||
//APPL_DEBUG("area : ("<<pos<<","<<endPos<<") insert at : " << addinPos);
|
||||
m_Highlight->Parse(pos, endPos, m_HLDataPass1, addinPos, m_data);
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ void EdnBuf::CleanHighLight(void)
|
||||
colorInformation_ts *EdnBuf::GetElementColorAtPosition(int32_t pos, int32_t &starPos)
|
||||
{
|
||||
int32_t i;
|
||||
int32_t start = edn_max(0, starPos-1);
|
||||
int32_t start = etk_max(0, starPos-1);
|
||||
for (i=start; i<(int32_t)m_HLDataPass1.Size(); i++) {
|
||||
starPos = i;
|
||||
if( m_HLDataPass1[i].beginStart <= pos
|
||||
@@ -301,42 +301,42 @@ void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart,
|
||||
FindMainHighLightPosition(HLStart, HLStop, startId, stopId, true);
|
||||
|
||||
int32_t k;
|
||||
//EDN_DEBUG("List of section between : "<< startId << " & " << stopId);
|
||||
//APPL_DEBUG("List of section between : "<< startId << " & " << stopId);
|
||||
int32_t endSearch = stopId+1;
|
||||
if (-1 == stopId) {
|
||||
endSearch = m_HLDataPass1.Size();
|
||||
}
|
||||
for (k=edn_max(startId, 0); k<endSearch; k++) {
|
||||
for (k=etk_max(startId, 0); k<endSearch; k++) {
|
||||
// empty section :
|
||||
if (0==k) {
|
||||
if (HLStart < m_HLDataPass1[k].beginStart) {
|
||||
//EDN_DEBUG(" ==> (empty section 1 ) k="<<k<<" start="<<HLStart<<" stop="<<m_HLDataPass1[k].beginStart );
|
||||
//APPL_DEBUG(" ==> (empty section 1 ) k="<<k<<" start="<<HLStart<<" stop="<<m_HLDataPass1[k].beginStart );
|
||||
m_Highlight->Parse2(HLStart,
|
||||
m_HLDataPass1[k].beginStart,
|
||||
MData.HLData,
|
||||
m_data);
|
||||
} // else : nothing to do ...
|
||||
} else {
|
||||
//EDN_DEBUG(" ==> (empty section 2 ) k="<<k<<" start="<<m_HLDataPass1[k-1].endStop<<" stop="<<m_HLDataPass1[k].beginStart );
|
||||
//APPL_DEBUG(" ==> (empty section 2 ) k="<<k<<" start="<<m_HLDataPass1[k-1].endStop<<" stop="<<m_HLDataPass1[k].beginStart );
|
||||
m_Highlight->Parse2(m_HLDataPass1[k-1].endStop,
|
||||
m_HLDataPass1[k].beginStart,
|
||||
MData.HLData,
|
||||
m_data);
|
||||
}
|
||||
// under section :
|
||||
//EDN_DEBUG(" ==> (under section ) k="<<k<<" start="<<m_HLDataPass1[k].beginStart<<" stop="<<m_HLDataPass1[k].endStop << " subSectionOfID=" << 99999999);
|
||||
//APPL_DEBUG(" ==> (under section ) k="<<k<<" start="<<m_HLDataPass1[k].beginStart<<" stop="<<m_HLDataPass1[k].endStop << " subSectionOfID=" << 99999999);
|
||||
// TODO : ...
|
||||
}
|
||||
if (endSearch == (int32_t)m_HLDataPass1.Size() ){
|
||||
//if( k < (int32_t)m_HLDataPass1.Size()) {
|
||||
if (m_HLDataPass1.Size() != 0) {
|
||||
//EDN_DEBUG(" ==> (empty section 3 ) k="<<k<<" start="<<m_HLDataPass1[k-1].endStop<<" stop="<<HLStop );
|
||||
//APPL_DEBUG(" ==> (empty section 3 ) k="<<k<<" start="<<m_HLDataPass1[k-1].endStop<<" stop="<<HLStop );
|
||||
m_Highlight->Parse2(m_HLDataPass1[k-1].endStop,
|
||||
HLStop,
|
||||
MData.HLData,
|
||||
m_data);
|
||||
} else {
|
||||
//EDN_DEBUG(" ==> (empty section 4 ) k="<<k<<" start=0 stop="<<HLStop );
|
||||
//APPL_DEBUG(" ==> (empty section 4 ) k="<<k<<" start=0 stop="<<HLStop );
|
||||
m_Highlight->Parse2(0,
|
||||
HLStop,
|
||||
MData.HLData,
|
||||
@@ -346,7 +346,7 @@ void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart,
|
||||
|
||||
//GTimeVal timeStop;
|
||||
//g_get_current_time(&timeStop);
|
||||
//EDN_DEBUG("Display reAnnalyse = " << timeStop.tv_usec - timeStart.tv_usec << " micro-s");
|
||||
//APPL_DEBUG("Display reAnnalyse = " << timeStop.tv_usec - timeStart.tv_usec << " micro-s");
|
||||
|
||||
}
|
||||
|
||||
@@ -354,7 +354,7 @@ void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart,
|
||||
colorInformation_ts * EdnBuf::GetElementColorAtPosition(displayHLData_ts & MData, int32_t pos)
|
||||
{
|
||||
int32_t i;
|
||||
int32_t start = edn_max(0, MData.posHLPass2-1);
|
||||
int32_t start = etk_max(0, MData.posHLPass2-1);
|
||||
for (i=start; i<(int32_t)MData.HLData.Size(); i++) {
|
||||
MData.posHLPass2 = i;
|
||||
if( MData.HLData[i].beginStart <= pos
|
||||
@@ -367,4 +367,4 @@ colorInformation_ts * EdnBuf::GetElementColorAtPosition(displayHLData_ts & MData
|
||||
}
|
||||
}
|
||||
return GetElementColorAtPosition(pos, MData.posHLPass1);
|
||||
}
|
||||
}
|
@@ -23,8 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <EdnBuf.h>
|
||||
|
||||
|
||||
@@ -37,29 +37,29 @@
|
||||
int32_t EdnBuf::Undo(void)
|
||||
{
|
||||
int32_t nbElement = m_historyUndo.Size();
|
||||
//EDN_DEBUG("EdnBuf::Undo Request id="<<nbElement);
|
||||
//APPL_DEBUG("EdnBuf::Undo Request id="<<nbElement);
|
||||
int32_t posDest = -1;
|
||||
if (0 == nbElement) {
|
||||
// nothing to do ...
|
||||
EDN_ERROR("EdnBuf::Undo No more History");
|
||||
APPL_ERROR("EdnBuf::Undo No more History");
|
||||
return -1;
|
||||
}
|
||||
nbElement--;
|
||||
if (m_historyUndo[nbElement] == NULL) {
|
||||
EDN_ERROR("EdnBuf::Undo Find empty history ==> remove it");
|
||||
APPL_ERROR("EdnBuf::Undo Find empty history ==> remove it");
|
||||
m_historyUndo.PopBack();
|
||||
return -1;
|
||||
}
|
||||
int32_t pos = m_historyUndo[nbElement]->getPos();
|
||||
int32_t nbDeleted = m_historyUndo[nbElement]->getnbDeleted();
|
||||
int32_t nbInserted = m_historyUndo[nbElement]->getnbInserted();
|
||||
etk::VectorType<int8_t> deletedText;
|
||||
etk::Vector<int8_t> deletedText;
|
||||
m_historyUndo[nbElement]->getData(deletedText);
|
||||
m_isUndoProcessing = true;
|
||||
if (0 == nbInserted) {
|
||||
// just add data at position ...
|
||||
if (0 == nbDeleted) {
|
||||
EDN_ERROR("EdnBuf::Undo nothing to do in UNDO");
|
||||
APPL_ERROR("EdnBuf::Undo nothing to do in UNDO");
|
||||
} else {
|
||||
Insert(pos, deletedText);
|
||||
posDest = pos + nbDeleted;
|
||||
@@ -85,29 +85,29 @@ int32_t EdnBuf::Undo(void)
|
||||
int32_t EdnBuf::Redo(void)
|
||||
{
|
||||
int32_t nbElement = m_historyRedo.Size();
|
||||
//EDN_DEBUG("EdnBuf::Redo Request id="<<nbElement);
|
||||
//APPL_DEBUG("EdnBuf::Redo Request id="<<nbElement);
|
||||
int32_t posDest = -1;
|
||||
if (0 == nbElement) {
|
||||
// nothing to do ...
|
||||
EDN_ERROR("EdnBuf::Redo No more History");
|
||||
APPL_ERROR("EdnBuf::Redo No more History");
|
||||
return -1;
|
||||
}
|
||||
nbElement--;
|
||||
if (m_historyRedo[nbElement] == NULL) {
|
||||
EDN_ERROR("EdnBuf::Redo Find empty history ==> remove it");
|
||||
APPL_ERROR("EdnBuf::Redo Find empty history ==> remove it");
|
||||
m_historyRedo.PopBack();
|
||||
return -1;
|
||||
}
|
||||
int32_t pos = m_historyRedo[nbElement]->getPos();
|
||||
int32_t nbDeleted = m_historyRedo[nbElement]->getnbDeleted();
|
||||
int32_t nbInserted = m_historyRedo[nbElement]->getnbInserted();
|
||||
etk::VectorType<int8_t> deletedText;
|
||||
etk::Vector<int8_t> deletedText;
|
||||
m_historyRedo[nbElement]->getData(deletedText);
|
||||
m_isRedoProcessing = true;
|
||||
if (0 == nbInserted) {
|
||||
// just add data at position ...
|
||||
if (0 == nbDeleted) {
|
||||
EDN_ERROR("EdnBuf::Redo nothing to do in REDO");
|
||||
APPL_ERROR("EdnBuf::Redo nothing to do in REDO");
|
||||
} else {
|
||||
Insert(pos, deletedText);
|
||||
posDest = pos + nbDeleted;
|
310
Sources/appl/Buffer/EdnBuf/EdnBuf_Selection.cpp
Normal file
@@ -0,0 +1,310 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <EdnBuf.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "EdnBuf{Selection}"
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool EdnBuf::SelectHasSelection(void)
|
||||
{
|
||||
return m_selectionList.selected;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::Select(int32_t start, int32_t end)
|
||||
{
|
||||
//selection oldSelection = m_selectionList[select];
|
||||
m_selectionList.selected = start != end;
|
||||
m_selectionList.zeroWidth = (start == end) ? true : false;
|
||||
m_selectionList.rectangular = false;
|
||||
m_selectionList.start = etk_min(start, end);
|
||||
m_selectionList.end = etk_max(start, end);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::Unselect(void)
|
||||
{
|
||||
//selection oldSelection = m_selectionList[select];
|
||||
m_selectionList.selected = false;
|
||||
m_selectionList.zeroWidth = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
* @param[in,out] ---
|
||||
* @param[in,out] ---
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::RectSelect(int32_t start, int32_t end, int32_t rectStart, int32_t rectEnd)
|
||||
{
|
||||
m_selectionList.selected = rectStart < rectEnd;
|
||||
m_selectionList.zeroWidth = (rectStart == rectEnd) ? false : true;
|
||||
m_selectionList.rectangular = true;
|
||||
m_selectionList.start = start;
|
||||
m_selectionList.end = end;
|
||||
m_selectionList.rectStart = rectStart;
|
||||
m_selectionList.rectEnd = rectEnd;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool EdnBuf::GetSelectionPos(int32_t &start, int32_t &end, bool &isRect, int32_t &rectStart, int32_t &rectEnd)
|
||||
{
|
||||
/* Always fill in the parameters (zero-width can be requested too). */
|
||||
isRect = m_selectionList.rectangular;
|
||||
start = m_selectionList.start;
|
||||
end = m_selectionList.end;
|
||||
if (m_selectionList.rectangular) {
|
||||
rectStart = m_selectionList.rectStart;
|
||||
rectEnd = m_selectionList.rectEnd;
|
||||
}
|
||||
return m_selectionList.selected;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::GetSelectionText(etk::Vector<int8_t> &text)
|
||||
{
|
||||
int32_t start, end, rectStart, rectEnd;
|
||||
bool isRect;
|
||||
// remove output data
|
||||
text.Clear();
|
||||
|
||||
bool isSelected = GetSelectionPos(start, end, isRect, rectStart, rectEnd);
|
||||
|
||||
// No data selected ...
|
||||
if (false == isSelected) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Rectangular selection
|
||||
if (true == isRect) {
|
||||
//GetTextInRect(start, end, rectStart, rectEnd, text);
|
||||
// TODO : ...
|
||||
} else {
|
||||
GetRange(start, end, text);
|
||||
}
|
||||
}
|
||||
void EdnBuf::GetSelectionText(etk::UString &text)
|
||||
{
|
||||
int32_t start, end, rectStart, rectEnd;
|
||||
bool isRect;
|
||||
// remove output data
|
||||
text = "";
|
||||
|
||||
bool isSelected = GetSelectionPos(start, end, isRect, rectStart, rectEnd);
|
||||
|
||||
// No data selected ...
|
||||
if (false == isSelected) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Rectangular selection
|
||||
if (true == isRect) {
|
||||
//GetTextInRect(start, end, rectStart, rectEnd, text);
|
||||
// TODO : ...
|
||||
} else {
|
||||
GetRange(start, end, text);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::RemoveSelected(void)
|
||||
{
|
||||
int32_t start, end;
|
||||
int32_t rectStart, rectEnd;
|
||||
bool isRect;
|
||||
bool isSelected = GetSelectionPos(start, end, isRect, rectStart, rectEnd);
|
||||
|
||||
// No data selected ...
|
||||
if (false == isSelected) {
|
||||
return;
|
||||
}
|
||||
// Rectangular selection
|
||||
if (true == isRect) {
|
||||
//RemoveRect(start, end, rectStart, rectEnd);
|
||||
// TODO : ...
|
||||
} else {
|
||||
Remove(start, end);
|
||||
}
|
||||
Unselect();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t EdnBuf::ReplaceSelected(etk::Vector<int8_t> &text)
|
||||
{
|
||||
int32_t start, end, rectStart, rectEnd;
|
||||
bool isRect;
|
||||
bool isSelected = GetSelectionPos(start, end, isRect, rectStart, rectEnd);
|
||||
|
||||
// No data selected ...
|
||||
if (false == isSelected) {
|
||||
return 0;
|
||||
}
|
||||
int32_t returnSize = 0;
|
||||
// Rectangular selection
|
||||
if (true == isRect) {
|
||||
//ReplaceRect(start, end, rectStart, rectEnd, text);
|
||||
// TODO : ...
|
||||
} else {
|
||||
returnSize = Replace(start, end, text);
|
||||
}
|
||||
// Clean selection
|
||||
m_selectionList.selected = false;
|
||||
return returnSize;
|
||||
}
|
||||
int32_t EdnBuf::ReplaceSelected(etk::UString &text)
|
||||
{
|
||||
int32_t start, end, rectStart, rectEnd;
|
||||
bool isRect;
|
||||
bool isSelected = GetSelectionPos(start, end, isRect, rectStart, rectEnd);
|
||||
|
||||
// No data selected ...
|
||||
if (false == isSelected) {
|
||||
return 0;
|
||||
}
|
||||
int32_t returnSize = 0;
|
||||
// Rectangular selection
|
||||
if (true == isRect) {
|
||||
//ReplaceRect(start, end, rectStart, rectEnd, text);
|
||||
// TODO : ...
|
||||
} else {
|
||||
returnSize = Replace(start, end, text);
|
||||
}
|
||||
// Clean selection
|
||||
m_selectionList.selected = false;
|
||||
return returnSize;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
** Update an individual selection for changes in the corresponding text
|
||||
*/
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnBuf::UpdateSelection(int32_t pos, int32_t nDeleted, int32_t nInserted)
|
||||
{
|
||||
if( ( false == m_selectionList.selected
|
||||
&& false == m_selectionList.zeroWidth)
|
||||
|| pos > m_selectionList.end )
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (pos+nDeleted <= m_selectionList.start) {
|
||||
m_selectionList.start += nInserted - nDeleted;
|
||||
m_selectionList.end += nInserted - nDeleted;
|
||||
} else if( pos <= m_selectionList.start
|
||||
&& pos+nDeleted >= m_selectionList.end)
|
||||
{
|
||||
m_selectionList.start = pos;
|
||||
m_selectionList.end = pos;
|
||||
m_selectionList.selected = false;
|
||||
m_selectionList.zeroWidth = false;
|
||||
} else if( pos <= m_selectionList.start
|
||||
&& pos+nDeleted < m_selectionList.end)
|
||||
{
|
||||
m_selectionList.start = pos;
|
||||
m_selectionList.end = nInserted + m_selectionList.end - nDeleted;
|
||||
} else if(pos < m_selectionList.end) {
|
||||
m_selectionList.end += nInserted - nDeleted;
|
||||
if (m_selectionList.end <= m_selectionList.start) {
|
||||
m_selectionList.selected = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -23,9 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <toolsMemory.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <EdnVectorBuf.h>
|
||||
|
||||
#undef __class__
|
||||
@@ -66,8 +65,8 @@ EdnVectorBuf::EdnVectorBuf(const EdnVectorBuf & Evb)
|
||||
m_gapEnd = Evb.m_gapEnd;
|
||||
|
||||
// allocate all same data
|
||||
EDN_MALLOC(m_data, m_allocated, int8_t);
|
||||
EDN_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
m_data = (int8_t *)malloc( m_allocated * sizeof(int8_t) );
|
||||
APPL_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
// Copy all data ...
|
||||
memcpy(m_data, Evb.m_data, m_allocated * sizeof(int8_t) );
|
||||
}
|
||||
@@ -84,7 +83,7 @@ EdnVectorBuf::EdnVectorBuf(const EdnVectorBuf & Evb)
|
||||
EdnVectorBuf::~EdnVectorBuf()
|
||||
{
|
||||
if (NULL!=m_data) {
|
||||
EDN_FREE(m_data);
|
||||
free(m_data);
|
||||
m_data = NULL;
|
||||
m_allocated = 0;
|
||||
m_gapStart = 0;
|
||||
@@ -146,10 +145,10 @@ bool EdnVectorBuf::DumpFrom(FILE *myFile)
|
||||
|
||||
// insert Data
|
||||
int32_t nbReadData = fread(&m_data[GAP_SIZE_MIN], sizeof(int8_t), length, myFile);
|
||||
EDN_INFO("load data : filesize=" << length << ", readData=" << nbReadData);
|
||||
APPL_INFO("load data : filesize=" << length << ", readData=" << nbReadData);
|
||||
// check ERROR
|
||||
if (nbReadData != length) {
|
||||
EDN_ERROR("load data pb : filesize=" << length << ", readData=" << nbReadData);
|
||||
APPL_ERROR("load data pb : filesize=" << length << ", readData=" << nbReadData);
|
||||
ret = false;
|
||||
}
|
||||
// set the gapsize at the end ...
|
||||
@@ -173,7 +172,7 @@ EdnVectorBuf& EdnVectorBuf::operator=(const EdnVectorBuf & Evb)
|
||||
if( this != &Evb ) // avoid copy to itself
|
||||
{
|
||||
if (NULL!=m_data) {
|
||||
EDN_FREE(m_data);
|
||||
free(m_data);
|
||||
m_data = NULL;
|
||||
}
|
||||
// Set the new value
|
||||
@@ -181,8 +180,8 @@ EdnVectorBuf& EdnVectorBuf::operator=(const EdnVectorBuf & Evb)
|
||||
m_gapStart = Evb.m_gapStart;
|
||||
m_gapEnd = Evb.m_gapEnd;
|
||||
// allocate all same data
|
||||
EDN_MALLOC(m_data, m_allocated, int8_t);
|
||||
EDN_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
m_data = (int8_t *)malloc( m_allocated * sizeof(int8_t) );
|
||||
APPL_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
// Copy all data ...
|
||||
memcpy(m_data, Evb.m_data, m_allocated * sizeof(int8_t) );
|
||||
}
|
||||
@@ -192,7 +191,7 @@ EdnVectorBuf& EdnVectorBuf::operator=(const EdnVectorBuf & Evb)
|
||||
|
||||
int8_t EdnVectorBuf::operator[] (int32_t pos)
|
||||
{
|
||||
EDN_ASSERT(0 <= pos || pos < Size(), "try to read an element non existing");
|
||||
APPL_ASSERT(0 <= pos || pos < Size(), "try to read an element non existing");
|
||||
if (pos < m_gapStart) {
|
||||
return m_data[pos];
|
||||
}
|
||||
@@ -210,7 +209,7 @@ int8_t EdnVectorBuf::operator[] (int32_t pos)
|
||||
*/
|
||||
int8_t& EdnVectorBuf::Get(int32_t pos)
|
||||
{
|
||||
EDN_ASSERT(0 <= pos || pos < Size(), "try to read an element non existing");
|
||||
APPL_ASSERT(0 <= pos || pos < Size(), "try to read an element non existing");
|
||||
if (pos < m_gapStart) {
|
||||
return m_data[pos];
|
||||
}
|
||||
@@ -226,7 +225,7 @@ int8_t& EdnVectorBuf::Get(int32_t pos)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, etk::VectorType<int8_t> &tmpBuffer)
|
||||
void EdnVectorBuf::Get(int32_t pos, int32_t nbElement, etk::Vector<int8_t> &tmpBuffer)
|
||||
{
|
||||
tmpBuffer.Clear();
|
||||
if (pos < m_gapStart) {
|
||||
@@ -283,11 +282,11 @@ void EdnVectorBuf::Remove(int32_t pos, int32_t nbRemoveElement)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
EDN_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
return;
|
||||
}
|
||||
if( pos+nbRemoveElement > Size() ) {
|
||||
EDN_ERROR("Request remove more element than expected in the buffer pos+nbRemoveElement="<<pos+nbRemoveElement<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request remove more element than expected in the buffer pos+nbRemoveElement="<<pos+nbRemoveElement<< " bufferSize="<<Size());
|
||||
return;
|
||||
}
|
||||
if (false == GapMove(pos) ) {
|
||||
@@ -336,17 +335,17 @@ void EdnVectorBuf::ChangeAllocation(int32_t newSize)
|
||||
if (newSize == m_allocated) {
|
||||
return;
|
||||
}
|
||||
EDN_DEBUG("Change Allocation : " << m_allocated << " ==> " << newSize);
|
||||
APPL_DEBUG("Change Allocation : " << m_allocated << " ==> " << newSize);
|
||||
// check if something is allocated :
|
||||
if (NULL == m_data) {
|
||||
// no data allocated ==> request an allocation (might be the first)
|
||||
EDN_MALLOC(m_data, newSize, int8_t);
|
||||
m_data = (int8_t *)malloc( newSize * sizeof(int8_t) );
|
||||
} else {
|
||||
// move datas
|
||||
EDN_REALLOC(m_data, newSize, int8_t);
|
||||
m_data = (int8_t *)realloc( m_data, newSize* sizeof(int8_t) );
|
||||
}
|
||||
// Check result with assert :
|
||||
EDN_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
APPL_ASSERT(NULL!=m_data, "Error in data allocation");
|
||||
// set the new allocation size
|
||||
m_allocated = newSize;
|
||||
}
|
||||
@@ -364,7 +363,7 @@ void EdnVectorBuf::Insert(int32_t pos, const int8_t& item)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
EDN_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
return;
|
||||
}
|
||||
if( 0 == GapSize() ) {
|
||||
@@ -398,11 +397,11 @@ void EdnVectorBuf::Insert(int32_t pos, const int8_t& item)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnVectorBuf::Insert(int32_t pos, etk::VectorType<int8_t>& items)
|
||||
void EdnVectorBuf::Insert(int32_t pos, etk::Vector<int8_t>& items)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
EDN_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
return;
|
||||
}
|
||||
if( items.Size() > GapSize() ) {
|
||||
@@ -434,7 +433,7 @@ void EdnVectorBuf::Replace(int32_t pos, const int8_t& item)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
EDN_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
return;
|
||||
}
|
||||
// just replace the element, not update Gap position
|
||||
@@ -454,15 +453,15 @@ void EdnVectorBuf::Replace(int32_t pos, const int8_t& item)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, etk::VectorType<int8_t>& items)
|
||||
void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, etk::Vector<int8_t>& items)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
EDN_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
return;
|
||||
}
|
||||
if( pos+nbRemoveElement > Size() ) {
|
||||
EDN_ERROR("Request remove more element than expected in the buffer pos+nbRemoveElement="<<pos+nbRemoveElement<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request remove more element than expected in the buffer pos+nbRemoveElement="<<pos+nbRemoveElement<< " bufferSize="<<Size());
|
||||
return;
|
||||
}
|
||||
if (false == GapMove(pos)) {
|
||||
@@ -490,7 +489,7 @@ bool EdnVectorBuf::GapMove(int32_t pos)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
EDN_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
return false;
|
||||
}
|
||||
int32_t gapLen = m_gapEnd - m_gapStart;
|
||||
@@ -517,7 +516,7 @@ bool EdnVectorBuf::GapResize(int32_t pos, int32_t newGapLen)
|
||||
{
|
||||
if( pos > Size()
|
||||
|| pos < 0 ) {
|
||||
EDN_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
APPL_ERROR("Request higher than buffer size : pos="<<pos<< " bufferSize="<<Size());
|
||||
return false;
|
||||
}
|
||||
int32_t previousSize = Size();
|
||||
@@ -590,12 +589,12 @@ void EdnVectorBuf::GapCheckMaxSize(void)
|
||||
*/
|
||||
void EdnVectorBuf::Display(void)
|
||||
{
|
||||
EDN_INFO(" Display Buffer : Size="<<Size()<<" m_allocated="<<m_allocated<<" m_gapStart="<<m_gapStart<<" m_gapEnd="<<m_gapEnd);
|
||||
APPL_INFO(" Display Buffer : Size="<<Size()<<" m_allocated="<<m_allocated<<" m_gapStart="<<m_gapStart<<" m_gapEnd="<<m_gapEnd);
|
||||
for(int32_t i=0; i<m_allocated; i++) {
|
||||
if (i>= m_gapStart && i< m_gapEnd) {
|
||||
EDN_INFO( "Element " << i << " : GAP");
|
||||
APPL_INFO( "Element " << i << " : GAP");
|
||||
} else {
|
||||
EDN_INFO( "Element " << i << " : " << m_data[i]);
|
||||
APPL_INFO( "Element " << i << " : " << m_data[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -651,7 +650,7 @@ void TestEdnVectorBuf(void)
|
||||
myBufferTmp.Display();
|
||||
plop='m';
|
||||
|
||||
etk::VectorType<int8_t> items;
|
||||
etk::Vector<int8_t> items;
|
||||
items.PushBack('i');
|
||||
items.PushBack('j');
|
||||
items.PushBack('k');
|
@@ -26,8 +26,7 @@
|
||||
#ifndef __EDN_VECTOR_BUF_H__
|
||||
#define __EDN_VECTOR_BUF_H__
|
||||
|
||||
#include <toolsMemory.h>
|
||||
#include <etk/VectorType.h>
|
||||
#include <etk/Vector.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "EdnVectorBuf"
|
||||
@@ -226,7 +225,7 @@ class EdnVectorBuf
|
||||
*/
|
||||
int8_t & operator-> () const
|
||||
{
|
||||
EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBuf->Size());
|
||||
APPL_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBuf->Size());
|
||||
return m_EdnVectorBuf->Get(m_current);
|
||||
}
|
||||
/**
|
||||
@@ -235,7 +234,7 @@ class EdnVectorBuf
|
||||
*/
|
||||
int8_t & operator* () const
|
||||
{
|
||||
EDN_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBuf->Size());
|
||||
APPL_CHECK_INOUT(m_current >= 0 && m_current < m_EdnVectorBuf->Size());
|
||||
return m_EdnVectorBuf->Get(m_current);
|
||||
}
|
||||
private:
|
||||
@@ -272,14 +271,14 @@ class EdnVectorBuf
|
||||
EdnVectorBuf & operator=( const EdnVectorBuf & Evb);
|
||||
int8_t operator[] (int32_t pos);
|
||||
int8_t & Get( int32_t pos);
|
||||
void Get( int32_t pos, int32_t nbElement, etk::VectorType<int8_t> &tmpBuffer);
|
||||
void Get( int32_t pos, int32_t nbElement, etk::Vector<int8_t> &tmpBuffer);
|
||||
// insert functions
|
||||
void PushBack( const int8_t& item);
|
||||
void Insert( int32_t pos, const int8_t& item);
|
||||
void Insert( int32_t pos, etk::VectorType<int8_t>& items);
|
||||
void Insert( int32_t pos, etk::Vector<int8_t>& items);
|
||||
// Remove and insert functions
|
||||
void Replace( int32_t pos, const int8_t& item);
|
||||
void Replace( int32_t pos, int32_t nbRemoveElement, etk::VectorType<int8_t>& items);
|
||||
void Replace( int32_t pos, int32_t nbRemoveElement, etk::Vector<int8_t>& items);
|
||||
// Revove fonctions
|
||||
void Remove( int32_t pos, int32_t nbRemoveElement = 1);
|
||||
void PopBack( void);
|
@@ -23,8 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <Colorize.h>
|
||||
|
||||
|
||||
@@ -35,42 +35,30 @@
|
||||
Colorize::Colorize( etk::UString &newColorName)
|
||||
{
|
||||
|
||||
m_colorFG.red=0;
|
||||
m_colorFG.green=0;
|
||||
m_colorFG.blue=0;
|
||||
m_colorFG.alpha=1;
|
||||
m_colorBG.red=0;
|
||||
m_colorBG.green=0;
|
||||
m_colorBG.blue=0;
|
||||
m_colorBG.alpha=1;
|
||||
m_colorFG = etk::color::black;
|
||||
m_colorBG = etk::color::black;
|
||||
|
||||
italic = false;
|
||||
bold = false;
|
||||
haveFG = false;
|
||||
haveBG = false;
|
||||
SetName(newColorName);
|
||||
//EDN_INFO("New(Colorise)");
|
||||
APPL_VERBOSE("New(Colorise)");
|
||||
}
|
||||
|
||||
Colorize::Colorize(void)
|
||||
{
|
||||
ColorName = "no_name";
|
||||
|
||||
m_colorFG.red=0;
|
||||
m_colorFG.green=0;
|
||||
m_colorFG.blue=0;
|
||||
m_colorFG.alpha=1;
|
||||
m_colorBG.red=0;
|
||||
m_colorBG.green=0;
|
||||
m_colorBG.blue=0;
|
||||
m_colorBG.alpha=1;
|
||||
m_colorFG = etk::color::black;
|
||||
m_colorBG = etk::color::black;
|
||||
|
||||
italic = false;
|
||||
bold = false;
|
||||
haveFG = false;
|
||||
haveBG = false;
|
||||
|
||||
//EDN_INFO("New(Colorise)");
|
||||
APPL_VERBOSE("New(Colorise)");
|
||||
}
|
||||
|
||||
Colorize::~Colorize(void)
|
||||
@@ -81,13 +69,13 @@ Colorize::~Colorize(void)
|
||||
|
||||
void Colorize::SetName(const char *newColorName)
|
||||
{
|
||||
//EDN_INFO("color change name : \"%s\" ==> \"%s\"",ColorName.c_str(), newColorName);
|
||||
APPL_VERBOSE("color change name : \"" << ColorName << "\" ==> \"" << newColorName << "\"");
|
||||
ColorName = newColorName;
|
||||
}
|
||||
|
||||
void Colorize::SetName(etk::UString &newColorName)
|
||||
{
|
||||
//EDN_INFO("color change name : \"%s\" ==> \"%s\"",ColorName.c_str(), newColorName.c_str());
|
||||
APPL_VERBOSE("color change name : \"" << ColorName << "\" ==> \"" << newColorName << "\"");
|
||||
ColorName = newColorName;
|
||||
}
|
||||
|
||||
@@ -101,38 +89,15 @@ etk::UString Colorize::GetName(void)
|
||||
void Colorize::SetFgColor(const char *myColor)
|
||||
{
|
||||
haveFG = true;
|
||||
signed int r=0;
|
||||
signed int v=0;
|
||||
signed int b=0;
|
||||
signed int a=-1;
|
||||
sscanf(myColor, "#%02x%02x%02x%02x", &r, &v, &b, &a);
|
||||
m_colorFG.red = (float)r/255.0;
|
||||
m_colorFG.green = (float)v/255.0;
|
||||
m_colorFG.blue = (float)b/255.0;
|
||||
if (-1 == a) {
|
||||
m_colorFG.alpha = 1;
|
||||
} else {
|
||||
m_colorFG.alpha = (float)a/255.0;
|
||||
}
|
||||
//EDN_INFO(myColor << " ==> r="<< r <<" v="<< v <<" b="<< b );
|
||||
m_colorFG = myColor;
|
||||
APPL_VERBOSE(myColor << " ==> "<< m_colorFG );
|
||||
}
|
||||
|
||||
void Colorize::SetBgColor(const char *myColor)
|
||||
{
|
||||
haveBG = true;
|
||||
signed int r=0;
|
||||
signed int v=0;
|
||||
signed int b=0;
|
||||
signed int a=-1;
|
||||
sscanf(myColor, "#%02x%02x%02x%02x", &r, &v, &b, &a);
|
||||
m_colorBG.red = (float)r/255.0;
|
||||
m_colorBG.green = (float)v/255.0;
|
||||
m_colorBG.blue = (float)b/255.0;
|
||||
if (-1 == a) {
|
||||
m_colorBG.alpha = 1;
|
||||
} else {
|
||||
m_colorBG.alpha = (float)a/255.0;
|
||||
}
|
||||
m_colorBG = myColor;
|
||||
APPL_VERBOSE(myColor << " ==> "<< m_colorBG );
|
||||
}
|
||||
|
||||
bool Colorize::HaveBg(void)
|
||||
@@ -144,13 +109,11 @@ bool Colorize::HaveBg(void)
|
||||
void Colorize::SetItalic(bool enable)
|
||||
{
|
||||
italic = enable;
|
||||
/*
|
||||
if (true == enable) {
|
||||
EDN_INFO("color : \"%s\" enable italic", ColorName.c_str());
|
||||
APPL_VERBOSE("color : \"" << ColorName << "\" enable italic");
|
||||
} else {
|
||||
EDN_INFO("color : \"%s\" disable italic", ColorName.c_str());
|
||||
APPL_VERBOSE("color : \"" << ColorName << "\" disable italic");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
bool Colorize::GetItalic(void)
|
||||
@@ -162,13 +125,11 @@ bool Colorize::GetItalic(void)
|
||||
void Colorize::SetBold(bool enable)
|
||||
{
|
||||
bold = enable;
|
||||
/*
|
||||
if (true == enable) {
|
||||
EDN_INFO("color : \"%s\" enable bold", ColorName.c_str());
|
||||
APPL_VERBOSE("color : \"" << ColorName << "\" enable bold");
|
||||
} else {
|
||||
EDN_INFO("color : \"%s\" disable bold", ColorName.c_str());
|
||||
APPL_VERBOSE("color : \"" << ColorName << "\" disable bold");
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
bool Colorize::GetBold(void)
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#ifndef __COLORIZE_H__
|
||||
#define __COLORIZE_H__
|
||||
|
||||
#include <etk/UString.h>
|
||||
|
||||
class Colorize {
|
||||
public:
|
||||
@@ -40,8 +40,8 @@ class Colorize {
|
||||
void SetFgColor(const char *myColor);
|
||||
void SetBgColor(const char *myColor);
|
||||
|
||||
color_ts & GetFG(void) { return m_colorFG; };
|
||||
color_ts & GetBG(void) { return m_colorBG; };
|
||||
etk::Color & GetFG(void) { return m_colorFG; };
|
||||
etk::Color & GetBG(void) { return m_colorBG; };
|
||||
|
||||
bool HaveBg(void);
|
||||
|
||||
@@ -50,12 +50,12 @@ class Colorize {
|
||||
bool GetItalic(void);
|
||||
bool GetBold(void);
|
||||
|
||||
void Display(int32_t i) { EDN_INFO(" " << i << " : \"" << ColorName << "\"" << " fg="<< m_colorFG.red <<","<< m_colorFG.green <<","<< m_colorFG.blue <<","<< m_colorFG.alpha /*<<" bg="<< m_colorBG.red <<","<< m_colorBG.green <<","<< m_colorBG.blue*/ ); };
|
||||
void Display(int32_t i) { APPL_INFO(" " << i << " : \"" << ColorName << "\"" << " fg="<< m_colorFG); };
|
||||
|
||||
private:
|
||||
etk::UString ColorName; //!< curent color Name
|
||||
color_ts m_colorFG;
|
||||
color_ts m_colorBG;
|
||||
etk::Color m_colorFG;
|
||||
etk::Color m_colorBG;
|
||||
|
||||
bool italic;
|
||||
bool bold;
|
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <tinyXML/tinyxml.h>
|
||||
#include <ewol/EObject.h>
|
||||
@@ -31,15 +31,23 @@
|
||||
|
||||
#define PFX "ColorizeManager "
|
||||
|
||||
|
||||
|
||||
class classColorManager: public ewol::EObject
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
classColorManager(void);
|
||||
~classColorManager(void);
|
||||
public:
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
const char * const GetObjectType(void)
|
||||
{
|
||||
return "ApplColorManager";
|
||||
}
|
||||
/**
|
||||
* @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
|
||||
@@ -53,16 +61,16 @@ class classColorManager: public ewol::EObject
|
||||
void LoadFile(const char * xmlFilename);
|
||||
Colorize * Get(const char *colorName);
|
||||
Colorize * Get(etk::UString &colorName);
|
||||
color_ts & Get(basicColor_te myColor);
|
||||
etk::Color& Get(basicColor_te myColor);
|
||||
bool Exist(etk::UString &colorName);
|
||||
bool Exist(const char *colorName);
|
||||
void DisplayListOfColor(void);
|
||||
|
||||
private:
|
||||
etk::UString m_fileColor;
|
||||
etk::VectorType<Colorize*> listMyColor; //!< List of ALL Color
|
||||
etk::UString m_fileColor;
|
||||
etk::Vector<Colorize*> listMyColor; //!< List of ALL Color
|
||||
Colorize * errorColor;
|
||||
color_ts basicColors[COLOR_NUMBER_MAX];
|
||||
etk::Color basicColors[COLOR_NUMBER_MAX];
|
||||
};
|
||||
|
||||
|
||||
@@ -92,7 +100,7 @@ void classColorManager::OnReceiveMessage(ewol::EObject * CallerObject, const cha
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
case EDN_MSG__RELOAD_COLOR_FILE:
|
||||
case APPL_MSG__RELOAD_COLOR_FILE:
|
||||
{
|
||||
// Reaload File
|
||||
// TODO : Check this : Pb in the recopy etk::UString element
|
||||
@@ -108,7 +116,7 @@ void classColorManager::OnReceiveMessage(ewol::EObject * CallerObject, const cha
|
||||
void classColorManager::LoadFile(etk::UString &xmlFilename)
|
||||
{
|
||||
// TODO : Remove this
|
||||
LoadFile(xmlFilename.Utf8Data());
|
||||
LoadFile(xmlFilename.c_str());
|
||||
}
|
||||
|
||||
// TODO : Remove this ...
|
||||
@@ -127,32 +135,32 @@ void classColorManager::LoadFile(const char * xmlFilename)
|
||||
listMyColor.Clear();
|
||||
|
||||
m_fileColor = xmlFilename;
|
||||
EDN_DEBUG("open file (COLOR) \"" << xmlFilename << "\" ? = \"" << m_fileColor << "\"");
|
||||
APPL_DEBUG("open file (COLOR) \"" << xmlFilename << "\" ? = \"" << m_fileColor << "\"");
|
||||
errorColor = new Colorize();
|
||||
errorColor->SetBgColor("#000000");
|
||||
errorColor->SetFgColor("#FFFFFF");
|
||||
errorColor->SetBgColor("#00FF00FF");
|
||||
errorColor->SetFgColor("#FF00FFFF");
|
||||
|
||||
// allocate the document in the stack
|
||||
TiXmlDocument XmlDocument;
|
||||
// open the curent File
|
||||
etk::File fileName(xmlFilename, etk::FILE_TYPE_DATA);
|
||||
if (false == fileName.Exist()) {
|
||||
EWOL_ERROR("File Does not exist : " << fileName);
|
||||
APPL_ERROR("File Does not exist : " << fileName);
|
||||
return;
|
||||
}
|
||||
int32_t fileSize = fileName.Size();
|
||||
if (0==fileSize) {
|
||||
EWOL_ERROR("This file is empty : " << fileName);
|
||||
APPL_ERROR("This file is empty : " << fileName);
|
||||
return;
|
||||
}
|
||||
if (false == fileName.fOpenRead()) {
|
||||
EWOL_ERROR("Can not open the file : " << fileName);
|
||||
APPL_ERROR("Can not open the file : " << fileName);
|
||||
return;
|
||||
}
|
||||
// allocate data
|
||||
char * fileBuffer = new char[fileSize+5];
|
||||
if (NULL == fileBuffer) {
|
||||
EWOL_ERROR("Error Memory allocation size=" << fileSize);
|
||||
APPL_ERROR("Error Memory allocation size=" << fileSize);
|
||||
return;
|
||||
}
|
||||
memset(fileBuffer, 0, (fileSize+5)*sizeof(char));
|
||||
@@ -165,7 +173,7 @@ void classColorManager::LoadFile(const char * xmlFilename)
|
||||
|
||||
TiXmlElement* root = XmlDocument.FirstChildElement( "EdnColor" );
|
||||
if (NULL == root ) {
|
||||
EDN_ERROR(PFX"(l ?) main node not find: \"EdnColor\" in \"" << xmlFilename << "\"");
|
||||
APPL_ERROR(PFX"(l ?) main node not find: \"EdnColor\" in \"" << xmlFilename << "\"");
|
||||
return;
|
||||
} else {
|
||||
TiXmlNode * pNode = root->FirstChild();
|
||||
@@ -184,7 +192,7 @@ void classColorManager::LoadFile(const char * xmlFilename)
|
||||
const char *colorName = pGuiNode->ToElement()->Attribute("name");
|
||||
int32_t id = 0;
|
||||
if (NULL == colorName) {
|
||||
EDN_ERROR("(l "<< pGuiNode->Row() <<") node with no name");
|
||||
APPL_ERROR("(l "<< pGuiNode->Row() <<") node with no name");
|
||||
// get next node element
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
continue;
|
||||
@@ -210,34 +218,17 @@ void classColorManager::LoadFile(const char * xmlFilename)
|
||||
} else if (!strcmp(colorName, "LIST_textModify")) {
|
||||
id = COLOR_LIST_TEXT_MODIFY;
|
||||
} else {
|
||||
EDN_ERROR("(l "<<pGuiNode->Row()<<") Unknown basic gui color : \"" << colorName << "\"" );
|
||||
APPL_ERROR("(l "<<pGuiNode->Row()<<") Unknown basic gui color : \"" << colorName << "\"" );
|
||||
// get next node element
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
continue;
|
||||
}
|
||||
const char *color = pGuiNode->ToElement()->Attribute("val");
|
||||
if (NULL != color) {
|
||||
int r=0;
|
||||
int v=0;
|
||||
int b=0;
|
||||
int a=-1;
|
||||
sscanf(color, "#%02x%02x%02x%02x", &r, &v, &b, &a);
|
||||
basicColors[id].red = (float)r/255.0;
|
||||
basicColors[id].green = (float)v/255.0;
|
||||
basicColors[id].blue = (float)b/255.0;
|
||||
if (-1 == a) {
|
||||
basicColors[id].alpha = 1;
|
||||
} else {
|
||||
basicColors[id].alpha = (float)a/255.0;
|
||||
}
|
||||
/*
|
||||
EDN_INFO(" Specify color for system ID="<< id );
|
||||
EDN_INFO(" " << color << " ==> r="<< r <<" v="<< v <<" b="<< b );
|
||||
EDN_INFO(" " << color << " ==> r="<< basicColors[id].red <<" v="<< basicColors[id].green <<" b="<< basicColors[id].blue );
|
||||
*/
|
||||
basicColors[id] = color;
|
||||
}
|
||||
} else {
|
||||
EDN_ERROR("(l "<<pGuiNode->Row()<<") node not suported : \""<<pGuiNode->Value()<<"\" must be [color]");
|
||||
APPL_ERROR("(l "<<pGuiNode->Row()<<") node not suported : \""<<pGuiNode->Value()<<"\" must be [color]");
|
||||
}
|
||||
// get next node element
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
@@ -256,32 +247,28 @@ void classColorManager::LoadFile(const char * xmlFilename)
|
||||
// get the name of the Chaine
|
||||
const char *colorName = pGuiNode->ToElement()->Attribute("name");
|
||||
if (NULL == colorName) {
|
||||
EDN_ERROR(PFX"(l "<< pGuiNode->Row() <<") node with no name");
|
||||
APPL_ERROR(PFX"(l "<< pGuiNode->Row() <<") node with no name");
|
||||
// get next node element
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
continue;
|
||||
} else {
|
||||
myNewColor->SetName(colorName);
|
||||
//EDN_INFO(PFX"Add a new color in the panel : \"%s\"", colorName);
|
||||
//APPL_INFO(PFX"Add a new color in the panel : \"%s\"", colorName);
|
||||
}
|
||||
|
||||
const char *colorBG = pGuiNode->ToElement()->Attribute("BG");
|
||||
if (NULL != colorBG) {
|
||||
myNewColor->SetBgColor(colorBG);
|
||||
}
|
||||
|
||||
const char *colorFG = pGuiNode->ToElement()->Attribute("FG");
|
||||
if (NULL != colorFG) {
|
||||
myNewColor->SetFgColor(colorFG);
|
||||
}
|
||||
|
||||
const char *bold = pGuiNode->ToElement()->Attribute("bold");
|
||||
if (NULL != bold) {
|
||||
if(0 == strcmp(bold, "yes") ) {
|
||||
myNewColor->SetBold(true);
|
||||
}
|
||||
}
|
||||
|
||||
const char *italic = pGuiNode->ToElement()->Attribute("italic");
|
||||
if (NULL != italic) {
|
||||
if(0 == strcmp(italic, "yes") ) {
|
||||
@@ -290,12 +277,12 @@ void classColorManager::LoadFile(const char * xmlFilename)
|
||||
}
|
||||
listMyColor.PushBack(myNewColor);
|
||||
} else {
|
||||
EDN_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [color]");
|
||||
APPL_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [color]");
|
||||
}
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
}
|
||||
} else {
|
||||
EDN_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [gui,syntax]");
|
||||
APPL_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [gui,syntax]");
|
||||
}
|
||||
// get next node element
|
||||
pNode = pNode->NextSibling();
|
||||
@@ -304,8 +291,8 @@ void classColorManager::LoadFile(const char * xmlFilename)
|
||||
if (NULL != fileBuffer) {
|
||||
delete[] fileBuffer;
|
||||
}
|
||||
//SendMessage(EDN_MSG__COLOR_HAS_CHANGE);
|
||||
//SendMessage(EDN_MSG__USER_DISPLAY_CHANGE);
|
||||
//SendMessage(APPL_MSG__COLOR_HAS_CHANGE);
|
||||
//SendMessage(APPL_MSG__USER_DISPLAY_CHANGE);
|
||||
}
|
||||
|
||||
// TODO : Remove this ...
|
||||
@@ -318,7 +305,7 @@ Colorize *classColorManager::Get(const char *colorName)
|
||||
return listMyColor[i];
|
||||
}
|
||||
}
|
||||
EDN_ERROR(PFX"Color does not Existed ["<< colorName<<"]" );
|
||||
APPL_ERROR(PFX"Color does not Existed ["<< colorName<<"]" );
|
||||
// an error
|
||||
return errorColor;
|
||||
}
|
||||
@@ -326,10 +313,10 @@ Colorize *classColorManager::Get(const char *colorName)
|
||||
Colorize *classColorManager::Get(etk::UString &colorName)
|
||||
{
|
||||
// TODO : Remove this
|
||||
return Get(colorName.Utf8Data());
|
||||
return Get(colorName.c_str());
|
||||
}
|
||||
|
||||
color_ts & classColorManager::Get(basicColor_te myColor)
|
||||
etk::Color & classColorManager::Get(basicColor_te myColor)
|
||||
{
|
||||
if (myColor < COLOR_NUMBER_MAX) {
|
||||
return basicColors[myColor];
|
||||
@@ -355,16 +342,16 @@ bool classColorManager::Exist(const char *colorName)
|
||||
bool classColorManager::Exist(etk::UString &colorName)
|
||||
{
|
||||
// TODO : Remove this
|
||||
return Exist(colorName.Utf8Data());
|
||||
return Exist(colorName.c_str());
|
||||
}
|
||||
|
||||
void classColorManager::DisplayListOfColor(void)
|
||||
{
|
||||
int32_t i;
|
||||
EDN_INFO(PFX"List of ALL COLOR : ");
|
||||
APPL_INFO(PFX"List of ALL COLOR : ");
|
||||
for (i=0; i<listMyColor.Size(); i++) {
|
||||
//etk::UString elementName = listMyColor[i]->GetName();
|
||||
//EDN_INFO(i << " : \"" << elementName.c_str() << "\"" );
|
||||
//APPL_INFO(i << " : \"" << elementName.c_str() << "\"" );
|
||||
listMyColor[i]->Display(i);
|
||||
}
|
||||
}
|
||||
@@ -393,7 +380,7 @@ void ColorizeManager::UnInit(void)
|
||||
EWOL_ERROR("ColorizeManager ==> request UnInit, but does not exist ...");
|
||||
return;
|
||||
}
|
||||
ewol::EObjectManager::MarkToRemoved(localManager);
|
||||
delete(localManager);
|
||||
localManager = NULL;
|
||||
}
|
||||
|
||||
@@ -430,9 +417,9 @@ Colorize* ColorizeManager::Get(etk::UString &colorName)
|
||||
return localManager->Get(colorName);
|
||||
}
|
||||
|
||||
color_ts errorColor;
|
||||
etk::Color errorColor;
|
||||
|
||||
color_ts& ColorizeManager::Get(basicColor_te myColor)
|
||||
etk::Color& ColorizeManager::Get(basicColor_te myColor)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return errorColor;
|
@@ -27,7 +27,7 @@
|
||||
#define __COLORIZE_MANAGER_H__
|
||||
|
||||
#include <Colorize.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/Widget.h>
|
||||
|
||||
typedef enum {
|
||||
@@ -57,7 +57,7 @@ namespace ColorizeManager
|
||||
void LoadFile(const char * xmlFilename);
|
||||
Colorize * Get(const char *colorName);
|
||||
Colorize * Get(etk::UString &colorName);
|
||||
color_ts & Get(basicColor_te myColor);
|
||||
etk::Color& Get(basicColor_te myColor);
|
||||
bool Exist(etk::UString &colorName);
|
||||
bool Exist(const char *colorName);
|
||||
void DisplayListOfColor(void);
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file tools_debug.h
|
||||
* @file Debug.h
|
||||
* @brief Editeur De N'ours : log implementation
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/06/2010
|
||||
@@ -24,4 +24,4 @@
|
||||
*/
|
||||
|
||||
|
||||
const char * ednLog = "edn ";
|
||||
const char * applLog = "edn ";
|
@@ -1,9 +1,9 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ClipBoard.h
|
||||
* @brief Editeur De N'ours : copy / past main system (header)
|
||||
* @file Debug.h
|
||||
* @brief Application log implementation
|
||||
* @author Edouard DUPIN
|
||||
* @date 30/12/2010
|
||||
* @date 10/04/2012
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
@@ -23,23 +23,22 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __CLIP_BOARD_H__
|
||||
#define __CLIP_BOARD_H__
|
||||
#ifndef __DEBUG_H__
|
||||
#define __DEBUG_H__
|
||||
|
||||
#include "tools_debug.h"
|
||||
#include "etk/VectorType.h"
|
||||
#include <etk/Types.h>
|
||||
#include <etk/Debug.h>
|
||||
|
||||
#define TOTAL_OF_CLICKBOARD (11)
|
||||
#define COPY_MIDDLE_BUTTON (10)
|
||||
#define COPY_STD (0)
|
||||
extern const char * applLog;
|
||||
|
||||
namespace ClipBoard
|
||||
{
|
||||
void Init(void);
|
||||
void Set(uint8_t clipboardID, etk::VectorType<int8_t> &data);
|
||||
void Get(uint8_t clipboardID, etk::VectorType<int8_t> &data);
|
||||
}
|
||||
#define APPL_CRITICAL(data) ETK_CRITICAL(applLog, data)
|
||||
#define APPL_WARNING(data) ETK_WARNING(applLog, data)
|
||||
#define APPL_ERROR(data) ETK_ERROR(applLog, data)
|
||||
#define APPL_INFO(data) ETK_INFO(applLog, data)
|
||||
#define APPL_DEBUG(data) ETK_DEBUG(applLog, data)
|
||||
#define APPL_VERBOSE(data) ETK_VERBOSE(applLog, data)
|
||||
#define APPL_ASSERT(cond, data) ETK_ASSERT(applLog, cond, data)
|
||||
#define APPL_CHECK_INOUT(cond) ETK_CHECK_INOUT(applLog, cond)
|
||||
#define APPL_TODO(cond) ETK_TODO(applLog, cond)
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -23,9 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <Display.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ColorizeManager.h>
|
||||
@@ -35,6 +34,7 @@
|
||||
#undef __class__
|
||||
#define __class__ "BufferView"
|
||||
|
||||
|
||||
BufferView::BufferView(void)
|
||||
{
|
||||
SetCanHaveFocus(true);
|
||||
@@ -42,6 +42,7 @@ BufferView::BufferView(void)
|
||||
RegisterMultiCast(ednMsgBufferState);
|
||||
RegisterMultiCast(ednMsgBufferId);
|
||||
m_selectedID = -1;
|
||||
m_selectedIdRequested = -1;
|
||||
}
|
||||
|
||||
BufferView::~BufferView(void)
|
||||
@@ -61,16 +62,17 @@ void BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eve
|
||||
{
|
||||
ewol::List::OnReceiveMessage(CallerObject, eventId, data);
|
||||
if (eventId == ednMsgBufferListChange) {
|
||||
MarkToReedraw();
|
||||
MarkToRedraw();
|
||||
}else if (eventId == ednMsgBufferId) {
|
||||
MarkToReedraw();
|
||||
m_selectedIdRequested = BufferManager::GetSelected();
|
||||
MarkToRedraw();
|
||||
}else if (eventId == ednMsgBufferState) {
|
||||
MarkToReedraw();
|
||||
MarkToRedraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
color_ts BufferView::GetBasicBG(void)
|
||||
etk::Color BufferView::GetBasicBG(void)
|
||||
{
|
||||
return ColorizeManager::Get(COLOR_LIST_BG_1);
|
||||
}
|
||||
@@ -80,7 +82,7 @@ uint32_t BufferView::GetNuberOfColomn(void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool BufferView::GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &bg)
|
||||
bool BufferView::GetTitle(int32_t colomn, etk::UString &myTitle, etk::Color &fg, etk::Color &bg)
|
||||
{
|
||||
myTitle = "Buffers : ";
|
||||
return true;
|
||||
@@ -91,27 +93,35 @@ uint32_t BufferView::GetNuberOfRaw(void)
|
||||
return BufferManager::SizeOpen();
|
||||
}
|
||||
|
||||
bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg)
|
||||
bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, etk::Color &fg, etk::Color &bg)
|
||||
{
|
||||
etk::File name;
|
||||
bool isModify;
|
||||
basicColor_te selectFG = COLOR_LIST_TEXT_NORMAL;
|
||||
basicColor_te selectBG = COLOR_LIST_BG_1;
|
||||
|
||||
// when requested a new display selection ==> reset the previous one ...
|
||||
if (m_selectedIdRequested != -1) {
|
||||
m_selectedID = -1;
|
||||
}
|
||||
// transforme the ID in the real value ...
|
||||
int32_t realID = BufferManager::WitchBuffer(raw+1);
|
||||
if (BufferManager::Exist(realID)) {
|
||||
isModify = BufferManager::Get(realID)->IsModify();
|
||||
name = BufferManager::Get(realID)->GetFileName();
|
||||
char *tmpModify = (char*)" ";
|
||||
if (true == isModify) {
|
||||
tmpModify = (char*)"M";
|
||||
}
|
||||
myTextToWrite = "[";
|
||||
myTextToWrite += realID;
|
||||
myTextToWrite += "](";
|
||||
myTextToWrite += tmpModify;
|
||||
myTextToWrite += ") ";
|
||||
|
||||
#if 0
|
||||
char *tmpModify = (char*)" ";
|
||||
if (true == isModify) {
|
||||
tmpModify = (char*)"M";
|
||||
}
|
||||
myTextToWrite = "[";
|
||||
myTextToWrite += realID;
|
||||
myTextToWrite += "](";
|
||||
myTextToWrite += tmpModify;
|
||||
myTextToWrite += ") ";
|
||||
#else
|
||||
myTextToWrite = "";
|
||||
#endif
|
||||
myTextToWrite += name.GetShortFilename();
|
||||
|
||||
if (true == isModify) {
|
||||
@@ -124,6 +134,12 @@ bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToW
|
||||
} else {
|
||||
selectBG = COLOR_LIST_BG_2;
|
||||
}
|
||||
// the buffer change of selection ...
|
||||
if (m_selectedIdRequested == realID) {
|
||||
m_selectedID = raw;
|
||||
// stop searching
|
||||
m_selectedIdRequested = -1;
|
||||
}
|
||||
if (m_selectedID == raw) {
|
||||
selectBG = COLOR_LIST_BG_SELECTED;
|
||||
}
|
||||
@@ -135,17 +151,17 @@ 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, etkFloat_t x, etkFloat_t y)
|
||||
bool BufferView::OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y)
|
||||
{
|
||||
if (1 == IdInput && typeEvent == ewol::EVENT_INPUT_TYPE_SINGLE) {
|
||||
EDN_INFO("Event on List : IdInput=" << IdInput << " colomn=" << colomn << " raw=" << raw );
|
||||
APPL_INFO("Event on List : IdInput=" << IdInput << " colomn=" << colomn << " raw=" << raw );
|
||||
int32_t selectBuf = BufferManager::WitchBuffer(raw+1);
|
||||
if ( 0 <= selectBuf) {
|
||||
m_selectedID = raw;
|
||||
SendMultiCast(ednMsgBufferId, selectBuf);
|
||||
}
|
||||
}
|
||||
MarkToReedraw();
|
||||
MarkToRedraw();
|
||||
return false;
|
||||
}
|
||||
|
@@ -25,21 +25,25 @@
|
||||
#ifndef __BUFFER_VIEW_H__
|
||||
#define __BUFFER_VIEW_H__
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <CodeView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <Display.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/widget/List.h>
|
||||
|
||||
|
||||
|
||||
class BufferView : public ewol::List
|
||||
{
|
||||
public:
|
||||
// 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
|
||||
*/
|
||||
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
|
||||
@@ -50,13 +54,14 @@ class BufferView : public ewol::List
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
||||
protected:
|
||||
// function call to display the list :
|
||||
virtual color_ts GetBasicBG(void);
|
||||
virtual etk::Color GetBasicBG(void);
|
||||
virtual uint32_t GetNuberOfColomn(void);
|
||||
virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &bg);
|
||||
virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, etk::Color &fg, etk::Color &bg);
|
||||
virtual uint32_t GetNuberOfRaw(void);
|
||||
virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg);
|
||||
virtual bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, etkFloat_t x, etkFloat_t y);
|
||||
virtual bool GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, etk::Color &fg, etk::Color &bg);
|
||||
virtual bool OnItemEvent(int32_t IdInput, ewol::eventInputType_te typeEvent, int32_t colomn, int32_t raw, float x, float y);
|
||||
private:
|
||||
int32_t m_selectedIdRequested;
|
||||
int32_t m_selectedID;
|
||||
};
|
||||
|
435
Sources/appl/Gui/CodeView.cpp
Normal file
@@ -0,0 +1,435 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <CodeView.h>
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <CodeView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <ewol/ClipBoard.h>
|
||||
#include <SearchData.h>
|
||||
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "CodeView"
|
||||
|
||||
|
||||
CodeView::CodeView(void)
|
||||
{
|
||||
m_label = "CodeView is disable ...";
|
||||
m_fontNormal = -1;
|
||||
m_fontBold = -1;
|
||||
m_fontItalic = -1;
|
||||
m_fontBoldItalic = -1;
|
||||
m_fontSize = 15;
|
||||
|
||||
m_bufferID = -1;
|
||||
m_buttunOneSelected = false;
|
||||
|
||||
m_lineNumberList.Clear();
|
||||
|
||||
m_textColorFg = etk::color::black;
|
||||
|
||||
m_textColorBg = etk::color::black;
|
||||
m_textColorBg.alpha = 0x40;
|
||||
SetCanHaveFocus(true);
|
||||
RegisterMultiCast(ednMsgBufferId);
|
||||
RegisterMultiCast(ednMsgGuiCopy);
|
||||
RegisterMultiCast(ednMsgGuiPaste);
|
||||
RegisterMultiCast(ednMsgGuiCut);
|
||||
RegisterMultiCast(ednMsgGuiRedo);
|
||||
RegisterMultiCast(ednMsgGuiUndo);
|
||||
RegisterMultiCast(ednMsgGuiRm);
|
||||
RegisterMultiCast(ednMsgGuiSelect);
|
||||
RegisterMultiCast(ednMsgGuiChangeCharset);
|
||||
RegisterMultiCast(ednMsgGuiFind);
|
||||
RegisterMultiCast(ednMsgGuiReplace);
|
||||
SetLimitScrolling(0.2);
|
||||
}
|
||||
|
||||
CodeView::~CodeView(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Check if the number of reference buffer is good or not ...
|
||||
* @param[in] bufferID id of the current Buffer that needed to have a reference
|
||||
* @return ---
|
||||
*/
|
||||
void CodeView::UpdateNumberOfLineReference(int32_t bufferID)
|
||||
{
|
||||
Vector2D<float> tmpCoord;
|
||||
tmpCoord.x = 0;
|
||||
tmpCoord.y = 0;
|
||||
if (m_lineNumberList.Size()<=bufferID) {
|
||||
// update the number of elements :
|
||||
for (int32_t iii=m_lineNumberList.Size(); iii <= bufferID; iii++) {
|
||||
// add start line at 0 :
|
||||
m_lineNumberList.PushBack(tmpCoord);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::CalculateMinSize(void)
|
||||
{
|
||||
m_minSize.x = 50;
|
||||
m_minSize.y = 50;
|
||||
return true;
|
||||
}
|
||||
|
||||
void CodeView::CalculateMaxSize(void)
|
||||
{
|
||||
m_maxSize.x = 2048;
|
||||
int32_t letterHeight = ewol::GetHeight(m_fontNormal);
|
||||
m_maxSize.y = BufferManager::Get(m_bufferID)->GetNumberOfLine() * letterHeight;
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnDraw(ewol::DrawProperty& displayProp)
|
||||
{
|
||||
m_OObjectsColored.Draw();
|
||||
m_OObjectTextNormal.Draw();
|
||||
m_OObjectTextBold.Draw();
|
||||
m_OObjectTextItalic.Draw();
|
||||
m_OObjectTextBoldItalic.Draw();
|
||||
WidgetScrooled::OnDraw(displayProp);
|
||||
}
|
||||
|
||||
void CodeView::OnRegenerateDisplay(void)
|
||||
{
|
||||
if (true == NeedRedraw()) {
|
||||
int64_t startTime = ewol::GetTime();
|
||||
|
||||
// For the scrooling windows
|
||||
CalculateMaxSize();
|
||||
|
||||
// clean internal elements ...
|
||||
m_OObjectTextNormal.SetFontID(m_fontNormal);
|
||||
m_OObjectTextBold.SetFontID(m_fontBold);
|
||||
m_OObjectTextItalic.SetFontID(m_fontItalic);
|
||||
m_OObjectTextBoldItalic.SetFontID(m_fontBoldItalic);
|
||||
|
||||
m_OObjectTextNormal.Clear();
|
||||
m_OObjectTextBold.Clear();
|
||||
m_OObjectTextItalic.Clear();
|
||||
m_OObjectTextBoldItalic.Clear();
|
||||
m_OObjectsColored.Clear();
|
||||
|
||||
|
||||
if(true == BufferManager::Get(m_bufferID)->NeedToUpdateDisplayPosition() ) {
|
||||
Vector2D<float> borderWidth = BufferManager::Get(m_bufferID)->GetBorderSize();
|
||||
bool centerRequested = false;
|
||||
Vector2D<float> currentPosition = BufferManager::Get(m_bufferID)->GetPosition(m_OObjectTextNormal.GetFontID(), centerRequested);
|
||||
SetScrollingPositionDynamic(borderWidth, currentPosition, centerRequested);
|
||||
} // else : nothing to do ...
|
||||
|
||||
// generate the objects :
|
||||
BufferManager::Get(m_bufferID)->Display(m_OObjectTextNormal,
|
||||
m_OObjectTextBold,
|
||||
m_OObjectTextItalic,
|
||||
m_OObjectTextBoldItalic,
|
||||
m_OObjectsColored,
|
||||
m_originScrooled.x, m_originScrooled.y, m_size.x, m_size.y);
|
||||
// set the current size of the windows
|
||||
SetMaxSize(BufferManager::Get(m_bufferID)->GetMaxSize());
|
||||
|
||||
int64_t stopTime = ewol::GetTime();
|
||||
APPL_DEBUG("Display Code Generation = " << stopTime - startTime << " micro-s");
|
||||
|
||||
// call the herited class...
|
||||
WidgetScrooled::OnRegenerateDisplay();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::OnEventKb(ewol::eventKbType_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) {
|
||||
BufferManager::Get(m_bufferID)->AddChar(unicodeData);
|
||||
MarkToRedraw();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent)
|
||||
{
|
||||
if (typeEvent == ewol::EVENT_KB_TYPE_DOWN) {
|
||||
BufferManager::Get(m_bufferID)->cursorMove(moveTypeEvent);
|
||||
MarkToRedraw();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D<float> pos)
|
||||
{
|
||||
Vector2D<float> relativePos = RelativePosition(pos);
|
||||
// corection for the openGl abstraction
|
||||
relativePos.y = m_size.y - relativePos.y;
|
||||
|
||||
if (m_bufferID < 0) {
|
||||
return false;
|
||||
}
|
||||
if (true == WidgetScrooled::OnEventInput(type, IdInput, typeEvent, pos)) {
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
// nothing to do ... done on upper widget ...
|
||||
return true;
|
||||
}
|
||||
if (1 == IdInput) {
|
||||
#ifndef __MODE__Touch
|
||||
if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
|
||||
m_buttunOneSelected = true;
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
BufferManager::Get(m_bufferID)->MouseEvent(m_fontNormal, relativePos.x+m_originScrooled.x, relativePos.y+m_originScrooled.y);
|
||||
MarkToRedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_UP == typeEvent) {
|
||||
m_buttunOneSelected = false;
|
||||
BufferManager::Get(m_bufferID)->Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
MarkToRedraw();
|
||||
} else
|
||||
#endif
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
#ifdef __MODE__Touch
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
BufferManager::Get(m_bufferID)->MouseEvent(m_fontNormal, relativePos.x+m_originScrooled.x, relativePos.y+m_originScrooled.y);
|
||||
MarkToRedraw();
|
||||
#else
|
||||
// nothing to do ...
|
||||
#endif
|
||||
} else if (ewol::EVENT_INPUT_TYPE_DOUBLE == typeEvent) {
|
||||
BufferManager::Get(m_bufferID)->MouseEventDouble();
|
||||
MarkToRedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_TRIPLE == typeEvent) {
|
||||
BufferManager::Get(m_bufferID)->MouseEventTriple();
|
||||
MarkToRedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_MOVE == typeEvent) {
|
||||
if (true == m_buttunOneSelected) {
|
||||
int xxx, yyy;
|
||||
xxx = relativePos.x;
|
||||
yyy = relativePos.y;
|
||||
if (xxx<0) {
|
||||
xxx = 0;
|
||||
}
|
||||
if (yyy<0) {
|
||||
yyy = 0;
|
||||
}
|
||||
//APPL_INFO("mouse-motion BT1 %d, %d", xxx, yyy);
|
||||
BufferManager::Get(m_bufferID)->MouseSelectFromCursorTo(m_fontNormal, xxx+m_originScrooled.x, yyy+m_originScrooled.y);
|
||||
MarkToRedraw();
|
||||
}
|
||||
}
|
||||
} else if (2 == IdInput) {
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
BufferManager::Get(m_bufferID)->MouseEvent(m_fontNormal, relativePos.x+m_originScrooled.x, relativePos.y+m_originScrooled.y);
|
||||
BufferManager::Get(m_bufferID)->Paste(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
MarkToRedraw();
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @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 ---
|
||||
*/
|
||||
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
||||
APPL_DEBUG("Extern Event : " << CallerObject << " type : " << eventId << " data=\"" << data << "\"");
|
||||
|
||||
if(eventId == ednMsgBufferId) {
|
||||
//keep the reference of the display offset :
|
||||
if( m_bufferID >=0
|
||||
&& m_bufferID < m_lineNumberList.Size()) {
|
||||
m_lineNumberList[m_bufferID] = m_originScrooled;
|
||||
}
|
||||
int32_t bufferID = 0;
|
||||
sscanf(data.c_str(), "%d", &bufferID);
|
||||
APPL_INFO("Select a new Buffer ... " << bufferID);
|
||||
// set the new buffer ID
|
||||
m_bufferID = bufferID;
|
||||
// update the start display position...
|
||||
UpdateNumberOfLineReference(m_bufferID);
|
||||
// set back if needed the display position ...
|
||||
if( m_bufferID >=0
|
||||
&& m_bufferID < m_lineNumberList.Size()) {
|
||||
m_originScrooled = m_lineNumberList[m_bufferID];
|
||||
}
|
||||
} else if (eventId == ednMsgGuiCopy) {
|
||||
BufferManager::Get(m_bufferID)->Copy(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiCut) {
|
||||
BufferManager::Get(m_bufferID)->Cut(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiPaste) {
|
||||
BufferManager::Get(m_bufferID)->Paste(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiUndo) {
|
||||
BufferManager::Get(m_bufferID)->Undo();
|
||||
} else if (eventId == ednMsgGuiRedo) {
|
||||
BufferManager::Get(m_bufferID)->Redo();
|
||||
} else if (eventId == ednMsgGuiRm) {
|
||||
// data : "Word" "Line" "Paragraph"
|
||||
if (data == "Word") {
|
||||
APPL_WARNING(" on event " << eventId << " data=\"" << data << "\" ==> not coded" );
|
||||
} else if (data == "Line") {
|
||||
BufferManager::Get(m_bufferID)->RemoveLine();
|
||||
} else if (data == "Paragraph") {
|
||||
APPL_WARNING(" on event " << eventId << " data=\"" << data << "\" ==> not coded" );
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiSelect) {
|
||||
// data : "ALL" "NONE"
|
||||
if (data == "ALL") {
|
||||
BufferManager::Get(m_bufferID)->SelectAll();
|
||||
} else if (data == "NONE") {
|
||||
BufferManager::Get(m_bufferID)->SelectNone();
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiChangeCharset) {
|
||||
// data : "UTF-8" "ISO-8859-1" "ISO-8859-15"
|
||||
if (data == "UTF-8") {
|
||||
BufferManager::Get(m_bufferID)->SetCharset(unicode::EDN_CHARSET_UTF8);
|
||||
} else if (data == "ISO-8859-1") {
|
||||
BufferManager::Get(m_bufferID)->SetCharset(unicode::EDN_CHARSET_ISO_8859_1);
|
||||
} else if (data == "ISO-8859-15") {
|
||||
BufferManager::Get(m_bufferID)->SetCharset(unicode::EDN_CHARSET_ISO_8859_15);
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiFind) {
|
||||
etk::UString myDataString;
|
||||
SearchData::GetSearch(myDataString);
|
||||
if (data == "Next") {
|
||||
BufferManager::Get(m_bufferID)->Search(myDataString, false, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
} else if (data == "Previous") {
|
||||
BufferManager::Get(m_bufferID)->Search(myDataString, true, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiReplace) {
|
||||
etk::UString myDataString;
|
||||
SearchData::GetReplace(myDataString);
|
||||
if (data == "Normal") {
|
||||
BufferManager::Get(m_bufferID)->Replace(myDataString);
|
||||
} else if (data == "All") {
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
case APPL_MSG__CURRENT_GOTO_LINE:
|
||||
if (dataID<0) {
|
||||
dataID = 0;
|
||||
}
|
||||
BufferManager::Get(m_bufferID)->JumpAtLine(dataID);
|
||||
break;
|
||||
case APPL_MSG__CURRENT_SET_CHARSET:
|
||||
BufferManager::Get(m_bufferID)->SetCharset((unicode::charset_te)dataID);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
// Force redraw of the widget
|
||||
MarkToRedraw();
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnGetFocus(void)
|
||||
{
|
||||
/*
|
||||
ewol::widgetMessageMultiCast::Send(GetWidgetId(), ednMsgBufferId, m_bufferID);
|
||||
*/
|
||||
ewol::KeyboardShow(ewol::KEYBOARD_MODE_CODE);
|
||||
APPL_INFO("Focus - In");
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnLostFocus(void)
|
||||
{
|
||||
ewol::KeyboardHide();
|
||||
APPL_INFO("Focus - out");
|
||||
}
|
||||
|
||||
void CodeView::SetFontSize(int32_t size)
|
||||
{
|
||||
m_fontSize = size;
|
||||
SetScrollingSize(m_fontSize*3.0*1.46); // 1.46 is a magic nmber ...
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameNormal(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontNormal = fontID;
|
||||
}
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameBold(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontBold = fontID;
|
||||
}
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameItalic(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontItalic = fontID;
|
||||
}
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameBoldItalic(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontBoldItalic = fontID;
|
||||
}
|
||||
}
|
@@ -26,11 +26,10 @@
|
||||
#ifndef __CODE_VIEW_H__
|
||||
#define __CODE_VIEW_H__
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <CodeView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <Display.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <ewol/widget/WidgetScrolled.h>
|
||||
@@ -40,19 +39,28 @@ class CodeView :public ewol::WidgetScrooled
|
||||
public:
|
||||
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
|
||||
*/
|
||||
const char * const GetObjectType(void) { return "ApplCodeView"; };
|
||||
virtual bool CalculateMinSize(void);
|
||||
private:
|
||||
etk::UString m_label;
|
||||
color_ts m_textColorFg; //!< Text color
|
||||
color_ts m_textColorBg; //!< Background color
|
||||
etk::Color m_textColorFg; //!< Text color
|
||||
etk::Color m_textColorBg; //!< Background color
|
||||
int32_t m_bufferID;
|
||||
bool m_buttunOneSelected;
|
||||
etk::Vector<Vector2D<float> > m_lineNumberList;
|
||||
void UpdateNumberOfLineReference(int32_t bufferID);
|
||||
// drawing elements :
|
||||
ewol::OObject2DTextColored m_OObjectTextNormal[NB_BOUBLE_BUFFER];
|
||||
ewol::OObject2DTextColored m_OObjectTextBold[NB_BOUBLE_BUFFER];
|
||||
ewol::OObject2DTextColored m_OObjectTextItalic[NB_BOUBLE_BUFFER];
|
||||
ewol::OObject2DTextColored m_OObjectTextBoldItalic[NB_BOUBLE_BUFFER];
|
||||
ewol::OObject2DColored m_OObjectsColored[NB_BOUBLE_BUFFER];
|
||||
ewol::OObject2DTextColored m_OObjectTextNormal;
|
||||
ewol::OObject2DTextColored m_OObjectTextBold;
|
||||
ewol::OObject2DTextColored m_OObjectTextItalic;
|
||||
ewol::OObject2DTextColored m_OObjectTextBoldItalic;
|
||||
ewol::OObject2DColored m_OObjectsColored;
|
||||
|
||||
public:
|
||||
virtual void OnRegenerateDisplay(void);
|
||||
@@ -67,15 +75,17 @@ class CodeView :public ewol::WidgetScrooled
|
||||
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(int32_t IdInput, ewol::eventInputType_te typeEvent, coord2D_ts pos);
|
||||
virtual bool OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D<float> pos);
|
||||
virtual bool OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData);
|
||||
virtual bool OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent);
|
||||
|
||||
virtual void OnGetFocus(void);
|
||||
virtual void OnLostFocus(void);
|
||||
private:
|
||||
@@ -93,7 +103,7 @@ class CodeView :public ewol::WidgetScrooled
|
||||
private:
|
||||
void CalculateMaxSize(void);
|
||||
protected:
|
||||
virtual void OnDraw(void);
|
||||
virtual void OnDraw(ewol::DrawProperty& displayProp);
|
||||
};
|
||||
|
||||
#endif
|
372
Sources/appl/Gui/MainWindows.cpp
Normal file
@@ -0,0 +1,372 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <MainWindows.h>
|
||||
#include <CodeView.h>
|
||||
#include <BufferView.h>
|
||||
#include <Search.h>
|
||||
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
#include <ewol/widget/List.h>
|
||||
#include <ewol/widget/ContextMenu.h>
|
||||
#include <ewol/widget/PopUp.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
#include <ewol/widget/Menu.h>
|
||||
#include <ewol/widgetMeta/FileChooser.h>
|
||||
#include <ewol/widgetMeta/Parameter.h>
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "AboutGui"
|
||||
|
||||
#include <ewol/widget/Label.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
|
||||
class ParameterAboutGui : public ewol::SizerVert
|
||||
{
|
||||
public :
|
||||
ParameterAboutGui(void)
|
||||
{
|
||||
ewol::Spacer* mySpacer = NULL;
|
||||
|
||||
mySpacer = new ewol::Spacer();
|
||||
if (NULL == mySpacer) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
mySpacer->SetExpendX(true);
|
||||
mySpacer->SetExpendY(true);
|
||||
SubWidgetAdd(mySpacer);
|
||||
}
|
||||
AddElement(" libPng");
|
||||
AddElement(" ogg-tremor");
|
||||
AddElement(" portaudio");
|
||||
AddElement(" libZip");
|
||||
AddElement(" tinyXml");
|
||||
AddElement(" freetype");
|
||||
AddElement(" agg2.4");
|
||||
AddElement(" etk (BSD)");
|
||||
AddElement(" ewol is based on");
|
||||
AddElement(" Website : https://github.com/HeeroYui/ewol");
|
||||
AddElement(" Licence : BSD like");
|
||||
AddElement(" Copyright 2010 Edouard DUPIN, all right reserved");
|
||||
AddElement(" Supported OS : Linux, Android" );
|
||||
AddElement(etk::UString(" OpenGl librairy : v") + ewol::GetVersion() );
|
||||
AddElement("Ewol", true);
|
||||
AddElement("");
|
||||
AddElement(" Website : https://github.com/HeeroYui/edn");
|
||||
AddElement(" Licence : GPL");
|
||||
AddElement(" Copyright 2010 Edouard DUPIN, all right reserved");
|
||||
AddElement(etk::UString(" Build Time : ") + etk::UString(BUILD_TIME));
|
||||
AddElement(" Source Code Editor");
|
||||
AddElement(etk::UString(" Editeur De N'ours : v") + etk::UString(APPL_VERSION_TAG_NAME));
|
||||
AddElement("Edn", true);
|
||||
|
||||
};
|
||||
|
||||
~ParameterAboutGui(void) { };
|
||||
|
||||
void AddElement(etk::UString label, bool bold=false, bool italic=false)
|
||||
{
|
||||
ewol::Label* myLabel = new ewol::Label(label);
|
||||
if (NULL == myLabel) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
myLabel->SetExpendX(true);
|
||||
SubWidgetAdd(myLabel);
|
||||
}
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "MainWindows"
|
||||
|
||||
MainWindows::MainWindows(void)
|
||||
{
|
||||
APPL_DEBUG("CREATE WINDOWS ... ");
|
||||
ewol::SizerVert * mySizerVert = NULL;
|
||||
ewol::SizerVert * mySizerVert2 = NULL;
|
||||
ewol::SizerHori * mySizerHori = NULL;
|
||||
//ewol::Button * myButton = NULL;
|
||||
CodeView * myCodeView = NULL;
|
||||
BufferView * myBufferView = NULL;
|
||||
ewol::Menu * myMenu = NULL;
|
||||
|
||||
mySizerVert = new ewol::SizerVert();
|
||||
SetSubWidget(mySizerVert);
|
||||
|
||||
mySizerHori = new ewol::SizerHori();
|
||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||
myBufferView = new BufferView();
|
||||
myBufferView->SetExpendX(false);
|
||||
myBufferView->SetExpendY(true);
|
||||
myBufferView->SetFillX(true);
|
||||
myBufferView->SetFillY(true);
|
||||
mySizerHori->SubWidgetAdd(myBufferView);
|
||||
|
||||
mySizerVert2 = new ewol::SizerVert();
|
||||
mySizerHori->SubWidgetAdd(mySizerVert2);
|
||||
|
||||
// main buffer Area :
|
||||
myCodeView = new CodeView();
|
||||
myCodeView->SetExpendX(true);
|
||||
myCodeView->SetExpendY(true);
|
||||
myCodeView->SetFillX(true);
|
||||
myCodeView->SetFillY(true);
|
||||
myCodeView->SetFontSize(11);
|
||||
myCodeView->SetFontNameNormal( "freefont/FreeMono.ttf");
|
||||
myCodeView->SetFontNameBold( "freefont/FreeMonoBold.ttf");
|
||||
myCodeView->SetFontNameItalic( "freefont/FreeMonoOblique.ttf");
|
||||
myCodeView->SetFontNameBoldItalic("freefont/FreeMonoBoldOblique.ttf");
|
||||
mySizerVert2->SubWidgetAdd(myCodeView);
|
||||
|
||||
// search area :
|
||||
Search * mySearch = new Search();
|
||||
mySizerVert2->SubWidgetAdd(mySearch);
|
||||
|
||||
mySizerHori = new ewol::SizerHori();
|
||||
mySizerVert->SubWidgetAdd(mySizerHori);
|
||||
|
||||
myMenu = new ewol::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, "Close (all)", "", ednMsgGuiClose, "All");
|
||||
(void)myMenu->Add(idMenuFile, "Save", "icon/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);
|
||||
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->AddSpacer();
|
||||
(void)myMenu->Add(idMenuEdit, "Copy", "", ednMsgGuiCopy, "STD");
|
||||
(void)myMenu->Add(idMenuEdit, "Cut", "", ednMsgGuiCut, "STD");
|
||||
(void)myMenu->Add(idMenuEdit, "Paste", "", ednMsgGuiPaste, "STD");
|
||||
(void)myMenu->Add(idMenuEdit, "Remove", "", ednMsgGuiRm);
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenuEdit, "Select All","", ednMsgGuiSelect, "ALL");
|
||||
(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->AddSpacer();
|
||||
(void)myMenu->Add(idMenuSearch, "Find (previous)","", ednMsgGuiFind, "Previous");
|
||||
(void)myMenu->Add(idMenuSearch, "Find (next)", "", ednMsgGuiFind, "Next");
|
||||
(void)myMenu->Add(idMenuSearch, "Find (all)", "", ednMsgGuiFind, "All");
|
||||
(void)myMenu->Add(idMenuSearch, "Un-Select", "", ednMsgGuiFind, "None");
|
||||
int32_t idMenuCTags = myMenu->AddTitle("C-tags");
|
||||
(void)myMenu->Add(idMenuCTags, "Load", "", ednMsgGuiCtags, "Load");
|
||||
(void)myMenu->Add(idMenuCTags, "ReLoad", "", ednMsgGuiCtags, "ReLoad");
|
||||
(void)myMenu->Add(idMenuCTags, "Jump", "", ednMsgGuiCtags, "Jump");
|
||||
(void)myMenu->Add(idMenuCTags, "Back", "", ednMsgGuiCtags, "Back");
|
||||
int32_t idMenugDisplay = myMenu->AddTitle("Display");
|
||||
(void)myMenu->Add(idMenugDisplay, "Charset UTF-8", "", ednMsgGuiChangeCharset, "UTF-8");
|
||||
(void)myMenu->Add(idMenugDisplay, "Charset ISO-8859-1", "", ednMsgGuiChangeCharset, "ISO-8859-1");
|
||||
(void)myMenu->Add(idMenugDisplay, "Charset ISO-8859-15", "", ednMsgGuiChangeCharset, "ISO-8859-15");
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenugDisplay, "Color Black", "", ednMsgGuiChangeColor, "Black");
|
||||
(void)myMenu->Add(idMenugDisplay, "Color White", "", ednMsgGuiChangeColor, "White");
|
||||
|
||||
m_widgetLabelFileName = new ewol::Label("FileName");
|
||||
m_widgetLabelFileName->SetExpendX(true);
|
||||
m_widgetLabelFileName->SetFillY(true);
|
||||
mySizerHori->SubWidgetAdd(m_widgetLabelFileName);
|
||||
|
||||
// Generic event ...
|
||||
RegisterMultiCast(ednMsgGuiSaveAs);
|
||||
RegisterMultiCast(ednMsgProperties);
|
||||
RegisterMultiCast(ednMsgGuiOpen);
|
||||
// to update the title ...
|
||||
RegisterMultiCast(ednMsgBufferState);
|
||||
RegisterMultiCast(ednMsgBufferId);
|
||||
}
|
||||
|
||||
|
||||
MainWindows::~MainWindows(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected";
|
||||
const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected";
|
||||
|
||||
/**
|
||||
* @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 ---
|
||||
*/
|
||||
void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::Windows::OnReceiveMessage(CallerObject, eventId, data);
|
||||
|
||||
//APPL_INFO("Receive Event from the main windows ... : widgetid=" << CallerObject << "\"" << eventId << "\" ==> data=\"" << data << "\"" );
|
||||
// Open file Section ...
|
||||
if (eventId == ednMsgGuiOpen) {
|
||||
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
|
||||
tmpWidget->SetTitle("Open Files ...");
|
||||
tmpWidget->SetValidateLabel("Open");
|
||||
Buffer * myBuffer = BufferManager::Get(BufferManager::GetSelected());
|
||||
if (NULL!=myBuffer) {
|
||||
etk::File tmpFile = myBuffer->GetFileName();
|
||||
tmpWidget->SetFolder(tmpFile.GetFolder());
|
||||
} else {
|
||||
// nothing to do : just open the basic folder
|
||||
}
|
||||
//tmpWidget->SetFolder("/");
|
||||
PopUpWidgetPush(tmpWidget);
|
||||
tmpWidget->RegisterOnEvent(this, ewolEventFileChooserValidate, ednEventPopUpFileSelected);
|
||||
} else if (eventId == ednEventPopUpFileSelected) {
|
||||
// get the filename :
|
||||
etk::UString tmpData = data;
|
||||
APPL_DEBUG("Request opening the file : " << tmpData);
|
||||
SendMultiCast(ednMsgOpenFile, tmpData);
|
||||
} else if (eventId == ednMsgGuiSaveAs) {
|
||||
if (data == "") {
|
||||
APPL_ERROR("Null data for Save As file ... ");
|
||||
} else {
|
||||
m_currentSavingAsIdBuffer = -1;
|
||||
if (data == "current") {
|
||||
m_currentSavingAsIdBuffer = BufferManager::GetSelected();
|
||||
} else {
|
||||
sscanf(data.c_str(), "%d", &m_currentSavingAsIdBuffer);
|
||||
}
|
||||
|
||||
if (false == BufferManager::Exist(m_currentSavingAsIdBuffer)) {
|
||||
APPL_ERROR("Request saveAs on non existant Buffer ID=" << m_currentSavingAsIdBuffer);
|
||||
} else {
|
||||
Buffer * myBuffer = BufferManager::Get(m_currentSavingAsIdBuffer);
|
||||
ewol::FileChooser* tmpWidget = new ewol::FileChooser();
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
tmpWidget->SetTitle("Save Files As...");
|
||||
tmpWidget->SetValidateLabel("Save");
|
||||
etk::UString folder = "/home/";
|
||||
etk::UString fileName = "";
|
||||
if (true == myBuffer->HaveName()) {
|
||||
etk::File tmpName = myBuffer->GetFileName();
|
||||
folder = tmpName.GetFolder();
|
||||
fileName = tmpName.GetShortFilename();
|
||||
}
|
||||
tmpWidget->SetFolder(folder);
|
||||
tmpWidget->SetFileName(fileName);
|
||||
PopUpWidgetPush(tmpWidget);
|
||||
tmpWidget->RegisterOnEvent(this, ewolEventFileChooserValidate, ednEventPopUpFileSaveAs);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednEventPopUpFileSaveAs) {
|
||||
// get the filename :
|
||||
etk::UString tmpData = data;
|
||||
APPL_DEBUG("Request Saving As file : " << tmpData);
|
||||
|
||||
BufferManager::Get(m_currentSavingAsIdBuffer)->SetFileName(tmpData);
|
||||
SendMultiCast(ednMsgGuiSave, m_currentSavingAsIdBuffer);
|
||||
} else if( eventId == ednMsgBufferState
|
||||
|| eventId == ednMsgBufferId) {
|
||||
// the buffer change we need to update the widget string
|
||||
Buffer* tmpBuffer = BufferManager::Get(BufferManager::GetSelected());
|
||||
if (NULL != tmpBuffer) {
|
||||
etk::File compleateName = tmpBuffer->GetFileName();
|
||||
bool isModify = tmpBuffer->IsModify();
|
||||
etk::UString directName = compleateName.GetCompleateName();
|
||||
if (true == isModify) {
|
||||
directName += " *";
|
||||
}
|
||||
if (NULL == m_widgetLabelFileName) {
|
||||
return;
|
||||
}
|
||||
m_widgetLabelFileName->SetLabel(directName);
|
||||
etk::UString windowsTitle = "edn - ";
|
||||
windowsTitle += directName;
|
||||
ewol::SetTitle(windowsTitle);
|
||||
return;
|
||||
} else {
|
||||
m_widgetLabelFileName->SetLabel("");
|
||||
ewol::SetTitle("edn");
|
||||
}
|
||||
return;
|
||||
// TODO : Set the Title ....
|
||||
} else if (eventId == ednMsgProperties) {
|
||||
// Request the parameter GUI
|
||||
ewol::Parameter* tmpWidget = new ewol::Parameter();
|
||||
if (NULL == tmpWidget) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
tmpWidget->SetTitle("Properties");
|
||||
PopUpWidgetPush(tmpWidget);
|
||||
tmpWidget->MenuAddGroup("Editor");
|
||||
ewol::Widget* tmpSubWidget = new globals::ParameterGlobalsGui();
|
||||
tmpWidget->MenuAdd("Editor", "", tmpSubWidget);
|
||||
tmpWidget->MenuAdd("Polices & Color", "", NULL);
|
||||
tmpWidget->MenuAdd("Highlight", "", NULL);
|
||||
tmpWidget->MenuAddGroup("Genral");
|
||||
tmpWidget->MenuAdd("Affichage", "", NULL);
|
||||
tmpSubWidget = new ParameterAboutGui();
|
||||
tmpWidget->MenuAdd("About", "", tmpSubWidget);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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 ---
|
||||
*/
|
||||
void MainWindows::OnObjectRemove(ewol::EObject * removeObject)
|
||||
{
|
||||
ewol::Windows::OnObjectRemove(removeObject);
|
||||
if (m_widgetLabelFileName == removeObject) {
|
||||
m_widgetLabelFileName = NULL;
|
||||
}
|
||||
}
|
@@ -22,19 +22,17 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#ifndef __MAIN_WINDOWS_H__
|
||||
#define __MAIN_WINDOWS_H__
|
||||
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/globalMsg.h>
|
||||
|
||||
#include <CodeView.h>
|
||||
#include <BufferView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ewol/widget/Label.h>
|
||||
|
||||
|
||||
#ifndef __MAIN_WINDOWS_H__
|
||||
#define __MAIN_WINDOWS_H__
|
||||
class MainWindows : public ewol::Windows
|
||||
{
|
||||
private:
|
||||
@@ -44,6 +42,13 @@ class MainWindows : public ewol::Windows
|
||||
// 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
|
||||
*/
|
||||
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
|
||||
@@ -52,7 +57,17 @@ class MainWindows : public ewol::Windows
|
||||
* @return ---
|
||||
*/
|
||||
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 ---
|
||||
*/
|
||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||
};
|
||||
|
||||
#define EDN_CAST_MAIN_WINDOWS(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_MAIN_WINDOWS,MainWindows,curentPointer)
|
||||
|
||||
#endif
|
||||
|
||||
|
253
Sources/appl/Gui/Search.cpp
Normal file
@@ -0,0 +1,253 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include "appl/global.h"
|
||||
#include "Search.h"
|
||||
#include "SearchData.h"
|
||||
#include "BufferManager.h"
|
||||
#include "MainWindows.h"
|
||||
#include "appl/globalMsg.h"
|
||||
|
||||
#include <ewol/widget/ButtonImage.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "Search"
|
||||
|
||||
const char* const l_eventSearchEntry = "appl-search-entry";
|
||||
const char* const l_eventSearchEntryEnter = "appl-search-entry-enter";
|
||||
const char* const l_eventReplaceEntry = "appl-replace-entry";
|
||||
const char* const l_eventReplaceEntryEnter = "appl-replace-entry-enter";
|
||||
const char* const l_eventSearchBt = "appl-search-button";
|
||||
const char* const l_eventReplaceBt = "appl-replace-button";
|
||||
const char* const l_eventCaseCb = "appl-case-sensitive-CheckBox";
|
||||
const char* const l_eventWrapCb = "appl-wrap-CheckBox";
|
||||
const char* const l_eventForwardCb = "appl-forward-CheckBox";
|
||||
const char* const l_eventHideBt = "appl-hide-button";
|
||||
|
||||
Search::Search(void) :
|
||||
m_searchEntry(NULL),
|
||||
m_replaceEntry(NULL)
|
||||
{
|
||||
m_forward = false;
|
||||
|
||||
ewol::ButtonImage * myButtonImage = NULL;
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/Remove.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventHideBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
m_searchEntry = new ewol::Entry();
|
||||
if (NULL == m_searchEntry) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
m_searchEntry->RegisterOnEvent(this, ewolEventEntryModify, l_eventSearchEntry);
|
||||
m_searchEntry->RegisterOnEvent(this, ewolEventEntryEnter, l_eventSearchEntryEnter);
|
||||
m_searchEntry->SetExpendX(true);
|
||||
m_searchEntry->SetFillX(true);
|
||||
SubWidgetAdd(m_searchEntry);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/Search.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventSearchBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
m_replaceEntry = new ewol::Entry();
|
||||
if (NULL == m_replaceEntry) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
m_replaceEntry->RegisterOnEvent(this, ewolEventEntryModify, l_eventReplaceEntry);
|
||||
m_replaceEntry->RegisterOnEvent(this, ewolEventEntryEnter, l_eventReplaceEntryEnter);
|
||||
m_replaceEntry->SetExpendX(true);
|
||||
m_replaceEntry->SetFillX(true);
|
||||
SubWidgetAdd(m_replaceEntry);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/Replace.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventReplaceBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/CaseSensitive.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
myButtonImage->SetImageSelected("icon/CaseSensitive.svg", 0xFFFFFF5F);
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->SetToggleMode(true);
|
||||
myButtonImage->SetValue(SearchData::GetCase());
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventCaseCb);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/WrapAround.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
myButtonImage->SetImageSelected("icon/WrapAround.svg", 0xFFFFFF5F);
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->SetToggleMode(true);
|
||||
myButtonImage->SetValue(SearchData::GetWrap());
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventWrapCb);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/Up.svg");
|
||||
if (NULL == myButtonImage) {
|
||||
APPL_ERROR("Widget allocation error ==> it will missing in the display");
|
||||
} else {
|
||||
myButtonImage->SetImageSelected("icon/Down.svg");
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->SetToggleMode(true);
|
||||
myButtonImage->SetValue(m_forward);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventForwardCb);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
}
|
||||
|
||||
RegisterMultiCast(ednMsgGuiSearch);
|
||||
// basicly hiden ...
|
||||
Hide();
|
||||
}
|
||||
|
||||
Search::~Search(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 ---
|
||||
*/
|
||||
void Search::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::SizerHori::OnReceiveMessage(CallerObject, eventId, data);
|
||||
//APPL_INFO("Search receive message : \"" << eventId << "\" data=\"" << data << "\"");
|
||||
if ( eventId == l_eventSearchEntry) {
|
||||
SearchData::SetSearch(data);
|
||||
} else if ( eventId == l_eventSearchEntryEnter) {
|
||||
SearchData::SetSearch(data);
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventReplaceEntry) {
|
||||
SearchData::SetReplace(data);
|
||||
} else if ( eventId == l_eventReplaceEntryEnter) {
|
||||
SearchData::SetReplace(data);
|
||||
SendMultiCast(ednMsgGuiReplace, "Normal");
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventSearchBt) {
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventReplaceBt) {
|
||||
SendMultiCast(ednMsgGuiReplace, "Normal");
|
||||
if (true==m_forward) {
|
||||
SendMultiCast(ednMsgGuiFind, "Previous");
|
||||
} else {
|
||||
SendMultiCast(ednMsgGuiFind, "Next");
|
||||
}
|
||||
} else if ( eventId == l_eventCaseCb) {
|
||||
if (data == "true") {
|
||||
SearchData::SetCase(true);
|
||||
} else {
|
||||
SearchData::SetCase(false);
|
||||
}
|
||||
} else if ( eventId == l_eventWrapCb) {
|
||||
if (data == "true") {
|
||||
SearchData::SetWrap(true);
|
||||
} else {
|
||||
SearchData::SetWrap(false);
|
||||
}
|
||||
} else if ( eventId == l_eventForwardCb) {
|
||||
if (data == "true") {
|
||||
m_forward = true;
|
||||
} else {
|
||||
m_forward = false;
|
||||
}
|
||||
} else if ( eventId == l_eventHideBt) {
|
||||
Hide();
|
||||
} else if ( eventId == ednMsgGuiSearch) {
|
||||
if (true == IsHide()) {
|
||||
Show();
|
||||
if (m_searchEntry!= NULL) {
|
||||
m_searchEntry->KeepFocus();
|
||||
}
|
||||
} else {
|
||||
if( (m_searchEntry!=NULL && true==m_searchEntry->GetFocus())
|
||||
|| (m_replaceEntry!=NULL && true==m_replaceEntry->GetFocus()) ) {
|
||||
Hide();
|
||||
} else if (m_searchEntry!= NULL) {
|
||||
m_searchEntry->KeepFocus();
|
||||
} else {
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 ---
|
||||
*/
|
||||
void Search::OnObjectRemove(ewol::EObject * removeObject)
|
||||
{
|
||||
ewol::SizerHori::OnObjectRemove(removeObject);
|
||||
if (removeObject == m_searchEntry) {
|
||||
m_searchEntry = NULL;
|
||||
}
|
||||
if (removeObject == m_replaceEntry) {
|
||||
m_replaceEntry = NULL;
|
||||
}
|
||||
}
|
||||
|
69
Sources/appl/Gui/Search.h
Normal file
@@ -0,0 +1,69 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __SEARCH_H__
|
||||
#define __SEARCH_H__
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <ewol/widget/SizerHori.h>
|
||||
#include <ewol/widget/Entry.h>
|
||||
|
||||
class Search : public ewol::SizerHori
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
Search(void);
|
||||
~Search(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
|
||||
*/
|
||||
const char * const GetObjectType(void) { return "ApplSearch"; };
|
||||
/**
|
||||
* @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 ---
|
||||
*/
|
||||
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 ---
|
||||
*/
|
||||
virtual void OnObjectRemove(ewol::EObject * removeObject);
|
||||
private:
|
||||
bool m_forward;
|
||||
ewol::Entry * m_searchEntry;
|
||||
ewol::Entry * m_replaceEntry;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -23,7 +23,7 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_globals.h>
|
||||
#include <appl/global.h>
|
||||
#include <SearchData.h>
|
||||
|
||||
|
@@ -26,7 +26,8 @@
|
||||
#ifndef __SEARCH_DATA_H__
|
||||
#define __SEARCH_DATA_H__
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <etk/UString.h>
|
||||
#include <appl/Debug.h>
|
||||
|
||||
namespace SearchData
|
||||
{
|
@@ -23,8 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <Highlight.h>
|
||||
#include <tinyXML/tinyxml.h>
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#define __class__ "Highlight"
|
||||
|
||||
|
||||
void Highlight::ParseRules(TiXmlNode *child, etk::VectorType<HighlightPattern*> &mListPatern, int32_t level)
|
||||
void Highlight::ParseRules(TiXmlNode *child, etk::Vector<HighlightPattern*> &mListPatern, int32_t level)
|
||||
{
|
||||
// Create the patern ...
|
||||
HighlightPattern *myPattern = new HighlightPattern();
|
||||
@@ -51,22 +51,22 @@ Highlight::Highlight(etk::UString &xmlFilename)
|
||||
|
||||
etk::File fileName(xmlFilename, etk::FILE_TYPE_DATA);
|
||||
if (false == fileName.Exist()) {
|
||||
EWOL_ERROR("File Does not exist : " << fileName);
|
||||
APPL_ERROR("File Does not exist : " << fileName);
|
||||
return;
|
||||
}
|
||||
int32_t fileSize = fileName.Size();
|
||||
if (0==fileSize) {
|
||||
EWOL_ERROR("This file is empty : " << fileName);
|
||||
APPL_ERROR("This file is empty : " << fileName);
|
||||
return;
|
||||
}
|
||||
if (false == fileName.fOpenRead()) {
|
||||
EWOL_ERROR("Can not open the file : " << fileName);
|
||||
APPL_ERROR("Can not open the file : " << fileName);
|
||||
return;
|
||||
}
|
||||
// allocate data
|
||||
char * fileBuffer = new char[fileSize+5];
|
||||
if (NULL == fileBuffer) {
|
||||
EWOL_ERROR("Error Memory allocation size=" << fileSize);
|
||||
APPL_ERROR("Error Memory allocation size=" << fileSize);
|
||||
return;
|
||||
}
|
||||
memset(fileBuffer, 0, (fileSize+5)*sizeof(char));
|
||||
@@ -77,14 +77,14 @@ Highlight::Highlight(etk::UString &xmlFilename)
|
||||
// load the XML from the memory
|
||||
bool loadError = XmlDocument.Parse((const char*)fileBuffer, 0, TIXML_ENCODING_UTF8);
|
||||
if (false == loadError) {
|
||||
EDN_ERROR( "can not load Hightlight XML: PARSING error: \"" << xmlFilename << "\"");
|
||||
APPL_ERROR( "can not load Hightlight XML: PARSING error: \"" << xmlFilename << "\"");
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
TiXmlElement* root = XmlDocument.FirstChildElement( "EdnLang" );
|
||||
if (NULL == root) {
|
||||
EDN_ERROR( "can not load Hightlight XML: main node not find: \"EdnLang\"");
|
||||
APPL_ERROR( "can not load Hightlight XML: main node not find: \"EdnLang\"");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ Highlight::Highlight(etk::UString &xmlFilename)
|
||||
} else if (!strcmp(child->Value(), "ext")) {
|
||||
const char *myData = child->ToElement()->GetText();
|
||||
if (NULL != myData) {
|
||||
//EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", child->Row(), child->Value() , myData);
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", child->Row(), child->Value() , myData);
|
||||
etk::UString * myEdnData = new etk::UString(myData);
|
||||
m_listExtentions.PushBack(myEdnData);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ Highlight::Highlight(etk::UString &xmlFilename)
|
||||
} else if (!strcmp(passChild->Value(), "rule")) {
|
||||
ParseRules(passChild, m_listHighlightPass1, level1++);
|
||||
} else {
|
||||
EDN_ERROR("(l "<< passChild->Row() << ") node not suported : \""<< passChild->Value() << "\" must be [rule]" );
|
||||
APPL_ERROR("(l "<< passChild->Row() << ") node not suported : \""<< passChild->Value() << "\" must be [rule]" );
|
||||
}
|
||||
// get the next node element :
|
||||
passChild = passChild->NextSibling();
|
||||
@@ -125,13 +125,13 @@ Highlight::Highlight(etk::UString &xmlFilename)
|
||||
} else if (!strcmp(passChild->Value(), "rule")) {
|
||||
ParseRules(passChild, m_listHighlightPass2, level2++);
|
||||
} else {
|
||||
EDN_ERROR("(l "<< passChild->Row() << ") node not suported : \""<< passChild->Value() << "\" must be [rule]" );
|
||||
APPL_ERROR("(l "<< passChild->Row() << ") node not suported : \""<< passChild->Value() << "\" must be [rule]" );
|
||||
}
|
||||
// get the next node element :
|
||||
passChild = passChild->NextSibling();
|
||||
}
|
||||
} else {
|
||||
EDN_ERROR("(l "<< child->Row() << ") node not suported : \""<< child->Value() << "\" must be [ext,pass1,pass2]" );
|
||||
APPL_ERROR("(l "<< child->Row() << ") node not suported : \""<< child->Value() << "\" must be [ext,pass1,pass2]" );
|
||||
}
|
||||
// get the next node element :
|
||||
child = child->NextSibling();
|
||||
@@ -201,7 +201,7 @@ bool Highlight::FileNameCompatible(etk::File &fileName)
|
||||
} else {
|
||||
extention = fileName.GetShortFilename();
|
||||
}
|
||||
EDN_DEBUG(" try to find : in \"" << fileName << "\" extention:\"" << extention << "\" ");
|
||||
APPL_DEBUG(" try to find : in \"" << fileName << "\" extention:\"" << extention << "\" ");
|
||||
|
||||
for (i=0; i<m_listExtentions.Size(); i++) {
|
||||
if (extention == *m_listExtentions[i] ) {
|
||||
@@ -215,18 +215,18 @@ bool Highlight::FileNameCompatible(etk::File &fileName)
|
||||
void Highlight::Display(void)
|
||||
{
|
||||
int32_t i;
|
||||
EDN_INFO("List of ALL Highlight : ");
|
||||
APPL_INFO("List of ALL Highlight : ");
|
||||
for (i=0; i< m_listExtentions.Size(); i++) {
|
||||
EDN_INFO(" Extention : " << i << " : " << *m_listExtentions[i] );
|
||||
APPL_INFO(" Extention : " << i << " : " << *m_listExtentions[i] );
|
||||
}
|
||||
// Display all elements
|
||||
for (i=0; i< m_listHighlightPass1.Size(); i++) {
|
||||
EDN_INFO(" " << i << " Pass 1 : " << m_listHighlightPass1[i]->GetName() );
|
||||
APPL_INFO(" " << i << " Pass 1 : " << m_listHighlightPass1[i]->GetName() );
|
||||
//m_listHighlightPass1[i]->Display();
|
||||
}
|
||||
// Display all elements
|
||||
for (i=0; i< m_listHighlightPass2.Size(); i++) {
|
||||
EDN_INFO(" " << i << " Pass 2 : " << m_listHighlightPass2[i]->GetName() );
|
||||
APPL_INFO(" " << i << " Pass 2 : " << m_listHighlightPass2[i]->GetName() );
|
||||
//m_listHighlightPass2[i]->Display();
|
||||
}
|
||||
}
|
||||
@@ -236,33 +236,33 @@ void Highlight::Display(void)
|
||||
// TODO : Celui qui appelle suprime des element pour rien ... Enfin c'est pas trègrave... Il suffirait juste de suprimer celuis d'avant si il n'est pas terminer...
|
||||
void Highlight::Parse(int32_t start,
|
||||
int32_t stop,
|
||||
etk::VectorType<colorInformation_ts> &metaData,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
int32_t addingPos,
|
||||
EdnVectorBuf &buffer)
|
||||
{
|
||||
if (0 > addingPos) {
|
||||
addingPos = 0;
|
||||
}
|
||||
//EDN_DEBUG("Parse element 0 => " << m_listHighlightPass1.Size() << " ==> position search: (" << start << "," << stop << ")" );
|
||||
//APPL_DEBUG("Parse element 0 => " << m_listHighlightPass1.Size() << " ==> position search: (" << start << "," << stop << ")" );
|
||||
int32_t elementStart = start;
|
||||
int32_t elementStop = stop;
|
||||
colorInformation_ts resultat;
|
||||
while (elementStart<elementStop) {
|
||||
//EDN_DEBUG("Parse element in the buffer id=" << elementStart);
|
||||
//APPL_DEBUG("Parse element in the buffer id=" << elementStart);
|
||||
//try to fond the HL in ALL of we have
|
||||
for (int32_t jjj=0; jjj<m_listHighlightPass1.Size(); jjj++){
|
||||
resultFind_te ret = HLP_FIND_OK;
|
||||
//EDN_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
||||
//APPL_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass1[jjj]->Find(elementStart, buffer.Size(), resultat, buffer);
|
||||
if (HLP_FIND_ERROR != ret) {
|
||||
//EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
||||
//APPL_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
||||
// Remove element in the current List where the current Element have a end inside the next...
|
||||
int32_t kkk=addingPos;
|
||||
while(kkk < metaData.Size() ) {
|
||||
if (metaData[kkk].beginStart <= resultat.endStop) {
|
||||
// Remove element
|
||||
//EDN_INFO("Erase element=" << kkk);
|
||||
//APPL_INFO("Erase element=" << kkk);
|
||||
metaData.EraseLen(kkk, kkk+1);
|
||||
// Increase the end of search
|
||||
if (kkk < metaData.Size()) {
|
||||
@@ -279,7 +279,7 @@ void Highlight::Parse(int32_t start,
|
||||
}
|
||||
// Add curent element in the list ...
|
||||
metaData.Insert(addingPos, resultat);
|
||||
//EDN_DEBUG("INSERT at "<< addingPos << " S=" << resultat.beginStart << " E=" << resultat.endStop );
|
||||
//APPL_DEBUG("INSERT at "<< addingPos << " S=" << resultat.beginStart << " E=" << resultat.endStop );
|
||||
// Update the current research starting element: (Set position at the end of the current element
|
||||
elementStart = resultat.endStop-1;
|
||||
// increment the position of insertion:
|
||||
@@ -300,24 +300,24 @@ void Highlight::Parse(int32_t start,
|
||||
*/
|
||||
void Highlight::Parse2(int32_t start,
|
||||
int32_t stop,
|
||||
etk::VectorType<colorInformation_ts> &metaData,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
EdnVectorBuf &buffer)
|
||||
{
|
||||
//EDN_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() << " ==> position search: (" << start << "," << stop << ")" );
|
||||
//APPL_DEBUG("Parse element 0 => " << m_listHighlightPass2.size() << " ==> position search: (" << start << "," << stop << ")" );
|
||||
int32_t elementStart = start;
|
||||
int32_t elementStop = stop;
|
||||
colorInformation_ts resultat;
|
||||
while (elementStart<elementStop) {
|
||||
//EDN_DEBUG("Parse element in the buffer id=" << elementStart);
|
||||
//APPL_DEBUG("Parse element in the buffer id=" << elementStart);
|
||||
//try to fond the HL in ALL of we have
|
||||
int32_t jjj;
|
||||
for (jjj=0; jjj<m_listHighlightPass2.Size(); jjj++){
|
||||
resultFind_te ret = HLP_FIND_OK;
|
||||
//EDN_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
||||
//APPL_DEBUG("Parse HL id=" << jjj << " position search: (" << start << "," << buffer.Size() << ")" );
|
||||
// Stop the search to the end (to get the end of the pattern)
|
||||
ret = m_listHighlightPass2[jjj]->Find(elementStart, elementStop, resultat, buffer);
|
||||
if (HLP_FIND_ERROR != ret) {
|
||||
//EDN_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
||||
//APPL_INFO("Find Pattern in the Buffer : (" << resultat.beginStart << "," << resultat.endStop << ")" );
|
||||
// Add curent element in the list ...
|
||||
metaData.PushBack(resultat);
|
||||
elementStart = resultat.endStop-1;
|
@@ -42,6 +42,7 @@ extern "C" {
|
||||
} colorInformation_ts;
|
||||
}
|
||||
|
||||
#include <etk/File.h>
|
||||
#include <HighlightPattern.h>
|
||||
#include <Colorize.h>
|
||||
#include <EdnVectorBuf.h>
|
||||
@@ -58,19 +59,19 @@ class Highlight {
|
||||
void ReloadColor(void);
|
||||
void Parse(int32_t start,
|
||||
int32_t stop,
|
||||
etk::VectorType<colorInformation_ts> &metaData,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
int32_t addingPos,
|
||||
EdnVectorBuf &buffer);
|
||||
void Parse2(int32_t start,
|
||||
int32_t stop,
|
||||
etk::VectorType<colorInformation_ts> &metaData,
|
||||
etk::Vector<colorInformation_ts> &metaData,
|
||||
EdnVectorBuf &buffer);
|
||||
private:
|
||||
void ParseRules(TiXmlNode *child, etk::VectorType<HighlightPattern*> &mListPatern, int32_t level);
|
||||
void ParseRules(TiXmlNode *child, etk::Vector<HighlightPattern*> &mListPatern, int32_t level);
|
||||
etk::UString m_styleName; //!< curent style name (like "c++" or "c" or "script Bash")
|
||||
etk::VectorType<etk::UString*> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
|
||||
etk::VectorType<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer)
|
||||
etk::VectorType<HighlightPattern*> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) )
|
||||
etk::Vector<etk::UString*> m_listExtentions; //!< List of possible extention for this high-light, like : ".c", ".cpp", ".h"
|
||||
etk::Vector<HighlightPattern*> m_listHighlightPass1; //!< List of ALL hightlight modules (pass 1 ==> when we load and wride data on the buffer)
|
||||
etk::Vector<HighlightPattern*> m_listHighlightPass2; //!< List of ALL hightlight modules (pass 2 ==> When we display the buffer( only the display area (100 lines)) )
|
||||
};
|
||||
|
||||
|
@@ -23,8 +23,8 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <HighlightManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
#include <ewol/EObjectManager.h>
|
||||
@@ -32,11 +32,10 @@
|
||||
#undef __class__
|
||||
#define __class__ "HighlightManager"
|
||||
|
||||
|
||||
class localClassHighlightManager: public ewol::EObject
|
||||
{
|
||||
private:
|
||||
etk::VectorType<Highlight*> listHighlight; //!< List of ALL hightlight modules
|
||||
etk::Vector<Highlight*> listHighlight; //!< List of ALL hightlight modules
|
||||
public:
|
||||
// Constructeur
|
||||
localClassHighlightManager(void) {
|
||||
@@ -54,6 +53,18 @@ class localClassHighlightManager: public ewol::EObject
|
||||
// clear the compleate list
|
||||
listHighlight.Clear();
|
||||
};
|
||||
|
||||
/**
|
||||
* @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
|
||||
*/
|
||||
const char * const GetObjectType(void)
|
||||
{
|
||||
return "ApplHighlightManager";
|
||||
}
|
||||
|
||||
/**
|
||||
* @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
|
||||
@@ -66,8 +77,8 @@ class localClassHighlightManager: public ewol::EObject
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
case EDN_MSG__COLOR_HAS_CHANGE:
|
||||
EDN_INFO("UPDATE the color pointer on the HL");
|
||||
case APPL_MSG__COLOR_HAS_CHANGE:
|
||||
APPL_INFO("UPDATE the color pointer on the HL");
|
||||
for (int32_t i=0; i<listHighlight.Size(); i++) {
|
||||
if (NULL != listHighlight[i]) {
|
||||
listHighlight[i]->ReloadColor();
|
||||
@@ -136,11 +147,20 @@ class localClassHighlightManager: public ewol::EObject
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.PushBack(myHightline);
|
||||
|
||||
xmlFilename = "lang_lua.xml";
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.PushBack(myHightline);
|
||||
|
||||
xmlFilename = "lang_in.xml";
|
||||
myHightline = new Highlight(xmlFilename);
|
||||
listHighlight.PushBack(myHightline);
|
||||
|
||||
//myHightline->Display();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#define EDN_CAST_HIGHLIGHT_MANAGER(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER,localClassHighlightManager,curentPointer)
|
||||
|
||||
static localClassHighlightManager * localManager = NULL;
|
||||
|
||||
@@ -149,23 +169,23 @@ static localClassHighlightManager * localManager = NULL;
|
||||
void HighlightManager::Init(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("HighlightManager ==> already exist, just unlink the previous ...");
|
||||
APPL_ERROR("HighlightManager ==> already exist, just unlink the previous ...");
|
||||
localManager = NULL;
|
||||
}
|
||||
localManager = new localClassHighlightManager();
|
||||
|
||||
if (NULL == localManager) {
|
||||
EWOL_CRITICAL("Allocation of HighlightManager not done ...");
|
||||
APPL_CRITICAL("Allocation of HighlightManager not done ...");
|
||||
}
|
||||
}
|
||||
|
||||
void HighlightManager::UnInit(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("HighlightManager ==> request UnInit, but does not exist ...");
|
||||
APPL_ERROR("HighlightManager ==> request UnInit, but does not exist ...");
|
||||
return;
|
||||
}
|
||||
ewol::EObjectManager::MarkToRemoved(localManager);
|
||||
delete(localManager);
|
||||
localManager = NULL;
|
||||
}
|
||||
|
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
#include <etk/UString.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <Highlight.h>
|
||||
#include <ewol/Widget.h>
|
||||
|
@@ -22,8 +22,8 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <HighlightPattern.h>
|
||||
#include <ColorizeManager.h>
|
||||
|
||||
@@ -102,24 +102,24 @@ void HighlightPattern::ReloadColor(void)
|
||||
void HighlightPattern::Display(void)
|
||||
{
|
||||
/*
|
||||
EDN_INFO("patern : \"" << m_paternName << "\" level=" << m_level );
|
||||
EDN_INFO(" ==> colorName \"" << m_colorName << "\"");
|
||||
EDN_INFO(" ==> regExpStart \"" << m_regExpStart->GetRegExp() << "\"");
|
||||
EDN_INFO(" ==> regExpStop \"" << m_regExpStop->GetRegExp() << "\"");
|
||||
APPL_INFO("patern : \"" << m_paternName << "\" level=" << m_level );
|
||||
APPL_INFO(" ==> colorName \"" << m_colorName << "\"");
|
||||
APPL_INFO(" ==> regExpStart \"" << m_regExpStart->GetRegExp() << "\"");
|
||||
APPL_INFO(" ==> regExpStop \"" << m_regExpStop->GetRegExp() << "\"");
|
||||
if (true == m_haveStopPatern) {
|
||||
EDN_INFO(" ==> stop pattern: YES");
|
||||
APPL_INFO(" ==> stop pattern: YES");
|
||||
} else {
|
||||
EDN_INFO(" ==> stop pattern: NO");
|
||||
APPL_INFO(" ==> stop pattern: NO");
|
||||
}
|
||||
if (true == m_multiline) {
|
||||
EDN_INFO(" ==> multiline pattern: YES");
|
||||
APPL_INFO(" ==> multiline pattern: YES");
|
||||
} else {
|
||||
EDN_INFO(" ==> multiline pattern: NO");
|
||||
APPL_INFO(" ==> multiline pattern: NO");
|
||||
}
|
||||
*/
|
||||
// Display all elements
|
||||
for (int32_t i=0; i< m_subPatern.Size(); i++) {
|
||||
EDN_INFO(" " << i << " SubPattern : " << m_subPatern[i]->GetName() );
|
||||
APPL_INFO(" " << i << " SubPattern : " << m_subPatern[i]->GetName() );
|
||||
m_subPatern[i]->Display();
|
||||
}
|
||||
}
|
||||
@@ -148,7 +148,7 @@ void HighlightPattern::ParseRules(TiXmlNode *child, int32_t level)
|
||||
if (NULL != xChild) {
|
||||
const char *myData = xChild->GetText();
|
||||
if (myData) {
|
||||
//EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
etk::UString myEdnData = myData;
|
||||
SetColor(myEdnData);
|
||||
}
|
||||
@@ -157,7 +157,7 @@ void HighlightPattern::ParseRules(TiXmlNode *child, int32_t level)
|
||||
if (NULL != xChild) {
|
||||
const char *myData = xChild->GetText();
|
||||
if (myData) {
|
||||
//EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
etk::UString myEdnData = myData;
|
||||
SetPaternStart(myEdnData);
|
||||
}
|
||||
@@ -166,7 +166,7 @@ void HighlightPattern::ParseRules(TiXmlNode *child, int32_t level)
|
||||
if (NULL != xChild) {
|
||||
const char *myData = xChild->GetText();
|
||||
if (myData) {
|
||||
//EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
etk::UString myEdnData = myData;
|
||||
SetPaternStop(myEdnData);
|
||||
}
|
||||
@@ -175,7 +175,7 @@ void HighlightPattern::ParseRules(TiXmlNode *child, int32_t level)
|
||||
if (NULL != xChild) {
|
||||
const char *myData = xChild->GetText();
|
||||
if (myData) {
|
||||
//EDN_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
//APPL_INFO(PFX"(l %d) node fined : %s=\"%s\"", xChild->Row(), xChild->Value() , myData);
|
||||
etk::UString myEdnData = myData;
|
||||
SetEscapeChar(myEdnData);
|
||||
}
|
||||
@@ -209,7 +209,7 @@ void HighlightPattern::ParseRules(TiXmlNode *child, int32_t level)
|
||||
*/
|
||||
resultFind_te HighlightPattern::Find(int32_t start, int32_t stop, colorInformation_ts &resultat, EdnVectorBuf &buffer)
|
||||
{
|
||||
//EDN_DEBUG(" try to find the element");
|
||||
//APPL_DEBUG(" try to find the element");
|
||||
resultat.beginStart = -1;
|
||||
resultat.beginStop = -1;
|
||||
resultat.endStart = -1;
|
||||
@@ -226,7 +226,7 @@ resultFind_te HighlightPattern::Find(int32_t start, int32_t stop, colorInformati
|
||||
resultat.endStop = m_regExpStart->Stop();
|
||||
return HLP_FIND_OK;
|
||||
}
|
||||
//EDN_DEBUG("NOT find hightlightpatern ...");
|
||||
//APPL_DEBUG("NOT find hightlightpatern ...");
|
||||
} else {
|
||||
// try while we find the first element
|
||||
if (true == m_regExpStart->ProcessOneElement(buffer, start, stop, m_escapeChar)) {
|
||||
@@ -243,7 +243,7 @@ resultFind_te HighlightPattern::Find(int32_t start, int32_t stop, colorInformati
|
||||
return HLP_FIND_OK_NO_END;
|
||||
}
|
||||
}
|
||||
//EDN_DEBUG("NOT find start hightlightpatern ...");
|
||||
//APPL_DEBUG("NOT find start hightlightpatern ...");
|
||||
}
|
||||
return HLP_FIND_ERROR;
|
||||
}
|
@@ -33,7 +33,7 @@ class HighlightPattern;
|
||||
|
||||
#include <etk/RegExp.h>
|
||||
#include <Colorize.h>
|
||||
#include <etk/VectorType.h>
|
||||
#include <etk/Vector.h>
|
||||
#include <tinyXML/tinyxml.h>
|
||||
#include <EdnVectorBuf.h>
|
||||
|
||||
@@ -81,8 +81,8 @@ class HighlightPattern {
|
||||
bool m_haveStopPatern; //!< Stop patern presence
|
||||
bool m_multiline; //!< The patern is multiline
|
||||
uniChar_t m_escapeChar; //!< Escape char to prevent exeit of patern ....
|
||||
etk::VectorType<HighlightPattern *> m_subPatern; //!< Under patern of this one
|
||||
// etk::VectorType<HighlightPattern *> m_subColor; //!< Under Color in the start RegExp ...
|
||||
etk::Vector<HighlightPattern *> m_subPatern; //!< Under patern of this one
|
||||
// etk::Vector<HighlightPattern *> m_subColor; //!< Under Color in the start RegExp ...
|
||||
};
|
||||
|
||||
#endif
|
@@ -23,10 +23,9 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <CTagsManager.h>
|
||||
#include <ClipBoard.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
@@ -94,16 +93,16 @@ etk::UString CTagsManager::GetFolder(etk::UString &inputString)
|
||||
return out;
|
||||
}
|
||||
|
||||
bool CTagsManager::OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y)
|
||||
bool CTagsManager::OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, float x, float y)
|
||||
{
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
case EDN_MSG__BUFFER_CHANGE_CURRENT:
|
||||
case APPL_MSG__BUFFER_CHANGE_CURRENT:
|
||||
m_currentSelectedID = dataID;
|
||||
break;
|
||||
case EDN_MSG__OPEN_CTAGS:
|
||||
EDN_INFO("Request opening ctag file");
|
||||
case APPL_MSG__OPEN_CTAGS:
|
||||
APPL_INFO("Request opening ctag file");
|
||||
{
|
||||
GtkWidget *dialog = gtk_file_chooser_dialog_new( "Open Exuberant Ctags File", NULL,
|
||||
GTK_FILE_CHOOSER_ACTION_OPEN,
|
||||
@@ -120,24 +119,24 @@ bool CTagsManager::OnEventAreaExternal(int32_t widgetID, const char * generateEv
|
||||
gtk_widget_destroy(dialog);
|
||||
}
|
||||
break;
|
||||
case EDN_MSG__RELOAD_CTAGS:
|
||||
case APPL_MSG__RELOAD_CTAGS:
|
||||
LoadTagFile();
|
||||
break;
|
||||
case EDN_MSG__JUMP_TO_CURRENT_SELECTION:
|
||||
case APPL_MSG__JUMP_TO_CURRENT_SELECTION:
|
||||
JumpTo();
|
||||
break;
|
||||
case EDN_MSG__JUMP_BACK:
|
||||
case APPL_MSG__JUMP_BACK:
|
||||
if (m_historyList.Size() > 0) {
|
||||
BufferManager *myBufferManager = BufferManager::getInstance();
|
||||
int32_t id = m_historyList.Size()-1;
|
||||
if (false == myBufferManager->Exist(*m_historyList[id]) ) {
|
||||
// need to open the file :
|
||||
int32_t openID = myBufferManager->Open(*m_historyList[id]);
|
||||
SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, openID);
|
||||
SendMessage(APPL_MSG__CURRENT_CHANGE_BUFFER_ID, openID);
|
||||
} else {
|
||||
SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, myBufferManager->GetId(*m_historyList[id]));
|
||||
SendMessage(APPL_MSG__CURRENT_CHANGE_BUFFER_ID, myBufferManager->GetId(*m_historyList[id]));
|
||||
}
|
||||
SendMessage(EDN_MSG__CURRENT_GOTO_LINE, m_historyList[id]->GetLineNumber());
|
||||
SendMessage(APPL_MSG__CURRENT_GOTO_LINE, m_historyList[id]->GetLineNumber());
|
||||
// Remove element ....
|
||||
delete(m_historyList[id]);
|
||||
m_historyList[id]=NULL;
|
||||
@@ -164,12 +163,12 @@ void CTagsManager::LoadTagFile(void)
|
||||
return;
|
||||
}
|
||||
// load (open) the tag file :
|
||||
EDN_INFO("try to open tag file : " << m_tagFilename);
|
||||
APPL_INFO("try to open tag file : " << m_tagFilename);
|
||||
m_ctagFile = tagsOpen(m_tagFilename.c_str(), &info);
|
||||
if (NULL != m_ctagFile) {
|
||||
EDN_INFO("open exuberant Ctags file is OK ...");
|
||||
APPL_INFO("open exuberant Ctags file is OK ...");
|
||||
} else {
|
||||
EDN_INFO("Error to open ctags file ...");
|
||||
APPL_INFO("Error to open ctags file ...");
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -202,7 +201,7 @@ void CTagsManager::cb_row(GtkTreeView *p_treeview,
|
||||
GtkTreeViewColumn * p_column,
|
||||
gpointer data)
|
||||
{
|
||||
EDN_DEBUG("event");
|
||||
APPL_DEBUG("event");
|
||||
CTagsManager * self = static_cast<CTagsManager*>(data);
|
||||
|
||||
gchar * p_file=NULL;
|
||||
@@ -217,7 +216,7 @@ void CTagsManager::cb_row(GtkTreeView *p_treeview,
|
||||
CTAGS_COL_FILE, &p_file,
|
||||
CTAGS_COL_LINE_NUMBER, &lineNumber,
|
||||
-1 );
|
||||
EDN_DEBUG("find : " << p_file << ":" << lineNumber);
|
||||
APPL_DEBUG("find : " << p_file << ":" << lineNumber);
|
||||
for (int32_t iii = 0; iii < self->m_currentList.Size() ; iii++) {
|
||||
if( self->m_currentList[iii].lineID == lineNumber
|
||||
&& strcmp(self->m_currentList[iii].filename, p_file)==0)
|
||||
@@ -318,7 +317,7 @@ void CTagsManager::JumpAtID(int32_t selectID)
|
||||
/*
|
||||
BufferManager *myBufferManager = BufferManager::getInstance();
|
||||
etk::File myFile = m_currentList[selectID].filename;
|
||||
EDN_INFO("save curent filename and position : ");
|
||||
APPL_INFO("save curent filename and position : ");
|
||||
int32_t currentSelected = myBufferManager->GetSelected();
|
||||
Buffer* tmpBuf = myBufferManager->Get(currentSelected);
|
||||
if (NULL != tmpBuf) {
|
||||
@@ -327,15 +326,15 @@ void CTagsManager::JumpAtID(int32_t selectID)
|
||||
bufferFilename->SetLineNumber(tmpBuf->GetCurrentLine());
|
||||
m_historyList.PushBack(bufferFilename);
|
||||
}
|
||||
EDN_INFO(" OPEN the TAG file Destination : " << myFile );
|
||||
APPL_INFO(" OPEN the TAG file Destination : " << myFile );
|
||||
if (false == myBufferManager->Exist(myFile) ) {
|
||||
// need to open the file :
|
||||
int32_t openID = myBufferManager->Open(myFile);
|
||||
SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, openID);
|
||||
SendMessage(APPL_MSG__CURRENT_CHANGE_BUFFER_ID, openID);
|
||||
} else {
|
||||
SendMessage(EDN_MSG__CURRENT_CHANGE_BUFFER_ID, myBufferManager->GetId(myFile));
|
||||
SendMessage(APPL_MSG__CURRENT_CHANGE_BUFFER_ID, myBufferManager->GetId(myFile));
|
||||
}
|
||||
SendMessage(EDN_MSG__CURRENT_GOTO_LINE, m_currentList[selectID].lineID - 1);
|
||||
SendMessage(APPL_MSG__CURRENT_GOTO_LINE, m_currentList[selectID].lineID - 1);
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -345,15 +344,15 @@ void CTagsManager::JumpTo(void)
|
||||
/*
|
||||
m_currentList.Clear();
|
||||
if (NULL != m_ctagFile) {
|
||||
etk::VectorType<int8_t> data;
|
||||
etk::Vector<int8_t> data;
|
||||
// get the middle button of the clipboard ==> represent the current selection ...
|
||||
ClipBoard::Get(COPY_MIDDLE_BUTTON, data);
|
||||
if (data.Size() == 0) {
|
||||
EDN_INFO("No current Sélection");
|
||||
APPL_INFO("No current S\E9lection");
|
||||
}
|
||||
tagEntry entry;
|
||||
data.PushBack('\0');
|
||||
EDN_INFO("try to find the tag : " << (const char *)&data[0]);
|
||||
APPL_INFO("try to find the tag : " << (const char *)&data[0]);
|
||||
if (tagsFind (m_ctagFile, &entry, (const char *)&data[0], 0) == TagSuccess) {
|
||||
tagEntry entrySave = entry;
|
||||
int32_t numberOfTags = 0;
|
||||
@@ -383,7 +382,7 @@ void CTagsManager::JumpTo(void)
|
||||
int32_t SelectID = MultipleJump();
|
||||
}
|
||||
} else {
|
||||
EDN_INFO("no tag find ...");
|
||||
APPL_INFO("no tag find ...");
|
||||
}
|
||||
}
|
||||
*/
|
||||
@@ -392,23 +391,23 @@ void CTagsManager::JumpTo(void)
|
||||
void CTagsManager::PrintTag (const tagEntry *entry, bool small)
|
||||
{
|
||||
if (small==true) {
|
||||
EDN_INFO("find Tag file : name=\"" << entry->name << "\" in file=\"" << entry->file
|
||||
APPL_INFO("find Tag file : name=\"" << entry->name << "\" in file=\"" << entry->file
|
||||
<< "\" at line="<< entry->address.lineNumber);
|
||||
} else {
|
||||
int i;
|
||||
EDN_INFO("find Tag file : name=\"" << entry->name << "\" in file=\"" << entry->file
|
||||
APPL_INFO("find Tag file : name=\"" << entry->name << "\" in file=\"" << entry->file
|
||||
<< "\" pattern=\"" <<entry->address.pattern
|
||||
<< "\" at line="<<entry->address.lineNumber);
|
||||
|
||||
EDN_INFO("Extention field : ");
|
||||
APPL_INFO("Extention field : ");
|
||||
if (entry->kind != NULL && entry->kind [0] != '\0') {
|
||||
EDN_INFO(" kind : " << entry->kind);
|
||||
APPL_INFO(" kind : " << entry->kind);
|
||||
}
|
||||
if (entry->fileScope) {
|
||||
EDN_INFO(" file : ");
|
||||
APPL_INFO(" file : ");
|
||||
}
|
||||
for (i = 0 ; i < entry->fields.count ; ++i) {
|
||||
EDN_INFO(" " << entry->fields.list[i].key << ":" << entry->fields.list[i].value );
|
||||
APPL_INFO(" " << entry->fields.list[i].key << ":" << entry->fields.list[i].value );
|
||||
}
|
||||
}
|
||||
}
|
@@ -28,7 +28,7 @@
|
||||
|
||||
|
||||
#include <ewol/Widget.h>
|
||||
#include "MsgBroadcast.h"
|
||||
#include "appl/globalMsg.h"
|
||||
#include "readtags.h"
|
||||
|
||||
#define MAX_REG_EXP_SEARCH (1024)
|
||||
@@ -50,7 +50,7 @@ class CTagsManager: public etk::Singleton<CTagsManager>, public ewol::Widget
|
||||
~CTagsManager(void);
|
||||
|
||||
public:
|
||||
virtual bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, etkFloat_t x, etkFloat_t y);
|
||||
virtual bool OnEventAreaExternal(int32_t widgetID, const char * generateEventId, const char * eventExternId, float x, float y);
|
||||
private:
|
||||
int32_t m_currentSelectedID;
|
||||
void LoadTagFile(void);
|
||||
@@ -64,8 +64,8 @@ class CTagsManager: public etk::Singleton<CTagsManager>, public ewol::Widget
|
||||
// history system
|
||||
void AddToHistory(int32_t bufferID);
|
||||
int32_t m_historyPos;
|
||||
etk::VectorType<etk::File*> m_historyList;
|
||||
etk::VectorType<TagListFind_ts> m_currentList;
|
||||
etk::Vector<etk::File*> m_historyList;
|
||||
etk::Vector<TagListFind_ts> m_currentList;
|
||||
void JumpAtID(int32_t selectID);
|
||||
};
|
||||
*/
|
218
Sources/appl/global.cpp
Normal file
@@ -0,0 +1,218 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <appl/global.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "globals"
|
||||
|
||||
|
||||
|
||||
|
||||
erreurCode_te globals::init(void)
|
||||
{
|
||||
erreurCode_te ret = ERR_NONE;
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// -----------------------------------------------------------
|
||||
static bool displayEOL = false;
|
||||
bool globals::IsSetDisplayEndOfLine(void)
|
||||
{
|
||||
return displayEOL;
|
||||
}
|
||||
|
||||
void globals::SetDisplayEndOfLine(bool newVal)
|
||||
{
|
||||
APPL_INFO("Set EndOfLine " << newVal);
|
||||
displayEOL = newVal;
|
||||
//ewol::widgetMessageMultiCast::Send(-1, ednMsgUserDisplayChange);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
static bool displaySpaceChar = true;
|
||||
bool globals::IsSetDisplaySpaceChar(void)
|
||||
{
|
||||
return displaySpaceChar;
|
||||
}
|
||||
|
||||
void globals::SetDisplaySpaceChar(bool newVal)
|
||||
{
|
||||
APPL_INFO("Set SpaceChar " << newVal);
|
||||
displaySpaceChar = newVal;
|
||||
//ewol::widgetMessageMultiCast::Send(-1, ednMsgUserDisplayChange);
|
||||
}
|
||||
// -----------------------------------------------------------
|
||||
static bool displayTabChar = true;
|
||||
bool globals::IsSetDisplayTabChar(void)
|
||||
{
|
||||
return displayTabChar;
|
||||
}
|
||||
|
||||
void globals::SetDisplayTabChar(bool newVal)
|
||||
{
|
||||
APPL_INFO("Set SpaceChar " << newVal);
|
||||
displayTabChar = newVal;
|
||||
//ewol::widgetMessageMultiCast::Send(-1, ednMsgUserDisplayChange);
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
static bool AutoIndent = true;
|
||||
bool globals::IsSetAutoIndent(void)
|
||||
{
|
||||
return AutoIndent;
|
||||
}
|
||||
|
||||
void globals::SetAutoIndent(bool newVal)
|
||||
{
|
||||
APPL_INFO("Set AutoIndent " << newVal);
|
||||
AutoIndent = newVal;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
int32_t globals::getNbColoneBorder(void)
|
||||
{
|
||||
return 6;
|
||||
}
|
||||
|
||||
int32_t globals::getNbLineBorder(void)
|
||||
{
|
||||
return 3;
|
||||
}
|
||||
|
||||
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
#include <ewol/widget/Spacer.h>
|
||||
static const char * const l_changeIndentation = "edn-event-change-indentation";
|
||||
static const char * const l_changeSpace = "edn-event-change-spaces";
|
||||
static const char * const l_changeTabulation = "edn-event-change-tabulation";
|
||||
static const char * const l_changeEndOfLine = "edn-event-change-endOfLine";
|
||||
|
||||
globals::ParameterGlobalsGui::ParameterGlobalsGui(void)
|
||||
{
|
||||
ewol::CheckBox* myCheckbox = NULL;
|
||||
ewol::Spacer* mySpacer = NULL;
|
||||
|
||||
mySpacer = new ewol::Spacer();
|
||||
if (NULL == mySpacer) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
mySpacer->SetExpendX(true);
|
||||
mySpacer->SetExpendY(true);
|
||||
SubWidgetAdd(mySpacer);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Automatic Indentation");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
myCheckbox->SetExpendX(true);
|
||||
myCheckbox->SetValue(IsSetAutoIndent());
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeIndentation);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Display space char (' ')");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
myCheckbox->SetExpendX(true);
|
||||
myCheckbox->SetValue(IsSetDisplaySpaceChar());
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeSpace);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Display tabulation char ('\\t')");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
myCheckbox->SetExpendX(true);
|
||||
myCheckbox->SetValue(IsSetDisplayTabChar());
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeTabulation);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
myCheckbox = new ewol::CheckBox("Display end of line ('\\n')");
|
||||
if (NULL == myCheckbox) {
|
||||
APPL_ERROR("Can not allocate widget ==> display might be in error");
|
||||
} else {
|
||||
myCheckbox->SetExpendX(true);
|
||||
myCheckbox->SetValue(IsSetDisplayEndOfLine());
|
||||
myCheckbox->RegisterOnEvent(this, ewolEventCheckBoxClicked, l_changeEndOfLine);
|
||||
SubWidgetAdd(myCheckbox);
|
||||
}
|
||||
}
|
||||
|
||||
globals::ParameterGlobalsGui::~ParameterGlobalsGui(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 ---
|
||||
*/
|
||||
void globals::ParameterGlobalsGui::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::SizerVert::OnReceiveMessage(CallerObject, eventId, data);
|
||||
|
||||
if (eventId == l_changeEndOfLine) {
|
||||
if (data == "true") {
|
||||
SetDisplayEndOfLine(true);
|
||||
} else {
|
||||
SetDisplayEndOfLine(false);
|
||||
}
|
||||
} else if (eventId == l_changeIndentation) {
|
||||
if (data == "true") {
|
||||
SetAutoIndent(true);
|
||||
} else {
|
||||
SetAutoIndent(false);
|
||||
}
|
||||
} else if (eventId == l_changeSpace) {
|
||||
if (data == "true") {
|
||||
SetDisplaySpaceChar(true);
|
||||
} else {
|
||||
SetDisplaySpaceChar(false);
|
||||
}
|
||||
} else if (eventId == l_changeTabulation) {
|
||||
if (data == "true") {
|
||||
SetDisplayTabChar(true);
|
||||
} else {
|
||||
SetDisplayTabChar(false);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file tools_globals.h
|
||||
* @file appl/global.h
|
||||
* @brief Editeur De N'ours : Globals Values (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 05/12/2010
|
||||
@@ -26,8 +26,9 @@
|
||||
#ifndef __TOOLS_GLOBALS_H__
|
||||
#define __TOOLS_GLOBALS_H__
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <types_generique.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <etk/Types.h>
|
||||
#include <ewol/widget/SizerVert.h>
|
||||
|
||||
|
||||
namespace globals
|
||||
@@ -42,10 +43,29 @@ namespace globals
|
||||
bool IsSetDisplaySpaceChar(void);
|
||||
void SetDisplaySpaceChar(bool newVal);
|
||||
|
||||
bool IsSetDisplayTabChar(void);
|
||||
void SetDisplayTabChar(bool newVal);
|
||||
|
||||
bool IsSetAutoIndent(void);
|
||||
void SetAutoIndent(bool newVal);
|
||||
|
||||
void init2(void);
|
||||
|
||||
|
||||
class ParameterGlobalsGui : public ewol::SizerVert
|
||||
{
|
||||
public :
|
||||
ParameterGlobalsGui(void);
|
||||
~ParameterGlobalsGui(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 ---
|
||||
*/
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
||||
};
|
||||
|
||||
}
|
||||
|
@@ -23,7 +23,7 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
@@ -34,6 +34,7 @@ extern const char* const ednMsgGuiOpen = "edn-Msg-Gui-Open";
|
||||
extern const char* const ednMsgGuiClose = "edn-Msg-Gui-Close";
|
||||
extern const char* const ednMsgGuiSave = "edn-Msg-Gui-Save";
|
||||
extern const char* const ednMsgGuiSaveAs = "edn-Msg-Gui-SaveAs";
|
||||
extern const char* const ednMsgProperties = "edn-Msg-Gui-Properties";
|
||||
|
||||
extern const char* const ednMsgGuiUndo = "edn-Msg-Gui-Undo";
|
||||
extern const char* const ednMsgGuiRedo = "edn-Msg-Gui-Redo";
|
||||
@@ -55,7 +56,6 @@ extern const char* const ednMsgGuiShowEndOfLine = "edn-Msg-Gui-ShowEndOfLine";
|
||||
|
||||
extern const char* const ednMsgGuiCtags = "edn-Msg-Gui-CTags";
|
||||
|
||||
extern const char* const ednMsgGuiAbout = "edn-Msg-Gui-About";
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
@@ -1,6 +1,6 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file MsgBroadcast.h
|
||||
* @file appl/globalMsg.h
|
||||
* @brief Editeur De N'ours : message beetween thread and GUI elements ... (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/02/2011
|
||||
@@ -34,6 +34,7 @@
|
||||
extern const char* const ednMsgGuiClose; // data : "current" "All"
|
||||
extern const char* const ednMsgGuiSave; // data : ""
|
||||
extern const char* const ednMsgGuiSaveAs; // data : ""
|
||||
extern const char* const ednMsgProperties; // data : ""
|
||||
|
||||
extern const char* const ednMsgGuiUndo; // data : ""
|
||||
extern const char* const ednMsgGuiRedo; // data : ""
|
||||
@@ -45,7 +46,7 @@
|
||||
extern const char* const ednMsgGuiGotoLine; // data : "???" / "1" ... "999999999999"
|
||||
|
||||
extern const char* const ednMsgGuiSearch; // data : ""
|
||||
extern const char* const ednMsgGuiReplace; // data : ""
|
||||
extern const char* const ednMsgGuiReplace; // data : "Normal" "All"
|
||||
extern const char* const ednMsgGuiFind; // data : "Next" "Previous" "All" "None"
|
||||
|
||||
extern const char* const ednMsgGuiChangeColor; // data : "Black" "White"
|
||||
@@ -55,7 +56,6 @@
|
||||
|
||||
extern const char* const ednMsgGuiCtags; // data : "Load" "ReLoad" "Jump" "Back"
|
||||
|
||||
extern const char* const ednMsgGuiAbout; // data : ""
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
@@ -23,23 +23,24 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <etk/UString.h>
|
||||
#include <ewol/ewol.h>
|
||||
#include <ewol/EObject.h>
|
||||
#include <ewol/WidgetManager.h>
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <etk/File.h>
|
||||
#include <etk/tool.h>
|
||||
#include <Gui/MainWindows.h>
|
||||
#include <Display.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <HighlightManager.h>
|
||||
#include <ClipBoard.h>
|
||||
#include <Gui/Search.h>
|
||||
#include <unistd.h>
|
||||
#include <readtags.h>
|
||||
#include <CTagsManager.h>
|
||||
#include <etk/UString.h>
|
||||
#include <ewol/EObject.h>
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <tools/MsgBroadcast/MsgBroadcast.h>
|
||||
#include <globalMsg.h>
|
||||
|
||||
MainWindows * basicWindows = NULL;
|
||||
|
||||
@@ -49,41 +50,32 @@ MainWindows * basicWindows = NULL;
|
||||
*/
|
||||
void APP_Init(void)
|
||||
{
|
||||
EDN_INFO("==> Init Edn (START)");
|
||||
ewol::ChangeSize(800, 600);
|
||||
|
||||
// set the default Path of the application :
|
||||
#ifdef PLATFORM_Linux
|
||||
etk::UString homedir;
|
||||
#ifdef NDEBUG
|
||||
homedir = "/usr/share/"PROJECT_NAME"/";
|
||||
#ifdef __TARGET_OS__Linux
|
||||
#ifdef MODE_RELEASE
|
||||
APPL_INFO("==> Init "PROJECT_NAME" (START) (Linux) (Release)");
|
||||
#else
|
||||
char cCurrentPath[FILENAME_MAX];
|
||||
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
|
||||
homedir = "./assets/";
|
||||
} else {
|
||||
cCurrentPath[FILENAME_MAX - 1] = '\0';
|
||||
homedir = cCurrentPath;
|
||||
homedir += "/assets/";
|
||||
}
|
||||
APPL_INFO("==> Init "PROJECT_NAME" (START) (Linux) (Debug)");
|
||||
#endif
|
||||
#else
|
||||
#ifdef MODE_RELEASE
|
||||
APPL_INFO("==> Init "PROJECT_NAME" (START) (Android) (Release)");
|
||||
#else
|
||||
APPL_INFO("==> Init "PROJECT_NAME" (START) (Android) (Debug)");
|
||||
#endif
|
||||
// TODO : Remove the Utf8Data
|
||||
SetBaseFolderData(homedir.Utf8Data());
|
||||
SetBaseFolderDataUser("~/."PROJECT_NAME"/");
|
||||
SetBaseFolderCache("/tmp/"PROJECT_NAME"/");
|
||||
#endif
|
||||
|
||||
ewol::ChangeSize(800, 600);
|
||||
etk::InitDefaultFolder(PROJECT_NAME);
|
||||
|
||||
ewol::SetFontFolder("Font");
|
||||
|
||||
#ifdef __PLATFORM__Android
|
||||
ewol::SetDefaultFont("freefont/FreeSerif.ttf", 16);
|
||||
#ifdef __TARGET_OS__Android
|
||||
ewol::SetDefaultFont("freefont/FreeSerif.ttf", 19);
|
||||
#else
|
||||
ewol::SetDefaultFont("freefont/FreeSerif.ttf", 12);
|
||||
ewol::SetDefaultFont("freefont/FreeSerif.ttf", 14);
|
||||
#endif
|
||||
|
||||
// init internal global value
|
||||
globals::init();
|
||||
ClipBoard::Init();
|
||||
|
||||
|
||||
// init ALL Singleton :
|
||||
@@ -92,26 +84,25 @@ void APP_Init(void)
|
||||
|
||||
// set color and other trucs...
|
||||
ColorizeManager::Init();
|
||||
etk::UString homedir = "color_white.xml";
|
||||
ColorizeManager::LoadFile( homedir.Utf8Data() );
|
||||
etk::UString corlorFile = "color_white.xml";
|
||||
ColorizeManager::LoadFile( corlorFile.c_str() );
|
||||
ColorizeManager::DisplayListOfColor();
|
||||
|
||||
HighlightManager::Init();
|
||||
HighlightManager::loadLanguages();
|
||||
|
||||
|
||||
// get the curent program folder
|
||||
char cCurrentPath[FILENAME_MAX];
|
||||
// get the curent program folder
|
||||
if (!getcwd(cCurrentPath, FILENAME_MAX)) {
|
||||
return ;
|
||||
}
|
||||
cCurrentPath[FILENAME_MAX - 1] = '\0';
|
||||
//EDN_INFO("The current working directory is " << cCurrentPath);
|
||||
//APPL_INFO("The current working directory is " << cCurrentPath);
|
||||
|
||||
basicWindows = new MainWindows();
|
||||
|
||||
if (NULL == basicWindows) {
|
||||
EDN_ERROR("Can not allocate the basic windows");
|
||||
APPL_ERROR("Can not allocate the basic windows");
|
||||
ewol::Stop();
|
||||
return;
|
||||
}
|
||||
@@ -142,46 +133,53 @@ void APP_Init(void)
|
||||
|
||||
ewol::shortCut::Add("ctrl+l", ednMsgGuiGotoLine, "???");
|
||||
|
||||
ewol::shortCut::Add("ctrl+f", ednMsgGuiSearch, "");
|
||||
|
||||
|
||||
// add files
|
||||
EDN_INFO("show list of files : ");
|
||||
APPL_INFO("show list of files : ");
|
||||
|
||||
for( int32_t iii=0 ; iii<ewol::CmdLineNb(); iii++) {
|
||||
EDN_INFO("need load file : \"" << ewol::CmdLineGet(iii) << "\"" );
|
||||
APPL_INFO("need load file : \"" << ewol::CmdLineGet(iii) << "\"" );
|
||||
etk::UString tmpppp = ewol::CmdLineGet(iii);
|
||||
ewol::EObjectMessageMultiCast::AnonymousSend(ednMsgOpenFile, tmpppp);
|
||||
}
|
||||
|
||||
EDN_INFO("==> Init Edn (END)");
|
||||
APPL_INFO("==> Init Edn (END)");
|
||||
}
|
||||
|
||||
|
||||
etk::File APP_Icon(void)
|
||||
{
|
||||
etk::File bitmapFile("iconEdn.bmp", etk::FILE_TYPE_DATA);
|
||||
return bitmapFile;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief main application function Un-Initialisation
|
||||
*/
|
||||
void APP_UnInit(void)
|
||||
{
|
||||
EDN_INFO("==> Un-Init Edn (START)");
|
||||
APPL_INFO("==> Un-Init Edn (START)");
|
||||
// Remove windows :
|
||||
ewol::DisplayWindows(NULL);
|
||||
|
||||
EDN_INFO("Stop Hightlight");
|
||||
APPL_INFO("Stop Hightlight");
|
||||
HighlightManager::UnInit();
|
||||
//Kill all singleton
|
||||
EDN_INFO("Stop BufferManager");
|
||||
APPL_INFO("Stop BufferManager");
|
||||
BufferManager::UnInit();
|
||||
EDN_INFO("Stop ColorizeManager");
|
||||
APPL_INFO("Stop ColorizeManager");
|
||||
ColorizeManager::UnInit();
|
||||
EDN_INFO("Stop Search");
|
||||
APPL_INFO("Stop Search");
|
||||
//Search::Kill();
|
||||
//EDN_INFO("Stop Accel key");
|
||||
//APPL_INFO("Stop Accel key");
|
||||
//AccelKey::Kill();
|
||||
|
||||
if (NULL != basicWindows) {
|
||||
basicWindows->MarkToRemove();
|
||||
delete(basicWindows);
|
||||
basicWindows = NULL;
|
||||
}
|
||||
EDN_INFO("==> Un-Init Edn (END)");
|
||||
APPL_INFO("==> Un-Init Edn (END)");
|
||||
}
|
||||
|
46
Sources/file.mk
Normal file
@@ -0,0 +1,46 @@
|
||||
|
||||
|
||||
###############################################################################
|
||||
### Files Listes ###
|
||||
###############################################################################
|
||||
|
||||
# ExuberantCtags reading file tools (extern OPEN Sources) :
|
||||
FILE_LIST+= appl/ctags/readtags.cpp \
|
||||
appl/ctags/CTagsManager.cpp
|
||||
|
||||
# Globals debug tool:
|
||||
FILE_LIST+= appl/Debug.cpp \
|
||||
appl/global.cpp \
|
||||
appl/globalMsg.cpp
|
||||
|
||||
# Gui:
|
||||
FILE_LIST+= appl/Gui/BufferView.cpp \
|
||||
appl/Gui/CodeView.cpp \
|
||||
appl/Gui/MainWindows.cpp \
|
||||
appl/Gui/Search.cpp \
|
||||
appl/Gui/SearchData.cpp
|
||||
|
||||
# All needed for the buffer management :
|
||||
FILE_LIST+= appl/Buffer/EdnVectorBuf.cpp \
|
||||
appl/Buffer/EdnBuf/EdnBuf.cpp \
|
||||
appl/Buffer/EdnBuf/EdnBuf_HighLight.cpp \
|
||||
appl/Buffer/EdnBuf/EdnBuf_History.cpp \
|
||||
appl/Buffer/EdnBuf/EdnBuf_Selection.cpp \
|
||||
appl/Buffer/EdnBuf/EdnBufHistory.cpp \
|
||||
appl/Buffer/Buffer.cpp \
|
||||
appl/Buffer/BufferText.cpp \
|
||||
appl/Buffer/BufferEmpty.cpp \
|
||||
appl/Buffer/BufferManager.cpp
|
||||
|
||||
# Generic color management for the text editor :
|
||||
FILE_LIST+= appl/Colorize/Colorize.cpp \
|
||||
appl/Colorize/ColorizeManager.cpp
|
||||
|
||||
# syntax coloration for the text editor
|
||||
FILE_LIST+= appl/Highlight/HighlightPattern.cpp \
|
||||
appl/Highlight/Highlight.cpp \
|
||||
appl/Highlight/HighlightManager.cpp
|
||||
|
||||
# Main entry file :
|
||||
FILE_LIST+= appl/init.cpp
|
||||
|
@@ -1,18 +1,16 @@
|
||||
# action a faire (ordonner par r<>vision) :
|
||||
|
||||
dans la liste des truc important a refaire
|
||||
retirer tout les singleton ==> passer par des namespace ==> fonctionnera mieux ...
|
||||
finir de netoyer la classe widget
|
||||
netoyer les classe text ...
|
||||
mettre en pla ce le repositionnement automatique quand on change de buffer
|
||||
mettre en place le repositionnement automatique quand on change de buffer
|
||||
Curseur au bon endroit
|
||||
|
||||
|
||||
* 0.3.6 ...
|
||||
|
||||
* 0.2.X :
|
||||
- gui : Amelioration du full-screen et du display de base (sans l'entete de la fenetre)
|
||||
- gui : Mise en place d'un display ligne par ligne
|
||||
- gui : ascenceur quand n<>cessaire
|
||||
- gui : Demander la cr<63>ation de nouveaux fichier quand il n'existe pas (a l'ouverture en ligne de commande)
|
||||
- sys : Mise en place des colorisation de base pour le
|
||||
* java script
|
||||
@@ -21,12 +19,9 @@ dans la liste des truc important a refaire
|
||||
- sys : Catch F[1-12] ==> for user personal event
|
||||
- BUG : Correction du bug des entr<74> bizard tel que les chapot et les guillemets
|
||||
- BUG : de s<>lection quand la ligne est pleine et la premi<6D>re ligne s<>ctionn<6E>e. ==> regarder apr<70>s avoir fait le display ligne par ligne...
|
||||
- BUG : de copier coller sur les <20><><EFBFBD> ...
|
||||
- BUG : de copier coller sur les <20><><EFBFBD> è ...
|
||||
- BUG : les caract<63>re multiples type chapot ...
|
||||
- BUG : italique non g<>n<EFBFBD>r<EFBFBD>
|
||||
* 0.3.X :
|
||||
- SEARCH : get selected text in the search windows
|
||||
- SEARCH : Select the search windows when call crtl+F
|
||||
- sys : personal property file in the ~/.edn ou ~/.gnome/edn
|
||||
- gui : Ordonner les fichier ouvert par nom ...
|
||||
- gui : parameter gui : et en autre la taille de la police ... et voir pour la r<>cup<75>rer sur le system... et ce serait cool...
|
||||
@@ -77,4 +72,4 @@ dans la liste des truc important a refaire
|
||||
|
||||
# note utiles :
|
||||
http://majutsushi.github.com/tagbar/ ==> je devrais regarder ca pour savoir ce que je peux faire avec du ctags
|
||||
CTags : Set the parsing methode : "ctags -R --fields=+n Sources/ /usr/include/gtk-3.0/"
|
||||
CTags : Set the parsing methode : "ctags -R --fields=+n jni ../ewol/Sources/"
|
||||
|
774
data/cedit.fbp
@@ -1,774 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
|
||||
<wxFormBuilder_Project>
|
||||
<FileVersion major="1" minor="9" />
|
||||
<object class="Project" expanded="1">
|
||||
<property name="class_decoration"></property>
|
||||
<property name="code_generation">C++</property>
|
||||
<property name="disconnect_events">1</property>
|
||||
<property name="encoding">UTF-8</property>
|
||||
<property name="event_generation">connect</property>
|
||||
<property name="event_handler">impl_virtual</property>
|
||||
<property name="file"></property>
|
||||
<property name="first_id">1000</property>
|
||||
<property name="help_provider">none</property>
|
||||
<property name="internationalize">0</property>
|
||||
<property name="name">MyProject1</property>
|
||||
<property name="namespace"></property>
|
||||
<property name="path">.</property>
|
||||
<property name="precompiled_header"></property>
|
||||
<property name="relative_path">1</property>
|
||||
<property name="use_enum">0</property>
|
||||
<property name="use_microsoft_bom">0</property>
|
||||
<object class="Panel" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">MyPanel1</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">500,196</property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style">wxTAB_TRAVERSAL</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnInitDialog"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer1</property>
|
||||
<property name="orient">wxHORIZONTAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag"></property>
|
||||
<property name="proportion">1</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer2</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">String to find:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_textCtrl1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxStaticText" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Replace With:</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_staticText2</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<property name="wrap">-1</property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxTextCtrl" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="maxlength">0</property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_textCtrl2</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="value"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnText"></event>
|
||||
<event name="OnTextEnter"></event>
|
||||
<event name="OnTextMaxLen"></event>
|
||||
<event name="OnTextURL"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="checked">0</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Case Sensitive</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_checkBox1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxCheckBox" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="checked">0</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Circular Search</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_checkBox2</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnCheckBox"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag"></property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">bSizer3</property>
|
||||
<property name="orient">wxVERTICAL</property>
|
||||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Find previous</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_button1</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Find next</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_button2</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Replace && Find previous</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_button3</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Replace && Find next</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_button4</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Replace in all window</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_button5</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">1</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxButton" expanded="1">
|
||||
<property name="bg"></property>
|
||||
<property name="context_help"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="enabled">1</property>
|
||||
<property name="fg"></property>
|
||||
<property name="font"></property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Cancel</property>
|
||||
<property name="maximum_size"></property>
|
||||
<property name="minimum_size"></property>
|
||||
<property name="name">m_button6</property>
|
||||
<property name="permission">protected</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass"></property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
<property name="validator_variable"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
<property name="window_style"></property>
|
||||
<event name="OnButtonClick"></event>
|
||||
<event name="OnChar"></event>
|
||||
<event name="OnEnterWindow"></event>
|
||||
<event name="OnEraseBackground"></event>
|
||||
<event name="OnKeyDown"></event>
|
||||
<event name="OnKeyUp"></event>
|
||||
<event name="OnKillFocus"></event>
|
||||
<event name="OnLeaveWindow"></event>
|
||||
<event name="OnLeftDClick"></event>
|
||||
<event name="OnLeftDown"></event>
|
||||
<event name="OnLeftUp"></event>
|
||||
<event name="OnMiddleDClick"></event>
|
||||
<event name="OnMiddleDown"></event>
|
||||
<event name="OnMiddleUp"></event>
|
||||
<event name="OnMotion"></event>
|
||||
<event name="OnMouseEvents"></event>
|
||||
<event name="OnMouseWheel"></event>
|
||||
<event name="OnPaint"></event>
|
||||
<event name="OnRightDClick"></event>
|
||||
<event name="OnRightDown"></event>
|
||||
<event name="OnRightUp"></event>
|
||||
<event name="OnSetFocus"></event>
|
||||
<event name="OnSize"></event>
|
||||
<event name="OnUpdateUI"></event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</wxFormBuilder_Project>
|
@@ -1,20 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnConfig version="0.1">
|
||||
<option name="DisplayTab" value="true"/>
|
||||
<option name="ConvertTabInSpace" value="false"/>
|
||||
<option name="TabWidth" value="4"/>
|
||||
<option name="CleanSpaceEndOfLine" value="false"/>
|
||||
<option name="DisplaySpace" value="false"/>
|
||||
<option name="DisplayEndOfLine" value="false"/>
|
||||
<option name="DisplayEndOfFile" value="false"/>
|
||||
<option name="ColorMode" value="color_black.xml"/>
|
||||
<option name="IndentationMode" value="clever"/>
|
||||
<option name="FontName" value="Monospace"/>
|
||||
<option name="FontSize" value="8"/>
|
||||
<option name="SaveCopyBeforSave" value="true"/>
|
||||
<option name="SaveCopyPrefix" value=".save_"/>
|
||||
<option name="SaveCopySufix" value="DATE"/>
|
||||
<option name="SaveAutomatic" value="-1"/>
|
||||
<option name="DisplayLineNumber" value="true"/>
|
||||
<option name="LeftMarging" value="150"/>
|
||||
</EdnConfig>
|
@@ -1,521 +0,0 @@
|
||||
BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
|
||||
font-family: Geneva, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
BODY,TD {
|
||||
font-size: 90%;
|
||||
}
|
||||
|
||||
body {
|
||||
counter-reset: chapitre; /* Nous mettons <20> z<>ro le compteur chapitre */
|
||||
}
|
||||
|
||||
H1 {
|
||||
text-align: center;
|
||||
font-size: 160%;
|
||||
}
|
||||
|
||||
H2 {
|
||||
font-size: 120%;
|
||||
}
|
||||
|
||||
H3 {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
H4 {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
|
||||
.contents H1 {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.contents H2 {
|
||||
padding-left: 5px;
|
||||
counter-reset: section;
|
||||
}
|
||||
|
||||
.contents h2:before {
|
||||
counter-increment: chapitre; /* Ajoute 1 au compteur chapitre */
|
||||
content: counter(chapitre) ". ";
|
||||
}
|
||||
|
||||
|
||||
.contents H3 {
|
||||
padding-left: 10px;
|
||||
counter-reset: soussection;
|
||||
}
|
||||
|
||||
.contents h3:before {
|
||||
counter-increment: section; /* Ajoute 1 au compteur section */
|
||||
content: counter(chapitre) "." counter(section) ". ";
|
||||
}
|
||||
|
||||
.contents H4 {
|
||||
font-size: 100%;
|
||||
}
|
||||
|
||||
.contents h4:before {
|
||||
counter-increment: soussection; /* Ajoute 1 au compteur section */
|
||||
content: counter(chapitre) "." counter(section) "." counter(soussection) ". ";
|
||||
}
|
||||
|
||||
CAPTION {
|
||||
font-weight: bold
|
||||
}
|
||||
DIV.qindex {
|
||||
width: 100%;
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
DIV.navpath {
|
||||
width: 100%;
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
line-height: 140%;
|
||||
}
|
||||
DIV.navtab {
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
TD.navtab {
|
||||
font-size: 70%;
|
||||
}
|
||||
A.qindex {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1A419D;
|
||||
}
|
||||
A.qindex:visited {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
color: #1A419D
|
||||
}
|
||||
A.qindex:hover {
|
||||
text-decoration: none;
|
||||
background-color: #ddddff;
|
||||
}
|
||||
A.qindexHL {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
border: 1px double #9295C2;
|
||||
}
|
||||
A.qindexHL:hover {
|
||||
text-decoration: none;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff;
|
||||
}
|
||||
A.qindexHL:visited {
|
||||
text-decoration: none;
|
||||
background-color: #6666cc;
|
||||
color: #ffffff
|
||||
}
|
||||
A.el {
|
||||
text-decoration: none;
|
||||
font-weight: bold
|
||||
}
|
||||
A.elRef {
|
||||
font-weight: bold
|
||||
}
|
||||
A.code:link {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
A.code:visited {
|
||||
text-decoration: none;
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
A.codeRef:link {
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
A.codeRef:visited {
|
||||
font-weight: normal;
|
||||
color: #0000FF
|
||||
}
|
||||
A:hover {
|
||||
text-decoration: none;
|
||||
background-color: #f2f2ff
|
||||
}
|
||||
DL.el {
|
||||
margin-left: -1cm
|
||||
}
|
||||
.fragment {
|
||||
font-family: monospace, fixed;
|
||||
font-size: 95%;
|
||||
}
|
||||
PRE.fragment {
|
||||
border: 1px solid #CCCCCC;
|
||||
background-color: #f5f5f5;
|
||||
margin-top: 4px;
|
||||
margin-bottom: 4px;
|
||||
margin-left: 2px;
|
||||
margin-right: 8px;
|
||||
padding-left: 6px;
|
||||
padding-right: 6px;
|
||||
padding-top: 4px;
|
||||
padding-bottom: 4px;
|
||||
}
|
||||
DIV.ah {
|
||||
background-color: black;
|
||||
font-weight: bold;
|
||||
color: #ffffff;
|
||||
margin-bottom: 3px;
|
||||
margin-top: 3px
|
||||
}
|
||||
|
||||
DIV.groupHeader {
|
||||
margin-left: 16px;
|
||||
margin-top: 12px;
|
||||
margin-bottom: 6px;
|
||||
font-weight: bold;
|
||||
}
|
||||
DIV.groupText {
|
||||
margin-left: 16px;
|
||||
font-style: italic;
|
||||
font-size: 90%
|
||||
}
|
||||
BODY {
|
||||
background: white;
|
||||
color: black;
|
||||
margin-right: 20px;
|
||||
margin-left: 20px;
|
||||
}
|
||||
TD.indexkey {
|
||||
background-color: #e8eef2;
|
||||
font-weight: bold;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TD.indexvalue {
|
||||
background-color: #e8eef2;
|
||||
font-style: italic;
|
||||
padding-right : 10px;
|
||||
padding-top : 2px;
|
||||
padding-left : 10px;
|
||||
padding-bottom : 2px;
|
||||
margin-left : 0px;
|
||||
margin-right : 0px;
|
||||
margin-top : 2px;
|
||||
margin-bottom : 2px;
|
||||
border: 1px solid #CCCCCC;
|
||||
}
|
||||
TR.memlist {
|
||||
background-color: #f0f0f0;
|
||||
}
|
||||
P.formulaDsp {
|
||||
text-align: center;
|
||||
}
|
||||
IMG.formulaDsp {
|
||||
}
|
||||
IMG.formulaInl {
|
||||
vertical-align: middle;
|
||||
}
|
||||
SPAN.keyword { color: #008000 }
|
||||
SPAN.keywordtype { color: #604020 }
|
||||
SPAN.keywordflow { color: #e08000 }
|
||||
SPAN.comment { color: #800000 }
|
||||
SPAN.preprocessor { color: #806020 }
|
||||
SPAN.stringliteral { color: #002080 }
|
||||
SPAN.charliteral { color: #008080 }
|
||||
SPAN.vhdldigit { color: #ff00ff }
|
||||
SPAN.vhdlchar { color: #000000 }
|
||||
SPAN.vhdlkeyword { color: #700070 }
|
||||
SPAN.vhdllogic { color: #ff0000 }
|
||||
|
||||
.mdescLeft {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.mdescRight {
|
||||
padding: 0px 8px 4px 8px;
|
||||
font-size: 80%;
|
||||
font-style: italic;
|
||||
background-color: #FAFAFA;
|
||||
border-top: 1px none #E0E0E0;
|
||||
border-right: 1px none #E0E0E0;
|
||||
border-bottom: 1px none #E0E0E0;
|
||||
border-left: 1px none #E0E0E0;
|
||||
margin: 0px;
|
||||
}
|
||||
.memItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemLeft {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplItemRight {
|
||||
padding: 1px 8px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: none;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.memTemplParams {
|
||||
padding: 1px 0px 0px 8px;
|
||||
margin: 4px;
|
||||
border-top-width: 1px;
|
||||
border-right-width: 1px;
|
||||
border-bottom-width: 1px;
|
||||
border-left-width: 1px;
|
||||
border-top-color: #E0E0E0;
|
||||
border-right-color: #E0E0E0;
|
||||
border-bottom-color: #E0E0E0;
|
||||
border-left-color: #E0E0E0;
|
||||
border-top-style: solid;
|
||||
border-right-style: none;
|
||||
border-bottom-style: none;
|
||||
border-left-style: none;
|
||||
color: #606060;
|
||||
background-color: #FAFAFA;
|
||||
font-size: 80%;
|
||||
}
|
||||
.search {
|
||||
color: #003399;
|
||||
font-weight: bold;
|
||||
}
|
||||
FORM.search {
|
||||
margin-bottom: 0px;
|
||||
margin-top: 0px;
|
||||
}
|
||||
INPUT.search {
|
||||
font-size: 75%;
|
||||
color: #000080;
|
||||
font-weight: normal;
|
||||
background-color: #e8eef2;
|
||||
}
|
||||
TD.tiny {
|
||||
font-size: 75%;
|
||||
}
|
||||
a {
|
||||
color: #1A41A8;
|
||||
}
|
||||
a:visited {
|
||||
color: #2A3798;
|
||||
}
|
||||
.dirtab {
|
||||
padding: 4px;
|
||||
border-collapse: collapse;
|
||||
border: 1px solid #84b0c7;
|
||||
}
|
||||
TH.dirtab {
|
||||
background: #e8eef2;
|
||||
font-weight: bold;
|
||||
}
|
||||
HR {
|
||||
height: 1px;
|
||||
border: none;
|
||||
border-top: 1px solid black;
|
||||
}
|
||||
|
||||
/* Style for detailed member documentation */
|
||||
.memtemplate {
|
||||
font-size: 80%;
|
||||
color: #606060;
|
||||
font-weight: normal;
|
||||
margin-left: 3px;
|
||||
}
|
||||
.memnav {
|
||||
background-color: #e8eef2;
|
||||
border: 1px solid #84b0c7;
|
||||
text-align: center;
|
||||
margin: 2px;
|
||||
margin-right: 15px;
|
||||
padding: 2px;
|
||||
}
|
||||
.memitem {
|
||||
padding: 4px;
|
||||
background-color: #eef3f5;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #dedeee;
|
||||
-moz-border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
.memname {
|
||||
white-space: nowrap;
|
||||
font-weight: bold;
|
||||
}
|
||||
.memdoc{
|
||||
padding-left: 10px;
|
||||
}
|
||||
.memproto {
|
||||
background-color: #d5e1e8;
|
||||
width: 100%;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-color: #84b0c7;
|
||||
font-weight: bold;
|
||||
-moz-border-radius: 8px 8px 8px 8px;
|
||||
}
|
||||
.paramkey {
|
||||
text-align: right;
|
||||
}
|
||||
.paramtype {
|
||||
white-space: nowrap;
|
||||
}
|
||||
.paramname {
|
||||
color: #602020;
|
||||
font-style: italic;
|
||||
white-space: nowrap;
|
||||
}
|
||||
/* End Styling for detailed member documentation */
|
||||
|
||||
/* for the tree view */
|
||||
.ftvtree {
|
||||
font-family: sans-serif;
|
||||
margin:0.5em;
|
||||
}
|
||||
.directory {
|
||||
font-size: 9pt;
|
||||
font-weight: bold;
|
||||
}
|
||||
directory.directory h3 {
|
||||
margin: 0px;
|
||||
margin-top: 1em;
|
||||
font-size: 11pt;
|
||||
}
|
||||
.directory > h3 {
|
||||
margin-top: 0;
|
||||
}
|
||||
.directory p {
|
||||
margin: 0px;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.directory div {
|
||||
display: none;
|
||||
margin: 0px;
|
||||
}
|
||||
.directory img {
|
||||
vertical-align: -30%;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* classe mise dans le tableau : table */
|
||||
.tableau{
|
||||
margin-left:35px;
|
||||
border: medium solid #6495ed;
|
||||
border-collapse: collapse;
|
||||
border-spacing: 0px;
|
||||
}
|
||||
.tableau th {
|
||||
border: thin solid #6495ed;
|
||||
padding: 5px;
|
||||
background-color: #D0E3FA;
|
||||
}
|
||||
.tableau td {
|
||||
border: thin solid #6495ed;
|
||||
padding: 5px;
|
||||
text-align: center;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
|
||||
.tableau tr p {
|
||||
padding: 0px;
|
||||
border: 0px;
|
||||
margin: 0px;
|
||||
}
|
||||
|
||||
.contents p{
|
||||
padding-left: 35px;
|
||||
}
|
||||
|
||||
|
||||
.contents ul{
|
||||
padding-left: 80px;
|
||||
}
|
||||
|
||||
.contents ul ul{
|
||||
padding-left: 65px;
|
||||
}
|
@@ -1,14 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Version=0.3.0
|
||||
Name=Edn : Editeur de N'ours
|
||||
Exec=edn
|
||||
Icon=Edn
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Development;Utility;TextEditor;
|
||||
GenericName=Text editor
|
||||
GenericName[en]=Text editor
|
||||
GenericName[nl]=Tekst verwerker
|
||||
GenericName[fr]=<EFBFBD>diteur de text
|
||||
Comment=Code editor for c, c++, php, bash, xml ...
|
||||
Comment[fr]=<EFBFBD>diteur de text pour les language c, c++, php, bash, xml ...
|
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 13 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 9.1 KiB |
Before Width: | Height: | Size: 1.5 KiB |
Before Width: | Height: | Size: 18 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 8.8 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 15 KiB |
Before Width: | Height: | Size: 6.2 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 27 KiB |
Before Width: | Height: | Size: 5.2 KiB |
Before Width: | Height: | Size: 6.8 KiB |
Before Width: | Height: | Size: 9.6 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 14 KiB |
Before Width: | Height: | Size: 32 KiB |
Before Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 19 KiB |
Before Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 7.3 KiB |
@@ -1,421 +0,0 @@
|
||||
/* XPM */
|
||||
static char * icone_xpm[] = {
|
||||
"128 128 290 2",
|
||||
" c None",
|
||||
". c #0A0A0A",
|
||||
"+ c #0B0B0B",
|
||||
"@ c #0C0C0C",
|
||||
"# c #0D0D0D",
|
||||
"$ c #0E0E0E",
|
||||
"% c #0F0F0F",
|
||||
"& c #070707",
|
||||
"* c #030303",
|
||||
"= c #020202",
|
||||
"- c #010101",
|
||||
"; c #040404",
|
||||
"> c #000000",
|
||||
", c #111111",
|
||||
"' c #000100",
|
||||
") c #131313",
|
||||
"! c #262626",
|
||||
"~ c #151515",
|
||||
"{ c #000301",
|
||||
"] c #000602",
|
||||
"^ c #000502",
|
||||
"/ c #000401",
|
||||
"( c #000803",
|
||||
"_ c #1E1E1E",
|
||||
": c #013413",
|
||||
"< c #016023",
|
||||
"[ c #026625",
|
||||
"} c #016424",
|
||||
"| c #016324",
|
||||
"1 c #026525",
|
||||
"2 c #016524",
|
||||
"3 c #016223",
|
||||
"4 c #026725",
|
||||
"5 c #00270E",
|
||||
"6 c #000200",
|
||||
"7 c #040505",
|
||||
"8 c #1A1A1A",
|
||||
"9 c #014A1A",
|
||||
"0 c #03B843",
|
||||
"a c #04CB4A",
|
||||
"b c #02802E",
|
||||
"c c #000D04",
|
||||
"d c #000001",
|
||||
"e c #1C1C1C",
|
||||
"f c #252626",
|
||||
"g c #014C1B",
|
||||
"h c #03B943",
|
||||
"i c #026D28",
|
||||
"j c #000C1B",
|
||||
"k c #0A438A",
|
||||
"l c #24282C",
|
||||
"m c #014E1C",
|
||||
"n c #03BB44",
|
||||
"o c #03CA49",
|
||||
"p c #000702",
|
||||
"q c #000B19",
|
||||
"r c #005DD2",
|
||||
"s c #0072FF",
|
||||
"t c #0C58B6",
|
||||
"u c #01501D",
|
||||
"v c #03BE45",
|
||||
"w c #000A18",
|
||||
"x c #0061D9",
|
||||
"y c #0C58B5",
|
||||
"z c #24282D",
|
||||
"A c #03BF45",
|
||||
"B c #0E55AF",
|
||||
"C c #24292F",
|
||||
"D c #03BD45",
|
||||
"E c #026D27",
|
||||
"F c #0F52A5",
|
||||
"G c #242931",
|
||||
"H c #014B1B",
|
||||
"I c #02752A",
|
||||
"J c #000E20",
|
||||
"K c #0058C7",
|
||||
"L c #10509D",
|
||||
"M c #232A32",
|
||||
"N c #03B743",
|
||||
"O c #027A2C",
|
||||
"P c #000F23",
|
||||
"Q c #0054BD",
|
||||
"R c #114F9C",
|
||||
"S c #232A31",
|
||||
"T c #01491A",
|
||||
"U c #03B642",
|
||||
"V c #027B2C",
|
||||
"W c #0053BA",
|
||||
"X c #0071FE",
|
||||
"Y c #10509F",
|
||||
"Z c #242930",
|
||||
"` c #03B742",
|
||||
" . c #02772B",
|
||||
".. c #0054BC",
|
||||
"+. c #0F53A8",
|
||||
"@. c #24282E",
|
||||
"#. c #026F28",
|
||||
"$. c #000C1C",
|
||||
"%. c #0058C5",
|
||||
"&. c #0D56B1",
|
||||
"*. c #005CD0",
|
||||
"=. c #0061DA",
|
||||
"-. c #0D56B0",
|
||||
";. c #026B27",
|
||||
">. c #030406",
|
||||
",. c #0452B1",
|
||||
"'. c #0F53A7",
|
||||
"). c #02742A",
|
||||
"!. c #1D1D1D",
|
||||
"~. c #222C39",
|
||||
"{. c #0566DC",
|
||||
"]. c #10509E",
|
||||
"^. c #02792C",
|
||||
"/. c #050505",
|
||||
"(. c #222C38",
|
||||
"_. c #0665DC",
|
||||
":. c #114F9B",
|
||||
"<. c #1B1B1B",
|
||||
"[. c #222D3A",
|
||||
"}. c #0763D4",
|
||||
"|. c #02782B",
|
||||
"1. c #212E3C",
|
||||
"2. c #095FCB",
|
||||
"3. c #027129",
|
||||
"4. c #212F40",
|
||||
"5. c #0A5DC3",
|
||||
"6. c #026826",
|
||||
"7. c #203042",
|
||||
"8. c #0A5CC1",
|
||||
"9. c #212F42",
|
||||
"0. c #0A5DC5",
|
||||
"a. c #212E3F",
|
||||
"b. c #0860CD",
|
||||
"c. c #252525",
|
||||
"d. c #026A26",
|
||||
"e. c #222D3C",
|
||||
"f. c #0763D7",
|
||||
"g. c #02732A",
|
||||
"h. c #202020",
|
||||
"i. c #090909",
|
||||
"j. c #1F2020",
|
||||
"k. c #080808",
|
||||
"l. c #0763D5",
|
||||
"m. c #23282F",
|
||||
"n. c #0860CB",
|
||||
"o. c #0070FB",
|
||||
"p. c #082D5A",
|
||||
"q. c #0A5DC4",
|
||||
"r. c #0071FD",
|
||||
"s. c #003B84",
|
||||
"t. c #00040A",
|
||||
"u. c #026926",
|
||||
"v. c #00387F",
|
||||
"w. c #00050D",
|
||||
"x. c #00060F",
|
||||
"y. c #00250D",
|
||||
"z. c #006FF9",
|
||||
"A. c #003E8C",
|
||||
"B. c #016C27",
|
||||
"C. c #006EF7",
|
||||
"D. c #004193",
|
||||
"E. c #000206",
|
||||
"F. c #004397",
|
||||
"G. c #000104",
|
||||
"H. c #004294",
|
||||
"I. c #001608",
|
||||
"J. c #02762B",
|
||||
"K. c #003F8D",
|
||||
"L. c #028932",
|
||||
"M. c #000A03",
|
||||
"N. c #003B85",
|
||||
"O. c #000409",
|
||||
"P. c #029034",
|
||||
"Q. c #001708",
|
||||
"R. c #029536",
|
||||
"S. c #001909",
|
||||
"T. c #029737",
|
||||
"U. c #00230C",
|
||||
"V. c #202E3E",
|
||||
"W. c #043068",
|
||||
"X. c #00060E",
|
||||
"Y. c #002D10",
|
||||
"Z. c #141414",
|
||||
"`. c #010102",
|
||||
" + c #002B0F",
|
||||
".+ c #242424",
|
||||
"++ c #028A32",
|
||||
"@+ c #161616",
|
||||
"#+ c #028530",
|
||||
"$+ c #00290F",
|
||||
"%+ c #028430",
|
||||
"&+ c #02812F",
|
||||
"*+ c #028831",
|
||||
"=+ c #029636",
|
||||
"-+ c #028F34",
|
||||
";+ c #003111",
|
||||
">+ c #03AF40",
|
||||
",+ c #029436",
|
||||
"'+ c #014318",
|
||||
")+ c #03C146",
|
||||
"!+ c #015D21",
|
||||
"~+ c #029135",
|
||||
"{+ c #028B32",
|
||||
"]+ c #028631",
|
||||
"^+ c #03A63C",
|
||||
"/+ c #000F21",
|
||||
"(+ c #0E3564",
|
||||
"_+ c #000F22",
|
||||
":+ c #026DF3",
|
||||
"<+ c #144888",
|
||||
"[+ c #000D1F",
|
||||
"}+ c #0054BE",
|
||||
"|+ c #026DF2",
|
||||
"1+ c #028D33",
|
||||
"2+ c #0059C8",
|
||||
"3+ c #016EF3",
|
||||
"4+ c #144889",
|
||||
"5+ c #24282B",
|
||||
"6+ c #029435",
|
||||
"7+ c #005ED3",
|
||||
"8+ c #016FF6",
|
||||
"9+ c #14498B",
|
||||
"0+ c #252628",
|
||||
"a+ c #0070F9",
|
||||
"b+ c #134A8C",
|
||||
"c+ c #0071FC",
|
||||
"d+ c #134A8D",
|
||||
"e+ c #029235",
|
||||
"f+ c #14498C",
|
||||
"g+ c #252729",
|
||||
"h+ c #028C33",
|
||||
"i+ c #016FF9",
|
||||
"j+ c #14498A",
|
||||
"k+ c #001206",
|
||||
"l+ c #016EF5",
|
||||
"m+ c #001E0B",
|
||||
"n+ c #028731",
|
||||
"o+ c #003312",
|
||||
"p+ c #029335",
|
||||
"q+ c #027D2D",
|
||||
"r+ c #000F05",
|
||||
"s+ c #000A17",
|
||||
"t+ c #027C2D",
|
||||
"u+ c #123764",
|
||||
"v+ c #026DF1",
|
||||
"w+ c #000C04",
|
||||
"x+ c #16447B",
|
||||
"y+ c #000E05",
|
||||
"z+ c #101010",
|
||||
"A+ c #026CF0",
|
||||
"B+ c #001106",
|
||||
"C+ c #174379",
|
||||
"D+ c #026CED",
|
||||
"E+ c #03C949",
|
||||
"F+ c #001407",
|
||||
"G+ c #174276",
|
||||
"H+ c #036AEA",
|
||||
"I+ c #25272A",
|
||||
"J+ c #184174",
|
||||
"K+ c #036AE8",
|
||||
"L+ c #184173",
|
||||
"M+ c #036AE9",
|
||||
"N+ c #121212",
|
||||
"O+ c #001307",
|
||||
"P+ c #25272B",
|
||||
"Q+ c #036BEB",
|
||||
"R+ c #001006",
|
||||
"S+ c #174277",
|
||||
"T+ c #026CEE",
|
||||
"U+ c #242525",
|
||||
"V+ c #17437A",
|
||||
"W+ c #232426",
|
||||
"X+ c #006CF1",
|
||||
"Y+ c #0B2A51",
|
||||
"Z+ c #004396",
|
||||
"`+ c #000103",
|
||||
" @ c #004192",
|
||||
".@ c #000205",
|
||||
"+@ c #003D8A",
|
||||
"@@ c #000307",
|
||||
"#@ c #003A83",
|
||||
"$@ c #0269E8",
|
||||
"%@ c #242629",
|
||||
"&@ c #0B223D",
|
||||
"*@ c #00050C",
|
||||
"=@ c #039938",
|
||||
"-@ c #015920",
|
||||
";@ c #014D1C",
|
||||
">@ c #232323",
|
||||
",@ c #181818",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" . + @ # @ @ @ # # # # @ @ @ # # # @ @ @ # # # @ @ @ # # # # @ @ @ # # $ % ",
|
||||
" & * = - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = * & $ ",
|
||||
" ; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ; , ",
|
||||
" > ' > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ) ",
|
||||
" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > , ! ",
|
||||
" > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > - ~ ! ! ",
|
||||
" > > > > > > > > > { ] ^ / / / ] ^ ^ / / / ^ ^ ] / / / ^ ^ ] ^ / / ^ ] ( ' > > > > > > > > & _ ! ! ! ",
|
||||
" > > > > > > > > / : < [ } | | | 1 2 2 3 | 3 1 2 1 | | 3 } 1 1 } | | | 4 5 6 > > > > > > > 7 8 ! ! ! ! ! ",
|
||||
" > > > > > > > > 6 9 0 a a a a a a a a a a a a a a a a a a a a a a a a a b c > > > > > d > 7 e f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > g h a a a a a a a a a a a a a a a a a a a a a a a a a i ^ > > > > > d > j k l ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > m n a a a a a a a a a a a a a a a a a a a a a a a o a 1 p > > > > > d > q r s t l ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > u v a a a a a a a a a a a a a a a a a a a a a a a a a 3 p > > > > > d > w x s s s y z ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > u A a a a a a a a a a a a a a a a a a a a a a a a a a 2 ( > > > > > d > q x s s s s s B C ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > m D a a a a a a a a a a a a a a a a a a a a a a a a a E p > > > > d > > j r s s s s s s s F G ! ! ! ! ! ! ! ! ",
|
||||
" > > > > > > > > { H n a a a a a a a a a a a a a a a a a a a a a a a a a I ^ > > > > d > > J K s s s s s s s s s L M ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > ^ 9 N a a a a a a a a a a a a a a a a a a a a a a a a a O / > > > > d > > P Q s s s s s s s s s s s R S ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > / T U a a a a a a a a a a a a a a a a a a a a a a a a a V { > > > > > > > P W s s s s s s s s s s s X s Y Z ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > { 9 ` a a a a a a a a a a a a a a a a a a a a a a a a a .{ > > > > > d > J ..s s s s s s s s s s s s s s s +.@.! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > g 0 a a a a a a a a a a a a a a a a a a a a a a a a a #.^ > > > > > d > $.%.s s s s s s s s s s s s s s s s s &.l ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > m n a a a a a a a a a a a a a a a a a a a a a a a o a 4 ] > > > > > d > q *.s s s s s s s s s s s s s s s s s s s t l ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > u v a a a a a a a a a a a a a a a a a a a a a a a a a 3 p > > > > > d > w x s s s s s s s s s s s s s s s s s s s s s y z ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > u A a a a a a a a a a a a a a a a a a a a a a a a a a } ( > > > > > > > w =.s s s s s s s s s s s s s s s s s s s s s s s -.@.! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > m v a a a a a a a a a a a a a a a a a a a a a a a a a ;.p > > > > > > > >.,.s s s s s s s s s s s s s s s s s s s s s s s s s '.G ! ! f ! ! ! ! ! ",
|
||||
" > > > > > > > > { H n a a a a a a a a a a a a a a a a a a a a a a a a a ).^ > > > > > > > ; !.~.{.s s s s s s s s s s s s s s s s s s s s s s s s s ].M ! ! ! ! ! ! ! ! ",
|
||||
" > > > > > > > > ^ 9 0 a a a a a a a a a a a a a a a a a a a a a a a a a ^./ > > > > > > > /.e f ! (._.s s s s s s s s s s s s s s s s s s s s s s s s s :.M ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > ^ T ` a a a a a a a a a a a a a a a a a a a a a a a a a V { > > > > > > > /.<.! ! f ! [.}.s s s s s s s s s s s s s s s s s s s s s s s X s ].G ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > { 9 ` a a a a a a a a a a a a a a a a a a a a a a a a a |.{ > > > > > > > ; e ! ! ! ! f ! 1.2.s s s s s s s s s s s s s s s s s s s s s s s s s '.@.! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > H 0 a a a a a a a a a a a a a a a a a a a a a a a a a 3./ > > > > > > > > ~ ! ! ! ! ! ! f ! 4.5.s s s s s s s s s s s s s s s s s s s s s s s s s -.z ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > m n a a a a a a a a a a a a a a a a a a a a a a a o a 6.] > > > > > > > > ! ! ! ! ! ! ! ! 7.8.s s s s s s s s s s s s s s s s s s s s s s s s s y l ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > u v a a a a a a a a a a a a a a a a a a a a a a a a a | p > > > > > > > > ! ! ! ! ! ! ! ! 9.0.s s s s s s s s s s s s s s s s s s s s s s s s s t l ! f ! ! ! ! ! ! ",
|
||||
" > > > > > > > > > u A a a a a a a a a a a a a a a a a a a a a a a a a a } ( > > > > > > > > ! ! ! ! ! ! ! ! a.b.s s s s s s s s s s s s s s s s s s s s s s s s s &.@.! f ! ! ! ! ! c. ",
|
||||
" > > > > > > > > > m v a a a a a a a a a a a a a a a a a a a a a a a a a d.p > > > > > > > > ! ! ! ! ! ! ! ! e.f.s s s s s s s s s s s s s s s s s s s s s s s s s +.Z ! f ! ! ! c.~ - ",
|
||||
" > > > > > > > > { g n a a a a a a a a a a a a a a a a a a a a a a a a a g.] > > > > > > > > ! ! ! ! ! ! f ! ~.{.s s s s s s s s s s s s s s s s s s s s s s s s s Y S ! ! ! h.i.> > > ",
|
||||
" e = > > > > > > > / 9 0 a a a a a a a a a a a a a a a a a a a a a a a a a ^./ > > > > > > > > ! ! ! ! ! ! ! f ! (._.s s s s s s s s s s s s s s s s s s s s s s s s s R M ! j.k.> > > > > ",
|
||||
" !.k.> > > > > > > ^ T ` a a a a a a a a a a a a a a a a a a a a a a a a a V { > > > > > > > > ! ! ! ! ! ! f ! ~.l.s s s s s s s s s s s s s s s s s s s s s s s X s L m., > > > > > > ",
|
||||
" $ = > > > > > > > { 9 U a a a a a a a a a a a a a a a a a a a a a a a a a ^.{ > > > > > > > > ! ! ! ! ! ! f ! e.n.s s s s s s s s s s s s s s s s s s s s s s s s o.p.> > > > > > > ",
|
||||
" > > > > > > > > > H N a a a a a a a a a a a a a a a a a a a a a a a a a 3./ > > > > > > > > ! ! ! ! ! ! f ! a.q.s s s s s s s s s s s s s s s s s s s s s s r.s.t.> > > > > > > ",
|
||||
" > > > > > > > > > m n a a a a a a a a a a a a a a a a a a a a a a a a a u.] > > > > > > > > ! ! ! ! ! ! ! ! 9.8.s s s s s s s s s s s s s s s s s s s s r.v.w.> > > > > > > > ",
|
||||
" > > > > > > > > u D a a a a a a a a a a a a a a a a a a a a a a a a a | p > > > > > > > > ! ! ! ! ! ! ! ! 9.q.s s s s s s s s s s s s s s s s s s r.v.x.> > > > > > > > > > ",
|
||||
" > > > > > > > > u A a a a a a a a a a a a a a a a a a a a a a a a a a | ( > > > > > > > > ! ! ! ! ! ! ! ! a.n.s s s s s s s s s s s s s s s s o.s.w.> > d > > > > > > > > ",
|
||||
" > > > > > > > y.v a a a a a a a a a a a a a a a a a a a a a a a a a u.p > > > > > > > > ! ! ! ! ! ! ! ! e.l.s s s s s s s s s s s s s s z.A.t.> > d > > > > > > > > ' ",
|
||||
" > > > > > > > B.a a a a a a a a a a a a a a a a a a a a a a a a a 3.] > > > > > > > > ! ! ! ! ! ! f ! ~._.s s s s s s s s s s s s C.D.E.> d > > > > > > > > > > ' ",
|
||||
" > > > > > > > O a a a a a a a a a a a a a a a a a a a a a a a a ^./ > > > > > > > > ! ! ! ! ! ! ! f ! (.{.s s s s s s s s s s C.F.G.> d > > > > > > > > > > > > ",
|
||||
" > > > > > > > I a a a a a a a a a a a a a a a a a a a a a a a V { > > > > > > > > ! ! ! ! ! ! f ! ~.f.s s s s s s s s z.H.G.> d > > > > > I.] > > > > > > ",
|
||||
" > > > > > > > J.a a a a a a a a a a a a a a a a a a a a a a ^.{ > > > > > > > > ! ! ! ! ! ! f ! e.b.s s s s s s o.K.E.> d > > > > > I.L.M.> > > > > > ",
|
||||
" > > > > > > > J.a a a a a a a a a a a a a a a a a a a a a g./ > > > > > > > > ! ! ! ! ! ! f ! a.0.s s s s r.N.O.> d > > > > > I.P.a c > > > > > > ",
|
||||
" > > > > > > > I a a a a a a a a a a a a a a a a a a a a d.] > > > > > > > > ! ! ! ! ! ! ! ! 9.8.s s r.v.w.> d > > > > > Q.R.a a S.> > > > > > ",
|
||||
" / > > > > > > O a a a a a a a a a a a a a a a a a o a } p > > > > > > > > ! ! ! ! ! ! ! ! 7.5.r.v.x.> > > > > > > Q.T.a a a U.> > > > > > ",
|
||||
" p > > > > > > O a a a a a a a a a a a a a a a a a a | ( > > > > > > > > ! ! ! ! ! ! ! ! V.W.X.> > d > > > > I.R.a a a a Y.> > > > > > ",
|
||||
" M.> > > > > > O a a a a a a a a a a a a a a a a a 6.p > > > > > > > > ! ! ! ! ! ! c.Z.`.> > d > > > > I.P.a a a a a +> > > > > > ",
|
||||
" ( > > > > > > I a a a a a a a a a a a a a a a a 3.] > > > > > > > > ! ! ! ! .+~ - > > > > > > > I.++a a a a a a Y.> > > > > > ",
|
||||
" p > > > > > > J.a a a a a a a a a a a a a a a |./ > > > > > > > > ! ! ! .+@+> > > > > > > > Q.#+a a a a a a a $+> > > > > > ",
|
||||
" ( > > > > > > J.a a a a a a a a a a a a a a V { > > > > > > > > .+@+> > > > > > > > I.%+a a a a a a a a $+> > > > > > ",
|
||||
" p > > > > > > &+a a a a a a a a a a a a a ^.{ > > > > > > > > # > > > > > > > > I.*+a a a a a a a a a $+> > > > > > ",
|
||||
" ] > > > > > > =+a a a a a a a a a a a a )./ > > > > > > > > > > > > > > > > I.-+a a a a a a a a a a ;+> > > > > > ",
|
||||
" > > > > > > > >+a a a a a a a a a a a ;.^ > > > > > > > > > > > > > > > > > Q.,+a a a a a a a a a a a '+> > > > > > ",
|
||||
" 6 > > > > > ' )+a a a a a a a a o a } p > > > > > > > * > > > > > > > > > Q.T.a a a a a a a a a a a a !+> > > > > > ",
|
||||
" ' > > > > > ' a a a a a a a a a a 3 ( > > > > > > > * h.! > > > > > > > > I.=+a a a a a a a a a a a a a 3.> > > > > > ",
|
||||
" > > > > > > > a a a a a a a a a 4 p > > > > > > > * h.! ! ! > > > > > > > > I.~+a a a a a a a a a a a a a a b > > > > > > ",
|
||||
" > > > > > > > a a a a a a a a #.] > > > > > > > ; _ ! ! ! ! ! > > > > > > > > I.{+a a a a a a a a a a a a a a a P.> > > > > > ",
|
||||
" ' > > > > > ' a a a a a a a .^ > > > > d > > 7 !.! ! ! ! ! ! ! > > > > > > > > Q.]+a a a a a a a a a a a a a a a a ^+> > > > > > ",
|
||||
" 6 > > > > > 6 a a a a a a V { > > > > d > > /+(+C ! ! ! ! ! ! ! ! > > > > > > > > I.%+a a a a a a a a a a a a a a a a a h > > > > > > ",
|
||||
" > > > > > > > a a a a a O { > > > > > > > _+W :+<+Z ! ! ! ! ! ! ! ! > > > > > > > > I.*+a a a a a a a a a a a a a a a a a a a ' > > > > > ",
|
||||
" 6 > > > > > 6 a a a a I / > > > > > d > [+}+s s |+<+@.! ! ! ! ! ! ! ! > > > > > > > > I.1+a a a a a a a a a a a a a a a a a a a a > > > > > > ",
|
||||
" ' > > > > > ' a a a E ^ > > > > > d > j 2+s s s s 3+4+5+! f ! ! ! ! ! ! > > > > > > > > > Q.6+a a a a a a a a a a a a a a a a a a a a a 6 > > > > > ",
|
||||
" > > > > > > > o a 2 p > > > > > d > w 7+s s s s s s 8+9+0+! f ! ! ! ! ! ! > > > > > > > > > Q.T.a a a a a a a a a a a a a a a a a a a a a a { > > > > > > ",
|
||||
" > > > > > > > a 3 ( > > > > > d > w =.s s s s s s s s a+b+f ! f ! ! ! ! ! ! > > > > > > > > Q.=+a a a a a a a a a a a a a a a a a a a a a a a ] > > > > > > ",
|
||||
" ' > > > > > ' 1 p > > > > > d > q x s s s s s s s s s s c+d+f ! f ! ! ! ! ! ! > > > > > > > > I.e+a a a a a a a a a a a a a a a a a a a a a a a a p > > > > > > ",
|
||||
" ' > > > > > 6 p > > > > d > > $.*.s s s s s s s s s s s s o.f+g+! ! ! ! ! ! ! ! > > > > > > > > I.h+a a a a a a a a a a a a a a a a a a a a a a a a a M.> > > > > > ",
|
||||
" > > > > > > > > > > > d > > J %.s s s s s s s s s s s s s s i+j+l ! ! ! ! ! ! ! ! > > > > > > > > Q.]+a a a a a a a a a a a a a a a a a a a a a a a a a a k+> > > > > > ",
|
||||
" > > > > > > > > > > d > > P ..s s s s s s s s s s s s s s s s l+<+C ! ! ! ! ! ! ! ! > > > > > > > > Q.%+a a a a a a a a a a a a a a a a a a a a a a a a a a a m+> > > > > > ",
|
||||
" > > > > > > > > > > > > P W s s s s s s s s s s s s s s s s s s :+<+Z ! ! ! ! ! ! ! ! > > > > > > > > I.n+a a a a a a a a a a a a a a a a a a a a a a a a a a a a $+> > > > > > ",
|
||||
" > > > > > > > > > d > J Q s s s s s s s s s s s s s s s s s s s s |+<+C ! ! ! ! ! ! ! ! > > > > > > > > I.h+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a o+> > > > > > ",
|
||||
" > > > > > > > > d > j K s s s s s s s s s s s s s s s s s s s s s s 3+4+5+! f ! ! ! ! ! ! > > > > > > > > Q.p+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a Y.> > > > > > ",
|
||||
" > > > > > > > d > q r s s s s s s s s s s s s s s s s s s s s s s s s 8+j+0+! f ! ! ! ! ! ! > > > > > > > > > Q.T.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+M.> > > > > > ",
|
||||
" > > > > > > > > w x s s s s s s s s s s s s s s s s s s s s s s s s s s a+b+f ! f ! ! ! ! ! ! > > > > > > > > > Q.T.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+r+> > > > > > > ",
|
||||
" > > > > > > > s+x s s s s s s s s s s s s s s s s s s s s s s s s s s s s o.d+f ! f ! ! ! ! ! ! > > > > > > > > I.p+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t+c > > > > > > > > ",
|
||||
" > > > > > > - u+v+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s o.b+0+! ! ! ! ! ! ! ! > > > > > > > > I.h+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t+w+> > > > > > > - ",
|
||||
" > > > > > > , ! x+|+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s a+j+5+! ! ! ! ! ! ! ! > > > > > > > > Q.n+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+y+> > > > > > > > ",
|
||||
" > > > - z+! ! ! x+A+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s 8+4+C ! ! ! ! ! ! ! ! > > > > > > > > Q.%+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+B+> > > > > > > > ",
|
||||
" > > /.<.! ! ! ! ! C+D+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s 3+<+Z ! ! ! ! ! ! ! ! > > > > > > > > I.]+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a E+q+F+> > > > > > > > ",
|
||||
" * e ! ! ! ! ! ! f G+H+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s |+<+C ! ! ! ! ! ! ! ! > > > > > > > > I.h+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a E+q+I.> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! I+J+K+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s :+<+l ! f ! ! ! ! ! c.k.> > > > > > > > Q.e+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+I.> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! 5+L+M+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s l+j+g+! f ! ! ! c.N+- > > > > > > > Q.=+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+O+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! P+J+Q+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s i+f+f ! f ! c.) = > > > > > > > Q.T.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+R+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! g+S+T+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s o.d+f ! U+) - > > > > > > > I.6+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t+c > > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! V+v+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s c+b+W+~ - > > > > > > > I.1+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t+w+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! x+|+s s s s s s s s s s s s s s s s s s s s s s s s s s s s s X+Y+d > > > > > > > I.*+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+c > > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! x+v+s s s s s s s s s s s s s s s s s s s s s s s s s s s C.Z+`+> > > > > > > Q.%+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+R+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! C+D+s s s s s s s s s s s s s s s s s s s s s s s s s z. @.@> > > > > > > I.]+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a E+q+F+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! f G+Q+s s s s s s s s s s s s s s s s s s s s s s s o.+@@@> > > > > > > I.{+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a E+q+I.> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! g+J+M+s s s s s s s s s s s s s s s s s s s s s r.#@t.> > > > > > > I.~+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+I.> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! 5+L+M+s s s s s s s s s s s s s s s s s s s r.v.X.> d > > > > > Q.=+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+F+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! 5+J+Q+s s s s s s s s s s s s s s s s s r.v.x.> > > > > > > Q.T.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+R+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! g+G+D+s s s s s s s s s s s s s s s o.N.w.> > > > > > > I.,+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t+c > > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! f C+v+s s s s s s s s s s s s s z.K.O.> > > > > > > I.-+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t+w+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! x+|+s s s s s s s s s s s C.H.E.> d > > > > > I.*+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+c > > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! x+v+s s s s s s s s s C.F.G.> > > > > > > Q.%+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+R+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! V+T+s s s s s s s z.D.G.> > > > > > > I.#+a a a a a a a a a a a a a a a a a a a a a a a a a a a a a E+q+O+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! ! S+Q+s s s s s o.A.E.> > > > > > > I.++a a a a a a a a a a a a a a a a a a a a a a a a a a a a a E+q+I.> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! g+J+M+s s s r.s.t.> > > > > > > I.P.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+I.> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! P+L+K+s r.v.w.> > > > > > > Q.R.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+F+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! 5+J+$@v.x.> > > > > > > Q.T.a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a q+B+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! ! ! %@&@*@> > d > > > > S.=@a a a a a a a a a a a a a a a a a a a a a a a a a a a a a a t+y+> > > > > > > > ",
|
||||
" ! ! ! ! ! ! c.~ > > > d > > > > y+-@t+^.^. .q+q+t+|.^.|.t+q+q+ .^.^.^.q+q+^.^.^.|.q+q+V |.^. .b ;@( > > > > > > > > ",
|
||||
" ! ! ! ! c._ i.> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ",
|
||||
" ! ! c._ z+= > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ",
|
||||
" ! >@N+- > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ",
|
||||
" >@z+> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ",
|
||||
" @+; > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > = /. ",
|
||||
" k.> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > * + $ ",
|
||||
" ,@8 8 ,@ ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" ",
|
||||
" "};
|