wxPopupWindow(3erl)

🌸 NAME 🌸

wxPopupWindow β€” functions for the wxPopupWindow class, bestie. This is the wxPopupWindow(3erl) page, aka the Erlang module definition, and we're about to make popup windows make sense. πŸ’–

✨ DESCRIPTION ✨

Okay so picture this: a special kind of top level window used for popup menus, combobox popups and such. That's the whole vibe. πŸ¦‹

πŸŽ€ Styles πŸŽ€

This class supports the following styles:

…and that's the list on this page β€” yes, it's literally giving "no styles listed" energy, and we respect it. πŸ’…

See: wxDialog, wxFrame.

This class is derived (and can use functions) from: wxWindow wxEvtHandler.

wxWidgets docs: wxPopupWindow.

πŸ’Ύ DATA TYPES πŸ’Ύ

The one data type on the menu, no cap:

wxPopupWindow() = wx:wx_object()

πŸ‘‘ EXPORTS πŸ‘‘

new() -> wxPopupWindow()

Default constructor. That's it, that's the function β€” it's giving simple and iconic. ✨

new(Parent) -> wxPopupWindow()

Types:

Parent = wxWindow:wxWindow()

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

Types:

Parent = wxWindow:wxWindow()
Option = {flags, integer()}

Constructor. You're passing a Parent and Options (which are a list of {flags, integer()}), and it constructs. Slay. πŸ’–

create(This, Parent) -> boolean()

Types:

This = wxPopupWindow()
Parent = wxWindow:wxWindow()

create(This, Parent, Options :: [Option]) -> boolean()

Types:

This = wxPopupWindow()
Parent = wxWindow:wxWindow()
Option = {flags, integer()}

Create method for two-step creation. Two-step creation is the moment, bestie. πŸŽ€

position(This, PtOrigin, SizePopup) -> ok

Types:

This = wxPopupWindow()
PtOrigin = {X :: integer(), Y :: integer()}
SizePopup = {W :: integer(), H :: integer()}

Move the popup window to the right position, i.e. such that it is entirely visible.

The popup is positioned at ptOrigin + size if it opens below and to the right (default), at ptOrigin - sizePopup if it opens above and to the left etc. Positioning math? Obsessed. 🧚

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

Destroys the object. Rude but necessary, periodt. πŸ’€


Sign-off city: wxWidgets team. Β· wx 2.2.2.1 Β· wxPopupWindow(3erl) β€” that's the source/version and manual-name energy at the very end. Byeee, bestie! 🌈🫢

πŸ“¦ where this page comes from