Compare commits
94 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 | |||
188bd69f06 | |||
0ab5588a93 | |||
df3c97b17e | |||
03cb9d7cbd | |||
c8b9b37c8e | |||
75f56d52d4 | |||
f6f8679b76 | |||
ae113a8a2f | |||
45f37a0c4b | |||
02e7de2397 | |||
ea344225e3 | |||
40d6de087b | |||
7bf7668686 | |||
e2e0fc25d3 | |||
9f2718f97a | |||
a943ddd4f7 | |||
fced6df123 | |||
a4d314723d | |||
f716055c40 | |||
0a11251ccc | |||
0d0afec709 | |||
1894f56217 | |||
4e7491e5fc | |||
dc73285cb7 | |||
5d7870248d | |||
4b16540744 | |||
f0cda0de78 | |||
e21e7e7c21 | |||
cd84475aea | |||
71fa38d61e | |||
fdd4ddf978 | |||
f610c23638 | |||
610afddc9d | |||
4038dd74af | |||
8ba3e2e3d4 | |||
7734a8ce36 | |||
d088866891 | |||
0341795cbb | |||
9e0720b476 | |||
8bce8893e8 | |||
d2cb4a47b7 | |||
65b288813e | |||
7bad5d42f2 | |||
fda95289bd | |||
102e11b74a | |||
ee80871434 | |||
43c3092fe3 | |||
d05d82ba7b | |||
6052df85dc |
5
.gitignore
vendored
@@ -4,9 +4,14 @@
|
||||
###################################
|
||||
CVS
|
||||
.svn
|
||||
.gitk-tmp.*
|
||||
Object/
|
||||
doxygen/API/
|
||||
doxygen/ALL/
|
||||
bin/
|
||||
gen/
|
||||
linux/
|
||||
obj/
|
||||
|
||||
###################################
|
||||
# backup files
|
||||
|
22
AndroidManifest.xml
Normal file
@@ -0,0 +1,22 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.heeroyui.ednpackage"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
<application android:label="Edn"
|
||||
android:icon="@drawable/ic_luncher_edn">
|
||||
<!--android:hasCode="false"-->
|
||||
<!-- classpath-->
|
||||
<activity android:name=".edn"
|
||||
android:label="Edn Text-Editor"
|
||||
android:icon="@drawable/ic_luncher_edn"
|
||||
android:configChanges="orientation">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
<uses-sdk android:minSdkVersion="4" />
|
||||
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
|
||||
</manifest>
|
2
Application.mk
Normal file
@@ -0,0 +1,2 @@
|
||||
APP_BUILD_SCRIPT=$PROJECT/Sources/Android.mk
|
||||
|
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
|
||||
|
||||
|
Before Width: | Height: | Size: 1.0 MiB |
@@ -1,129 +0,0 @@
|
||||
name:Monospace
|
||||
source:Monospace.bmp
|
||||
#comment line ...
|
||||
# size 54 largeur 33 space between letter 12
|
||||
# unknow UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
|
||||
0x00 (99,453) (33,54) # Error : Unknow the UTF8 element ...
|
||||
# hexa UTF8 code of the letter and start coordonate and size ==> 0x54 (33,45) (33,54)
|
||||
# ABCDEFGHIJKLMN
|
||||
0x20 (0,7) (33,54) # space ...
|
||||
0x41 (33,7) (33,54) # A
|
||||
0x42 (66,7) (33,54) # B
|
||||
0x43 (99,7) (33,54) # C
|
||||
0x44 (132,7) (33,54) # D
|
||||
0x45 (165,7) (33,54) # E
|
||||
0x46 (198,7) (33,54) # F
|
||||
0x47 (231,7) (33,54) # G
|
||||
0x48 (264,7) (33,54) # H
|
||||
0x49 (297,7) (33,54) # I
|
||||
0x4A (330,7) (33,54) # J
|
||||
0x4B (363,7) (33,54) # K
|
||||
0x4C (396,7) (33,54) # L
|
||||
0x4D (429,7) (33,54) # M
|
||||
0x4E (462,7) (33,54) # N
|
||||
#OPQRSTUVWXYZabc
|
||||
0x4F (0,71) (33,54) # O
|
||||
0x50 (33,71) (33,54) # P
|
||||
0x51 (66,71) (33,54) # Q
|
||||
0x52 (99,71) (33,54) # R
|
||||
0x53 (132,71) (33,54) # S
|
||||
0x54 (165,71) (33,54) # T
|
||||
0x55 (198,71) (33,54) # U
|
||||
0x56 (231,71) (33,54) # V
|
||||
0x57 (264,71) (33,54) # W
|
||||
0x58 (297,71) (33,54) # X
|
||||
0x59 (330,71) (33,54) # Y
|
||||
0x5A (363,71) (33,54) # Z
|
||||
0x61 (396,71) (33,54) # a
|
||||
0x62 (429,71) (33,54) # b
|
||||
0x63 (462,71) (33,54) # c
|
||||
#defghijklmnopqr
|
||||
0x64 (0,135) (33,54) # d
|
||||
0x65 (33,135) (33,54) # e
|
||||
0x66 (66,135) (33,54) # f
|
||||
0x67 (99,135) (33,54) # g
|
||||
0x68 (132,135) (33,54) # h
|
||||
0x69 (165,135) (33,54) # i
|
||||
0x6A (198,135) (33,54) # j
|
||||
0x6B (231,135) (33,54) # k
|
||||
0x6C (264,135) (33,54) # l
|
||||
0x6D (297,135) (33,54) # m
|
||||
0x6E (330,135) (33,54) # n
|
||||
0x6F (363,135) (33,54) # o
|
||||
0x70 (396,135) (33,54) # p
|
||||
0x71 (429,135) (33,54) # q
|
||||
0x72 (462,135) (33,54) # r
|
||||
#stuvwxyz1234567
|
||||
0x73 (0,199) (33,54) # s
|
||||
0x74 (33,199) (33,54) # t
|
||||
0x75 (66,199) (33,54) # u
|
||||
0x76 (99,199) (33,54) # v
|
||||
0x77 (132,199) (33,54) # w
|
||||
0x78 (165,199) (33,54) # x
|
||||
0x79 (198,199) (33,54) # y
|
||||
0x7A (231,199) (33,54) # z
|
||||
0x31 (264,199) (33,54) # 1
|
||||
0x32 (297,199) (33,54) # 2
|
||||
0x33 (330,199) (33,54) # 3
|
||||
0x34 (363,199) (33,54) # 4
|
||||
0x35 (396,199) (33,54) # 5
|
||||
0x36 (429,199) (33,54) # 6
|
||||
0x37 (462,199) (33,54) # 7
|
||||
#890&<26>~"#'{([-|<7C>
|
||||
0x38 (0,263) (33,54) # 8
|
||||
0x39 (33,263) (33,54) # 9
|
||||
0x30 (66,263) (33,54) # 0
|
||||
0x26 (99,263) (33,54) # &
|
||||
#0x (132,263) (33,54) # <20>
|
||||
0x7E (165,263) (33,54) # ~
|
||||
0x22 (198,263) (33,54) # "
|
||||
0x23 (231,263) (33,54) # #
|
||||
0x27 (264,263) (33,54) # '
|
||||
0x7B (297,263) (33,54) # {
|
||||
0x28 (330,263) (33,54) # (
|
||||
0x5B (363,263) (33,54) # [
|
||||
0x2D (396,263) (33,54) # -
|
||||
0x7C (429,263) (33,54) # |
|
||||
#0x (462,263) (33,54) # <20>
|
||||
#`_\<5C>^<5E>@)]=}
|
||||
0x60 (0,335) (33,54) # `
|
||||
0x5F (33,335) (33,54) # _
|
||||
0x5C (66,335) (33,54) # \
|
||||
#0x (99,335) (33,54) # <20>
|
||||
0x5E (132,335) (33,54) # ^
|
||||
#0x (165,335) (33,54) # <20>
|
||||
0x40 (198,335) (33,54) # @
|
||||
0x29 (231,335) (33,54) # )
|
||||
0x5D (264,335) (33,54) # ]
|
||||
0x3D (297,335) (33,54) # =
|
||||
0x7D (330,335) (33,54) # }
|
||||
#0x (363,335) (33,54) # o chap
|
||||
#0x (396,335) (33,54) # u chap
|
||||
#0x (429,335) (33,54) # e chap
|
||||
#0x (462,335) (33,54) # a chap
|
||||
#$<24>*<2A>%!<21>:/
|
||||
#0x (0,391) (33,54) # i chap
|
||||
#0x (33,391) (33,54) # o trema
|
||||
#0x (66,391) (33,54) # u trema
|
||||
#0x (99,391) (33,54) # e trema
|
||||
#0x (132,391) (33,54) # a trema
|
||||
0x24 (165,391) (33,54) # $
|
||||
#0x (198,391) (33,54) # <20>
|
||||
0x2A (231,391) (33,54) # *
|
||||
#0x (264,391) (33,54) # <20>
|
||||
#0x (297,391) (33,54) # <20>
|
||||
0x25 (330,391) (33,54) # %
|
||||
0x21 (363,391) (33,54) # !
|
||||
#0x (396,391) (33,54) # <20>
|
||||
0x3A (429,391) (33,54) # :
|
||||
0x2F (462,391) (33,54) # /
|
||||
#;.,?<><3E>!+
|
||||
0x3B (0,453) (33,54) # ;
|
||||
0x2E (33,453) (33,54) # .
|
||||
0x2C (66,453) (33,54) # ,
|
||||
0x3F (99,453) (33,54) # ?
|
||||
0x3C (132,453) (33,54) # <
|
||||
0x3E (165,453) (33,54) # >
|
||||
#0x (198,453) (33,54) # <20>
|
||||
#0x21 (231,453) (33,54) # ! ==> doublon ...
|
||||
0x2B (264,453) (33,54) # +
|
BIN
assets/Font/freefont/FreeSans.ttf
Normal file
BIN
assets/Font/freefont/FreeSansBold.ttf
Normal file
BIN
assets/Font/freefont/FreeSansBoldOblique.ttf
Normal file
BIN
assets/Font/freefont/FreeSansOblique.ttf
Normal file
BIN
assets/Font/freefont/FreeSerif.ttf
Normal file
BIN
assets/Font/freefont/FreeSerifBold.ttf
Normal file
BIN
assets/Font/freefont/FreeSerifBoldItalic.ttf
Normal file
BIN
assets/Font/freefont/FreeSerifItalic.ttf
Normal file
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>
|
@@ -1,4 +1,14 @@
|
||||
# action a faire (ordonner par r<>vision) :
|
||||
|
||||
dans la liste des truc important a refaire
|
||||
retirer tout les singleton ==> passer par des namespace ==> fonctionnera mieux ...
|
||||
finir de netoyer la classe widget
|
||||
netoyer les classe text ...
|
||||
mettre en pla ce le repositionnement automatique quand on change de buffer
|
||||
Curseur au bon endroit
|
||||
|
||||
|
||||
|
||||
* 0.2.X :
|
||||
- gui : Amelioration du full-screen et du display de base (sans l'entete de la fenetre)
|
||||
- gui : Mise en place d'un display ligne par ligne
|
||||
|
85
build.xml
Normal file
@@ -0,0 +1,85 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="edn" default="help">
|
||||
|
||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||
It contains the path to the SDK. It should *NOT* be checked into
|
||||
Version Control Systems. -->
|
||||
<loadproperties srcFile="local.properties" />
|
||||
|
||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||
'android' tool to add properties to it.
|
||||
This is the place to change some Ant specific build properties.
|
||||
Here are some properties you may want to change/update:
|
||||
|
||||
source.dir
|
||||
The name of the source directory. Default is 'src'.
|
||||
out.dir
|
||||
The name of the output directory. Default is 'bin'.
|
||||
|
||||
For other overridable properties, look at the beginning of the rules
|
||||
files in the SDK, at tools/ant/build.xml
|
||||
|
||||
Properties related to the SDK location or the project target should
|
||||
be updated using the 'android' tool with the 'update' action.
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems.
|
||||
|
||||
-->
|
||||
<property file="ant.properties" />
|
||||
|
||||
<!-- The project.properties file is created and updated by the 'android'
|
||||
tool, as well as ADT.
|
||||
|
||||
This contains project specific properties such as project target, and library
|
||||
dependencies. Lower level build properties are stored in ant.properties
|
||||
(or in .classpath for Eclipse projects).
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems. -->
|
||||
<loadproperties srcFile="project.properties" />
|
||||
|
||||
<!-- quick check on sdk.dir -->
|
||||
<fail
|
||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project'"
|
||||
unless="sdk.dir"
|
||||
/>
|
||||
|
||||
|
||||
<!-- extension targets. Uncomment the ones where you want to do custom work
|
||||
in between standard targets -->
|
||||
<!--
|
||||
<target name="-pre-build">
|
||||
</target>
|
||||
<target name="-pre-compile">
|
||||
</target>
|
||||
|
||||
/* This is typically used for code obfuscation.
|
||||
Compiled code location: ${out.classes.absolute.dir}
|
||||
If this is not done in place, override ${out.dex.input.absolute.dir} */
|
||||
<target name="-post-compile">
|
||||
</target>
|
||||
-->
|
||||
|
||||
<!-- Import the actual build file.
|
||||
|
||||
To customize existing targets, there are two options:
|
||||
- Customize only one target:
|
||||
- copy/paste the target into this file, *before* the
|
||||
<import> task.
|
||||
- customize it to your needs.
|
||||
- Customize the whole content of build.xml
|
||||
- copy/paste the content of the rules files (minus the top node)
|
||||
into this file, replacing the <import> task.
|
||||
- customize to your needs.
|
||||
|
||||
***********************
|
||||
****** IMPORTANT ******
|
||||
***********************
|
||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||
in order to avoid having your file be overridden by tools such as "android update project"
|
||||
-->
|
||||
<!-- version-tag: 1 -->
|
||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||
|
||||
</project>
|
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/
|
@@ -2,19 +2,44 @@ LOCAL_PATH := $(call my-dir)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
|
||||
LOCAL_MODULE := ednpackage
|
||||
LOCAL_STATIC_LIBRARIES := ewol
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH)
|
||||
|
||||
# load the common sources file of the platform
|
||||
include $(LOCAL_PATH)/file.mk
|
||||
|
||||
# name of the librairy
|
||||
LOCAL_MODULE := ednpackage
|
||||
|
||||
# get the tag of the current project :
|
||||
LOCAL_VERSION_TAG=$(shell cd $(LOCAL_PATH) ; git describe --tags)
|
||||
LOCAL_VERSION_TAG_SHORT=$(shell cd $(LOCAL_PATH) ; git describe --tags --abbrev=0)
|
||||
$(info $(LOCAL_MODULE) version TAG : $(LOCAL_VERSION_TAG))
|
||||
|
||||
# name of the dependency
|
||||
LOCAL_STATIC_LIBRARIES := ewol etk tinyxml libzip libpng libfreetype libparsersvg libagg
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(addprefix $(LOCAL_PATH)/, $(sort $(dir $(FILE_LIST))))
|
||||
|
||||
LOCAL_SRC_FILES := ewolAndroidAbstraction.cpp \
|
||||
$(FILE_LIST)
|
||||
|
||||
LOCAL_LDLIBS := -llog -landroid
|
||||
|
||||
# -frtti
|
||||
ifeq ($(DEBUG),1)
|
||||
LOCAL_CFLAGS := -D__PLATFORM__Android \
|
||||
-D__MODE__Touch \
|
||||
-DETK_DEBUG_LEVEL=3 \
|
||||
-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)
|
||||
|
||||
NDK_MODULE_PATH := $(LOCAL_PATH)/../../
|
||||
|
28
jni/Linux.mk
@@ -5,16 +5,36 @@ 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
|
||||
# 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))))
|
||||
|
||||
LOCAL_SRC_FILES := $(FILE_LIST)
|
||||
|
||||
|
||||
LOCAL_LDLIBS :=
|
||||
|
||||
LOCAL_CFLAGS := -DEWOL_USE_FREE_TYPE \
|
||||
-DEDN_DEBUG_LEVEL=3
|
||||
ifeq ($(DEBUG),1)
|
||||
LOCAL_CFLAGS := -D__PLATFORM__Linux \
|
||||
-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;
|
||||
}
|
139
jni/appl/Buffer/Buffer.h
Normal file
@@ -0,0 +1,139 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file Buffer.h
|
||||
* @brief Editeur De N'ours : Text Buffer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/12/2010
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __BUFFER_H__
|
||||
#define __BUFFER_H__
|
||||
|
||||
#include <etk/UString.h>
|
||||
#include <etk/File.h>
|
||||
#include <etk/unicode.h>
|
||||
#include <ewol/ewol.h>
|
||||
|
||||
|
||||
typedef struct{
|
||||
uint32_t nbTotalLine; //!< Number of line in the buffer
|
||||
uint32_t nbTotalColomn; //!< Number of line in the buffer
|
||||
uint32_t startLineDisplay; //!< First line display.
|
||||
uint32_t startColomnDisplay; //!< First Colomn displayed
|
||||
uint32_t diplayableColomn; //!< NB colomn that can be displayed
|
||||
uint32_t diplayableLine; //!< NB Line that can be displayed
|
||||
}infoStatBuffer_ts;
|
||||
|
||||
|
||||
class Buffer {
|
||||
public:
|
||||
Buffer(void);
|
||||
Buffer(etk::File &newName);
|
||||
virtual ~Buffer(void);
|
||||
|
||||
etk::File GetFileName(void)
|
||||
{
|
||||
return m_fileName;
|
||||
};
|
||||
|
||||
void SetFileName(etk::File &newName)
|
||||
{
|
||||
m_fileName = newName;
|
||||
m_haveName = true;
|
||||
NameChange();
|
||||
};
|
||||
|
||||
void SetFileName(etk::UString &newName)
|
||||
{
|
||||
m_fileName.SetCompleateName(newName, etk::FILE_TYPE_DIRECT);
|
||||
m_haveName = true;
|
||||
NameChange();
|
||||
};
|
||||
|
||||
bool HaveName(void)
|
||||
{
|
||||
return m_haveName;
|
||||
}
|
||||
|
||||
virtual void Save(void) {};
|
||||
bool IsModify(void);
|
||||
protected:
|
||||
void SetModify(bool status);
|
||||
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 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)
|
||||
{
|
||||
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) { 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
|
||||
etk::File m_fileName; //!< filename of the curent buffer
|
||||
bool m_haveName; //!< to know if the file have a name or NOT
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -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>
|
||||
@@ -67,39 +67,35 @@ BufferEmpty::~BufferEmpty(void)
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t BufferEmpty::Display(ewol::OObject2DTextColored* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY)
|
||||
int32_t BufferEmpty::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)
|
||||
{
|
||||
ColorizeManager * myColorManager = ColorizeManager::getInstance();
|
||||
// Get color :
|
||||
Colorize *myColor = NULL;
|
||||
//drawer.Flush();
|
||||
|
||||
int32_t fontId = OOTextNormal.GetFontID();
|
||||
int32_t letterHeight = ewol::GetHeight(fontId);
|
||||
|
||||
if (NULL == OOText) {
|
||||
EDN_ERROR("Input VALUE is NULL");
|
||||
return ERR_FAIL;
|
||||
}
|
||||
if (NULL == OOColored) {
|
||||
EDN_ERROR("Input VALUE is NULL");
|
||||
return ERR_FAIL;
|
||||
}
|
||||
Vector2D<float> textPos;
|
||||
textPos.x = 20;
|
||||
textPos.y = 20;
|
||||
|
||||
myColor = myColorManager->Get("normal");
|
||||
OOText->SetColor(myColor->GetFG());
|
||||
OOText->TextAdd(20, 20, "edn - Editeur De N'ours, l'Editeur Desoxyribo-Nucleique", sizeX);
|
||||
myColor = ColorizeManager::Get("normal");
|
||||
OOTextBold.SetColor(myColor->GetFG());
|
||||
etk::UString tmpDisplay = "edn - Editeur De N'ours";
|
||||
OOTextBold.Text(textPos, tmpDisplay);
|
||||
|
||||
myColor = myColorManager->Get("commentDoxygen");
|
||||
OOText->SetColor(myColor->GetFG());
|
||||
OOText->TextAdd(20, 50, "No Buffer Availlable to display", sizeX);
|
||||
myColor = ColorizeManager::Get("commentDoxygen");
|
||||
OOTextNormal.SetColor(myColor->GetFG());
|
||||
textPos.y = (int32_t)(textPos.y + letterHeight*1.30);
|
||||
tmpDisplay = "No Buffer Availlable to display";
|
||||
OOTextNormal.Text(textPos, tmpDisplay);
|
||||
|
||||
|
||||
color_ts bgColor; //!< Text color
|
||||
bgColor.red = 1.0;
|
||||
bgColor.green = 1.0;
|
||||
bgColor.blue = 1.0;
|
||||
bgColor.alpha = 1.0;
|
||||
OOColored->SetColor(bgColor);
|
||||
OOColored->Rectangle( 0, 0, sizeX, sizeY);
|
||||
OOColored.SetColor(etk::color::color_White);
|
||||
OOColored.Rectangle( 0, 0, sizeX, sizeY);
|
||||
|
||||
return ERR_NONE;
|
||||
}
|
@@ -32,7 +32,11 @@ class BufferEmpty : public Buffer {
|
||||
public:
|
||||
BufferEmpty(void);
|
||||
virtual ~BufferEmpty(void);
|
||||
int32_t Display(ewol::OObject2DTextColored* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY);
|
||||
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);
|
||||
|
||||
};
|
||||
|
637
jni/appl/Buffer/BufferManager.cpp
Normal file
@@ -0,0 +1,637 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferManager.cpp
|
||||
* @brief Editeur De N'ours : Text Buffer manager (sources)
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/12/2010
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
#include <ewol/EObjectManager.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "classBufferManager"
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_BUFFER_MANAGER = "BufferManager";
|
||||
|
||||
class classBufferManager: public ewol::EObject
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
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
|
||||
* @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:
|
||||
// return the ID of the buffer allocated
|
||||
// create a buffer with no element
|
||||
int32_t Create(void);
|
||||
// open curent filename
|
||||
int32_t Open(etk::File &myFile);
|
||||
bool Remove(int32_t BufferID);
|
||||
public:
|
||||
int32_t GetSelected(void) { return m_idSelected;};
|
||||
//void SetSelected(int32_t id) {m_idSelected = id;};
|
||||
Buffer * Get(int32_t BufferID);
|
||||
bool Exist(int32_t BufferID);
|
||||
bool Exist(etk::File &myFile);
|
||||
int32_t GetId(etk::File &myFile);
|
||||
// return the number of buffer (open in the past) if 5 buffer open and 4 close ==> return 5
|
||||
uint32_t Size(void);
|
||||
uint32_t SizeOpen(void);
|
||||
int32_t WitchBuffer(int32_t iEmeElement);
|
||||
|
||||
|
||||
private:
|
||||
|
||||
etk::VectorType<Buffer*> listBuffer; //!< element List of the char Elements
|
||||
|
||||
void RemoveAll(void); //!< remove all buffer
|
||||
int32_t m_idSelected;
|
||||
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
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
classBufferManager::classBufferManager(void)
|
||||
{
|
||||
// nothing to do ...
|
||||
BufferNotExiste = new BufferEmpty();
|
||||
m_idSelected = -1;
|
||||
RegisterMultiCast(ednMsgGuiNew);
|
||||
RegisterMultiCast(ednMsgOpenFile);
|
||||
RegisterMultiCast(ednMsgGuiClose);
|
||||
RegisterMultiCast(ednMsgGuiSave);
|
||||
RegisterMultiCast(ednMsgCodeViewSelectedId);
|
||||
RegisterMultiCast(ednMsgBufferId);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
classBufferManager::~classBufferManager(void)
|
||||
{
|
||||
//clean All Buffer
|
||||
APPL_INFO("~classBufferManager::RemoveAll();");
|
||||
RemoveAll();
|
||||
// clear The list of Buffer
|
||||
APPL_INFO("~classBufferManager::listBuffer.Clear();");
|
||||
listBuffer.Clear();
|
||||
APPL_INFO("~classBufferManager::delete(BufferNotExiste);");
|
||||
delete(BufferNotExiste);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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 classBufferManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::EObject::OnReceiveMessage(CallerObject, eventId, data);
|
||||
|
||||
if (eventId == ednMsgBufferId) {
|
||||
// select a new buffer ID :
|
||||
if (data == "") {
|
||||
APPL_ERROR("Request select buffer ID = \"\" ");
|
||||
} else {
|
||||
int32_t newID = -1;
|
||||
sscanf(data.Utf8Data(), "%d", &newID);
|
||||
if(true == Exist(newID)) {
|
||||
m_idSelected = newID;
|
||||
} else {
|
||||
m_idSelected = -1;
|
||||
APPL_ERROR("Request a non existant ID : " << newID << " reset to -1...");
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednMsgGuiNew) {
|
||||
int32_t newOne = Create();
|
||||
if (-1 != newOne) {
|
||||
m_idSelected = newOne;
|
||||
SendMultiCast(ednMsgBufferId, m_idSelected);
|
||||
SendMultiCast(ednMsgBufferListChange);
|
||||
}
|
||||
} else if (eventId == ednMsgOpenFile) {
|
||||
if (data != "" ) {
|
||||
etk::File myFile(data, etk::FILE_TYPE_DIRECT);
|
||||
int32_t newOne = Open(myFile);
|
||||
if (-1 != newOne) {
|
||||
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 == "") {
|
||||
APPL_ERROR("Null data for close file ... ");
|
||||
} else {
|
||||
if (data == "current") {
|
||||
// Check buffer existence
|
||||
if(true == Exist(m_idSelected)) {
|
||||
// If no name ==> request a Gui display ...
|
||||
if (Get(m_idSelected)->HaveName() == false) {
|
||||
SendMultiCast(ednMsgGuiSaveAs, "current");
|
||||
} else {
|
||||
Get(m_idSelected)->Save();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
int32_t newId;
|
||||
sscanf(data.Utf8Data(), "%d", &newId);
|
||||
if (false == Exist(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) {
|
||||
SendMultiCast(ednMsgGuiSaveAs, newId);
|
||||
} else {
|
||||
Get(m_idSelected)->Save();
|
||||
}
|
||||
}
|
||||
SendMultiCast(ednMsgBufferState, "saved");
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednMsgGuiClose) {
|
||||
if (data == "") {
|
||||
APPL_ERROR("Null data for close file ... ");
|
||||
} else {
|
||||
if (data == "All") {
|
||||
|
||||
} else {
|
||||
int32_t closeID = -1;
|
||||
if (data == "current") {
|
||||
closeID = m_idSelected;
|
||||
APPL_DEBUG("Close specific buffer ID" << closeID);
|
||||
} else {
|
||||
// close specific buffer ...
|
||||
sscanf(data.Utf8Data(), "%d", &closeID);
|
||||
APPL_DEBUG("Close specific buffer ID="<< closeID);
|
||||
}
|
||||
if(true == Exist(closeID)) {
|
||||
// Get the new display buffer
|
||||
if (m_idSelected == closeID) {
|
||||
// Try previous buffer
|
||||
int32_t destBuffer = -1;
|
||||
for(int32_t ii=closeID-1; ii >= 0; ii--) {
|
||||
if (true == Exist(ii) ) {
|
||||
destBuffer = ii;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// try next buffer
|
||||
if (-1 == destBuffer) {
|
||||
for(int32_t ii=closeID+1; ii < listBuffer.Size(); ii++) {
|
||||
if (true == Exist(ii) ) {
|
||||
destBuffer = ii;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
// set it to the currect display
|
||||
m_idSelected = destBuffer;
|
||||
SendMultiCast(ednMsgBufferId, destBuffer);
|
||||
}
|
||||
// Remove requested buffer
|
||||
Remove(closeID);
|
||||
SendMultiCast(ednMsgBufferListChange);
|
||||
} else {
|
||||
APPL_ERROR("Request Close of a non existant ID : " << closeID);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (eventId == ednMsgCodeViewSelectedId) {
|
||||
//Change the selected buffer
|
||||
if (data == "") {
|
||||
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 {
|
||||
APPL_ERROR("code biew request the selection of an non -existant buffer ==> reset to -1");
|
||||
m_idSelected = -1;
|
||||
}
|
||||
SendMultiCast(ednMsgBufferId, m_idSelected);
|
||||
SendMultiCast(ednMsgBufferListChange);
|
||||
}
|
||||
}
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
// Check buffer existence
|
||||
if(true == Exist(dataID)) {
|
||||
// If no name ==> request a Gui display ...
|
||||
if (Get(dataID)->HaveName() == false) {
|
||||
SendMessage(APPL_MSG__GUI_SHOW_SAVE_AS, dataID);
|
||||
} else {
|
||||
Get(dataID)->Save();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Remove all buffer opened
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
void classBufferManager::RemoveAll(void)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<listBuffer.Size(); i++) {
|
||||
Remove(i);
|
||||
}
|
||||
SendMultiCast(ednMsgGuiClose, "All");
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Create a new buffer with no name and empty
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return The ID of the curent buffer where the file is loaded
|
||||
*
|
||||
*/
|
||||
int32_t classBufferManager::Create(void)
|
||||
{
|
||||
// allocate a new Buffer
|
||||
Buffer *myBuffer = new BufferText();
|
||||
// Add at the list of element
|
||||
listBuffer.PushBack(myBuffer);
|
||||
int32_t basicID = listBuffer.Size() - 1;
|
||||
return basicID;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief open a file with the name set in parameters
|
||||
*
|
||||
* @param[in] filename curent filename
|
||||
*
|
||||
* @return The ID of the curent buffer where the file is loaded
|
||||
*
|
||||
* @todo : check if this file is not curently open and return the old ID
|
||||
*
|
||||
*/
|
||||
int32_t classBufferManager::Open(etk::File &myFile)
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Buffer * classBufferManager::Get(int32_t BufferID)
|
||||
{
|
||||
// possible special case : -1;
|
||||
if (-1 >= BufferID) {
|
||||
return BufferNotExiste;
|
||||
}
|
||||
// check if the Buffer existed
|
||||
if (BufferID < listBuffer.Size()) {
|
||||
// check if the buffer already existed
|
||||
if (NULL != listBuffer[BufferID]) {
|
||||
return listBuffer[BufferID];
|
||||
} else {
|
||||
APPL_ERROR("non existing Buffer " << BufferID);
|
||||
}
|
||||
} else {
|
||||
APPL_ERROR("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.Size());
|
||||
}
|
||||
return BufferNotExiste;
|
||||
}
|
||||
|
||||
|
||||
bool classBufferManager::Exist(int32_t BufferID)
|
||||
{
|
||||
if (-1 >= BufferID) {
|
||||
return false;
|
||||
}
|
||||
// check if the Buffer existed
|
||||
if (BufferID < listBuffer.Size()) {
|
||||
// check if the buffer already existed
|
||||
if (NULL != listBuffer[BufferID]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool classBufferManager::Exist(etk::File &myFile )
|
||||
{
|
||||
if (-1 == GetId(myFile)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
int32_t classBufferManager::GetId(etk::File &myFile)
|
||||
{
|
||||
int32_t iii;
|
||||
// check if the Buffer existed
|
||||
for (iii=0; iii < listBuffer.Size(); iii++) {
|
||||
// check if the buffer already existed
|
||||
if (NULL != listBuffer[iii]) {
|
||||
if ( listBuffer[iii]->GetFileName() == myFile) {
|
||||
return iii;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
// return the number of buffer (open in the past) if 5 buffer open and 4 close ==> return 5
|
||||
uint32_t classBufferManager::Size(void)
|
||||
{
|
||||
return listBuffer.Size();
|
||||
}
|
||||
|
||||
// nb of opens file Now ...
|
||||
uint32_t classBufferManager::SizeOpen(void)
|
||||
{
|
||||
uint32_t jjj = 0;
|
||||
// check if the Buffer existed
|
||||
for (int32_t iii=0; iii<listBuffer.Size(); iii++) {
|
||||
// check if the buffer already existed
|
||||
if (NULL != listBuffer[iii]) {
|
||||
jjj++;
|
||||
}
|
||||
}
|
||||
return jjj;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
bool classBufferManager::Remove(int32_t BufferID)
|
||||
{
|
||||
if (-1 >= BufferID) {
|
||||
return false;
|
||||
}
|
||||
// check if the Buffer existed
|
||||
if (BufferID < listBuffer.Size()) {
|
||||
// check if the buffer already existed
|
||||
if (NULL != listBuffer[BufferID]) {
|
||||
// TODO : Check if it saved...
|
||||
/*
|
||||
if (false == IsSaved(BufferID) ) {
|
||||
APPL_INFO("Buffer " << BufferID << " : Not Saved", BufferID);
|
||||
}
|
||||
*/
|
||||
// Delete the Buffer
|
||||
delete( listBuffer[BufferID] );
|
||||
listBuffer[BufferID] = NULL;
|
||||
/*
|
||||
ewol::widgetMessageMultiCast::Send(GetWidgetId(), ednMsgBufferListChange);
|
||||
*/
|
||||
return true;
|
||||
} else {
|
||||
APPL_INFO("non existing Buffer " << BufferID);
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
APPL_INFO("call an non existing Buffer number too hight : " << BufferID << " > " << listBuffer.Size());
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief to get the element 14 in the buffer
|
||||
*
|
||||
* @param[in,out] ---
|
||||
*
|
||||
* @return ---
|
||||
*
|
||||
*/
|
||||
int32_t classBufferManager::WitchBuffer(int32_t iEmeElement)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<listBuffer.Size(); i++) {
|
||||
if (NULL != listBuffer[i]) {
|
||||
iEmeElement--;
|
||||
// find the element :
|
||||
if (0 == iEmeElement) {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Namespace part :
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static classBufferManager * localManager = NULL;
|
||||
|
||||
void BufferManager::Init(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> already exist, just unlink the previous ...");
|
||||
localManager = NULL;
|
||||
}
|
||||
localManager = new classBufferManager();
|
||||
|
||||
if (NULL == localManager) {
|
||||
EWOL_CRITICAL("Allocation of classBufferManager not done ...");
|
||||
}
|
||||
}
|
||||
|
||||
void BufferManager::UnInit(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return;
|
||||
}
|
||||
ewol::EObjectManager::MarkToRemoved(localManager);
|
||||
localManager = NULL;
|
||||
}
|
||||
|
||||
int32_t BufferManager::GetSelected(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return -1;
|
||||
}
|
||||
return localManager->GetSelected();
|
||||
}
|
||||
|
||||
Buffer * BufferManager::Get(int32_t BufferID)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return NULL;
|
||||
}
|
||||
return localManager->Get(BufferID);
|
||||
}
|
||||
|
||||
bool BufferManager::Exist(int32_t BufferID)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return false;
|
||||
}
|
||||
return localManager->Exist(BufferID);
|
||||
}
|
||||
|
||||
bool BufferManager::Exist(etk::File &myFile)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return false;
|
||||
}
|
||||
return localManager->Exist(myFile);
|
||||
}
|
||||
|
||||
int32_t BufferManager::GetId(etk::File &myFile)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return -1;
|
||||
}
|
||||
return localManager->GetId(myFile);
|
||||
}
|
||||
|
||||
uint32_t BufferManager::Size(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return 0;
|
||||
}
|
||||
return localManager->Size();
|
||||
}
|
||||
|
||||
uint32_t BufferManager::SizeOpen(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return 0;
|
||||
}
|
||||
return localManager->SizeOpen();
|
||||
}
|
||||
|
||||
int32_t BufferManager::WitchBuffer(int32_t iEmeElement)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("classBufferManager ==> request UnInit, but does not exist ...");
|
||||
return -1;
|
||||
}
|
||||
return localManager->WitchBuffer(iEmeElement);
|
||||
}
|
||||
|
||||
|
51
jni/appl/Buffer/BufferManager.h
Normal file
@@ -0,0 +1,51 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferManager.h
|
||||
* @brief Editeur De N'ours : Text Buffer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 08/12/2010
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#ifndef __BUFFER_MANAGER_H__
|
||||
#define __BUFFER_MANAGER_H__
|
||||
|
||||
#include <Buffer.h>
|
||||
#include <BufferText.h>
|
||||
#include <BufferEmpty.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/Widget.h>
|
||||
|
||||
namespace BufferManager
|
||||
{
|
||||
void Init(void);
|
||||
void UnInit(void);
|
||||
int32_t GetSelected(void);
|
||||
Buffer * Get(int32_t BufferID);
|
||||
bool Exist(int32_t BufferID);
|
||||
bool Exist(etk::File &myFile);
|
||||
int32_t GetId(etk::File &myFile);
|
||||
// return the number of buffer (open in the past) if 5 buffer open and 4 close ==> return 5
|
||||
uint32_t Size(void);
|
||||
uint32_t SizeOpen(void);
|
||||
int32_t WitchBuffer(int32_t iEmeElement);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
1252
jni/appl/Buffer/BufferText.cpp
Normal file
@@ -46,24 +46,27 @@ class BufferText : public Buffer {
|
||||
void GetInfo(infoStatBuffer_ts &infoToUpdate);
|
||||
void SetLineDisplay(uint32_t lineNumber);
|
||||
|
||||
int32_t Display(ewol::OObject2DTextColored* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY);
|
||||
void ForceReDraw(bool allElement);
|
||||
void AddChar(char * UTF8data);
|
||||
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);
|
||||
void AddChar(uniChar_t unicodeData);
|
||||
void cursorMove(ewol::eventKbMoveType_te moveTypeEvent);
|
||||
void MouseSelectFromCursorTo(int32_t width, int32_t height);
|
||||
void MouseEvent(int32_t width, int32_t height);
|
||||
void MouseSelectFromCursorTo(int32_t fontId, int32_t width, int32_t height);
|
||||
void MouseEvent(int32_t fontId, int32_t width, int32_t height);
|
||||
void MouseEventDouble(void);
|
||||
void MouseEventTriple(void);
|
||||
void ScrollDown(void);
|
||||
void ScrollUp(void);
|
||||
|
||||
void Copy(int8_t clipboardID);
|
||||
void Cut(int8_t clipboardID);
|
||||
void Paste(int8_t clipboardID);
|
||||
|
||||
void Search(etk::String &data, bool back, bool caseSensitive, bool wrap, bool regExp);
|
||||
void Replace(etk::String &data);
|
||||
int32_t FindLine(etk::String &data);
|
||||
void Search(etk::UString &data, bool back, bool caseSensitive, bool wrap, bool regExp);
|
||||
void Replace(etk::UString &data);
|
||||
int32_t FindLine(etk::UString &data);
|
||||
void JumpAtLine(int32_t newLine);
|
||||
int32_t GetCurrentLine(void);
|
||||
|
||||
@@ -72,51 +75,37 @@ class BufferText : public Buffer {
|
||||
void SelectNone(void);
|
||||
void Undo(void);
|
||||
void Redo(void);
|
||||
void SetCharset(charset_te newCharset);
|
||||
void SetCharset(unicode::charset_te newCharset);
|
||||
int32_t GetNumberOfLine(void);
|
||||
protected:
|
||||
void NameChange(void);
|
||||
|
||||
private:
|
||||
// Display
|
||||
bool NeedToCleanEndPage; //!< if true, the end of the page need to be clean (arrive after a remove line)
|
||||
uint32_t nbColoneForLineNumber; //!< number of colome used to display the line Number
|
||||
ColorizeManager * myColorManager; //!< for the background color :
|
||||
|
||||
int32_t GetLineNumberNumberOfElement(void);
|
||||
|
||||
// Direct buffer IO
|
||||
EdnBuf m_EdnBuf; //!< buffer associated on this displayer
|
||||
position_ts m_displayStart; //!< position where the display is starting
|
||||
position_ts m_displaySize; //!< number of char displayable in the screan
|
||||
int32_t m_displayStartBufferPos; //!< position where the buffer start
|
||||
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 ...
|
||||
bool m_cursorOn; //!< the blink of the cursor ...
|
||||
cursorDisplayMode_te m_cursorMode; //!< type of cursor Selected
|
||||
|
||||
displayHLData_ts m_displayLocalSyntax; //!< for the display of the local elements (display HL mode)
|
||||
|
||||
// internal function
|
||||
void BasicInit(void);
|
||||
void UpdateWindowsPosition(bool centerPage = false);
|
||||
void displayLineNumber(DrawerManager &drawer);
|
||||
|
||||
void CleanSelectLine(void);
|
||||
|
||||
void SelectionStart(void);
|
||||
void SelectionEnd(void);
|
||||
void SelectionCheckMode(void);
|
||||
|
||||
void CheckAndUpdateLineForModification(uint32_t lineID);
|
||||
void BasicInit(void);
|
||||
private:
|
||||
bool m_centerRequested;
|
||||
public:
|
||||
virtual Vector2D<float> GetPosition(int32_t fontId, bool& centerRequested);
|
||||
private:
|
||||
bool TextDMoveUp(int32_t offset);
|
||||
bool TextDMoveDown(int32_t offset);
|
||||
void SetInsertPosition(int32_t newPosition, bool insertChar = false);
|
||||
|
||||
void GetMousePosition(int32_t width, int32_t height, int32_t &x, int32_t &y);
|
||||
void MoveUpDown(int32_t ofset);
|
||||
void DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY,char *myPrint, int32_t lineNumber, int32_t positionY);
|
||||
int32_t GetMousePosition(int32_t fontId, int32_t width, int32_t height);
|
||||
|
||||
void CursorDisplay(ewol::OObject2DColored* OOColored, int32_t x, int32_t y, int32_t letterHeight, int32_t letterWidth);
|
||||
void DrawLineNumber(ewol::OObject2DTextColored* OOText, ewol::OObject2DColored* OOColored, int32_t sizeX, int32_t sizeY, int32_t nbColomn, int32_t lineNumber, int32_t positionY);
|
||||
void DrawCursor(ewol::OObject2DColored* OOColored, int32_t x, int32_t y, int32_t letterHeight, int32_t letterWidth, clipping_ts &clip);
|
||||
|
||||
};
|
||||
|
@@ -23,8 +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>
|
||||
|
||||
|
||||
@@ -54,22 +56,14 @@ 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;
|
||||
m_charsetType = EDN_CHARSET_ISO_8859_15;
|
||||
m_charsetType = unicode::EDN_CHARSET_ISO_8859_15;
|
||||
|
||||
m_isUndoProcessing = false;
|
||||
m_isRedoProcessing = false;
|
||||
@@ -77,7 +71,6 @@ EdnBuf::EdnBuf(void)
|
||||
// basicly no HL system ...
|
||||
m_Highlight = NULL;
|
||||
m_nbLine = 1;
|
||||
m_HLDataSequence = 0;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -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;
|
||||
}
|
||||
@@ -468,7 +530,7 @@ int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, char outUTF8[MAX_E
|
||||
tmpString[6] = '\0';
|
||||
uint8_t size;
|
||||
bool baseValid;
|
||||
Utf8_SizeElement(tmpString, 6 , size, baseValid);
|
||||
unicode::Utf8_SizeElement(tmpString, 6 , size, baseValid);
|
||||
currentChar = 0; // TODO : Set UNICODE char ...
|
||||
if (true == baseValid) {
|
||||
char *tmp = outUTF8;
|
||||
@@ -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);
|
||||
@@ -488,6 +550,119 @@ int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, char outUTF8[MAX_E
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Transform the current caracter in the buffer in a displayable vector of char
|
||||
*
|
||||
* @param[in,out] pos position of the char that might be converted (incremented to the next char (in case of UTF8)
|
||||
* @param[in] indent Curent indentation befor the curent char
|
||||
* @param[out] outUTF8 string of the displayed element
|
||||
* @param[out] currentChar curent unicode output char
|
||||
*
|
||||
* @return number of displayable char (display char width)
|
||||
*
|
||||
*/
|
||||
int32_t EdnBuf::GetExpandedChar(int32_t &pos, int32_t indent, uniChar_t outUnicode[MAX_EXP_CHAR_LEN], uint32_t ¤tChar)
|
||||
{
|
||||
int32_t i, nSpaces;
|
||||
char c = m_data.Get(pos);
|
||||
currentChar = (uint32_t)c & 0xFF;
|
||||
/* Convert tabs to spaces */
|
||||
if (c == '\t') {
|
||||
nSpaces = m_tabDist - (indent % m_tabDist);
|
||||
for (i=0; i<nSpaces; i++) {
|
||||
outUnicode[i] = ' ';
|
||||
}
|
||||
outUnicode[i] = '\0';
|
||||
pos++;
|
||||
return nSpaces;
|
||||
}
|
||||
|
||||
// Convert ASCII control codes to readable character sequences
|
||||
if (c == '\0') {
|
||||
outUnicode[0] = '<';
|
||||
outUnicode[1] = 'n';
|
||||
outUnicode[2] = 'u';
|
||||
outUnicode[3] = 'l';
|
||||
outUnicode[4] = '>';
|
||||
outUnicode[5] = '\0';
|
||||
pos++;
|
||||
return 5;
|
||||
}
|
||||
if (((unsigned char)c) == '\n') {
|
||||
outUnicode[0] = (unsigned char)c;
|
||||
outUnicode[1] = '\0';
|
||||
pos++;
|
||||
return 1;
|
||||
}
|
||||
if (((unsigned char)c) <= 31) {
|
||||
const char * tmp = ControlCodeTable[(unsigned char)c];
|
||||
int32_t nbElem = 2;
|
||||
*outUnicode++ = '<';
|
||||
while (*tmp!='\0') {
|
||||
*outUnicode++ = *tmp;
|
||||
tmp++;
|
||||
nbElem++;
|
||||
}
|
||||
*outUnicode++ = '>';
|
||||
*outUnicode++ = '\0';
|
||||
pos++;
|
||||
return nbElem;
|
||||
} else if (c == 127) {
|
||||
outUnicode[0] = '<';
|
||||
outUnicode[1] = 'd';
|
||||
outUnicode[2] = 'e';
|
||||
outUnicode[3] = 'l';
|
||||
outUnicode[4] = '>';
|
||||
outUnicode[5] = '\0';
|
||||
pos++;
|
||||
return 5;
|
||||
}
|
||||
// clear all the data ...
|
||||
memset(outUnicode, 0, sizeof(uniChar_t)*MAX_EXP_CHAR_LEN);
|
||||
|
||||
// Otherwise, just return the character
|
||||
if (false ==m_isUtf8) {
|
||||
unicode::convertIsoToUnicode(m_charsetType, c, outUnicode[0]);
|
||||
pos++;
|
||||
} else {
|
||||
char tmpString[8];
|
||||
for (int32_t k=0; k<6 && k< m_data.Size() - pos; k++) {
|
||||
tmpString[k] = m_data.Get(pos+k);
|
||||
}
|
||||
tmpString[6] = '\0';
|
||||
uint8_t size;
|
||||
bool baseValid;
|
||||
unicode::Utf8_SizeElement(tmpString, 6 , size, baseValid);
|
||||
currentChar = 0;
|
||||
if (true == baseValid) {
|
||||
char tmp[20];
|
||||
for (int32_t kkk=0; kkk<size; kkk++) {
|
||||
tmp[kkk] = tmpString[kkk];
|
||||
tmp[kkk+1] = '\0';
|
||||
}
|
||||
unicode::convertUtf8ToUnicode(tmp, outUnicode[0]);
|
||||
outUnicode[1] = 0;
|
||||
} else {
|
||||
outUnicode[0] = '<';
|
||||
outUnicode[1] = '?';
|
||||
outUnicode[2] = '?';
|
||||
outUnicode[3] = '?';
|
||||
outUnicode[4] = '>';
|
||||
outUnicode[5] = 0;
|
||||
}
|
||||
if (0 == size) {
|
||||
APPL_ERROR("plop");
|
||||
}
|
||||
pos+=size;
|
||||
int32_t outSize = 0;
|
||||
while (outUnicode[outSize]!=0) {
|
||||
outSize++;
|
||||
}
|
||||
return outSize;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief generate the real display of character of the output (ex : \t ==> 4 spaces or less ...)
|
||||
@@ -545,7 +720,7 @@ int32_t EdnBuf::ExpandCharacter(char c, int32_t indent, char outUTF8[MAX_EXP_CHA
|
||||
|
||||
// Otherwise, just return the character
|
||||
//*outStr = c; // deprecated
|
||||
convertIsoToUtf8(EDN_CHARSET_ISO_8859_15, c, outUTF8);
|
||||
convertIsoToUtf8(unicode::EDN_CHARSET_ISO_8859_15, c, outUTF8);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -592,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;
|
||||
}
|
||||
|
||||
@@ -727,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();
|
||||
}
|
||||
|
||||
@@ -760,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;
|
||||
@@ -769,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;
|
||||
}
|
||||
|
||||
@@ -791,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;
|
||||
}
|
||||
}
|
||||
@@ -810,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)) {
|
||||
@@ -831,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;
|
||||
}
|
||||
|
||||
@@ -851,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)) {
|
||||
@@ -871,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;
|
||||
}
|
||||
|
||||
@@ -887,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;
|
||||
}
|
||||
|
||||
@@ -901,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];
|
||||
@@ -923,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];
|
||||
@@ -942,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];
|
||||
@@ -977,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);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@@ -1004,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) {
|
@@ -34,7 +34,7 @@ class EdnBuf;
|
||||
#include <EdnVectorBuf.h>
|
||||
#include <EdnBufHistory.h>
|
||||
#include <HighlightManager.h>
|
||||
#include <charset.h>
|
||||
#include <etk/unicode.h>
|
||||
|
||||
/*
|
||||
|
||||
@@ -58,17 +58,8 @@ typedef struct {
|
||||
int32_t rectEnd; //!< Indent of right edge of rect. selection
|
||||
} selection;
|
||||
|
||||
typedef enum{
|
||||
SELECTION_PRIMARY,
|
||||
SELECTION_SECONDARY,
|
||||
SELECTION_HIGHTLIGHT,
|
||||
SELECTION_SIZE
|
||||
}selectionType_te;
|
||||
|
||||
|
||||
typedef struct {
|
||||
etk::VectorType<colorInformation_ts> HLData;
|
||||
int32_t idSequence;
|
||||
int32_t posHLPass1;
|
||||
int32_t posHLPass2;
|
||||
}displayHLData_ts;
|
||||
@@ -76,6 +67,7 @@ typedef struct {
|
||||
|
||||
|
||||
class EdnBuf {
|
||||
// TODO : Set an iterator to acces at every data without knowin the system ...
|
||||
public:
|
||||
// constructer
|
||||
EdnBuf(void);
|
||||
@@ -85,24 +77,28 @@ 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);
|
||||
int32_t StartOfLine( int32_t pos);
|
||||
int32_t EndOfLine( int32_t pos);
|
||||
|
||||
int32_t GetExpandedChar( int32_t &pos, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN], uint32_t ¤tChar);
|
||||
int32_t ExpandCharacter( char c, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN]); // TODO : rework this
|
||||
int32_t CharWidth( char c, int32_t indent); // TODO : rework this
|
||||
int32_t GetExpandedChar( int32_t &pos, int32_t indent, uniChar_t outUnicode[MAX_EXP_CHAR_LEN], uint32_t ¤tChar);
|
||||
int32_t GetExpandedChar( int32_t &pos, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN], uint32_t ¤tChar);
|
||||
int32_t ExpandCharacter( char c, int32_t indent, char outUTF8[MAX_EXP_CHAR_LEN]); // TODO : Remove
|
||||
int32_t CharWidth( char c, int32_t indent); // TODO : rework this
|
||||
int32_t CountDispChars( int32_t lineStartPos, int32_t targetPos);
|
||||
int32_t CountForwardDispChars( int32_t lineStartPos, int32_t nChars);
|
||||
int32_t CountLines( int32_t startPos, int32_t endPos);
|
||||
@@ -111,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 :
|
||||
@@ -157,7 +154,6 @@ class EdnBuf {
|
||||
private:
|
||||
Highlight * m_Highlight; //!< internal link with the Highlight system
|
||||
etk::VectorType<colorInformation_ts> m_HLDataPass1; //!< colorisation position in the current buffer pass 1
|
||||
int32_t m_HLDataSequence; //!< position of the start of line requested by the screen viewer
|
||||
void RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdded);
|
||||
void GenerateHighLightAt(int32_t pos, int32_t endPos, int32_t addinPos=0);
|
||||
void CleanHighLight(void);
|
||||
@@ -178,19 +174,19 @@ class EdnBuf {
|
||||
// Display property and charset ...
|
||||
// -----------------------------------------
|
||||
public:
|
||||
int32_t GetTabDistance(void) { return m_tabDist; } ;
|
||||
void SetTabDistance(int32_t tabDist) { m_tabDist = tabDist; };
|
||||
charset_te GetCharsetType(void) { return m_charsetType; };
|
||||
void SetCharsetType(charset_te newOne) { m_charsetType = newOne; if (EDN_CHARSET_UTF8==newOne){m_isUtf8=true;} else {m_isUtf8=false;} };
|
||||
bool GetUTF8Mode(void) { return m_isUtf8; };
|
||||
void SetUTF8Mode(bool newOne) { m_isUtf8 = newOne; m_charsetType=EDN_CHARSET_UTF8; };
|
||||
int32_t GetTabDistance(void) { return m_tabDist; } ;
|
||||
void SetTabDistance(int32_t tabDist) { m_tabDist = tabDist; };
|
||||
unicode::charset_te GetCharsetType(void) { return m_charsetType; };
|
||||
void SetCharsetType(unicode::charset_te newOne) { m_charsetType = newOne; if (unicode::EDN_CHARSET_UTF8==newOne){m_isUtf8=true;} else {m_isUtf8=false;} };
|
||||
bool GetUTF8Mode(void) { return m_isUtf8; };
|
||||
void SetUTF8Mode(bool newOne) { m_isUtf8 = newOne; m_charsetType=unicode::EDN_CHARSET_UTF8; };
|
||||
private:
|
||||
// Special mode of the buffer :
|
||||
bool m_isUtf8; //!< true if we are in UTF8 mode ==> if true the size of a char is 0, otherwise .. 1->4 ( TODO : not now)
|
||||
charset_te m_charsetType; //!< if UTF8 mode is at false : the charset type of the buffer
|
||||
bool m_isUtf8; //!< true if we are in UTF8 mode ==> if true the size of a char is 0, otherwise .. 1->4 ( TODO : not now)
|
||||
unicode::charset_te m_charsetType; //!< if UTF8 mode is at false : the charset type of the buffer
|
||||
// Local Tabulation policies
|
||||
int32_t m_tabDist; //!< equiv. number of characters in a tab
|
||||
bool m_useTabs; //!< True if buffer routines are allowed to use tabs for padding in rectangular operations
|
||||
int32_t m_tabDist; //!< equiv. number of characters in a tab
|
||||
bool m_useTabs; //!< True if buffer routines are allowed to use tabs for padding in rectangular operations
|
||||
|
||||
// -----------------------------------------
|
||||
// Local function :
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -46,9 +46,6 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
//GTimeVal timeStart;
|
||||
//g_get_current_time(&timeStart);
|
||||
|
||||
// remove display HL...
|
||||
m_HLDataSequence++;
|
||||
|
||||
// prevent ERROR...
|
||||
if (NULL == m_Highlight) {
|
||||
return;
|
||||
@@ -60,15 +57,15 @@ 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++) {
|
||||
etk::String ploppp;
|
||||
etk::UString ploppp;
|
||||
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;
|
||||
@@ -88,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::String ploppp;
|
||||
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 :
|
||||
@@ -123,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;
|
||||
@@ -133,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 {
|
||||
@@ -151,16 +148,16 @@ void EdnBuf::RegenerateHighLightAt(int32_t pos, int32_t nbDeleted, int32_t nbAdd
|
||||
}
|
||||
/*
|
||||
for (i=0; i< (int32_t)m_HLDataPass1.Size(); i++) {
|
||||
etk::String ploppp;
|
||||
etk::UString ploppp;
|
||||
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)
|
||||
@@ -235,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);
|
||||
}
|
||||
*/
|
||||
}
|
||||
@@ -255,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);
|
||||
}
|
||||
|
||||
@@ -271,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
|
||||
@@ -287,7 +284,6 @@ colorInformation_ts *EdnBuf::GetElementColorAtPosition(int32_t pos, int32_t &sta
|
||||
}
|
||||
|
||||
|
||||
|
||||
void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart, int32_t nbLines)
|
||||
{
|
||||
MData.posHLPass1 = 0;
|
||||
@@ -295,65 +291,62 @@ void EdnBuf::HightlightGenerateLines(displayHLData_ts & MData, int32_t HLStart,
|
||||
if (NULL == m_Highlight) {
|
||||
return;
|
||||
}
|
||||
if (MData.idSequence != m_HLDataSequence) {
|
||||
//GTimeVal timeStart;
|
||||
//g_get_current_time(&timeStart);
|
||||
MData.idSequence = m_HLDataSequence;
|
||||
HLStart = StartOfLine(HLStart);
|
||||
MData.HLData.Clear();
|
||||
int32_t HLStop = CountForwardNLines(HLStart, nbLines);
|
||||
int32_t startId, stopId;
|
||||
// find element previous
|
||||
FindMainHighLightPosition(HLStart, HLStop, startId, stopId, true);
|
||||
//GTimeVal timeStart;
|
||||
//g_get_current_time(&timeStart);
|
||||
HLStart = StartOfLine(HLStart);
|
||||
MData.HLData.Clear();
|
||||
int32_t HLStop = CountForwardNLines(HLStart, nbLines);
|
||||
int32_t startId, stopId;
|
||||
// find element previous
|
||||
FindMainHighLightPosition(HLStart, HLStop, startId, stopId, true);
|
||||
|
||||
int32_t k;
|
||||
//EDN_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++) {
|
||||
// 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 );
|
||||
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 );
|
||||
m_Highlight->Parse2(m_HLDataPass1[k-1].endStop,
|
||||
int32_t k;
|
||||
//APPL_DEBUG("List of section between : "<< startId << " & " << stopId);
|
||||
int32_t endSearch = stopId+1;
|
||||
if (-1 == stopId) {
|
||||
endSearch = m_HLDataPass1.Size();
|
||||
}
|
||||
for (k=etk_max(startId, 0); k<endSearch; k++) {
|
||||
// empty section :
|
||||
if (0==k) {
|
||||
if (HLStart < 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);
|
||||
}
|
||||
// under section :
|
||||
//EDN_DEBUG(" ==> (under section ) k="<<k<<" start="<<m_HLDataPass1[k].beginStart<<" stop="<<m_HLDataPass1[k].endStop << " subSectionOfID=" << 99999999);
|
||||
// TODO : ...
|
||||
} // else : nothing to do ...
|
||||
} else {
|
||||
//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);
|
||||
}
|
||||
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 );
|
||||
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 );
|
||||
m_Highlight->Parse2(0,
|
||||
HLStop,
|
||||
MData.HLData,
|
||||
m_data);
|
||||
}
|
||||
}
|
||||
|
||||
//GTimeVal timeStop;
|
||||
//g_get_current_time(&timeStop);
|
||||
//EDN_DEBUG("Display reAnnalyse = " << timeStop.tv_usec - timeStart.tv_usec << " micro-s");
|
||||
// under section :
|
||||
//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) {
|
||||
//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 {
|
||||
//APPL_DEBUG(" ==> (empty section 4 ) k="<<k<<" start=0 stop="<<HLStop );
|
||||
m_Highlight->Parse2(0,
|
||||
HLStop,
|
||||
MData.HLData,
|
||||
m_data);
|
||||
}
|
||||
}
|
||||
|
||||
//GTimeVal timeStop;
|
||||
//g_get_current_time(&timeStop);
|
||||
//APPL_DEBUG("Display reAnnalyse = " << timeStop.tv_usec - timeStart.tv_usec << " micro-s");
|
||||
|
||||
}
|
||||
|
||||
@@ -361,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
|
||||
@@ -374,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>
|
||||
|
||||
|
||||
@@ -32,45 +32,33 @@
|
||||
#define __class__ "Colorize"
|
||||
|
||||
|
||||
Colorize::Colorize( etk::String &newColorName)
|
||||
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,18 +69,18 @@ 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::String &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;
|
||||
}
|
||||
|
||||
|
||||
etk::String Colorize::GetName(void)
|
||||
etk::UString Colorize::GetName(void)
|
||||
{
|
||||
return ColorName;
|
||||
}
|
||||
@@ -101,38 +89,15 @@ etk::String 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,18 +25,18 @@
|
||||
|
||||
#ifndef __COLORIZE_H__
|
||||
#define __COLORIZE_H__
|
||||
|
||||
#include <etk/UString.h>
|
||||
|
||||
class Colorize {
|
||||
public:
|
||||
// Constructeur
|
||||
Colorize(void);
|
||||
Colorize(etk::String &newColorName);
|
||||
Colorize(etk::UString &newColorName);
|
||||
~Colorize(void);
|
||||
|
||||
void SetName(etk::String &newColorName);
|
||||
void SetName(etk::UString &newColorName);
|
||||
void SetName(const char *newColorName);
|
||||
etk::String GetName(void);
|
||||
etk::UString GetName(void);
|
||||
void SetFgColor(const char *myColor);
|
||||
void SetBgColor(const char *myColor);
|
||||
|
||||
@@ -50,10 +50,10 @@ class Colorize {
|
||||
bool GetItalic(void);
|
||||
bool GetBold(void);
|
||||
|
||||
void Display(int32_t i) { EDN_INFO(" " << i << " : \"" << ColorName.c_str() << "\"" << " 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::String ColorName; //!< curent color Name
|
||||
etk::UString ColorName; //!< curent color Name
|
||||
color_ts m_colorFG;
|
||||
color_ts m_colorBG;
|
||||
|
482
jni/appl/Colorize/ColorizeManager.cpp
Normal file
@@ -0,0 +1,482 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file ColorizeManager.cpp
|
||||
* @brief Editeur De N'ours : Colorising Manager
|
||||
* @author Edouard DUPIN
|
||||
* @date 14/12/2010
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <tinyXML/tinyxml.h>
|
||||
#include <ewol/EObject.h>
|
||||
#include <ewol/EObjectManager.h>
|
||||
|
||||
#define PFX "ColorizeManager "
|
||||
|
||||
|
||||
//!< EObject name :
|
||||
extern const char * const TYPE_EOBJECT_EDN_COLORIZE_MANAGER = "ColorizeManager";
|
||||
|
||||
class classColorManager: public ewol::EObject
|
||||
{
|
||||
public:
|
||||
// Constructeur
|
||||
classColorManager(void);
|
||||
~classColorManager(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_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
|
||||
* @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);
|
||||
public:
|
||||
void LoadFile(etk::UString &xmlFilename);
|
||||
void LoadFile(const char * xmlFilename);
|
||||
Colorize * Get(const char *colorName);
|
||||
Colorize * Get(etk::UString &colorName);
|
||||
color_ts & Get(basicColor_te myColor);
|
||||
bool Exist(etk::UString &colorName);
|
||||
bool Exist(const char *colorName);
|
||||
void DisplayListOfColor(void);
|
||||
|
||||
private:
|
||||
etk::UString m_fileColor;
|
||||
etk::VectorType<Colorize*> listMyColor; //!< List of ALL Color
|
||||
Colorize * errorColor;
|
||||
color_ts basicColors[COLOR_NUMBER_MAX];
|
||||
};
|
||||
|
||||
#define EDN_CAST_COLORIZE_MANAGER(curentPointer) EWOL_CAST(TYPE_EOBJECT_EDN_COLORIZE_MANAGER,classColorManager,curentPointer)
|
||||
|
||||
|
||||
classColorManager::classColorManager(void)
|
||||
{
|
||||
//ewol::widgetMessageMultiCast::Add(GetWidgetId(), ednMsgGuiChangeColor);
|
||||
}
|
||||
|
||||
classColorManager::~classColorManager(void)
|
||||
{
|
||||
delete(errorColor);
|
||||
|
||||
int32_t i;
|
||||
// clean all Element
|
||||
for (i=0; i< listMyColor.Size(); i++) {
|
||||
if (NULL != listMyColor[i]) {
|
||||
delete(listMyColor[i]);
|
||||
listMyColor[i] = NULL;
|
||||
}
|
||||
}
|
||||
// clear the compleate list
|
||||
listMyColor.Clear();
|
||||
}
|
||||
|
||||
void classColorManager::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
case APPL_MSG__RELOAD_COLOR_FILE:
|
||||
{
|
||||
// Reaload File
|
||||
// TODO : Check this : Pb in the recopy etk::UString element
|
||||
etk::UString plop = m_fileColor;
|
||||
LoadFile(plop);
|
||||
}
|
||||
break;
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
void classColorManager::LoadFile(etk::UString &xmlFilename)
|
||||
{
|
||||
// TODO : Remove this
|
||||
LoadFile(xmlFilename.Utf8Data());
|
||||
}
|
||||
|
||||
// TODO : Remove this ...
|
||||
void classColorManager::LoadFile(const char * xmlFilename)
|
||||
{
|
||||
// Remove all old color :
|
||||
int32_t i;
|
||||
// clean all Element
|
||||
for (i=0; i< listMyColor.Size(); i++) {
|
||||
if (NULL != listMyColor[i]) {
|
||||
delete(listMyColor[i]);
|
||||
listMyColor[i] = NULL;
|
||||
}
|
||||
}
|
||||
// clear the compleate list
|
||||
listMyColor.Clear();
|
||||
|
||||
m_fileColor = xmlFilename;
|
||||
APPL_DEBUG("open file (COLOR) \"" << xmlFilename << "\" ? = \"" << m_fileColor << "\"");
|
||||
errorColor = new Colorize();
|
||||
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()) {
|
||||
APPL_ERROR("File Does not exist : " << fileName);
|
||||
return;
|
||||
}
|
||||
int32_t fileSize = fileName.Size();
|
||||
if (0==fileSize) {
|
||||
APPL_ERROR("This file is empty : " << fileName);
|
||||
return;
|
||||
}
|
||||
if (false == fileName.fOpenRead()) {
|
||||
APPL_ERROR("Can not open the file : " << fileName);
|
||||
return;
|
||||
}
|
||||
// allocate data
|
||||
char * fileBuffer = new char[fileSize+5];
|
||||
if (NULL == fileBuffer) {
|
||||
APPL_ERROR("Error Memory allocation size=" << fileSize);
|
||||
return;
|
||||
}
|
||||
memset(fileBuffer, 0, (fileSize+5)*sizeof(char));
|
||||
// load data from the file :
|
||||
fileName.fRead(fileBuffer, 1, fileSize);
|
||||
// close the file:
|
||||
fileName.fClose();
|
||||
// load the XML from the memory
|
||||
XmlDocument.Parse((const char*)fileBuffer, 0, TIXML_ENCODING_UTF8);
|
||||
|
||||
TiXmlElement* root = XmlDocument.FirstChildElement( "EdnColor" );
|
||||
if (NULL == root ) {
|
||||
APPL_ERROR(PFX"(l ?) main node not find: \"EdnColor\" in \"" << xmlFilename << "\"");
|
||||
return;
|
||||
} else {
|
||||
TiXmlNode * pNode = root->FirstChild();
|
||||
while(NULL != pNode) {
|
||||
if (pNode->Type()==TiXmlNode::TINYXML_COMMENT) {
|
||||
// nothing to do, just proceed to next step
|
||||
} else if (!strcmp(pNode->Value(), "gui")) {
|
||||
TiXmlNode * pGuiNode = pNode->FirstChild();
|
||||
while(NULL != pGuiNode) {
|
||||
if (pGuiNode->Type()==TiXmlNode::TINYXML_COMMENT) {
|
||||
// nothing to do, just proceed to next step
|
||||
} else if (!strcmp(pGuiNode->Value(), "color")) {
|
||||
//--------------------------------------------------------------------------------------------
|
||||
//<color name="basicBackground" val="#000000"/>
|
||||
//--------------------------------------------------------------------------------------------
|
||||
const char *colorName = pGuiNode->ToElement()->Attribute("name");
|
||||
int32_t id = 0;
|
||||
if (NULL == colorName) {
|
||||
APPL_ERROR("(l "<< pGuiNode->Row() <<") node with no name");
|
||||
// get next node element
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(colorName, "CODE_space")) {
|
||||
id = COLOR_CODE_SPACE;
|
||||
} else if (!strcmp(colorName, "CODE_tabulation")) {
|
||||
id = COLOR_CODE_TAB;
|
||||
} else if (!strcmp(colorName, "CODE_basicBackgroung")) {
|
||||
id = COLOR_CODE_BASIC_BG;
|
||||
} else if (!strcmp(colorName, "CODE_cursor")) {
|
||||
id = COLOR_CODE_CURSOR;
|
||||
} else if (!strcmp(colorName, "CODE_lineNumber")) {
|
||||
id = COLOR_CODE_LINE_NUMBER;
|
||||
} else if (!strcmp(colorName, "LIST_backgroung1")) {
|
||||
id = COLOR_LIST_BG_1;
|
||||
} else if (!strcmp(colorName, "LIST_backgroung2")) {
|
||||
id = COLOR_LIST_BG_2;
|
||||
} else if (!strcmp(colorName, "LIST_backgroungSelected")) {
|
||||
id = COLOR_LIST_BG_SELECTED;
|
||||
} else if (!strcmp(colorName, "LIST_textNormal")) {
|
||||
id = COLOR_LIST_TEXT_NORMAL;
|
||||
} else if (!strcmp(colorName, "LIST_textModify")) {
|
||||
id = COLOR_LIST_TEXT_MODIFY;
|
||||
} else {
|
||||
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) {
|
||||
basicColors[id] = etk::color::Parse(color);
|
||||
}
|
||||
} else {
|
||||
APPL_ERROR("(l "<<pGuiNode->Row()<<") node not suported : \""<<pGuiNode->Value()<<"\" must be [color]");
|
||||
}
|
||||
// get next node element
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
}
|
||||
} else if (!strcmp(pNode->Value(), "syntax")) {
|
||||
TiXmlNode * pGuiNode = pNode->FirstChild();
|
||||
while(NULL != pGuiNode)
|
||||
{
|
||||
if (pGuiNode->Type()==TiXmlNode::TINYXML_COMMENT) {
|
||||
// nothing to do, just proceed to next step
|
||||
} else if (!strcmp(pGuiNode->Value(), "color")) {
|
||||
Colorize *myNewColor = new Colorize();
|
||||
//--------------------------------------------------------------------------------------------
|
||||
//<color name="basicBackground" FG="#000000" BG="#000000" bold="no" italic="no"/>
|
||||
//--------------------------------------------------------------------------------------------
|
||||
// get the name of the Chaine
|
||||
const char *colorName = pGuiNode->ToElement()->Attribute("name");
|
||||
if (NULL == colorName) {
|
||||
APPL_ERROR(PFX"(l "<< pGuiNode->Row() <<") node with no name");
|
||||
// get next node element
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
continue;
|
||||
} else {
|
||||
myNewColor->SetName(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") ) {
|
||||
myNewColor->SetItalic(true);
|
||||
}
|
||||
}
|
||||
listMyColor.PushBack(myNewColor);
|
||||
} else {
|
||||
APPL_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [color]");
|
||||
}
|
||||
pGuiNode = pGuiNode->NextSibling();
|
||||
}
|
||||
} else {
|
||||
APPL_ERROR(PFX"(l "<<pNode->Row()<<") node not suported : \""<<pNode->Value()<<"\" must be [gui,syntax]");
|
||||
}
|
||||
// get next node element
|
||||
pNode = pNode->NextSibling();
|
||||
}
|
||||
}
|
||||
if (NULL != fileBuffer) {
|
||||
delete[] fileBuffer;
|
||||
}
|
||||
//SendMessage(APPL_MSG__COLOR_HAS_CHANGE);
|
||||
//SendMessage(APPL_MSG__USER_DISPLAY_CHANGE);
|
||||
}
|
||||
|
||||
// TODO : Remove this ...
|
||||
Colorize *classColorManager::Get(const char *colorName)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<listMyColor.Size(); i++) {
|
||||
etk::UString elementName = listMyColor[i]->GetName();
|
||||
if (elementName == colorName) {
|
||||
return listMyColor[i];
|
||||
}
|
||||
}
|
||||
APPL_ERROR(PFX"Color does not Existed ["<< colorName<<"]" );
|
||||
// an error
|
||||
return errorColor;
|
||||
}
|
||||
|
||||
Colorize *classColorManager::Get(etk::UString &colorName)
|
||||
{
|
||||
// TODO : Remove this
|
||||
return Get(colorName.Utf8Data());
|
||||
}
|
||||
|
||||
color_ts & classColorManager::Get(basicColor_te myColor)
|
||||
{
|
||||
if (myColor < COLOR_NUMBER_MAX) {
|
||||
return basicColors[myColor];
|
||||
} else {
|
||||
return basicColors[0];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// TODO : Remove this ...
|
||||
bool classColorManager::Exist(const char *colorName)
|
||||
{
|
||||
int32_t i;
|
||||
for (i=0; i<listMyColor.Size(); i++) {
|
||||
etk::UString elementName = listMyColor[i]->GetName();
|
||||
if (elementName == colorName) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
bool classColorManager::Exist(etk::UString &colorName)
|
||||
{
|
||||
// TODO : Remove this
|
||||
return Exist(colorName.Utf8Data());
|
||||
}
|
||||
|
||||
void classColorManager::DisplayListOfColor(void)
|
||||
{
|
||||
int32_t i;
|
||||
APPL_INFO(PFX"List of ALL COLOR : ");
|
||||
for (i=0; i<listMyColor.Size(); i++) {
|
||||
//etk::UString elementName = listMyColor[i]->GetName();
|
||||
//APPL_INFO(i << " : \"" << elementName.c_str() << "\"" );
|
||||
listMyColor[i]->Display(i);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
static classColorManager * localManager = NULL;
|
||||
|
||||
|
||||
void ColorizeManager::Init(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("ColorizeManager ==> already exist, just unlink the previous ...");
|
||||
localManager = NULL;
|
||||
}
|
||||
localManager = new classColorManager();
|
||||
|
||||
if (NULL == localManager) {
|
||||
EWOL_CRITICAL("Allocation of HighlightManager not done ...");
|
||||
}
|
||||
}
|
||||
|
||||
void ColorizeManager::UnInit(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
EWOL_ERROR("ColorizeManager ==> request UnInit, but does not exist ...");
|
||||
return;
|
||||
}
|
||||
ewol::EObjectManager::MarkToRemoved(localManager);
|
||||
localManager = NULL;
|
||||
}
|
||||
|
||||
void ColorizeManager::LoadFile(etk::UString &xmlFilename)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return;
|
||||
}
|
||||
localManager->LoadFile(xmlFilename);
|
||||
}
|
||||
|
||||
|
||||
void ColorizeManager::LoadFile(const char * xmlFilename)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return;
|
||||
}
|
||||
localManager->LoadFile(xmlFilename);
|
||||
}
|
||||
|
||||
Colorize* ColorizeManager::Get(const char *colorName)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return NULL;
|
||||
}
|
||||
return localManager->Get(colorName);
|
||||
}
|
||||
|
||||
Colorize* ColorizeManager::Get(etk::UString &colorName)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return NULL;
|
||||
}
|
||||
return localManager->Get(colorName);
|
||||
}
|
||||
|
||||
color_ts errorColor;
|
||||
|
||||
color_ts& ColorizeManager::Get(basicColor_te myColor)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return errorColor;
|
||||
}
|
||||
return localManager->Get(myColor);
|
||||
}
|
||||
|
||||
bool ColorizeManager::Exist(etk::UString &colorName)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return false;
|
||||
}
|
||||
return localManager->Exist(colorName);
|
||||
}
|
||||
|
||||
bool ColorizeManager::Exist(const char *colorName)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return false;
|
||||
}
|
||||
return localManager->Exist(colorName);
|
||||
}
|
||||
|
||||
void ColorizeManager::DisplayListOfColor(void)
|
||||
{
|
||||
if (NULL == localManager) {
|
||||
return;
|
||||
}
|
||||
localManager->DisplayListOfColor();
|
||||
}
|
||||
|
||||
|
@@ -26,9 +26,9 @@
|
||||
#ifndef __COLORIZE_MANAGER_H__
|
||||
#define __COLORIZE_MANAGER_H__
|
||||
|
||||
#include <etk/Singleton.h>
|
||||
#include <Colorize.h>
|
||||
#include <MsgBroadcast.h>
|
||||
#include <appl/globalMsg.h>
|
||||
#include <ewol/Widget.h>
|
||||
|
||||
typedef enum {
|
||||
// BASIC color for codeViewer
|
||||
@@ -49,31 +49,18 @@ typedef enum {
|
||||
|
||||
|
||||
|
||||
class ColorizeManager: public etk::Singleton<ColorizeManager>, public MsgBroadcast
|
||||
namespace ColorizeManager
|
||||
{
|
||||
friend class etk::Singleton<ColorizeManager>;
|
||||
// specific for sigleton system...
|
||||
private:
|
||||
// Constructeur
|
||||
ColorizeManager(void);
|
||||
~ColorizeManager(void);
|
||||
public:
|
||||
void OnMessage(int32_t id, int32_t dataID);
|
||||
public:
|
||||
void LoadFile(etk::String &xmlFilename);
|
||||
void LoadFile(const char * xmlFilename);
|
||||
Colorize * Get(const char *colorName);
|
||||
Colorize * Get(etk::String &colorName);
|
||||
color_ts & Get(basicColor_te myColor);
|
||||
bool Exist(etk::String &colorName);
|
||||
bool Exist(const char *colorName);
|
||||
void DisplayListOfColor(void);
|
||||
|
||||
private:
|
||||
etk::String m_fileColor;
|
||||
etk::VectorType<Colorize*> listMyColor; //!< List of ALL Color
|
||||
Colorize * errorColor;
|
||||
color_ts basicColors[COLOR_NUMBER_MAX];
|
||||
void Init(void);
|
||||
void UnInit(void);
|
||||
void LoadFile(etk::UString &xmlFilename);
|
||||
void LoadFile(const char * xmlFilename);
|
||||
Colorize * Get(const char *colorName);
|
||||
Colorize * Get(etk::UString &colorName);
|
||||
color_ts & Get(basicColor_te myColor);
|
||||
bool Exist(etk::UString &colorName);
|
||||
bool Exist(const char *colorName);
|
||||
void DisplayListOfColor(void);
|
||||
};
|
||||
|
||||
#endif
|
@@ -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
|
203
jni/appl/Gui/BufferView.cpp
Normal file
@@ -0,0 +1,203 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferViewer.cpp
|
||||
* @brief Editeur De N'ours : main textViewer diplayer
|
||||
* @author Edouard DUPIN
|
||||
* @date 04/12/2010
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <BufferView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <MainWindows.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "BufferView"
|
||||
|
||||
|
||||
extern const char * const TYPE_EOBJECT_EDN_BUFFER_VIEW = "BufferView";
|
||||
|
||||
BufferView::BufferView(void)
|
||||
{
|
||||
SetCanHaveFocus(true);
|
||||
RegisterMultiCast(ednMsgBufferListChange);
|
||||
RegisterMultiCast(ednMsgBufferState);
|
||||
RegisterMultiCast(ednMsgBufferId);
|
||||
m_selectedID = -1;
|
||||
m_selectedIdRequested = -1;
|
||||
}
|
||||
|
||||
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
|
||||
* @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 BufferView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::List::OnReceiveMessage(CallerObject, eventId, data);
|
||||
if (eventId == ednMsgBufferListChange) {
|
||||
MarkToReedraw();
|
||||
}else if (eventId == ednMsgBufferId) {
|
||||
m_selectedIdRequested = BufferManager::GetSelected();
|
||||
MarkToReedraw();
|
||||
}else if (eventId == ednMsgBufferState) {
|
||||
MarkToReedraw();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
color_ts BufferView::GetBasicBG(void)
|
||||
{
|
||||
return ColorizeManager::Get(COLOR_LIST_BG_1);
|
||||
}
|
||||
|
||||
uint32_t BufferView::GetNuberOfColomn(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
bool BufferView::GetTitle(int32_t colomn, etk::UString &myTitle, color_ts &fg, color_ts &bg)
|
||||
{
|
||||
myTitle = "Buffers : ";
|
||||
return true;
|
||||
}
|
||||
|
||||
uint32_t BufferView::GetNuberOfRaw(void)
|
||||
{
|
||||
return BufferManager::SizeOpen();
|
||||
}
|
||||
|
||||
bool BufferView::GetElement(int32_t colomn, int32_t raw, etk::UString &myTextToWrite, color_ts &fg, color_ts &bg)
|
||||
{
|
||||
etk::File name;
|
||||
bool isModify;
|
||||
basicColor_te selectFG = COLOR_LIST_TEXT_NORMAL;
|
||||
basicColor_te selectBG = COLOR_LIST_BG_1;
|
||||
// when requested a new display selection ==> reset the previous one ...
|
||||
if (m_selectedIdRequested != -1) {
|
||||
m_selectedID = -1;
|
||||
}
|
||||
// transforme the ID in the real value ...
|
||||
int32_t realID = BufferManager::WitchBuffer(raw+1);
|
||||
if (BufferManager::Exist(realID)) {
|
||||
isModify = BufferManager::Get(realID)->IsModify();
|
||||
name = BufferManager::Get(realID)->GetFileName();
|
||||
|
||||
#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) {
|
||||
selectFG = COLOR_LIST_TEXT_MODIFY;
|
||||
} else {
|
||||
selectFG = COLOR_LIST_TEXT_NORMAL;
|
||||
}
|
||||
if (raw%2==0) {
|
||||
selectBG = COLOR_LIST_BG_1;
|
||||
} 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;
|
||||
}
|
||||
} else {
|
||||
myTextToWrite = "ERROR";
|
||||
}
|
||||
fg = ColorizeManager::Get(selectFG);
|
||||
bg = ColorizeManager::Get(selectBG);
|
||||
return true;
|
||||
}
|
||||
|
||||
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) {
|
||||
APPL_INFO("Event on List : IdInput=" << IdInput << " colomn=" << colomn << " raw=" << raw );
|
||||
int32_t selectBuf = BufferManager::WitchBuffer(raw+1);
|
||||
if ( 0 <= selectBuf) {
|
||||
m_selectedID = raw;
|
||||
SendMultiCast(ednMsgBufferId, selectBuf);
|
||||
}
|
||||
}
|
||||
MarkToReedraw();
|
||||
return false;
|
||||
}
|
||||
|
||||
|
82
jni/appl/Gui/BufferView.h
Normal file
@@ -0,0 +1,82 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file BufferView.h
|
||||
* @brief Editeur De N'ours : main List Buffer Viewer (header)
|
||||
* @author Edouard DUPIN
|
||||
* @date 09/12/2010
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#ifndef __BUFFER_VIEW_H__
|
||||
#define __BUFFER_VIEW_H__
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <CodeView.h>
|
||||
#include <BufferManager.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
|
||||
{
|
||||
public:
|
||||
// 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
|
||||
* @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);
|
||||
protected:
|
||||
// function call to display the list :
|
||||
virtual color_ts GetBasicBG(void);
|
||||
virtual uint32_t GetNuberOfColomn(void);
|
||||
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, 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
|
||||
|
||||
|
469
jni/appl/Gui/CodeView.cpp
Normal file
@@ -0,0 +1,469 @@
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file CodeView.cpp
|
||||
* @brief Editeur De N'ours : Code Viewer Widget
|
||||
* This is an abstraction
|
||||
* @author Edouard DUPIN
|
||||
* @date 05/01/2011
|
||||
* @par Project
|
||||
* Edn
|
||||
*
|
||||
* @par Copyright
|
||||
* Copyright 2010 Edouard DUPIN, all right reserved
|
||||
*
|
||||
* This software is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY.
|
||||
*
|
||||
* Licence summary :
|
||||
* You can modify and redistribute the sources code and binaries.
|
||||
* You can send me the bug-fix
|
||||
* You can not earn money with this Software (if the source extract from Edn
|
||||
* represent less than 50% of original Sources)
|
||||
* Term of the licence in in the file licence.txt.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
#include <CodeView.h>
|
||||
|
||||
#include <appl/Debug.h>
|
||||
#include <appl/global.h>
|
||||
#include <CodeView.h>
|
||||
#include <BufferManager.h>
|
||||
#include <ColorizeManager.h>
|
||||
#include <ewol/ClipBoard.h>
|
||||
#include <SearchData.h>
|
||||
|
||||
#include <ewol/WidgetManager.h>
|
||||
#include <ewol/EObject.h>
|
||||
|
||||
|
||||
#undef __class__
|
||||
#define __class__ "CodeView"
|
||||
|
||||
|
||||
extern const char * const TYPE_EOBJECT_EDN_CODE_VIEW = "CodeView";
|
||||
|
||||
CodeView::CodeView(void)
|
||||
{
|
||||
m_label = "CodeView is disable ...";
|
||||
m_fontNormal = -1;
|
||||
m_fontBold = -1;
|
||||
m_fontItalic = -1;
|
||||
m_fontBoldItalic = -1;
|
||||
m_fontSize = 15;
|
||||
|
||||
m_bufferID = -1;
|
||||
m_buttunOneSelected = false;
|
||||
|
||||
m_lineNumberList.Clear();
|
||||
|
||||
m_textColorFg = etk::color::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)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @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;
|
||||
m_minSize.y = 50;
|
||||
return true;
|
||||
}
|
||||
|
||||
void CodeView::CalculateMaxSize(void)
|
||||
{
|
||||
m_maxSize.x = 2048;
|
||||
int32_t letterHeight = ewol::GetHeight(m_fontNormal);
|
||||
m_maxSize.y = BufferManager::Get(m_bufferID)->GetNumberOfLine() * letterHeight;
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnDraw(void)
|
||||
{
|
||||
m_OObjectsColored[ m_currentDrawId].Draw();
|
||||
m_OObjectTextNormal[ m_currentDrawId].Draw();
|
||||
m_OObjectTextBold[ m_currentDrawId].Draw();
|
||||
m_OObjectTextItalic[ m_currentDrawId].Draw();
|
||||
m_OObjectTextBoldItalic[m_currentDrawId].Draw();
|
||||
WidgetScrooled::OnDraw();
|
||||
}
|
||||
|
||||
void CodeView::OnRegenerateDisplay(void)
|
||||
{
|
||||
if (true == NeedRedraw()) {
|
||||
int64_t startTime = GetCurrentTime();
|
||||
|
||||
// For the scrooling windows
|
||||
CalculateMaxSize();
|
||||
|
||||
// clean internal elements ...
|
||||
m_OObjectTextNormal[ m_currentCreateId].SetFontID(m_fontNormal);
|
||||
m_OObjectTextBold[ m_currentCreateId].SetFontID(m_fontBold);
|
||||
m_OObjectTextItalic[ m_currentCreateId].SetFontID(m_fontItalic);
|
||||
m_OObjectTextBoldItalic[m_currentCreateId].SetFontID(m_fontBoldItalic);
|
||||
|
||||
m_OObjectTextNormal[ m_currentCreateId].Clear();
|
||||
m_OObjectTextBold[ m_currentCreateId].Clear();
|
||||
m_OObjectTextItalic[ m_currentCreateId].Clear();
|
||||
m_OObjectTextBoldItalic[m_currentCreateId].Clear();
|
||||
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],
|
||||
m_OObjectTextItalic[m_currentCreateId],
|
||||
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();
|
||||
APPL_DEBUG("Display Code Generation = " << stopTime - startTime << " micro-s");
|
||||
|
||||
// call the herited class...
|
||||
WidgetScrooled::OnRegenerateDisplay();
|
||||
m_needFlipFlop = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::OnEventKb(ewol::eventKbType_te typeEvent, uniChar_t unicodeData)
|
||||
{
|
||||
//APPL_DEBUG("KB EVENT : \"" << UTF8_data << "\" size=" << strlen(UTF8_data) << "type=" << (int32_t)typeEvent);
|
||||
if (typeEvent == ewol::EVENT_KB_TYPE_DOWN) {
|
||||
BufferManager::Get(m_bufferID)->AddChar(unicodeData);
|
||||
MarkToReedraw();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CodeView::OnEventKbMove(ewol::eventKbType_te typeEvent, ewol::eventKbMoveType_te moveTypeEvent)
|
||||
{
|
||||
if (typeEvent == ewol::EVENT_KB_TYPE_DOWN) {
|
||||
BufferManager::Get(m_bufferID)->cursorMove(moveTypeEvent);
|
||||
MarkToReedraw();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Event on an input of this Widget
|
||||
* @param[in] type Type of the input (ewol::INPUT_TYPE_MOUSE/ewol::INPUT_TYPE_FINGER ...)
|
||||
* @param[in] IdInput Id of the current Input (PC : left=1, right=2, middle=3, none=0 / Tactil : first finger=1 , second=2 (only on this widget, no knowledge at ouside finger))
|
||||
* @param[in] typeEvent ewol type of event like EVENT_INPUT_TYPE_DOWN/EVENT_INPUT_TYPE_MOVE/EVENT_INPUT_TYPE_UP/EVENT_INPUT_TYPE_SINGLE/EVENT_INPUT_TYPE_DOUBLE/...
|
||||
* @param[in] pos Absolute position of the event
|
||||
* @return true the event is used
|
||||
* @return false the event is not used
|
||||
*/
|
||||
bool CodeView::OnEventInput(ewol::inputType_te type, int32_t IdInput, ewol::eventInputType_te typeEvent, Vector2D<float> pos)
|
||||
{
|
||||
Vector2D<float> relativePos = RelativePosition(pos);
|
||||
if (m_bufferID < 0) {
|
||||
return false;
|
||||
}
|
||||
if (true == WidgetScrooled::OnEventInput(type, IdInput, typeEvent, pos)) {
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
// nothing to do ... done on upper widget ...
|
||||
return true;
|
||||
}
|
||||
if (1 == IdInput) {
|
||||
#ifndef __MODE__Touch
|
||||
if (ewol::EVENT_INPUT_TYPE_DOWN == typeEvent) {
|
||||
m_buttunOneSelected = true;
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
BufferManager::Get(m_bufferID)->MouseEvent(m_fontNormal, relativePos.x+m_originScrooled.x, relativePos.y+m_originScrooled.y);
|
||||
MarkToReedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_UP == typeEvent) {
|
||||
m_buttunOneSelected = false;
|
||||
BufferManager::Get(m_bufferID)->Copy(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
MarkToReedraw();
|
||||
} else
|
||||
#endif
|
||||
if (ewol::EVENT_INPUT_TYPE_SINGLE == typeEvent) {
|
||||
#ifdef __MODE__Touch
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
BufferManager::Get(m_bufferID)->MouseEvent(m_fontNormal, relativePos.x+m_originScrooled.x, relativePos.y+m_originScrooled.y);
|
||||
MarkToReedraw();
|
||||
#else
|
||||
// nothing to do ...
|
||||
#endif
|
||||
} else if (ewol::EVENT_INPUT_TYPE_DOUBLE == typeEvent) {
|
||||
BufferManager::Get(m_bufferID)->MouseEventDouble();
|
||||
MarkToReedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_TRIPLE == typeEvent) {
|
||||
BufferManager::Get(m_bufferID)->MouseEventTriple();
|
||||
MarkToReedraw();
|
||||
} else if (ewol::EVENT_INPUT_TYPE_MOVE == typeEvent) {
|
||||
if (true == m_buttunOneSelected) {
|
||||
int xxx, yyy;
|
||||
xxx = relativePos.x;
|
||||
yyy = relativePos.y;
|
||||
if (xxx<0) {
|
||||
xxx = 0;
|
||||
}
|
||||
if (yyy<0) {
|
||||
yyy = 0;
|
||||
}
|
||||
//APPL_INFO("mouse-motion BT1 %d, %d", xxx, yyy);
|
||||
BufferManager::Get(m_bufferID)->MouseSelectFromCursorTo(m_fontNormal, xxx+m_originScrooled.x, yyy+m_originScrooled.y);
|
||||
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(ewol::clipBoard::CLIPBOARD_SELECTION);
|
||||
MarkToReedraw();
|
||||
ewol::widgetManager::FocusKeep(this);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @brief Receive a message from an other EObject with a specific eventId and data
|
||||
* @param[in] CallerObject Pointer on the EObject that information came from
|
||||
* @param[in] eventId Message registered by this class
|
||||
* @param[in] data Data registered by this class
|
||||
* @return ---
|
||||
*/
|
||||
void CodeView::OnReceiveMessage(ewol::EObject * CallerObject, const char * eventId, etk::UString data)
|
||||
{
|
||||
ewol::WidgetScrooled::OnReceiveMessage(CallerObject, eventId, data);
|
||||
APPL_DEBUG("Extern Event : " << CallerObject << " type : " << eventId << " data=\"" << data << "\"");
|
||||
|
||||
if(eventId == ednMsgBufferId) {
|
||||
//keep the reference of the display offset :
|
||||
if( m_bufferID >=0
|
||||
&& m_bufferID < m_lineNumberList.Size()) {
|
||||
m_lineNumberList[m_bufferID] = m_originScrooled;
|
||||
}
|
||||
int32_t bufferID = 0;
|
||||
sscanf(data.Utf8Data(), "%d", &bufferID);
|
||||
APPL_INFO("Select a new Buffer ... " << bufferID);
|
||||
// set the new buffer ID
|
||||
m_bufferID = bufferID;
|
||||
// update the start display position...
|
||||
UpdateNumberOfLineReference(m_bufferID);
|
||||
// set back if needed the display position ...
|
||||
if( m_bufferID >=0
|
||||
&& m_bufferID < m_lineNumberList.Size()) {
|
||||
m_originScrooled = m_lineNumberList[m_bufferID];
|
||||
}
|
||||
} else if (eventId == ednMsgGuiCopy) {
|
||||
BufferManager::Get(m_bufferID)->Copy(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiCut) {
|
||||
BufferManager::Get(m_bufferID)->Cut(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiPaste) {
|
||||
BufferManager::Get(m_bufferID)->Paste(ewol::clipBoard::CLIPBOARD_STD);
|
||||
} else if (eventId == ednMsgGuiUndo) {
|
||||
BufferManager::Get(m_bufferID)->Undo();
|
||||
} else if (eventId == ednMsgGuiRedo) {
|
||||
BufferManager::Get(m_bufferID)->Redo();
|
||||
} else if (eventId == ednMsgGuiRm) {
|
||||
// data : "Word" "Line" "Paragraph"
|
||||
if (data == "Word") {
|
||||
APPL_WARNING(" on event " << eventId << " data=\"" << data << "\" ==> not coded" );
|
||||
} else if (data == "Line") {
|
||||
BufferManager::Get(m_bufferID)->RemoveLine();
|
||||
} else if (data == "Paragraph") {
|
||||
APPL_WARNING(" on event " << eventId << " data=\"" << data << "\" ==> not coded" );
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiSelect) {
|
||||
// data : "ALL" "NONE"
|
||||
if (data == "ALL") {
|
||||
BufferManager::Get(m_bufferID)->SelectAll();
|
||||
} else if (data == "NONE") {
|
||||
BufferManager::Get(m_bufferID)->SelectNone();
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiChangeCharset) {
|
||||
// data : "UTF-8" "ISO-8859-1" "ISO-8859-15"
|
||||
if (data == "UTF-8") {
|
||||
BufferManager::Get(m_bufferID)->SetCharset(unicode::EDN_CHARSET_UTF8);
|
||||
} else if (data == "ISO-8859-1") {
|
||||
BufferManager::Get(m_bufferID)->SetCharset(unicode::EDN_CHARSET_ISO_8859_1);
|
||||
} else if (data == "ISO-8859-15") {
|
||||
BufferManager::Get(m_bufferID)->SetCharset(unicode::EDN_CHARSET_ISO_8859_15);
|
||||
} else {
|
||||
APPL_ERROR(" on event " << eventId << " unknow data=\"" << data << "\"" );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiFind) {
|
||||
etk::UString myDataString;
|
||||
SearchData::GetSearch(myDataString);
|
||||
if (data == "Next") {
|
||||
BufferManager::Get(m_bufferID)->Search(myDataString, false, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
} else if (data == "Previous") {
|
||||
BufferManager::Get(m_bufferID)->Search(myDataString, true, SearchData::GetCase(), SearchData::GetWrap(), SearchData::GetRegExp() );
|
||||
}
|
||||
} else if (eventId == ednMsgGuiReplace) {
|
||||
etk::UString myDataString;
|
||||
SearchData::GetReplace(myDataString);
|
||||
if (data == "Normal") {
|
||||
BufferManager::Get(m_bufferID)->Replace(myDataString);
|
||||
} else if (data == "All") {
|
||||
|
||||
}
|
||||
}
|
||||
/*
|
||||
switch (id)
|
||||
{
|
||||
case APPL_MSG__CURRENT_GOTO_LINE:
|
||||
if (dataID<0) {
|
||||
dataID = 0;
|
||||
}
|
||||
BufferManager::Get(m_bufferID)->JumpAtLine(dataID);
|
||||
break;
|
||||
case APPL_MSG__CURRENT_SET_CHARSET:
|
||||
BufferManager::Get(m_bufferID)->SetCharset((unicode::charset_te)dataID);
|
||||
break;
|
||||
}
|
||||
*/
|
||||
// Force redraw of the widget
|
||||
MarkToReedraw();
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnGetFocus(void)
|
||||
{
|
||||
/*
|
||||
ewol::widgetMessageMultiCast::Send(GetWidgetId(), ednMsgBufferId, m_bufferID);
|
||||
*/
|
||||
ewol::KeyboardShow(ewol::KEYBOARD_MODE_CODE);
|
||||
APPL_INFO("Focus - In");
|
||||
}
|
||||
|
||||
|
||||
void CodeView::OnLostFocus(void)
|
||||
{
|
||||
ewol::KeyboardHide();
|
||||
APPL_INFO("Focus - out");
|
||||
}
|
||||
|
||||
void CodeView::SetFontSize(int32_t size)
|
||||
{
|
||||
m_fontSize = size;
|
||||
SetScrollingSize(m_fontSize*3.0*1.46); // 1.46 is a magic nmber ...
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameNormal(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontNormal = fontID;
|
||||
}
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameBold(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontBold = fontID;
|
||||
}
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameItalic(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontItalic = fontID;
|
||||
}
|
||||
}
|
||||
|
||||
void CodeView::SetFontNameBoldItalic(etk::UString fontName)
|
||||
{
|
||||
int32_t fontID = ewol::LoadFont(fontName, m_fontSize);
|
||||
if (fontID >= 0) {
|
||||
m_fontBoldItalic = fontID;
|
||||
}
|
||||
}
|