wxMessageDialog(3erl)

πŸ’– NAME πŸ’–

okay bestie, welcome to wxMessageDialog(3erl) β€” the Erlang Module Definition for the wxMessageDialog class ✨. The name line is literally: wxMessageDialog - Functions for wxMessageDialog class.


🌸 DESCRIPTION 🌸

This class represents a dialog that shows a single or multi-line message, with a choice of OK, Yes, No and Cancel buttons. That’s the whole vibe: message goes in, buttons go on, bestie chooses. πŸ’…

πŸ¦‹ Styles πŸ¦‹

This class supports the following styles: (and then the page just points you at the overview, so that’s where the style lore lives β€” no extra style names are being invented here 🫢)

  • See: Overview cmndlg
  • See: wxRichMessageDialog (not implemented in wx)
  • wxWidgets docs: wxMessageDialog

This class is derived (and can use functions) from: wxDialog wxTopLevelWindow wxWindow wxEvtHandler. Full inheritance chain, slaying in order. ✨


πŸŽ€ DATA TYPES πŸŽ€

Only one type here, and it’s iconic:

wxMessageDialog() = wx:wx_object()

✨ EXPORTS ✨

new(Parent, Message) -> wxMessageDialog()

Types:

Parent = wxWindow:wxWindow()
Message = unicode:chardata()

That’s the simple constructor moment: parent window plus message, no extra options. Clean. Minimal. Very demure. πŸŽ€

new(Parent, Message, Options :: [Option]) -> wxMessageDialog()

Types:

Parent = wxWindow:wxWindow()
Message = unicode:chardata()
Option =
    {caption, unicode:chardata()} |
    {style, integer()} |
    {pos, {X :: integer(), Y :: integer()}}

Constructor specifying the message box properties. Yep, that’s the exact sentence, and it’s doing exactly what it says. ✨

Use wxDialog:showModal/1 to show the dialog. That’s the β€œmake it actually appear” step, bestie. πŸ’…

style may be a bit list of the identifiers described above. Bit list energy: combine those style identifiers carefully.

⚠️ Notice that not all styles are compatible: only one of wxOK and wxYES_NO may be specified (and one of them must be specified) and at most one default button style can be used and it is only valid if the corresponding button is shown in the message box. fr fr, this is the compatibility warning β€” do not freestyle it. 😭

destroy(This :: wxMessageDialog()) -> ok

Destroys the object. bye bestie, object is gone πŸ’…


mwah, later besties πŸ’‹ β€” cute little sign-off from the footer: source/source-ish credit is wxWidgets team., version is wx 2.2.2.1, and this page is wxMessageDialog(3erl). Date? Not on this footer, so I’m not gonna invent one, periodt. πŸŽ€βœ¨

πŸ“¦ where this page comes from