Class WindowTitle

All Implemented Interfaces:
PointerInterface

public class WindowTitle extends Widget
A helper widget for setting a window's title and subtitle.

<picture>
<source srcset="window-title-dark.png" media="(prefers-color-scheme: dark)">
<img src="window-title.png" alt="window-title">
</picture>

`AdwWindowTitle` shows a title and subtitle. It's intended to be used as the
title child of [class@Gtk.HeaderBar] or [class@HeaderBar].

## CSS nodes

`AdwWindowTitle` has a single CSS node with name `windowtitle`.

https://gnome.pages.gitlab.gnome.org/libadwaita/doc/main/class.WindowTitle.html

  • Constructor Details

    • WindowTitle

      public WindowTitle(PointerContainer pointer)
    • WindowTitle

      public WindowTitle(@Nonnull Str title, @Nonnull Str subtitle)
      Creates a new `AdwWindowTitle`.
      Parameters:
      title - a title
      subtitle - a subtitle
    • WindowTitle

      public WindowTitle(String title, String subtitle)
      Creates a new `AdwWindowTitle`.
      Parameters:
      title - a title
      subtitle - a subtitle
  • Method Details

    • getClassHandler

      public static ClassHandler getClassHandler()
    • getSubtitle

      public Str getSubtitle()
      Gets the subtitle of @self.
      Returns:
      the subtitle
    • getTitle

      public Str getTitle()
      Gets the title of @self.
      Returns:
      the title
    • setSubtitle

      public void setSubtitle(@Nonnull Str subtitle)
      Sets the subtitle of @self.

      The subtitle should give the user additional details.
      Parameters:
      subtitle - a subtitle
    • setSubtitle

      public void setSubtitle(String subtitle)
      Sets the subtitle of @self.

      The subtitle should give the user additional details.
      Parameters:
      subtitle - a subtitle
    • setTitle

      public void setTitle(@Nonnull Str title)
      Sets the title of @self.

      The title typically identifies the current view or content item, and
      generally does not use the application name.
      Parameters:
      title - a title
    • setTitle

      public void setTitle(String title)
      Sets the title of @self.

      The title typically identifies the current view or content item, and
      generally does not use the application name.
      Parameters:
      title - a title
    • asAccessible

      public Accessible asAccessible()
      Implements interface Accessible. Call this to get access to interface functions.
      Overrides:
      asAccessible in class Widget
      Returns:
      Accessible
    • asBuildable

      public Buildable asBuildable()
      Implements interface Buildable. Call this to get access to interface functions.
      Overrides:
      asBuildable in class Widget
      Returns:
      Buildable
    • asConstraintTarget

      public ConstraintTarget asConstraintTarget()
      Implements interface ConstraintTarget. Call this to get access to interface functions.
      Overrides:
      asConstraintTarget in class Widget
      Returns:
      ConstraintTarget
    • getTypeID

      public static long getTypeID()
    • getParentTypeID

      public static long getParentTypeID()
    • getTypeSize

      public static TypeSystem.TypeSize getTypeSize()
    • getParentTypeSize

      public static TypeSystem.TypeSize getParentTypeSize()
    • getInstanceSize

      public static int getInstanceSize()