Commit Graph

115 Commits

Author SHA1 Message Date
Jean-Philippe Andre e592a0ab5b code widget: Fix order of operations
super functions, when creating stuff, should be called first.
2018-01-16 19:35:54 +09:00
Amitesh Singh 44d3227beb widget: rename elm widget to Efl.Ui.Widget. 2018-01-08 21:28:10 +09:00
Andy Williams 14d10e8b7b elm_code: Cancel selection if clicked outside of the editor area 2017-12-21 22:05:42 +00:00
Andy Williams fcdf4e9d10 elm_code: Correct tooltip behaviour for elm_cde_widget 2017-12-14 08:55:01 +00:00
Andy Williams 433c7ef8fe elm_code: Fix tooltip crash 2017-12-13 22:44:31 +00:00
Sungtaek Hong 3490da0fff elm_code_widget: change efl_add to legacy_add
Summary:
elm_code_widget is legacy add, thus efl_add is not available.

Signed-off-by: Sungtaek Hong <sth253.hong@samsung.com>

Reviewers: jpeg, cedric, ajwillia.ms, woohyun

Differential Revision: https://phab.enlightenment.org/D5548
2017-12-08 16:02:22 +09:00
Sungtaek Hong fc8cc4a9b3 efl_ui_widget: find theme just once in layout inherited widget
When a widget inherits layout in tries to set theme in group_add or in
constructor. When another widget inherits the previous widget, it sets
layout again with new klass name. This sets klass in the widget and
sets layout in super class, so that it can set layout only once.

Test Plan: Run efl_ui_widget related elementary test.

Reviewers: jpeg, cedric, woohyun, singh.amitesh

Differential Revision: https://phab.enlightenment.org/D5473
2017-12-08 16:02:22 +09:00
Andy Williams bdcd034af5 elm_code: Update background handling to work with transparency better 2017-12-07 23:39:49 +00:00
Andy Williams 1a5d6fa93a elm_code: Adding initial support for alpha channel 2017-12-07 23:39:49 +00:00
Andy Williams 756964c493 Revert "elm_code: Call parent theme_apply when we're applying"
This reverts commit 3e5e994360.
This crashes within Edi. The partial solution is not good enough.
2017-12-01 16:44:34 +00:00
Andy Williams 3e5e994360 elm_code: Call parent theme_apply when we're applying 2017-11-30 17:36:30 +00:00
Andy Williams 54d3091133 elm_code: Don't bold beginnings of lines
Fixes T6444
2017-11-29 16:17:27 +00:00
Andy Williams d43fe6c16f elm_code: Reload grid colours on theme change 2017-11-27 21:23:55 +00:00
Al Poole 5abeeb980a elm_code: set the color scheme from the default edc.
This allows us to override in the application also. Work from
myself and @ajwillia.ms.
2017-11-26 12:36:42 +00:00
Lauro Moura 0dbeb91bb9 elementary: fix compilation of elm_code test on windows
Summary:
Added some guards to avoid redefinition of functions.

Partially fixes T5866, as there is still the question whether we should
test internal functions or not, as stated by jpeg in the comments.

Reviewers: vtorri, felipealmeida, jpeg, cedric

Reviewed By: cedric

Subscribers: jenkins, cedric

Maniphest Tasks: T5866

Differential Revision: https://phab.enlightenment.org/D5521

Signed-off-by: Cedric Bail <cedric@osg.samsung.com>
2017-11-23 15:30:32 -08:00
Jean-Philippe Andre b798005e80 elm: Add hack to make test case work
Because of the way elm_code test case is written, by directly including
the C file, we end up with two symbols for the internal _elm_legacy_add
flag. This makes some test case fail (after applying a pending patch).

Solution found by Sungtaek Hong.

elm_code test case needs to be fixed. Don't include the C files
directly, testing static inlines should be done through a common .x or
something, but not by including the C file itself. This has led and will
lead to many issues.
2017-11-23 15:45:49 +09:00
Andy Williams 06778385f1 elm_code: don't crash on NULL scope
This could be triggerd with the cursor was not in the file
2017-11-22 19:31:19 +00:00
Andy Williams 95b0d7ca68 elm_code: Add basic scope parsing to syntax highlighting.
This is currently displayed by showing scope in the widget gutter
2017-11-14 19:12:56 +00:00
Al Poole e63e2d7e21 elm_code_widget: keep track of visibility.
Keep track of visibility and ensure the cursor can never be
filled when hidden. This should finally end any issue with the
cursor and visibility with the new focus system. Didn't see this
previously until working on Edi's bottom panes which caused redraw
on resize of the widgets.

@fix
2017-11-09 00:55:36 +00:00
Jean-Philippe Andre d39bbc1491 elm: Create legacy widgets with elm_legacy_add
This will be used to solve issues around style_set:
if the widget is legacy or pure eo we may need to select a different
style. So in the constructor we need to know whether we are legacy or
eo. Note that calling style_set in finalize only is too late as we would
lose information such as efl_text_set() called inside efl_add().
2017-11-07 14:50:31 +09:00
Al Poole e663e4d009 elm_code: hide cursor if we hide the widget.
The cursor isn't clipped so if we decide to hide the widget
this ensures the cursor also is hidden. This should not affect
any existing application using elm_code API.
2017-10-26 22:39:21 +01:00
Al Poole eeb25519b3 elm_code_widget: make sure the widget is cleared properly.
This ensures the widget is clearer if the file has been cleared.
@fix T6185
2017-10-21 01:28:06 +01:00
Marcel Hollerbach 9d5cc349da elm_code: remove those parts
they are not anymore needed, before they existed for keeping the focus
in the window, even if the keystrokes should be focus movements. This is
already working without this.
2017-10-10 19:28:48 +02:00
Al Poole 9ab866f32c elm_code_widget: set appropriate background colour. 2017-10-01 11:10:28 +01:00
Andy Williams ad6a858aad elm_code: respect event hold for key_down 2017-09-21 12:24:51 +01:00
Jean-Philippe Andre b6bab481aa widget: Mark old focus API as beta.
It's not beta. It's about to die.
Also, move #define ELM_WIDGET_BETA to the common header file, as it is
consequently required by ALL widgets. :(

Ping @bu5hm4n :)

Ref T5363
2017-08-31 11:22:04 +09:00
Jean-Philippe Andre c4ac589455 widget: Remove all legacy event stuff in propagate
The EO API is now clean! Yay!

Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 66d241eadf elm: Process all input events with EO
This removes all uses of type & event_info in the method widget_event.

Ref T5363
2017-08-23 11:16:45 +09:00
Jean-Philippe Andre 069747b9de widget: Add eo event info inside widget_event
This is an internal function that should probably become an overridable
protected method, as it's required for proper event handling in widgets.
Next step: use eo_event_info in the widgets implementations. Then remove
legacy event struct.

Ref T5363
2017-08-23 11:16:45 +09:00
Andy Williams 91293d3b25 elm_code: small optimisation for large files 2017-08-02 10:32:13 +01:00
Carsten Haitzler 20333c7905 elm code - remove unneded extra check from copy and pasta it seems
extra check already done in if above - no need. looks like copy &
paste of the checks from above thus why it's there, but not needed.
not a bug, byt analysers dont like it so remove

found by PVS studio
2017-07-29 10:56:53 +09:00
Andy Williams 77db870b61 elm_code: Fix missing middle button selection paste
Resolves task T5520
@fix
2017-07-25 23:54:21 +01:00
Andy Williams 292e9e9ecf elm_code: Fix crash with long lines
Also fixes issue where widget would sometimes blank when scrolling
@fix
2017-07-23 21:30:35 +01:00
Jean-Philippe Andre 242127a96b evas,edje,elm: Mark all legacy objects as such 2017-07-07 13:21:18 +09:00
Andy Williams 77800dd9b4 elm_code: fix whitespace highlighting 2017-06-27 16:19:16 +01:00
Andy Williams a7830b9c42 elm_code: Add a matched token so we can highlight searches
Should make dense matches in a text editor clearer.
2017-06-26 22:17:07 +01:00
Sanjeev BA ed201d7f30 Add support for select all with ctrl-a
Summary: Signed-off-by: Sanjeev BA <iamsanjeev@gmail.com>

Test Plan: Test with edi.

Reviewers: ajwillia.ms, jpeg, cedric

Reviewed By: ajwillia.ms

Differential Revision: https://phab.enlightenment.org/D4971
2017-06-17 17:42:18 +01:00
Andy Williams 57a0343775 elm_code: Allow multibyte characters to be entered
@fix T5496
2017-05-26 23:07:52 +01:00
Al Poole 66fd9839a0 elm_code: fix cursor position (100%)
Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4905
2017-05-24 21:25:24 +01:00
Andy Williams 6058401590 elm_code: reduce race conditions in rendering cursor
This code is slowly getting neater as we get to the bottom of it
2017-05-23 23:03:08 +01:00
Andy Williams 7f1ef4e2d4 elm_code: improving cursor move behavior.
There is a blank line off the scroller but for now it's better
2017-05-21 23:19:24 +01:00
Al Poole 6d7a73c68f elm_code: fix carriage return at EOF scroller behaviour
Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4890
2017-05-19 19:04:46 +01:00
Jean-Philippe Andre 55b529cebc evas/elm: Make group_add/group_del internal functions
This hides those two legacy functions from the EO API.
2017-05-19 14:07:00 +09:00
Andy Williams 7510a2a9ee elm_code: Fix crash on tabs in long lines
@fix
2017-05-19 00:01:23 +01:00
Jean-Philippe Andre 90de99eea6 elm_code: Fix use after free 2017-05-17 15:32:03 +09:00
Andy Williams eb04ab591c elm_code: Fix insertion of multiline content in widget
A small refactoring to reduce code duplication as well :)
2017-05-16 22:13:43 +01:00
Andy Williams 94afabf216 elm_code: Move the 'default' font name and size into the theme.
This can still be overridden by the standard method calls
2017-05-06 22:02:17 +01:00
Andy Williams 3b9e69e888 elm_code: Expose API for inserting text at cursor
widget operations use NULL terminated strings, backend does not.
Refactor some selection code so all selection deletions trigger
undo events (except where they should not).
2017-05-03 08:17:06 +01:00
Al Poole 9b8efc4811 elm_code : LINE_APPEND Render fix
Summary: @fix

Reviewers: ajwillia.ms

Reviewed By: ajwillia.ms

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4839
2017-05-02 20:58:14 +01:00
Andy Williams b5761fc227 elm_code: Don't refresh if fonts did not change 2017-04-06 23:30:00 +01:00