summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_code_widget_private.h
diff options
context:
space:
mode:
authorAlastair Poole <netstar@gmail.com>2018-07-27 15:20:24 +0100
committerAndy Williams <andy@andywilliams.me>2018-07-27 17:08:44 +0100
commitad379ce04fa3dae4ef06c5f6211bc4b962cb3fa4 (patch)
tree4af883860573085f20773b35309cf08d30e18a22 /src/lib/elementary/elm_code_widget_private.h
parent49554b2b6c993aa2067e86a0eb158f47fc15c3f0 (diff)
elm_code_widget: fix keyboard and scrolling with active selection.
Summary: This adds some attributes to the selectiont type in elm_code. Including the type (whether it is mouse or keyboard) and also whether a selection is in progress. Thus we can reliably select around the file and also move/scroll when there is an active selection. Test Plan: Drag and select text with mouse. Also the same with keyboard (hold shift and select). Leave selection active and scroll around the file. The selection should remain and full movement is possible while retaining the active selection. This could really be refactored for a next major release. Reviewers: #committers, ajwillia.ms, cedric Reviewed By: ajwillia.ms Subscribers: zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6676
Diffstat (limited to 'src/lib/elementary/elm_code_widget_private.h')
-rw-r--r--src/lib/elementary/elm_code_widget_private.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lib/elementary/elm_code_widget_private.h b/src/lib/elementary/elm_code_widget_private.h
index 21d652d97d..ec1e53dc35 100644
--- a/src/lib/elementary/elm_code_widget_private.h
+++ b/src/lib/elementary/elm_code_widget_private.h
@@ -4,10 +4,18 @@
4/** 4/**
5 * Structure holding the info about a selected region. 5 * Structure holding the info about a selected region.
6 */ 6 */
7typedef enum
8{
9 ELM_CODE_WIDGET_SELECTION_KEYBOARD,
10 ELM_CODE_WIDGET_SELECTION_MOUSE,
11} Elm_Code_Widget_Selection_Type;
12
7typedef struct 13typedef struct
8{ 14{
9 unsigned int start_line, end_line; 15 unsigned int start_line, end_line;
10 unsigned int start_col, end_col; 16 unsigned int start_col, end_col;
17 Elm_Code_Widget_Selection_Type type;
18 Eina_Bool in_progress;
11} Elm_Code_Widget_Selection_Data; 19} Elm_Code_Widget_Selection_Data;
12 20
13typedef struct 21typedef struct
@@ -68,4 +76,8 @@ void _elm_code_widget_undo_change_add(Evas_Object *widget, Elm_Code_Widget_Chang
68 76
69void _elm_code_widget_change_selection_add(Evas_Object *widget); 77void _elm_code_widget_change_selection_add(Evas_Object *widget);
70 78
79void _elm_code_widget_selection_in_progress_set(Evas_Object *widget, Eina_Bool state);
80
81void _elm_code_widget_selection_type_set(Evas_Object *widget, Elm_Code_Widget_Selection_Type type);
82
71#endif 83#endif