]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkeditable.sgml
6c503aa5cfc06d365e129487018818490ed12fa1
[~andy/gtk] / docs / reference / gtk / tmpl / gtkeditable.sgml
1 <!-- ##### SECTION Title ##### -->
2 GtkEditable
3
4 <!-- ##### SECTION Short_Description ##### -->
5 Interface for text-editing widgets
6
7 <!-- ##### SECTION Long_Description ##### -->
8 <para>
9 The #GtkEditable interface is an interface which should be implemented by
10 text editing widgets, such as #GtkEntry and #GtkText. It contains functions 
11 for generically manipulating an editable widget, a large number of action 
12 signals used for key bindings, and several signals that an application can 
13 connect to to modify the behavior of a widget. 
14 </para>
15
16 <para>
17 As an example of the latter usage, by connecting
18 the following handler to "insert_text", an application
19 can convert all entry into a widget into uppercase.
20
21 <example>
22 <title>Forcing entry to uppercase.</title>
23 <programlisting>
24 #include &lt;ctype.h&gt;
25
26 void
27 insert_text_handler (GtkEditable *editable,
28                      const gchar *text,
29                      gint         length,
30                      gint        *position,
31                      gpointer     data)
32 {
33   int i;
34   gchar *result = g_utf8_strup (text, length);
35
36   g_signal_handlers_block_by_func (editable,
37                                    (gpointer) insert_text_handler, data);
38   gtk_editable_insert_text (editable, result, length, position);
39   g_signal_handlers_unblock_by_func (editable,
40                                      (gpointer) insert_text_handler, data);
41
42   g_signal_stop_emission_by_name (editable, "insert_text"); 
43
44   g_free (result);
45 }
46 </programlisting>
47 </example>
48 </para>
49
50 <!-- ##### SECTION See_Also ##### -->
51 <para>
52
53 </para>
54
55 <!-- ##### SECTION Stability_Level ##### -->
56
57
58 <!-- ##### STRUCT GtkEditable ##### -->
59 <para>
60 The #GtkEditable structure is an opaque structure whose members 
61 cannot be directly accessed.
62 </para>
63
64
65 <!-- ##### SIGNAL GtkEditable::changed ##### -->
66 <para>
67
68 </para>
69
70 @editable: the object which received the signal.
71
72 <!-- ##### SIGNAL GtkEditable::delete-text ##### -->
73 <para>
74
75 </para>
76
77 @editable: 
78 @start_pos: 
79 @end_pos: 
80
81 <!-- ##### SIGNAL GtkEditable::insert-text ##### -->
82 <para>
83
84 </para>
85
86 @editable: 
87 @new_text: 
88 @new_text_length: 
89 @position: 
90
91 <!-- ##### FUNCTION gtk_editable_select_region ##### -->
92 <para>
93
94 </para>
95
96 @editable: 
97 @start_pos: 
98 @end_pos: 
99
100
101 <!-- ##### FUNCTION gtk_editable_get_selection_bounds ##### -->
102 <para>
103
104 </para>
105
106 @editable: 
107 @start_pos: 
108 @end_pos: 
109 @Returns: 
110
111
112 <!-- ##### FUNCTION gtk_editable_insert_text ##### -->
113 <para>
114
115 </para>
116
117 @editable: 
118 @new_text: 
119 @new_text_length: 
120 @position: 
121
122
123 <!-- ##### FUNCTION gtk_editable_delete_text ##### -->
124 <para>
125
126 </para>
127
128 @editable: 
129 @start_pos: 
130 @end_pos: 
131
132
133 <!-- ##### FUNCTION gtk_editable_get_chars ##### -->
134 <para>
135
136 </para>
137
138 @editable: 
139 @start_pos: 
140 @end_pos: 
141 @Returns: 
142
143
144 <!-- ##### FUNCTION gtk_editable_cut_clipboard ##### -->
145 <para>
146
147 </para>
148
149 @editable: 
150
151
152 <!-- ##### FUNCTION gtk_editable_copy_clipboard ##### -->
153 <para>
154
155 </para>
156
157 @editable: 
158
159
160 <!-- ##### FUNCTION gtk_editable_paste_clipboard ##### -->
161 <para>
162
163 </para>
164
165 @editable: 
166
167
168 <!-- ##### FUNCTION gtk_editable_delete_selection ##### -->
169 <para>
170
171 </para>
172
173 @editable: 
174
175
176 <!-- ##### FUNCTION gtk_editable_set_position ##### -->
177 <para>
178
179 </para>
180
181 @editable: 
182 @position: 
183
184
185 <!-- ##### FUNCTION gtk_editable_get_position ##### -->
186 <para>
187
188 </para>
189
190 @editable: 
191 @Returns: 
192
193
194 <!-- ##### FUNCTION gtk_editable_set_editable ##### -->
195 <para>
196
197 </para>
198
199 @editable: 
200 @is_editable: 
201
202
203 <!-- ##### FUNCTION gtk_editable_get_editable ##### -->
204 <para>
205
206 </para>
207
208 @editable: 
209 @Returns: 
210
211