![]() |
![]() |
![]() |
GTK+ 3 Reference Manual | ![]() |
---|---|---|---|---|
Top | Description |
#include <gtk/gtk.h> GtkFileChooserButton; GtkWidget * gtk_file_chooser_button_new (const gchar *title
,GtkFileChooserAction action
); GtkWidget * gtk_file_chooser_button_new_with_dialog (GtkWidget *dialog
); const gchar * gtk_file_chooser_button_get_title (GtkFileChooserButton *button
); void gtk_file_chooser_button_set_title (GtkFileChooserButton *button
,const gchar *title
); gint gtk_file_chooser_button_get_width_chars (GtkFileChooserButton *button
); void gtk_file_chooser_button_set_width_chars (GtkFileChooserButton *button
,gint n_chars
); gboolean gtk_file_chooser_button_get_focus_on_click (GtkFileChooserButton *button
); void gtk_file_chooser_button_set_focus_on_click (GtkFileChooserButton *button
,gboolean focus_on_click
);
GtkWidget * gtk_file_chooser_button_new (const gchar *title
,GtkFileChooserAction action
);
Creates a new file-selecting button widget.
|
the title of the browse dialog. |
|
the open mode for the widget. |
Returns : |
a new button widget. |
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.
|
the widget to use as dialog |
Returns : |
a new button widget. |
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.
|
the button widget to examine. |
Returns : |
a pointer to the browse dialog's title. |
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
.
|
the button widget to modify. |
|
the new browse dialog title. |
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.
|
the button widget to examine. |
Returns : |
an integer width (in characters) that the button will use to size itself. |
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
.
|
the button widget to examine. |
|
the new width, in characters. |
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()
.
|
a GtkFileChooserButton |
Returns : |
TRUE if the button grabs focus when it is clicked with
the mouse.
|
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.
|
a GtkFileChooserButton |
|
whether the button grabs focus when clicked with the mouse |
Since 2.10