private void scintillaControl_MarginClick(object sender, MarginClickEventArgs e) { if (e.Margin == ScintillaMargin.Bookmark) { SetBookmark(_scintillaControl.zGetLineFromPosition(e.Position)); } }
private void HandleMarginClick(object sender, MarginClickEventArgs e) { switch (e.Margin) { /// ON BOOKMARK MARGIN CLICK case BREAKPOINT_MARGIN: var line = Lines[LineFromPosition(e.Position)]; // Do we have a marker for this line? if ((line.MarkerGet() & BREAKPOINT_MARKER_MASK) > 0) { // remove existing bookmark line.MarkerDelete(BREAKPOINT_MARKER); } else { // add bookmark line.MarkerAdd(BREAKPOINT_MARKER); } break; } }
private void ScnMarginClick(ref NativeMethods.SCNotification scn) { var keys = Keys.Modifiers & (Keys)(scn.modifiers << 16); var eventArgs = new MarginClickEventArgs(this, keys, scn.position, scn.margin); OnMarginClick(eventArgs); }
/// <summary> /// Raises the <see cref="MarginClick" /> event. /// </summary> /// <param name="e">A <see cref="MarginClickEventArgs" /> that contains the event data.</param> protected virtual void OnMarginClick(MarginClickEventArgs e) { var handler = Events[marginClickEventKey] as EventHandler<MarginClickEventArgs>; if (handler != null) handler(this, e); }
/// <summary> /// Raises the <see cref="MarginClick"/> event. /// </summary> /// <param name="e">An <see cref="MarginClickEventArgs"/> that contains the event data.</param> protected virtual void OnMarginClick(MarginClickEventArgs e) { EventHandler<MarginClickEventArgs> handler = Events[_marginClickEventKey] as EventHandler<MarginClickEventArgs>; if (handler != null) handler(this, e); if (e.ToggleMarkerNumber >= 0) { int mask = (int)Math.Pow(2, e.ToggleMarkerNumber); if ((e.Line.GetMarkerMask() & mask) == mask) e.Line.DeleteMarker(e.ToggleMarkerNumber); else e.Line.AddMarker(e.ToggleMarkerNumber); } if (e.ToggleFold) e.Line.ToggleFoldExpanded(); }
private void codeBox_MarginClick(object sender, MarginClickEventArgs e) { if (e.Margin == 0) { var line = _codeBox.Lines[_codeBox.LineFromPosition(e.Position)]; bool isSet = (line.MarkerGet() & 0x01) == 0; OnBreakpointChanged(new BreakpointChangedEventArgs(line.Index + 1, isSet)); if (isSet) line.MarkerAdd(0); else line.MarkerDelete(0); } }
private void MarginClickHandler(object sender, MarginClickEventArgs e) { int i = ScintillaInstance.LineFromPosition(e.Position); ToggleBreakPoint(i); }
private void ScintillaMarginClickHandler(object sender, MarginClickEventArgs e) { Scintilla scintilla = sender as Scintilla; int line = scintilla.LineFromPosition(e.Position); ToggleBreakPoint(line); }