ROTARY

From SEGGER Wiki
Jump to: navigation, search

The ROTARY widget is a reworked version of the KNOB widget, therefore they share some similarities. Just as the KNOB, the ROTARY is a widget the user can rotate. From the rotation degree values are determined which can be used within the application.

A ROTARY widget consists of a background bitmap and a marker bitmap. Optionally, the marker bitmap can be rotated while the widget is rotating, but the background bitmap does not rotate.

ROTARY
ROTARY.png
Receives focus Yes
Skinnable No
OwnerDraw No
Uses Memory Devices Yes
Attached widgets None

Notification codes

The following events are sent from a ROTARY widget to its parent window as part of a WM_NOTIFY_PARENT message:

Message Description
WM_NOTIFICATION_CLICKED ROTARY has been clicked.
WM_NOTIFICATION_RELEASED ROTARY has been released.
WM_NOTIFICATION_MOTION_STOPPED Movement of the ROTARY has stopped.
WM_NOTIFICATION_MOVED_OUT ROTARY has been clicked and pointer has been moved out of the ROTARY area without releasing.
WM_NOTIFICATION_VALUE_CHANGED The value of the ROTARY widget has been changed.

Keyboard reaction

The ROTARY widget reacts to the following keys if it has the input focus:

Message Description
GUI_KEY_RIGHT The ROTARY rotates CW.
GUI_KEY_LEFT The ROTARY rotates CCW.
GUI_KEY_DOWN The ROTARY rotates CW.
GUI_KEY_UP The ROTARY rotates CCW.

Samples

Below are links to samples that demonstrate how to use ROTARY widgets in emWin.