Andy Williams
3f86407481
elm_code: consistently use 0 based text index
...
This means it's more familiar as regular string work when
using the elm_code_line APIs. It's also more distinct from
the elm_code_widget layout which is still 1 based columns.
To support unicode we must convert correctly.
Now FIXED!
2015-06-03 21:29:31 +01:00
Andy Williams
e3ed8806c3
elm_code: add legacy API.
...
Refactor eo API in line with elm_obj_* elsewhere
2015-06-02 08:22:36 +01:00
Andy Williams
247f940a18
Fixing make dist
2015-06-01 23:17:10 +01:00
Andy Williams
a993e3f7b5
Fix header location
2015-06-01 00:26:24 +01:00
Andy Williams
4d466dbc74
Fix many warnings.
...
Make the font face const char * and use eina_stringshare
2015-05-31 21:18:18 +01:00
Andy Williams
01fd2997d2
performance: Fix issue where EDI would slow down
...
a bad circular problem where an error with tooltips causes more
tooltips to be spawned...
2015-05-30 22:48:35 +01:00
Andy Williams
86d5afb25d
fix crash when deleting over a line ending
2015-05-30 20:46:34 +01:00
Andy Williams
10dc1c77bd
setting: Add a font picker
...
Monospace only so we get a deccent looking result.
Mostly from the terminology project - thanks guys
2015-05-30 10:32:37 +01:00
Andy Williams
05f6cd3eac
editor: trigger saves if selection cut or pasted
2015-05-30 10:31:46 +01:00
Andy Williams
f4c48d4ca9
elm_code: support setting custom fonts
...
For EDI create the config that would allow this to be altered.
Actual setting widget to follow...
2015-05-30 10:31:46 +01:00
Andy Williams
b68312de33
Fix deletion inserting random data.
...
Off by one error (doubled). Classic.
Lesson: Run the tests you write!
2015-05-29 13:10:25 +01:00
Andy Williams
ba2b0dd93f
selection: fix crash when deleting large selection
...
snprintf is not the tool for simple string copy
- especially if not null terminated
2015-05-24 12:58:39 +01:00
Andy Williams
7cdab3d5ad
Update to latest eolian (getting stable we hope).
...
Also mark code as a construction property
2015-05-20 14:18:20 +01:00
Andy Williams
b4f7301768
Fixup tests
...
Fixing compile errors and out of date tests. oops.
2015-05-18 19:40:06 +01:00
Andy Williams
3994be1264
Update to latest .eo file type
2015-05-18 19:24:01 +01:00
Andy Williams
5cbab1fa72
editor: fix nulls being appended to lines
...
Should resolve issues with nulls being inserted
and also crashes on pasting into a selection
2015-05-18 15:49:24 +01:00
Andy Williams
6a20d2a6dc
editor: add pageup/down support
...
Page up or down by 85% of the visible window height
2015-05-12 23:15:25 +01:00
Andy Williams
94f5abd2c8
eolian_gen fixes to inheritance
2015-05-11 23:17:44 +01:00
Andy Williams
398e8ad2a0
Update elm_code widget .eo doc for EFL master
2015-05-11 23:11:28 +01:00
Andy Williams
81aa733b02
editor: wrap left and right cursor moves around
...
when there is a line to move to we should wrap cursor movements
2015-05-05 22:38:02 +01:00
Andy Williams
ae6cfba035
editor: bind home and end keys
2015-05-05 21:49:21 +01:00
Andy Williams
74b7c2a3d3
editor: correctly paste multiline windows text
2015-05-05 21:41:29 +01:00
Andy Williams
63e5ce4e8f
editor: Fix crash when pasting multi line
...
Not tracking length correctly so depending on what else is
in memory we could overrun the buffer
2015-05-05 21:40:22 +01:00
Andy Williams
a0d6627f54
elm_code: add a TODO/FIXME standard parser
...
Corret some callback code and re-parse each time the file is saved.
Use this to clean up save/parse code in EDI too
2015-04-20 01:21:03 +01:00
Andy Williams
6bd0d56e13
elm_code: add multiline paste support.
...
Creating and breaking out a few helper text methods at the same time.
Test all that we can for this reasonably complex operation
2015-04-19 15:00:10 +01:00
Andy Williams
675bcb51ea
elm_code: retain line formatting on file callback
...
We don't need to reset all the lines in file load - just clear
2015-04-13 00:15:21 +01:00
Andy Williams
bc6ec2dd6f
syntax: reset status and hints when we reset token
...
re-use elm_code methods when we do this in edi
2015-04-12 23:04:46 +01:00
Andy Williams
7489eb6e30
syntax: don't slow down by repeating tokens
...
Clear out the token list before each parse callback loops
2015-04-12 17:25:20 +01:00
Andy Williams
6e34ba51e8
search: Fix issue when text is at end of line
...
Tests were wrong, fix and add more
2015-04-12 16:56:17 +01:00
Andy Williams
3dcae78dfc
elm_code: Correctly delete tabs when mid-tab
...
Delete at least 1 char and move cursor to the beginning of the tab
2015-04-07 23:09:16 +01:00
Andy Williams
4a84ad94ba
elm_code: Fix position calculations at line end
...
Addresses random NULLs in content after newline
2015-04-07 23:05:47 +01:00
Andy Williams
a2dd4b1176
elm_code: bring widget_text into widget object
2015-04-04 19:01:05 +01:00
Andy Williams
820bb1622e
elm_code: refactor widget to seperate space.
...
Keeping the private files for elm_code cleaner
2015-04-04 18:17:01 +01:00
Andy Williams
a8e45be3a1
editor: Add a tooltip popup if you hover over a line with a warning attached
2015-04-04 17:51:39 +01:00
Andy Williams
ce2545db25
editor: Fix performance of loading large files
2015-04-02 22:48:23 +01:00
Andy Williams
008246d936
editor: Fix performance of adding deleting lines
...
removed the numerous callbacks that were not needed
2015-04-02 00:32:16 +01:00
Andy Williams
c81041ef6a
elm_code editor: Fix bug with newlines
...
Badness introduced with the tab work was padding lines with NULL
2015-03-30 23:36:28 +01:00
Andy Williams
ab0d49022c
elm_code editor: handle tabs when deleting
...
Make sure we're at the right position when we delete, backspace
or split lines with tabs in them
2015-03-30 20:07:45 +01:00
Andy Williams
a202872986
elm_code: fix tests to provide elm_code widget
...
Required by new tab rendering changes
2015-03-29 20:52:38 +01:00
Andy Williams
531d369c5e
elm_code: Fix minor mistakes with tab commit
2015-03-29 20:39:26 +01:00
Andy Williams
25bac0c581
elm_code editor: display cursor over selection
...
If they overlap it's good to know where text will appear
2015-03-29 20:13:30 +01:00
Andy Williams
2d83c07840
elm_code: Support rendering tabs
...
Add a tabstop configurable value so the view can be adjusted.
shuffle all content and tokens along when a tab is encountered.
2015-03-29 20:12:28 +01:00
Andy Williams
2a4d4e17f0
elm_code: Cut, copy and paste working
...
Current limitations that paste is into a single line
2015-03-28 17:57:47 +00:00
Andy Williams
d5e405b420
search: Update replace for elm_code selection code
...
That should be search and replace completely ported now
2015-03-28 16:05:36 +00:00
Andy Williams
f330c48bce
elm_code selection: Support selection deletion
...
In the widget we always delete the selection if typing begins.
If delete or backspace was pressed don't execute the keystroke after.
2015-03-28 15:17:08 +00:00
Andy Williams
4f8ece09cf
clang: save errors and display if clicked
...
Using a gutter click in elm_code to print to console for now
2015-03-27 23:54:28 +00:00
Andy Williams
bf53022adb
Note that a fix is now temporary
2015-03-27 23:45:23 +00:00
Andy Williams
2b9e4e428f
elm_code file: test windows with new eina fixes
...
Should pass from eina 1.13.99
2015-03-27 21:45:43 +00:00
Andy Williams
e4164d279d
fix wrong types / names
2015-03-25 22:59:42 +00:00
Andy Williams
87e2f2b0e8
elm_code selection: complete multiline text get
...
ready for copy and cut functions
2015-03-25 22:55:32 +00:00
Andy Williams
514a796ac3
elm_code selection: support two line selection
2015-03-25 22:17:41 +00:00
Andy Williams
3ff415222b
elm_code selection: test and implement single line
...
Multi line selection still to come
2015-03-25 21:55:00 +00:00
Andy Williams
ba5a31b884
Merge branch 'master' into elm_code
2015-03-25 20:52:14 +00:00
Andy Williams
ec720855ac
elm_code: Remove accidental dep on efl-git
2015-03-25 14:05:47 +00:00
Andy Williams
4fc9748db3
elm_code: add text search functions.
...
Update the search and replace UI to work with the new elm_ode UI.
2015-03-22 22:36:04 +00:00
Andy Williams
4c8b09de04
elm_code selection: move cursor to selection
2015-03-22 22:28:07 +00:00
Andy Williams
8eb3978c1e
elm_code widget: fire user change events
...
This does not yet have a "change" attached so does not
support undo/redo yet
2015-03-21 20:04:12 +00:00
Andy Williams
f7f257fca4
elm_code file: add save method to write out lines
...
use a temporary file as we may have mapped the data directly.
2015-03-21 19:25:25 +00:00
Andy Williams
a671101a09
elm_code file: get line ending chars
...
Quickly add support for the line end character sequence.
Just windows and Unix now, as per the enum defined.
2015-03-21 13:58:30 +00:00
Andy Williams
adcff7bde3
elm_code selection: Input selecttion from mouse
...
When editable allow dragging the cursor with a mouse button
down then set up a selecttion.
2015-03-18 22:24:56 +00:00
Andy Williams
59450c71f2
elm_code whitespace: only display actual newlines
...
No newlines at the end of a file if there is no other line
2015-03-18 22:18:34 +00:00
Andy Williams
331e60969f
elm_code: selection highlighting
...
Adding initial support for displaying selection within the widget
2015-03-17 22:42:03 +00:00
Andy Williams
6d55e32c0c
elm_code file: detect line endings
...
Check for Windows otherwise default to unix for now.
2015-03-15 23:07:31 +00:00
Andy Williams
bd3dc4247d
elm_code unicode: highlight tokens correctly
...
When encountering unicode characters make sure we highlight
in the correct columns rather than at the byte locations.
2015-03-14 16:42:56 +00:00
Andy Williams
bda40e5f65
elm_code editor: fix crash backspacing last line
...
fill an empty line if we're deleting the last line
2015-03-08 12:07:29 +01:00
Andy Williams
9f332be6fe
elm_code edit: split content on newline.
...
Tokens also need to be split so this is text only for now
2015-03-08 11:52:12 +01:00
Andy Williams
2f25503f8f
elm_code widget: backspace or delete merges lines
...
This is text only for now but serves as editor foundation.
2015-03-08 11:33:07 +01:00
Andy Williams
ecb35beb30
elm_code line: move freeing to the line file
2015-03-08 11:15:31 +01:00
Andy Williams
ff68af7076
elm_code line: unsigned int for length
2015-03-08 11:14:02 +01:00
Andy Williams
afeab4b53b
elm_code edit: support backspace and delete.
...
don't propogate backspace as other widgets use it to navigate
adjust tokens left when we remove content and remove if 0 width token.
2015-03-08 09:44:26 +01:00
Andy Williams
8f668b2deb
elm_code unicode: update when editing
...
issues here with inserting unicode which I need to get to
2015-03-07 22:35:59 +01:00
Andy Williams
b392a21362
Add initial unicode support for elm_code
...
Note the number of utf8 characters when we load the data.
Make sure the widget is referencing unicode_length
for all our metrics.
2015-03-07 20:48:02 +01:00
Andy Williams
1978da98cf
elm_code editor: adjust tokens when we insert text
2015-02-28 22:50:18 +00:00
Andy Williams
f354c9a8b2
elm_code demo: Show multiple widgets for one code.
...
Illustrates that we can display a single elm_code in many widgets
2015-02-27 15:33:06 +00:00
Andy Williams
b28773a7f6
Merge branch 'master' into devs/ajwillia-ms/elm_code
2015-02-27 15:13:06 +00:00
Andy Williams
0c2819bd4f
editor: update to latest elm_code and show whitespace
2015-02-28 16:28:22 +00:00
Andy Williams
7ed4aa9695
Merge branch 'master' into elm_code
...
Conflicts:
elm_code/src/lib/elm_code_diff_widget.c
2015-02-28 15:31:57 +00:00
Andy Williams
3e5de50399
elm_code widget: add show_whitespace option
...
display items for space, tab and newline if requested
2015-02-28 14:59:42 +00:00
Andy Williams
91b426d93e
elm_code: support line insertion
...
in our widget call a line insertion on enter pressed
2015-02-28 14:20:32 +00:00
Andy Williams
e0477ff3cb
elm_code: require an elm_code for each widget
...
In our finalizer we ensure that an elm_code is set.
No longer allow code_set to be called after construction.
2015-02-28 13:22:38 +00:00
Andy Williams
e8297bc390
elm_code tests: fix test path
2015-02-28 13:14:18 +00:00
Andy Williams
39c87635ea
elm_code: Fix finalized check macro
2015-02-27 15:07:38 +00:00
Andy Williams
40a6d3b3fd
elm_code edit: Support insert of any single char.
...
broadens from alphanumeric to include punctionation
and various symbols.
2015-02-26 23:56:10 +00:00
Andy Williams
a97cb87aca
elm_code parse: Add standard parsers starting with diff.
...
Allow code instances to have provided parsers added easily.
These can be chained to have multiple passes.
2015-02-26 23:19:09 +00:00
Andy Williams
079a65a98b
merge changes from master
2015-02-26 13:56:50 +00:00
Andy Williams
b2a18b6db7
elm_code: Move parser callbacks to private.
...
Don't expose the internal callback mechanics, just the addition of parsers
2015-02-26 13:54:46 +00:00
Andy Williams
c98ba7d1e8
syntax: Actually use the elm_code parser api.
...
Improve the API to allow passing of user data to the calls.
Yes, I forgot about this, it works well so remove the STYLE_SET callback
2015-02-24 00:32:40 +00:00
Andy Williams
94223c1788
elm_code: Add missing status icons from new states
2015-02-24 00:26:58 +00:00
Andy Williams
71fa2d13c8
elm_code: display a line-width marker if requested
2015-02-23 21:52:49 +00:00
Andy Williams
724bf617cb
Merge branch master
...
conflicts in elm_code_widget.c resolved
2015-02-22 23:38:54 +00:00
Andy Williams
0e49f40ff3
elm_code: Support text insertion for simple edits.
...
Hook into the widget for elm_code_test and edi editors.
Only alphanumeric and space, but it's a start.
2015-02-22 20:07:08 +00:00
Andy Williams
bbe671626e
elm_code: Support multi-line tokens
...
Adding a new token to each line it covers.
Each token references the end line so newline behaviour can be set
2015-02-21 18:24:17 +00:00
Andy Williams
dd9f96d2c0
syntax: Update clang to output elm_code tokens
...
Addition of a refresh line command to say we're done.
We no longer need an active window for highlighting
as it's so much faster!
2015-02-21 17:30:17 +00:00
Andy Williams
1fab95cef1
Merge branch 'master' into elm_code
...
Conflicts:
elm_code/src/lib/elm_code_widget.c
elm_code/src/lib/elm_code_widget.eo.c
elm_code/src/lib/elm_code_widget.eo.h
2015-02-19 22:39:11 +00:00
Andy Williams
36ab399b59
eo: remove generated files from git
2015-02-19 22:35:01 +00:00
Andy Williams
97c8c0ac75
elm_code: Update FIXME to be realisic - the textgrid size_set does not append
2015-02-19 21:52:41 +00:00
Andy Williams
187d9e609a
elm_code: get / set the cursor position
...
When the cursor is updated make sure we have scrolled
so it's visible. Also adjust focus next points too.
2015-02-19 21:16:18 +00:00
Andy Williams
30460899a6
elm_code: Actually use it as our main editor window!
...
Need to hook in the clang highlighting and undo stack to the elm_code_widget
2015-02-19 00:22:07 +00:00
Andy Williams
958340e321
Add a temporary fix for some scroll/append/refresh issue with layout
2015-02-17 23:56:20 +00:00
Andy Williams
88536c4ee1
elm_code: Fill the widget and gutter to the end
...
This helps with refreshing too so we blank removed lines
2015-02-22 22:13:33 +00:00