summaryrefslogtreecommitdiff
path: root/docs/reference/gtk/tmpl/gtkfilechooserbutton.sgml
blob: 10071b4cdf4ca6fb1c370862fa999ed02ce828f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!-- ##### 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_ACTION_OPEN);
  gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (button),
                                       "/etc");
}
</programlisting>
</example>

<para>
The #GtkFileChooserButton supports the #GtkFileChooserAction<!--
-->s %GTK_FILE_CHOOSER_ACTION_OPEN and %GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER.
</para>

<important>
<para>
The #GtkFileChooserButton will ellipsize the label,
and thus will thus request little horizontal space.  To give the button
more space, you should call gtk_widget_size_request(),
gtk_file_chooser_button_set_width_chars(), or pack the button in
such a way that other interface elements give space to the widget.
</para>
</important>

<!-- ##### SECTION See_Also ##### -->
<para>
#GtkFileChooserDialog
</para>

<!-- ##### SECTION Stability_Level ##### -->


<!-- ##### STRUCT GtkFileChooserButton ##### -->
<para>
This should not be accessed directly.  Use the accessor functions below. 
</para>


<!-- ##### ARG GtkFileChooserButton:dialog ##### -->
<para>

</para>

<!-- ##### ARG GtkFileChooserButton:focus-on-click ##### -->
<para>

</para>

<!-- ##### ARG GtkFileChooserButton:title ##### -->
<para>

</para>

<!-- ##### ARG GtkFileChooserButton:width-chars ##### -->
<para>

</para>

<!-- ##### FUNCTION gtk_file_chooser_button_new ##### -->
<para>

</para>

@title: 
@action: 
@Returns: 


<!-- ##### FUNCTION gtk_file_chooser_button_new_with_backend ##### -->
<para>

</para>

@title: 
@action: 
@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_width_chars ##### -->
<para>

</para>

@button: 
@Returns: 


<!-- ##### FUNCTION gtk_file_chooser_button_set_width_chars ##### -->
<para>

</para>

@button: 
@n_chars: 


<!-- ##### FUNCTION gtk_file_chooser_button_get_focus_on_click ##### -->
<para>

</para>

@button: 
@Returns: 


<!-- ##### FUNCTION gtk_file_chooser_button_set_focus_on_click ##### -->
<para>

</para>

@button: 
@focus_on_click: