gtkeditable: move documentation to inline comments
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=617316
This commit is contained in:
parent
93fd2b44c3
commit
7dde4d93ad
1
docs/reference/gtk/tmpl/.gitignore
vendored
1
docs/reference/gtk/tmpl/.gitignore
vendored
@ -5,6 +5,7 @@ gtkbuilder.sgml
|
||||
gtkbutton.sgml
|
||||
gtkcalendar.sgml
|
||||
gtkcelleditable.sgml
|
||||
gtkeditable.sgml
|
||||
gtkhbox.sgml
|
||||
gtkiconview.sgml
|
||||
gtkimcontextsimple.sgml
|
||||
|
@ -1,214 +0,0 @@
|
||||
<!-- ##### 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 <ctype.h>
|
||||
|
||||
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:
|
||||
|
||||
|
@ -24,6 +24,50 @@
|
||||
* GTK+ at ftp://ftp.gtk.org/pub/gtk/.
|
||||
*/
|
||||
|
||||
/**
|
||||
* SECTION:gtkeditable
|
||||
* @Short_description: Interface for text-editing widgets
|
||||
* @Title: GtkEditable
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* 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 <ctype.h>
|
||||
*
|
||||
* 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>
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
#include <string.h>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user