wxFontDialog(3erl)

πŸ’… wxFontDialog (3erl)

okay bestie, welcome to the wxFontDialog page β€” it's an Erlang module definition for the font chooser dialog, and honestly? it's giving "small but mighty." let's get into it ✨


🌸 NAME 🌸

wxFontDialog β€” functions for the wxFontDialog class. that's it, that's the whole vibe πŸŽ€


πŸ’– DESCRIPTION πŸ’–

so this class literally is the font chooser dialog. like, when you want the user to pick a font and you don't wanna build the whole thing yourself? yeah. this. iconic behavior honestly πŸ‘‘

See: Overview cmndlg, wxFontData, ?wxGetFontFromUser()

this class is derived (and can use functions) from: wxDialog, wxTopLevelWindow, wxWindow, wxEvtHandler β€” so it's got the whole family tree behind it, main character energy fr fr 🌈

wxWidgets docs: wxFontDialog


πŸ¦‹ DATA TYPES πŸ¦‹

  • wxFontDialog() = wx:wx_object()

that's the type, no cap. πŸ’œ


✨ EXPORTS ✨

🌟 new() -> wxFontDialog()

default ctor, the classic no-args entrance πŸ’…

heads up bestie: create/3 must be called before the dialog can be shown. like, you can't just show up to the party without calling ahead 🫢

🌟 new(Parent, Data) -> wxFontDialog()

Types:

  • Parent = wxWindow:wxWindow()
  • Data = wxFontData:wxFontData()

the constructor, and it's a whole moment ✨

you pass a parent window, plus the wxFontData object that's gonna be used to initialize the dialog controls. simple, clean, done. πŸŽ€


πŸ’« create(This, Parent, Data) -> boolean()

Types:

  • This = wxFontDialog()
  • Parent = wxWindow:wxWindow()
  • Data = wxFontData:wxFontData()

this one creates the dialog β€” but only if the wxFontDialog object was already initialized using the default constructor. iykyk πŸ™ˆ

Return: true on success and false if an error occurred. lowkey useful to check, ngl πŸ’€


πŸ’« getFontData(This) -> wxFontData:wxFontData()

Types:

  • This = wxFontDialog()

returns the wxFontData associated with the font dialog. it's giving "gimme back my data" and honestly? valid πŸ“


πŸ’« destroy(This :: wxFontDialog()) -> ok

Types:

  • This = wxFontDialog()

destroys the object. bye bestie, slay, see you never πŸ‘‹πŸ’€


and that's the whole page, bestie β€” every flag, every type, every return value, all of it. you ate. periodt. 🧚

this one was brought to you by the wxWidgets team, wx 2.2.2.1, and the wxFontDialog(3erl) era β€” dated and versioned just like that, no edits, fr fr 🫢

πŸ“¦ where this page comes from