Top |
GtkFileChooser * | dialog | Write / Construct Only |
gboolean | focus-on-click | Read / Write |
char * | title | Read / Write |
int | width-chars | Read / Write |
GObject ╰── GInitiallyUnowned ╰── GtkObject ╰── GtkWidget ╰── GtkContainer ╰── GtkBox ╰── GtkHBox ╰── GtkFileChooserButton
GtkFileChooserButton implements AtkImplementorIface, GtkBuildable, GtkOrientable and GtkFileChooser.
GtkWidget * gtk_file_chooser_button_new (const gchar *title
,GtkFileChooserAction action
);
Creates a new file-selecting button widget.
Since: 2.6
GtkWidget * gtk_file_chooser_button_new_with_backend (const gchar *title
,GtkFileChooserAction action
,const gchar *backend
);
gtk_file_chooser_button_new_with_backend
has been deprecated since version 2.14 and should not be used in newly-written code.
Use gtk_file_chooser_button_new()
instead.
Creates a new file-selecting button widget using backend
.
title |
the title of the browse dialog. |
|
action |
the open mode for the widget. |
|
backend |
the name of the GtkFileSystem backend to use. |
Since: 2.6
GtkWidget *
gtk_file_chooser_button_new_with_dialog
(GtkWidget *dialog
);
Creates a GtkFileChooserButton widget which uses dialog
as its
file-picking window.
Note that dialog
must be a GtkDialog (or subclass) which
implements the GtkFileChooser interface and must not have
GTK_DIALOG_DESTROY_WITH_PARENT
set.
Also note that the dialog needs to have its confirmative button
added with response GTK_RESPONSE_ACCEPT
or GTK_RESPONSE_OK
in
order for the button to take over the file selected in the dialog.
Since: 2.6
const gchar *
gtk_file_chooser_button_get_title (GtkFileChooserButton *button
);
Retrieves the title of the browse dialog used by button
. The returned value
should not be modified or freed.
Since: 2.6
void gtk_file_chooser_button_set_title (GtkFileChooserButton *button
,const gchar *title
);
Modifies the title
of the browse dialog used by button
.
Since: 2.6
gint
gtk_file_chooser_button_get_width_chars
(GtkFileChooserButton *button
);
Retrieves the width in characters of the button
widget's entry and/or label.
Since: 2.6
void gtk_file_chooser_button_set_width_chars (GtkFileChooserButton *button
,gint n_chars
);
Sets the width (in characters) that button
will use to n_chars
.
Since: 2.6
gboolean
gtk_file_chooser_button_get_focus_on_click
(GtkFileChooserButton *button
);
Returns whether the button grabs focus when it is clicked with the mouse.
See gtk_file_chooser_button_set_focus_on_click()
.
Since: 2.10
void gtk_file_chooser_button_set_focus_on_click (GtkFileChooserButton *button
,gboolean focus_on_click
);
Sets whether the button will grab focus when it is clicked with the mouse. Making mouse clicks not grab focus is useful in places like toolbars where you don't want the keyboard focus removed from the main area of the application.
Since: 2.10
“dialog”
property“dialog” GtkFileChooser *
Instance of the GtkFileChooserDialog associated with the button.
Owner: GtkFileChooserButton
Flags: Write / Construct Only
Since: 2.6
“focus-on-click”
property “focus-on-click” gboolean
Whether the GtkFileChooserButton button grabs focus when it is clicked with the mouse.
Owner: GtkFileChooserButton
Flags: Read / Write
Default value: TRUE
Since: 2.10
“title”
property “title” char *
Title to put on the GtkFileChooserDialog associated with the button.
Owner: GtkFileChooserButton
Flags: Read / Write
Default value: "Select a File"
Since: 2.6
“width-chars”
property “width-chars” int
The width of the entry and label inside the button, in characters.
Owner: GtkFileChooserButton
Flags: Read / Write
Allowed values: >= -1
Default value: -1
Since: 2.6
“file-set”
signalvoid user_function (GtkFileChooserButton *widget, gpointer user_data)
The ::file-set signal is emitted when the user selects a file.
Note that this signal is only emitted when the user changes the file.
widget |
the object which received the signal. |
|
user_data |
user data set when the signal handler was connected. |
Flags: Run First
Since: 2.12