]> Pileus Git - ~andy/gtk/blob - docs/reference/gtk/tmpl/gtkeditable.sgml
Make 3.0 parallel-installable to 2.x
[~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 <!-- ##### SECTION Image ##### -->
59
60
61 <!-- ##### STRUCT GtkEditable ##### -->
62 <para>
63 The #GtkEditable structure is an opaque structure whose members 
64 cannot be directly accessed.
65 </para>
66
67
68 <!-- ##### SIGNAL GtkEditable::changed ##### -->
69 <para>
70
71 </para>
72
73 @editable: the object which received the signal.
74
75 <!-- ##### SIGNAL GtkEditable::delete-text ##### -->
76 <para>
77
78 </para>
79
80 @editable: 
81 @start_pos: 
82 @end_pos: 
83
84 <!-- ##### SIGNAL GtkEditable::insert-text ##### -->
85 <para>
86
87 </para>
88
89 @editable: 
90 @new_text: 
91 @new_text_length: 
92 @position: 
93
94 <!-- ##### FUNCTION gtk_editable_select_region ##### -->
95 <para>
96
97 </para>
98
99 @editable: 
100 @start_pos: 
101 @end_pos: 
102
103
104 <!-- ##### FUNCTION gtk_editable_get_selection_bounds ##### -->
105 <para>
106
107 </para>
108
109 @editable: 
110 @start_pos: 
111 @end_pos: 
112 @Returns: 
113
114
115 <!-- ##### FUNCTION gtk_editable_insert_text ##### -->
116 <para>
117
118 </para>
119
120 @editable: 
121 @new_text: 
122 @new_text_length: 
123 @position: 
124
125
126 <!-- ##### FUNCTION gtk_editable_delete_text ##### -->
127 <para>
128
129 </para>
130
131 @editable: 
132 @start_pos: 
133 @end_pos: 
134
135
136 <!-- ##### FUNCTION gtk_editable_get_chars ##### -->
137 <para>
138
139 </para>
140
141 @editable: 
142 @start_pos: 
143 @end_pos: 
144 @Returns: 
145
146
147 <!-- ##### FUNCTION gtk_editable_cut_clipboard ##### -->
148 <para>
149
150 </para>
151
152 @editable: 
153
154
155 <!-- ##### FUNCTION gtk_editable_copy_clipboard ##### -->
156 <para>
157
158 </para>
159
160 @editable: 
161
162
163 <!-- ##### FUNCTION gtk_editable_paste_clipboard ##### -->
164 <para>
165
166 </para>
167
168 @editable: 
169
170
171 <!-- ##### FUNCTION gtk_editable_delete_selection ##### -->
172 <para>
173
174 </para>
175
176 @editable: 
177
178
179 <!-- ##### FUNCTION gtk_editable_set_position ##### -->
180 <para>
181
182 </para>
183
184 @editable: 
185 @position: 
186
187
188 <!-- ##### FUNCTION gtk_editable_get_position ##### -->
189 <para>
190
191 </para>
192
193 @editable: 
194 @Returns: 
195
196
197 <!-- ##### FUNCTION gtk_editable_set_editable ##### -->
198 <para>
199
200 </para>
201
202 @editable: 
203 @is_editable: 
204
205
206 <!-- ##### FUNCTION gtk_editable_get_editable ##### -->
207 <para>
208
209 </para>
210
211 @editable: 
212 @Returns: 
213
214