Exemple #1
0
// Initialisation common to all ctors.
void QsciStyle::init(int style)
{
    // The next style number to allocate.  The initial values corresponds to
    // the amount of space that Scintilla initially creates for styles.
    static int next_style_nr = 63;

    // See if a new style should be allocated.  Note that we allow styles to be
    // passed in that are bigger than STYLE_MAX because the styles used for
    // annotations are allowed to be.
    if (style < 0)
    {
        // Note that we don't deal with the situation where the newly allocated
        // style number has already been used explicitly.
        if (next_style_nr > QsciScintillaBase::STYLE_LASTPREDEFINED)
            style = next_style_nr--;
    }

    style_nr = style;

    // Initialise the minor attributes.
    setTextCase(QsciStyle::OriginalCase);
    setVisible(true);
    setChangeable(true);
    setHotspot(false);
}
Exemple #2
0
// Refresh the style.
void QsciStyle::refresh()
{
    setColor(color());
    setPaper(paper());
    setFont(font());
    setEolFill(eolFill());
    setTextCase(textCase());
    setVisible(visible());
    setChangeable(changeable());
    setHotspot(hotspot());
}