forked from AuroraMiddleware/gtk
Move GtkExpander docs inline
Based on a patch by Garrett Regier. https://bugzilla.gnome.org/show_bug.cgi?id=617327
This commit is contained in:
parent
c770fdd08a
commit
3e348181ed
1
docs/reference/gtk/tmpl/.gitignore
vendored
1
docs/reference/gtk/tmpl/.gitignore
vendored
@ -22,6 +22,7 @@ gtkeditable.sgml
|
||||
gtkentry.sgml
|
||||
gtkentrybuffer.sgml
|
||||
gtkeventbox.sgml
|
||||
gtkexpander.sgml
|
||||
gtkhbox.sgml
|
||||
gtkiconview.sgml
|
||||
gtkimcontextsimple.sgml
|
||||
|
@ -1,296 +0,0 @@
|
||||
<!-- ##### SECTION Title ##### -->
|
||||
GtkExpander
|
||||
|
||||
<!-- ##### SECTION Short_Description ##### -->
|
||||
A container which can hide its child
|
||||
|
||||
<!-- ##### SECTION Long_Description ##### -->
|
||||
<para>
|
||||
A #GtkExpander allows the user to hide or show its child by clicking
|
||||
on an expander triangle similar to the triangles used in a #GtkTreeView.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Normally you use an expander as you would use any other descendant
|
||||
of #GtkBin; you create the child widget and use gtk_container_add()
|
||||
to add it to the expander. When the expander is toggled, it will take
|
||||
care of showing and hiding the child automatically.
|
||||
</para>
|
||||
|
||||
<section id="expander-special-usage">
|
||||
<title>Special Usage</title>
|
||||
|
||||
<para>
|
||||
There are situations in which you may prefer to show and hide the
|
||||
expanded widget yourself, such as when you want to actually create
|
||||
the widget at expansion time. In this case, create a #GtkExpander
|
||||
but do not add a child to it. The expander widget has an
|
||||
<literal>expanded</literal> property which can be used to monitor
|
||||
its expansion state. You should watch this property with a signal
|
||||
connection as follows:
|
||||
</para>
|
||||
|
||||
<programlisting id="expander-callback-example">
|
||||
expander = gtk_expander_new_with_mnemonic ("_More Options");
|
||||
g_signal_connect (expander, "notify::expanded",
|
||||
G_CALLBACK (expander_callback), NULL);
|
||||
|
||||
...
|
||||
|
||||
static void
|
||||
expander_callback (GObject *object,
|
||||
GParamSpec *param_spec,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkExpander *expander;
|
||||
|
||||
expander = GTK_EXPANDER (object);
|
||||
|
||||
if (gtk_expander_get_expanded (expander))
|
||||
{
|
||||
/* Show or create widgets */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Hide or destroy widgets */
|
||||
}
|
||||
}
|
||||
</programlisting>
|
||||
</section>
|
||||
<refsect2 id="GtkExpander-BUILDER-UI">
|
||||
<title>GtkExpander as GtkBuildable</title>
|
||||
<para>
|
||||
The GtkExpander implementation of the GtkBuildable interface
|
||||
supports placing a child in the label position by specifying
|
||||
"label" as the "type" attribute of a <child> element.
|
||||
A normal content child can be specified without specifying
|
||||
a <child> type attribute.
|
||||
</para>
|
||||
<example>
|
||||
<title>A UI definition fragment with GtkExpander</title>
|
||||
<programlisting><![CDATA[
|
||||
<object class="GtkExpander">
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="expander-label"/>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkEntry" id="expander-content"/>
|
||||
</child>
|
||||
</object>
|
||||
]]></programlisting>
|
||||
</example>
|
||||
</refsect2>
|
||||
|
||||
<!-- ##### SECTION See_Also ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### SECTION Stability_Level ##### -->
|
||||
|
||||
|
||||
<!-- ##### SECTION Image ##### -->
|
||||
|
||||
|
||||
<!-- ##### STRUCT GtkExpander ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
|
||||
<!-- ##### SIGNAL GtkExpander::activate ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander: the object which received the signal.
|
||||
|
||||
<!-- ##### ARG GtkExpander:expanded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:label-fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:label-widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:use-markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:use-underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:expander-size ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### ARG GtkExpander:expander-spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_new ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_new_with_mnemonic ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@label:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_expanded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@expanded:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_expanded ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@spacing:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_spacing ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@label:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_label ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_use_underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@use_underline:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_use_underline ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_use_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@use_markup:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_use_markup ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_label_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@label_widget:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_label_widget ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_set_label_fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@label_fill:
|
||||
|
||||
|
||||
<!-- ##### FUNCTION gtk_expander_get_label_fill ##### -->
|
||||
<para>
|
||||
|
||||
</para>
|
||||
|
||||
@expander:
|
||||
@Returns:
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user