adw.banner

Module for [Banner] class

Types 3

A bar with contextual information.

banner

Banners are hidden by default, use property@Banner:revealed to show them.

Banners have a title, set with property@Banner:title. Titles can be marked up with Pango markup, use property@Banner:use-markup to enable it.

The title will be shown centered or left-aligned depending on available space.

Banners can optionally have a button with text on it, set through property@Banner:button-label. The button can be used with a [gio.action.Action], or with the signal@Banner::button-clicked signal.

CSS nodes

[adw.banner.Banner] has a main CSS node with the name banner.

Methods
GType _gType() @property
Banner self()Returns `this`, for use in `with` statements.
BannerGidBuilder builder()Get builder for [adw.banner.Banner] Returns: New builder object
string buttonLabel() @propertyGet `buttonLabel` property. Returns: The label to show on the button.
void buttonLabel(string propval) @propertySet `buttonLabel` property. Params: propval = The label to show on the button.
bool revealed() @propertyGet `revealed` property. Returns: Whether the banner is currently revealed.
void revealed(bool propval) @propertySet `revealed` property. Params: propval = Whether the banner is currently revealed.
string title() @propertyGet `title` property. Returns: The title for this banner.
void title(string propval) @propertySet `title` property. Params: propval = The title for this banner.
bool useMarkup() @propertyGet `useMarkup` property. Returns: Whether to use Pango markup for the banner title.
void useMarkup(bool propval) @propertySet `useMarkup` property. Params: propval = Whether to use Pango markup for the banner title.
string getButtonLabel()Gets the button label for self. Returns: the button label for self
bool getRevealed()Gets if a banner is revealed Returns: Whether a banner is revealed
string getTitle()Gets the title for self. Returns: the title for self
bool getUseMarkup()Gets whether to use Pango markup for the banner title. Returns: whether to use markup
void setButtonLabel(string label = null)Sets the button label for self.
void setRevealed(bool revealed)Sets whether a banner should be revealed
void setTitle(string title)Sets the title for this banner.
void setUseMarkup(bool useMarkup)Sets whether to use Pango markup for the banner title.
gulong connectButtonClicked(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : adw.banner.Banner))) && Parameters!T.length < 2)Connect to `ButtonClicked` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(string title)Creates a new [adw.banner.Banner].
Methods
T buttonLabel(string propval)Set `buttonLabel` property. Params: propval = The label to show on the button.
T revealed(bool propval)Set `revealed` property. Params: propval = Whether the banner is currently revealed. Returns: Builder instance for fluent chaining
T title(string propval)Set `title` property. Params: propval = The title for this banner.
T useMarkup(bool propval)Set `useMarkup` property. Params: propval = Whether to use Pango markup for the banner title.

Fluent builder for [adw.banner.Banner]

Methods