Gtk.Status_Bar

Entities

Simple Types

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

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.

# CSS node

GtkStatusbar has a single CSS node with name statusbar.

<screenshot>gtk-status_bar</screenshot> <group>Display widgets</group> <testgtk>create_status.adb</testgtk>

"+"

function "+"
  (Widget : access Gtk_Status_Bar_Record'Class)
return Gtk.Buildable.Gtk_Buildable
Parameters
Widget
Return Value

"+"

function "+"
  (Widget : access Gtk_Status_Bar_Record'Class)
return Gtk.Orientable.Gtk_Orientable
Parameters
Widget
Return Value

"-"

function "-"
  (Interf : Gtk.Buildable.Gtk_Buildable)
return Gtk_Status_Bar
Parameters
Interf
Return Value

"-"

function "-"
  (Interf : Gtk.Orientable.Gtk_Orientable)
return Gtk_Status_Bar
Parameters
Interf
Return Value

Cb_GObject_Context_Id_UTF8_String_Void

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);
Parameters
Self
Context
Text

Cb_Gtk_Status_Bar_Context_Id_UTF8_String_Void

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);
Parameters
Self
Context
Text

Context_Id

type Context_Id is new Guint;

Get_Context_Id

function Get_Context_Id
   (Statusbar           : not null access Gtk_Status_Bar_Record;
    Context_Description : UTF8_String) return Context_Id

Returns a new context identifier, given a description of the actual context. Note that the description is not shown in the UI.

Parameters
Statusbar
Context_Description

textual description of what context the new message is being used in

Return Value

Get_Message_Area

function Get_Message_Area
   (Statusbar : not null access Gtk_Status_Bar_Record)
    return Gtk.Widget.Gtk_Widget

Retrieves the box containing the label widget. Since: gtk+ 2.20

Parameters
Statusbar
Return Value

a Gtk.Box.Gtk_Box

Get_Orientation

function Get_Orientation
   (Self : not null access Gtk_Status_Bar_Record)
    return Gtk.Enums.Gtk_Orientation
Parameters
Self
Return Value

Get_Type

function Get_Type return Glib.GType
Return Value

Gtk_New

procedure Gtk_New (Statusbar : out Gtk_Status_Bar)

Creates a new Gtk.Status_Bar.Gtk_Status_Bar ready for messages. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Statusbar

Gtk_Status_Bar

type Gtk_Status_Bar is access all Gtk_Status_Bar_Record'Class;

Gtk_Status_Bar_New

function Gtk_Status_Bar_New return Gtk_Status_Bar

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

Return Value

Gtk_Status_Bar_Record

type Gtk_Status_Bar_Record is new Gtk_Box_Record with null record;

Implements_Gtk_Buildable

package Implements_Gtk_Buildable is new Glib.Types.Implements
  (Gtk.Buildable.Gtk_Buildable, Gtk_Status_Bar_Record, Gtk_Status_Bar);

Implements_Gtk_Orientable

package Implements_Gtk_Orientable is new Glib.Types.Implements
  (Gtk.Orientable.Gtk_Orientable, Gtk_Status_Bar_Record, Gtk_Status_Bar);

Initialize

procedure Initialize
   (Statusbar : not null access Gtk_Status_Bar_Record'Class)

Creates a new Gtk.Status_Bar.Gtk_Status_Bar ready for messages. Initialize does nothing if the object was already created with another call to Initialize* or G_New.

Parameters
Statusbar

Message_Id

type Message_Id is new Guint;

On_Text_Popped

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)

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

Callback parameters: -- @param Context the context id of the relevant message/statusbar -- @param Text the message that was just popped

Parameters
Self
Call
Slot
After

On_Text_Popped

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)

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

Callback parameters: -- @param Context the context id of the relevant message/statusbar -- @param Text the message that was just popped

Parameters
Self
Call
After

On_Text_Pushed

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)

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

Callback parameters: -- @param Context the context id of the relevant message/statusbar -- @param Text the message that was pushed

Parameters
Self
Call
Slot
After

On_Text_Pushed

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)

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

Callback parameters: -- @param Context the context id of the relevant message/statusbar -- @param Text the message that was pushed

Parameters
Self
Call
After

Pop

procedure Pop
   (Statusbar : not null access Gtk_Status_Bar_Record;
    Context   : Context_Id)

Removes the first message in the Gtk.Status_Bar.Gtk_Status_Bar's stack with the given context id. Note that this may not change the displayed message, if the message at the top of the stack has a different context id.

Parameters
Statusbar
Context

a context identifier

Push

function Push
   (Statusbar : not null access Gtk_Status_Bar_Record;
    Context   : Context_Id;
    Text      : UTF8_String) return Message_Id

Pushes a new message onto a statusbar's stack.

Parameters
Statusbar
Context

the message's context id, as returned by Gtk.Status_Bar.Get_Context_Id

Text

the message to add to the statusbar

Return Value

Remove

procedure Remove
   (Statusbar : not null access Gtk_Status_Bar_Record;
    Context   : Context_Id;
    Message   : Message_Id)

Forces the removal of a message from a statusbar's stack. The exact Context_Id and Message_Id must be specified.

Parameters
Statusbar
Context

a context identifier

Message

a message identifier, as returned by Gtk.Status_Bar.Push

Remove_All

procedure Remove_All
   (Statusbar : not null access Gtk_Status_Bar_Record;
    Context   : Context_Id)

Forces the removal of all messages from a statusbar's stack with the exact Context_Id. Since: gtk+ 2.22

Parameters
Statusbar
Context

a context identifier

Set_Orientation

procedure Set_Orientation
   (Self        : not null access Gtk_Status_Bar_Record;
    Orientation : Gtk.Enums.Gtk_Orientation)
Parameters
Self
Orientation

Signal_Text_Popped

Signal_Text_Popped : constant Glib.Signal_Name := "text-popped";

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

Callback parameters: -- @param Context the context id of the relevant message/statusbar -- @param Text the message that was just popped

Signal_Text_Pushed

Signal_Text_Pushed : constant Glib.Signal_Name := "text-pushed";

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

Callback parameters: -- @param Context the context id of the relevant message/statusbar -- @param Text the message that was pushed