rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

List of all members | Public Member Functions
IlvCodeEditor::StyleSheet Class Reference

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>

Public Member Functions

 StyleSheet (IlvDisplay *display, IlBoolean syntaxHighLight=IlTrue, IlBoolean colorizeErrorLine=IlTrue, IlvTextField *miniBuff=0)
 Constructor. More...
 
 StyleSheet (const StyleSheet &original)
 Copy contructor. More...
 
virtual ~StyleSheet ()
 Destructor.
 
void add (int id, const Style &style)
 Add a style to the sheet. More...
 
IlBoolean exist (int id) const
 Does a style have a given identifier. More...
 
const Style & get (int id) const
 Retrieve a style using its identifier. More...
 
Style & get (int id)
 Retrieve a style using its identifier. More...
 
Decorator * getDecorator (int id)
 Retrieves the decorator from a style identifier. More...
 
void insertStyle (int id, Style style)
 Add a style to the style sheet. More...
 
int operator= (const StyleSheet &orig)
 Assignment operator. More...
 

Detailed Description

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

Constructor & Destructor Documentation

IlvCodeEditor::StyleSheet::StyleSheet ( IlvDisplay display,
IlBoolean  syntaxHighLight = IlTrue,
IlBoolean  colorizeErrorLine = IlTrue,
IlvTextField miniBuff = 0 
)

Constructor.

Parameters
displayThe display to use
syntaxHighlightShould syntax be highlighted.
colorizeErrorLineShould line in error be colorized.
miniBuffThe textfield to print extended command texts.

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 IlvCodeEditor::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.
IlvCodeEditor::StyleSheet::StyleSheet ( const StyleSheet original)

Copy contructor.

Parameters
originalThe style sheet to duplicate.

This is a deep copy: the styles are also duplicated using their copy constructor.

Member Function Documentation

void IlvCodeEditor::StyleSheet::add ( int  id,
const Style &  style 
)

Add a style to the sheet.

Parameters
idThe style identifier
styleThe style to add.
See Also
insertStyle()
IlBoolean IlvCodeEditor::StyleSheet::exist ( int  id) const

Does a style have a given identifier.

Parameters
idThe identifier of the style to locate.
Returns
IlTrue if the sheet exists, IlFalse> otherwise.
const Style& IlvCodeEditor::StyleSheet::get ( int  id) const

Retrieve a style using its identifier.

Parameters
idThe style identifier.
Returns
The style whose identifier was given.
Style& IlvCodeEditor::StyleSheet::get ( int  id)

Retrieve a style using its identifier.

Parameters
idThe style identifier.
Returns
The style whose identifier was given.
Decorator* IlvCodeEditor::StyleSheet::getDecorator ( int  id)

Retrieves the decorator from a style identifier.

Parameters
idThe style identifier.
Returns
The style decorator or null.
void IlvCodeEditor::StyleSheet::insertStyle ( int  id,
Style  style 
)

Add a style to the style sheet.

Parameters
idThe added style identifier.
styleThe style to add in the style sheet.
int IlvCodeEditor::StyleSheet::operator= ( const StyleSheet orig)

Assignment operator.

Parameters
originalThe style sheet to assign.
Returns
Always 1 The caller is cleared and a deep copy of the argument is made.

© Copyright 2012, 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.