Пример #1
0
void Button::setTitleText(const std::string& text)
{
    if (text == getTitleText())
    {
        return;
    }
    _titleRenderer->setString(text);
    updateContentSize();
}
Пример #2
0
void Button::setTitleText(const std::string& text)
{
    if (text == getTitleText())
    {
        return;
    }
    if(nullptr == _titleRenderer)
    {
        this->createTitleRenderer();
    }
    _titleRenderer->setString(text);
    this->setTitleFontSize(_fontSize);
    updateContentSize();
}
Пример #3
0
const CsColour& PptColorSchemeAtom::getSchemeColor(EshColor::SchemeIndex in_index) const
{
    ChLOG_DEBUG_START_FN;
    const CsColour *pReturnColor = NULL;
    switch (in_index)
    {
    case SchemeColor_background:
        pReturnColor = &getBackground();
        break;
    case SchemeColor_text_and_lines:
        pReturnColor = &getTextAndLines();
        break;
    case SchemeColor_shadows:
        pReturnColor = &getShadows();
        break;
    case SchemeColor_title_text:
        pReturnColor = &getTitleText();
        break;
    case SchemeColor_fills:
        pReturnColor = &getFills();
        break;
    case SchemeColor_accent1:
        pReturnColor = &getAccent();
        break;
    case SchemeColor_accent2:
        pReturnColor = &getAccentAndHyperlink();
        break;
    case SchemeColor_accent3:
        pReturnColor = &getAccentAndFollowedHyperlink();
        break;
    default:
        pReturnColor = NULL;
        // TODO: throw exception?
        break;
    }

    ChASSERT(pReturnColor);
    return *pReturnColor;
}
void SimplePage::onButtonClickCallBack(Ref * sender)
{
    auto button=dynamic_cast<ui::Button *>(sender);
    onSelectCallBack(button->getTitleText(),index);
    removeFromParent();
}