internal StandardStyles(EditorRef @ref) { Default = new Style(@ref, TextStyle.Default); CallTip = new Style(@ref, TextStyle.CallTip); BraceMatch = new Style(@ref, TextStyle.BraceMatch); BraceBad = new Style(@ref, TextStyle.BraceBad); Hyperlink = new Style(@ref, TextStyle.Hyperlink); Invisible = new Style(@ref, TextStyle.Invisible); Style1 = new Style(@ref, TextStyle.Style1); Style2 = new Style(@ref, TextStyle.Style2); Style3 = new Style(@ref, TextStyle.Style3); Style4 = new Style(@ref, TextStyle.Style4); Style5 = new Style(@ref, TextStyle.Style5); Style6 = new Style(@ref, TextStyle.Style6); Style7 = new Style(@ref, TextStyle.Style7); Style8 = new Style(@ref, TextStyle.Style8); Style9 = new Style(@ref, TextStyle.Style9); Style10 = new Style(@ref, TextStyle.Style10); Style11 = new Style(@ref, TextStyle.Style11); Style12 = new Style(@ref, TextStyle.Style12); MultilineStyle1 = new Style(@ref, TextStyle.MultilineStyle1); MultilineStyle2 = new Style(@ref, TextStyle.MultilineStyle2); MultilineStyle3 = new Style(@ref, TextStyle.MultilineStyle3); MultilineStyle4 = new Style(@ref, TextStyle.MultilineStyle4); Annotation1 = new Style(@ref, TextStyle.Annotation1); Annotation2 = new Style(@ref, TextStyle.Annotation2); Annotation3 = new Style(@ref, TextStyle.Annotation3); Hyperlink.Hotspot = true; Invisible.Visible = false; }
internal StandardIndicators(EditorRef @ref) { this.@ref = @ref; Hint = new Indicator(0, @ref); Information = new Indicator(1, @ref); Warning = new Indicator(2, @ref); Error = new Indicator(3, @ref); Important = new Indicator(4, @ref); FoundSymbol = new Indicator(5, @ref); FoundSymbol2 = new Indicator(6, @ref); Mark = new Indicator(7, @ref); }
internal unsafe static string SendStr(this EditorRef @ref, int cmd, int param) { var length = Send(@ref, cmd, param, 0); var buffer = new byte[length + 1]; fixed(byte *bp = buffer) { NativeMethods.SendMessage(@ref.Handle, (uint)cmd, (IntPtr)cmd, (IntPtr)bp); if (bp[length - 1] == 0) { length--; } } return(Encoding.UTF8.GetString(buffer, 0, length + 1).Trim('\0')); }
internal static int Send(this EditorRef @this, int cmd, string lhs, string rhs) { var ptr = Marshal.StringToCoTaskMemAnsi(lhs); var ret = Sci.NIL; try { ret = (Int32)NativeMethods.SendMessage(@this.Handle, (UInt32)cmd, ptr, rhs); } finally { if (ptr != IntPtr.Zero) { Marshal.FreeCoTaskMem(ptr); } } return(ret); }
internal FoldingManager(EditorRef @ref) { this.@ref = @ref; }
internal Line(int number, EditorRef sref) { this.sref = sref; Number = number; }
internal static int Send(this EditorRef @this, int cmd, int lhs, byte[] rhs) { return(NativeMethods.SendMessage(@this.Handle, (UInt32)cmd, (IntPtr)lhs, rhs)); }
internal static int Send(this EditorRef @this, int cmd, bool param) { return(Send(@this, cmd, param ? Sci.TRUE : Sci.FALSE)); }
internal static int Send(this EditorRef @this, int cmd, bool lhs, int rhs) { return(Send(@this, cmd, lhs ? Sci.TRUE : Sci.FALSE, rhs)); }
internal static int Send(this EditorRef @this, int cmd) { return(Send(@this, cmd, Sci.NIL)); }
internal static int Send(this EditorRef @this, int cmd, int lhs, IntPtr rhs) { return(NativeMethods.SendMessage(@this.Handle, (UInt32)cmd, new IntPtr(lhs), rhs)); }
internal SciDocument(EditorRef @ref, IntPtr ptr) { Pointer = ptr; this.@ref = @ref; }
internal KeyboardManager(EditorRef @ref) { Ref = @ref; }
internal Style(EditorRef @ref, TextStyle key) { this.@ref = @ref; Key = key; }
internal Selection(int number, EditorRef sref) { this.sref = sref; Number = number; }
internal Indicator(int num, EditorRef @ref) { Number = num; this.@ref = @ref; }