KNOB

From SEGGER Wiki
Jump to: navigation, search

The KNOB widget is used to change a value with a knob. The KNOB widget is transparent per default and it requires a memory device containing a drawn knob to be visible. If the memory device contains transparency, any content can be shown in the background.

Ever since of the release of the ROTARY widget, the KNOB widget has been become obsolete. The new ROTARY widget does not use memory devices.

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

Notification codes

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

Message Description
WM_NOTIFICATION_CLICKED KNOB has been clicked.
WM_NOTIFICATION_RELEASED KNOB has been released.
WM_NOTIFICATION_MOVED_OUT KNOB has been clicked and pointer has been moved out of the KNOB widget without releasing.
WM_NOTIFICATION_VALUE_CHANGED The value of the KNOB widget has been changed.

Keyboard reaction

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

Message Description
GUI_KEY_RIGHT The KNOB rotates CW.
GUI_KEY_LEFT The KNOB rotates CCW.
GUI_KEY_LEFT The KNOB rotates CW.
GUI_KEY_LEFT The KNOB rotates CCW.