Search documentation of wx

# View Source wxHelpEvent (wx v2.4.2)

Functions for wxHelpEvent class

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.

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.

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.

# Summary

## Types

wxHelp()
wxHelpEvent()
wxHelpEventType()

## Functions

getOrigin(This)

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

getPosition(This)

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

setOrigin(This, Origin)

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

setPosition(This, Pt)

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

# Types

Link to this type

# wxHelp()

View Source

    -type wxHelp() :: #wxHelp{type :: wxHelpEvent:wxHelpEventType()}.

Link to this type

# wxHelpEvent()

View Source

    -type wxHelpEvent() :: wx:wx_object().

Link to this type

# wxHelpEventType()

View Source

    -type wxHelpEventType() :: help | detailed_help.

# Functions

Link to this function

# getOrigin(This)

View Source

    -spec getOrigin(This) -> wx:wx_enum() when 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`

Link to this function

# getPosition(This)

View Source

    -spec 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.

Link to this function

# setOrigin(This, Origin)

View Source

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

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

See: `getOrigin/1`

Link to this function

# setPosition(This, Pt)

View Source

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

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