adw.banner

Module for [Banner] class

Types 3

A bar with contextual information.

banner

Banners are hidden by default, use adw.banner.Banner.revealed to show them.

Banners have a title, set with adw.banner.Banner.title. Titles can be marked up with Pango markup, use adw.banner.Banner.useMarkup 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 adw.banner.Banner.buttonLabel. The button can be used with a gio.action.Action, or with the adw.banner.Banner.buttonClicked signal.

CSS nodes

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

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Banner self() nothrowReturns `this`, for use in `with` statements.
BannerGidBuilder builder() static nothrowGet builder for [adw.banner.Banner] Returns: New builder object
string buttonLabel() @property nothrowGet `buttonLabel` property. Returns: The label to show on the button.
void buttonLabel(string propval) @property nothrowSet `buttonLabel` property. Params: propval = The label to show on the button.
bool revealed() @property nothrowGet `revealed` property. Returns: Whether the banner is currently revealed.
void revealed(bool propval) @property nothrowSet `revealed` property. Params: propval = Whether the banner is currently revealed.
string title() @property nothrowGet `title` property. Returns: The title for this banner.
void title(string propval) @property nothrowSet `title` property. Params: propval = The title for this banner.
bool useMarkup() @property nothrowGet `useMarkup` property. Returns: Whether to use Pango markup for the banner title.
void useMarkup(bool propval) @property nothrowSet `useMarkup` property. Params: propval = Whether to use Pango markup for the banner title.
string getButtonLabel() nothrowGets the button label for self. Returns: the button label for self
bool getRevealed() nothrowGets if a banner is revealed Returns: Whether a banner is revealed
string getTitle() nothrowGets the title for self. Returns: the title for self
bool getUseMarkup() nothrowGets whether to use Pango markup for the banner title. Returns: whether to use markup
void setButtonLabel(string label = null) nothrowSets the button label for self.
void setRevealed(bool revealed) nothrowSets whether a banner should be revealed
void setTitle(string title) nothrowSets the title for this banner.
void setUseMarkup(bool useMarkup) nothrowSets 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) nothrowConnect to `ButtonClicked` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this(string title)Creates a new [adw.banner.Banner].

Fluent builder implementation template for adw.banner.Banner

Methods
T buttonLabel(string propval) nothrowSet `buttonLabel` property. Params: propval = The label to show on the button.
T revealed(bool propval) nothrowSet `revealed` property. Params: propval = Whether the banner is currently revealed. Returns: Builder instance for fluent chaining
T title(string propval) nothrowSet `title` property. Params: propval = The title for this banner.
T useMarkup(bool propval) nothrowSet `useMarkup` property. Params: propval = Whether to use Pango markup for the banner title.

Fluent builder for adw.banner.Banner

Methods
Banner build() nothrowCreate object from builder. Returns: New object