|
WSF
|
syntax-highlights a WSF file. More...
#include <WsfStyler.hpp>
Classes | |
| struct | StyleRequest |
Public Member Functions | |
| WsfStyler () | |
| void | LoadSettings () |
| void | UpdateStyle (const StyleRequest &aRequest) |
| Update the syntax highlighting for the text editor. | |
| void | UpdateScriptStyle (const StyleRequest &aRequest) |
| void | UpdateScriptStyle (const StyleRequest &aRequest, WsfScriptInfo *aScriptPtr) |
| std::vector< std::pair< int, int > > | FoldDocument (ParseResults *aResultsPtr, TextSource *aSourcePtr) |
Static Public Member Functions | |
| static int | rgb (int r, int g, int b) |
| static int | rgb (const QColor &aColor) |
| static void | ApplyEditorStyleSettings (QPlainTextEdit *aEditorPtr, int aFontSizeOverride=0) |
Protected Member Functions | |
| TextType | GetTextTypeFromNode (const WsfParseNode *aNodePtr) |
Protected Attributes | |
| std::unordered_map< const char *, TextType > | mNodeTypeToTextType |
| std::unordered_map< TextType, QTextCharFormat, ut::EnumHash< TextType > > | mTextFormats |
| QTextCharFormat | mErrorUnderlineFmt |
| QTextCharFormat | mWarningUnderlineFmt |
syntax-highlights a WSF file.
| anonymous enum |
| anonymous enum |
| wizard::WsfStyler::WsfStyler | ( | ) |
References wizard::EditorPrefObject::Changed(), LoadSettings(), mErrorUnderlineFmt, and mWarningUnderlineFmt.
|
static |
References settings().
Referenced by wizard::Editor::LoadSettings().
| std::vector< std::pair< int, int > > wizard::WsfStyler::FoldDocument | ( | ParseResults * | aResultsPtr, |
| TextSource * | aSourcePtr ) |
|
protected |
References wizard::Block_Keyword, WsfParseNode::cBLOCK_END, WsfParseNode::cBLOCK_NODE, WsfParseNode::cBLOCK_START, WsfParseNode::cLAZY_TYPE_REFERENCE_NODE, WsfParseNode::cLAZY_TYPENAME_NODE, WsfParseNode::cNAMED_NODE, wizard::Command, WsfParseNode::cTYPE_NAME_NODE, WsfParseNode::cTYPE_REFERENCE_NODE, WsfParseNode::GetFlags(), WsfParseNode::GetParent(), wizard::Keyword, WsfParseNode::mFlags, mNodeTypeToTextType, WsfParseNode::mType, WsfParseNode::mValue, wizard::Name, wizard::None, WsfParseNode::Previous(), wizard::Type, and wizard::User_Input.
Referenced by UpdateStyle().
| void wizard::WsfStyler::LoadSettings | ( | ) |
References wizard::EditorPrefObject::GetStyles(), and mTextFormats.
Referenced by WsfStyler().
|
inlinestatic |
|
inlinestatic |
| void wizard::WsfStyler::UpdateScriptStyle | ( | const StyleRequest & | aRequest | ) |
References wizard::WsfScriptData::GetLocationMap(), wizard::WsfStyler::StyleRequest::GetRangeToStyle(), wizard::WsfStyler::StyleRequest::mPositionOffset, wizard::WsfScriptInfo::mRange, wizard::WsfStyler::StyleRequest::mResultsPtr, wizard::ParseResultsTiny::mScriptDataPtr, wizard::WsfStyler::StyleRequest::mSourcePtr, and UpdateScriptStyle().
Referenced by UpdateScriptStyle(), and UpdateStyle().
| void wizard::WsfStyler::UpdateScriptStyle | ( | const StyleRequest & | aRequest, |
| WsfScriptInfo * | aScriptPtr ) |
References begin(), wizard::WsfScriptToken::cCOMMENT, wizard::WsfScriptToken::cIDENTIFIER, wizard::WsfScriptToken::cKEYWORD, wizard::WsfScriptToken::cLOCAL_METHOD, wizard::WsfScriptToken::cLOCAL_VARIABLE, wizard::WsfScriptToken::cMETHOD, wizard::WsfScriptToken::cNUMBER, wizard::WsfScriptToken::cOPERATOR, wizard::WsfScriptToken::cPARAMETER, wizard::WsfScriptToken::cSTATIC_METHOD, wizard::WsfScriptToken::cSTRING, end(), wizard::TextStyler::MergeTextFormat(), wizard::WsfScriptInfo::mErrors, wizard::WsfStyler::StyleRequest::mPositionOffset, wizard::WsfScriptInfo::mRange, wizard::WsfStyler::StyleRequest::mShowScriptErrors, wizard::WsfStyler::StyleRequest::mStylerInterface, mTextFormats, wizard::WsfScriptInfo::mTokens, wizard::Script_Comment, wizard::Script_Keyword, wizard::Script_Local_Method, wizard::Script_Local_Variable, wizard::Script_Method, wizard::Script_None, wizard::Script_Number, wizard::Script_Operator, wizard::Script_Parameter, wizard::Script_Quoted, wizard::Script_Static_Method, wizard::Script_Type, and wizard::TextStyler::SetTextFormat().
| void wizard::WsfStyler::UpdateStyle | ( | const StyleRequest & | aRequest | ) |
Update the syntax highlighting for the text editor.
References begin(), wizard::ParseResults::cERROR_BIT, WsfParseNode::cERROR_INCOMPLETE, WsfParseSourceInclude::cINCLUDE_COMMAND, wizard::Comment, WsfParseSourceInclude::cPREPROCESSOR_DEFINE, WsfParseSourceInclude::cPREPROCESSOR_VARIABLE, WsfParseNode::cSCRIPT_MASK, wizard::ParseResults::cWARNING_BIT, end(), wizard::ParseResults::FindSourceData(), wizard::ParseResults::GetFileNotifications(), WsfParseNode::GetFlags(), WsfParseNode::GetParent(), wizard::WsfStyler::StyleRequest::GetRangeToStyle(), wizard::TextSource::GetSource(), GetTextTypeFromNode(), wizard::Include, wizard::WsfStyler::StyleRequest::mControl, WsfParseSourceInclude::mEntries, wizard::TextStyler::MergeTextFormat(), mErrorUnderlineFmt, wizard::ParseResults::mFileTransitionNodes, WsfParseNode::mFlags, wizard::WsfStyler::StyleRequest::mPositionOffset, wizard::WsfStyler::StyleRequest::mResultsPtr, wizard::WsfStyler::StyleRequest::mShowNotifications, wizard::WsfStyler::StyleRequest::mSourcePtr, wizard::WsfStyler::StyleRequest::mStyleIfHidden, wizard::WsfStyler::StyleRequest::mStylerInterface, mTextFormats, WsfParseNode::mValue, mWarningUnderlineFmt, WsfParseNode::Next(), wizard::Preprocessor, wizard::TextStyler::SetTextFormat(), wizard::Unmatched_Block, and UpdateScriptStyle().
|
protected |
Referenced by UpdateStyle(), and WsfStyler().
|
protected |
Referenced by GetTextTypeFromNode().
|
protected |
Referenced by LoadSettings(), UpdateScriptStyle(), and UpdateStyle().
|
protected |
Referenced by UpdateStyle(), and WsfStyler().