Compare commits
45 Commits
Author | SHA1 | Date | |
---|---|---|---|
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 |
50
Makefile
@@ -3,57 +3,11 @@
|
||||
### 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
|
||||
|
||||
# include basic makefile for EWOL
|
||||
include $(shell pwd)/../ewol/Build/Makefile.mk
|
||||
|
||||
|
7
assets/icon/Add.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-579.7336,-567.9832)">
|
||||
<path d="m 509.778,477.486 c -12.426,0 -22.5,10.072 -22.5,22.5 0,12.426 10.074,22.5 22.5,22.5 12.428,0 22.5,-10.074 22.5,-22.5 0,-12.427 -10.072,-22.5 -22.5,-22.5 z m 11.5,25 c 0,0.549 -0.451,1 -1,1 h -6 c -0.551,0 -1.001,0.449 -1.001,1 v 6 c 0,0.549 -0.45,1 -1,1 h -5 c -0.55,0 -1,-0.451 -1,-1 v -6 c 0,-0.551 -0.45,-1 -1,-1 h -6 c -0.55,0 -1,-0.451 -1,-1 v -5 c 0,-0.551 0.45,-1 1,-1 h 6 c 0.55,0 1,-0.451 1,-1 v -6 c 0,-0.551 0.45,-1 1,-1 h 5 c 0.55,0 1,0.449 1,1 v 6 c 0,0.549 0.45,1 1.001,1 h 6 c 0.549,0 1,0.449 1,1 v 5 z"
|
||||
style="fill:#333333;fill-rule:evenodd" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 735 B |
11
assets/icon/AtoZ.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-651.9616,-494.5316)">
|
||||
<path d="m 562.663,451.271 -1.24,-3.193 h -0.188 c -0.463,0.631 -0.926,1.174 -1.389,1.629 -0.463,0.457 -0.967,0.832 -1.514,1.125 -0.547,0.295 -1.16,0.512 -1.838,0.65 -0.682,0.143 -1.469,0.211 -2.365,0.211 -0.953,0 -1.836,-0.148 -2.648,-0.455 -0.813,-0.299 -1.516,-0.756 -2.111,-1.361 -0.596,-0.611 -1.061,-1.381 -1.396,-2.314 -0.336,-0.932 -0.506,-2.035 -0.506,-3.311 0,-2.494 0.799,-4.332 2.396,-5.518 1.598,-1.184 3.986,-1.838 7.168,-1.965 l 3.74,-0.125 v -1.766 c 0,-0.967 -0.279,-1.682 -0.842,-2.145 -0.559,-0.461 -1.344,-0.693 -2.354,-0.693 -1.01,0 -1.994,0.146 -2.953,0.441 -0.959,0.295 -1.924,0.688 -2.891,1.178 l -2.08,-4.246 c 1.178,-0.658 2.48,-1.177 3.908,-1.554 1.43,-0.379 2.93,-0.568 4.498,-0.568 2.93,0 5.174,0.688 6.736,2.06 1.563,1.373 2.344,3.461 2.344,6.264 v 15.658 h -4.477 v -0.002 z m -1.891,-10.887 -2.123,0.084 c -0.854,0.027 -1.578,0.141 -2.164,0.336 -0.59,0.195 -1.063,0.457 -1.42,0.787 -0.357,0.33 -0.615,0.721 -0.777,1.178 -0.16,0.455 -0.24,0.963 -0.24,1.523 0,0.98 0.238,1.678 0.713,2.092 0.477,0.412 1.102,0.619 1.871,0.619 0.59,0 1.135,-0.102 1.641,-0.305 0.504,-0.203 0.941,-0.504 1.313,-0.902 0.373,-0.4 0.662,-0.891 0.873,-1.471 0.211,-0.582 0.314,-1.252 0.314,-2.01 v -1.931 l -10e-4,0 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 568.976,440.552 v -4.244 h 9.549 v 4.244 h -9.549 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 592.468,451.241 h -17.279 v -3.785 l 9.607,-14.816 h -8.953 v -4.896 h 16.225 v 4.159 l -9.289,14.441 h 9.689 v 4.897 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.6 KiB |
7
assets/icon/Attache.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.199923,0,0,1.199923,-436.75556,-134.85476)">
|
||||
<path d="m 374.192,161.556 c -1.619,0 -3.152,-0.607 -4.269,-1.707 -1.237,-1.221 -1.877,-2.961 -1.755,-4.776 l 0.501,-7.477 c 0.198,-2.952 1.959,-6.933 4.009,-9.065 l 20.588,-21.415 c 0.854,-0.89 2.268,-0.916 3.154,-0.063 0.886,0.853 0.916,2.266 0.063,3.154 l -20.589,21.416 c -1.347,1.401 -2.644,4.331 -2.772,6.271 l -0.502,7.477 c -0.035,0.526 0.119,0.988 0.436,1.3 0.317,0.312 0.776,0.465 1.306,0.417 l 6.095,-0.496 c 1.936,-0.158 4.842,-1.497 6.219,-2.865 l 21.382,-21.251 c 0.413,-0.411 0.64,-0.957 0.637,-1.537 -0.005,-0.58 -0.236,-1.123 -0.655,-1.529 l -4.043,-3.92 c -0.874,-0.847 -2.334,-0.832 -3.189,0.037 l -16.287,16.555 c -0.512,0.521 -0.809,1.177 -0.794,1.759 0.007,0.303 0.097,0.537 0.268,0.693 0.524,0.485 1.872,0.332 2.826,-0.589 l 12.685,-12.247 c 0.886,-0.856 2.297,-0.831 3.154,0.056 0.855,0.886 0.83,2.298 -0.057,3.153 l -12.684,12.248 c -2.605,2.517 -6.623,2.811 -8.952,0.656 -1.06,-0.979 -1.664,-2.352 -1.7,-3.865 -0.043,-1.788 0.713,-3.608 2.072,-4.992 l 16.289,-16.556 c 2.582,-2.623 6.83,-2.675 9.475,-0.111 l 4.043,3.92 c 1.285,1.246 2,2.917 2.01,4.705 0.012,1.788 -0.682,3.467 -1.952,4.729 l -21.382,21.25 c -2.098,2.086 -6.053,3.907 -9.002,4.148 l -6.094,0.496 c -0.18,0.013 -0.358,0.021 -0.534,0.021 l 0,0 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
13
assets/icon/CaseSensitive.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path d="M57.268,52.064,55.78,48.233h-0.2256c-0.5556,0.7572-1.1112,1.4088-1.6668,1.9548-0.5556,0.5484-1.1604,0.9984-1.8168,1.35-0.6564,0.354-1.392,0.6144-2.2056,0.78-0.8184,0.1716-1.7628,0.2532-2.838,0.2532-1.1436,0-2.2032-0.1776-3.1776-0.546-0.9756-0.3588-1.8192-0.9072-2.5332-1.6332-0.7152-0.7332-1.2732-1.6572-1.6752-2.7768-0.4032-1.1184-0.6072-2.442-0.6072-3.9732,0-2.9928,0.9588-5.1984,2.8752-6.6216,1.9176-1.4208,4.7832-2.2056,8.6016-2.358l4.488-0.15v-2.1192c0-1.1604-0.3348-2.0184-1.0104-2.574-0.6708-0.5532-1.6128-0.8316-2.8248-0.8316s-2.3928,0.1752-3.5436,0.5292-2.3088,0.8256-3.4692,1.4136l-2.496-5.0952c1.4136-0.7896,2.976-1.4124,4.6896-1.8648,1.716-0.4548,3.516-0.6816,5.3976-0.6816,3.516,0,6.2088,0.8256,8.0832,2.472,1.8756,1.6476,2.8128,4.1532,2.8128,7.5168v18.79h-5.3724v-0.0024zm-0.781-9.233-2.548,0.101c-1.0248,0.0324-1.8936,0.1692-2.5968,0.4032-0.708,0.234-1.2756,0.5484-1.704,0.9444s-0.738,0.8652-0.9324,1.4136c-0.192,0.546-0.288,1.1556-0.288,1.8276,0,1.176,0.2856,2.0136,0.8556,2.5104,0.5724,0.4944,1.3224,0.7428,2.2452,0.7428,0.708,0,1.362-0.1224,1.9692-0.366,0.6048-0.2436,1.1292-0.6048,1.5756-1.0824,0.4476-0.48,0.7944-1.0692,1.0476-1.7652,0.252-0.699,0.376-1.503,0.376-2.413v-2.317h-0.0012z" fill="#333"/>
|
||||
<path d="M26,38,14,38,9,54,3,54,17,9h6l8,25h-6l-5-18-5,18h16l6,20h-6z" fill="#333"/>
|
||||
</svg>
|
After Width: | Height: | Size: 1.7 KiB |
9
assets/icon/Close.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-579.7336,-495.3904)">
|
||||
<path d="m 514.172,439.484 4.041,-4.041 c 0.26,-0.26 0.404,-0.605 0.404,-0.975 0,-0.371 -0.143,-0.717 -0.404,-0.977 l -2.441,-2.443 c -0.521,-0.521 -1.434,-0.52 -1.949,0 l -4.044,4.043 -4.043,-4.043 c -0.52,-0.52 -1.429,-0.52 -1.949,0 l -2.443,2.443 c -0.26,0.26 -0.402,0.605 -0.402,0.975 0,0.37 0.143,0.717 0.402,0.977 l 4.043,4.041 -4.041,4.041 c -0.261,0.26 -0.404,0.605 -0.404,0.975 0,0.371 0.143,0.717 0.402,0.979 l 2.444,2.443 c 0.521,0.52 1.429,0.52 1.95,-0.002 l 4.041,-4.041 4.042,4.041 c 0.26,0.26 0.605,0.404 0.975,0.404 0.37,0 0.715,-0.145 0.975,-0.404 l 2.441,-2.439 c 0.262,-0.262 0.406,-0.609 0.406,-0.98 0,-0.369 -0.145,-0.717 -0.404,-0.973 l -4.042,-4.044 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 509.778,425.027 c 7.976,0 14.464,6.488 14.464,14.465 0,7.975 -6.488,14.463 -14.464,14.463 -7.975,0 -14.464,-6.488 -14.464,-14.463 0,-7.976 6.489,-14.465 14.464,-14.465 m 0,-8.035 c -12.426,0 -22.5,10.073 -22.5,22.5 0,12.426 10.074,22.5 22.5,22.5 12.427,0 22.5,-10.074 22.5,-22.5 -10e-4,-12.428 -10.073,-22.5 -22.5,-22.5 l 0,0 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
14
assets/icon/Contact.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1999733,0,0,1.1999733,-436.77498,-206.48907)">
|
||||
<path d="m 412.51,211.853 c 0.354,0.375 0.645,0.26 0.645,-0.256 v -24.754 c 0,-0.516 -0.321,-0.664 -0.714,-0.329 l -12.536,10.671 c -0.394,0.334 -0.425,0.914 -0.07,1.289 l 12.675,13.379 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 410.761,184.249 c 0.394,-0.334 0.292,-0.607 -0.223,-0.607 h -40.092 c -0.515,0 -0.614,0.271 -0.219,0.602 l 19.701,16.524 c 0.396,0.331 1.041,0.329 1.434,-0.006 l 19.399,-16.513 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 368.154,211.597 c 0,0.516 0.29,0.631 0.645,0.256 l 12.625,-13.326 c 0.354,-0.375 0.321,-0.951 -0.074,-1.283 l -12.477,-10.465 c -0.396,-0.332 -0.719,-0.181 -0.719,0.335 v 24.483 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 392.28,203.674 c -0.393,0.335 -0.979,0.759 -1.302,0.943 0,0 0,0 -0.324,0 -0.321,0 -0.321,0 -0.321,0 -0.32,-0.181 -0.905,-0.6 -1.301,-0.931 l -4.086,-3.428 c -0.396,-0.332 -1.009,-0.297 -1.363,0.078 l -12.847,13.561 c -0.354,0.375 -0.223,0.682 0.293,0.682 h 39.25 c 0.516,0 0.647,-0.307 0.293,-0.682 l -12.883,-13.599 c -0.354,-0.374 -0.966,-0.407 -1.358,-0.073 l -4.051,3.449 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
14
assets/icon/Down.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g transform="matrix(0,1.2,-1.2,0,631.9838,-722.6014)">
|
||||
<polygon points="629.89,509.46,607.39,509.46,607.39,490.51,629.89,490.51,629.89,481.04,652.39,499.94,629.89,518.93" fill="#333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 638 B |
7
assets/icon/FavoriteDisable.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2136037,0,0,1.2136037,-732.43441,-64.413778)">
|
||||
<path d="m 617.617,100.868 c -0.703,0 -1.336,-0.279 -1.781,-0.785 -0.496,-0.56 -0.707,-1.346 -0.6,-2.215 l 1.354,-10.822 c 0.074,-0.585 -0.262,-1.62 -0.666,-2.049 l -7.453,-7.961 c -0.742,-0.792 -1.004,-1.754 -0.717,-2.637 0.287,-0.883 1.063,-1.508 2.129,-1.712 l 10.709,-2.056 c 0.578,-0.111 1.459,-0.752 1.746,-1.27 l 5.08,-9.213 c 0.199,-0.404 0.988,-1.78 2.469,-1.78 1.557,0 2.383,1.58 2.531,1.897 l 5.02,9.097 c 0.285,0.517 1.168,1.157 1.746,1.269 l 10.709,2.056 c 1.066,0.205 1.842,0.829 2.129,1.712 0.287,0.883 0.025,1.844 -0.717,2.637 l -7.453,7.96 c -0.404,0.43 -0.74,1.465 -0.668,2.051 l 1.352,10.822 c 0.109,0.866 -0.102,1.652 -0.596,2.213 -0.723,0.816 -1.939,1.017 -3.1,0.475 l -9.873,-4.633 c -0.197,-0.092 -0.582,-0.189 -1.08,-0.189 -0.498,0 -0.883,0.098 -1.078,0.188 l -9.873,4.633 c -0.444,0.207 -0.887,0.312 -1.319,0.312 l 0,0 z m 12.27,-8.239 c 0.883,0 1.734,0.172 2.398,0.484 l 9.057,4.249 -1.238,-9.932 c -0.186,-1.498 0.451,-3.457 1.482,-4.557 l 6.84,-7.304 -9.828,-1.891 c -1.48,-0.284 -3.148,-1.495 -3.879,-2.817 l -4.832,-8.764 -4.832,8.763 c -0.73,1.323 -2.396,2.534 -3.879,2.818 l -9.824,1.887 6.838,7.309 c 1.031,1.101 1.668,3.06 1.48,4.558 l -1.242,9.928 9.063,-4.247 c 0.663,-0.312 1.515,-0.484 2.396,-0.484 l 0,0 z"
|
||||
style="fill:#333369" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
9
assets/icon/FavoriteEnable.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1999726,0,0,1.1999726,-723.8473,-206.71515)">
|
||||
<path d="m 617.479,220.601 c -0.711,0 -1.352,-0.282 -1.803,-0.794 -0.5,-0.566 -0.715,-1.361 -0.605,-2.24 l 1.369,-10.944 c 0.074,-0.592 -0.266,-1.638 -0.674,-2.073 l -7.539,-8.051 c -0.75,-0.801 -1.016,-1.773 -0.725,-2.667 0.291,-0.893 1.074,-1.524 2.152,-1.731 l 10.832,-2.08 c 0.584,-0.112 1.477,-0.76 1.766,-1.284 l 5.137,-9.317 c 0.201,-0.408 1,-1.799 2.498,-1.799 1.574,0 2.408,1.598 2.561,1.918 l 5.074,9.2 c 0.289,0.523 1.182,1.171 1.766,1.283 l 10.832,2.08 c 1.078,0.207 1.861,0.838 2.152,1.731 0.291,0.893 0.027,1.866 -0.725,2.667 l -7.539,8.05 c -0.408,0.436 -0.748,1.482 -0.674,2.075 l 1.367,10.944 c 0.109,0.876 -0.104,1.671 -0.604,2.238 -0.73,0.826 -1.961,1.028 -3.135,0.48 l -9.984,-4.685 c -0.199,-0.093 -0.588,-0.192 -1.092,-0.192 -0.504,0 -0.895,0.099 -1.092,0.191 l -9.982,4.685 c -0.45,0.209 -0.897,0.315 -1.333,0.315 l 0,0 z m 12.409,-8.331 c 0.893,0 1.752,0.174 2.424,0.489 l 9.16,4.297 -1.252,-10.044 c -0.189,-1.515 0.455,-3.496 1.498,-4.609 l 6.918,-7.387 -9.939,-1.913 c -1.498,-0.288 -3.184,-1.512 -3.922,-2.85 l -4.887,-8.863 -4.887,8.862 c -0.738,1.338 -2.426,2.563 -3.924,2.851 l -9.936,1.908 6.916,7.391 c 1.043,1.113 1.688,3.094 1.498,4.61 l -1.256,10.041 9.164,-4.295 c 0.673,-0.315 1.532,-0.488 2.425,-0.488 l 0,0 z"
|
||||
style="fill:#333369" />
|
||||
<path d="m 629.28,189.527 c 0,0 0.244,-0.523 0.607,-0.523 0.363,0 0.627,0.56 0.627,0.56 l 2.816,5.108 c 0.285,0.514 0.988,1.026 1.564,1.137 l 5.955,1.144 c 0.578,0.111 0.721,0.553 0.32,0.981 l -4.146,4.427 c -0.402,0.428 -0.67,1.256 -0.598,1.838 l 0.752,6.02 c 0.074,0.581 -0.303,0.855 -0.834,0.606 l -5.49,-2.577 c -0.533,-0.249 -1.402,-0.249 -1.934,0 l -5.49,2.577 c -0.533,0.249 -0.908,-0.024 -0.836,-0.606 l 0.754,-6.02 c 0.072,-0.582 -0.197,-1.41 -0.598,-1.838 l -4.146,-4.427 c -0.402,-0.429 -0.258,-0.871 0.318,-0.981 l 5.957,-1.144 c 0.576,-0.111 1.279,-0.623 1.564,-1.137 l 2.838,-5.145 z"
|
||||
style="fill:#333369;fill-rule:evenodd" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
9
assets/icon/FavoriteMiddle.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2135952,0,0,1.2135952,-732.42924,-136.47014)">
|
||||
<path d="m 617.617,160.243 c -0.701,0 -1.334,-0.279 -1.781,-0.785 -0.494,-0.56 -0.707,-1.346 -0.598,-2.215 l 1.354,-10.822 c 0.072,-0.585 -0.264,-1.62 -0.668,-2.049 l -7.453,-7.961 c -0.742,-0.792 -1.004,-1.753 -0.717,-2.637 0.287,-0.883 1.063,-1.507 2.129,-1.712 l 10.709,-2.056 c 0.578,-0.111 1.461,-0.751 1.746,-1.27 l 5.08,-9.213 c 0.199,-0.404 0.99,-1.779 2.469,-1.779 1.557,0 2.383,1.58 2.531,1.896 l 5.02,9.097 c 0.287,0.517 1.168,1.158 1.746,1.269 l 10.709,2.056 c 1.066,0.205 1.842,0.829 2.129,1.712 0.287,0.883 0.027,1.845 -0.717,2.637 l -7.453,7.96 c -0.404,0.431 -0.74,1.465 -0.668,2.051 l 1.354,10.822 c 0.107,0.866 -0.104,1.652 -0.598,2.213 -0.723,0.817 -1.939,1.017 -3.1,0.475 l -9.873,-4.633 c -0.195,-0.092 -0.582,-0.19 -1.08,-0.19 -0.496,0 -0.883,0.098 -1.078,0.189 l -9.871,4.633 c -0.446,0.207 -0.889,0.312 -1.321,0.312 l 0,0 z m 12.27,-8.238 c 0.883,0 1.734,0.171 2.398,0.484 l 9.057,4.249 -1.238,-9.932 c -0.186,-1.498 0.451,-3.457 1.482,-4.557 l 6.84,-7.304 -9.828,-1.891 c -1.48,-0.285 -3.148,-1.496 -3.879,-2.818 l -4.832,-8.764 -4.832,8.763 c -0.73,1.323 -2.396,2.534 -3.877,2.819 l -9.826,1.886 6.838,7.309 c 1.031,1.101 1.668,3.06 1.48,4.559 l -1.24,9.928 9.061,-4.247 c 0.663,-0.313 1.515,-0.484 2.396,-0.484 l 0,0 z"
|
||||
style="fill:#333369" />
|
||||
<path d="m 641.045,137.83 c 0.396,-0.424 0.254,-0.861 -0.316,-0.971 l -5.891,-1.131 c -0.568,-0.109 -1.264,-0.616 -1.547,-1.124 l -2.783,-5.05 c 0,0 -0.262,-0.554 -0.621,-0.554 -0.357,0 -0.6,0.518 -0.6,0.518 l -2.805,5.087 c -0.281,0.508 -0.977,1.015 -1.547,1.124 l -5.889,1.131 c -0.57,0.11 -0.713,0.547 -0.314,0.971 l 4.098,4.377 c 0.398,0.424 0.664,1.242 0.592,1.817 l -0.744,5.952 c -0.072,0.576 0.299,0.846 0.824,0.599 l 5.43,-2.547 c 0.264,-0.123 0.609,-0.185 0.955,-0.185 0.348,0 0.693,0.062 0.957,0.185 l 5.428,2.547 c 0.133,0.062 0.254,0.091 0.363,0.091 0.322,0 0.518,-0.26 0.463,-0.69 l -0.742,-5.952 c -0.074,-0.576 0.191,-1.394 0.59,-1.817 l 4.099,-4.378 z m -9.563,-2.222 c 0.578,1.042 1.797,1.928 2.967,2.153 l 3.242,0.623 -2.256,2.408 c -0.818,0.871 -1.283,2.308 -1.135,3.49 l 0.408,3.275 -2.988,-1.402 c -0.67,-0.314 -1.367,-0.38 -1.834,-0.38 v -13.059 l 1.596,2.892 z"
|
||||
style="fill:#333369" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
4
assets/icon/File.svg
Normal file
@@ -0,0 +1,4 @@
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<path fill="#333" d="m50.318,5.003h-21.273c-5.515,6-11.03,12-16.545,18v34.714c0.10749,1.7195,2.0191,1.2097,3.1801,1.2857h34.638c1.6346-0.23497,1.0847-2.1237,1.1818-3.284v-49.431c0.018-0.6455-0.51-1.2961-1.182-1.285z"/>
|
||||
<path fill="#FFF" d="m29.038,22.993h-14.182c4.7273-5.143,9.4547-10.286,14.182-15.429v15.429z"/>
|
||||
</svg>
|
After Width: | Height: | Size: 544 B |
7
assets/icon/Folder.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64px" height="64px">
|
||||
<g transform="matrix(1.199961,0,0,1.2222222,-436.76926,-579.09522)">
|
||||
<path d="m 378.923,493.986 c -1.41,0 -2.684,1.188 -2.781,2.594 l -0.932,12.574 c -0.059,0.787 -0.717,1.389 -1.495,1.389 -0.037,0 -0.075,-0.002 -0.112,-0.004 -0.826,-0.063 -1.446,-0.781 -1.385,-1.607 l 0.932,-12.566 c 0.205,-2.963 2.796,-5.379 5.773,-5.379 h 28.369 c 0,-0.465 0,-0.873 0,-1.031 0,-1.635 -1.654,-2.973 -3.309,-2.973 h -17.744 c 0,0 0,-1.193 0,-2.543 0,-1.35 -1.354,-2.453 -3.008,-2.453 h -12.07 c -1.654,0 -3.008,1.35 -3.008,3 v 30 c 0,1.65 1.354,3 3.008,3 h 37.098 c 1.655,0 3.122,-1.346 3.262,-2.99 l 1.623,-19.021 c 0.065,-0.766 -0.177,-1.459 -0.612,-1.988 h -33.609 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 793 B |
60
assets/icon/Forbidden.svg
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg3028"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="Forbidden.svg">
|
||||
<metadata
|
||||
id="metadata3038">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3036" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1340"
|
||||
inkscape:window-height="892"
|
||||
id="namedview3034"
|
||||
showgrid="false"
|
||||
inkscape:zoom="8"
|
||||
inkscape:cx="52.794424"
|
||||
inkscape:cy="15.718112"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:current-layer="svg3028" />
|
||||
<g
|
||||
transform="matrix(1.2,0,0,1.2,-579.7324,-351.106)"
|
||||
id="g3030">
|
||||
<path
|
||||
d="m 532.27833,319.25811 c 0,-12.427 -10.07533,-22.50311 -22.50133,-22.50311 -12.426,0 -22.5,10.073 -22.5,22.5 0,12.427 10.074,22.5 22.5,22.5 l 0.021,-8.437 c -7.755,0 -14.08298,-6.308 -14.08298,-14.063 0,-2.343 0.584,-4.55 1.602,-6.493 l 18.955,18.953 c -1.943,1.019 -4.15,1.603 -6.494,1.603 l -0.001,8.45698 c 12.426,0 22.5,-10.09298 22.5,-22.51998 l -8.43744,5.9e-4 c 0,2.344 -0.58356,4.54941 -1.60156,6.49441 l -18.955,-18.955 c 1.945,-1.019 4.151,-1.603 6.494,-1.603 7.754,10e-4 14.063,6.309 14.063,14.063 z"
|
||||
style="fill:#333333"
|
||||
id="path3032"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cssccsccccccccccc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.2 KiB |
7
assets/icon/Help.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-579.7336,-711.5908)">
|
||||
<path d="m 509.778,597.159 c -12.427,0 -22.5,10.074 -22.5,22.5 0,12.428 10.073,22.5 22.5,22.5 12.427,0 22.5,-10.072 22.5,-22.5 -10e-4,-12.426 -10.073,-22.5 -22.5,-22.5 z m -0.559,36.414 c -1.676,0 -3.054,-1.379 -3.054,-3.055 0,-1.676 1.378,-3.053 3.054,-3.053 1.677,0 3.054,1.377 3.054,3.053 0,1.676 -1.377,3.055 -3.054,3.055 z m 2.904,-11.791 c -0.892,1.305 -0.594,3.129 -3.052,3.129 -1.602,0 -2.385,-1.305 -2.385,-2.496 0,-4.432 6.519,-5.436 6.519,-9.086 0,-2.012 -1.34,-3.203 -3.576,-3.203 -4.767,0 -2.905,4.916 -6.518,4.916 -1.304,0 -2.421,-0.783 -2.421,-2.271 0,-3.65 4.172,-6.891 8.714,-6.891 4.769,0 9.46,2.197 9.46,7.449 10e-4,4.842 -5.55,6.703 -6.741,8.453 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 857 B |
11
assets/icon/Home.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1999968,0,0,1.3606385,-147.9521,-648.3007)">
|
||||
<path d="m 170.351,504.021 c -0.343,0.365 -0.922,0.385 -1.288,0.043 L 150.392,486.63 c -0.365,-0.342 -0.966,-0.342 -1.332,0 l -18.204,16.97 c -0.367,0.344 -0.945,0.322 -1.287,-0.045 l -1.865,-2 c -0.342,-0.365 -0.321,-0.945 0.045,-1.287 l 21.313,-19.869 c 0.367,-0.342 0.967,-0.342 1.334,0.002 l 21.777,20.334 c 0.365,0.342 0.386,0.922 0.043,1.289 l -1.865,1.997 z"
|
||||
style="fill:#333333"/>
|
||||
<path d="m 149.725,489.777 -15.345,14.305 v 14.83 c 0,0.504 0.414,0.918 0.919,0.918 h 10.085 v -12.857 c 0,-0.504 0.414,-0.918 0.919,-0.918 h 7.347 c 0.506,0 0.918,0.414 0.918,0.918 v 12.857 h 10.119 c 0.505,0 0.918,-0.414 0.918,-0.918 v -14.307 l -15.88,-14.828 z"
|
||||
style="fill:#333333"/>
|
||||
<path d="m 165.543,482.311 c 0,-0.506 -0.414,-0.92 -0.919,-0.92 h -5.51 c -0.505,0 -0.918,0.414 -0.918,0.92 v 1.604 l 7.347,6.918 v -8.522 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
7
assets/icon/Info.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-579.7336,-639.148)">
|
||||
<path d="m 509.778,536.79 c -12.427,0 -22.5,10.074 -22.5,22.5 0,12.428 10.073,22.5 22.5,22.5 12.426,0 22.5,-10.072 22.5,-22.5 0,-12.426 -10.074,-22.5 -22.5,-22.5 z m 3.749,35.66 c 0,0.516 -0.422,0.938 -0.937,0.938 h -5.625 c -0.516,0 -0.938,-0.422 -0.938,-0.938 v -15 c 0,-0.514 0.422,-0.938 0.938,-0.938 h 5.625 c 0.515,0 0.937,0.424 0.937,0.938 v 15 z m 0,-19.758 c 0,0.516 -0.422,0.938 -0.937,0.938 h -5.625 c -0.516,0 -0.938,-0.422 -0.938,-0.938 v -6.563 c 0,-0.516 0.422,-0.938 0.938,-0.938 h 5.625 c 0.515,0 0.937,0.422 0.937,0.938 v 6.563 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 736 B |
11
assets/icon/List.svg
Normal file
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1999733,0,0,1.1999733,-364.43055,-494.42419)">
|
||||
<path d="m 352.572,429.142 c 0,0.494 -0.406,0.9 -0.9,0.9 h -43.201 c -0.494,0 -0.9,-0.406 -0.9,-0.9 v -8.099 c 0,-0.496 0.406,-0.9 0.9,-0.9 h 43.201 c 0.494,0 0.9,0.404 0.9,0.9 v 8.099 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 352.572,443.542 c 0,0.494 -0.406,0.9 -0.9,0.9 h -43.201 c -0.494,0 -0.9,-0.406 -0.9,-0.9 v -8.1 c 0,-0.496 0.406,-0.9 0.9,-0.9 h 43.201 c 0.494,0 0.9,0.404 0.9,0.9 v 8.1 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 352.572,457.942 c 0,0.494 -0.406,0.898 -0.9,0.898 h -43.201 c -0.494,0 -0.9,-0.404 -0.9,-0.898 v -8.102 c 0,-0.494 0.406,-0.898 0.9,-0.898 h 43.201 c 0.494,0 0.9,0.404 0.9,0.898 v 8.102 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 842 B |
7
assets/icon/Load.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1818182,0,0,1.2857143,-429.68201,-454.27086)">
|
||||
<path d="m 406.154,357.213 h -18 l -14,14 v 27 c 0,0.55 0.449,1 1,1 h 11 v -11 h -4 c -1.1,0 -1.418,-0.688 -0.709,-1.526 l 8.416,-9.947 c 0.711,-0.84 1.875,-0.84 2.584,0 l 8.416,9.947 c 0.711,0.839 0.393,1.526 -0.707,1.526 h -4 v 11 h 10 c 0.549,0 1,-0.45 1,-1 v -40 c 0,-0.551 -0.451,-1 -1,-1 z m -18,14 h -12 l 12,-12 v 12 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 529 B |
7
assets/icon/Lock.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-3.2008856,-206.932)">
|
||||
<path d="m 43.688,193.586 h -1.077 v -8.353 c 0,-4.743 -3.881,-8.623 -8.623,-8.623 h -8.623 c -4.742,0 -8.623,3.88 -8.623,8.623 v 8.353 h -1.078 c -1.778,0 -3.232,1.455 -3.232,3.234 v 21.557 c 0,1.778 1.454,3.233 3.232,3.233 h 28.024 c 1.779,0 3.233,-1.455 3.233,-3.233 V 196.82 c 10e-4,-1.779 -1.453,-3.234 -3.233,-3.234 z m -11.856,14.928 v 6.81 h -4.311 v -6.81 c -1.413,-0.769 -2.383,-2.248 -2.383,-3.969 0,-2.506 2.031,-4.538 4.538,-4.538 2.505,0 4.536,2.032 4.536,4.538 10e-4,1.721 -0.968,3.2 -2.38,3.969 z m 4.516,-14.928 H 23.006 v -7.545 c 0,-2.371 1.938,-4.31 4.311,-4.31 h 4.721 c 2.37,0 4.311,1.939 4.311,4.31 v 7.545 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 821 B |
7
assets/icon/Next.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-723.8644,-566.7208)">
|
||||
<polygon points="629.887,481.039 652.387,499.941 629.887,518.934 629.887,509.459 607.387,509.459 607.387,490.512 629.887,490.512 "
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 322 B |
9
assets/icon/OpenMenu.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-579.7336,-421.8556)">
|
||||
<path d="m 509.778,363.895 c 7.908,0 14.318,6.411 14.318,14.318 0,7.907 -6.41,14.318 -14.318,14.318 -7.908,0 -14.318,-6.411 -14.318,-14.318 0,-7.907 6.41,-14.318 14.318,-14.318 m 0,-8.182 c -12.406,0 -22.5,10.094 -22.5,22.5 0,12.406 10.094,22.5 22.5,22.5 12.406,0 22.5,-10.094 22.5,-22.5 0,-12.406 -10.094,-22.5 -22.5,-22.5 l 0,0 z"
|
||||
style="fill:#333333" />
|
||||
<polygon points="498.698,373.228 509.778,387.162 520.857,373.228 "
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 625 B |
9
assets/icon/Parameter.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1999998,0,0,1.2054398,-147.94597,-642.18985)">
|
||||
<path d="m 169.92,548.999 c -0.181,-0.441 -0.497,-0.633 -0.703,-0.426 -0.206,0.205 -0.575,0.451 -0.819,0.543 -0.244,0.094 -1.056,-0.443 -1.392,-0.779 h -0.001 c -0.336,-0.338 -0.688,-0.813 -0.78,-1.057 -0.092,-0.244 0.444,-1.055 0.78,-1.393 l 0.011,-0.01 c 0.337,-0.338 0.348,-0.898 0.023,-1.248 l -3.978,-3.666 c -0.374,-0.295 -0.851,-0.248 -1.059,0.104 -0.209,0.35 -0.555,0.76 -0.769,0.91 -0.214,0.148 -1.133,-0.17 -1.541,-0.414 -0.409,-0.242 -0.866,-0.617 -1.017,-0.83 -0.149,-0.215 0.132,-1.066 0.326,-1.393 0.194,-0.328 -0.013,-0.729 -0.461,-0.889 l -5.998,-1.547 c -0.47,-0.078 -0.854,0.205 -0.854,0.631 0,0.426 -0.088,0.969 -0.194,1.207 -0.107,0.238 -1.061,0.434 -1.536,0.434 -0.475,0 -1.06,-0.088 -1.298,-0.195 -0.238,-0.107 -0.433,-1.02 -0.433,-1.445 0,-0.425 -0.384,-0.709 -0.854,-0.631 l -5.998,1.547 c -0.448,0.16 -0.655,0.561 -0.461,0.889 0.195,0.326 0.379,0.807 0.408,1.066 0.03,0.258 -0.689,0.914 -1.099,1.156 -0.408,0.244 -0.955,0.467 -1.215,0.496 -0.26,0.029 -0.885,-0.643 -1.095,-0.992 -0.208,-0.352 -0.686,-0.398 -1.06,-0.104 l -3.978,3.666 c -0.324,0.35 -0.313,0.91 0.024,1.248 l 0.011,0.01 c 0.336,0.338 0.688,0.813 0.78,1.057 0.092,0.244 -0.444,1.055 -0.781,1.393 -0.336,0.336 -0.812,0.688 -1.056,0.779 -0.244,0.091 -0.949,-0.338 -1.155,-0.543 -0.206,-0.207 -0.522,-0.016 -0.703,0.426 0,0 -2.54,6.197 -2.54,10.189 0,12.428 10.073,22.5 22.5,22.5 12.427,0 22.5,-10.072 22.5,-22.5 0.005,-3.992 -2.535,-10.189 -2.535,-10.189 z m -19.96,21.541 c -6.213,0 -11.25,-5.037 -11.25,-11.25 0,-5.076 3.363,-9.363 7.981,-10.764 l 2.882,-5.764 c 0.213,-0.426 0.561,-0.426 0.773,0 l 2.882,5.764 c 4.619,1.4 7.981,5.688 7.981,10.764 0.001,6.213 -5.036,11.25 -11.249,11.25 z"
|
||||
style="fill:#333333"/>
|
||||
<path d="m 149.96,551.501 c -4.295,0 -7.788,3.494 -7.788,7.789 0,4.295 3.493,7.787 7.788,7.787 4.295,0 7.788,-3.492 7.788,-7.787 0,-4.295 -3.493,-7.789 -7.788,-7.789 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.0 KiB |
7
assets/icon/Previous.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(-1.2,0,0,1.2,787.8644,-566.7208)">
|
||||
<polygon points="652.387,499.941 629.887,518.934 629.887,509.459 607.387,509.459 607.387,490.512 629.887,490.512 629.887,481.039 "
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 322 B |
9
assets/icon/Quit.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2000267,0,0,1.2000267,-3.5226163,-279.15673)">
|
||||
<path d="m 36.314,239.696 v 8.396 c 4.282,2.353 7.191,6.905 7.191,12.126 0,7.626 -6.203,13.829 -13.829,13.829 -7.626,0 -13.829,-6.203 -13.829,-13.829 0,-5.221 2.91,-9.773 7.191,-12.126 v -8.396 c -8.664,2.802 -14.936,10.925 -14.936,20.522 0,11.915 9.658,21.573 21.573,21.573 11.915,0 21.573,-9.658 21.573,-21.573 0.002,-9.596 -6.269,-17.72 -14.934,-20.522 z"
|
||||
style="fill:#333333"/>
|
||||
<path d="m 32.998,256.706 c 0,1.218 -0.995,2.213 -2.213,2.213 h -2.217 c -1.218,0 -2.213,-0.995 -2.213,-2.213 v -17.701 c 0,-1.218 0.995,-2.213 2.213,-2.213 h 2.217 c 1.218,0 2.213,0.995 2.213,2.213 v 17.701 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 804 B |
12
assets/icon/Redo.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.3012048,0,0,1.255814,-631.32431,-293.62251)">
|
||||
<circle d="m 514.52701,259.29199 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
|
||||
style="fill:#333333"
|
||||
cx="510.52701"
|
||||
cy="259.29199"
|
||||
r="4"/>
|
||||
<path d="m 530.527,254.292 v -13 l -4.098,3.514 c -4.137,-4.393 -10.08,-7.014 -15.902,-7.014 -11.855,0 -21.5,9.646 -21.5,21.5 0,11.854 9.645,21.5 21.5,21.5 8.551,0 16.287,-5.064 19.711,-12.902 l -6.416,-2.801 c -2.309,5.287 -7.527,8.703 -13.295,8.703 -7.996,0 -14.5,-6.504 -14.5,-14.5 0,-7.994 6.504,-14.5 14.5,-14.5 3.824,0 7.744,1.715 10.568,4.584 l -4.568,3.916 14,1 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 818 B |
7
assets/icon/Remove.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2000267,0,0,1.2000267,-651.9777,-351.11481)">
|
||||
<path d="m 579.088,319.255 12.91,-12.908 c 0.627,-0.627 0.627,-1.654 0,-2.281 l -6.84,-6.842 c -0.627,-0.625 -1.652,-0.625 -2.279,0 l -12.91,12.91 -12.91,-12.91 c -0.627,-0.625 -1.654,-0.625 -2.281,0 l -6.84,6.842 c -0.625,0.627 -0.625,1.654 0,2.281 l 12.91,12.908 -12.908,12.908 c -0.627,0.627 -0.627,1.654 0,2.281 l 6.84,6.842 c 0.627,0.625 1.654,0.625 2.281,0 l 12.908,-12.91 12.908,12.91 c 0.627,0.625 1.652,0.625 2.279,0 l 6.84,-6.842 c 0.627,-0.627 0.627,-1.654 0,-2.281 l -12.908,-12.908 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 699 B |
63
assets/icon/Remove2.svg
Normal file
@@ -0,0 +1,63 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
width="64"
|
||||
height="64"
|
||||
id="svg3028"
|
||||
version="1.1"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="Remove2.svg">
|
||||
<metadata
|
||||
id="metadata3038">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3036" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="968"
|
||||
id="namedview3034"
|
||||
showgrid="true"
|
||||
inkscape:zoom="9.0377085"
|
||||
inkscape:cx="14.895958"
|
||||
inkscape:cy="28.796248"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg3028">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid3040" />
|
||||
</sodipodi:namedview>
|
||||
<g
|
||||
transform="matrix(1.2000267,0,0,1.2000267,-651.9777,-351.11481)"
|
||||
id="g3030">
|
||||
<path
|
||||
d="m 576.63525,319.25524 15.35699,-15.27674 c 0.627,-0.627 0.627,-1.654 0,-2.281 l -4.29338,-4.3352 c -0.627,-0.625 -1.652,-0.625 -2.279,0 l -15.45113,15.22642 -15.83298,-15.45692 c -0.627,-0.625 -1.654,-0.625 -2.281,0 l -3.9859,4.00946 c -0.625,0.627 -0.625,1.654 0,2.281 l 15.43337,15.83298 -15.31612,15.67389 c -0.61972,0.63419 -0.627,1.654 0,2.281 l 4.14303,4.07587 c 0.627,0.625 1.654,0.625 2.281,0 l 15.5586,-15.36424 16.05393,15.36226 c 0.627,0.625 1.652,0.625 2.279,0 l 3.69434,-4.06095 c 0.627,-0.627 0.62038,-1.64745 0,-2.281 z"
|
||||
style="fill:#fe0000;fill-opacity:0.88627452"
|
||||
id="path3032"
|
||||
inkscape:connector-curvature="0"
|
||||
sodipodi:nodetypes="cccccccccccscccccccsc" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 2.3 KiB |
15
assets/icon/Replace.svg
Normal file
@@ -0,0 +1,15 @@
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path d="M56.308,30.297c-0.34-11.332-7.1-21.282-17.44-25.505-10.575-4.3193-22.883-1.4808-30.624,7.062l6.7808,6.444c5.1608-5.6978,13.367-7.5874,20.417-4.7076,6.802,2.7782,11.249,9.2808,11.584,16.709l-6.7794,0.0046,11.511,14.941,10.893-14.949-6.3435-0.000321z" fill="#333"/>
|
||||
<g transform="matrix(0.71188026,0,0,0.77215001,-386.35967,-207.86869)">
|
||||
<path fill="#333" d="m579.09,319.26,12.91-12.908c0.627-0.627,0.627-1.654,0-2.281l-6.84-6.842c-0.627-0.625-1.652-0.625-2.279,0l-12.91,12.91-12.91-12.91c-0.627-0.625-1.654-0.625-2.281,0l-6.84,6.842c-0.625,0.627-0.625,1.654,0,2.281l12.91,12.908-12.908,12.908c-0.627,0.627-0.627,1.654,0,2.281l6.84,6.842c0.627,0.625,1.654,0.625,2.281,0l12.908-12.91,12.908,12.91c0.627,0.625,1.652,0.625,2.279,0l6.84-6.842c0.627-0.627,0.627-1.654,0-2.281l-12.908-12.908z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.2 KiB |
7
assets/icon/SDCard.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1999941,0,0,1.2,-75.451168,-351.106)">
|
||||
<path d="m 104.793,296.755 h -24.75 c -1.237,0 -2.25,1.013 -2.25,2.25 v 9 c 0,1.237 -0.562,3.093 -1.248,4.122 l -2.004,3.005 c -0.687,1.029 -1.248,2.885 -1.248,4.123 0,1.236 0.905,1.797 2.013,1.244 l 0.475,-0.238 c 1.107,-0.554 2.013,0.006 2.013,1.244 v 2.25 c 0,1.236 -0.717,2.967 -1.591,3.84 l -1.318,1.318 c -0.874,0.875 -1.591,2.604 -1.591,3.842 v 6.75 c 0,1.236 1.013,2.25 2.25,2.25 h 24.75 c 4.359,0 6.75,-2.25 6.75,-6.75 v -36 c -10e-4,-1.237 -1.014,-2.25 -2.251,-2.25 z m -20.25,13 c 0,0.275 -0.225,0.5 -0.5,0.5 h -1.25 c -0.275,0 -0.5,-0.225 -0.5,-0.5 v -8 c 0,-0.275 0.225,-0.5 0.5,-0.5 h 1.25 c 0.275,0 0.5,0.225 0.5,0.5 v 8 z m 4.5,0 c 0,0.275 -0.225,0.5 -0.5,0.5 h -1.25 c -0.275,0 -0.5,-0.225 -0.5,-0.5 v -8 c 0,-0.275 0.225,-0.5 0.5,-0.5 h 1.25 c 0.275,0 0.5,0.225 0.5,0.5 v 8 z m 4.5,0 c 0,0.275 -0.225,0.5 -0.5,0.5 h -1.25 c -0.275,0 -0.5,-0.225 -0.5,-0.5 v -8 c 0,-0.275 0.225,-0.5 0.5,-0.5 h 1.25 c 0.275,0 0.5,0.225 0.5,0.5 v 8 z m 4.5,0 c 0,0.275 -0.225,0.5 -0.5,0.5 h -1.25 c -0.275,0 -0.5,-0.225 -0.5,-0.5 v -8 c 0,-0.275 0.225,-0.5 0.5,-0.5 h 1.25 c 0.275,0 0.5,0.225 0.5,0.5 v 8 z m 4.5,0 c 0,0.275 -0.225,0.5 -0.5,0.5 h -1.25 c -0.275,0 -0.5,-0.225 -0.5,-0.5 v -8 c 0,-0.275 0.225,-0.5 0.5,-0.5 h 1.25 c 0.275,0 0.5,0.225 0.5,0.5 v 8 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
16
assets/icon/Save.svg
Normal file
@@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64px" height="64px">
|
||||
<g transform="matrix(1.2,0,0,1.2000267,-436.7836,-495.40152)">
|
||||
<rect style="fill:#333333"
|
||||
x="386.36899"
|
||||
y="419.13501"
|
||||
width="8.5719995"
|
||||
height="10.714"
|
||||
/>
|
||||
<path style="fill:#333333"
|
||||
d="m 403.435,416.992 h -3.139 v 16.071 h -25.713 v -16.071 h -5.893 c -0.295,0 -0.537,0.241 -0.537,0.535 v 43.929 c 0,0.295 0.242,0.535 0.537,0.535 h 43.928 c 0.295,0 0.535,-0.24 0.535,-0.535 V 426.71 l -9.718,-9.718 z m 3.291,41.784 h -32.143 v -21.428 h 32.143 v 21.428 z"
|
||||
/>
|
||||
<polygon style="fill:#333333" points="403.511,445.921 403.511,445.921 377.798,445.921 377.798,442.706 403.511,442.706 " />
|
||||
<polygon style="fill:#333333" points="403.511,453.421 403.511,453.421 377.798,453.421 377.798,450.206 403.511,450.206 " />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 859 B |
61
assets/icon/Search.svg
Normal file
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
height="64"
|
||||
width="64"
|
||||
version="1.1"
|
||||
id="svg3965"
|
||||
inkscape:version="0.48.3.1 r9886"
|
||||
sodipodi:docname="Search.svg">
|
||||
<metadata
|
||||
id="metadata3975">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs3973" />
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1680"
|
||||
inkscape:window-height="968"
|
||||
id="namedview3971"
|
||||
showgrid="false"
|
||||
inkscape:zoom="16"
|
||||
inkscape:cx="27.03623"
|
||||
inkscape:cy="33.687368"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="27"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg3965" />
|
||||
<path
|
||||
d="M 39.436904,24.062448 C 39.915614,33.278293 29.16429,41.203307 19.736168,37.727362 10.452887,34.884476 6.7103607,23.258769 12.262163,15.90798 17.329733,7.8698857 31.048441,7.5763012 36.47627,15.419465 c 1.929199,2.496703 2.965789,5.568455 2.960389,8.64209 z"
|
||||
id="path3969"
|
||||
style="fill:#ffffff;fill-opacity:0.87450981"
|
||||
inkscape:connector-curvature="0" />
|
||||
<path
|
||||
d="M 58.168,50.56 46.013,38.407 c -0.91442,-0.91442 -2.3016,-1.0644 -3.3865,-0.47161 l -2.592,-2.592 c 2.208,-3.1357 3.5185,-6.9493 3.5185,-11.068 0,-10.629 -8.6485,-19.276 -19.277,-19.276 -10.629,0 -19.276,8.6461 -19.276,19.276 0,10.6299 8.6461,19.277 19.276,19.277 4.1017,0 7.8985,-1.296 11.026,-3.4873 0,0 0.596082,-5.606306 -5.038478,-5.016691 -4.69706,2.902115 -12.054397,2.017375 -15.875086,-3.769003 -3.142722,-4.56604 -2.630816,-13.100523 2.668347,-16.731928 5.299163,-3.631405 14.142128,-3.981951 18.471312,4.363412 2.363082,6.040278 0.78609,12.603632 -5.311526,16.1632 7.665096,7.559567 7.694231,7.60221 7.694231,7.60221 -0.56041,1.0752 -0.40321,2.4348 0.49681,3.3373 l 12.155,12.153 c 1.1088,1.1112 2.9268,1.1112 4.0357,0 l 3.5725,-3.5701 c 1.1064,-1.1088 1.1064,-2.9256 -0.0024,-4.0369 z"
|
||||
id="path3967"
|
||||
inkscape:connector-curvature="0"
|
||||
style="fill:#333333"
|
||||
sodipodi:nodetypes="ccccssssccczccccccccc" />
|
||||
</svg>
|
After Width: | Height: | Size: 2.7 KiB |
9
assets/icon/Trash.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-436.9344,-711.5908)">
|
||||
<path d="m 408.302,604.218 h -7.95 c 0.002,-0.055 0.009,-0.109 0.009,-0.166 v -1.6 c 0,-2.91 -2.384,-5.293 -5.294,-5.293 h -8.824 c -2.912,0 -5.294,2.383 -5.294,5.293 v 1.6 c 0,0.057 0.007,0.111 0.009,0.166 h -7.95 c -1.456,0 -2.646,1.191 -2.646,2.646 v 2.646 c 0,1.457 1.19,2.648 2.646,2.648 h 0.883 v -1.766 h 33.529 v 1.766 h 0.883 c 1.455,0 2.646,-1.191 2.646,-2.648 v -2.646 c -0.001,-1.455 -1.192,-2.646 -2.647,-2.646 z m -22.969,-2.647 h 10.588 v 2.646 h -10.588 v -2.646 z"
|
||||
style="fill:#333333"/>
|
||||
<path d="m 375.654,613.042 v 26.469 c 0,1.457 1.19,2.648 2.647,2.648 h 24.705 c 1.456,0 2.647,-1.191 2.647,-2.648 v -26.469 h -29.999 z m 8.824,23.381 c 0,0.486 -0.397,0.883 -0.882,0.883 h -1.765 c -0.486,0 -0.883,-0.396 -0.883,-0.883 v -17.646 c 0,-0.484 0.396,-0.883 0.883,-0.883 h 1.765 c 0.484,0 0.882,0.398 0.882,0.883 v 17.646 z m 7.941,0 c 0,0.486 -0.398,0.883 -0.882,0.883 h -1.766 c -0.485,0 -0.882,-0.396 -0.882,-0.883 v -17.646 c 0,-0.484 0.396,-0.883 0.882,-0.883 h 1.766 c 0.483,0 0.882,0.398 0.882,0.883 v 17.646 z m 7.941,0 c 0,0.486 -0.398,0.883 -0.883,0.883 h -1.765 c -0.485,0 -0.882,-0.396 -0.882,-0.883 v -17.646 c 0,-0.484 0.396,-0.883 0.882,-0.883 h 1.765 c 0.484,0 0.883,0.398 0.883,0.883 v 17.646 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.4 KiB |
12
assets/icon/Undo.svg
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(-1.3012048,0,0,1.255814,695.32425,-293.62251)">
|
||||
<circle d="m 514.52701,259.29199 c 0,2.20914 -1.79086,4 -4,4 -2.20914,0 -4,-1.79086 -4,-4 0,-2.20914 1.79086,-4 4,-4 2.20914,0 4,1.79086 4,4 z"
|
||||
style="fill:#333333"
|
||||
cx="510.52701"
|
||||
cy="259.29199"
|
||||
r="4"/>
|
||||
<path d="m 530.527,254.292 v -13 l -4.098,3.514 c -4.137,-4.393 -10.08,-7.014 -15.902,-7.014 -11.855,0 -21.5,9.646 -21.5,21.5 0,11.854 9.645,21.5 21.5,21.5 8.551,0 16.287,-5.064 19.711,-12.902 l -6.416,-2.801 c -2.309,5.287 -7.527,8.703 -13.295,8.703 -7.996,0 -14.5,-6.504 -14.5,-14.5 0,-7.994 6.504,-14.5 14.5,-14.5 3.824,0 7.744,1.715 10.568,4.584 l -4.568,3.916 14,1 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 818 B |
14
assets/icon/Up.svg
Normal file
@@ -0,0 +1,14 @@
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g transform="matrix(0,-1.2,1.2,0,-567.9838,789.1274)">
|
||||
<polygon points="652.39,499.94,629.89,518.93,629.89,509.46,607.39,509.46,607.39,490.51,629.89,490.51,629.89,481.04" fill="#333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 638 B |
9
assets/icon/Update.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.1999733,0,0,1.1999733,-579.72065,-63.509343)">
|
||||
<path d="m 528.054,71.68 c -3.166,-7.28 -10.25,-11.956 -18.232,-11.956 -8.164,0 -15.625,5.116 -18.564,12.729 l 6.188,2.39 c 1.959,-5.077 6.934,-8.486 12.377,-8.486 5.251,0 9.9,3.048 12.05,7.791 l -4.514,1.804 11.543,6.66 3.377,-12.617 -4.225,1.685 z"
|
||||
style="fill:#333333"/>
|
||||
<path d="m 509.822,92.88 c -5.205,0 -9.952,-3.14 -12.074,-7.853 l 4.45,-1.721 -11.423,-6.515 -3.497,12.281 4.26,-1.646 c 3.106,7.252 10.357,12.084 18.284,12.084 8.193,0 15.449,-4.917 18.484,-12.524 l -6.158,-2.457 c -2.026,5.073 -6.862,8.351 -12.326,8.351 z"
|
||||
style="fill:#333333"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 744 B |
7
assets/icon/Validate.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2,0,0,1.2,-651.9628,-63.5416)">
|
||||
<path d="m 569.969,57.117 c -12.428,0 -22.5,10.073 -22.5,22.501 0,12.426 10.072,22.5 22.5,22.5 12.426,0 22.5,-10.074 22.5,-22.5 0,-12.428 -10.074,-22.501 -22.5,-22.501 z m 11.324,21.029 -10.391,10.391 c -0.514,0.514 -1.357,0.514 -1.871,0 L 558.642,78.148 c -0.514,-0.514 -0.514,-1.355 0,-1.869 l 2.279,-2.281 c 0.867,-0.867 2.174,-0.752 2.943,0.02 l 5.166,5.164 c 0.514,0.516 1.357,0.516 1.871,0 l 5.182,-5.18 c 0.867,-0.869 2.121,-0.816 2.934,-0.002 l 2.275,2.275 c 0.515,0.513 0.515,1.357 10e-4,1.871 z"
|
||||
style="fill:#333333;fill-rule:evenodd" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 711 B |
13
assets/icon/VolumeMax.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.300523,0,0,1.300523,-4.3338536,-458.79144)">
|
||||
<polygon points="16.142,372.236 26.103,362.274 26.103,394.151 16.142,384.189 7.177,384.189 7.177,372.236 "
|
||||
style="fill:#333333" />
|
||||
<path d="m 34.567,369.749 -2.816,2.816 c 1.447,1.446 2.344,3.444 2.344,5.647 0,2.203 -0.896,4.201 -2.344,5.646 l 2.816,2.816 c 2.168,-2.168 3.512,-5.161 3.512,-8.463 0,-3.302 -1.344,-6.293 -3.512,-8.462 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 39.704,365.025 -2.816,2.816 c 2.645,2.645 4.283,6.297 4.283,10.324 0,4.027 -1.639,7.68 -4.283,10.324 l 2.816,2.816 c 3.365,-3.367 5.451,-8.015 5.451,-13.141 0,-5.123 -2.086,-9.771 -5.451,-13.139 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 44.56,359.854 -2.816,2.816 c 3.982,3.982 6.449,9.48 6.449,15.543 0,6.063 -2.467,11.561 -6.447,15.543 l 2.814,2.816 c 4.705,-4.704 7.617,-11.197 7.617,-18.359 0,-7.162 -2.914,-13.655 -7.617,-18.359 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.0 KiB |
9
assets/icon/VolumeMute.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2249898,0,0,1.2249898,-3.7905268,-358.08412)">
|
||||
<polygon points="16.82,325.684 7.176,325.684 7.176,312.827 16.82,312.827 27.534,302.112 27.534,336.398 "
|
||||
style="fill:#333333" />
|
||||
<path d="m 47.081,319.255 4.918,-4.917 c 0.238,-0.24 0.238,-0.631 0,-0.87 l -2.607,-2.606 c -0.237,-0.238 -0.629,-0.238 -0.866,0 l -4.919,4.918 -4.92,-4.918 c -0.236,-0.238 -0.629,-0.238 -0.867,0 l -2.605,2.606 c -0.239,0.239 -0.239,0.63 0,0.87 l 4.917,4.917 -4.917,4.917 c -0.239,0.24 -0.239,0.632 0,0.87 l 2.607,2.607 c 0.236,0.236 0.629,0.236 0.867,0 l 4.918,-4.919 4.916,4.919 c 0.24,0.236 0.632,0.236 0.869,0 l 2.607,-2.607 c 0.236,-0.237 0.236,-0.63 0,-0.87 l -4.918,-4.917 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 820 B |
7
assets/icon/Warning.svg
Normal file
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2000035,0,0,1.2000035,-76.201658,-63.592236)">
|
||||
<path d="M 111.858,93.287 93.524,62.64 C 91.67,59.542 88.639,59.543 86.789,62.641 L 68.476,93.286 c -1.851,3.098 -0.413,5.633 3.197,5.633 h 36.993 c 3.608,-10e-4 5.045,-2.535 3.192,-5.632 z M 88.2,73.367 c 0,-1.084 0.887,-1.969 1.969,-1.969 1.083,0 1.969,0.885 1.969,1.969 v 9.192 c 0,1.085 -0.886,1.969 -1.969,1.969 -1.082,0 -1.969,-0.884 -1.969,-1.969 v -9.192 z m 1.969,19.596 c -1.449,0 -2.625,-1.177 -2.625,-2.625 0,-1.451 1.176,-2.624 2.625,-2.624 1.45,0 2.625,1.173 2.625,2.624 0,1.449 -1.175,2.625 -2.625,2.625 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 724 B |
17
assets/icon/WhereAmI.svg
Normal file
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.2000267,0,0,1.2000267,-220.089,-63.543123)">
|
||||
<path d="m 232.569,79.617 -16.755,-3.49 2.864,-5.115 -5.023,3.029 -3.585,-16.924 -3.585,16.924 -5.023,-3.029 2.864,5.115 -16.755,3.49 h -0.001 l 0.001,0 0,0 16.755,3.49 -2.864,5.114 5.023,-3.029 3.585,16.925 3.585,-16.925 5.023,3.029 -2.864,-5.114 16.755,-3.49 0,0 0,0 0,0 z m -22.499,4.302 c -2.376,0 -4.302,-1.925 -4.302,-4.301 0,-2.375 1.926,-4.301 4.302,-4.301 2.376,0 4.302,1.926 4.302,4.301 0,2.376 -1.926,4.301 -4.302,4.301 z"
|
||||
style="fill:#451c54" />
|
||||
<g>
|
||||
<path d="m 199.03,75.203 c 1.204,-2.997 3.589,-5.393 6.58,-6.609 l 1.242,-5.866 c -6.921,1.314 -12.371,6.771 -13.676,13.694 l 5.854,-1.219 z"
|
||||
style="fill:#451c54" />
|
||||
<path d="m 221.139,84.026 c -1.204,3.017 -3.604,5.428 -6.615,6.644 l -1.24,5.861 c 6.939,-1.307 12.404,-6.779 13.703,-13.723 l -5.848,1.218 z"
|
||||
style="fill:#451c54" />
|
||||
<path d="m 214.529,68.586 c 3.002,1.214 5.396,3.615 6.603,6.622 l 5.852,1.219 C 225.679,69.495 220.22,64.032 213.289,62.725 l 1.24,5.861 z"
|
||||
style="fill:#451c54" />
|
||||
<path d="m 205.614,90.663 c -3,-1.219 -5.391,-3.624 -6.592,-6.632 l -5.85,-1.218 c 1.299,6.935 6.754,12.402 13.684,13.715 l -1.242,-5.865 z"
|
||||
style="fill:#451c54" />
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
13
assets/icon/WrapAround.svg
Normal file
@@ -0,0 +1,13 @@
|
||||
<svg xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.w3.org/2000/svg" height="64" width="64" version="1.1" xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/">
|
||||
<metadata>
|
||||
<rdf:RDF>
|
||||
<cc:Work rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage"/>
|
||||
<dc:title/>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<path d="m36.594,31.471,9.9047,12.555,9.3732-12.561-9.4514,0.0011z" fill="#333"/>
|
||||
<path style="baseline-shift:baseline;block-progression:tb;color:#000000;direction:ltr;text-indent:0;text-align:start;enable-background:accumulate;text-transform:none;" fill="#353535" d="m31.724,51.573c-6.6423,0-11.845-9.0656-11.845-20.048s5.203-20.048,11.845-20.048c7.389,0,12.257,7.595,11.625,20.494,3.1648,0.01798,3.0508-0.01346,7.1142-0.17954,0.674-20.911-8.501-28.985-18.739-28.985-9.0867,0-18.935,12.636-18.935,28.584s9.849,29.002,18.935,28.855"/>
|
||||
</svg>
|
After Width: | Height: | Size: 980 B |
9
assets/icon/ZoomIn.svg
Normal file
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg width="64" height="64">
|
||||
<g transform="matrix(1.20002,0,0,1.20002,-651.97375,-639.15903)">
|
||||
<path d="m 591.775,574.756 -10.129,-10.127 c -0.762,-0.762 -1.918,-0.887 -2.822,-0.393 l -2.16,-2.16 c 1.84,-2.613 2.932,-5.791 2.932,-9.223 0,-8.857 -7.207,-16.063 -16.064,-16.063 -8.857,0 -16.063,7.205 -16.063,16.063 0,8.858 7.205,16.064 16.063,16.064 3.418,0 6.582,-1.08 9.188,-2.906 l 2.174,2.176 c -0.467,0.896 -0.336,2.029 0.414,2.781 l 10.129,10.127 c 0.924,0.926 2.439,0.926 3.363,0 l 2.977,-2.975 c 0.922,-0.925 0.922,-2.438 -0.002,-3.364 z m -28.244,-11.787 c -5.584,0 -10.113,-4.529 -10.113,-10.115 0,-5.584 4.529,-10.113 10.113,-10.113 5.586,0 10.115,4.529 10.115,10.113 0,5.585 -4.529,10.115 -10.115,10.115 z"
|
||||
style="fill:#333333" />
|
||||
<path d="m 568.498,550.863 h -3 v -3 c 0,-1.104 -0.895,-2 -2,-2 -1.104,0 -2,0.896 -2,2 v 3 h -3 c -1.104,0 -2,0.896 -2,2 0,1.105 0.896,2 2,2 h 3 v 3 c 0,1.105 0.896,2 2,2 1.105,0 2,-0.895 2,-2 v -3 h 3 c 1.105,0 2,-0.895 2,-2 0,-1.103 -0.894,-2 -2,-2 z"
|
||||
style="fill:#333333" />
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.1 KiB |
@@ -2,6 +2,7 @@
|
||||
<EdnLang version="0.1" lang="c">
|
||||
<ext>*.c</ext>
|
||||
<ext>*.cpp</ext>
|
||||
<ext>*.cc</ext>
|
||||
<ext>*.h</ext>
|
||||
<ext>*.hpp</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
|
46
assets/lang_in.xml
Normal file
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="qconf configuration file">
|
||||
<ext>*.in</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="my preprocesseur">
|
||||
<color>preprocesseur</color>
|
||||
<start>#</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="doubleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="simpleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
<!--<EscapeChar>\</EscapeChar>-->
|
||||
</rule>
|
||||
</pass1>
|
||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||
<rule name="my keyword">
|
||||
<color>keyword</color>
|
||||
<start>\@menu|endmenu|comment|if|endif|help|default|choice|endchoice|prompt|depends on|config\@</start>
|
||||
</rule>
|
||||
<rule name="my type">
|
||||
<color>type</color>
|
||||
<start>\@int|hex|bool|string\@</start>
|
||||
</rule>
|
||||
<rule name="numeric constant">
|
||||
<color>number</color>
|
||||
<start>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</start>
|
||||
</rule>
|
||||
<rule name="BIG LETTER">
|
||||
<color>macro</color>
|
||||
<start>\@[A-Z_][A-Z_0-9]{3,500}\@</start>
|
||||
</rule>
|
||||
<rule name="condition">
|
||||
<color>boolean</color>
|
||||
<start>==|<=|>=|!=|<{1,2}|>{1,2}|&&|\{|\}|</start>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
@@ -45,23 +45,23 @@
|
||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||
<rule name="my keyword">
|
||||
<color>keyword</color>
|
||||
<start>\@return|goto|if|else|case|default|switch|break|continue|while|do|for|sizeof\@</start>
|
||||
<start>\@return|goto|if|else|case|default|switch|break|continue|while|do|for\@</start>
|
||||
</rule>
|
||||
<rule name="my function keyword">
|
||||
<color>systemFunction</color>
|
||||
<start>\@new|delete|try|catch|memset|fopen|fread|fwrite|fgets|fclose|printf|(f|s|diag_)printf|calloc|malloc|realloc|(cyg|sup)_([a-z]|[A-Z]|[0-9]|_)+\@</start>
|
||||
<start>\@new|try|catch|print\@</start>
|
||||
</rule>
|
||||
<rule name="my type">
|
||||
<color>type</color>
|
||||
<start>\@bool|char|double|float|u?int(8|16|32|64|128)?(_t)?|long|short|signed|size_t|unsigned|void|(I|U)(8|16|32|64|128)\@</start>
|
||||
<start>\@boolean|byte|char|double|float|int|long|short|String|Object|Thread|void|enum\@</start>
|
||||
</rule>
|
||||
<rule name="my storage keyword">
|
||||
<color>storageKeyword</color>
|
||||
<start>\@import|package|extends|Override|const|class|virtual|private|public|protected|friend|const|extern|auto|register|static|unsigned|signed|volatile|char|double|float|int|long|short|void|typedef|struct|union|enum\@</start>
|
||||
<start>\@import|package|extends|Override|implements|const|class|abstract|private|public|protected|final|const|static|transiant|volatile|interface@</start>
|
||||
</rule>
|
||||
<rule name="my common Define">
|
||||
<color>commonDefine</color>
|
||||
<start>\@NULL|MAX|MIN|__LINE__|__DATA__|__FILE__|__func__|__TIME__|__STDC__\@</start>
|
||||
<start>\@null\@</start>
|
||||
</rule>
|
||||
<rule name="numeric constant">
|
||||
<color>number</color>
|
||||
@@ -69,7 +69,7 @@
|
||||
</rule>
|
||||
<rule name="my boolean">
|
||||
<color>boolean</color>
|
||||
<start>\@true|TRUE|false|FALSE\@</start>
|
||||
<start>\@true|false\@</start>
|
||||
</rule>
|
||||
<rule name="BIG LETTER">
|
||||
<color>macro</color>
|
||||
|
60
assets/lang_lua.xml
Normal file
@@ -0,0 +1,60 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.1" lang="c">
|
||||
<ext>*.lua</ext>
|
||||
<pass1>
|
||||
<rule name="Comment multiline">
|
||||
<color>comment</color>
|
||||
<start>\-\-\[\[</start>
|
||||
<end>\-\-\]\]</end>
|
||||
</rule>
|
||||
<rule name="my todo comment">
|
||||
<color>SYNTAX_ERROR</color>
|
||||
<start>\-\-[ \t]*TODO[ \t]*:</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="my comment">
|
||||
<color>comment</color>
|
||||
<start>\-\-</start>
|
||||
<end>\n</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="doubleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<start>"</start>
|
||||
<end>"</end>
|
||||
<EscapeChar>\</EscapeChar>
|
||||
</rule>
|
||||
<rule name="simpleQuteText">
|
||||
<color>doubleQuoteText</color>
|
||||
<start>'</start>
|
||||
<end>'</end>
|
||||
</rule>
|
||||
</pass1>
|
||||
<pass2> <!-- Parse on display data ==> nor regenerate every display but every time modification apear -->
|
||||
<rule name="my keyword">
|
||||
<color>keyword</color>
|
||||
<start>\@and|break|do|else|elseif|end|for|function|if|in|local|nil|not|or|repeat|return|then|until|while\@</start>
|
||||
</rule>
|
||||
<rule name="numeric constant">
|
||||
<color>number</color>
|
||||
<start>\@((0(x|X)[0-9a-fA-F]*)|(\d+\.?\d*|\.\d+)((e|E)(\+|\-)?\d+)?)(L|l|UL|ul|u|U|F|f)?\@</start>
|
||||
</rule>
|
||||
<rule name="my boolean">
|
||||
<color>boolean</color>
|
||||
<start>\@true|false\@</start>
|
||||
</rule>
|
||||
<rule name="BIG LETTER">
|
||||
<color>macro</color>
|
||||
<start>\@[A-Z_][A-Z_0-9]{3,500}\@</start>
|
||||
</rule>
|
||||
<rule name="Function name">
|
||||
<color>functionName</color>
|
||||
<start>\@(\w|_)+[ \t]*\(</start>
|
||||
</rule>
|
||||
<rule name="condition">
|
||||
<color>boolean</color>
|
||||
<start>==|<=|>=|~=|<{1,2}|>{1,2}|&&|\{|\}|</start>
|
||||
</rule>
|
||||
</pass2>
|
||||
</EdnLang>
|
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<EdnLang version="0.2" lang="XML">
|
||||
<ext>*.xml</ext>
|
||||
<ext>*.eol</ext>
|
||||
<ext>*.svg</ext>
|
||||
<pass1><!-- multiline section & parse all file (now) and when modification retrive previous modification -->
|
||||
<rule name="Comment">
|
||||
<color>comment</color>
|
||||
|
10
install.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
|
||||
#really simple to install
|
||||
echo "- copy binary /usr/bin/edn"
|
||||
sudo cp -vf linux/bin/release/edn /usr/bin/edn
|
||||
sudo chmod 777 /usr/bin/edn
|
||||
sudo mkdir -p /usr/share/edn
|
||||
echo "- Remove the folder /usr/share/edn/*"
|
||||
sudo rm -rf /usr/share/edn/*
|
||||
sudo cp -rfv assets/* /usr/share/edn/
|
@@ -5,8 +5,16 @@ include $(CLEAR_VARS)
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
||||
# name of the librairy
|
||||
LOCAL_MODULE := ednpackage
|
||||
LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng
|
||||
|
||||
# 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 etk tinyxml libzip libpng libfreetype libparsersvg libagg
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(addprefix $(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST))))
|
||||
|
||||
@@ -15,13 +23,21 @@ LOCAL_SRC_FILES := ewolAndroidAbstraction.cpp \
|
||||
|
||||
LOCAL_LDLIBS := -llog -landroid
|
||||
|
||||
# -frtti
|
||||
ifeq ($(DEBUG),1)
|
||||
LOCAL_CFLAGS := -D__PLATFORM__Android \
|
||||
-D__MODE__Touch \
|
||||
-DEWOL_USE_FREE_TYPE \
|
||||
-DETK_DEBUG_LEVEL=3 \
|
||||
-DEDN_DEBUG_LEVEL=3 \
|
||||
-DDATA_IN_APK \
|
||||
-frtti
|
||||
-DAPPL_DEBUG_LEVEL=3 \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\""
|
||||
else
|
||||
LOCAL_CFLAGS := -D__PLATFORM__Android \
|
||||
-D__MODE__Touch \
|
||||
-DETK_DEBUG_LEVEL=1 \
|
||||
-DAPPL_DEBUG_LEVEL=1 \
|
||||
-DMODE_RELEASE \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\""
|
||||
endif
|
||||
|
||||
|
||||
include $(BUILD_SHARED_LIBRARY)
|
||||
|
25
jni/Linux.mk
@@ -5,8 +5,16 @@ include $(CLEAR_VARS)
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
||||
LOCAL_MODULE := ednn
|
||||
LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng libfreetype
|
||||
# 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 := etk ewol tinyxml libzip libpng libfreetype parsersvg agg
|
||||
|
||||
LOCAL_C_INCLUDES := -I$(LOCAL_PATH) $(addprefix -I$(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST))))
|
||||
|
||||
@@ -15,9 +23,18 @@ LOCAL_SRC_FILES := $(FILE_LIST)
|
||||
|
||||
LOCAL_LDLIBS :=
|
||||
|
||||
ifeq ($(DEBUG),1)
|
||||
LOCAL_CFLAGS := -D__PLATFORM__Linux \
|
||||
-DEWOL_USE_FREE_TYPE \
|
||||
-DEDN_DEBUG_LEVEL=3
|
||||
-DETK_DEBUG_LEVEL=3 \
|
||||
-DAPPL_DEBUG_LEVEL=3 \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\""
|
||||
else
|
||||
LOCAL_CFLAGS := -D__PLATFORM__Linux \
|
||||
-DETK_DEBUG_LEVEL=3 \
|
||||
-DAPPL_DEBUG_LEVEL=1 \
|
||||
-DMODE_RELEASE \
|
||||
-DPROJECT_NAME="\"$(LOCAL_MODULE)\""
|
||||
endif
|
||||
|
||||
include $(BUILD_EXECUTABLE)
|
||||
|
||||
|
136
jni/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,7 +79,7 @@ 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;
|
||||
|
||||
@@ -94,13 +94,7 @@ int32_t BufferEmpty::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
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::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>
|
||||
@@ -33,6 +33,9 @@
|
||||
#undef __class__
|
||||
#define __class__ "classBufferManager"
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_BUFFER_MANAGER = "BufferManager";
|
||||
|
||||
class classBufferManager: public ewol::EObject
|
||||
{
|
||||
public:
|
||||
@@ -40,6 +43,39 @@ class classBufferManager: public ewol::EObject
|
||||
classBufferManager(void);
|
||||
~classBufferManager(void);
|
||||
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CheckObjectType(const char * const objectType)
|
||||
{
|
||||
if (NULL == objectType) {
|
||||
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_BUFFER_MANAGER << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_EDN_BUFFER_MANAGER) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::EObject::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_BUFFER_MANAGER << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 TYPE_EOBJECT_EDN_BUFFER_MANAGER;
|
||||
}
|
||||
public:
|
||||
/**
|
||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||
@@ -78,6 +114,7 @@ class classBufferManager: public ewol::EObject
|
||||
Buffer * BufferNotExiste; //!< When an error arrive in get buffer we return the Error buffer (not writable)
|
||||
};
|
||||
|
||||
#define EDN_CAST_BUFFER_MANAGER(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_BUFFER_MANAGER,classBufferManager,curentPointer)
|
||||
|
||||
|
||||
// Constructeur
|
||||
@@ -113,12 +150,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,7 +174,7 @@ 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);
|
||||
@@ -145,7 +182,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
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 +200,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
|
||||
@@ -183,7 +223,7 @@ void classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const ch
|
||||
int32_t newId;
|
||||
sscanf(data.Utf8Data(), "%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 +237,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 +245,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);
|
||||
APPL_DEBUG("Close specific buffer ID="<< closeID);
|
||||
}
|
||||
if(true == Exist(closeID)) {
|
||||
// Get the new display buffer
|
||||
@@ -232,28 +272,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);
|
||||
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 +307,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 +373,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 +399,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 +489,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 +500,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;
|
||||
}
|
||||
}
|
@@ -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,7 +121,7 @@ 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
|
||||
|
||||
@@ -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,7 +150,7 @@ 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");
|
||||
if (NULL != myFile) {
|
||||
@@ -158,7 +158,7 @@ void BufferText::Save(void)
|
||||
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;
|
||||
@@ -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,23 +293,26 @@ 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");
|
||||
@@ -333,15 +336,15 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
m_EdnBuf.HightlightGenerateLines(m_displayLocalSyntax, displayStartBufferPos, m_displaySize.y);
|
||||
|
||||
int64_t stopTime = GetCurrentTime();
|
||||
EDN_DEBUG("Parsing Highlight = " << stopTime - startTime << " milli-s");
|
||||
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);
|
||||
|
||||
|
||||
OOTextNormal.clippingDisable();
|
||||
@@ -367,14 +370,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 +411,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,9 +442,12 @@ 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;
|
||||
@@ -457,9 +464,10 @@ int32_t BufferText::Display(ewol::OObject2DTextColored& OOTextNormal,
|
||||
if (m_cursorPos == iii) {
|
||||
DrawCursor(&OOColored, pixelX - offsetX, y, letterHeight, letterWidth, drawClippingTextArea);
|
||||
}
|
||||
|
||||
// set the maximum size for the display ...
|
||||
SetMaximumSize(maxSize);
|
||||
int64_t stopTime2 = GetCurrentTime();
|
||||
EDN_DEBUG("DRAW text (brut) = " << stopTime2 - stopTime << " milli-s");
|
||||
APPL_DEBUG("DRAW text (brut) = " << stopTime2 - stopTime << " micro-s");
|
||||
|
||||
return ERR_NONE;
|
||||
}
|
||||
@@ -491,11 +499,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 +511,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 +553,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 +577,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 +589,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 +615,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 +632,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 +643,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 +671,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 +695,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 +732,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 +766,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 +794,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 +849,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,7 +907,7 @@ 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;
|
||||
@@ -941,13 +921,13 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
if (0 == nbSelectedLines) {
|
||||
etk::VectorType<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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -983,24 +963,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 {
|
||||
@@ -1015,7 +995,7 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
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 {
|
||||
@@ -1029,27 +1009,27 @@ void BufferText::AddChar(uniChar_t unicodeData)
|
||||
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 << "\"");
|
||||
APPL_INFO("Search data line : \"" << data << "\"");
|
||||
etk::VectorType<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 +1040,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 +1071,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 +1087,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 +1134,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 +1154,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 +1177,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 +1202,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 +1229,7 @@ void BufferText::Undo(void)
|
||||
int32_t newPos = m_EdnBuf.Undo();
|
||||
if (newPos >= 0) {
|
||||
SetInsertPosition(newPos, true);
|
||||
RequestPositionUpdate();
|
||||
RequestUpdateOfThePosition();
|
||||
SetModify(true);
|
||||
}
|
||||
}
|
||||
@@ -1271,7 +1239,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());
|
||||
@@ -149,7 +142,7 @@ 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);
|
||||
@@ -161,7 +154,27 @@ void EdnBuf::GetRange(int32_t start, int32_t end, etk::VectorType<int8_t> &outpu
|
||||
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::VectorType<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::VectorType<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::VectorType<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;
|
||||
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::VectorType<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::VectorType<int8_t> &insertText)
|
||||
{
|
||||
if (end-start == 0) {
|
||||
return 0;
|
||||
}
|
||||
etk::VectorType<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::VectorType<int8_t> deletedText;
|
||||
GetRange(start, end, deletedText);
|
||||
etk::VectorType<int8_t> tmpInsertText;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = insertText.Utf8Data();
|
||||
while (*tmpPointer != '\0') {
|
||||
tmpInsertText.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::VectorType<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();
|
||||
}
|
||||
|
||||
|
||||
@@ -241,8 +303,8 @@ void EdnBuf::Remove(int32_t start, int32_t end)
|
||||
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,17 +313,17 @@ 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);
|
||||
@@ -285,22 +347,22 @@ 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);
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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::VectorType<int8_t> searchVect;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = search.Utf8Data();
|
||||
while (*tmpPointer != '\0') {
|
||||
searchVect.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::VectorType<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::VectorType<int8_t> searchVect;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = search.Utf8Data();
|
||||
while (*tmpPointer != '\0') {
|
||||
searchVect.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::VectorType<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::VectorType<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::VectorType<int8_t> tmpInsertText;
|
||||
if (true == m_isUtf8) {
|
||||
char * tmpPointer = insertText.Utf8Data();
|
||||
while (*tmpPointer != '\0') {
|
||||
tmpInsertText.PushBack(*tmpPointer++);
|
||||
}
|
||||
} else {
|
||||
etk::VectorType<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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -1117,13 +1227,13 @@ void EdnBuf::eventModification(int32_t pos, int32_t nInserted, etk::VectorType<i
|
||||
&& 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,14 +58,6 @@ 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;
|
||||
int32_t posHLPass1;
|
||||
@@ -85,15 +77,18 @@ class EdnBuf {
|
||||
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 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::VectorType<int8_t> &insertText);
|
||||
int32_t Insert( int32_t pos, etk::UString &insertText);
|
||||
int32_t Replace( int32_t start, int32_t end, etk::VectorType<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);
|
||||
@@ -112,33 +107,34 @@ class EdnBuf {
|
||||
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::VectorType<int8_t> &text);
|
||||
void GetSelectionText( etk::UString &text);
|
||||
void RemoveSelected( void);
|
||||
int32_t ReplaceSelected( etk::VectorType<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 :
|
||||
@@ -204,7 +200,8 @@ class EdnBuf {
|
||||
void eventModification( int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText);
|
||||
|
||||
|
||||
int32_t insert( int32_t pos, etk::VectorType<int8_t> &insertText);
|
||||
int32_t LocalInsert( int32_t pos, etk::VectorType<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,14 +34,14 @@
|
||||
|
||||
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)
|
||||
{
|
||||
//EDN_INFO("EdnBufHistory new + data");
|
||||
//APPL_INFO("EdnBufHistory new + data");
|
||||
m_pos = pos;
|
||||
m_nInserted = nInserted;
|
||||
m_deletedText = deletedText;
|
||||
@@ -49,7 +49,7 @@ EdnBufHistory::EdnBufHistory(int32_t pos, int32_t nInserted, etk::VectorType<int
|
||||
|
||||
void EdnBufHistory::Set(int32_t pos, int32_t nInserted, etk::VectorType<int8_t> &deletedText)
|
||||
{
|
||||
//EDN_INFO("EdnBufHistory new + data");
|
||||
//APPL_INFO("EdnBufHistory new + data");
|
||||
m_pos = pos;
|
||||
m_nInserted = nInserted;
|
||||
m_deletedText = deletedText;
|
@@ -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,16 +37,16 @@
|
||||
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;
|
||||
}
|
||||
@@ -59,7 +59,7 @@ int32_t EdnBuf::Undo(void)
|
||||
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,16 +85,16 @@ 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;
|
||||
}
|
||||
@@ -107,7 +107,7 @@ int32_t EdnBuf::Redo(void)
|
||||
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
jni/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::VectorType<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::VectorType<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];
|
||||
}
|
||||
@@ -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() ) {
|
||||
@@ -402,7 +401,7 @@ void EdnVectorBuf::Insert(int32_t pos, etk::VectorType<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
|
||||
@@ -458,11 +457,11 @@ void EdnVectorBuf::Replace(int32_t pos, int32_t nbRemoveElement, etk::VectorType
|
||||
{
|
||||
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]);
|
||||
}
|
||||
}
|
||||
}
|
@@ -26,7 +26,6 @@
|
||||
#ifndef __EDN_VECTOR_BUF_H__
|
||||
#define __EDN_VECTOR_BUF_H__
|
||||
|
||||
#include <toolsMemory.h>
|
||||
#include <etk/VectorType.h>
|
||||
|
||||
#undef __class__
|
||||
@@ -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:
|
@@ -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::color_Black;
|
||||
m_colorBG = etk::color::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::color_Black;
|
||||
m_colorBG = etk::color::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 = etk::color::Parse(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 = etk::color::Parse(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:
|
||||
@@ -50,7 +50,7 @@ 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
|
@@ -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>
|
||||
@@ -32,6 +32,8 @@
|
||||
#define PFX "ColorizeManager "
|
||||
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_COLORIZE_MANAGER = "ColorizeManager";
|
||||
|
||||
class classColorManager: public ewol::EObject
|
||||
{
|
||||
@@ -39,7 +41,39 @@ class classColorManager: public ewol::EObject
|
||||
// Constructeur
|
||||
classColorManager(void);
|
||||
~classColorManager(void);
|
||||
public:
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CheckObjectType(const char * const objectType)
|
||||
{
|
||||
if (NULL == objectType) {
|
||||
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_COLORIZE_MANAGER << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_EDN_COLORIZE_MANAGER) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::EObject::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_COLORIZE_MANAGER << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 TYPE_EOBJECT_EDN_COLORIZE_MANAGER;
|
||||
}
|
||||
/**
|
||||
* @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
|
||||
@@ -65,6 +99,8 @@ class classColorManager: public ewol::EObject
|
||||
color_ts basicColors[COLOR_NUMBER_MAX];
|
||||
};
|
||||
|
||||
#define EDN_CAST_COLORIZE_MANAGER(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_COLORIZE_MANAGER,classColorManager,curentPointer)
|
||||
|
||||
|
||||
classColorManager::classColorManager(void)
|
||||
{
|
||||
@@ -92,7 +128,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
|
||||
@@ -127,32 +163,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 +201,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 +220,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 +246,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] = etk::color::Parse(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 +275,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 +305,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 +319,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 +333,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;
|
||||
}
|
||||
@@ -361,10 +376,10 @@ bool classColorManager::Exist(etk::UString &colorName)
|
||||
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);
|
||||
}
|
||||
}
|
@@ -27,7 +27,7 @@
|
||||
#define __COLORIZE_MANAGER_H__
|
||||
|
||||
#include <Colorize.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/Widget.h>
|
||||
|
||||
typedef enum {
|
@@ -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 ";
|
78
jni/appl/Debug.h
Normal file
@@ -0,0 +1,78 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Debug.h
|
||||
* @brief Application log implementation
|
||||
* @author Edouard DUPIN
|
||||
* @date 10/04/2012
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __DEBUG_H__
|
||||
#define __DEBUG_H__
|
||||
|
||||
#include <etk/Types.h>
|
||||
#include <etk/Debug.h>
|
||||
|
||||
extern const char * applLog;
|
||||
|
||||
#define APPL_CRITICAL(data) ETK_CRITICAL(applLog, data)
|
||||
// General
|
||||
#if APPL_DEBUG_LEVEL > 0
|
||||
# define APPL_WARNING(data) ETK_WARNING(applLog, data)
|
||||
# define APPL_ERROR(data) ETK_ERROR(applLog, data)
|
||||
#else
|
||||
# define APPL_WARNING(data) do {}while(0)
|
||||
# define APPL_ERROR(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#if APPL_DEBUG_LEVEL > 1
|
||||
# define APPL_INFO(data) ETK_INFO(applLog, data)
|
||||
#else
|
||||
# define APPL_INFO(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#if APPL_DEBUG_LEVEL > 2
|
||||
# define APPL_DEBUG(data) ETK_DEBUG(applLog, data)
|
||||
#else
|
||||
# define APPL_DEBUG(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#if APPL_DEBUG_LEVEL > 3
|
||||
# define APPL_VERBOSE(data) ETK_VERBOSE(applLog, data)
|
||||
#else
|
||||
# define APPL_VERBOSE(data) do {}while(0)
|
||||
#endif
|
||||
|
||||
#define APPL_TODO(data) ETK_WARNING(applLog, "TODO : " << data)
|
||||
|
||||
#define APPL_ASSERT(cond, data) ETK_ASSERT(applLog, cond, data)
|
||||
|
||||
#if APPL_DEBUG_LEVEL > 1
|
||||
# define APPL_CHECK_INOUT(cond) ETK_CHECK_INOUT_ASSERT(applLog, cond)
|
||||
#elif APPL_DEBUG_LEVEL > 0
|
||||
# define APPL_CHECK_INOUT(cond) ETK_CHECK_INOUT_WARNING(applLog, cond)
|
||||
#else
|
||||
# define APPL_CHECK_INOUT(cond) do { } while (0)
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#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,9 @@
|
||||
#undef __class__
|
||||
#define __class__ "BufferView"
|
||||
|
||||
|
||||
extern const char * const TYPE_EOBJECT_EDN_BUFFER_VIEW = "BufferView";
|
||||
|
||||
BufferView::BufferView(void)
|
||||
{
|
||||
SetCanHaveFocus(true);
|
||||
@@ -42,6 +44,7 @@ BufferView::BufferView(void)
|
||||
RegisterMultiCast(ednMsgBufferState);
|
||||
RegisterMultiCast(ednMsgBufferId);
|
||||
m_selectedID = -1;
|
||||
m_selectedIdRequested = -1;
|
||||
}
|
||||
|
||||
BufferView::~BufferView(void)
|
||||
@@ -49,6 +52,39 @@ BufferView::~BufferView(void)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool BufferView::CheckObjectType(const char * const objectType)
|
||||
{
|
||||
if (NULL == objectType) {
|
||||
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_BUFFER_VIEW << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_EDN_BUFFER_VIEW) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::List::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
EWOL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_BUFFER_VIEW << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 BufferView::GetObjectType(void)
|
||||
{
|
||||
return TYPE_EOBJECT_EDN_BUFFER_VIEW;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||
@@ -63,6 +99,7 @@ void BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eve
|
||||
if (eventId == ednMsgBufferListChange) {
|
||||
MarkToReedraw();
|
||||
}else if (eventId == ednMsgBufferId) {
|
||||
m_selectedIdRequested = BufferManager::GetSelected();
|
||||
MarkToReedraw();
|
||||
}else if (eventId == ednMsgBufferState) {
|
||||
MarkToReedraw();
|
||||
@@ -97,21 +134,29 @@ bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToW
|
||||
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 +169,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,10 +186,10 @@ 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;
|
@@ -25,14 +25,14 @@
|
||||
#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>
|
||||
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_BUFFER_VIEW;
|
||||
|
||||
class BufferView : public ewol::List
|
||||
{
|
||||
@@ -40,6 +40,20 @@ class BufferView : public ewol::List
|
||||
// Constructeur
|
||||
BufferView(void);
|
||||
~BufferView(void);
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CheckObjectType(const char * const objectType);
|
||||
/**
|
||||
* @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);
|
||||
/**
|
||||
* @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
|
||||
@@ -55,11 +69,13 @@ class BufferView : public ewol::List
|
||||
virtual bool GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &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 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;
|
||||
};
|
||||
|
||||
#define EDN_CAST_BUFFER_VIEW(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_BUFFER_VIEW,BufferView,curentPointer)
|
||||
|
||||
#endif
|
||||
|
@@ -26,13 +26,12 @@
|
||||
|
||||
#include <CodeView.h>
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <Display.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <CodeView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <ClipBoard.h>
|
||||
#include <ewol/ClipBoard.h>
|
||||
#include <SearchData.h>
|
||||
|
||||
#include <ewol/WidgetManager.h>
|
||||
@@ -40,9 +39,11 @@
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "ewol::CodeView"
|
||||
#define __class__ "CodeView"
|
||||
|
||||
|
||||
extern const char * const TYPE_EOBJECT_EDN_CODE_VIEW = "CodeView";
|
||||
|
||||
CodeView::CodeView(void)
|
||||
{
|
||||
m_label = "CodeView is disable ...";
|
||||
@@ -55,17 +56,24 @@ CodeView::CodeView(void)
|
||||
m_bufferID = -1;
|
||||
m_buttunOneSelected = false;
|
||||
|
||||
m_textColorFg.red = 0.0;
|
||||
m_textColorFg.green = 0.0;
|
||||
m_textColorFg.blue = 0.0;
|
||||
m_textColorFg.alpha = 1.0;
|
||||
m_lineNumberList.Clear();
|
||||
|
||||
m_textColorBg.red = 0.0;
|
||||
m_textColorBg.green = 0.0;
|
||||
m_textColorBg.blue = 0.0;
|
||||
m_textColorFg = etk::color::color_Black;
|
||||
|
||||
m_textColorBg = etk::color::color_Black;
|
||||
m_textColorBg.alpha = 0.25;
|
||||
SetCanHaveFocus(true);
|
||||
RegisterMultiCast(ednMsgBufferId);
|
||||
RegisterMultiCast(ednMsgGuiCopy);
|
||||
RegisterMultiCast(ednMsgGuiPaste);
|
||||
RegisterMultiCast(ednMsgGuiCut);
|
||||
RegisterMultiCast(ednMsgGuiRedo);
|
||||
RegisterMultiCast(ednMsgGuiUndo);
|
||||
RegisterMultiCast(ednMsgGuiRm);
|
||||
RegisterMultiCast(ednMsgGuiSelect);
|
||||
RegisterMultiCast(ednMsgGuiChangeCharset);
|
||||
RegisterMultiCast(ednMsgGuiFind);
|
||||
RegisterMultiCast(ednMsgGuiReplace);
|
||||
}
|
||||
|
||||
CodeView::~CodeView(void)
|
||||
@@ -73,6 +81,62 @@ 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CodeView::CheckObjectType(const char * const objectType)
|
||||
{
|
||||
if (NULL == objectType) {
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_CODE_VIEW << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_EDN_CODE_VIEW) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::WidgetScrooled::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_CODE_VIEW << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 CodeView::GetObjectType(void)
|
||||
{
|
||||
return TYPE_EOBJECT_EDN_CODE_VIEW;
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::CalculateMinSize(void)
|
||||
{
|
||||
m_minSize.x = 50;
|
||||
@@ -95,6 +159,7 @@ void CodeView::OnDraw(void)
|
||||
m_OObjectTextBold[ m_currentDrawId].Draw();
|
||||
m_OObjectTextItalic[ m_currentDrawId].Draw();
|
||||
m_OObjectTextBoldItalic[m_currentDrawId].Draw();
|
||||
WidgetScrooled::OnDraw();
|
||||
}
|
||||
|
||||
void CodeView::OnRegenerateDisplay(void)
|
||||
@@ -118,6 +183,13 @@ void CodeView::OnRegenerateDisplay(void)
|
||||
m_OObjectsColored[ m_currentCreateId].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[m_currentCreateId].GetFontID(), centerRequested);
|
||||
SetScrollingPositionDynamic(borderWidth, currentPosition, centerRequested);
|
||||
} // else : nothing to do ...
|
||||
|
||||
// generate the objects :
|
||||
BufferManager::Get(m_bufferID)->Display(m_OObjectTextNormal[m_currentCreateId],
|
||||
m_OObjectTextBold[m_currentCreateId],
|
||||
@@ -125,9 +197,11 @@ void CodeView::OnRegenerateDisplay(void)
|
||||
m_OObjectTextBoldItalic[m_currentCreateId],
|
||||
m_OObjectsColored[m_currentCreateId],
|
||||
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 = GetCurrentTime();
|
||||
EDN_DEBUG("Display Code Generation = " << stopTime - startTime << " milli-s");
|
||||
APPL_DEBUG("Display Code Generation = " << stopTime - startTime << " micro-s");
|
||||
|
||||
// call the herited class...
|
||||
WidgetScrooled::OnRegenerateDisplay();
|
||||
@@ -138,7 +212,7 @@ void CodeView::OnRegenerateDisplay(void)
|
||||
|
||||
bool CodeView::OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData)
|
||||
{
|
||||
//EDN_DEBUG("KB EVENT : \"" << UTF8_data << "\" size=" << strlen(UTF8_data) << "type=" << (int32_t)typeEvent);
|
||||
//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);
|
||||
MarkToReedraw();
|
||||
@@ -159,21 +233,22 @@ bool CodeView::OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveTy
|
||||
|
||||
/**
|
||||
* @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(int32_t IdInput, ewol::eventInputType_te typeEvent, coord2D_ts pos)
|
||||
bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D<float> pos)
|
||||
{
|
||||
coord2D_ts relativePos = RelativePosition(pos);
|
||||
Vector2D<float> relativePos = RelativePosition(pos);
|
||||
if (m_bufferID < 0) {
|
||||
return false;
|
||||
}
|
||||
if (true == WidgetScrooled::OnEventInput(IdInput, typeEvent, pos)) {
|
||||
if (true == WidgetScrooled::OnEventInput(type, IdInput, typeEvent, pos)) {
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
// nothing to do ... done on upper widet ...
|
||||
// nothing to do ... done on upper widget ...
|
||||
return true;
|
||||
}
|
||||
if (1 == IdInput) {
|
||||
@@ -185,7 +260,7 @@ bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent,
|
||||
MarkToReedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_UP == typeEvent) {
|
||||
m_buttunOneSelected = false;
|
||||
BufferManager::Get(m_bufferID)->Copy(COPY_MIDDLE_BUTTON);
|
||||
BufferManager::Get(m_bufferID)->Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
MarkToReedraw();
|
||||
} else
|
||||
#endif
|
||||
@@ -214,15 +289,15 @@ bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent,
|
||||
if (yyy<0) {
|
||||
yyy = 0;
|
||||
}
|
||||
//EDN_INFO("mouse-motion BT1 %d, %d", xxx, yyy);
|
||||
BufferManager::Get(m_bufferID)->MouseSelectFromCursorTo(m_fontNormal, xxx, yyy);
|
||||
//APPL_INFO("mouse-motion BT1 %d, %d", xxx, yyy);
|
||||
BufferManager::Get(m_bufferID)->MouseSelectFromCursorTo(m_fontNormal, xxx+m_originScrooled.x, yyy+m_originScrooled.y);
|
||||
MarkToReedraw();
|
||||
}
|
||||
}
|
||||
} 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(COPY_MIDDLE_BUTTON);
|
||||
BufferManager::Get(m_bufferID)->Paste(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
MarkToReedraw();
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
}
|
||||
@@ -242,162 +317,96 @@ bool CodeView::OnEventInput(int32_t IdInput, ewol::eventInputType_te typeEvent,
|
||||
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
||||
EDN_DEBUG("Extern Event : " << CallerObject << " type : " << eventId << " data=\"" << 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.Utf8Data(), "%d", &bufferID);
|
||||
EDN_INFO("Select a new Buffer ... " << bufferID);
|
||||
APPL_INFO("Select a new Buffer ... " << bufferID);
|
||||
// set the new buffer ID
|
||||
m_bufferID = bufferID;
|
||||
// TODO : need to update the state of the file and the filenames ...
|
||||
// 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") {
|
||||
|
||||
}
|
||||
}
|
||||
// old
|
||||
/*
|
||||
else if( ednMsgCodeViewCurrentChangeBufferId == generateEventId) {
|
||||
int32_t bufferID = 0;
|
||||
sscanf(data, "%d", &bufferID);
|
||||
EDN_INFO("Select a new Buffer ... " << bufferID);
|
||||
m_bufferID = bufferID;
|
||||
BufferManager::Get(m_bufferID)->ForceReDraw(true);
|
||||
// request the display of the curent Editor
|
||||
ewol::widgetMessageMultiCast::Send(GetWidgetId(), ednMsgBufferChangeCurrent, (char*)data);
|
||||
|
||||
}
|
||||
*/
|
||||
/*
|
||||
else if (ednMsgCodeViewCurrentSave == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentSaveAs == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentSelectAll == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentRemoveLine == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentUnSelect == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentCopy == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentCut == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentPaste == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentFindPrevious == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentFindNext == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentFindOldNext == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentReplace == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentReplaceAll == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentClose == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentUndo == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentRedo == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentGotoLine == generateEventId) {
|
||||
|
||||
} else if (ednMsgCodeViewCurrentSetCharset == generateEventId) {
|
||||
|
||||
}
|
||||
*/
|
||||
else {
|
||||
|
||||
}
|
||||
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
case EDN_MSG__CURRENT_CHANGE_BUFFER_ID:
|
||||
EDN_INFO("Select a new Buffer ... " << dataID);
|
||||
m_bufferID = dataID;
|
||||
BufferManager::Get(m_bufferID)->ForceReDraw(true);
|
||||
// request the display of the curent Editor
|
||||
SendMessage(EDN_MSG__BUFFER_CHANGE_CURRENT, m_bufferID);
|
||||
break;
|
||||
case EDN_MSG__CURRENT_SAVE:
|
||||
SendMessage(EDN_MSG__BUFF_ID_SAVE, m_bufferID);
|
||||
break;
|
||||
case EDN_MSG__CURRENT_SAVE_AS:
|
||||
SendMessage(EDN_MSG__GUI_SHOW_SAVE_AS, m_bufferID);
|
||||
break;
|
||||
case EDN_MSG__CURRENT_REMOVE_LINE:
|
||||
BufferManager::Get(m_bufferID)->RemoveLine();
|
||||
break;
|
||||
case EDN_MSG__CURRENT_SELECT_ALL:
|
||||
BufferManager::Get(m_bufferID)->SelectAll();
|
||||
break;
|
||||
case EDN_MSG__CURRENT_UN_SELECT:
|
||||
BufferManager::Get(m_bufferID)->SelectNone();
|
||||
break;
|
||||
case EDN_MSG__CURRENT_COPY:
|
||||
if (dataID == -1) {
|
||||
dataID = COPY_STD;
|
||||
}
|
||||
BufferManager::Get(m_bufferID)->Copy(dataID);
|
||||
break;
|
||||
case EDN_MSG__CURRENT_CUT:
|
||||
if (dataID == -1) {
|
||||
dataID = COPY_STD;
|
||||
}
|
||||
BufferManager::Get(m_bufferID)->Cut(dataID);
|
||||
break;
|
||||
case EDN_MSG__CURRENT_PASTE:
|
||||
if (dataID == -1) {
|
||||
dataID = COPY_STD;
|
||||
}
|
||||
BufferManager::Get(m_bufferID)->Paste(dataID);
|
||||
break;
|
||||
case EDN_MSG__CURRENT_FIND_PREVIOUS:
|
||||
{
|
||||
etk::UString myDataString;
|
||||
SearchData::GetSearch(myDataString);
|
||||
BufferManager::Get(m_bufferID)->Search(myDataString, true, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
}
|
||||
break;
|
||||
case EDN_MSG__CURRENT_FIND_NEXT:
|
||||
{
|
||||
etk::UString myDataString;
|
||||
SearchData::GetSearch(myDataString);
|
||||
BufferManager::Get(m_bufferID)->Search(myDataString, false, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
}
|
||||
break;
|
||||
case EDN_MSG__CURRENT_REPLACE:
|
||||
{
|
||||
etk::UString myDataString;
|
||||
SearchData::GetReplace(myDataString);
|
||||
BufferManager::Get(m_bufferID)->Replace(myDataString);
|
||||
}
|
||||
break;
|
||||
case EDN_MSG__CURRENT_REPLACE_ALL:
|
||||
break;
|
||||
case EDN_MSG__CURRENT_CLOSE:
|
||||
SendMessage(EDN_MSG__BUFF_ID_CLOSE, m_bufferID);
|
||||
break;
|
||||
case EDN_MSG__CURRENT_UNDO:
|
||||
BufferManager::Get(m_bufferID)->Undo();
|
||||
break;
|
||||
case EDN_MSG__CURRENT_REDO:
|
||||
BufferManager::Get(m_bufferID)->Redo();
|
||||
break;
|
||||
case EDN_MSG__CURRENT_GOTO_LINE:
|
||||
case APPL_MSG__CURRENT_GOTO_LINE:
|
||||
if (dataID<0) {
|
||||
dataID = 0;
|
||||
}
|
||||
BufferManager::Get(m_bufferID)->JumpAtLine(dataID);
|
||||
break;
|
||||
case EDN_MSG__REFRESH_DISPLAY:
|
||||
break;
|
||||
case EDN_MSG__CURRENT_SET_CHARSET:
|
||||
case APPL_MSG__CURRENT_SET_CHARSET:
|
||||
BufferManager::Get(m_bufferID)->SetCharset((unicode::charset_te)dataID);
|
||||
break;
|
||||
case EDN_MSG__USER_DISPLAY_CHANGE:
|
||||
// Redraw all the display ... Done under ...
|
||||
break;
|
||||
}
|
||||
*/
|
||||
// Force redraw of the widget
|
||||
@@ -411,19 +420,20 @@ void CodeView::OnGetFocus(void)
|
||||
ewol::widgetMessageMultiCast::Send(GetWidgetId(), ednMsgBufferId, m_bufferID);
|
||||
*/
|
||||
ewol::KeyboardShow(ewol::KEYBOARD_MODE_CODE);
|
||||
EDN_INFO("Focus - In");
|
||||
APPL_INFO("Focus - In");
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnLostFocus(void)
|
||||
{
|
||||
ewol::KeyboardHide();
|
||||
EDN_INFO("Focus - out");
|
||||
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)
|
@@ -26,20 +26,36 @@
|
||||
#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>
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_CODE_VIEW;
|
||||
|
||||
class CodeView :public ewol::WidgetScrooled
|
||||
{
|
||||
public:
|
||||
CodeView(void);
|
||||
virtual ~CodeView(void);
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CheckObjectType(const char * const objectType);
|
||||
/**
|
||||
* @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);
|
||||
virtual bool CalculateMinSize(void);
|
||||
private:
|
||||
etk::UString m_label;
|
||||
@@ -47,6 +63,8 @@ class CodeView :public ewol::WidgetScrooled
|
||||
color_ts m_textColorBg; //!< Background color
|
||||
int32_t m_bufferID;
|
||||
bool m_buttunOneSelected;
|
||||
etk::VectorType<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];
|
||||
@@ -67,15 +85,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:
|
||||
@@ -96,5 +116,7 @@ class CodeView :public ewol::WidgetScrooled
|
||||
virtual void OnDraw(void);
|
||||
};
|
||||
|
||||
#define EDN_CAST_CODE_VIEW(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_CODE_VIEW,CodeView,curentPointer)
|
||||
|
||||
#endif
|
||||
|
@@ -23,12 +23,12 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <tools_globals.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <MainWindows.h>
|
||||
#include <CodeView.h>
|
||||
#include <ClipBoard.h>
|
||||
#include <BufferView.h>
|
||||
#include <Search.h>
|
||||
|
||||
#include <ewol/widget/Button.h>
|
||||
#include <ewol/widget/CheckBox.h>
|
||||
@@ -48,10 +48,13 @@
|
||||
#undef __class__
|
||||
#define __class__ "MainWindows"
|
||||
|
||||
extern const char * const TYPE_EOBJECT_EDN_MAIN_WINDOWS = __class__;
|
||||
|
||||
MainWindows::MainWindows(void)
|
||||
{
|
||||
EDN_DEBUG("CREATE WINDOWS ... ");
|
||||
APPL_DEBUG("CREATE WINDOWS ... ");
|
||||
ewol::SizerVert * mySizerVert = NULL;
|
||||
ewol::SizerVert * mySizerVert2 = NULL;
|
||||
ewol::SizerHori * mySizerHori = NULL;
|
||||
//ewol::Button * myButton = NULL;
|
||||
CodeView * myCodeView = NULL;
|
||||
@@ -67,31 +70,30 @@ MainWindows::MainWindows(void)
|
||||
myMenu = new ewol::Menu();
|
||||
mySizerHori->SubWidgetAdd(myMenu);
|
||||
int32_t idMenuFile = myMenu->AddTitle("File");
|
||||
(void)myMenu->Add(idMenuFile, "New", "", ednMsgGuiNew);
|
||||
(void)myMenu->Add(idMenuFile, "New", "", ednMsgGuiNew);
|
||||
(void)myMenu->AddSpacer();
|
||||
(void)myMenu->Add(idMenuFile, "Open", "", ednMsgGuiOpen);
|
||||
(void)myMenu->Add(idMenuFile, "Close", "", ednMsgGuiClose, "current");
|
||||
(void)myMenu->Add(idMenuFile, "Close (all)", "", ednMsgGuiClose, "All");
|
||||
(void)myMenu->Add(idMenuFile, "Save", "", ednMsgGuiSave, "current");
|
||||
(void)myMenu->Add(idMenuFile, "Save As ...", "", ednMsgGuiSaveAs);
|
||||
(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);
|
||||
int32_t idMenuEdit = myMenu->AddTitle("Edit");
|
||||
(void)myMenu->Add(idMenuEdit, "Undo", "", ednMsgGuiUndo);
|
||||
(void)myMenu->Add(idMenuEdit, "Redo", "", ednMsgGuiRedo);
|
||||
(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, "Redo", "", ednMsgGuiRedo);
|
||||
(void)myMenu->Add(idMenuEdit, "Remove","", ednMsgGuiRm);
|
||||
(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", "", ednMsgGuiSearch);
|
||||
(void)myMenu->Add(idMenuSearch, "Replace", "", ednMsgGuiReplace);
|
||||
(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");
|
||||
@@ -102,6 +104,13 @@ MainWindows::MainWindows(void)
|
||||
(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");
|
||||
(void)myMenu->AddTitle("?", "", ednMsgGuiAbout);
|
||||
|
||||
m_widgetLabelFileName = new ewol::Label("FileName");
|
||||
@@ -117,25 +126,25 @@ MainWindows::MainWindows(void)
|
||||
myBufferView->SetFillX(true);
|
||||
myBufferView->SetFillY(true);
|
||||
mySizerHori->SubWidgetAdd(myBufferView);
|
||||
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");
|
||||
/*
|
||||
myCodeView->SetFontSize(11);
|
||||
myCodeView->SetFontNameNormal( "ubuntu/UbuntuMono-R.ttf");
|
||||
myCodeView->SetFontNameBold( "ubuntu/UbuntuMono-B.ttf");
|
||||
myCodeView->SetFontNameItalic( "ubuntu/UbuntuMono-RI.ttf");
|
||||
myCodeView->SetFontNameBoldItalic("ubuntu/UbuntuMono-BI.ttf");
|
||||
*/
|
||||
mySizerHori->SubWidgetAdd(myCodeView);
|
||||
mySizerVert2 = new ewol::SizerVert();
|
||||
mySizerHori->SubWidgetAdd(mySizerVert2);
|
||||
// search area :
|
||||
Search * mySearch = new Search();
|
||||
mySizerVert2->SubWidgetAdd(mySearch);
|
||||
|
||||
// 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);
|
||||
|
||||
// Generic event ...
|
||||
RegisterMultiCast(ednMsgGuiSaveAs);
|
||||
@@ -152,6 +161,41 @@ MainWindows::~MainWindows(void)
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool MainWindows::CheckObjectType(const char * const objectType)
|
||||
{
|
||||
if (NULL == objectType) {
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_MAIN_WINDOWS << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_EDN_MAIN_WINDOWS) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::Windows::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_MAIN_WINDOWS << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 MainWindows::GetObjectType(void)
|
||||
{
|
||||
return TYPE_EOBJECT_EDN_MAIN_WINDOWS;
|
||||
}
|
||||
|
||||
|
||||
const char *const ednEventPopUpFileSelected = "edn-mainWindows-openSelected";
|
||||
const char *const ednEventPopUpFileSaveAs = "edn-mainWindows-saveAsSelected";
|
||||
|
||||
@@ -166,30 +210,36 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
{
|
||||
ewol::Windows::OnReceiveMessage(CallerObject, eventId, data);
|
||||
|
||||
EDN_INFO("Receive Event from the main windows ... : widgetid=" << CallerObject << "\"" << eventId << "\" ==> data=\"" << 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");
|
||||
// TODO : Set the good folder ...
|
||||
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 widget:
|
||||
ewol::FileChooser * tmpWidget = static_cast<ewol::FileChooser*>(CallerObject);
|
||||
ewol::FileChooser * tmpWidget = EWOL_CAST_WIDGET_FILE_CHOOSER(CallerObject);
|
||||
if (NULL == tmpWidget) {
|
||||
EDN_ERROR("impossible to get pop_upWidget " << CallerObject);
|
||||
APPL_ERROR("impossible to get pop_upWidget " << CallerObject);
|
||||
return;
|
||||
}
|
||||
// get the filename :
|
||||
etk::UString tmpData = tmpWidget->GetCompleateFileName();
|
||||
EDN_DEBUG("Request opening the file : " << tmpData);
|
||||
APPL_DEBUG("Request opening the file : " << tmpData);
|
||||
SendMultiCast(ednMsgOpenFile, tmpData);
|
||||
} else if (eventId == ednMsgGuiSaveAs) {
|
||||
if (data == "") {
|
||||
EDN_ERROR("Null data for Save As file ... ");
|
||||
APPL_ERROR("Null data for Save As file ... ");
|
||||
} else {
|
||||
m_currentSavingAsIdBuffer = -1;
|
||||
if (data == "current") {
|
||||
@@ -199,7 +249,7 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
}
|
||||
|
||||
if (false == BufferManager::Exist(m_currentSavingAsIdBuffer)) {
|
||||
EDN_ERROR("Request saveAs on non existant Buffer ID=" << 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();
|
||||
@@ -220,14 +270,14 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
}
|
||||
} else if (eventId == ednEventPopUpFileSaveAs) {
|
||||
// get widget:
|
||||
ewol::FileChooser * tmpWidget = static_cast<ewol::FileChooser*>(CallerObject);
|
||||
ewol::FileChooser * tmpWidget = EWOL_CAST_WIDGET_FILE_CHOOSER(CallerObject);
|
||||
if (NULL == tmpWidget) {
|
||||
EDN_ERROR("impossible to get pop_upWidget " << CallerObject);
|
||||
APPL_ERROR("impossible to get pop_upWidget " << CallerObject);
|
||||
return;
|
||||
}
|
||||
// get the filename :
|
||||
etk::UString tmpData = tmpWidget->GetCompleateFileName();
|
||||
EDN_DEBUG("Request Saving As file : " << tmpData);
|
||||
APPL_DEBUG("Request Saving As file : " << tmpData);
|
||||
|
||||
BufferManager::Get(m_currentSavingAsIdBuffer)->SetFileName(tmpData);
|
||||
SendMultiCast(ednMsgGuiSave, m_currentSavingAsIdBuffer);
|
||||
@@ -246,7 +296,13 @@ void MainWindows::OnReceiveMessage(ewol::EObject * CallerObject, const char * ev
|
||||
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 ....
|
@@ -22,19 +22,19 @@
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#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>
|
||||
|
||||
extern const char * const TYPE_EOBJECT_EDN_MAIN_WINDOWS;
|
||||
|
||||
#ifndef __MAIN_WINDOWS_H__
|
||||
#define __MAIN_WINDOWS_H__
|
||||
class MainWindows : public ewol::Windows
|
||||
{
|
||||
private:
|
||||
@@ -44,6 +44,20 @@ class MainWindows : public ewol::Windows
|
||||
// Constructeur
|
||||
MainWindows(void);
|
||||
~MainWindows(void);
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CheckObjectType(const char * const objectType);
|
||||
/**
|
||||
* @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);
|
||||
/**
|
||||
* @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,6 +67,9 @@ class MainWindows : public ewol::Windows
|
||||
*/
|
||||
virtual void OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data);
|
||||
};
|
||||
|
||||
#define EDN_CAST_MAIN_WINDOWS(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_MAIN_WINDOWS,MainWindows,curentPointer)
|
||||
|
||||
#endif
|
||||
|
||||
|
225
jni/appl/Gui/Search.cpp
Normal file
@@ -0,0 +1,225 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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/Button.h>
|
||||
#include <ewol/widget/ButtonImage.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/WidgetManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "Search"
|
||||
|
||||
extern const char * const TYPE_EOBJECT_APPL_SEARCH = __class__;
|
||||
|
||||
|
||||
const char* const l_eventSearchEntry = "appl-search-entry";
|
||||
const char* const l_eventReplaceEntry = "appl-replace-entry";
|
||||
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_forward = false;
|
||||
|
||||
ewol::Entry * myEntry = NULL;
|
||||
ewol::ButtonImage * myButtonImage = NULL;
|
||||
|
||||
myEntry = new ewol::Entry();
|
||||
myEntry->RegisterOnEvent(this, ewolEventEntryModify, l_eventSearchEntry);
|
||||
myEntry->SetExpendX(true);
|
||||
myEntry->SetFillX(true);
|
||||
SubWidgetAdd(myEntry);
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/Search.svg");
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventSearchBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
|
||||
myEntry = new ewol::Entry();
|
||||
myEntry->RegisterOnEvent(this, ewolEventEntryModify, l_eventReplaceEntry);
|
||||
myEntry->SetExpendX(true);
|
||||
myEntry->SetFillX(true);
|
||||
SubWidgetAdd(myEntry);
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/Replace.svg");
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventReplaceBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/CaseSensitive.svg");
|
||||
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");
|
||||
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");
|
||||
myButtonImage->SetImageSelected("icon/Down.svg");
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->SetToggleMode(true);
|
||||
myButtonImage->SetValue(m_forward);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventForwardCb);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
|
||||
myButtonImage = new ewol::ButtonImage("icon/Forbidden.svg");
|
||||
myButtonImage->SetMinSize(32,32);
|
||||
myButtonImage->RegisterOnEvent(this, ewolEventButtonPressed, l_eventHideBt);
|
||||
SubWidgetAdd(myButtonImage);
|
||||
|
||||
RegisterMultiCast(ednMsgGuiSearch);
|
||||
// basicly hiden ...
|
||||
Hide();
|
||||
}
|
||||
|
||||
Search::~Search(void)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool Search::CheckObjectType(const char * const objectType)
|
||||
{
|
||||
if (NULL == objectType) {
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_APPL_SEARCH << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_APPL_SEARCH) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::SizerHori::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_APPL_SEARCH << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 Search::GetObjectType(void)
|
||||
{
|
||||
return TYPE_EOBJECT_APPL_SEARCH;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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_eventReplaceEntry) {
|
||||
SearchData::SetReplace(data);
|
||||
} 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();
|
||||
} else {
|
||||
Hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
70
jni/appl/Gui/Search.h
Normal file
@@ -0,0 +1,70 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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>
|
||||
|
||||
extern const char * const TYPE_EOBJECT_APPL_SEARCH;
|
||||
|
||||
class Search : public ewol::SizerHori
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
Search(void);
|
||||
~Search(void);
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CheckObjectType(const char * const objectType);
|
||||
/**
|
||||
* @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);
|
||||
/**
|
||||
* @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);
|
||||
private:
|
||||
bool m_forward;
|
||||
};
|
||||
|
||||
#define EDN_CAST_APPL_SEARCH(curentPointer) EWOL_CAST(TYPE_EOBJECT_APPL_SEARCH,Search,curentPointer)
|
||||
|
||||
#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>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
@@ -243,26 +243,26 @@ void Highlight::Parse(int32_t start,
|
||||
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:
|
||||
@@ -303,21 +303,21 @@ void Highlight::Parse2(int32_t start,
|
||||
etk::VectorType<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>
|
@@ -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>
|
||||
@@ -33,6 +33,9 @@
|
||||
#define __class__ "HighlightManager"
|
||||
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER = "HighlightManager";
|
||||
|
||||
class localClassHighlightManager: public ewol::EObject
|
||||
{
|
||||
private:
|
||||
@@ -54,6 +57,41 @@ class localClassHighlightManager: public ewol::EObject
|
||||
// clear the compleate list
|
||||
listHighlight.Clear();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Check if the object has the specific type.
|
||||
* @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 of the object we want to check
|
||||
* @return true if the object is compatible, otherwise false
|
||||
*/
|
||||
bool CheckObjectType(const char * const objectType)
|
||||
{
|
||||
if (NULL == objectType) {
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER << "\" != NULL(pointer) ");
|
||||
return false;
|
||||
}
|
||||
if (objectType == TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER) {
|
||||
return true;
|
||||
} else {
|
||||
if(true == ewol::EObject::CheckObjectType(objectType)) {
|
||||
return true;
|
||||
}
|
||||
APPL_ERROR("check error : \"" << TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER << "\" != \"" << objectType << "\"");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 TYPE_EOBJECT_EDN_HIGHLIGHT_MANAGER;
|
||||
}
|
||||
|
||||
/**
|
||||
* @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 +104,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 +174,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,20 +196,20 @@ 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);
|
@@ -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;
|
||||
}
|
@@ -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);
|
||||
*/
|
||||
}
|
||||
|
||||
@@ -349,11 +348,11 @@ void CTagsManager::JumpTo(void)
|
||||
// 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);
|
@@ -23,9 +23,9 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <tools_globals.h>
|
||||
#include <appl/global.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
#undef __class__
|
||||
@@ -53,7 +53,7 @@ bool globals::IsSetDisplayEndOfLine(void)
|
||||
|
||||
void globals::SetDisplayEndOfLine(bool newVal)
|
||||
{
|
||||
EDN_INFO("Set EndOfLine " << newVal);
|
||||
APPL_INFO("Set EndOfLine " << newVal);
|
||||
displayEOL = newVal;
|
||||
//ewol::widgetMessageMultiCast::Send(-1, ednMsgUserDisplayChange);
|
||||
}
|
||||
@@ -67,7 +67,7 @@ bool globals::IsSetDisplaySpaceChar(void)
|
||||
|
||||
void globals::SetDisplaySpaceChar(bool newVal)
|
||||
{
|
||||
EDN_INFO("Set SpaceChar " << newVal);
|
||||
APPL_INFO("Set SpaceChar " << newVal);
|
||||
displaySpaceChar = newVal;
|
||||
//ewol::widgetMessageMultiCast::Send(-1, ednMsgUserDisplayChange);
|
||||
}
|
||||
@@ -82,7 +82,7 @@ bool globals::IsSetAutoIndent(void)
|
||||
|
||||
void globals::SetAutoIndent(bool newVal)
|
||||
{
|
||||
EDN_INFO("Set AutoIndent " << newVal);
|
||||
APPL_INFO("Set AutoIndent " << newVal);
|
||||
AutoIndent = newVal;
|
||||
}
|
||||
|
@@ -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,8 @@
|
||||
#ifndef __TOOLS_GLOBALS_H__
|
||||
#define __TOOLS_GLOBALS_H__
|
||||
|
||||
#include <tools_debug.h>
|
||||
#include <types_generique.h>
|
||||
#include <appl/Debug.h>
|
||||
#include <etk/Types.h>
|
||||
|
||||
|
||||
namespace globals
|
@@ -23,7 +23,7 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
@@ -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
|
||||
@@ -45,7 +45,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"
|
@@ -23,23 +23,23 @@
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#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 <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 +49,33 @@ 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 __PLATFORM__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);
|
||||
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.Utf8Data() );
|
||||
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();
|
||||
basicWindows = NULL;
|
||||
}
|
||||
EDN_INFO("==> Un-Init Edn (END)");
|
||||
APPL_INFO("==> Un-Init Edn (END)");
|
||||
}
|
||||
|
@@ -1,337 +0,0 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @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 <tools_debug.h>
|
||||
#include <tools_globals.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_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 ---
|
||||
*
|
||||
*/
|
||||
// TODO : ne marche plus ...
|
||||
void Buffer::Save(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::GetInfo(infoStatBuffer_ts &infoToUpdate)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::SetLineDisplay(uint32_t lineNumber)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t Buffer::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)
|
||||
{
|
||||
return ERR_NONE;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
* @todo : Set the move up and DOWN...
|
||||
*
|
||||
*/
|
||||
void Buffer::MouseSelectFromCursorTo(int32_t fontId, int32_t width, int32_t height)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::MouseEvent(int32_t fontId, int32_t width, int32_t height)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::MouseEventDouble(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::MouseEventTriple(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
void Buffer::cursorMove(ewol::eventKbMoveType_te moveTypeEvent)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::AddChar(uniChar_t unicodeData)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void Buffer::Search(etk::UString &data, bool back, bool caseSensitive, bool wrap, bool regExp)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void Buffer::Replace(etk::UString &data)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
int32_t Buffer::FindLine(etk::UString &data)
|
||||
{
|
||||
// nothing to do
|
||||
return 0;
|
||||
}
|
||||
|
||||
void Buffer::JumpAtLine(int32_t newLine)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Get the current line (to know where to jump)
|
||||
*
|
||||
* @param ---
|
||||
*
|
||||
* @return Return the current line number
|
||||
*
|
||||
*/
|
||||
int32_t Buffer::GetCurrentLine(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief request a copy of the selection in the named clipBoard ID
|
||||
*
|
||||
* @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button)
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::Copy(int8_t clipboardID)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Request a copy and a remove of the curent selection in the named clipBoard ID
|
||||
*
|
||||
* @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button)
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::Cut(int8_t clipboardID)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief request the past of a specific clipboard on the curent position or selection
|
||||
*
|
||||
* @param[in] clipboardID Id of the buffer we want to get data [0..10] (0 copy normal / 10 middle button)
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void Buffer::Paste(int8_t clipboardID)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void Buffer::RemoveLine(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void Buffer::SelectAll(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void Buffer::SelectNone(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void Buffer::Undo(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|
||||
void Buffer::Redo(void)
|
||||
{
|
||||
// nothing to do
|
||||
}
|
||||
|