## 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-2011, 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.     --  A status bar is a special widget in which you can display messages. This

32.     --  type of widget is generally found at the bottom of application windows, and

33.     --  is used to display help or error messages.

34.     --

35.     --  This widget works as a stack of messages, ie all older messages are kept

36.     --  when a new one is inserted. It is of course possible to remove the most

37.     --  recent message from the stack. This stack behavior is especially useful

38.     --  when messages can be displayed from several places in your application.

39.     --  Thus, each one subprogram that needs to print a message can simply push it

40.     --  on the stack, and does not need to make sure that the user has had enough

41.     --  time to read the previous message (a timeout can be set to automatically

42.     --  remove the message after a specific delay)

43.     --

44.     --  Each message is associated with a specific Context_Id. Each of this

45.     --  context can have a special name, and these context can be used to organize

46.     --  the messages into categories (for instance one for help messages and one

47.     --  for error messages). You can then selectively remove the most recent

48.     --  message of each category.

49.     --

50.     --  </description>

51.     --  <screenshot>gtk-status_bar</screenshot>

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

53.     --  <testgtk>create_status.adb</testgtk>

55.     pragma Warnings (Off, "*is already use-visible*");

56.     with GlibTo API docTo specTo body;                 use GlibTo API docTo specTo body;

57.     with Glib.GSlistTo API docTo specTo body;          use Glib.GSlistTo API docTo specTo body;

58.     with Glib.PropertiesTo API docTo specTo body;      use Glib.PropertiesTo API docTo specTo body;

59.     with Glib.TypesTo API docTo specTo body;           use Glib.TypesTo API docTo specTo body;

60.     with Gtk.BoxTo API docTo specTo body;              use Gtk.BoxTo API docTo specTo body;

61.     with Gtk.BuildableTo API docTo specTo body;        use Gtk.BuildableTo API docTo specTo body;

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

63.     with Gtk.OrientableTo API docTo specTo body;       use Gtk.OrientableTo API docTo specTo body;

64.     with Gtk.WidgetTo API docTo specTo body;           use Gtk.WidgetTo API docTo specTo body;

65.     with Interfaces.C.Strings; use Interfaces.C.Strings;

67.     package Gtk.Status_BarTo API docTo specTo body is

69.        type Gtk_Status_Bar_Record is new Gtk_Hbox_RecordTo API docTo spec with null record;

70.        type Gtk_Status_Bar is access all Gtk_Status_Bar_RecordTo API docTo spec'Class;

72.        type Context_Id is new GuintTo API docTo spec;

73.        type Message_Id is new GuintTo API docTo spec;

75.        type Status_Bar_Msg is record

76.           Text    : Interfaces.C.Strings.chars_ptr;

77.           Context : Context_IdTo API docTo spec;

78.           Message : Message_IdTo API docTo spec;

79.        end record;

80.        --  A message from the queue. Each of this message is associated with a

81.        --  specific context, and has a specific number.

83.        --  <no_doc>

84.        function ConvertTo API docTo body (MsgTo API docTo body : Status_Bar_MsgTo API docTo spec) return System.Address;

85.        function ConvertTo API docTo body (Msg : System.Address) return Status_Bar_MsgTo API docTo spec;

86.        package Messages_List is new Glib.GSlist.Generic_SListTo API docTo specTo body (Status_Bar_MsgTo API docTo spec);

87.        --  </no_doc>

89.        ------------------

90.        -- Constructors --

91.        ------------------

93.        procedure Gtk_NewTo API docTo body (Statusbar : out Gtk_Status_BarTo API docTo spec);

94.        procedure InitializeTo API docTo body (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec'Class);

95.        --  Creates a new Gtk.Status_Bar.Gtk_Status_Bar ready for messages.

97.        function Get_TypeTo API docTo body return Glib.GTypeTo API docTo spec;

98.        pragma Import (C, Get_TypeTo API docTo spec, "gtk_statusbar_get_type");

100.        -------------

101.        -- Methods --

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

104.        function Get_Context_IdTo API docTo body

105.           (Statusbar           : access Gtk_Status_Bar_RecordTo API docTo spec;

106.            Context_Description : UTF8_StringTo API docTo spec) return Context_IdTo API docTo spec;

107.        --  Returns a new context identifier, given a description of the actual

108.        --  context. Note that the description is <emphasis>not</emphasis> shown in

109.        --  the UI.

110.        --  "context_description": textual description of what context the new

111.        --  message is being used in

113.        function Get_Has_Resize_GripTo API docTo body

114.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec) return Boolean;

115.        procedure Set_Has_Resize_GripTo API docTo body

116.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec;

117.            Setting   : Boolean);

118.        --  Sets whether the statusbar has a resize grip. True by default.

119.        --  "setting": True to have a resize grip

121.        function Get_Message_AreaTo API docTo body

122.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec)

123.            return Gtk.Widget.Gtk_WidgetTo API docTo spec;

124.        --  Retrieves the box containing the label widget.

125.        --  Since: gtk+ 2.20

127.        procedure PopTo API docTo body

128.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec;

129.            Context   : Context_IdTo API docTo spec);

130.        --  Removes the first message in the GtkStatusBar's stack with the given

131.        --  context id. Note that this may not change the displayed message, if the

132.        --  message at the top of the stack has a different context id.

133.        --  "context": a context identifier

135.        function PushTo API docTo body

136.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec;

137.            Context   : Context_IdTo API docTo spec;

138.            Text      : UTF8_StringTo API docTo spec) return Message_IdTo API docTo spec;

139.        --  Pushes a new message onto a statusbar's stack. Gtk.Status_Bar.Remove.

140.        --  "context": the message's context id, as returned by

141.        --  Gtk.Status_Bar.Get_Context_Id

142.        --  "text": the message to add to the statusbar

144.        procedure RemoveTo API docTo body

145.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec;

146.            Context   : Context_IdTo API docTo spec;

147.            Message   : Message_IdTo API docTo spec);

148.        --  Forces the removal of a message from a statusbar's stack. The exact

149.        --  Context_Id and Message_Id must be specified.

150.        --  "context": a context identifier

151.        --  "Message": a message identifier, as returned by Gtk.Status_Bar.Push

153.        procedure Remove_AllTo API docTo body

154.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec;

155.            Context   : Context_IdTo API docTo spec);

156.        --  Forces the removal of all messages from a statusbar's stack with the

157.        --  exact Context_Id.

158.        --  Since: gtk+ 2.22

159.        --  "context": a context identifier

161.        ------------

162.        -- Fields --

163.        ------------

165.        function Get_MessagesTo API docTo body

166.           (Statusbar : access Gtk_Status_Bar_RecordTo API docTo spec)

167.            return Gtk.Status_Bar.Messages_List.GSlistTo API docTo specTo body;

169.        ---------------------

170.        -- Interfaces_Impl --

171.        ---------------------

173.        function Get_OrientationTo API docTo body

174.           (Self : access Gtk_Status_Bar_RecordTo API docTo spec) return Gtk.Enums.Gtk_OrientationTo API docTo spec;

175.        procedure Set_OrientationTo API docTo body

176.           (Self        : access Gtk_Status_Bar_RecordTo API docTo spec;

177.            OrientationTo API docTo body : Gtk.Enums.Gtk_OrientationTo API docTo spec);

179.        ----------------

180.        -- Interfaces --

181.        ----------------

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

183.        --

184.        --  - "Buildable"

185.        --

186.        --  - "Orientable"

188.        package Implements_Buildable is new Glib.Types.ImplementsTo API docTo specTo body

189.          (Gtk.Buildable.Gtk_BuildableTo API docTo spec, Gtk_Status_Bar_RecordTo API docTo spec, Gtk_Status_BarTo API docTo spec);

190.        function "+"

191.          (Widget : access Gtk_Status_Bar_RecordTo API docTo spec'Class)

192.        return Gtk.Buildable.Gtk_BuildableTo API docTo spec

193.        renames Implements_Buildable.To_InterfaceTo API docTo specTo body;

194.        function "-"

195.          (Interf : Gtk.Buildable.Gtk_BuildableTo API docTo spec)

196.        return Gtk_Status_BarTo API docTo spec

197.        renames Implements_Buildable.To_ObjectTo API docTo specTo body;

199.        package Implements_Orientable is new Glib.Types.ImplementsTo API docTo specTo body

200.          (Gtk.Orientable.Gtk_OrientableTo API docTo spec, Gtk_Status_Bar_RecordTo API docTo spec, Gtk_Status_BarTo API docTo spec);

201.        function "+"

202.          (Widget : access Gtk_Status_Bar_RecordTo API docTo spec'Class)

203.        return Gtk.Orientable.Gtk_OrientableTo API docTo spec

204.        renames Implements_Orientable.To_InterfaceTo API docTo specTo body;

205.        function "-"

206.          (Interf : Gtk.Orientable.Gtk_OrientableTo API docTo spec)

207.        return Gtk_Status_BarTo API docTo spec

208.        renames Implements_Orientable.To_ObjectTo API docTo specTo body;

210.        ----------------

211.        -- Properties --

212.        ----------------

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

214.        --  Glib.Properties for more information on properties)

215.        --

216.        --  Name: Has_Resize_Grip_Property

217.        --  Type: Boolean

218.        --  Flags: read-write

219.        --  Whether the statusbar has a grip for resizing the toplevel window.

221.        Has_Resize_Grip_Property : constant Glib.Properties.Property_BooleanTo API docTo spec;

223.        -------------

224.        -- Signals --

225.        -------------

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

227.        --

228.        --  "text-popped"

229.        --     procedure Handler

230.        --       (Self    : access Gtk_Status_Bar_Record'Class;

231.        --        Context : Context_Id;

232.        --        Text    : UTF8_String);

233.        --    --  "context": the context id of the relevant message/statusbar.

234.        --    --  "text": the message that was just popped.

235.        --  Is emitted whenever a new message is popped off a statusbar's stack.

236.        --

237.        --  "text-pushed"

238.        --     procedure Handler

239.        --       (Self    : access Gtk_Status_Bar_Record'Class;

240.        --        Context : Context_Id;

241.        --        Text    : UTF8_String);

242.        --    --  "context": the context id of the relevant message/statusbar.

243.        --    --  "text": the message that was pushed.

244.        --  Is emitted whenever a new message gets pushed onto a statusbar's stack.

246.        Signal_Text_Popped : constant Glib.Signal_NameTo API docTo spec := "text-popped";

247.        Signal_Text_Pushed : constant Glib.Signal_NameTo API docTo spec := "text-pushed";

249.     private

250.        Has_Resize_Grip_PropertyTo API docTo spec : constant Glib.Properties.Property_BooleanTo API docTo spec :=

251.          Glib.Properties.BuildTo API docTo specTo body ("has-resize-grip");

252.     end Gtk.Status_BarTo API docTo specTo body;