コード例 #1
0
ファイル: juce_ListBox.cpp プロジェクト: RomanKubiak/amnesia
    void visibleAreaChanged (const Rectangle<int>&) override
    {
        updateVisibleArea (true);

        if (auto* m = owner.getModel())
            m->listWasScrolled();
    }
コード例 #2
0
ファイル: juce_ListBox.cpp プロジェクト: sonic59/JuceEditor
    void visibleAreaChanged (const Rectangle<int>&)
    {
        updateVisibleArea (true);

        if (owner.getModel() != nullptr)
            owner.getModel()->listWasScrolled();
    }
コード例 #3
0
ファイル: juce_Viewport.cpp プロジェクト: 0x4d52/ugen
void Viewport::setScrollBarThickness (const int thickness)
{
    if (scrollBarThickness != thickness)
    {
        scrollBarThickness = thickness;
        updateVisibleArea();
    }
}
コード例 #4
0
ファイル: juce_Viewport.cpp プロジェクト: AndyJBuchanan/dexed
//==============================================================================
void Viewport::setSingleStepSizes (const int stepX, const int stepY)
{
    if (singleStepX != stepX || singleStepY != stepY)
    {
        singleStepX = stepX;
        singleStepY = stepY;
        updateVisibleArea();
    }
}
コード例 #5
0
ファイル: juce_Viewport.cpp プロジェクト: 0x4d52/ugen
void Viewport::setScrollBarsShown (const bool showVerticalScrollbarIfNeeded,
                                   const bool showHorizontalScrollbarIfNeeded)
{
    if (showVScrollbar != showVerticalScrollbarIfNeeded
         || showHScrollbar != showHorizontalScrollbarIfNeeded)
    {
        showVScrollbar = showVerticalScrollbarIfNeeded;
        showHScrollbar = showHorizontalScrollbarIfNeeded;
        updateVisibleArea();
    }
}
コード例 #6
0
ファイル: juce_Viewport.cpp プロジェクト: AndyJBuchanan/dexed
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();
    }
}
コード例 #7
0
ファイル: juce_Viewport.cpp プロジェクト: randi2kewl/ShoutOut
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();
    }
}
コード例 #8
0
ファイル: juce_Viewport.cpp プロジェクト: AndyJBuchanan/dexed
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();
    }
}
コード例 #9
0
ファイル: juce_Viewport.cpp プロジェクト: AndyJBuchanan/dexed
void Viewport::resized()
{
    updateVisibleArea();
}
コード例 #10
0
ファイル: juce_Viewport.cpp プロジェクト: AndyJBuchanan/dexed
void Viewport::componentMovedOrResized (Component&, bool, bool)
{
    updateVisibleArea();
}
コード例 #11
0
ファイル: DisplayItem.cpp プロジェクト: Hakiko/GameEngine
void DisplayItem::setEffectiveLookAt(QPointF p) {
  if (m_effectiveLookAt == p) return;
  m_effectiveLookAt = p;

  updateVisibleArea();
}
コード例 #12
0
ファイル: DisplayItem.cpp プロジェクト: Hakiko/GameEngine
void DisplayItem::setFactor(qreal f) {
  if (!qFuzzyIsNull(m_factor - f)) {
    m_factor = f;
    updateVisibleArea();
  }
}
コード例 #13
0
ファイル: DisplayItem.cpp プロジェクト: Hakiko/GameEngine
void DisplayItem::setSize(QSizeF size) {
  if (size != m_size) {
    m_size = size;
    updateVisibleArea();
  }
}