~ubuntu-branches/ubuntu/raring/monodevelop/raring

« back to all changes in this revision

Viewing changes to src/core/Mono.Texteditor/Mono.TextEditor/IBuffer.cs

  • Committer: Bazaar Package Importer
  • Author(s): Andrew Mitchell
  • Date: 2011-06-29 06:56:25 UTC
  • mfrom: (1.8.1 upstream) (1.3.11 experimental)
  • Revision ID: james.westby@ubuntu.com-20110629065625-7xx19c4vb95j65pl
Tags: 2.5.92+dfsg-1ubuntu1
* Merge from Debian experimental:
 - Dropped patches & changes to debian/control for Moonlight
   + debian/patches/remove_support_for_moonlight.patch,
   + debian/patches/dont_add_moonlight_to_core_addins.patch,
 - Remaining patches:
   + debian/patches/no_appmenu:

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
//
27
27
 
28
28
using System;
 
29
using System.Collections.Generic;
29
30
using System.Text;
30
31
 
31
32
namespace Mono.TextEditor
43
44
                
44
45
                void Insert (int offset, string value);
45
46
                void Remove (int offset, int count);
 
47
                void Remove (ISegment segment);
 
48
                
46
49
                void Replace (int offset, int count, string value);
47
50
                
48
51
                string GetTextAt (int offset, int count);
49
52
                string GetTextAt (ISegment segment);
50
53
                char GetCharAt (int offset);
51
 
        }
52
 
        
53
 
        public abstract class AbstractBuffer : IBuffer
54
 
        {
55
 
                public abstract int Length {
56
 
                        get;
57
 
                }
58
 
                
59
 
                
60
 
                public abstract string Text {
61
 
                        get;
62
 
                        set;
63
 
                }
64
 
                
65
 
                public abstract void Replace (int offset, int count, string value);
66
 
                public abstract string GetTextAt (int offset, int count);
67
 
                public abstract char GetCharAt (int offset);
68
 
                
69
 
                public void Insert (int offset, string text)
70
 
                {
71
 
                        Replace (offset, 0, text);
72
 
                }
73
 
                
74
 
                public void Remove (int offset, int count)
75
 
                {
76
 
                        Replace (offset, count, null);
77
 
                }
78
 
                
79
 
                public string GetTextAt (ISegment segment)
80
 
                {
81
 
                        return GetTextAt (segment.Offset, segment.Length);
82
 
                }
83
 
                
 
54
                
 
55
                IEnumerable<int> SearchForward (string pattern, int startIndex);
 
56
                IEnumerable<int> SearchForwardIgnoreCase (string pattern, int startIndex);
 
57
                
 
58
                IEnumerable<int> SearchBackward (string pattern, int startIndex);
 
59
                IEnumerable<int> SearchBackwardIgnoreCase (string pattern, int startIndex);
84
60
        }
85
61
}