const Drawable* DrawableButton::getDownImage() const throw()
{
    const Drawable* d = normalImage;

    if (getToggleState())
    {
        if (downImageOn != 0)
            d = downImageOn;
        else if (overImageOn != 0)
            d = overImageOn;
        else if (normalImageOn != 0)
            d = normalImageOn;
        else if (downImage != 0)
            d = downImage;
        else
            d = getOverImage();
    }
    else
    {
        if (downImage != 0)
            d = downImage;
        else
            d = getOverImage();
    }

    return d;
}
Пример #2
0
Drawable* DrawableButton::getDownImage() const noexcept
{
    Drawable* d = normalImage;

    if (getToggleState())
    {
        if (downImageOn != nullptr)
            d = downImageOn;
        else if (overImageOn != nullptr)
            d = overImageOn;
        else if (normalImageOn != nullptr)
            d = normalImageOn;
        else if (downImage != nullptr)
            d = downImage;
        else
            d = getOverImage();
    }
    else
    {
        if (downImage != nullptr)
            d = downImage;
        else
            d = getOverImage();
    }

    return d;
}
Пример #3
0
Drawable* DrawableButton::getDownImage() const noexcept
{
    if (Drawable* const d = getToggleState() ? downImageOn : downImage)
        return d;

    return getOverImage();
}
Пример #4
0
//==============================================================================
Drawable* DrawableButton::getCurrentImage() const noexcept
{
    if (isDown())  return getDownImage();
    if (isOver())  return getOverImage();

    return getNormalImage();
}
Пример #5
0
Image ImageButton::getCurrentImage() const
{
    if (isDown() || getToggleState())
        return getDownImage();

    if (isOver())
        return getOverImage();

    return getNormalImage();
}
//==============================================================================
const Drawable* DrawablePad::getCurrentImage() const throw()
{
    if (isDown())
        return getDownImage();

    if (isOver())
        return getOverImage();

    return getNormalImage();
}
Пример #7
0
Image ImageButton::getDownImage() const
{
    return downImage.isValid() ? downImage
                               : getOverImage();
}
Drawable* DrawableButton::getDownImage() const noexcept
{
    Drawable* const d = getToggleState() ? downImageOn : downImage;

    return d != nullptr ? d : getOverImage();
}