[gspell/wip/inline-checker] docs: re-add docs to the InlineCheckerText
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gspell/wip/inline-checker] docs: re-add docs to the InlineCheckerText
- Date: Thu, 7 Jan 2016 11:35:09 +0000 (UTC)
commit cb4712dba129d4848921fb7d3ca12ed2ea8ca438
Author: Sébastien Wilmet <swilmet gnome org>
Date: Thu Jan 7 11:42:34 2016 +0100
docs: re-add docs to the InlineCheckerText
docs/reference/Makefile.am | 1 -
docs/reference/gspell-1.0-sections.txt | 12 ++++++++++++
docs/reference/gspell-docs.xml | 1 +
gspell/gspell-inline-checker-text.c | 28 +++++++++++++++++++++++++++-
4 files changed, 40 insertions(+), 2 deletions(-)
---
diff --git a/docs/reference/Makefile.am b/docs/reference/Makefile.am
index 4a3f74b..508c04e 100644
--- a/docs/reference/Makefile.am
+++ b/docs/reference/Makefile.am
@@ -21,7 +21,6 @@ CFILE_GLOB = $(top_srcdir)/gspell/*.c
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h private_code
IGNORE_HFILES = \
gspell-buffer-notifier.h \
- gspell-inline-checker-text.h \
gspell-inline-checker-text-buffer.h \
gspell-osx.h \
gspell-utils.h \
diff --git a/docs/reference/gspell-1.0-sections.txt b/docs/reference/gspell-1.0-sections.txt
index 1f7703f..dba7810 100644
--- a/docs/reference/gspell-1.0-sections.txt
+++ b/docs/reference/gspell-1.0-sections.txt
@@ -103,6 +103,18 @@ gspell_text_view_get_inline_checking
</SECTION>
<SECTION>
+<FILE>inline-checker-text</FILE>
+<TITLE>GspellInlineCheckerText</TITLE>
+GspellInlineCheckerText
+gspell_inline_checker_text_new
+gspell_inline_checker_text_set_enabled
+gspell_inline_checker_text_get_enabled
+<SUBSECTION Standard>
+GSPELL_TYPE_INLINE_CHECKER_TEXT
+GspellInlineCheckerTextClass
+</SECTION>
+
+<SECTION>
<FILE>navigator-gtv</FILE>
<TITLE>GspellNavigatorGtv</TITLE>
GspellNavigatorGtv
diff --git a/docs/reference/gspell-docs.xml b/docs/reference/gspell-docs.xml
index 0fef2a2..45bf84c 100644
--- a/docs/reference/gspell-docs.xml
+++ b/docs/reference/gspell-docs.xml
@@ -38,6 +38,7 @@
<title>GtkTextView Support</title>
<xi:include href="xml/text-buffer.xml"/>
<xi:include href="xml/text-view.xml"/>
+ <xi:include href="xml/inline-checker-text.xml"/>
<xi:include href="xml/navigator-gtv.xml"/>
</chapter>
</part>
diff --git a/gspell/gspell-inline-checker-text.c b/gspell/gspell-inline-checker-text.c
index 2a34e1e..70891c6 100644
--- a/gspell/gspell-inline-checker-text.c
+++ b/gspell/gspell-inline-checker-text.c
@@ -20,7 +20,28 @@
#include "gspell-inline-checker-text.h"
#include "gspell-inline-checker-text-buffer.h"
-/* Inline spell checker for GtkTextView. Handles buffer changes. */
+/**
+ * SECTION:inline-checker-text
+ * @Short_description: Inline spell checker for GtkTextView
+ * @Title: GspellInlineCheckerText
+ *
+ * The #GspellInlineCheckerText is an inline spell checker for the
+ * #GtkTextView widget. Misspelled words are highlighted with a
+ * %PANGO_UNDERLINE_ERROR, usually a red wavy underline. Right-clicking a
+ * misspelled word pops up a context menu of suggested replacements. The context
+ * menu also contains an “Ignore All” item to add the misspelled word to the
+ * session dictionary. And an “Add” item to add the word to the personal
+ * dictionary.
+ *
+ * The spell is checked only on the visible region of the #GtkTextView. Note
+ * that if a same #GtkTextBuffer is used for several views, the misspelled words
+ * are visible in all views, because the highlighting is achieved with a
+ * #GtkTextTag added to the buffer.
+ *
+ * You need to call gspell_text_buffer_set_spell_checker() to associate a
+ * #GspellChecker to the #GtkTextBuffer. #GtkTextView:buffer changes are
+ * handled, as well as #GspellChecker changes.
+ */
typedef struct _GspellInlineCheckerTextPrivate GspellInlineCheckerTextPrivate;
@@ -196,6 +217,11 @@ gspell_inline_checker_text_class_init (GspellInlineCheckerTextClass *klass)
object_class->set_property = gspell_inline_checker_text_set_property;
object_class->dispose = gspell_inline_checker_text_dispose;
+ /**
+ * GspellInlineCheckerText:view:
+ *
+ * The #GtkTextView.
+ */
g_object_class_install_property (object_class,
PROP_VIEW,
g_param_spec_object ("view",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]