Commit Graph

186 Commits

Author SHA1 Message Date
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
Andy Williams 133b41ff24 elm_code: don't run resize code more than needed
Our cells are now always the size of the widget so
we can avoid the safety checks...
2015-02-22 21:50:34 +00:00
Andy Williams eaa683da03 An update to get closer to make check passing for windows.
Thanks (and credit) to Vincent Torri again
2015-02-15 20:35:41 +00:00
Andy Williams ac35cc30d9 elm_code: Tidying our callbacks and line manipulation.
Now the line_done callback allows styling to be set during the load process.
2015-02-14 23:14:06 +00:00
Andy Williams f6f19be6cb elm_code: focus: block focus leaving text area when editable.
As well as setting when we should not have focus leave us a theme has been added.
This allows us to extend from elm_entry which is better suited to us.
2015-02-14 18:49:51 +00:00
Andy Williams 83decd5183 Improving focus control a little 2015-02-11 22:01:37 +00:00
Andy Williams 6ac9fad7e3 Fixing some warnings on Windows.
Thanks, Vincent Torri
2015-02-11 21:25:09 +00:00
Andy Williams b67705fcd4 Use public types as far as possible 2015-02-11 19:13:48 +00:00
Andy Williams 511f57511d elm_code: Update demo to split various functions. Adding more pages as use cases emerge 2015-02-10 23:03:18 +00:00
Andy Williams 288f408d88 elm_code: Tidy up some unused code and fix up some focus management 2015-02-10 23:02:45 +00:00
Andy Williams 7c8d84d110 Fix a few warnings and possible build issues 2015-02-08 00:55:51 +00:00
Andy Williams 8572b15534 Finally fix make distcheck - clean up Makefiles properly 2015-02-07 16:05:42 +00:00
Andy Williams 8bded5325d Fix issues with distcheck.
Only remaining is a permissions problem with skeleton - will be fixed soon.
2015-02-06 23:45:50 +00:00
Andy Williams d47a6181cb elm_code: Bring in line numbers and a left gutter
This styling makes it easier to see that symbols are not part of the text
but also makes line numbers part of the widget and they can be easily
switched on or off.
2015-02-03 13:59:50 +00:00
Andy Williams b14eabb679 Fix the tests to work with widget improvements 2015-02-03 13:55:20 +00:00
Andy Williams e622acf735 Correctly lookup icon paths - @fix T2044.
Set up elm with the appropriate compile option variables.
2015-02-02 23:52:04 +00:00
Andy Williams 1995b167e5 elm_code: Update style and alignment of gutter 2015-01-29 14:05:20 +00:00
Andy Williams 4686fd172c elm_code: And complete the line number render first case.
Next some styling would indeed be nice...
2015-01-29 00:50:07 +00:00
Andy Williams f6b7a380df elm_code: initial work on line numbers 2015-01-29 00:36:28 +00:00
Andy Williams 155c18c141 elm_code: Fix click calculations.
We must take into account our scroll position and also where we are positioned
within the screen layout
2015-01-28 22:38:49 +00:00
Andy Williams ae12a8406c Add proper gravity control when lines are being added to the widget.
Most useful will be (0.0, 1.0) which will cause the display to act like 'tail'.
2015-01-28 14:16:46 +00:00
Andy Williams a0938ce656 Merge branch 'master' into elm_code
Conflicts:
	elm_code/lib/elm_code_widget.c
