Пример #1
0
        ///
        public AuScintilla()
        {
            Z = new SciText(this);

            base.SetStyle(ControlStyles.CacheText, true);

            //this is like TextBoxBase does
            base.SetStyle(ControlStyles.StandardClick |
                          ControlStyles.StandardDoubleClick |
                          ControlStyles.UseTextForAccessibility |
                          ControlStyles.UserPaint,
                          false);

            this.Size = new Size(200, 100);
        }
Пример #2
0
 /// <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 "&lt;image "path etc"&gt; 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.
 }