Code::Blocks  SVN r11506
Public Member Functions | Private Member Functions | Private Attributes | List of all members
EditorColourSet Class Reference

#include <editorcolourset.h>

Collaboration diagram for EditorColourSet:

Public Member Functions

 EditorColourSet (const wxString &setName=COLORSET_DEFAULT)
 
 EditorColourSet (const EditorColourSet &other)
 
 ~EditorColourSet ()
 
HighlightLanguage AddHighlightLanguage (int lexer, const wxString &name)
 
HighlightLanguage GetHighlightLanguage (int lexer)
 
HighlightLanguage GetHighlightLanguage (const wxString &name)
 
wxArrayString GetAllHighlightLanguages ()
 
void AddOption (HighlightLanguage lang, const wxString &name, int value, wxColour fore=wxNullColour, wxColour back=wxNullColour, bool bold=false, bool italics=false, bool underlined=false, bool isStyle=true)
 
bool AddOption (HighlightLanguage lang, OptionColour *option, bool checkIfExists=true)
 
OptionColourGetOptionByName (HighlightLanguage lang, const wxString &name)
 
OptionColourGetOptionByValue (HighlightLanguage lang, int value)
 
OptionColourGetOptionByIndex (HighlightLanguage lang, int index)
 
void UpdateOptionsWithSameName (HighlightLanguage lang, OptionColour *base)
 
int GetOptionCount (HighlightLanguage lang)
 
HighlightLanguage GetLanguageForFilename (const wxString &filename)
 
wxString GetLanguageName (HighlightLanguage lang)
 
wxString GetName ()
 
void SetName (const wxString &name)
 
HighlightLanguage Apply (cbEditor *editor, HighlightLanguage lang, bool colourise)
 
void Apply (HighlightLanguage lang, cbStyledTextCtrl *control, bool isC, bool colourise)
 
void Save ()
 
void Reset (HighlightLanguage lang)
 
wxStringGetKeywords (HighlightLanguage lang, int idx)
 
void SetKeywords (HighlightLanguage lang, int idx, const wxString &keywords)
 
const wxArrayStringGetFileMasks (HighlightLanguage lang)
 
void SetFileMasks (HighlightLanguage lang, const wxString &masks, const wxString &=_(","))
 
wxString GetSampleCode (HighlightLanguage lang, int *breakLine, int *debugLine, int *errorLine)
 
void SetSampleCode (HighlightLanguage lang, const wxString &sample, int breakLine, int debugLine, int errorLine)
 
CommentToken GetCommentToken (HighlightLanguage lang)
 
void SetCommentToken (HighlightLanguage lang, CommentToken token)
 
bool GetCaseSensitivity (HighlightLanguage lang)
 
void SetCaseSensitivity (HighlightLanguage lang, bool CaseSensitive)
 
void SetStringLexerStyles (HighlightLanguage lang, const std::set< int > &styles)
 
void SetCommentLexerStyles (HighlightLanguage lang, const std::set< int > &styles)
 
void SetCharacterLexerStyles (HighlightLanguage lang, const std::set< int > &styles)
 
void SetPreprocessorLexerStyles (HighlightLanguage lang, const std::set< int > &styles)
 

Private Member Functions

void DoApplyStyle (cbStyledTextCtrl *control, int value, OptionColour *option)
 
void LoadAvailableSets ()
 
void Load ()
 
void ClearAllOptionColours ()
 
OptionColourGetDefaultOption (HighlightLanguage lang)
 

Private Attributes

wxString m_Name
 
OptionSetsMap m_Sets
 
wxString m_PlainTextLexerID
 Stores the id of the plain text file lexer (see lexer_plain.xml). More...
 

Detailed Description

Definition at line 79 of file editorcolourset.h.

Constructor & Destructor Documentation

◆ EditorColourSet() [1/2]

EditorColourSet::EditorColourSet ( const wxString setName = COLORSET_DEFAULT)

◆ EditorColourSet() [2/2]

EditorColourSet::EditorColourSet ( const EditorColourSet other)

◆ ~EditorColourSet()

EditorColourSet::~EditorColourSet ( )

Definition at line 79 of file editorcolourset.cpp.

References ClearAllOptionColours().

Member Function Documentation

◆ AddHighlightLanguage()

HighlightLanguage EditorColourSet::AddHighlightLanguage ( int  lexer,
const wxString name 
)

◆ AddOption() [1/2]

void EditorColourSet::AddOption ( HighlightLanguage  lang,
const wxString name,
int  value,
wxColour  fore = wxNullColour,
wxColour  back = wxNullColour,
bool  bold = false,
bool  italics = false,
bool  underlined = false,
bool  isStyle = true 
)

◆ AddOption() [2/2]

bool EditorColourSet::AddOption ( HighlightLanguage  lang,
OptionColour option,
bool  checkIfExists = true 
)

◆ Apply() [1/2]

HighlightLanguage EditorColourSet::Apply ( cbEditor editor,
HighlightLanguage  lang,
bool  colourise 
)

◆ Apply() [2/2]

void EditorColourSet::Apply ( HighlightLanguage  lang,
cbStyledTextCtrl control,
bool  isC,
bool  colourise 
)

◆ ClearAllOptionColours()

void EditorColourSet::ClearAllOptionColours ( )
private

Definition at line 84 of file editorcolourset.cpp.

References m_Sets.

Referenced by Reset(), and ~EditorColourSet().

◆ DoApplyStyle()

void EditorColourSet::DoApplyStyle ( cbStyledTextCtrl control,
int  value,
OptionColour option 
)
private

