NumeRe v1.1.4
NumeRe: Framework für Numerische Rechnungen
SyntaxStyles Struct Reference

This structure contains the necessary data to completely define a style for a distinctive syntax element. More...

#include <Options.h>

Collaboration diagram for SyntaxStyles:

Public Member Functions

wxColour StrToColorNew (const wxString &colorstring) const
 Convert a colorstring (r:g:b) into an actual color instance. More...
 
wxColour StrToColorOld (const wxString &colorstring) const
 Convert a colorstring of the old representation (rrrgggbbb) into an actual color instance. More...
 
void importNew (const wxString &styleDef)
 Imports a new syntax style string (r:g:b-r:g:b-BIUD) and converts it into actual usable variables. More...
 
void importOld (const wxString &styleDef)
 Imports an old syntax style string (rrrgggbbbrrrgggbbbBIUD) and converts it into actual usable variables. More...
 
std::string to_string () const
 Transforms the internal data into a string style representation according the following scheme: r:g:b-r:g:b-BIUD. More...
 
 SyntaxStyles ()
 Default constructor. Creates a "style- less" style. More...
 
 SyntaxStyles (const wxString &styleDef)
 Generic constructor. Creates an instance of this class by importing a style string in new or old fashion. More...
 

Public Attributes

wxColour foreground
 
wxColour background
 
bool bold
 
bool italics
 
bool underline
 
bool defaultbackground
 

Detailed Description

This structure contains the necessary data to completely define a style for a distinctive syntax element.

Definition at line 26 of file Options.h.

Constructor & Destructor Documentation

◆ SyntaxStyles() [1/2]

SyntaxStyles::SyntaxStyles ( )
inline

Default constructor. Creates a "style- less" style.

Definition at line 149 of file Options.h.

◆ SyntaxStyles() [2/2]

SyntaxStyles::SyntaxStyles ( const wxString &  styleDef)
inline

Generic constructor. Creates an instance of this class by importing a style string in new or old fashion.

Parameters
styleDefconst wxString&

Definition at line 159 of file Options.h.

References importNew(), and importOld().

Here is the call graph for this function:

Member Function Documentation

◆ importNew()

void SyntaxStyles::importNew ( const wxString &  styleDef)
inline

Imports a new syntax style string (r:g:b-r:g:b-BIUD) and converts it into actual usable variables.

Parameters
styleDefconst wxString&
Returns
void

Definition at line 75 of file Options.h.

References background, bold, defaultbackground, foreground, italics, StrToColorNew(), and underline.

Referenced by SyntaxStyles().

Here is the call graph for this function:

◆ importOld()

void SyntaxStyles::importOld ( const wxString &  styleDef)
inline

Imports an old syntax style string (rrrgggbbbrrrgggbbbBIUD) and converts it into actual usable variables.

Parameters
styleDefconst wxString&
Returns
void

Definition at line 97 of file Options.h.

References background, bold, defaultbackground, foreground, italics, StrToColorOld(), and underline.

Referenced by SyntaxStyles().

Here is the call graph for this function:

◆ StrToColorNew()

wxColour SyntaxStyles::StrToColorNew ( const wxString &  colorstring) const
inline

Convert a colorstring (r:g:b) into an actual color instance.

Parameters
colorstringconst wxString&
Returns
wxColour

Definition at line 43 of file Options.h.

References StrToInt().

Referenced by importNew().

Here is the call graph for this function:

◆ StrToColorOld()

wxColour SyntaxStyles::StrToColorOld ( const wxString &  colorstring) const
inline

Convert a colorstring of the old representation (rrrgggbbb) into an actual color instance.

Parameters
colorstringconst wxString&
Returns
wxColour

Definition at line 58 of file Options.h.

References StrToInt().

Referenced by importOld().

Here is the call graph for this function:

◆ to_string()

std::string SyntaxStyles::to_string ( ) const
inline

Transforms the internal data into a string style representation according the following scheme: r:g:b-r:g:b-BIUD.

Returns
std::string

Definition at line 131 of file Options.h.

References background, bold, defaultbackground, foreground, italics, toString(), and underline.

Referenced by Options::readColoursFromConfig(), and Options::SetSyntaxStyle().

Here is the call graph for this function:

Member Data Documentation

◆ background

◆ bold

◆ defaultbackground

◆ foreground

◆ italics

◆ underline


The documentation for this struct was generated from the following file: