## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --                Copyright (C) 2006-2007 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_Font_Button is a button which displays the currently selected font

31.     --  an allows to open a font selection dialog to change the font. It is

32.     --  suitable widget for selecting a font in a preference dialog.

33.     --  </description>

34.     --  <c_version>2.8.17</c_version>

35.     --  <group>Selectors</group>

36.     --  <screenshot>font-button.png</screenshot>

38.     with Glib.PropertiesTo API docTo specTo body;

39.     with Gtk.ButtonTo API docTo specTo body;

41.     package Gtk.Font_ButtonTo API docTo specTo body is

43.        type Gtk_Font_Button_Record is new Gtk.Button.Gtk_Button_RecordTo API docTo spec with

44.          null record;

45.        type Gtk_Font_Button is access all Gtk_Font_Button_RecordTo API docTo spec'Class;

47.        procedure Gtk_NewTo API docTo body (Font_Button : out Gtk_Font_ButtonTo API docTo spec);

48.        procedure InitializeTo API docTo body (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec'Class);

49.        --  Creates a new font picker widget.

51.        procedure Gtk_New_With_FontTo API docTo body

52.          (Font_Button : out Gtk_Font_ButtonTo API docTo spec; Fontname : String);

53.        procedure Initialize_With_FontTo API docTo body

54.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec'Class; Fontname : String);

55.        --  Creates a new font picker widget.

57.        function Get_TypeTo API docTo body return Gtk.Gtk_TypeTo API docTo spec;

58.        --  Return the internal value associated with a Gtk_Font_Button

60.        function Set_Font_NameTo API docTo body

61.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec;

62.           Fontname    : String) return Boolean;

63.        function Get_Font_NameTo API docTo body

64.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec) return String;

65.        --  Sets or updates the currently-displayed font in font picker dialog.

66.        --  Returns the value of Gtk.Font_Selection.Set_Font_Name if the font

67.        --  selection dialog exists, False otherwise.

69.        procedure Set_Show_SizeTo API docTo body

70.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec; Show_Size : Boolean);

71.        function Get_Show_SizeTo API docTo body

72.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec) return Boolean;

73.        --  If Show_Size is True, the font size will be displayed along with the

74.        --  name of the selected font.

76.        procedure Set_Show_StyleTo API docTo body

77.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec; Show_Style : Boolean);

78.        function Get_Show_StyleTo API docTo body

79.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec) return Boolean;

80.        --  Returns whether the name of the font style will be shown in the label.

82.        procedure Set_TitleTo API docTo body

83.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec; Title : String);

84.        function Get_TitleTo API docTo body

85.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec) return String;

86.        --  Retrieves the title of the font selection dialog.

88.        procedure Set_Use_FontTo API docTo body

89.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec; Use_Font : Boolean);

90.        function Get_Use_FontTo API docTo body

91.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec) return Boolean;

92.        --  If Use_Font is True, the font name will be written using the selected

93.        --  font.

95.        procedure Set_Use_SizeTo API docTo body

96.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec; Use_Size : Boolean);

97.        function Get_Use_SizeTo API docTo body

98.          (Font_Button : access Gtk_Font_Button_RecordTo API docTo spec) return Boolean;

99.        --  If Use_Size is True, the font name will be written using the selected

100.        --  size.

102.        ----------------

103.        -- Properties --

104.        ----------------

106.        --  <properties>

107.        --  The following properties are defined for this widget. See

108.        --  Glib.Properties for more information on properties.

109.        --

110.        --  Name:  Font_Name_Property

111.        --  Type:  String

112.        --  Descr: The name of the selected font

113.        --

114.        --  Name:  Show_Size_Property

115.        --  Type:  Boolean

116.        --  Descr: Whether selected font size is shown in the label

117.        --

118.        --  Name:  Show_Style_Property

119.        --  Type:  Boolean

120.        --  Descr: Whether the selected font style is shown in the label

121.        --

122.        --  Name:  Title_Property

123.        --  Type:  String

124.        --  Descr: The title of the font selection dialog

125.        --

126.        --  Name:  Use_Font_Property

127.        --  Type:  Boolean

128.        --  Descr: Whether the label is drawn in the selected font

129.        --

130.        --  Name:  Use_Size_Property

131.        --  Type:  Boolean

132.        --  Descr: Whether the label is drawn with the selected font size

133.        --

134.        --  </properties>

136.        Font_Name_Property  : constant Glib.Properties.Property_StringTo API docTo spec;

137.        Show_Size_Property  : constant Glib.Properties.Property_BooleanTo API docTo spec;

138.        Show_Style_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

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

140.        Use_Font_Property   : constant Glib.Properties.Property_BooleanTo API docTo spec;

141.        Use_Size_Property   : constant Glib.Properties.Property_BooleanTo API docTo spec;

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

144.        -- Signals --

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

147.        --  <signals>

148.        --  The following new signals are defined for this widget:

149.        --

150.        --  - "font-set"

151.        --    procedure Handler (Button : access Gtk_Font_Button_Record'Class);

152.        --    The font-set signal is emitted when the user selects a font. When

153.        --    handling this signal, use Get_Font_Name to find out which font was

154.        --    just selected.

155.        --    Note that this signal is only emitted when the user changes the font.

156.        --    If you need to react to programmatic font changes as well, use the

157.        --    notify::font-name signal.

158.        --  </signals>

160.        Signal_Font_Set : constant Glib.Signal_NameTo API docTo spec := "font-set";

162.     private

163.        Font_Name_PropertyTo API docTo spec : constant Glib.Properties.Property_StringTo API docTo spec :=

164.          Glib.Properties.BuildTo API docTo specTo body ("font-name");

165.        Show_Size_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

166.          Glib.Properties.BuildTo API docTo specTo body ("show-size");

167.        Show_Style_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

168.          Glib.Properties.BuildTo API docTo specTo body ("show-style");

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

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

171.        Use_Font_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

172.          Glib.Properties.BuildTo API docTo specTo body ("use-font");

173.        Use_Size_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

174.          Glib.Properties.BuildTo API docTo specTo body ("use-size");

176.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_font_button_get_type");

177.     end Gtk.Font_ButtonTo API docTo specTo body;