## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

1.     -----------------------------------------------------------------------

2.     --              GtkAda - Ada95 binding for Gtk+/Gnome                --

3.     --                                                                   --

4.     --                Copyright (C) 2006-2013, AdaCore                   --

5.     --                                                                   --

6.     -- This library is free software; you can redistribute it and/or     --

7.     -- modify it under the terms of the GNU General Public               --

8.     -- License as published by the Free Software Foundation; either      --

9.     -- version 2 of the License, or (at your option) any later version.  --

10.     --                                                                   --

11.     -- This library is distributed in the hope that it will be useful,   --

12.     -- but WITHOUT ANY WARRANTY; without even the implied warranty of    --

13.     -- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU --

14.     -- General Public License for more details.                          --

15.     --                                                                   --

16.     -- You should have received a copy of the GNU General Public         --

17.     -- License along with this library; if not, write to the             --

18.     -- Free Software Foundation, Inc., 59 Temple Place - Suite 330,      --

19.     -- Boston, MA 02111-1307, USA.                                       --

20.     --                                                                   --

21.     -- As a special exception, if other files instantiate generics from  --

22.     -- this unit, or you link this unit with other files to produce an   --

23.     -- executable, this  unit  does not  by itself cause  the resulting  --

24.     -- executable to be covered by the GNU General Public License. This  --

25.     -- exception does not however invalidate any other reasons why the   --

26.     -- executable file  might be covered by the  GNU Public License.     --

27.     -----------------------------------------------------------------------

29.     --  <description>

30.     --  The Gtk_File_Chooser_Button is a widget that lets the user select a file.

31.     --  It implements the Gtk_File_Chooser interface. Visually, it is a file name

32.     --  with a button to bring up a Gtk_File_Chooser_Dialog. The user can then use

33.     --  that dialog to change the file associated with that button. This widget

34.     --  does not support setting the "select-multiple" property to TRUE.

35.     --

36.     --  The Gtk_File_Chooser_Button supports the File_Chooser_Actions

37.     --  Action_Open and Action_Select_Folder.

38.     --

39.     --  The Gtk_File_Chooser_Button will ellipsize the label, and thus will request

40.     --  little horizontal space. To give the button more space, you should call

41.     --  Gtk.Widget.Size_Request, Set_Width_Chars, or pack the button in such a way

42.     --  that other interface elements give space to the widget.

43.     --  </description>

44.     --  <c_version>2.16.6</c_version>

45.     --  <group>Selectors</group>

46.     --  <screenshot>file-button.png</screenshot>

47.     --  <testgtk>create_file_chooser.adb</testgtk>

49.     with Glib.PropertiesTo API docTo specTo body;

50.     with Glib.TypesTo API docTo specTo body;

51.     with Gtk.BoxTo API docTo specTo body;

52.     with Gtk.File_ChooserTo API docTo specTo body;

53.     with Gtk.File_Chooser_DialogTo API docTo specTo body; use Gtk.File_Chooser_DialogTo API docTo specTo body;

55.     package Gtk.File_Chooser_ButtonTo API docTo specTo body is

57.        type Gtk_File_Chooser_Button_Record is

58.          new Gtk.Box.Gtk_Hbox_RecordTo API docTo spec with null record;

59.        type Gtk_File_Chooser_Button is

60.          access all Gtk_File_Chooser_Button_RecordTo API docTo spec'Class;

62.        function Get_TypeTo API docTo body return GTypeTo API docTo spec;

63.        --  Return the internal value associated with a Gtk_File_Chooser_Button

65.        procedure Gtk_NewTo API docTo body

66.          (Button : out Gtk_File_Chooser_ButtonTo API docTo spec;

67.           Title  : String;

68.           ActionTo API docTo body : Gtk.File_Chooser.File_Chooser_ActionTo API docTo spec);

69.        procedure InitializeTo API docTo body

70.          (Button : access Gtk_File_Chooser_Button_RecordTo API docTo spec'Class;

71.           Title  : String;

72.           ActionTo API docTo body : Gtk.File_Chooser.File_Chooser_ActionTo API docTo spec);

73.        --  Creates a new file-selecting button widget.

74.        --  Title is the title of the browse dialog

76.        procedure Gtk_New_With_BackendTo API docTo body

77.          (Button  : out Gtk_File_Chooser_ButtonTo API docTo spec;

78.           Title   : String;

79.           ActionTo API docTo body  : Gtk.File_Chooser.File_Chooser_ActionTo API docTo spec;

80.           Backend : String);

81.        pragma Obsolescent; --  Gtk_New_With_Backend

82.        procedure Initialize_With_BackendTo API docTo body

83.          (Button  : access Gtk_File_Chooser_Button_RecordTo API docTo spec'Class;

84.           Title   : String;

85.           ActionTo API docTo body  : Gtk.File_Chooser.File_Chooser_ActionTo API docTo spec;

86.           Backend : String);

87.        --  Creates a new file-selecting button widget using Backend. See also

88.        --  Gtk.File_System.

