1 #ifndef ELM_CODE_WIDGET_SELECTION_H_
2 # define ELM_CODE_WIDGET_SELECTION_H_
3 
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7 
8 /**
9  * @brief Selection handling functions.
10  * @defgroup Managing the complexities of selecting text across separate lines.
11  *
12  * @{
13  *
14  * Functions for selection handling
15  *
16  */
17 
18 /**
19  * @brief Start the selection of widget contents.
20  *
21  * @param[in] widget @c The elm_widget object.
22  * @param[in] line @c The line index of the widget.
23  * @param[in] widget @c The column index of the widget.
24  *
25  * @return None
26  *
27  */
28 EAPI void elm_code_widget_selection_start(Evas_Object *widget, unsigned int line, unsigned int col);
29 
30 /**
31  * @brief End the selection of widget contents.
32  *
33  * @param[in] widget @c The elm_widget object.
34  * @param[in] line @c The line index of the widget.
35  * @param[in] widget @c The column index of the widget.
36  *
37  * @return None
38  *
39  */
40 EAPI void elm_code_widget_selection_end(Evas_Object *widget, unsigned int line, unsigned int col);
41 
42 /**
43  * @brief Clear selection of widget contents.
44  *
45  * @param[in] widget @c The elm_widget object.
46  *
47  * @return None
48  *
49  */
50 EAPI void elm_code_widget_selection_clear(Evas_Object *widget);
51 
52 /**
53  * @brief Delete the selected contents of widget contents.
54  *
55  * @param[in] widget @c The elm_widget object.
56  *
57  * @return None
58  *
59  */
60 EAPI void elm_code_widget_selection_delete(Evas_Object *widget);
61 
62 /**
63  * @brief Select the entire line from the widget.
64  *
65  * @param[in] widget @c The elm_widget object.
66  * @param[in] line @c The line index of the widget.
67  *
68  * @return None
69  *
70  */
71 EAPI void elm_code_widget_selection_select_line(Evas_Object *widget, unsigned int line);
72 
73 /**
74  * @brief Select a word from the widget.
75  *
76  * @param[in] widget @c The elm_widget object.
77  * @param[in] line @c The line index of the widget.
78  * @param[in] col @c The column index of the widget.
79  *
80  * @return None
81  *
82  */
83 EAPI void elm_code_widget_selection_select_word(Evas_Object *widget, unsigned int line, unsigned int col);
84 
85 /**
86  * @brief Get the selected widget content.
87  *
88  * @param[in] widget @c The elm_widget object.
89  *
90  * @return char pointer to text contents.
91  *
92  */
93 EAPI char *elm_code_widget_selection_text_get(Evas_Object *widget);
94 
95 /**
96  * @brief Cut the selected widget content.
97  *
98  * @param[in] widget @c The elm_widget object.
99  *
100  * @return None
101  *
102  */
103 EAPI void elm_code_widget_selection_cut(Evas_Object *widget);
104 
105 /**
106  * @brief Copy the selected widget content to clipboard.
107  *
108  * @param[in] widget @c The elm_widget object.
109  *
110  * @return None
111  *
112  */
113 EAPI void elm_code_widget_selection_copy(Evas_Object *widget);
114 
115 /**
116  * @brief Paste the copied widget content from clipboard.
117  *
118  * @param[in] widget @c The elm_widget object.
119  *
120  * @return None
121  *
122  */
123 
124 EAPI void elm_code_widget_selection_paste(Evas_Object *widget);
125 
126 /**
127  * @brief check if the widget selection is empty.
128  *
129  * @param[in] widget @c The elm_widget object.
130  *
131  * @return true is empty, false otherwise
132  *
133  */
134 EAPI Eina_Bool elm_code_widget_selection_is_empty(Evas_Object *widget);
135 
136 /**
137  * @brief Select the entire widget contents.
138  *
139  * @param[in] widget @c The elm_widget object.
140  *
141  * @return None
142  *
143  */
144 EAPI void elm_code_widget_selection_select_all(Evas_Object *widget);
145 
146 
147 /**
148  * @}
149  */
150 
151 #ifdef __cplusplus
152 }
153 #endif
154 
155 #endif /* ELM_CODE_WIDGET_SELECTION_H_ */
156