wxHelpEvent(3erl)

πŸ’– NAME πŸ’–

okay so bestie, this is wxHelpEvent from the Erlang Module Definition manual, section 3erl β€” literally the context-sensitive help event main character. ✨

wxHelpEvent β€” Functions for wxHelpEvent class.


🌸 DESCRIPTION 🌸

A help event is sent when the user has requested context-sensitive help. This can either be caused by the application requesting context-sensitive help mode via wxContextHelp (not implemented in wx), or β€” on MS Windows β€” by the system generating a WM_HELP message when the user pressed F1 or clicked on the query button in a dialog caption. πŸ’…

A help event is sent to the window that the user clicked on, and is propagated up the window hierarchy until the event is processed or there are no more event handlers. It’s giving β€œclimb the window family tree until somebody answers,” no cap. πŸ¦‹

The application should call wxEvent:getId/1 to check the identity of the clicked-on window, and then either show some suitable help or call wxEvent:skip/2 if the identifier is unrecognised.

Calling Skip is important because it allows wxWidgets to generate further events for ancestors of the clicked-on window. Otherwise it would be impossible to show help for container windows, since processing would stop after the first window found. That part is iconic and non-negotiable, periodt. πŸŽ€

See: wxContextHelp (not implemented in wx), wxDialog, Overview events

This class is derived (and can use functions) from: wxEvent

wxWidgets docs: wxHelpEvent


✨ EVENTS ✨

Use wxEvtHandler:connect/3 with wxHelpEventType to subscribe to events of this type. That’s the subscription tea, iykyk. 🫢


πŸ¦‹ DATA TYPES πŸ¦‹

wxHelpEvent() = wx:wx_object()

wxHelp() = #wxHelp{type = wxHelpEvent:wxHelpEventType()}

wxHelpEventType() = help | detailed_help

πŸ”₯ EXPORTS πŸ”₯

πŸ’œ getOrigin(This) -> wx:wx_enum()

Types:

  • This = wxHelpEvent()

Returns the origin of the help event which is one of the wxHelpEvent::Origin (not implemented in wx) values.

The application may handle events generated using the keyboard or mouse differently, e.g. by using wx_misc:getMousePosition/0 for the mouse events.

See: setOrigin/2

🌈 getPosition(This) -> {X :: integer(), Y :: integer()}

Types:

  • This = wxHelpEvent()

Returns the left-click position of the mouse, in screen coordinates.

This allows the application to position the help appropriately.

πŸ“ setOrigin(This, Origin) -> ok

Types:

  • This = wxHelpEvent()
  • Origin = wx:wx_enum()

Set the help event origin, only used internally by wxWidgets normally.

See: getOrigin/1

⭐ setPosition(This, Pt) -> ok

Types:

  • This = wxHelpEvent()
  • Pt = {X :: integer(), Y :: integer()}

Sets the left-click position of the mouse, in screen coordinates.


mwah πŸ’‹ β€” source/author: wxWidgets team; version: wx 2.2.2.1; footer title situation: wxHelpEvent(3erl). There’s no date on this page, bestie, so we are absolutely not inventing one. Slay. 🫢

πŸ“¦ where this page comes from