* src/haiku_io.c (haiku_len): Add `SCROLL_BAR_PART_EVENT'.
* src/haiku_support.cc (class EmacsScrollBar): New fields
`dragging' and `current_state', along with `old_value' and
`current_part'.
(EmacsScrollBar): Set horizontal flag to `horizontal_p'.
(MessageReceived): Set old_value when receiving
SCROLL_BAR_UPDATE message.
(ValueChanged): Don't allow scroll bar values to change while
dragging.
(MouseUp, MouseDown): Calculate button under mouse and act
accordingly.
* src/haiku_support.h (enum haiku_event_type): New event
`SCROLL_BAR_PART_EVENT'.
(enum haiku_scroll_bar_part): New enumerator.
(struct haiku_scroll_bar_part_event): New struct.
* src/haikuterm.c (haiku_read_socket): Handle
SCROLL_BAR_PART_EVENTs.