void wxVideoTerminal::OnScrollBar(wxScrollWinEvent &evt) { if (evt.GetOrientation() == wxVERTICAL) { if (evt.GetEventType() == wxEVT_SCROLLWIN_BOTTOM) //wxLogDebug("You scrollwin Bottom: %d", evt.GetPosition()) ; else if (evt.GetEventType() == wxEVT_SCROLLWIN_TOP) //wxLogDebug("You scrollwin Top: %d", evt.GetPosition()) ; else if (evt.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN) LineDown(); else if (evt.GetEventType() == wxEVT_SCROLLWIN_LINEUP) LineUp(); else if (evt.GetEventType() == wxEVT_SCROLLWIN_PAGEUP) PageUp(); else if (evt.GetEventType() == wxEVT_SCROLLWIN_PAGEDOWN) PageDown(); else if (evt.GetEventType() == wxEVT_SCROLLWIN_THUMBTRACK || evt.GetEventType() == wxEVT_SCROLLWIN_THUMBRELEASE) { int scroll_pos = m_firstline_row + evt.GetPosition(); UpdateScrollPos(scroll_pos); } } }
void SetItemPainter(ItemPainter* ppainter) { if (ppainter == NULL) { m_ppainter = new DefaultItemPainter(); } else { m_ppainter = ppainter; } UpdateScrollBar(); UpdateScrollPos(); NeedLayout(); NeedPaint(); }
void ListChanged() { int index; if (m_pitemSelection != NULL) index = m_plist->GetIndex(m_pitemSelection); else index = -1; if (index == -1) { m_pitemSelection = NULL; m_iOldSelection = -1; } m_indexSelection = index; UpdateScrollBar(); UpdateScrollPos(); NeedLayout(); NeedPaint(); SelectionChanged(); }
bool wxVideoTerminal::ScrollLines(int lines) { int scroll_pos = m_scrollpos_row + lines; return UpdateScrollPos(scroll_pos); };