/src/wrappers/gtk/library/gtk_file_chooser_button.e
Specman e | 190 lines | 46 code | 13 blank | 131 comment | 2 complexity | f2dfb7da6cf1e4608caf81b795e671f4 MD5 | raw file
1indexing 2 description: "GtkFileChooserButton รข€” A button to launch a file selection dialog" 3 copyright: "[ 4 Copyright (C) 2006 eiffel-libraries team, GTK+ team and others 5 6 This library is free software; you can redistribute it and/or 7 modify it under the terms of the GNU Lesser General Public License 8 as published by the Free Software Foundation; either version 2.1 of 9 the License, or (at your option) any later version. 10 11 This library is distributed in the hope that it will be useful, but 12 WITHOUT ANY WARRANTY; without even the implied warranty of 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 Lesser General Public License for more details. 15 16 You should have received a copy of the GNU Lesser General Public 17 License along with this library; if not, write to the Free Software 18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 19 02110-1301 USA 20 ]" 21 date: "$Date:$" 22 revision "$REvision:$" 23 24class GTK_FILE_CHOOSER_BUTTON 25 26inherit 27 GTK_HBOX 28 undefine 29 struct_size 30 end 31 GTK_FILE_CHOOSER 32 33insert 34 GTK_FILE_CHOOSER_ACTION 35 GTK_FILE_CHOOSER_BUTTON_EXTERNALS 36 -- Implemented Interfaces 37 -- GtkFileChooserButton implements GtkFileChooser and AtkImplementorIface. 38 39creation 40 from_title, 41 from_external_pointer 42 43feature {} -- Creation 44 45 from_title (a_title: STRING; an_action: INTEGER) is 46 -- Creates a new file-selecting button widget. 47 -- a_title : the title of the browse dialog. 48 -- an_action : the open mode for the widget. 49 require 50 valid_title: a_title /= Void 51 is_valid_gtk_file_chooser_action (an_action) 52 do 53 from_external_pointer (gtk_file_chooser_button_new (a_title.to_external, an_action)) 54 end 55 56-- gtk_file_chooser_button_new_with_backend () 57-- 58-- GtkWidget* gtk_file_chooser_button_new_with_backend 59-- (const gchar *title, 60-- GtkFileChooserAction action, 61-- const gchar *backend); 62-- 63-- Creates a new file-selecting button widget using backend. 64-- 65-- title : the title of the browse dialog. 66-- action : the open mode for the widget. 67-- backend : the name of the GtkFileSystem backend to use. 68-- Returns : a new button widget. 69-- 70-- Since 2.6 71-- gtk_file_chooser_button_new_with_dialog () 72-- 73-- GtkWidget* gtk_file_chooser_button_new_with_dialog 74-- (GtkWidget *dialog); 75-- 76-- Creates a GtkFileChooserButton widget which uses dialog as it's file-picking window. Note that dialog must be a GtkFileChooserDialog (or subclass) and must not have GTK_DIALOG_DESTROY_WITH_PARENT set. 77-- 78-- dialog : the GtkFileChooserDialog widget to use. 79-- Returns : a new button widget. 80-- 81-- Since 2.6 82 83feature 84 85 title: STRING is 86 -- Retrieves the title of the browse dialog used by button. 87 -- The returned value should not be modified or freed. 88 do 89 create Result.from_external (gtk_file_chooser_button_get_title (handle)) 90 end 91 92-- gtk_file_chooser_button_set_title () 93-- 94-- void gtk_file_chooser_button_set_title 95-- (GtkFileChooserButton *button, 96-- const gchar *title); 97-- 98-- Modifies the title of the browse dialog used by button. 99-- 100-- button : the button widget to modify. 101-- title : the new browse dialog title. 102-- 103-- Since 2.6 104-- gtk_file_chooser_button_get_width_chars () 105-- 106-- gint gtk_file_chooser_button_get_width_chars 107-- (GtkFileChooserButton *button); 108-- 109-- Retrieves the width in characters of the button widget's entry and/or label. 110-- 111-- button : the button widget to examine. 112-- Returns : an integer width (in characters) that the button will use to size itself. 113-- 114-- Since 2.6 115-- gtk_file_chooser_button_set_width_chars () 116-- 117-- void gtk_file_chooser_button_set_width_chars 118-- (GtkFileChooserButton *button, 119-- gint n_chars); 120-- 121-- Sets the width (in characters) that button will use to n_chars. 122-- 123-- button : the button widget to examine. 124-- n_chars : the new width, in characters. 125-- 126-- Since 2.6 127-- gtk_file_chooser_button_get_focus_on_click () 128-- 129-- gboolean gtk_file_chooser_button_get_focus_on_click 130-- (GtkFileChooserButton *button); 131-- 132-- Returns whether the button grabs focus when it is clicked with the mouse. See gtk_file_chooser_button_set_focus_on_click(). 133-- 134-- button : a GtkFileChooserButton 135-- Returns : TRUE if the button grabs focus when it is clicked with the mouse. 136-- 137-- Since 2.10 138-- gtk_file_chooser_button_set_focus_on_click () 139-- 140-- void gtk_file_chooser_button_set_focus_on_click 141-- (GtkFileChooserButton *button, 142-- gboolean focus_on_click); 143-- 144-- 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. 145-- 146-- button : a GtkFileChooserButton 147-- focus_on_click : whether the button grabs focus when clicked with the mouse 148-- 149-- Since 2.10 150-- Property Details 151-- The "dialog" property 152-- 153-- "dialog" GtkFileChooserDialog : Write / Construct Only 154-- 155-- Instance of the GtkFileChooserDialog associated with the button. 156-- 157-- Since 2.6 158-- The "focus-on-click" property 159-- 160-- "focus-on-click" gboolean : Read / Write 161-- 162-- Whether the GtkFileChooserButton button grabs focus when it is clicked with the mouse. 163-- 164-- Default value: TRUE 165-- 166-- Since 2.10 167-- The "title" property 168-- 169-- "title" gchararray : Read / Write 170-- 171-- Title to put on the GtkFileChooserDialog associated with the button. 172-- 173-- Default value: "Select A File" 174-- 175-- Since 2.6 176-- The "width-chars" property 177-- 178-- "width-chars" gint : Read / Write 179-- 180-- The width of the entry and label inside the button, in characters. 181-- 182-- Allowed values: >= -1 183-- 184-- Default value: -1 185-- 186-- Since 2.6 187-- See Also 188-- 189-- GtkFileChooserDialog 190end -- GTK_FILE_CHOOSER_BUTTON