void visibleAreaChanged (const Rectangle<int>&) override { updateVisibleArea (true); if (auto* m = owner.getModel()) m->listWasScrolled(); }
void visibleAreaChanged (const Rectangle<int>&) { updateVisibleArea (true); if (owner.getModel() != nullptr) owner.getModel()->listWasScrolled(); }
void Viewport::setScrollBarThickness (const int thickness) { if (scrollBarThickness != thickness) { scrollBarThickness = thickness; updateVisibleArea(); } }
//============================================================================== void Viewport::setSingleStepSizes (const int stepX, const int stepY) { if (singleStepX != stepX || singleStepY != stepY) { singleStepX = stepX; singleStepY = stepY; updateVisibleArea(); } }
void Viewport::setScrollBarsShown (const bool showVerticalScrollbarIfNeeded, const bool showHorizontalScrollbarIfNeeded) { if (showVScrollbar != showVerticalScrollbarIfNeeded || showHScrollbar != showHorizontalScrollbarIfNeeded) { showVScrollbar = showVerticalScrollbarIfNeeded; showHScrollbar = showHorizontalScrollbarIfNeeded; updateVisibleArea(); } }
void Viewport::setScrollBarsShown (const bool showVerticalScrollbarIfNeeded, const bool showHorizontalScrollbarIfNeeded, const bool allowVerticalScrollingWithoutScrollbar, const bool allowHorizontalScrollingWithoutScrollbar) { allowScrollingWithoutScrollbarV = allowVerticalScrollingWithoutScrollbar; allowScrollingWithoutScrollbarH = allowHorizontalScrollingWithoutScrollbar; if (showVScrollbar != showVerticalScrollbarIfNeeded || showHScrollbar != showHorizontalScrollbarIfNeeded) { showVScrollbar = showVerticalScrollbarIfNeeded; showHScrollbar = showHorizontalScrollbarIfNeeded; updateVisibleArea(); } }
void Viewport::setViewedComponent (Component* const newViewedComponent, const bool deleteComponentWhenNoLongerNeeded) { if (contentComp.get() != newViewedComponent) { deleteContentComp(); contentComp = newViewedComponent; deleteContent = deleteComponentWhenNoLongerNeeded; if (contentComp != nullptr) { contentHolder.addAndMakeVisible (contentComp); setViewPosition (0, 0); contentComp->addComponentListener (this); } updateVisibleArea(); } }
void Viewport::setScrollBarThickness (const int thickness) { int newThickness; // To stay compatible with the previous code: use the // default thickness if thickness parameter is zero // or negative if (thickness <= 0) { customScrollBarThickness = false; newThickness = getLookAndFeel().getDefaultScrollbarWidth(); } else { customScrollBarThickness = true; newThickness = thickness; } if (scrollBarThickness != newThickness) { scrollBarThickness = newThickness; updateVisibleArea(); } }
void Viewport::resized() { updateVisibleArea(); }
void Viewport::componentMovedOrResized (Component&, bool, bool) { updateVisibleArea(); }
void DisplayItem::setEffectiveLookAt(QPointF p) { if (m_effectiveLookAt == p) return; m_effectiveLookAt = p; updateVisibleArea(); }
void DisplayItem::setFactor(qreal f) { if (!qFuzzyIsNull(m_factor - f)) { m_factor = f; updateVisibleArea(); } }
void DisplayItem::setSize(QSizeF size) { if (size != m_size) { m_size = size; updateVisibleArea(); } }