/// <summary>
        /// Changes the current <see cref="HighlightMode">mode</see> for text being written.
        /// </summary>
        /// <param name="mode"></param>
        public void ChangeHighlightMode(HighlightMode mode)
        {
            if (this.m_hasStartedMode)
            {
                if (mode != this.m_mode)
                {
                    if (this.m_mode != HighlightMode.Normal)
                    {
                        this.WriteModeEnd();
                    }

                    if (mode != HighlightMode.Normal)
                    {
                        this.WriteModeStart(mode);
                    }
                }

                this.m_mode = mode;
            }
            else
            {
                this.m_mode           = mode;
                this.m_hasStartedMode = true;

                if (mode != HighlightMode.Normal)
                {
                    this.WriteModeStart(mode);
                }
            }
        }
Exemple #2
0
    public void DeactivateOutlines(Tile t, bool tilesBecameNotClickable = true, HighlightMode highlightModeAfter = HighlightMode.NoHighlight)
    {
        if (!(t is Free) || (t is Water))
        {
            return;
        }

        Free tile = t as Free;

        tile.highlighted = false;

        tile.highlightCase.enabled = false;
        tile.ropeUp.enabled        = false;
        tile.ropeRight.enabled     = false;
        tile.ropeDown.enabled      = false;
        tile.ropeLeft.enabled      = false;

        if (tilesBecameNotClickable)
        {
            tile.isClickable = false;
        }

        switch (highlightModeAfter)
        {
        case HighlightMode.NoHighlight:
            break;

        default:
            ActivateOutlines(new List <Tile>()
            {
                t
            }, highlightModeAfter);
            break;
        }
    }
Exemple #3
0
 /// <summary>
 /// Initializes a new instance of a <see cref="Wilco.Web.SyntaxHighlighting.SyntaxHighlighter"/> class.
 /// </summary>
 public SyntaxHighlighter()
     : base(HtmlTextWriterTag.Div)
 {
     this.mode = HighlightMode.Inline;
     this.codeLayoutTemplate = new DefaultCodeLayoutTemplate();
     this.lineNumberTemplate = new DefaultLineNumberTemplate();
     this.sourceLineTemplate = new DefaultSourceLineTemplate();
 }
Exemple #4
0
 static Group()
 {
     m_builtinHighlightModes = new Dictionary <string, HighlightMode>();
     for (HighlightMode mode = HighlightMode.Comment; mode <= HighlightMode.Todo; mode++)
     {
         m_builtinHighlightModes[mode.ToString().ToUpperInvariant()] = mode;
     }
 }
Exemple #5
0
        internal void SetHighlightModeInChildren()
        {
            if (0 == this.m_items.Count)
            {
                return;
            }

            HighlightMode mode = this.HighlightMode;

            this.m_items.ForEach(i => i.HighlightMode = mode);
            this.m_syntaxDefinition.PossibleHighlightModes.Add(mode);
        }
Exemple #6
0
        internal Group(string name, SyntaxDefinition syntaxDefinition)
        {
            this.m_name = name;
            this.m_syntaxDefinition = syntaxDefinition;
            this.m_items = new List<SyntaxItem>();

            if (m_builtinHighlightModes.ContainsKey(name)) {
                this.m_highlightMode = m_builtinHighlightModes[name];
            } else {
                this.m_highlightMode = HighlightMode.Normal;
            }
        }
Exemple #7
0
        Graphing.ColorMap drag_liftMap = new Graphing.ColorMap(v => new Color(Math.Max(1 - (v - 0.5f) * 2, 0), Math.Max((v - 0.5f) * 2, 0), 0, Math.Abs(1 - v * 2)));//new Color(0, 1, 0, Math.Max((v - 0.5f) * 2, 0)) + new Color(1, 0, 0, Math.Max(1 - (v - 0.5f) * 2, 0)));

        public void UpdateHighlighting(HighlightMode highlightMode, CelestialBody body, float altitude, float speed, float aoa)
        {
            this.highlightMode = highlightMode;
            this.body          = body;
            this.altitude      = altitude;
            this.speed         = speed;
            this.aoa           = aoa;

            ClearPartHighlighting();

            if (highlightMode == HighlightMode.Off)
            {
                return;
            }

            GenerateHighlightingData(EditorLogic.fetch.ship, body, altitude, speed, aoa);

            int   count = highlightingData.Length;
            float min, max;
            Func <PartAeroData, float> highlightValueFunc;

            switch (highlightMode)
            {
            case HighlightMode.Lift:
                highlightValueFunc = (p) => p.lift;
                break;

            case HighlightMode.DragOverMass:
                highlightValueFunc = (p) => p.drag / p.mass;
                break;

            case HighlightMode.DragOverLift:
                highlightValueFunc = (p) => p.lift / p.drag;
                break;

            case HighlightMode.Drag:
            default:
                highlightValueFunc = (p) => p.drag;
                break;
            }
            float[] highlightingDataResolved = highlightingData.Select(highlightValueFunc).ToArray();
            min = highlightingDataResolved.Where(f => !float.IsNaN(f) && !float.IsInfinity(f)).Min();
            max = highlightingDataResolved.Where(f => !float.IsNaN(f) && !float.IsInfinity(f)).Max();
            for (int i = 0; i < count; i++)
            {
                float value = (highlightingDataResolved[i] - min) / (max - min);
                HighlightPart(EditorLogic.fetch.ship.parts[i], value);
            }
        }
Exemple #8
0
        internal Group(string name, SyntaxDefinition syntaxDefinition)
        {
            this.m_name             = name;
            this.m_syntaxDefinition = syntaxDefinition;
            this.m_items            = new List <SyntaxItem>();

            if (m_builtinHighlightModes.ContainsKey(name))
            {
                this.m_highlightMode = m_builtinHighlightModes[name];
            }
            else
            {
                this.m_highlightMode = HighlightMode.Normal;
            }
        }
Exemple #9
0
        public void OnButtonFalse()
        {
            window.Visible = false;

            highlightMode = HighlightMode.Off;
            ClearPartHighlighting();

            if (appButton != null)
            {
                appButton.SetTexture(icon);
            }
            if (blizzyToolbarButton != null)
            {
                blizzyToolbarButton.TexturePath = iconPath_blizzy_off;
            }
        }
Exemple #10
0
        public void UpdateHighlighting(HighlightMode highlightMode, CelestialBody body, float altitude, float speed, float aoa)
        {
            this.highlightMode = highlightMode;
            this.body          = body;
            this.altitude      = altitude;
            this.speed         = speed;
            this.aoa           = aoa;

            ClearPartHighlighting();

            if (highlightMode == HighlightMode.Off)
            {
                return;
            }

            GenerateHighlightingData(EditorLogic.fetch.ship, body, altitude, speed, aoa);

            int   count = highlightingData.Length;
            float min, max;

            switch (highlightMode)
            {
            case HighlightMode.Drag:
                min = minHighlights.x;
                max = maxHighlights.x;
                for (int i = 0; i < count; i++)
                {
                    float value = (highlightingData[i].x - min) / (max - min);
                    HighlightPart(EditorLogic.fetch.ship.parts[i], value);
                }
                break;

            case HighlightMode.Lift:
                min = minHighlights.y;
                max = maxHighlights.y;
                for (int i = 0; i < count; i++)
                {
                    float value = (highlightingData[i].y - min) / (max - min);
                    HighlightPart(EditorLogic.fetch.ship.parts[i], value);
                }
                break;
            }
        }
Exemple #11
0
        static XmlFormatter()
        {
            m_xmlWriterSettings = new XmlWriterSettings();
            m_xmlWriterSettings.OmitXmlDeclaration = true;
            m_xmlWriterSettings.Indent             = false;
            m_xmlWriterSettings.CheckCharacters    = true;
            m_xmlWriterSettings.NewLineChars       = Environment.NewLine;
            m_xmlWriterSettings.ConformanceLevel   = ConformanceLevel.Auto;
            m_xmlWriterSettings.NewLineHandling    = NewLineHandling.None;

            List <string> modeNames = new List <string>(40);

            for (HighlightMode mode = HighlightMode.IrisBug; mode <= HighlightMode.Todo; mode++)
            {
                modeNames.Add(mode.ToString());
            }

            m_modeNames = modeNames.ToArray();
        }
Exemple #12
0
    public int ShowHighlight(List <Tile> tilesToHighlight, HighlightMode highlightMode, bool tilesBecameClickable = false)
    {
        /*Material highlightMat;
         *
         * switch (highlightMode)
         * {
         *  case HighlightMode.MoveHighlight:
         *      highlightMat = moveHighlightMat;
         *      break;
         *  case HighlightMode.MoveRangePreview:
         *      highlightMat = moveRangePreviewMat;
         *      break;
         *  case HighlightMode.ActionPreview:
         *      highlightMat = actionPreviewMat;
         *      break;
         *  case HighlightMode.ActionHighlight:
         *      highlightMat = actionHighlightMat;
         *      break;
         *  case HighlightMode.ExplosionPreview:
         *      highlightMat = explosionPreviewMat;
         *      break;
         *  default:
         *      highlightMat = hoverMat;
         *      break;
         * }
         *
         * foreach(Tile tile in tilesToHighlight)
         * {
         *  tile.highlighted = true;
         *  tile.rend.material = highlightMat;
         *  if (tilesBecameClickable)
         *  {
         *      tile.isClickable = true;
         *  }
         * }*/

        ActivateOutlines(tilesToHighlight, highlightMode);
        return(GenerateNewID(tilesToHighlight));
    }
Exemple #13
0
        protected virtual void BufferMoreActualText()
        {
            this.m_actualReader.MoveToContent();

            if (this.m_actualReader.NodeType == XmlNodeType.EndElement && this.m_actualReader.LocalName == "code") {
                // what this means is that we ran out of actual text. Sometimes this is because of extraneous whitespace characters in the expected text,
                // so to avoid lots of tortuous ifs, we supply an endless stream of whitespace chars from this point on
                this.m_idxActualBuffer = 0;
                this.m_actualBuffer = new string(' ', 10);
                this.m_actualBufferHasEnded = true;
                return;
            }

            if (this.m_actualReader.NodeType == XmlNodeType.Text) {
                this.m_currentLine = (this.m_actualReader as IXmlLineInfo).LineNumber;
                this.m_modeForBufferedText = HighlightMode.Normal;
                this.m_actualBuffer = this.m_actualReader.ReadString();
                this.m_idxActualBuffer = 0;
                return;
            }

            if (this.m_actualReader.IsStartElement()) {
                this.m_currentLine = (this.m_actualReader as IXmlLineInfo).LineNumber;
                this.m_modeForBufferedText = (HighlightMode) Enum.Parse(typeof (HighlightMode), this.m_actualReader.LocalName, true);
                this.m_actualBuffer = this.m_actualReader.ReadElementContentAsString();
                this.m_idxActualBuffer = 0;
                return;
            }

            string msg = StringExtensions.Fi("Unexpected node type '{0}' (local name '{1}') at line {2}",
                this.m_actualReader.NodeType, this.m_actualReader.LocalName, (this.m_actualReader as IXmlLineInfo).LineNumber);
            throw new AssertionViolationException(msg);
        }
Exemple #14
0
 public HighlightObjectEventArgs(ObjectSelection target, HighlightMode mode)
 {
     this.target = target;
     this.mode   = mode;
 }
Exemple #15
0
 /// <summary>
 /// Called when a <see cref="HighlightMode">mode</see> starts.
 /// </summary>
 /// <param name="mode"></param>
 protected override void WriteModeStart(HighlightMode mode)
 {
     this.m_writer.WriteStartElement("span");
     this.m_writer.WriteAttributeString("class", this.m_classNames[(int)mode]);
 }
Exemple #16
0
 /// <summary>
 /// Called when a <see cref="HighlightMode">mode</see> starts.
 /// </summary>
 /// <param name="mode"></param>
 protected override void WriteModeStart(HighlightMode mode)
 {
     this.m_writer.WriteStartElement("span");
     this.m_writer.WriteAttributeString("class", this.m_classNames[(int)mode]);
 }
 /// <summary>
 /// Jinxters the frobnozzle.
 /// </summary>
 public void ChangeHighlightMode(HighlightMode mode)
 {
 }
Exemple #18
0
        private void DoCheckAgainstBufferedActualText(HighlightMode expectedMode, string expectedText, ref int idxExpected)
        {
            while ((idxExpected < expectedText.Length) && (this.m_idxActualBuffer < this.m_actualBuffer.Length)) {
                if (Char.IsWhiteSpace(expectedText[idxExpected])) {
                    idxExpected++;
                    continue;
                }

                if (Char.IsWhiteSpace(CurrentActualChar)) {
                    if (this.m_actualBufferHasEnded) {
                        this.ThrowContentError(expectedText[idxExpected], ' ', expectedText, "<PREMATURE END OF ACTUAL BUFFER>");
                    }

                    this.m_idxActualBuffer++;
                    continue;
                }

                if (expectedText[idxExpected] != CurrentActualChar) {
                    this.ThrowContentError(expectedText[idxExpected], CurrentActualChar, expectedText, this.m_actualBuffer);
                }

                this.ThrowIfModesDontMatch(expectedMode, expectedText);

                idxExpected++;
                this.m_idxActualBuffer++;
            }
        }
Exemple #19
0
        private void ThrowModeError(HighlightMode expectedMode, HighlightMode actualMode, string expectedText)
        {
            string msg = StringExtensions.Fi("Error found comparing actual highlighting to expected highlighting. Expected mode '{0}' but found mode '{1}' "
                + "for text '{2}' on line '{3}' of input. Actual text is '{4}'. Good luck.", expectedMode, actualMode, expectedText,
                this.m_currentLine, this.m_actualBuffer.Substring(this.m_idxActualBuffer, this.m_actualBuffer.Length - this.m_idxActualBuffer));

            throw new Exception(msg);
        }
 static private void SetHighlightMode(string key, HighlightMode value)
 {
     EditorPrefs.SetInt(key, (int)value);
 }
 static private HighlightMode GetHighlightMode(string key, HighlightMode defaultValue)
 {
     return((HighlightMode)EditorPrefs.GetInt(key, (int)defaultValue));
 }
Exemple #22
0
 /// <summary>
 /// Called when a <see cref="HighlightMode">mode</see> starts.
 /// </summary>
 protected virtual void WriteModeStart(HighlightMode mode)
 {
     this.m_writer.WriteStartElement(m_modeNames[(int) mode]);
 }
Exemple #23
0
    public void ActivateOutlines(List <Tile> tilesToHighlight, HighlightMode highlightMode, bool tilesBecameNotClickable = true)
    {
        Color    highlightColor;
        Material highlightCaseMat, highlightCordeMat;

        switch (highlightMode)
        {
        case HighlightMode.MoveRangePreview:
            highlightColor    = moveRangePreviewColor;
            highlightCaseMat  = moveRangePreviewDecalCaseMat;
            highlightCordeMat = moveRangePreviewDecalCordeMat;
            break;

        case HighlightMode.MoveHighlight:
            highlightColor    = moveHighlightColor;
            highlightCaseMat  = moveHighlightDecalCaseMat;
            highlightCordeMat = moveHighlightDecalCordeMat;
            break;

        case HighlightMode.ActionPreview:
            highlightColor    = actionPreviewColor;
            highlightCaseMat  = actionPreviewDecalCaseMat;
            highlightCordeMat = actionPreviewDecalCordeMat;
            break;

        case HighlightMode.ActionHighlight:
            highlightColor    = actionHighlightColor;
            highlightCaseMat  = actionHighlightMDecalCaseMat;
            highlightCordeMat = actionHighlightMDecalCordeMat;
            break;

        case HighlightMode.ExplosionPreview:
            highlightColor    = explosionPreviewColor;
            highlightCaseMat  = explosionPreviewDecalCaseMat;
            highlightCordeMat = explosionPreviewDecalCordeMat;
            break;

        default:
            highlightColor    = hoverColor;
            highlightCaseMat  = hoverDecalCaseMat;
            highlightCordeMat = hoverDecalCordeMat;
            break;
        }

        Free tile;

        foreach (Tile t in tilesToHighlight)
        {
            if (!(t is Free) || (t is Water))
            {
                continue;
            }
            tile = t as Free;

            tile.highlightCase.enabled = false;
            tile.ropeUp.enabled        = false;
            tile.ropeRight.enabled     = false;
            tile.ropeDown.enabled      = false;
            tile.ropeLeft.enabled      = false;

            //Change case decal material
            tile.highlightCase.material = highlightCaseMat;

            //Change corde decal material
            tile.ropeUp.material    = highlightCordeMat;
            tile.ropeRight.material = highlightCordeMat;
            tile.ropeDown.material  = highlightCordeMat;
            tile.ropeLeft.material  = highlightCordeMat;

            //Change highlight color
            tile.highlightCase.material.SetColor("_EmissiveColor", highlightColor);
            tile.highlightCase.material.SetColor("_BaseColor", highlightColor);
            tile.ropeUp.material.SetColor("_EmissiveColor", highlightColor);
            tile.ropeUp.material.SetColor("_BaseColor", highlightColor);
            tile.ropeRight.material.SetColor("_EmissiveColor", highlightColor);
            tile.ropeRight.material.SetColor("_BaseColor", highlightColor);
            tile.ropeDown.material.SetColor("_EmissiveColor", highlightColor);
            tile.ropeDown.material.SetColor("_BaseColor", highlightColor);
            tile.ropeLeft.material.SetColor("_EmissiveColor", highlightColor);
            tile.ropeLeft.material.SetColor("_BaseColor", highlightColor);

            tile.highlighted = true;
            if (tilesBecameNotClickable)
            {
                tile.isClickable = true;
            }

            //Highlight de la case  enable
            tile.highlightCase.enabled = true;

            //Check for neighbours

            //UP
            Tile currentNeighbour = tile.neighbours.up;
            if (IsTileAvailableToHighlight(currentNeighbour))
            {
                if (tilesToHighlight.Contains(currentNeighbour))
                {
                    tile.ropeUp.enabled = false;
                }
                else
                {
                    tile.ropeUp.enabled = true;
                }
            }
            else
            {
                tile.ropeUp.enabled = true;
            }

            //RIGHT
            currentNeighbour = tile.neighbours.right;
            if (IsTileAvailableToHighlight(currentNeighbour))
            {
                if (tilesToHighlight.Contains(currentNeighbour))
                {
                    tile.ropeRight.enabled = false;
                }
                else
                {
                    tile.ropeRight.enabled = true;
                }
            }
            else
            {
                tile.ropeRight.enabled = true;
            }

            //DOWN
            currentNeighbour = tile.neighbours.down;
            if (IsTileAvailableToHighlight(currentNeighbour))
            {
                if (tilesToHighlight.Contains(currentNeighbour))
                {
                    tile.ropeDown.enabled = false;
                }
                else
                {
                    tile.ropeDown.enabled = true;
                }
            }
            else
            {
                tile.ropeDown.enabled = true;
            }

            //LEFT
            currentNeighbour = tile.neighbours.left;
            if (IsTileAvailableToHighlight(currentNeighbour))
            {
                if (tilesToHighlight.Contains(currentNeighbour))
                {
                    tile.ropeLeft.enabled = false;
                }
                else
                {
                    tile.ropeLeft.enabled = true;
                }
            }
            else
            {
                tile.ropeLeft.enabled = true;
            }
        }
    }
Exemple #24
0
        /// <summary>
        /// Start work on a chunk of text with output to a <see cref="XmlWriter"/>.
        /// </summary>
        public void Start(XmlWriter writer, Syntax syntax)
        {
            ArgumentValidator.ThrowIfNull(writer, "writer");
            ArgumentValidator.ThrowIfNull(syntax, "syntax");

            this.m_writer = writer;
            this.m_mode = HighlightMode.Unknown;
            this.m_hasStartedMode = false;
            this.m_charBuf = new char[CharBufferSize];

            this.Start(syntax);
        }
Exemple #25
0
        /// <summary>
        /// Changes the current <see cref="HighlightMode">mode</see> for text being written.
        /// </summary>
        /// <param name="mode"></param>
        public void ChangeHighlightMode(HighlightMode mode)
        {
            if (this.m_hasStartedMode) {
                if (mode != this.m_mode) {
                    if (this.m_mode != HighlightMode.Normal) {
                        this.WriteModeEnd();
                    }

                    if (mode != HighlightMode.Normal) {
                        this.WriteModeStart(mode);
                    }
                }

                this.m_mode = mode;
            } else {
                this.m_mode = mode;
                this.m_hasStartedMode = true;

                if (mode != HighlightMode.Normal) {
                    this.WriteModeStart(mode);
                }
            }
        }
        private void ToggleHighlightMode(HighlightMode mode)
        {
            if(_suspendUi || _project.HighlightMode == mode)
                return;

            _project.HighlightMode = mode;

            RefreshOptionsUI();
            ShowRegexResults();
        }
Exemple #27
0
 protected virtual void ThrowIfModesDontMatch(HighlightMode expectedMode, string expectedText)
 {
     if (this.m_modeForBufferedText != expectedMode) {
         this.ThrowModeError(expectedMode, this.m_modeForBufferedText, expectedText);
     }
 }
Exemple #28
0
 internal void SetHighlightMode(HighlightMode mode)
 {
     this.HasHighlightMode = true;
     this.HighlightMode    = mode;
 }
Exemple #29
0
        private void CheckAgainstActual(HighlightMode expectedMode, string expectedText)
        {
            int idxExpected = 0;

            do {
                if (this.m_idxActualBuffer == this.m_actualBuffer.Length) {
                    this.BufferMoreActualText();
                }

                DoCheckAgainstBufferedActualText(expectedMode, expectedText, ref idxExpected);
            } while (idxExpected < expectedText.Length);
        }
Exemple #30
0
 /// <summary>
 /// Set selected items' highlight mode.
 /// </summary>
 private void SetHighlightMode(HighlightMode mode)
 {
     Runtime.ValidateRefCounted(this);
     ListView_SetHighlightMode(handle, mode);
 }
Exemple #31
0
        private bool ReadFromExpected(out HighlightMode mode, out string text)
        {
            if (this.m_expectedReader.NodeType == XmlNodeType.Text || this.m_expectedReader.NodeType == XmlNodeType.Whitespace) {
                mode = HighlightMode.Normal;
                text = this.m_expectedReader.ReadString();
                return true;
            }

            if (!this.m_expectedReader.IsStartElement("span")) {
                if (!this.m_expectedReader.ReadToFollowing("span")) {
                    mode = HighlightMode.Unknown;
                    text = null;
                    return false;
                }
            }

            // there's a bug in the Vim 2html script where it outputs a <span> with an empty class atribute. This works around it.
            if (string.IsNullOrEmpty(this.m_expectedReader.GetAttribute("class"))) {
                mode = HighlightMode.Normal;
            } else {
                mode = (HighlightMode) Enum.Parse(typeof (HighlightMode), this.m_expectedReader.GetAttribute("class"), true);
            }

            text = string.Empty;

            while (!(this.m_expectedReader.NodeType == XmlNodeType.EndElement && this.m_expectedReader.LocalName == "span")) {
                this.m_expectedReader.Read();

                if (this.m_expectedReader.NodeType == XmlNodeType.Text || this.m_expectedReader.NodeType == XmlNodeType.CDATA) {
                    text += this.m_expectedReader.Value;
                }
            }

            this.m_expectedReader.Read();

            return true;
        }
Exemple #32
0
 /// <summary>
 /// macOS: Sets when the tray’s icon background becomes highlighted (in blue).
 ///
 /// Note: You can use highlightMode with a BrowserWindow by toggling between
 /// 'never' and 'always' modes when the window visibility changes.
 /// </summary>
 /// <param name="highlightMode"></param>
 public void SetHighlightMode(HighlightMode highlightMode)
 {
     BridgeConnector.Socket.Emit("tray-setHighlightMode", highlightMode.ToString());
 }
Exemple #33
0
 internal void AddHighlightLinkTo(Group target)
 {
     this.m_highlightMode = HighlightMode.Unknown;
     this.m_highlightLink = target;
 }
Exemple #34
0
        internal void SendMode(HighlightMode mode, int idxHighlightStart)
        {
            this.TrimModesAtAndAfter(idxHighlightStart);

            this.m_modes.Add(new KeyValuePair<int, HighlightMode>(idxHighlightStart, mode));
        }
