Document GdkScreen.

* gdk/tmpl/windows.sgml: Document GdkScreen.

	* gtk/gtk-sections.txt: Move a few Class structs to Standard sections.

	* gtk/tmpl/gtktreemodel.sgml, gtk/tmpl/gtkprogress.sgml,
	gtk/tmpl/gtksignal.sgml, gtk/tmpl/gtkimage.sgml: Generate proper
	markup for format strings in examples, also fix an oversight in
	the GtkTreeModel example.  (#74213)
This commit is contained in:
Matthias Clasen
2002-03-12 00:20:02 +00:00
parent 57c31b5000
commit 7788a6a702
7 changed files with 85 additions and 30 deletions

View File

@ -45,7 +45,7 @@ on the image, such as button clicks, place the image inside a
GdkEventButton *event,
gpointer data)
{
g_print ("Event box clicked at coordinates %%d,%%d\n",
g_print ("Event box clicked at coordinates &percent;d,&percent;d\n",
event->x, event->y);
/* Returning TRUE means we handled the event, so the signal

View File

@ -53,22 +53,22 @@ current progress. The string can contain the following substitution characters:
<itemizedlist>
<listitem>
<para>
%%v - the current progress value.
&percent;v - the current progress value.
</para>
</listitem>
<listitem>
<para>
%%l - the lower bound for the progress value.
&percent;l - the lower bound for the progress value.
</para>
</listitem>
<listitem>
<para>
%%u - the upper bound for the progress value.
&percent;u - the upper bound for the progress value.
</para>
</listitem>
<listitem>
<para>
%%p - the current progress percentage.
&percent;p - the current progress percentage.
</para>
</listitem>
</itemizedlist>

View File

@ -450,7 +450,7 @@ as parameter to your function:
<programlisting>
static void button_clicked_int (GtkButton* button, gpointer func_data)
{
g_print ("button pressed: %%d\n", GPOINTER_TO_INT (func_data));
g_print ("button pressed: &percent;d\n", GPOINTER_TO_INT (func_data));
}
/* By calling this function, you will make the g_print above

View File

@ -103,7 +103,7 @@ the second is much more common, as you often get paths from callbacks.
<para>
<example>
<title>Acquiring a <structname>GtkTreeIter</structname></title>
<programlisting><![CDATA[
<programlisting>
/* Three ways of getting the iter pointing to the location
*/
{
@ -112,22 +112,21 @@ the second is much more common, as you often get paths from callbacks.
GtkTreeIter parent_iter;
/* get the iterator from a string */
gtk_tree_model_get_iter_from_string (model, &iter, "3:2:5");
gtk_tree_model_get_iter_from_string (model, &amp;iter, "3:2:5");
/* get the iterator from a path */
path = gtk_tree_path_new_from_string ("3:2:5");
gtk_tree_model_get_iter (model, &iter, path);
gtk_tree_model_get_iter (model, &amp;iter, path);
gtk_tree_path_free (path);
/* walk the tree to find the iterator */
gtk_tree_model_get_nth_child (model, &iter, NULL, 3);
gtk_tree_model_get_nth_child (model, &amp;iter, NULL, 3);
parent_iter = iter;
gtk_tree_model_get_nth_child (model, &iter, &parent_iter, 2);
gtk_tree_model_get_nth_child (model, &amp;iter, &amp;parent_iter, 2);
parent_iter = iter;
gtk_tree_model_get_nth_child (model, &iter, NULL, 5);
gtk_tree_model_get_nth_child (model, &amp;iter, NULL, 5);
}
]]>
</programlisting>
</example>
</para>
@ -140,7 +139,7 @@ it is specific to the #GtkListStore. For information on how to write
such a function, see the #GtkListStore documentation.
<example>
<title>Reading data from a <structname>GtkTreeModel</structname></title>
<programlisting><![CDATA[
<programlisting>
enum
{
STRING_COLUMN,
@ -159,7 +158,7 @@ enum
populate_model (list_store);
/* Get the first iter in the list */
if (gtk_tree_model_get_iter_first (model, &iter))
if (gtk_tree_model_get_iter_first (model, &amp;iter))
{
gint row_count = 0;
@ -169,30 +168,28 @@ enum
gchar *str_data;
gint int_data;
/* Make sure you terminate calls to gtk_tree_model_get
/* Make sure you terminate calls to gtk_tree_model_get(<!>)
* with a '-1' value
*/
gtk_tree_model_get (list_store,
STRING_COLUMN, &str_data,
INT_COLUMN, &int_data,
gtk_tree_model_get (list_store, &amp;iter,
STRING_COLUMN, &amp;str_data,
INT_COLUMN, &amp;int_data,
-1);
/* Do something with the data */
g_print ("Row %d: (%s,%d)\n", row_count, str_data, int_data);
g_print ("Row &percent;d: (&percent;s,&percent;d)\n", row_count, str_data, int_data);
g_free (str_data);
row_count ++;
}
while (gtk_tree_model_iter_next (model, &iter));
while (gtk_tree_model_iter_next (model, &amp;iter));
}
else
{
/* As gtk_tree_model_get_iter_first returned FALSE, the list is empty */
/* As gtk_tree_model_get_iter_first(<!>) returned FALSE, the list is empty */
g_print ("Model is empty.\n");
}
}
]]>
</programlisting>
</example>
</para>
@ -795,3 +792,48 @@ versions of GTK+.
@new_order:
<!-- ##### SIGNAL GtkTreeModel::row-changed ##### -->
<para>
</para>
@treemodel: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkTreeModel::row-deleted ##### -->
<para>
</para>
@treemodel: the object which received the signal.
@arg1:
<!-- ##### SIGNAL GtkTreeModel::row-has-child-toggled ##### -->
<para>
</para>
@treemodel: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkTreeModel::row-inserted ##### -->
<para>
</para>
@treemodel: the object which received the signal.
@arg1:
@arg2:
<!-- ##### SIGNAL GtkTreeModel::rows-reordered ##### -->
<para>
</para>
@treemodel: the object which received the signal.
@arg1:
@arg2:
@arg3: