- wxEventType scrollEvent;
- int newPos = event->data.ctlRepeat.value;
- if ( newPos == GetMax() )
- {
- scrollEvent = wxEVT_SCROLL_TOP;
- }
- else if ( newPos == GetMin() )
- {
- scrollEvent = wxEVT_SCROLL_BOTTOM;
- }
- else if ( newPos == ( m_oldPos + GetLineSize() ) )
- {
- scrollEvent = wxEVT_SCROLL_LINEUP;
- }
- else if ( newPos == ( m_oldPos - GetLineSize() ) )
- {
- scrollEvent = wxEVT_SCROLL_LINEDOWN;
- }
- else if ( newPos == ( m_oldPos + GetPageSize() ) )
- {
- scrollEvent = wxEVT_SCROLL_PAGEUP;
- }
- else if ( newPos == ( m_oldPos - GetPageSize() ) )
- {
- scrollEvent = wxEVT_SCROLL_PAGEDOWN;
- }
- else
+ const EventType* palmEvent = (EventType*)event;
+ int newPos = ValueInvertOrNot(palmEvent->data.ctlRepeat.value);
+ if ( newPos == m_oldPos )