90.        procedure Gtk_New_With_DialogTo API docTo body

91.          (Button : out Gtk_File_Chooser_ButtonTo API docTo spec;

92.           Dialog : access Gtk_File_Chooser_Dialog_RecordTo API docTo spec'Class);

93.        procedure Initialize_With_DialogTo API docTo body

94.          (Button : access Gtk_File_Chooser_Button_RecordTo API docTo spec'Class;

95.           Dialog : access Gtk_File_Chooser_Dialog_RecordTo API docTo spec'Class);

96.        --  Creates a button widget which uses Dialog as it's file-picking window.

97.        --  Note that dialog must not have Destroy_With_Parent set.

99.        procedure Set_TitleTo API docTo body

100.          (Button : access Gtk_File_Chooser_Button_RecordTo API docTo spec; Title  : String);

101.        function Get_TitleTo API docTo body

102.          (Button : access Gtk_File_Chooser_Button_RecordTo API docTo spec) return String;

103.        --  Modifies the Title of the browse dialog used by Button.

105.        procedure Set_Width_CharsTo API docTo body

106.          (Button  : access Gtk_File_Chooser_Button_RecordTo API docTo spec;

107.           N_Chars : GintTo API docTo spec);

108.        function Get_Width_CharsTo API docTo body

109.          (Button : access Gtk_File_Chooser_Button_RecordTo API docTo spec) return GintTo API docTo spec;

110.        --  Sets the width (in characters) that Button will use.

112.        function Get_Focus_On_ClickTo API docTo body

113.          (Button : access Gtk_File_Chooser_Button_RecordTo API docTo spec)

114.           return Boolean;

115.        procedure Set_Focus_On_ClickTo API docTo body

116.          (Button         : access Gtk_File_Chooser_Button_RecordTo API docTo spec;

117.           Focus_On_Click : Boolean);

118.        --  Controls whether the button will grab focus when it is clicked with

119.        --  the mouse.  Making mouse clicks not grab focus is useful in places

120.        --  like toolbars where you don't want the keyboard focus removed from

121.        --  the main area of the application.

123.        ----------------

124.        -- Interfaces --

125.        ----------------

126.        --  This class implements several interfaces. See Glib.Types

127.        --

128.        --  - "Gtk_File_Chooser"

130.        package Implements_File_Chooser is new Glib.Types.ImplementsTo API docTo specTo body

131.          (Gtk.File_Chooser.Gtk_File_ChooserTo API docTo spec,

132.           Gtk_File_Chooser_Button_RecordTo API docTo spec, Gtk_File_Chooser_ButtonTo API docTo spec);

133.        function "+"

134.          (Button : access Gtk_File_Chooser_Button_RecordTo API docTo spec'Class)

135.           return Gtk.File_Chooser.Gtk_File_ChooserTo API docTo spec

136.           renames Implements_File_Chooser.To_InterfaceTo API docTo specTo body;

137.        function "-"

138.          (File : Gtk.File_Chooser.Gtk_File_ChooserTo API docTo spec)

139.           return Gtk_File_Chooser_ButtonTo API docTo spec

140.           renames Implements_File_Chooser.To_ObjectTo API docTo specTo body;

141.        --  Converts to and from the Gtk_File_Chooser interface

143.        ----------------

144.        -- Properties --

145.        ----------------

146.        --  <properties>

147.        --  Name:  Dialog_Property

148.        --  Type:  Object

149.        --  Descr: The file chooser dialog to use.

150.        --

151.        --  Name:  Focus_On_Click_Property

152.        --  Type:  Boolean

153.        --  Descr: Whether the button grabs focus when it is clicked with the mouse

154.        --

155.        --  Name:  Title_Property

156.        --  Type:  String

157.        --  Descr: The title of the file chooser dialog.

158.        --

159.        --  Name:  Width_Chars_Property

160.        --  Type:  Int

161.        --  Descr: The desired width of the button widget, in characters.

162.        --

163.        --  </properties>

165.        Dialog_Property         : constant Glib.Properties.Property_ObjectTo API docTo spec;

166.        Focus_On_Click_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

167.        Title_Property          : constant Glib.Properties.Property_StringTo API docTo spec;

168.        Width_Chars_Property    : constant Glib.Properties.Property_IntTo API docTo spec;

170.     private

171.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_file_chooser_button_get_type");

173.        Dialog_PropertyTo API docTo spec : constant Glib.Properties.Property_ObjectTo API docTo spec :=

174.          Glib.Properties.BuildTo API docTo specTo body ("dialog");

175.        Focus_On_Click_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

176.          Glib.Properties.BuildTo API docTo specTo body ("focus-on-click");

177.        Title_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

178.          Glib.Properties.BuildTo API docTo specTo body ("title");

179.        Width_Chars_PropertyTo API docTo spec : constant Glib.Properties.Property_IntTo API docTo spec :=

180.          Glib.Properties.BuildTo API docTo specTo body ("width-chars");

182.     end Gtk.File_Chooser_ButtonTo API docTo specTo body;