Description
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.
Types
-
type Context_Id is new Guint;
-
type Gtk_Status_Bar is access all Gtk_Status_Bar_Record'Class;
-
-
type Gtk_Statusbar is Gtk_Status_Bar;
-
type Message_Id is new Guint;
-
type Status_Bar_Msg is record
Text : Interfaces.C.Strings.chars_ptr;
Subprograms
-
function Convert (Msg : Status_Bar_Msg) return System.Address;
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_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;