package Messages_List is new Glib.GSlist.Generic_SList (Status_Bar_Msg);
type Gtk_Status_Bar_Record is new Gtk.Box.Gtk_Box_Record with private;
type Gtk_Status_Bar is access all Gtk_Status_Bar_Record'Class;
subtype Gtk_Statusbar is Gtk_Status_Bar;
type Context_Id is new Guint;
type Message_Id is new Guint;
type Status_Bar_Msg is record Text : Interfaces.C.Strings.chars_ptr; Context : Context_Id; Message : Message_Id; end record;
Has_Resize_Grip_Property : constant Glib.Properties.Property_Boolean;
Shadow_Type_Property : constant Gtk.Enums.Property_Gtk_Shadow_Type;
Signal_Text_Popped : constant Glib.Signal_Name := "text_popped";
Signal_Text_Pushed : constant Glib.Signal_Name := "text_pushed";
function Convert
( | Msg | : System.Address) return Status_Bar_Msg; |
procedure Gtk_New
( | Statusbar | : out Gtk_Status_Bar); |
procedure Initialize
( | Statusbar | : access Gtk_Status_Bar_Record'Class); |
function Get_Type return Gtk.Gtk_Type;
function Get_Context_Id
( | Statusbar | : access Gtk_Status_Bar_Record; |
Context_Description | : String) return Context_Id; |
function Get_Messages
( | Statusbar | : access Gtk_Status_Bar_Record) return Messages_List.GSlist; |
function Push
( | Statusbar | : access Gtk_Status_Bar_Record; |
Context | : Context_Id; | |
Text | : UTF8_String) return Message_Id; |
procedure Pop
( | Statusbar | : access Gtk_Status_Bar_Record; |
Context | : Context_Id); |
procedure Remove
( | Statusbar | : access Gtk_Status_Bar_Record; |
Context | : Context_Id; | |
Message | : Message_Id); |
procedure Set_Has_Resize_Grip
( | Statusbar | : access Gtk_Status_Bar_Record; |
Setting | : Boolean); |
function Get_Has_Resize_Grip
( | Statusbar | : access Gtk_Status_Bar_Record) return Boolean; |
A status bar is a special widget in which you can display messages.
This type of widget is generally found at the bottom of application windows, and is used to display help or error messages.
This widget works as a stack of messages, ie all older messages are kept when a new one is inserted. It is of course possible to remove the most recent message from the stack.
This stack behavior is especially useful when messages can be displayed from several places in your application. Thus, each one subprogram that needs to print a message can simply push it on the stack, and does not need to make sure that the user has had enough time to read the previous message (a timeout can be set to automatically remove the message after a specific delay) Each message is associated with a specific Context_Id. Each of this context can have a special name, and these context can be used to organize the messages into categories (for instance one for help messages and one for error messages). You can then selectively remove the most recent message of each category.
Binding from C File version 2.8.17
<testgtk>create_status.adb</testgtk>