Commit Graph

239 Commits

Author SHA1 Message Date
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
Andy Williams d0ad93e47a Render all filename headers in a diff widget 2014-11-23 00:19:36 +00:00
Andy Williams a6d1aa3204 Fix warning 2014-11-22 22:44:37 +00:00
Andy Williams ba42d32d5e Add a simple diff widget based on an incoming diff file.
Load that into edi if we load a diff or patch file
2014-11-22 22:36:57 +00:00
Andy Williams 586bbb41aa Add an option to change the font size of our widget
demonstrate in the test and use it to make the logs more readable in edi
2014-11-22 19:14:53 +00:00
Andy Williams 69f121789e Fix a test missed in move to mem-mapping 2014-11-19 23:20:23 +00:00
Andy Williams 822ef10934 Actually use the eina_file memory mapping
Any appended or modified lines need to be stored seperately.
Always check for modified content before using the memory map from the
backing file.
2014-11-19 22:39:00 +00:00
Andy Williams f8896b1f54 Fix minor issues I saw in passing 2014-11-19 22:37:00 +00:00
Andy Williams 75bcfe3d80 Fix a memory corruption issue on some systems 2014-11-19 22:35:01 +00:00
Andy Williams cb79a06615 Fix render test and an end of line corner case 2014-11-18 23:46:24 +00:00
Andy Williams 4748f81023 Add some text mode icons to markup the lines for now 2014-11-18 22:48:37 +00:00
Andy Williams a82431c627 Add tests PASSED and FAILED to elm_code statuses
and the widget rendering.

Use this in EDI to add a test summarising panel.
Tests are executed in verbose mode so we can list
all the tests that have been run - can summarise
later if we wish...
2014-11-18 21:11:10 +00:00
Andy Williams 5a7f736d95 Fix crash when appending a line off and the body
is already larger than the viewport
2014-11-18 20:56:47 +00:00
Andy Williams d6da31acf3 Add parse hooks for lines and files within elm_code.
This required changing the load order so file opens would read the elm_code->parsers setup. This makes for a better setup anyhow
2014-11-16 23:52:41 +00:00
Andy Williams 5fc5e3abad Refactor the widget token parsing so we can put it under test. Add simple test that demonstrates tokens split by space. 2014-11-13 23:26:30 +00:00
Andy Williams 227c883b65 A little more markup to the diff example with character add/rem/change highlighting 2014-11-13 21:51:23 +00:00
Andy Williams 99e6dfbbd9 Add a simple token system to allow us to render some text styles 2014-11-13 21:34:47 +00:00
Andy Williams c28dd39224 Add a file load callback also - respect that with a widget refresh when called 2014-11-12 22:59:05 +00:00
Andy Williams f429afa47d Fix compilation of tests 2014-11-12 14:05:56 +00:00
Andy Williams 131a686c78 Fix the types of Eo Events - addresses lots of compiler warnings 2014-11-09 21:53:30 +00:00
Andy Williams e3fd501e9b Fixing some warnings. Not ideal handling of the Eo_Event_Description but it's less warn-tastic 2014-11-09 18:07:03 +00:00
Andy Williams f8a92218da Add some simple version control status for lines too.
Add a simple display of how that could work to elm_code_tesst
2014-11-09 14:44:35 +00:00
Andy Williams 742e70186c Take line coloring to the end of the line 2014-11-09 00:47:00 +00:00
Andy Williams fdccc03a4a Passing Eo events from Elm_Code to the Evas_Object when the backend data changes. Track a list of all widgets connected to the Elm_Code so we can signal them all. Add API to change status of a line which will refresh the widget too. 2014-11-06 23:43:56 +00:00
Andy Williams 051e03ba99 Add a simple elm_code_test binary that loads the widget and inserts some demo text 2014-11-05 13:55:37 +00:00
Andy Williams 4eec76793b Fix a crash when resizing if the file is longer than the viewport 2014-11-05 13:36:54 +00:00
Andy Williams 4be9198da5 Adding some initial concept of status flags for a line and default enum to start working on color pallette in our widget. Load enough colors to provide these statuses and hook into the EDI log panel implementation 2014-11-05 00:01:28 +00:00
Andy Williams a28e199c72 Add an initial stab at an elm_code widget. It currently does not refresh at any time other than load or resize, so is not respecting content updates, but it's a start.
Use it in place of the list of elm_label objects that were rendered in the log panel. Not colour highlighted yet, but one thing at a time.
2014-11-04 22:21:49 +00:00
Andy Williams 0ad14fac14 Allow appending of lines to an Elm_Code_File, allow Elm_Code_File objects to be created empty without reading from a filesystem source 2014-11-04 21:05:29 +00:00
Andy Williams 83c0e231ec Add basic structure for elm_code object - namespacing the elm_code_file properly to keep it clean 2014-10-26 22:47:27 +00:00
Andy Williams 3d35a3f949 Add some documentation grouping 2014-10-26 22:08:52 +00:00
Andy Williams 383bae2def Update tests to use the proper api check 2014-10-21 22:28:12 +01:00
Andy Williams a50fd20f06 warning-- 2014-10-21 22:27:10 +01:00
Andy Williams 6cf6df3886 Load the content and verify from our test files.
Includes an eina_file_map_lines workaround for blank lines
2014-10-19 22:33:49 +01:00
Andy Williams 0bb5201e3c Load lines sequentially and insert to a structure for reference 2014-10-19 22:29:44 +01:00
Andy Williams b38f986767 A pretty slim test of file loading and initial path apis 2014-10-17 23:36:07 +01:00
Andy Williams a78a0301e7 Base addition of elm_code area within the edi codebase, including an empty test to verify it's working 2014-10-17 21:36:03 +01:00