class EE::UI::Doc::SyntaxColorScheme¶
Syntax colors types accepted/used are: “normal”, “symbol”, “comment”, “keyword”, “keyword2”, “number”, “literal”, “string”, “operator”, “function”, “link”
Editor colors types accepted/used are: “background”, “text”, “caret” “selection”, “gutter_background”, “line_number”, “line_number2”, “line_highlight”, “gutter_background”, “whitespace”, “line_break_column”, “matching_bracket”, “matching_selection”, “suggestion”, “suggestion_selected”
Following the lite editor syntax colors (https://github.com/rxi/lite).
#include <syntaxcolorscheme.hpp> class SyntaxColorScheme { public: // structs struct Style; // construction SyntaxColorScheme(); SyntaxColorScheme(const std::string& name, const UnorderedMap<SyntaxStyleType, Style>& syntaxColors, const UnorderedMap<SyntaxStyleType, Style>& editorColors); // methods static SyntaxColorScheme getDefault(); static std::vector<SyntaxColorScheme> loadFromStream(IOStream& stream); static std::vector<SyntaxColorScheme> loadFromFile(const std::string& path); static std::vector<SyntaxColorScheme> loadFromMemory(const void* data, std::size_t sizeInBytes); static std::vector<SyntaxColorScheme> loadFromPack(Pack* pack, std::string filePackPath); const Style& getSyntaxStyle(const SyntaxStyleType& type) const; bool hasSyntaxStyle(const SyntaxStyleType& type) const; void setSyntaxStyles(const UnorderedMap<SyntaxStyleType, Style>& styles); void setSyntaxStyle(const SyntaxStyleType& type, const Style& style); const Style& getEditorSyntaxStyle(const SyntaxStyleType& type) const; const Color& getEditorColor(const SyntaxStyleType& type) const; void setEditorSyntaxStyles(const UnorderedMap<SyntaxStyleType, Style>& styles); void setEditorSyntaxStyle(const SyntaxStyleType& type, const Style& style); const std::string& getName() const; void setName(const std::string& name); };