コード例 #1
0
void FalagardMultiLineEditbox::cacheEditboxBaseImagery()
{
    MultiLineEditbox* w = (MultiLineEditbox*)d_window;
    const StateImagery* imagery;

    // get WidgetLookFeel for the assigned look.
    const WidgetLookFeel& wlf = getLookNFeel();

    String state;

    if (w->isEffectiveDisabled())
        state = "Disabled";
    else
    {
        if (w->isReadOnly())
            state = "ReadOnly";
        else
            state = "Enabled";

        if (w->isFocused())
            state += "Focused";
    }

    // try and get imagery for our current state
    imagery = &wlf.getStateImagery(state);
    // perform the rendering operation.
    imagery->render(*w);
}
コード例 #2
0
ファイル: MultiLineEditbox.cpp プロジェクト: Toby91/DDEngine
void FalagardMultiLineEditbox::cacheEditboxBaseImagery()
{
    MultiLineEditbox* w = (MultiLineEditbox*)d_window;
    const StateImagery* imagery;

    // get WidgetLookFeel for the assigned look.
    const WidgetLookFeel& wlf = getLookNFeel();
    // try and get imagery for our current state
    imagery = &wlf.getStateImagery(w->isEffectiveDisabled() ? "Disabled" : (w->isReadOnly() ? "ReadOnly" : "Enabled"));
    // peform the rendering operation.
    imagery->render(*w);
}
コード例 #3
0
ファイル: MultiLineEditbox.cpp プロジェクト: Toby91/DDEngine
void FalagardMultiLineEditbox::render()
{
    MultiLineEditbox* w = (MultiLineEditbox*)d_window;
    // render general frame and stuff before we handle the text itself
    cacheEditboxBaseImagery();

    // Render edit box text
    Rectf textarea(getTextRenderArea());
    cacheTextLines(textarea);

    // draw caret
    if ((w->hasInputFocus() && !w->isReadOnly()) &&
        (!d_blinkCaret || d_showCaret))
            cacheCaretImagery(textarea);
}