## Documentation

Table of Contents
Class Inheritance Tree
Widget Screenshots
Package groups

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

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

3.     --                                                                   --

4.     --   Copyright (C) 1998-2000 E. Briot, J. Brobecker and A. Charlet   --

5.     --                Copyright (C) 2000-2006 AdaCore                    --

6.     --                                                                   --

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

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

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

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

11.     --                                                                   --

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

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

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

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

16.     --                                                                   --

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

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

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

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

21.     --                                                                   --

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

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

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

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

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

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

28.     -----------------------------------------------------------------------

30.     --  <description>

31.     --  The progress bar provides a convenient way of displaying a state of

32.     --  completion for typically lengthy tasks.

33.     --  </description>

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

35.     --  <group>Display widgets</group>

36.     --  <testgtk>create_progress.adb</testgtk>

37.     --  <screenshot>gtk-progress_bar</screenshot>

39.     with Glib.PropertiesTo API docTo specTo body;

40.     with Gtk.EnumsTo API docTo specTo body;    use Gtk.EnumsTo API docTo specTo body;

41.     with Pango.LayoutTo API docTo specTo body;

43.     pragma Warnings (Off);  --  Gtk.Progress is obsolete

44.     with Gtk.ProgressTo API docTo specTo body;

45.     pragma Warnings (On);

47.     package Gtk.Progress_BarTo API docTo specTo body is

49.        type Gtk_Progress_Bar_Orientation is

50.          (Progress_Left_To_Right,

51.           Progress_Right_To_Left,

52.           Progress_Bottom_To_Top,

53.           Progress_Top_To_Bottom);

54.        pragma Convention (C, Gtk_Progress_Bar_OrientationTo API docTo spec);

56.        pragma Warnings (Off);  --  Gtk.Progress is obsolete

57.        type Gtk_Progress_Bar_RecordTo API docTo body is new

58.          Gtk.Progress.Gtk_Progress_RecordTo API docTo spec with private;

59.        pragma Warnings (On);

61.        type Gtk_Progress_Bar is access all Gtk_Progress_Bar_RecordTo API docTo specTo body'Class;

63.        procedure Gtk_NewTo API docTo body (Progress_Bar : out Gtk_Progress_BarTo API docTo spec);

64.        procedure InitializeTo API docTo body (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body'Class);

65.        --  Creates or initializes a new progress bar.

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

68.        --  Return the internal value associated with a Gtk_Progress_Bar.

70.        procedure PulseTo API docTo body (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body);

71.        --  Indicate that some progress is made, but you don't know how much.

72.        --  Causes the progress bar to enter "activity mode," where a block

73.        --  bounces back and forth. Each call to Pulse causes the block to move by

74.        --  a little bit (the amount of movement per pulse is determined by

75.        --  Set_Pulse_Step).

77.        procedure Set_TextTo API docTo body

78.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body; Text : UTF8_StringTo API docTo spec);

79.        function Get_TextTo API docTo body

80.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body) return UTF8_StringTo API docTo spec;

81.        --  Causes the given Text to appear superimposed on the progress bar.

82.        --  Text: a UTF-8 string.

84.        procedure Set_FractionTo API docTo body

85.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body;

86.           Fraction     : GdoubleTo API docTo spec);

87.        function Get_FractionTo API docTo body

88.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body) return GdoubleTo API docTo spec;

89.        --  Cause the progress bar to "fill in" the given fraction of the bar.

90.        --  The fraction should be between 0.0 and 1.0, inclusive.

92.        procedure Set_Pulse_StepTo API docTo body

93.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body;

94.           Step         : GdoubleTo API docTo spec);

95.        function Get_Pulse_StepTo API docTo body

96.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body) return GdoubleTo API docTo spec;

97.        --  Set the fraction of total progress bar length to move the

98.        --  bouncing block for each call to Pulse.

100.        procedure Set_OrientationTo API docTo body

101.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body;

102.           OrientationTo API docTo body  : Gtk_Progress_Bar_OrientationTo API docTo spec);

103.        function Get_OrientationTo API docTo body

104.          (Progress_Bar : access Gtk_Progress_Bar_RecordTo API docTo specTo body)

105.           return Gtk_Progress_Bar_OrientationTo API docTo spec;

106.        --  Cause the progress bar to switch to a different orientation

107.        --  (left-to-right, right-to-left, top-to-bottom, or bottom-to-top).

109.        procedure Set_EllipsizeTo API docTo body

110.          (Pbar : access Gtk_Progress_Bar_RecordTo API docTo specTo body;

111.           ModeTo API docTo body : Pango.Layout.Pango_Ellipsize_ModeTo API docTo spec);

112.        function Get_EllipsizeTo API docTo body

113.          (Pbar : access Gtk_Progress_Bar_RecordTo API docTo specTo body)

114.           return Pango.Layout.Pango_Ellipsize_ModeTo API docTo spec;

115.        --  Sets the mode used to ellipsize (add an ellipsis: "...") the text

116.        --  if there is not enough space to render the entire string.

118.        -----------------

119.        -- Obsolescent --

120.        -----------------

121.        --  All subprograms below are now obsolescent in gtk+. They might be removed

122.        --  from future versions of gtk+ (and therefore GtkAda).

123.        --  To find out whether your code uses any of these, we recommend compiling

124.        --  with the -gnatwj switch

125.        --  <doc_ignore>

127.        --  </doc_ignore>

129.        ----------------

130.        -- Properties --

131.        ----------------

133.        --  <properties>

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

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

136.        --

137.        --  Name:  Orientation_Property

138.        --  Type:  Gtk_Orientation

139.        --  Flags: read-write

140.        --  Descr: Orientation and growth of the progress bar

141.        --  See also: Set_Orientation and Get_Orientation

142.        --

143.        --  Name:  Discrete_Blocks_Property

144.        --  Type:  Guint

145.        --  Flags: read-write

146.        --  Descr: The number of discrete blocks in a progress bar (when shown

147.        --         in the discrete Style)

148.        --

149.        --  Name:  Fraction_Property

150.        --  Type:  Gdouble

151.        --  Flags: read-write

152.        --  Descr: The fraction of total work that has been completed

153.        --  See also: Set_Fraction and Get_Fraction

154.        --

155.        --  Name:  Pulse_Step_Property

156.        --  Type:  Gdouble

157.        --  Flags: read-write

158.        --  Descr: The fraction of total progress to move the bouncing block when

159.        --         pulsed

160.        --  See also: Set_Pulse_Step and Get_Pulse_Step

161.        --

162.        --  Name:  Text_Property

163.        --  Type:  UTF8_String

164.        --  Flags: read-write

165.        --  Descr: Text to be displayed in the progress bar

166.        --  See also: Set_Text and Get_Text

167.        --

168.        --  Name:  Activity_Blocks_Property

169.        --  Type:  Uint

170.        --  Descr: The number of blocks which can fit in the progress bar area in

171.        --         activity mode (Deprecated)

172.        --

173.        --  Name:  Activity_Step_Property

174.        --  Type:  Uint

175.        --  Descr: The increment used for each iteration in activity mode

176.        --        (Deprecated)

177.        --

178.        --  Name:  Adjustment_Property

179.        --  Type:  Object

180.        --  Descr: The GtkAdjustment connected to the progress bar (Deprecated)

181.        --

182.        --  Name:  Bar_Style_Property

183.        --  Type:  Enum

184.        --  Descr: Specifies the visual style of the bar in percentage mode

185.        --         (Deprecated)

186.        --

187.        --  Name:  Ellipsize_Property

188.        --  Type:  Enum

189.        --  Descr: The preferred place to ellipsize the string, if the progressbar

190.        --         does not have enough room to display the entire string, if at all

191.        --

192.        --  </properties>

194.        Orientation_Property     : constant Gtk.Enums.Property_Gtk_OrientationTo API docTo spec;

195.        Discrete_Blocks_Property : constant Glib.Properties.Property_UintTo API docTo spec;

196.        Fraction_Property        : constant Glib.Properties.Property_DoubleTo API docTo spec;

197.        Pulse_Step_Property      : constant Glib.Properties.Property_DoubleTo API docTo spec;

198.        Text_Property            : constant Glib.Properties.Property_StringTo API docTo spec;

200.        --  This requires a new type in Pango.Layout.Ellipsize_Mode

201.        --  Ellipsize_Property       : constant Glib.Properties.Property_Enum;

203.        --  These are deprecated, and never had a binding, no need to add them

204.        --  Activity_Blocks_Property : constant Glib.Properties.Property_Uint;

205.        --  Activity_Step_Property   : constant Glib.Properties.Property_Uint;

206.        --  Adjustment_Property      : constant Glib.Properties.Property_Object;

207.        --  Bar_Style_Property       : constant Glib.Properties.Property_Enum;

209.     private

210.        pragma Warnings (Off);

211.        type Gtk_Progress_Bar_RecordTo API docTo spec is new Gtk.Progress.Gtk_Progress_RecordTo API docTo spec

212.          with null record;

213.        pragma Warnings (On);

214.        --  Gtk.Progress is obsolete

216.        Orientation_PropertyTo API docTo spec     : constant Gtk.Enums.Property_Gtk_OrientationTo API docTo spec :=

217.          Gtk.Enums.BuildTo API docTo specTo body ("orientation");

218.        Discrete_Blocks_PropertyTo API docTo spec : constant Glib.Properties.Property_UintTo API docTo spec :=

219.          Glib.Properties.BuildTo API docTo specTo body ("discrete_blocks");

220.        Fraction_PropertyTo API docTo spec        : constant Glib.Properties.Property_DoubleTo API docTo spec :=

221.          Glib.Properties.BuildTo API docTo specTo body ("fraction");

222.        Pulse_Step_PropertyTo API docTo spec      : constant Glib.Properties.Property_DoubleTo API docTo spec :=

223.          Glib.Properties.BuildTo API docTo specTo body ("pulse_step");

224.        Text_PropertyTo API docTo spec            : constant Glib.Properties.Property_StringTo API docTo spec :=

225.          Glib.Properties.BuildTo API docTo specTo body ("text");

227.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_progress_bar_get_type");

228.     end Gtk.Progress_BarTo API docTo specTo body;

230.     --  The following subprograms are now obsolescent, and never had a binding

231.     --  No binding: gtk_progress_bar_set_activity_blocks

232.     --  No binding: gtk_progress_bar_set_activity_step

233.     --  No binding: gtk_progress_bar_set_bar_style

234.     --  No binding: gtk_progress_bar_set_discrete_blocks

235.     --  No binding: gtk_progress_bar_update

236.     --  No binding: gtk_progress_bar_new_with_adjustment