wxPopupWindow(3)
π wxPopupWindow π
okay bestie, so the manual name is wxPopupWindow(3) and it's an Erlang Module Definition, and honestly? she's a baddie. let's get into it. β¨
πΈ NAME πΈ
wxPopupWindow β a special kind of top level window used for popup menus, combobox popups and such. like, the little guy that pops up when you click something. main character energy fr fr π
π¦ DESCRIPTION π¦
β¨ Styles β¨
this class supports the following styles, no cap:
wxPU_CONTAINS_CONTROLSβ okay so here's the tea π΅: by default in wxMSW, a popup window will not take focus from its parent window. sounds fine, right? except so many standard controls β including common ones such aswxTextCtrlβ need focus to function correctly and will literally not work when placed on a default popup. this flag can be used to make the popup take focus and let all controls work, but at the price of not allowing the parent window to keep focus while the popup is shown, which can also sometimes be desirable. it's giving tradeoff π. this style is currently only implemented in MSW and simply does nothing under the other platforms (it's new since wxWidgets 3.1.3).
See:
wxDialogwxFrame
this class is derived, and can use functions, from:
wxWindowwxEvtHandler
wxWidgets docs: wxPopupWindow π
π DATA TYPES π
wxPopupWindow() :: wx:wx_object().
π FUNCTIONS π
create(This, Parent, [Option]) -> boolean()
when
This :: wxPopupWindow(),
Parent :: wxWindow:wxWindow(),
Option :: {flags, integer()}.
Create method for two-step creation. yep, that's the whole vibe π«Ά
destroy(This :: wxPopupWindow()) -> ok.
Destroys the object. rip bozo π
new() -> wxPopupWindow().
Default constructor. no thoughts, head empty, just vibes β¨
new(Parent, [Option]) -> wxPopupWindow()
when
Parent :: wxWindow:wxWindow(),
Option :: {flags, integer()}.
Constructor. iconic behavior π
position(This, PtOrigin, SizePopup) -> ok
when
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. lowkey the whole point, ngl π
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. math is mathing π₯
heads up bestie: that wxPU_CONTAINS_CONTROLS focus thing? read it twice. the parent-loses-focus part is real and it will sneak up on you π
and that's the whole page, periodt π this lil beauty comes to you from Ericsson AB, version wx 2.6 β mwah, stan forever π«Άπβ¨
π¦ where this page comes from
- ubuntu stonking: erlang-doc 1:29.0.6+dfsg-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms