Prima::...ntDialog(3)

πŸ“¦
version 1.74000 Β· 5 versions
, in opensuse-leap 16.0

πŸŽ€ NAME πŸŽ€

Prima::Dialog::FontDialog β€” it's the standard font dialog, bestie. The one where you pick a font by vibe and it just works ✨


πŸ’– SYNOPSIS πŸ’–

okay so here's the whole thing in like five lines, no cap:

use Prima qw(Application Dialog::FontDialog);
my $f = Prima::Dialog::FontDialog-> create;
return unless $f-> execute == mb::OK;
$f = $f-> logFont;
print "$_:$f->{$_}\n" for sort keys %$f;

like, create it, run it, bail if it's not mb::OK, grab the logFont, print the keys πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

This dialog is literally the standard font selection experience β€” you pick a font by name, style, size, and encoding, all in one cute little window 🫢

And the font you picked? It comes back to you through the logFont property. that's it, that's the whole deal ✨


πŸ‘‘ API πŸ‘‘

🌸 Properties 🌸

  • fixedOnly BOOLEAN β€” picks whether the selection list shows only the fixed-pitch fonts (1) or, like, all the fonts (0). Default value: 0 πŸ’«
  • logFont FONT β€” your access point to the interactive font selection, handed to you as a hash reference. The FONT format is fully compatible with "Prima::Drawable::font" β€” iykyk πŸ”₯
  • sampleText STRING β€” the sample line of text that gets drawn in the currently selected font. Default value: AaBbYyZz πŸŽ€
  • showHelp BOOLEAN β€” this one is a create-only property, so set it at create time, mkay? It says whether the help button shows up in the dialog. Default value: 0 ⭐

🧚 Events 🧚

  • BeginDragFont β€” fires when the user starts dragging a font out of the font sample widget with the left mouse button. The default action reflects the dragging status in the dialog title πŸ’…
  • EndDragFont $WIDGET β€” fires when the user releases the mouse button over a Prima widget. The default action applies the currently selected font to $WIDGET. iconic, honestly πŸ’–

🌈 AUTHOR 🌈

Dmitry Karasik, <dmitry@karasik.eu.org>. king behavior πŸ‘‘


⭐ SEE ALSO ⭐

Prima, Prima::Window, Prima::Drawable. go read those next, bestie πŸ¦‹


that's the whole page, mwah πŸ’œ β€” brought to you by perl v5.42.0, dated 2024-08-20, and this lil' manpage is Prima::...ntDialog(3), signing off 🫢✨

πŸ“¦ where this page comes from