protected override void OnDwellStart(ScintillaMouseEventArgs mea) { base.OnDwellStart(mea); int pos = mea.Position; List <CodeRuleError> errors = (from e in m_ruleErrors where pos >= e.range.Start && pos < e.range.End select e).ToList(); if (errors.Count > 0) { string message = ""; bool first = true; foreach (CodeRuleError error in errors) { if (!first) { message += "\r\n"; } first = false; message += error.text; } CallTip.Show(message, pos); } }
protected override void OnDwellEnd(ScintillaMouseEventArgs e) { base.OnDwellEnd(e); if (CallTip.IsActive) { CallTip.Cancel(); } }
private void intellua_CallTipClick(object sender, ScintillaNET.CallTipClickEventArgs e) { Function func = m_calltipFuncion.Func; func.CurrentOverloadIndex++; if (func.CurrentOverloadIndex == func.Param.Count) { func.CurrentOverloadIndex = 0; } m_calltipFuncion.update(); CallTip.Show(m_calltipFuncion.CalltipString, m_calltipFuncion.HighLightStart, m_calltipFuncion.HighLightEnd); }
private void ShowCalltip() { FunctionCall fc = FunctionCall.Parse(m_source, m_autoCompleteData, CurrentPos); if (fc != null) { m_calltipFuncion = fc; CallTip.Show(fc.CalltipString, fc.HighLightStart, fc.HighLightEnd); } else { CallTip.Hide(); } }
public Scintilla() { this._state = new BitVector32(0); this._state[_acceptsReturnState] = true; this._state[_acceptsTabState] = true; _ns = (INativeScintilla)this; _textChangedTimer = new Timer(); _textChangedTimer.Interval = 1; _textChangedTimer.Tick += new EventHandler(this.textChangedTimer_Tick); _caption = GetType().FullName; // Set up default encoding to UTF-8 which is the Scintilla's best supported. // .NET strings are UTF-16 but should be able to convert without any problems this.Encoding = Encoding.UTF8; // Ensure all style values have at least defaults _ns.StyleClearAll(); _caret = new CaretInfo(this); _lines = new LinesCollection(this); _selection = new Selection(this); _indicators = new IndicatorCollection(this); _snippets = new SnippetManager(this); _margins = new MarginCollection(this); _scrolling = new Scrolling(this); _whitespace = new Whitespace(this); _endOfLine = new EndOfLine(this); _clipboard = new Clipboard(this); _undoRedo = new UndoRedo(this); _dropMarkers = new DropMarkers(this); _hotspotStyle = new HotspotStyle(this); _callTip = new CallTip(this); _styles = new StyleCollection(this); _indentation = new Indentation(this); _markers = new MarkerCollection(this); _autoComplete = new AutoComplete(this); _documentHandler = new DocumentHandler(this); _lineWrap = new LineWrap(this); _lexing = new Lexing(this); _longLines = new LongLines(this); _commands = new Commands(this); _folding = new Folding(this); _configurationManager = new ConfigurationManager(this); _printing = new Printing(this); _findReplace = new FindReplace(this); _documentNavigation = new DocumentNavigation(this); _goto = new GoTo(this); _helpers.AddRange(new TopLevelHelper[] { _caret, _lines, _selection, _indicators, _snippets, _margins, _scrolling, _whitespace, _endOfLine, _clipboard, _undoRedo, _dropMarkers, _hotspotStyle, _styles, _indentation, _markers, _autoComplete, _documentHandler, _lineWrap, _lexing, _longLines, _commands, _folding, _configurationManager, _printing, _findReplace, _documentNavigation, _goto }); // Changing the Default values from Scintilla's default Black on White // to platform defaults for Edits BackColor = SystemColors.Window; ForeColor = SystemColors.WindowText; }
public Scintilla() { if (IntPtr.Size == 4) _sciLexerDllName = "DbDiff.SciLexer32.dll"; else _sciLexerDllName = "DbDiff.SciLexer64.dll"; _ns = (INativeScintilla)this; // Set up default encoding _encoding = Encoding.GetEncoding(NativeInterface.GetCodePage()); // Ensure all style values have at least defaults _ns.StyleClearAll(); _caret = new CaretInfo(this); _lines = new LinesCollection(this); _selection = new Selection(this); _indicators = new IndicatorCollection(this); _margins = new MarginCollection(this); _scrolling = new Scrolling(this); _whiteSpace = new WhiteSpace(this); _endOfLine = new EndOfLine(this); _clipboard = new Clipboard(this); _undoRedo = new UndoRedo(this); _dropMarkers = new DropMarkers(this); _hotspotStyle = new HotspotStyle(this); _callTip = new CallTip(this); _styles = new StyleCollection(this); _indentation = new Indentation(this); _documentHandler = new DocumentHandler(this); _lineWrap = new LineWrap(this); _lexing = new Lexing(this); _longLines = new LongLines(this); _commands = new Commands(this); _configurationManager = new ConfigurationManager(this); _printing = new Printing(this); _documentNavigation = new DocumentNavigation(this); _goto = new GoTo(this); _helpers.AddRange(new ScintillaHelperBase[] { _caret, _lines, _selection, _indicators, _margins, _scrolling, _whiteSpace, _endOfLine, _clipboard, _undoRedo, _dropMarkers, _hotspotStyle, _styles, _indentation, _documentHandler, _lineWrap, _lexing, _longLines, _commands, _configurationManager, _printing, _documentNavigation, _goto }); // Changing the Default values from Scintilla's default Black on White // to platform defaults for Edits BackColor = SystemColors.Window; ForeColor = SystemColors.WindowText; }
private static bool ApplyTo(CallTip c) { c.BackColor = BackColor; c.ForeColor = ForeColor; c.KeyColor = Color.FromArgb(255, 66, 147, 214); c.ParamColor = Color.FromArgb(255, 147, 147, 147); c.CodeColor = ForeColor; return true; }