A style sheet is a container with several styles that holds palettes for the decorations and options like syntax highlighting, auto-indent mode, brace highlighting, tabulations shown has blank characters.
More...
#include <ilviews/gadgets/codeedit.h>
A style sheet is a container with several styles that holds palettes for the decorations and options like syntax highlighting, auto-indent mode, brace highlighting, tabulations shown has blank characters.
Library: ilvadvgdt
§ StyleSheet() [1/2]
Constructor.
By default, the syntax is highlighted, the lines in error are emphasized, and there is no text field to print command texts. Upon creation an StyleSheet
uses the following default values:
-
The colors for text are:
-
Black on white for the standard text.
-
Red on white for errors.
-
White on black for selected text.
-
Black on grey for the margin.
-
The font is "monospace".
-
The indentation mode is set to automatic.
-
Tabulations are represented by space characters.
-
The tabulation size is set to
8
.
- Parameters
-
display | The display to use. |
syntaxHighlight | Should syntax be highlighted. |
colorizeErrorLine | Should line in error be colorized. |
miniBuff | The text field where to output extended command texts. |
§ StyleSheet() [2/2]
IlvCodeEditor::StyleSheet::StyleSheet |
( |
const StyleSheet & |
original | ) |
|
Copy contructor.
This is a deep copy: the styles are also duplicated using their copy constructor.
- Parameters
-
original | The style sheet to duplicate. |
§ add()
void IlvCodeEditor::StyleSheet::add |
( |
int |
id, |
|
|
const Style & |
style |
|
) |
| |
Add a style to the sheet.
- Parameters
-
id | The style identifier |
style | The style to add. |
- See also
insertStyle()
.
§ exist()
IlBoolean IlvCodeEditor::StyleSheet::exist |
( |
int |
id | ) |
const |
Does a style have a given identifier.
- Parameters
-
id | The identifier of the style to locate. |
- Returns
IlTrue
if the sheet exists, IlFalse
otherwise.
§ get() [1/2]
const Style& IlvCodeEditor::StyleSheet::get |
( |
int |
id | ) |
const |
Retrieve a style using its identifier.
- Parameters
-
- Returns
- The style whose identifier was given.
§ get() [2/2]
Style& IlvCodeEditor::StyleSheet::get |
( |
int |
id | ) |
|
Retrieve a style using its identifier.
- Parameters
-
- Returns
- The style whose identifier was given.
§ getDecorator()
Decorator* IlvCodeEditor::StyleSheet::getDecorator |
( |
int |
id | ) |
|
Retrieves the decorator from a style identifier.
- Parameters
-
- Returns
- The style decorator or null.
§ insertStyle()
void IlvCodeEditor::StyleSheet::insertStyle |
( |
int |
id, |
|
|
Style |
style |
|
) |
| |
Add a style to the style sheet.
- Parameters
-
id | The added style identifier. |
style | The style to add in the style sheet. |
§ operator=()
int IlvCodeEditor::StyleSheet::operator= |
( |
const StyleSheet & |
original | ) |
|
Assignment operator.
- Parameters
-
original | The style sheet to assign. |
- Returns
- Always
1
. The caller is cleared and a deep copy of the argument is made.
© Copyright 2017, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.