summaryrefslogtreecommitdiff
path: root/src/lib/elementary/elm_code_widget_selection.h
blob: 989231b2383d22e07f48071f90787acfc0365423 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
#ifndef ELM_CODE_WIDGET_SELECTION_H_
# define ELM_CODE_WIDGET_SELECTION_H_

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @brief Selection handling functions.
 * @defgroup Managing the complexities of selecting text across separate lines.
 *
 * @{
 *
 * Functions for selection handling
 *
 */

/**
 * @brief Start the selection of widget contents.
 *
 * @param[in] widget @c The elm_widget object.
 * @param[in] line @c The line index of the widget.
 * @param[in] widget @c The column index of the widget.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_start(Evas_Object *widget, unsigned int line, unsigned int col);

/**
 * @brief End the selection of widget contents.
 *
 * @param[in] widget @c The elm_widget object.
 * @param[in] line @c The line index of the widget.
 * @param[in] widget @c The column index of the widget.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_end(Evas_Object *widget, unsigned int line, unsigned int col);

/**
 * @brief Clear selection of widget contents.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_clear(Evas_Object *widget);

/**
 * @brief Delete the selected contents of widget contents.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_delete(Evas_Object *widget);

/**
 * @brief Select the entire line from the widget.
 *
 * @param[in] widget @c The elm_widget object.
 * @param[in] line @c The line index of the widget.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_select_line(Evas_Object *widget, unsigned int line);

/**
 * @brief Select a word from the widget.
 *
 * @param[in] widget @c The elm_widget object.
 * @param[in] line @c The line index of the widget.
 * @param[in] col @c The column index of the widget.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_select_word(Evas_Object *widget, unsigned int line, unsigned int col);

/**
 * @brief Get the selected widget content.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return char pointer to text contents.
 *
 */
EAPI char *elm_code_widget_selection_text_get(Evas_Object *widget);

/**
 * @brief Cut the selected widget content.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_cut(Evas_Object *widget);

/**
 * @brief Copy the selected widget content to clipboard.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_copy(Evas_Object *widget);

/**
 * @brief Paste the copied widget content from clipboard.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return None
 *
 */

EAPI void elm_code_widget_selection_paste(Evas_Object *widget);

/**
 * @brief check if the widget selection is empty.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return true is empty, false otherwise
 *
 */
EAPI Eina_Bool elm_code_widget_selection_is_empty(Evas_Object *widget);

/**
 * @brief Select the entire widget contents.
 *
 * @param[in] widget @c The elm_widget object.
 *
 * @return None
 *
 */
EAPI void elm_code_widget_selection_select_all(Evas_Object *widget);


/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif /* ELM_CODE_WIDGET_SELECTION_H_ */