summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-01-30 04:53:53 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-01-30 04:53:53 +0000
commita351e61c0bc7a8157c51fc0bc2cd1742e439e94a (patch)
tree22819b9b46d6605ecc1de5420c5364dde4703049 /docs
parent6a66c972cafeeabd6e1a35ea7f622bb1f380bb94 (diff)
downloadgtk+-a351e61c0bc7a8157c51fc0bc2cd1742e439e94a.tar.gz
GtkAssistant stuff
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/ChangeLog10
-rw-r--r--docs/reference/gtk/Makefile.am3
-rw-r--r--docs/reference/gtk/images/assistant.pngbin0 -> 11051 bytes
-rw-r--r--docs/reference/gtk/tmpl/gtkassistant.sgml33
-rw-r--r--docs/reference/gtk/visual_index.xml3
-rw-r--r--docs/tools/widgets.c29
6 files changed, 67 insertions, 11 deletions
diff --git a/docs/reference/ChangeLog b/docs/reference/ChangeLog
index 0474f0f78e..6ca23389d1 100644
--- a/docs/reference/ChangeLog
+++ b/docs/reference/ChangeLog
@@ -1,3 +1,13 @@
+2006-01-29 Matthias Clasen <mclasen@redhat.com>
+
+ * gtk/visual_index.xml: Add GtkAssistant
+
+ * gtk/images/assistant.png: New image.
+
+ * gtk/tmpl/gtkassistant.sgml: More docs, by Carlos Garnacho.
+
+ * gtk/Makefile.am: Add new files.
+
2006-01-28 Matthias Clasen <mclasen@redhat.com>
* gtk/gtk-sections.txt: Add gtk_link_button_set_uri_hook
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am
index 42d8833932..9bba1a116b 100644
--- a/docs/reference/gtk/Makefile.am
+++ b/docs/reference/gtk/Makefile.am
@@ -106,6 +106,7 @@ content_files = \
migrating-GtkIconView.sgml \
migrating-GtkAboutDialog.sgml \
migrating-GtkColorButton.sgml \
+ migrating-GtkAssistant.sgml \
objects_grouped.sgml \
question_index.sgml \
resources.sgml \
@@ -126,6 +127,7 @@ expand_content_files = \
migrating-GtkIconView.sgml \
migrating-GtkAboutDialog.sgml \
migrating-GtkColorButton.sgml \
+ migrating-GtkAssistant.sgml \
tree_widget.sgml \
text_widget.sgml \
question_index.sgml
@@ -243,6 +245,7 @@ HTML_IMAGES = \
$(top_srcdir)/gtk/stock-icons/24/gtk-leave-fullscreen.png \
$(top_srcdir)/gtk/stock-icons/24/gtk-info.png \
$(srcdir)/images/accel-label.png \
+ $(srcdir)/images/assistant.png \
$(srcdir)/images/button.png \
$(srcdir)/images/check-button.png \
$(srcdir)/images/color-button.png \
diff --git a/docs/reference/gtk/images/assistant.png b/docs/reference/gtk/images/assistant.png
new file mode 100644
index 0000000000..30c9e16caf
--- /dev/null
+++ b/docs/reference/gtk/images/assistant.png
Binary files differ
diff --git a/docs/reference/gtk/tmpl/gtkassistant.sgml b/docs/reference/gtk/tmpl/gtkassistant.sgml
index 6a1a77e75f..6696e287d4 100644
--- a/docs/reference/gtk/tmpl/gtkassistant.sgml
+++ b/docs/reference/gtk/tmpl/gtkassistant.sgml
@@ -2,11 +2,13 @@
GtkAssistant
<!-- ##### SECTION Short_Description ##### -->
-guiding users through multi-step operations
+A widget used to guide users through multi-step operations
<!-- ##### SECTION Long_Description ##### -->
<para>
-
+A #GtkAssistant is a widget used to represent a generally complex
+operation splitted in several steps, guiding the user through its pages
+and controlling the page flow to collect the necessary data.
</para>
<!-- ##### SECTION See_Also ##### -->
@@ -165,12 +167,15 @@ guiding users through multi-step operations
<!-- ##### USER_FUNCTION GtkAssistantPageFunc ##### -->
<para>
-
+A function used by gtk_assistant_set_forward_page_func() to know which
+is the next page given a current one. It's called both for computing the
+next page when the user presses the "forward" button and for handling
+the behavior of the "last" button.
</para>
-@current_page:
-@data:
-@Returns:
+@current_page: The page number used to calculate the next page.
+@data: user data.
+@Returns: The next page number.
<!-- ##### FUNCTION gtk_assistant_set_forward_page_func ##### -->
@@ -186,14 +191,20 @@ guiding users through multi-step operations
<!-- ##### ENUM GtkAssistantPageType ##### -->
<para>
+An enum for determining the page role inside the #GtkAssistant. It's used to
+handle buttons sensitivity and visibility.
+</para>
+<para>
+Note that an assistant needs to end its page flow with a page of type GTK_ASSISTANT_PAGE_CONFIRM
+or GTK_ASSISTANT_PAGE_SUMMARY to be correct.
</para>
-@GTK_ASSISTANT_PAGE_CONTENT:
-@GTK_ASSISTANT_PAGE_INTRO:
-@GTK_ASSISTANT_PAGE_CONFIRM:
-@GTK_ASSISTANT_PAGE_SUMMARY:
-@GTK_ASSISTANT_PAGE_PROGRESS:
+@GTK_ASSISTANT_PAGE_CONTENT: The page has regular contents.
+@GTK_ASSISTANT_PAGE_INTRO: The page contains an introduction to the assistant task.
+@GTK_ASSISTANT_PAGE_CONFIRM: The page lets the user confirm or deny the changes.
+@GTK_ASSISTANT_PAGE_SUMMARY: The page informs the user of the changes done.
+@GTK_ASSISTANT_PAGE_PROGRESS: Used for tasks that take a long time to complete, blocks the assistant until the page is marked as complete.
<!-- ##### FUNCTION gtk_assistant_set_page_type ##### -->
<para>
diff --git a/docs/reference/gtk/visual_index.xml b/docs/reference/gtk/visual_index.xml
index 48ea8692c5..a8033d3216 100644
--- a/docs/reference/gtk/visual_index.xml
+++ b/docs/reference/gtk/visual_index.xml
@@ -86,6 +86,9 @@
<link linkend="GtkMessageDialog">
<inlinegraphic fileref="messagedialog.png" format="PNG"></inlinegraphic>
</link>
+ <link linkend="GtkAssistant">
+ <inlinegraphic fileref="assistant.png" format="PNG"></inlinegraphic>
+ </link>
<link linkend="GtkFontSelectionDialog">
<inlinegraphic fileref="fontsel.png" format="PNG"></inlinegraphic>
</link>
diff --git a/docs/tools/widgets.c b/docs/tools/widgets.c
index a902c4ff3b..f271ccdf04 100644
--- a/docs/tools/widgets.c
+++ b/docs/tools/widgets.c
@@ -839,6 +839,34 @@ create_image (void)
return new_widget_info ("image", vbox, SMALL);
}
+static WidgetInfo *
+create_assistant (void)
+{
+ GtkWidget *widget;
+ GtkWidget *page1, *page2;
+ WidgetInfo *info;
+
+ widget = gtk_assistant_new ();
+ gtk_window_set_title (GTK_WINDOW (widget), "Assistant");
+
+ page1 = gtk_label_new ("Assistant");
+ gtk_widget_show (page1);
+ gtk_widget_set_size_request (page1, 300, 140);
+ gtk_assistant_prepend_page (GTK_ASSISTANT (widget), page1);
+ gtk_assistant_set_page_title (GTK_ASSISTANT (widget), page1, "Assistant page");
+ gtk_assistant_set_page_complete (GTK_ASSISTANT (widget), page1, TRUE);
+
+ page2 = gtk_label_new (NULL);
+ gtk_widget_show (page2);
+ gtk_assistant_append_page (GTK_ASSISTANT (widget), page2);
+ gtk_assistant_set_page_type (GTK_ASSISTANT (widget), page2, GTK_ASSISTANT_PAGE_CONFIRM);
+
+ info = new_widget_info ("assistant", widget, ASIS);
+ info->include_decorations = TRUE;
+
+ return info;
+}
+
GList *
get_all_widgets (void)
{
@@ -876,6 +904,7 @@ get_all_widgets (void)
retval = g_list_prepend (retval, create_colorsel ());
retval = g_list_prepend (retval, create_filesel ());
retval = g_list_prepend (retval, create_fontsel ());
+ retval = g_list_prepend (retval, create_assistant ());
return retval;
}