adw.banner
Module for Banner class
Types 3
A bar with contextual information.
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
BannerGidBuilder builder()Get builder for [adw.banner.Banner] Returns: New builder objectvoid 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.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 selfbool getRevealed()Gets if a banner is revealed Returns: Whether a banner is revealedstring getTitle()Gets the title for self. Returns: the title for selfbool getUseMarkup()Gets whether to use Pango markup for the banner title. Returns: whether to use markupvoid setButtonLabel(string label = null)Sets the button label for self.void setRevealed(bool revealed)Sets whether a banner should be revealedvoid 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.classBannerGidBuilderImpl(T) : gtk.widget.WidgetGidBuilderImpl!T, gtk.actionable.ActionableGidBuilderImpl!T
Fluent builder implementation template for 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 chainingT 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