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; }
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; }
Drawable* DrawableButton::getDownImage() const noexcept { if (Drawable* const d = getToggleState() ? downImageOn : downImage) return d; return getOverImage(); }
//============================================================================== Drawable* DrawableButton::getCurrentImage() const noexcept { if (isDown()) return getDownImage(); if (isOver()) return getOverImage(); return getNormalImage(); }
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(); }
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(); }