~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/xwt/Xwt/Xwt.Backends/IRichTextViewBackend.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
Import upstream version 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//
 
2
// IMarkdownViewBackend.cs
 
3
//
 
4
// Author:
 
5
//       Jérémie Laval <jeremie.laval@xamarin.com>
 
6
//
 
7
// Copyright (c) 2012 Xamarin, Inc.
 
8
using System;
 
9
 
 
10
namespace Xwt.Backends
 
11
{
 
12
        [Flags]
 
13
        public enum RichTextInlineStyle
 
14
        {
 
15
                Normal    = 0,
 
16
                Italic    = 1 << 0,
 
17
                Bold      = 1 << 1,
 
18
                Monospace = 1 << 2,
 
19
        }
 
20
 
 
21
        public interface IRichTextViewBackend : IWidgetBackend
 
22
        {
 
23
                IRichTextBuffer CreateBuffer ();
 
24
 
 
25
                // Display the passed buffer
 
26
                void SetBuffer (IRichTextBuffer buffer);
 
27
        }
 
28
 
 
29
        public interface IRichTextBuffer
 
30
        {
 
31
                // Emit text using specified style mask
 
32
                void EmitText (string text, RichTextInlineStyle style);
 
33
 
 
34
                // Emit a header (h1, h2, ...)
 
35
                void EmitStartHeader (int level);
 
36
                void EmitEndHeader ();
 
37
 
 
38
                // What's outputed afterwards will be a in new paragrapgh
 
39
                void EmitStartParagraph (int indentLevel);
 
40
                void EmitEndParagraph ();
 
41
 
 
42
                // Emit a list
 
43
                // Chain is:
 
44
                // open-list, open-bullet, <above methods>, close-bullet, close-list
 
45
                void EmitOpenList ();
 
46
                void EmitOpenBullet ();
 
47
                void EmitCloseBullet ();
 
48
                void EmitCloseList ();
 
49
 
 
50
                // Emit a link opening the href URL with the mouseover title
 
51
                void EmitStartLink (string href, string title);
 
52
                void EmitEndLink ();
 
53
 
 
54
                // Emit code in a preformated blockquote
 
55
                void EmitCodeBlock (string code);
 
56
 
 
57
                // Emit an horizontal ruler
 
58
                void EmitHorizontalRuler ();
 
59
        }
 
60
 
 
61
        public interface IRichTextViewEventSink : IWidgetEventSink
 
62
        {
 
63
                void OnNavigateToUrl (Uri uri);
 
64
        }
 
65
 
 
66
        public enum RichTextViewEvent
 
67
        {
 
68
                NavigateToUrl = 1
 
69
        }
 
70
}