GtefInfoBar

GtefInfoBar — Subclass of GtkInfoBar

Functions

Types and Values

Object Hierarchy

    GObject
    ╰── GInitiallyUnowned
        ╰── GtkWidget
            ╰── GtkContainer
                ╰── GtkBox
                    ╰── GtkInfoBar
                        ╰── GtefInfoBar

Implemented Interfaces

GtefInfoBar implements AtkImplementorIface, GtkBuildable and GtkOrientable.

Includes

#include <gtef/gtef.h>

Description

GtefInfoBar is a subclass of GtkInfoBar with a vertical action area and functions to ease the creation of info bars.

Functions

gtef_info_bar_new ()

GtefInfoBar *
gtef_info_bar_new (void);

Returns

a new GtefInfoBar.

Since: 1.0


gtef_info_bar_new_simple ()

GtefInfoBar *
gtef_info_bar_new_simple (GtkMessageType msg_type,
                          const gchar *primary_msg,
                          const gchar *secondary_msg);

Creates a new GtefInfoBar with an icon (depending on msg_type ), a primary message and a secondary message.

Parameters

msg_type

the message type.

 

primary_msg

the primary message.

 

secondary_msg

the secondary message, or NULL.

[nullable]

Returns

a new GtefInfoBar.

Since: 2.0


gtef_info_bar_add_icon ()

void
gtef_info_bar_add_icon (GtefInfoBar *info_bar);

Adds an icon on the left, determined by the message type. So before calling this function, gtk_info_bar_set_message_type() must have been called.

The icon is not updated when the message type changes. Another GtefInfoBar must be created in that case.

Parameters

info_bar

a GtefInfoBar.

 

Since: 2.0


gtef_info_bar_add_primary_message ()

void
gtef_info_bar_add_primary_message (GtefInfoBar *info_bar,
                                   const gchar *primary_msg);

Adds a primary message.

Parameters

info_bar

a GtefInfoBar.

 

primary_msg

a primary message.

 

Since: 2.0


gtef_info_bar_add_secondary_message ()

void
gtef_info_bar_add_secondary_message (GtefInfoBar *info_bar,
                                     const gchar *secondary_msg);

Adds a secondary message.

Parameters

info_bar

a GtefInfoBar.

 

secondary_msg

a secondary message.

 

Since: 2.0


gtef_info_bar_add_content_widget ()

void
gtef_info_bar_add_content_widget (GtefInfoBar *info_bar,
                                  GtkWidget *content);

Adds content to info_bar .

GtefInfoBar has an internal container, to be able to add the icon and add primary or secondary messages. The internal container is added to the content area, as returned by gtk_info_bar_get_content_area(). So if you use a GtefInfoBar and you need to add a custom GtkWidget, it is better to use this function instead of adding the GtkWidget directly to the content area.

Parameters

info_bar

a GtefInfoBar.

 

content

a GtkWidget.

 

Since: 2.0


gtef_info_bar_add_close_button ()

void
gtef_info_bar_add_close_button (GtefInfoBar *info_bar);

Calls gtk_info_bar_set_show_close_button(), and additionnally closes the info_bar when the “response” signal is received with the response_id GTK_RESPONSE_CLOSE.

Parameters

info_bar

a GtefInfoBar.

 

Since: 2.0


gtef_info_bar_create_label ()

GtkLabel *
gtef_info_bar_create_label (void);

Utility function to create a GtkLabel suitable for a GtkInfoBar. The wrapping and alignment is configured. The label is also set as selectable, for example to copy an error message and search an explanation on the web.

Returns

a new GtkLabel suitable for a GtkInfoBar.

[transfer floating]

Since: 1.0

Types and Values

GtefInfoBar

typedef struct _GtefInfoBar GtefInfoBar;