◆ GetAllHighlightLanguages()

wxArrayString EditorColourSet::GetAllHighlightLanguages ( )

◆ GetCaseSensitivity()

bool EditorColourSet::GetCaseSensitivity ( HighlightLanguage  lang)

Definition at line 971 of file editorcolourset.cpp.

References HL_NONE, m_PlainTextLexerID, and m_Sets.

◆ GetCommentToken()

CommentToken EditorColourSet::GetCommentToken ( HighlightLanguage  lang)

◆ GetDefaultOption()

OptionColour * EditorColourSet::GetDefaultOption ( HighlightLanguage  lang)
private

◆ GetFileMasks()

const wxArrayString & EditorColourSet::GetFileMasks ( HighlightLanguage  lang)

Definition at line 877 of file editorcolourset.cpp.

References m_Sets.

Referenced by EditorConfigurationDlg::OnEditFilemasks().

◆ GetHighlightLanguage() [1/2]

HighlightLanguage EditorColourSet::GetHighlightLanguage ( int  lexer)

◆ GetHighlightLanguage() [2/2]

HighlightLanguage EditorColourSet::GetHighlightLanguage ( const wxString name)

Definition at line 218 of file editorcolourset.cpp.

References HL_NONE, and m_Sets.

◆ GetKeywords()

wxString & EditorColourSet::GetKeywords ( HighlightLanguage  lang,
int  idx 
)

◆ GetLanguageForFilename()

HighlightLanguage EditorColourSet::GetLanguageForFilename ( const wxString filename)

◆ GetLanguageName()

wxString EditorColourSet::GetLanguageName ( HighlightLanguage  lang)

◆ GetName()

wxString EditorColourSet::GetName ( )
inline

◆ GetOptionByIndex()

OptionColour * EditorColourSet::GetOptionByIndex ( HighlightLanguage  lang,
int  index 
)

◆ GetOptionByName()

OptionColour * EditorColourSet::GetOptionByName ( HighlightLanguage  lang,
const wxString name 
)

◆ GetOptionByValue()

OptionColour * EditorColourSet::GetOptionByValue ( HighlightLanguage  lang,
int  value 
)

Definition at line 357 of file editorcolourset.cpp.

References HL_NONE, OptionSet::m_Colours, m_PlainTextLexerID, m_Sets, and OptionColour::value.

Referenced by AddOption().

◆ GetOptionCount()

int EditorColourSet::GetOptionCount ( HighlightLanguage  lang)

◆ GetSampleCode()

wxString EditorColourSet::GetSampleCode ( HighlightLanguage  lang,
int *  breakLine,
int *  debugLine,
int *  errorLine 
)

◆ Load()

void EditorColourSet::Load ( )
private

◆ LoadAvailableSets()

void EditorColourSet::LoadAvailableSets ( )
private

◆ Reset()

void EditorColourSet::Reset ( HighlightLanguage  lang)

◆ Save()

void EditorColourSet::Save ( )

◆ SetCaseSensitivity()

void EditorColourSet::SetCaseSensitivity ( HighlightLanguage  lang,
bool  CaseSensitive 
)

Definition at line 963 of file editorcolourset.cpp.

References HL_NONE, m_PlainTextLexerID, and m_Sets.

Referenced by EditorLexerLoader::DoLangAttributes().

◆ SetCharacterLexerStyles()

void EditorColourSet::SetCharacterLexerStyles ( HighlightLanguage  lang,
const std::set< int > &  styles 
)

◆ SetCommentLexerStyles()

void EditorColourSet::SetCommentLexerStyles ( HighlightLanguage  lang,
const std::set< int > &  styles 
)

◆ SetCommentToken()

void EditorColourSet::SetCommentToken ( HighlightLanguage  lang,
CommentToken  token 
)

Definition at line 936 of file editorcolourset.cpp.

References HL_NONE, m_PlainTextLexerID, and m_Sets.

Referenced by EditorLexerLoader::DoLangAttributes().

◆ SetFileMasks()

void EditorColourSet::SetFileMasks ( HighlightLanguage  lang,
const wxString masks,
const wxString separator = _(",") 
)

◆ SetKeywords()

void EditorColourSet::SetKeywords ( HighlightLanguage  lang,
int  idx,
const wxString keywords 
)

◆ SetName()

void EditorColourSet::SetName ( const wxString name)
inline

◆ SetPreprocessorLexerStyles()

void EditorColourSet::SetPreprocessorLexerStyles ( HighlightLanguage  lang,
const std::set< int > &  styles 
)

◆ SetSampleCode()

void EditorColourSet::SetSampleCode ( HighlightLanguage  lang,
const wxString sample,
int  breakLine,
int  debugLine,
int  errorLine 
)

◆ SetStringLexerStyles()

void EditorColourSet::SetStringLexerStyles ( HighlightLanguage  lang,
const std::set< int > &  styles 
)

◆ UpdateOptionsWithSameName()

void EditorColourSet::UpdateOptionsWithSameName ( HighlightLanguage  lang,
OptionColour base 
)

Member Data Documentation

◆ m_Name

wxString EditorColourSet::m_Name
private

Definition at line 147 of file editorcolourset.h.

Referenced by EditorColourSet(), Load(), Reset(), and Save().

◆ m_PlainTextLexerID

wxString EditorColourSet::m_PlainTextLexerID
private

◆ m_Sets

OptionSetsMap EditorColourSet::m_Sets
private

The documentation for this class was generated from the following files: