summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkeditable.sgml
blob: 18c8490b1c6c7b0476d2cc76ce25b0faa09ecd40 (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
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
<!-- ##### SECTION Title ##### -->
GtkEditable

<!-- ##### SECTION Short_Description ##### -->
Interface for text-editing widgets

<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkEditable interface is an interface which should be implemented by
text editing widgets, such as #GtkEntry and #GtkText. It contains functions 
for generically manipulating an editable widget, a large number of action 
signals used for key bindings, and several signals that an application can 
connect to to modify the behavior of a widget. 
</para>

<para>
As an example of the latter usage, by connecting
the following handler to "insert_text", an application
can convert all entry into a widget into uppercase.

<example>
<title>Forcing entry to uppercase.</title>
<programlisting>
#include &lt;ctype.h&gt;

void
insert_text_handler (GtkEditable *editable,
                     const gchar *text,
                     gint         length,
                     gint        *position,
                     gpointer     data)
{
  int i;
  gchar *result = g_utf8_strup (text, length);

  g_signal_handlers_block_by_func (editable,
				   (gpointer) insert_text_handler, data);
  gtk_editable_insert_text (editable, result, length, position);
  g_signal_handlers_unblock_by_func (editable,
                                     (gpointer) insert_text_handler, data);

  g_signal_stop_emission_by_name (editable, "insert_text"); 

  g_free (result);
}
</programlisting>
</example>
</para>

<!-- ##### SECTION See_Also ##### -->
<para>

</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### SECTION Image ##### -->


<!-- ##### STRUCT GtkEditable ##### -->
<para>
The #GtkEditable structure is an opaque structure whose members 
cannot be directly accessed.
</para>


<!-- ##### SIGNAL GtkEditable::changed ##### -->
<para>

</para>

@editable: the object which received the signal.

<!-- ##### SIGNAL GtkEditable::delete-text ##### -->
<para>

</para>

@editable: 
@start_pos: 
@end_pos: 

<!-- ##### SIGNAL GtkEditable::insert-text ##### -->
<para>

</para>

@editable: 
@new_text: 
@new_text_length: 
@position: 

<!-- ##### FUNCTION gtk_editable_select_region ##### -->
<para>

</para>

@editable: 
@start_pos: 
@end_pos: 


<!-- ##### FUNCTION gtk_editable_get_selection_bounds ##### -->
<para>

</para>

@editable: 
@start_pos: 
@end_pos: 
@Returns: 


<!-- ##### FUNCTION gtk_editable_insert_text ##### -->
<para>

</para>

@editable: 
@new_text: 
@new_text_length: 
@position: 


<!-- ##### FUNCTION gtk_editable_delete_text ##### -->
<para>

</para>

@editable: 
@start_pos: 
@end_pos: 


<!-- ##### FUNCTION gtk_editable_get_chars ##### -->
<para>

</para>

@editable: 
@start_pos: 
@end_pos: 
@Returns: 


<!-- ##### FUNCTION gtk_editable_cut_clipboard ##### -->
<para>

</para>

@editable: 


<!-- ##### FUNCTION gtk_editable_copy_clipboard ##### -->
<para>

</para>

@editable: 


<!-- ##### FUNCTION gtk_editable_paste_clipboard ##### -->
<para>

</para>

@editable: 


<!-- ##### FUNCTION gtk_editable_delete_selection ##### -->
<para>

</para>

@editable: 


<!-- ##### FUNCTION gtk_editable_set_position ##### -->
<para>

</para>

@editable: 
@position: 


<!-- ##### FUNCTION gtk_editable_get_position ##### -->
<para>

</para>

@editable: 
@Returns: 


<!-- ##### FUNCTION gtk_editable_set_editable ##### -->
<para>

</para>

@editable: 
@is_editable: 


<!-- ##### FUNCTION gtk_editable_get_editable ##### -->
<para>

</para>

@editable: 
@Returns: