Example #1
0
        /// <summary>
        /// Gets colors, bold, but not font properties.
        /// </summary>
        public TStyles(AuScintilla sci)
        {
            BackgroundColor = ColorInt.SwapRB(sci.Call(SCI_STYLEGETBACK));

            TStyle _Get(EToken tok)
            {
                int  color = ColorInt.SwapRB(sci.Call(SCI_STYLEGETFORE, (int)tok));
                bool bold  = 0 != sci.Call(SCI_STYLEGETBOLD, (int)tok);

                return(new TStyle(color, bold));
            }

            Comment      = _Get(EToken.Comment);
            String       = _Get(EToken.String);
            StringEscape = _Get(EToken.StringEscape);
            Number       = _Get(EToken.Number);
            Punctuation  = _Get(EToken.Punctuation);
            Operator     = _Get(EToken.Operator);
            Keyword      = _Get(EToken.Keyword);
            Namespace    = _Get(EToken.Namespace);
            Type         = _Get(EToken.Type);
            Function     = _Get(EToken.Function);
            LocalVar     = _Get(EToken.LocalVar);
            Parameter    = _Get(EToken.Parameter);
            Field        = _Get(EToken.Field);
            Constant     = _Get(EToken.Constant);
            EnumMember   = _Get(EToken.EnumMember);
            Label        = _Get(EToken.Label);
            Preprocessor = _Get(EToken.Preprocessor);
            Excluded     = _Get(EToken.Excluded);
            XmlDocText   = _Get(EToken.XmlDocText);
            XmlDocTag    = _Get(EToken.XmlDocTag);

            LineNumber = _Get(EToken.LineNumber);
        }