Exemple #35
0
 /// <summary>
 /// Called when a <see cref="HighlightMode">mode</see> starts.
 /// </summary>
 protected virtual void WriteModeStart(HighlightMode mode)
 {
     this.m_writer.WriteStartElement(m_modeNames[(int)mode]);
 }
Exemple #36
0
 public override void DeactivateHighlight(HighlightMode highlightModeAfter)
 {
     Highlight_Manager.instance.DeactivateOutlines(this, false, highlightModeAfter);
 }
Exemple #37
0
        internal void SendMode(HighlightMode mode, int idxHighlightStart)
        {
            this.TrimModesAtAndAfter(idxHighlightStart);

            this.m_modes.Add(new KeyValuePair <int, HighlightMode>(idxHighlightStart, mode));
        }
Exemple #38
0
 internal static extern void XmTextSetHighlight(IntPtr widget, long left, long right, HighlightMode mode);
Exemple #39
0
 public virtual void ActivateHighlight(HighlightMode highlightMode)
 {
 }
Exemple #40
0
 internal void AddHighlightLinkTo(Group target)
 {
     this.m_highlightMode = HighlightMode.Unknown;
     this.m_highlightLink = target;
 }
Exemple #41
0
 private IBrush GetColorForHighlightMode(HighlightMode mode) =>
 mode switch
 {
Exemple #42
0
 public virtual void DeactivateHighlight(HighlightMode highlightModeAfter)
 {
 }
Exemple #43
0
 internal static extern void ListView_SetHighlightMode(IntPtr handle, HighlightMode mode);
Exemple #44
0
 /// <summary>
 /// Jinxters the frobnozzle.
 /// </summary>
 public void ChangeHighlightMode(HighlightMode mode)
 {
 }
Exemple #45
0
 public void SetCommand(HighlightCommand command)
 {
     this._command = command;
     this.Status = this._command.GetStatus();
 }
Exemple #46
0
 internal void SetHighlightMode(HighlightMode mode)
 {
     this.HasHighlightMode = true;
     this.HighlightMode = mode;
 }
Exemple #47
0
 protected override void WriteModeStart(HighlightMode mode)
 {
     _xmlWriter.WriteStartElement("span");
     if (_highlightMode == CodeHighlightMode.DirectIris ||
         _highlightMode == CodeHighlightMode.IndirectIris)
     {
         _xmlWriter.WriteAttributeString("class", _classNames[(int)mode]);
     }
     else if (_highlightMode == CodeHighlightMode.Snippets)
     {
         // Let's degrade to using the three classes supported by the snippets
         if (mode == HighlightMode.Comment)
         {
             _xmlWriter.WriteAttributeString("class", "comment");
         }
         else if (mode == HighlightMode.Keyword)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.Statement)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.StorageClass)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.Type)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.Boolean)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.Conditional)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.Repeat)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.PreProc)
         {
             _xmlWriter.WriteAttributeString("class", "keyword");
         }
         else if (mode == HighlightMode.String)
         {
             _xmlWriter.WriteAttributeString("class", "literal");
         }
         else if (mode == HighlightMode.Character)
         {
             _xmlWriter.WriteAttributeString("class", "literal");
         }
         else if (mode == HighlightMode.Number)
         {
             _xmlWriter.WriteAttributeString("class", "literal");
         }
         else if (mode == HighlightMode.Float)
         {
             _xmlWriter.WriteAttributeString("class", "literal");
         }
         else if (mode == HighlightMode.PreCondit)
         {
             _xmlWriter.WriteAttributeString("class", "literal");
         }
         else
         {
             _xmlWriter.WriteAttributeString("class", _classNames[(int)mode]);
         }
     }
 }
Exemple #48
0
 public void SetHighlight(Range range, HighlightMode mode)
 {
     NativeMethods.XmTextSetHighlight(this.NativeHandle.Widget, range.Begin, range.End, mode);
 }
Exemple #49
0
		public HighlightObjectEventArgs(ObjectSelection target, HighlightMode mode)
		{
			this.target = target;
			this.mode = mode;
		}
Exemple #50
0
 public override void ActivateHighlight(HighlightMode highlightMode)
 {
     Highlight_Manager.instance.ActivateOutlines(new List <Tile> {
         this
     }, highlightMode, false);
 }