wxHelpEvent(3)

πŸ“¦
version 29.0.6 Β· 3 versions
, in ubuntu stonking

✨ wxHelpEvent ✨

okay bestie, welcome to the wxHelpEvent page from the Erlang wx docs πŸ’– this is the module definition vibe, so let's get into it.


🌸 NAME 🌸

wxHelpEvent β€” a help event gets sent when the user has asked for context-sensitive help πŸ†˜βœ¨


πŸ’… DESCRIPTION πŸ’…

So basically, two things can cause this whole situation:

  • the application asks for context-sensitive help mode via wxContextHelp (not implemented in wx, bestie, so don't come for me), or
  • on MS Windows, the system generates 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 it's propagated up the window hierarchy until the event is processed or there are no more event handlers left πŸ¦‹ it's giving "climbing the family tree until somebody answers".

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, no cap πŸ”₯ because it lets wxWidgets generate further events for ancestors of the clicked-on window. Otherwise it would be literally impossible to show help for container windows, since processing would stop after the first window found. So like… skip it, bestie, or your container windows get nothing πŸ’€

<b>See:</b>

  • 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. subscribe, slay, that's the whole move 🫢


🌈 DATA TYPES 🌈

  • wxHelp() :: #wxHelp{}.
  • wxHelpEvent() :: wx:wx_object().
  • wxHelpEventType() :: help | detailed_help.

⭐ FUNCTIONS ⭐

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

getOrigin(This) -> wx:wx_enum() when This :: wxHelpEvent().

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

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()} when This :: wxHelpEvent().

getPosition(This) -> {X :: integer(), Y :: integer()}
                     when This :: wxHelpEvent().

Returns the left-click position of the mouse, in screen coordinates πŸ“

This allows the application to position the help appropriately β€” like, put the help bubble where the click actually happened, main character energy πŸŽ€


🌸 setOrigin(This, Origin) -> ok when This :: wxHelpEvent(), Origin :: wx:wx_enum().

setOrigin(This, Origin) -> ok
                      when This :: wxHelpEvent(), Origin :: wx:wx_enum().

Set the help event origin β€” only used internally by wxWidgets normally, so like, hands off unless you know what you're doing πŸ™ˆ

See: getOrigin/1


πŸ¦‹ setPosition(This, Pt) -> ok when This :: wxHelpEvent(), Pt :: {X :: integer(), Y :: integer()}.

setPosition(This, Pt) -> ok
                        when
                            This :: wxHelpEvent(),
                            Pt :: {X :: integer(), Y :: integer()}.

Sets the left-click position of the mouse, in screen coordinates πŸ“βœοΈ


aaaand that's the whole page, bestie πŸ’– this absolute icon came to you from Ericsson AB, wx 2.6, and the date on the tin was the wxHelpEvent(3) era β€” go forth and handle your help events, periodt πŸ‘‘βœ¨

πŸ“¦ where this page comes from