package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Status_Bar_Record, Gtk_Status_Bar);
package Implements_Gtk_Orientable is new Glib.Types.Implements (Gtk.Orientable.Gtk_Orientable, Gtk_Status_Bar_Record, Gtk_Status_Bar);
type Gtk_Status_Bar_Record is new Gtk_Box_Record with null record;
type Gtk_Status_Bar is access all Gtk_Status_Bar_Record'Class;
type Context_Id is new Guint;
type Message_Id is new Guint;
type Cb_Gtk_Status_Bar_Context_Id_UTF8_String_Void is not null access procedure (Self : access Gtk_Status_Bar_Record'Class; Context : Context_Id; Text : UTF8_String);
type Cb_GObject_Context_Id_UTF8_String_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class; Context : Context_Id; Text : UTF8_String);
Signal_Text_Popped : constant Glib.Signal_Name := "text-popped";
Signal_Text_Pushed : constant Glib.Signal_Name := "text-pushed";
procedure Gtk_New
( | Statusbar | : out Gtk_Status_Bar); |
procedure Initialize
( | Statusbar | : not null access Gtk_Status_Bar_Record'Class); |
function Gtk_Status_Bar_New return Gtk_Status_Bar;
function Get_Type return Glib.GType;
function Get_Context_Id
( | Statusbar | : not null access Gtk_Status_Bar_Record; |
Context_Description | : UTF8_String) return Context_Id; |
function Get_Message_Area
( | Statusbar | : not null access Gtk_Status_Bar_Record) return Gtk.Widget.Gtk_Widget; |
procedure Pop
( | Statusbar | : not null access Gtk_Status_Bar_Record; |
Context | : Context_Id); |
function Push
( | Statusbar | : not null access Gtk_Status_Bar_Record; |
Context | : Context_Id; | |
Text | : UTF8_String) return Message_Id; |
procedure Remove
( | Statusbar | : not null access Gtk_Status_Bar_Record; |
Context | : Context_Id; | |
Message | : Message_Id); |
procedure Remove_All
( | Statusbar | : not null access Gtk_Status_Bar_Record; |
Context | : Context_Id); |
function Get_Orientation
( | Self | : not null access Gtk_Status_Bar_Record) return Gtk.Enums.Gtk_Orientation; |
procedure Set_Orientation
( | Self | : not null access Gtk_Status_Bar_Record; |
Orientation | : Gtk.Enums.Gtk_Orientation); |
procedure On_Text_Popped
( | Self | : not null access Gtk_Status_Bar_Record; |
Call | : Cb_Gtk_Status_Bar_Context_Id_UTF8_String_Void; | |
After | : Boolean := False); |
procedure On_Text_Popped
( | Self | : not null access Gtk_Status_Bar_Record; |
Call | : Cb_GObject_Context_Id_UTF8_String_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Text_Pushed
( | Self | : not null access Gtk_Status_Bar_Record; |
Call | : Cb_Gtk_Status_Bar_Context_Id_UTF8_String_Void; | |
After | : Boolean := False); |
procedure On_Text_Pushed
( | Self | : not null access Gtk_Status_Bar_Record; |
Call | : Cb_GObject_Context_Id_UTF8_String_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Status_Bar_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Status_Bar renames Implements_Gtk_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Status_Bar_Record'Class) return Gtk.Orientable.Gtk_Orientable renames Implements_Gtk_Orientable.To_Interface; |
function "-"
( | Interf | : Gtk.Orientable.Gtk_Orientable) return Gtk_Status_Bar renames Implements_Gtk_Orientable.To_Object; |
A Gtk.Status_Bar.Gtk_Status_Bar is usually placed along the bottom of an application's main Gtk.Window.Gtk_Window. It may provide a regular commentary of the application's status (as is usually the case in a web browser, for example), or may be used to simply output a message when the status changes, (when an upload is complete in an FTP client, for example).
Status bars in GTK+ maintain a stack of messages. The message at the top of the each bar's stack is the one that will currently be displayed.
Any messages added to a statusbar's stack must specify a *context id* that is used to uniquely identify the source of a message. This context id can be generated by Gtk.Status_Bar.Get_Context_Id, given a message and the statusbar that it will be added to. Note that messages are stored in a stack, and when choosing which message to display, the stack structure is adhered to, regardless of the context identifier of a message.
One could say that a statusbar maintains one stack of messages for display purposes, but allows multiple message producers to maintain sub-stacks of the messages they produced (via context ids).
Status bars are created using Gtk.Status_Bar.Gtk_New.
Messages are added to the bar's stack with Gtk.Status_Bar.Push.
The message at the top of the stack can be removed using Gtk.Status_Bar.Pop. A message can be removed from anywhere in the stack if its message id was recorded at the time it was added. This is done using Gtk.Status_Bar.Remove.