/// <summary> /// Prepares this variable and the Scintilla control to display images. /// Calls SCI_ANNOTATIONSETVISIBLE(ANNOTATION_STANDARD). Need it because will draw images in annotation areas. /// </summary> /// <param name="c">The control.</param> /// <param name="isEditor">Display images that are not in "<image "path etc"> tag. Then does not display icons of files that don't contain images. Then limits image height to 10 lines.</param> internal SciImages(AuScintilla c, bool isEditor = false) { if (t_data == null) { t_data = new _ThreadSharedData(); } _c = c; _t = c.Z; _isEditor = isEditor; _sci_AnnotationDrawCallback = _AnnotationDrawCallback; _callbackPtr = Marshal.GetFunctionPointerForDelegate(_sci_AnnotationDrawCallback); _c.Call(SCI_SETANNOTATIONDRAWCALLBACK, 0, _callbackPtr); _visible = AnnotationsVisible.ANNOTATION_STANDARD; _c.Call(SCI_ANNOTATIONSETVISIBLE, (int)_visible); //keep annotations always visible. Adding annotations while visible is slower, but much faster than getting images from files etc. }
public PanelInfo() { this.AccessibleName = this.Name = "Info"; //note: create _html async, not now. Now would make program startup slower. Loads 2 dlls. Setting text first time is even slower. //var z = TextRenderer.MeasureText("A\nj", Font); //<mouse info panel size> = new Size(0, z.Height + 3); _sci = new AuScintilla(); _sci.AccessibleName = _sci.Name = "Info_mouse"; _sci.Dock = DockStyle.Fill; _sci.ZInitReadOnlyAlways = true; _sci.ZInitTagsStyle = AuScintilla.ZTagsStyle.AutoAlways; this.Controls.Add(_sci); }