A pen_state is the event<-detail
of the events of a pen on a graphics tablet or touch screen. The tip of
the pen generates the ms_left_* events, its first and second barrel
button the ms_right_* and ms_middle_* events and moving the pen while it
is near the surface generates loc_move events, so applications that only
use the mouse also work with a pen. The event<-device
of these events is the input_device of the pen, whose input_device<-kind
is pen. In addition, a pen generates pen_proximity_in and
pen_proximity_out when it comes near or leaves the surface and pen_axis
if an axis changes without moving the pen.
The pen_state holds the state of all axes of the pen when the event
was generated. As the event delegates to its detail, these are normally
requested from the event, e.g.
get(Ev, pressure, Pressure)
Axes that the pen does not have are 0. The names follow SDL, except
for pen_state<-hover_distance
and pen_state<-barrel_rotation,
as an event already has a
pen_state<-distance and a pen_state<-rotation.
.g.,
an airbrush pen, from 0 to 1.