IntSize MenuItem::_getContentSize() { ISubWidgetText* text = getSubWidgetText(); if (text == nullptr) return mMinSize; return text->getTextSize() + (getSize() - text->getSize()); }
void TextBox::setCaption(const UString& _caption) { if (nullptr != getSubWidgetText()) getSubWidgetText()->setCaption(_caption); }
int TextBox::getFontHeight() { return (nullptr == getSubWidgetText()) ? 0 : getSubWidgetText()->getFontHeight(); }
void TextBox::setFontHeight(int _height) { if (nullptr != getSubWidgetText()) getSubWidgetText()->setFontHeight(_height); }
const std::string& TextBox::getFontName() { if (nullptr == getSubWidgetText()) return Constants::getEmptyString(); return getSubWidgetText()->getFontName(); }
void TextBox::setFontName(const std::string& _value) { if (nullptr != getSubWidgetText()) getSubWidgetText()->setFontName(_value); }
const Colour& TextBox::getTextColour() { return (nullptr == getSubWidgetText()) ? Colour::Zero : getSubWidgetText()->getTextColour(); }
void TextWidget::setWordWrap(bool wrap) { if (nullptr != getSubWidgetText()) getSubWidgetText()->setWordWrap(wrap); }
Align TextBox::getTextAlign() { if (getSubWidgetText() != nullptr) return getSubWidgetText()->getTextAlign(); return Align::Default; }
void TextBox::setTextAlign(Align _value) { if (getSubWidgetText() != nullptr) getSubWidgetText()->setTextAlign(_value); }
IntSize TextBox::getTextSize() { return (nullptr == getSubWidgetText()) ? IntSize() : getSubWidgetText()->getTextSize(); }
IntCoord TextBox::getTextRegion() { return (nullptr == getSubWidgetText()) ? IntCoord() : getSubWidgetText()->getCoord(); }
bool TextBox::getTextShadow() { return (nullptr == getSubWidgetText()) ? false : getSubWidgetText()->getShadow(); }
void TextBox::setTextShadow(bool _value) { if (nullptr != getSubWidgetText()) getSubWidgetText()->setShadow(_value); }
const Colour& TextBox::getTextShadowColour() { return (nullptr == getSubWidgetText()) ? Colour::Black : getSubWidgetText()->getShadowColour(); }
const UString& TextBox::getCaption() { if (nullptr == getSubWidgetText()) return Constants::getEmptyUString(); return getSubWidgetText()->getCaption(); }
void TextBox::setTextColour(const Colour& _value) { if (nullptr != getSubWidgetText()) getSubWidgetText()->setTextColour(_value); }
bool TextWidget::getWordWrap() const { if (nullptr != getSubWidgetText()) return getSubWidgetText()->getWordWrap(); return false; }