2015-01-28 00:43:57 +00:00
Andy Williams 485443240c elm_code: update scroller so content fills space.
We want to extend backgrounds under scrollbars but only scroll if it's too big.
2015-01-28 00:39:56 +00:00
Andy Williams 3d65bbc456 elm_code: When appending lines ignore widget size now we're scrolling 2015-01-28 00:20:58 +00:00
Andy Williams be7119c787 elm_code: Update resizing to reflect only the space that's required 2015-01-27 22:13:59 +00:00
Andy Williams 61912e962a Allow up/down/left/right to participate in focus control.
When we cannot move within the cursor availability then note it
the callback from elm will see if the event should be propagated so we
report the veto when we're contained or allow propagation when we overrun
2015-01-27 17:02:45 +00:00
Stephen Houston fc3b6963c7 Elm_Code: Keep up with min size so scroller works properly. 2015-01-27 10:43:32 -06:00
Andy Williams ba60959058 And document the wiget API 2015-01-26 23:09:22 +00:00
Andy Williams 09ac58f30e Bind up/down/left/right to cursor control.
Add a veto callback that blocks the up/down hitting the focus manager. This needs to be improved so once we hit the top / bottom it will pass on
2015-01-26 19:46:30 +00:00
Andy Williams 874101aeb1 Merge in key_down fixes from branch 'devs/ajwillia-ms/elm_code' 2015-01-26 19:06:27 +00:00
Andy Williams 50c5cb572b Refactor eo widget2 to widget - update in edi too 2015-01-26 19:05:34 +00:00
Stephen Houston a90e8cf789 Elm_Code: For box to get key down, it needs to have a child receiving key down. 2015-01-26 10:28:04 -06:00
Andy Williams 159c47d340 Port everything to use new widget API. Remove old widget API 2015-01-26 14:00:37 +00:00
Andy Williams f236f78cd4 Manipulate the position of the cursor.
When clicking in edit mode just change the position of it to where was clicked.
Known issue that this does not work with the keyboard
2015-01-25 23:15:37 +00:00
Andy Williams d017c06339 elm_code: Add focus support for the elm_code widget.
Hook into the internal elementary API to be part of the focus chain
2015-01-25 17:18:21 +00:00
Andy Williams 29f683d084 Complete port of elm_code widget to eo as widget2 2015-01-24 22:07:00 +00:00
Andy Williams 5e21f9da54 Fix eo and regen to generate the right code based on okra's changes.
We need to inherit from Elm_Box and not get in the way of smart resizing...
2015-01-24 08:26:09 +00:00
Stephen Houston 4ed86910af Elm_Code_Widget2: Inherit from box instead of layout since a layout is not provided. 2015-01-23 20:35:14 -06:00
Andy Williams 64b08570f0 Merge branch 'master' into elm_code 2015-01-23 23:42:07 +00:00
Andy Williams 664cff7d4d install our test diff for elm_code_test binaries 2015-01-23 23:41:53 +00:00
Andy Williams 3fb3564d05 Experimental eo commit - structure in place and it's resizing but won't render 2015-01-23 22:55:13 +00:00
Andy Williams 1b1242a430 Merge in master 2015-01-17 22:08:16 +00:00
Andy Williams 6a63044b30 Add a click handler for lines in a widget 2015-01-17 19:57:15 +00:00
Andy Williams e6ddefedd5 Tidying some more headers to try and get windows builds working 2015-01-10 17:55:04 +00:00
Andy Williams 3ab9857e52 Allow up/down/left/right to participate in focus control.
When we cannot move within the cursor availability then note it
the callback from elm will see if the event should be propagated so we
report the veto when we're contained or allow propagation when we overrun
2015-01-27 14:34:11 +00:00
Andy Williams 432b05b575 Disable NLS by default when cross compiling, remove broken need for libintl 2015-01-04 14:07:35 +00:00
Andy Williams 9de1a9b318 Elm_Code now compiling on Windows, thanks to Vincent Torri for the patch.
Next to tackle some non-standard EDI code to complete the compilation
2015-01-04 12:00:40 +00:00
Andy Williams cc3ae23d4b Update various headers to use Elm_Code to load all our public headers and fix a few build glitches 2014-12-24 18:16:38 +00:00
Andy Williams ed4560dbaa Remove circular include of the elm_code_file.h header 2014-12-24 18:06:51 +00:00
Andy Williams 4e0b183f34 Fix up headers and tests to remove the exposure of some private methods.
Add some documentation whilst we're there too
2014-12-05 09:39:40 -06:00
Andy Williams d9c5fe08b9 Add a cursor to the view.
Create a backing data structure to start tracking more useful widget information
2014-12-05 09:20:11 -06:00
Andy Williams 896452e559 Merging in refactoring of elm_code file lookups and edi mime lookups.
Elm_Code file no longer required for elm_code to function (in memory is created automatically).
2014-11-28 23:53:23 +00:00
Andy Williams 04dda232b6 Use an in-memory file for new elm_codes by default.
This is overridden as before by calling elm_code_file_open which will free the previously set file on that elm_code instance
2014-11-28 08:55:42 +00:00
Andy Williams 933b54ebd3 Heading to a working windows build.
Copy fixes into Skeleton file too so that it creates libraries that work in the same way
2014-11-25 23:07:50 +00:00