Class FontButton

All Implemented Interfaces:
Accessible, Buildable, ConstraintTarget, FontChooser, Proxy

@Generated("org.javagi.JavaGI") @Deprecated public class FontButton extends Widget implements Accessible, Buildable, ConstraintTarget, FontChooser
Deprecated.
Use FontDialogButton instead

The GtkFontButton allows to open a font chooser dialog to change the font.

An example GtkFontButton

It is suitable widget for selecting a font in a preference dialog.

CSS nodes

fontbutton
╰── button.font
    ╰── [content]

GtkFontButton has a single CSS node with name fontbutton which contains a button node with the .font style class.

  • Constructor Details

    • FontButton

      public FontButton(MemorySegment address)
      Deprecated.
      Create a FontButton instance for the provided memory address.
      Parameters:
      address - the memory address of the native object
    • FontButton

      public FontButton()
      Deprecated.
      Create a new FontButton.
  • Method Details

    • getType

      public static @Nullable Type getType()
      Deprecated.
      Get the GType of the FontButton class.
      Returns:
      the GType
    • getMemoryLayout

      public static MemoryLayout getMemoryLayout()
      Deprecated.
      The memory layout of the native struct.
      Returns:
      the memory layout
    • asParent

      protected FontButton asParent()
      Deprecated.
      Return this instance as if it were its parent type. Comparable to the Java super keyword, but ensures the parent typeclass is also used in native code.
      Overrides:
      asParent in class Widget
      Returns:
      the instance as if it were its parent type
    • withFont

      @Deprecated public static FontButton withFont(String fontname)
      Deprecated.
      Use FontDialogButton instead
      Creates a new font picker widget showing the given font.
      Parameters:
      fontname - Name of font to display in font chooser dialog
      Returns:
      a new font picker widget.
    • getModal

      @Deprecated public boolean getModal()
      Deprecated.
      Use FontDialogButton instead
      Gets whether the dialog is modal.
      Returns:
      true if the dialog is modal
    • getTitle

      @Deprecated public String getTitle()
      Deprecated.
      Use FontDialogButton instead
      Retrieves the title of the font chooser dialog.
      Returns:
      an internal copy of the title string which must not be freed.
    • getUseFont

      @Deprecated public boolean getUseFont()
      Deprecated.
      Use FontDialogButton instead
      Returns whether the selected font is used in the label.
      Returns:
      whether the selected font is used in the label.
    • getUseSize

      @Deprecated public boolean getUseSize()
      Deprecated.
      Use FontDialogButton instead
      Returns whether the selected size is used in the label.
      Returns:
      whether the selected size is used in the label.
    • setModal

      @Deprecated public void setModal(boolean modal)
      Deprecated.
      Use FontDialogButton instead
      Sets whether the dialog should be modal.
      Parameters:
      modal - true to make the dialog modal
    • setTitle

      @Deprecated public void setTitle(String title)
      Deprecated.
      Use FontDialogButton instead
      Sets the title for the font chooser dialog.
      Parameters:
      title - a string containing the font chooser dialog title
    • setUseFont

      @Deprecated public void setUseFont(boolean useFont)
      Deprecated.
      Use FontDialogButton instead
      If useFont is true, the font name will be written using the selected font.
      Parameters:
      useFont - If true, font name will be written using font chosen.
    • setUseSize

      @Deprecated public void setUseSize(boolean useSize)
      Deprecated.
      Use FontDialogButton instead
      If useSize is true, the font name will be written using the selected size.
      Parameters:
      useSize - If true, font name will be written using the selected size.
    • onActivate

      Deprecated.

      Emitted to when the font button is activated.

      The ::activate signal on GtkFontButton is an action signal and emitting it causes the button to present its dialog.

      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      Since:
      4.4
      See Also:
    • emitActivate

      public void emitActivate()
      Deprecated.
      Emits the "activate" signal. See onActivate(FontButton.ActivateCallback).
    • onFontSet

      Deprecated.

      Emitted when the user selects a font.

      When handling this signal, use FontChooser.getFont() to find out which font was just selected.

      Note that this signal is only emitted when the user changes the font. If you need to react to programmatic font changes as well, use the notify::font signal.

      Parameters:
      handler - the signal handler
      Returns:
      a signal handler ID to keep track of the signal connection
      See Also:
    • emitFontSet

      public void emitFontSet()
      Deprecated.
      Emits the "font-set" signal. See onFontSet(FontButton.FontSetCallback).
    • builder

      public static FontButton.Builder<? extends FontButton.Builder> builder()
      Deprecated.
      A FontButton.Builder object constructs a FontButton with the specified properties. Use the various set...() methods to set properties, and finish construction with FontButton.Builder.build().
      Returns:
      the builder object