Back to Notepad

QScintilla: QsciStyle Class Reference

src/qscint/doc/html/classQsciStyle.html

latest11.6 KB
Original Source

| QScintilla 2.12.1 |

Public Types | Public Member Functions | List of all members

QsciStyle Class Reference

#include <qscistyle.h>

|

Public Types

| | enum | TextCase { OriginalCase = 0, UpperCase = 1, LowerCase = 2 } | | |

|

Public Member Functions

| | | QsciStyle (int style=-1) | | | | | QsciStyle (int style, const QString &description, const QColor &color, const QColor &paper, const QFont &font, bool eolFill=false) | | | | void | apply (QsciScintillaBase *sci) const | | | | void | setStyle (int style) | | | | int | style () const | | | | void | setDescription (const QString &description) | | | | QString | description () const | | | | void | setColor (const QColor &color) | | | | QColor | color () const | | | | void | setPaper (const QColor &paper) | | | | QColor | paper () const | | | | void | setFont (const QFont &font) | | | | QFont | font () const | | | | void | setEolFill (bool fill) | | | | bool | eolFill () const | | | | void | setTextCase (TextCase text_case) | | | | TextCase | textCase () const | | | | void | setVisible (bool visible) | | | | bool | visible () const | | | | void | setChangeable (bool changeable) | | | | bool | changeable () const | | | | void | setHotspot (bool hotspot) | | | | bool | hotspot () const | | | | void | refresh () | | |

Detailed Description

The QsciStyle class encapsulates all the attributes of a style.

Each character of a document has an associated style which determines how the character is displayed, e.g. its font and color. A style is identified by a number. Lexers define styles for each of the language's features so that they are displayed differently. Some style numbers have hard-coded meanings, e.g. the style used for call tips.

Member Enumeration Documentation

TextCase

| enum QsciStyle::TextCase |

This enum defines the different ways the displayed case of the text can be changed.

Enumerator
OriginalCase

The text is displayed as its original case.

| | UpperCase |

The text is displayed as upper case.

| | LowerCase |

The text is displayed as lower case.

|

Constructor & Destructor Documentation

QsciStyle() [1/2]

| QsciStyle::QsciStyle | ( | int | style = -1 | ) | |

Constructs a QsciStyle instance for style number style. If style is negative then a new style number is automatically allocated if possible. If it is not possible then style() will return a negative value.

See alsostyle()

QsciStyle() [2/2]

| QsciStyle::QsciStyle | ( | int | style, | | | | const QString & | description, | | | | const QColor & | color, | | | | const QColor & | paper, | | | | const QFont & | font, | | | | bool | eolFill = false | | | ) | | |

Constructs a QsciStyle instance for style number style. If style is negative then a new style number is automatically allocated if possible. If it is not possible then style() will return a negative value. The styles description, color, paper color, font and end-of-line fill are set to description, color, paper, font and eolFill respectively.

See alsostyle()

Member Function Documentation

setStyle()

|

| void QsciStyle::setStyle | ( | int | style | ) | |

| inline |

The style's number is set to style.

See alsostyle()

style()

|

| int QsciStyle::style | ( | | ) | const |

| inline |

Returns the number of the style. This will be negative if the style is invalid.

See alsosetStyle()

setDescription()

|

| void QsciStyle::setDescription | ( | const QString & | description | ) | |

| inline |

The style's description is set to description.

See alsodescription()

description()

|

| QString QsciStyle::description | ( | | ) | const |

| inline |

Returns the style's description.

See alsosetDescription()

setColor()

| void QsciStyle::setColor | ( | const QColor & | color | ) | |

The style's foreground color is set to color. The default is taken from the application's default palette.

See alsocolor()

color()

|

| QColor QsciStyle::color | ( | | ) | const |

| inline |

Returns the style's foreground color.

See alsosetColor()

setPaper()

| void QsciStyle::setPaper | ( | const QColor & | paper | ) | |

The style's background color is set to paper. The default is taken from the application's default palette.

See alsopaper()

paper()

|

| QColor QsciStyle::paper | ( | | ) | const |

| inline |

Returns the style's background color.

See alsosetPaper()

setFont()

| void QsciStyle::setFont | ( | const QFont & | font | ) | |

The style's font is set to font. The default is the application's default font.

See alsofont()

font()

|

| QFont QsciStyle::font | ( | | ) | const |

| inline |

Returns the style's font.

See alsosetFont()

setEolFill()

| void QsciStyle::setEolFill | ( | bool | fill | ) | |

The style's end-of-line fill is set to fill. The default is false.

See alsoeolFill()

eolFill()

|

| bool QsciStyle::eolFill | ( | | ) | const |

| inline |

Returns the style's end-of-line fill.

See alsosetEolFill()

setTextCase()

| void QsciStyle::setTextCase | ( | TextCase | text_case | ) | |

The style's text case is set to text_case. The default is OriginalCase.

See alsotextCase()

textCase()

|

| TextCase QsciStyle::textCase | ( | | ) | const |

| inline |

Returns the style's text case.

See alsosetTextCase()

setVisible()

| void QsciStyle::setVisible | ( | bool | visible | ) | |

The style's visibility is set to visible. The default is true.

See alsovisible()

visible()

|

| bool QsciStyle::visible | ( | | ) | const |

| inline |

Returns the style's visibility.

See alsosetVisible()

setChangeable()

| void QsciStyle::setChangeable | ( | bool | changeable | ) | |

The style's changeability is set to changeable. The default is true.

See alsochangeable()

changeable()

|

| bool QsciStyle::changeable | ( | | ) | const |

| inline |

Returns the style's changeability.

See alsosetChangeable()

setHotspot()

| void QsciStyle::setHotspot | ( | bool | hotspot | ) | |

The style's sensitivity to mouse clicks is set to hotspot. The default is false.

See alsohotspot()

hotspot()

|

| bool QsciStyle::hotspot | ( | | ) | const |

| inline |

Returns the style's sensitivity to mouse clicks.

See alsosetHotspot()


Generated by 1.8.20