gtk2/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml
Jonathan Blandford 4614cffc73 Add GtkAboutDialog and GtkFileChooserButton
Sun Oct 24 02:54:36 2004  Jonathan Blandford  <jrb@redhat.com>

        * gtk/gtk.types: Add GtkAboutDialog and GtkFileChooserButton

        * gtk/tmpl/GtkFileChooserButton.sgml: Write docs

        * gtk/tmpl/GtkListStore.sgml: Update performance comment now that
        we use GSequence.

        * gtk/visual_index.xml: Fix up a couple of errors.

        * gtk/images/*png: update

Sun Oct 24 02:56:43 2004  Jonathan Blandford  <jrb@redhat.com>

        * docs/tools/widgets.c: Update GtkFileChooserButton doc shot.
2004-10-24 07:05:00 +00:00

158 lines
3.6 KiB
Plaintext

<!-- ##### SECTION Title ##### -->
GtkFileChooserButton
<!-- ##### SECTION Short_Description ##### -->
A button to launch a file selection dialog
<!-- ##### SECTION Long_Description ##### -->
<para>
The #GtkFileChooserButton is a widget that lets the user select a
file. It implements the #GtkFileChooser interface. Visually, it is a
file name with a button to bring up a #GtkFileChooserDialog.
The user can then use that dialog to change the file associated with
that button. This widget does not support setting the "select-multiple"
property to %TRUE.
</para>
<example>
<title>Create a button to let the user select a file in /etc</title>
<programlisting>
{
GtkWidget *button;
button = gtk_file_chooser_button_new (_("Select a file"));
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
"/etc");
}
</programlisting>
</example>
<para>
The #GtkFileChooserButton supports all four #GtkFileChooserAction<!--
-->s that the #GtkFileChooser supports. Two of the actions,
%GTK_FILE_CHOOSER_ACTION_SAVE and
%GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER, give the button the appearance
of an entry next to a button. The user can type the name of a file in
this entry, and it will complete as it types. The other two actions,
%GTK_FILE_CHOOSER_ACTION_OPEN and
%GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, make the #GtkFileChooserAction
look like a #GtkButton.
</para>
<example>
<title>Using GtkFileChooserButton in save mode</title>
<programlisting>
{
GtkWidget *button;
button = gtk_file_chooser_button_new (_("Save as..."));
gtk_file_chooser_set_action (GTK_FILE_CHOOSER (button),
GTK_FILE_CHOOSER_ACTION_SAVE);
gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER_BUTTON (button),
DEFAULT_SAVE_DIRECTORY);
}
</programlisting>
</example>
<important>
<para>
The #GtkFileChooserButton will ellipsize the label while in Open mode,
and thus will thus request little horizontal space. To give the dialog
more space, you should call gtk_widget_size_request(), or pack it in
such a way that other interface elements give space to the widget.
</para>
</important>
<!-- ##### SECTION See_Also ##### -->
<para>
#GtkFileChooserDialog
</para>
<!-- ##### STRUCT GtkFileChooserButton ##### -->
<para>
This should not be accessed directly. Use the accessor functions below.
</para>
<!-- ##### ARG GtkFileChooserButton:active ##### -->
<para>
%TRUE, if the #GtkFileChooserDialog associated with the button has been
made visible. This can also be set by the application, though it is
rarely useful to do so.
</para>
<!-- ##### ARG GtkFileChooserButton:dialog ##### -->
<para>
Instance of the #GtkFileChooserDialog associated with the button.
</para>
<!-- ##### ARG GtkFileChooserButton:title ##### -->
<para>
Title to put on the #GtkFileChooserDialog associated with the button.
</para>
<!-- ##### FUNCTION gtk_file_chooser_button_new ##### -->
<para>
</para>
@title:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_new_with_backend ##### -->
<para>
</para>
@title:
@backend:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_new_with_dialog ##### -->
<para>
</para>
@dialog:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_get_title ##### -->
<para>
</para>
@button:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_set_title ##### -->
<para>
</para>
@button:
@title:
<!-- ##### FUNCTION gtk_file_chooser_button_get_active ##### -->
<para>
</para>
@button:
@Returns:
<!-- ##### FUNCTION gtk_file_chooser_button_set_active ##### -->
<para>
</para>
@button:
@is_active: