package Implements_Gtk_Buildable is new Glib.Types.Implements (Gtk.Buildable.Gtk_Buildable, Gtk_Info_Bar_Record, Gtk_Info_Bar);
package Implements_Gtk_Orientable is new Glib.Types.Implements (Gtk.Orientable.Gtk_Orientable, Gtk_Info_Bar_Record, Gtk_Info_Bar);
type Gtk_Info_Bar_Record is new Gtk_Box_Record with null record;
type Gtk_Info_Bar is access all Gtk_Info_Bar_Record'Class;
type Cb_Gtk_Info_Bar_Void is not null access procedure (Self : access Gtk_Info_Bar_Record'Class);
type Cb_GObject_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Info_Bar_Gint_Void is not null access procedure (Self : access Gtk_Info_Bar_Record'Class; Response_Id : Gint);
type Cb_GObject_Gint_Void is not null access procedure (Self : access Glib.Object.GObject_Record'Class; Response_Id : Gint);
Message_Type_Property : constant Gtk.Message_Dialog.Property_Gtk_Message_Type;
Signal_Close : constant Glib.Signal_Name := "close";
Signal_Response : constant Glib.Signal_Name := "response";
procedure Gtk_New
( | Self | : out Gtk_Info_Bar); |
procedure Initialize
( | Self | : not null access Gtk_Info_Bar_Record'Class); |
function Gtk_Info_Bar_New return Gtk_Info_Bar;
function Get_Type return Glib.GType;
procedure Add_Action_Widget
( | Self | : not null access Gtk_Info_Bar_Record; |
Child | : not null access Gtk.Widget.Gtk_Widget_Record'Class; | |
Response_Id | : Gint); |
function Add_Button
( | Self | : not null access Gtk_Info_Bar_Record; |
Button_Text | : UTF8_String; | |
Response_Id | : Gint) return Gtk.Widget.Gtk_Widget; |
function Get_Action_Area
( | Self | : not null access Gtk_Info_Bar_Record) return Gtk.Widget.Gtk_Widget; |
function Get_Content_Area
( | Self | : not null access Gtk_Info_Bar_Record) return Gtk.Widget.Gtk_Widget; |
function Get_Message_Type
( | Self | : not null access Gtk_Info_Bar_Record) return Gtk.Message_Dialog.Gtk_Message_Type; |
procedure Set_Message_Type
( | Self | : not null access Gtk_Info_Bar_Record; |
Message_Type | : Gtk.Message_Dialog.Gtk_Message_Type); |
procedure Response
( | Self | : not null access Gtk_Info_Bar_Record; |
Response_Id | : Gint); |
procedure Set_Default_Response
( | Self | : not null access Gtk_Info_Bar_Record; |
Response_Id | : Gint); |
procedure Set_Response_Sensitive
( | Self | : not null access Gtk_Info_Bar_Record; |
Response_Id | : Gint; | |
Setting | : Boolean); |
function Get_Orientation
( | Self | : not null access Gtk_Info_Bar_Record) return Gtk.Enums.Gtk_Orientation; |
procedure Set_Orientation
( | Self | : not null access Gtk_Info_Bar_Record; |
Orientation | : Gtk.Enums.Gtk_Orientation); |
procedure On_Close
( | Self | : not null access Gtk_Info_Bar_Record; |
Call | : Cb_Gtk_Info_Bar_Void; | |
After | : Boolean := False); |
procedure On_Close
( | Self | : not null access Gtk_Info_Bar_Record; |
Call | : Cb_GObject_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
procedure On_Response
( | Self | : not null access Gtk_Info_Bar_Record; |
Call | : Cb_Gtk_Info_Bar_Gint_Void; | |
After | : Boolean := False); |
procedure On_Response
( | Self | : not null access Gtk_Info_Bar_Record; |
Call | : Cb_GObject_Gint_Void; | |
Slot | : not null access Glib.Object.GObject_Record'Class; | |
After | : Boolean := False); |
function "+"
( | Widget | : access Gtk_Info_Bar_Record'Class) return Gtk.Buildable.Gtk_Buildable renames Implements_Gtk_Buildable.To_Interface; |
function "-"
( | Interf | : Gtk.Buildable.Gtk_Buildable) return Gtk_Info_Bar renames Implements_Gtk_Buildable.To_Object; |
function "+"
( | Widget | : access Gtk_Info_Bar_Record'Class) return Gtk.Orientable.Gtk_Orientable renames Implements_Gtk_Orientable.To_Interface; |
function "-"
( | Interf | : Gtk.Orientable.Gtk_Orientable) return Gtk_Info_Bar renames Implements_Gtk_Orientable.To_Object; |
Gtk.Info_Bar.Gtk_Info_Bar is a widget that can be used to show messages to the user without showing a dialog. It is often temporarily shown at the top or bottom of a document. In contrast to Gtk.Dialog.Gtk_Dialog, which has a horizontal action area at the bottom, Gtk.Info_Bar.Gtk_Info_Bar has a vertical action area at the side.
The API of Gtk.Info_Bar.Gtk_Info_Bar is very similar to Gtk.Dialog.Gtk_Dialog, allowing you to add buttons to the action area with Gtk.Info_Bar.Add_Button or gtk_info_bar_new_with_buttons. The sensitivity of action widgets can be controlled with Gtk.Info_Bar.Set_Response_Sensitive. To add widgets to the main content area of a Gtk.Info_Bar.Gtk_Info_Bar, use Gtk.Info_Bar.Get_Content_Area and add your widgets to the container.
Similar to Gtk.Message_Dialog.Gtk_Message_Dialog, the contents of a Gtk.Info_Bar.Gtk_Info_Bar can by classified as error message, warning, informational message, etc, by using Gtk.Info_Bar.Set_Message_Type. GTK+ uses the message type to determine the background color of the message area. == Simple GtkInfoBar usage. == /* set up info bar */ info_bar = gtk_info_bar_new (); gtk_widget_set_no_show_all (info_bar, TRUE); message_label = gtk_label_new (""); gtk_widget_show (message_label); content_area = gtk_info_bar_get_content_area (GTK_INFO_BAR (info_bar)); gtk_container_add (GTK_CONTAINER (content_area), message_label); gtk_info_bar_add_button (GTK_INFO_BAR (info_bar), GTK_STOCK_OK, GTK_RESPONSE_OK); g_signal_connect (info_bar, "response", G_CALLBACK (gtk_widget_hide), NULL); gtk_grid_attach (GTK_GRID (grid), info_bar, 0, 2, 1, 1); /* ... */ /* show an error message */ gtk_label_set_text (GTK_LABEL (message_label), error_message); gtk_info_bar_set_message_type (GTK_INFO_BAR (info_bar), GTK_MESSAGE_ERROR); gtk_widget_show (info_bar); == GtkInfoBar as GtkBuildable == The GtkInfoBar implementation of the GtkBuildable interface exposes the content area and action area as internal children with the names "content_area" and "action_area".
GtkInfoBar supports a custom <action-widgets> element, which can contain multiple <action-widget> elements. The "response" attribute specifies a numeric response, and the content of the element is the id of widget (which should be a child of the dialogs Action_Area).