1 |
// created on 05/10/2004 at 20:00 |
2 |
|
3 |
//using Rsvg; |
4 |
using Gtk; |
5 |
|
6 |
public class BioSeqNameView : TextView |
7 |
{ |
8 |
|
9 |
System.Xml.XmlNode _xmlSequence; |
10 |
|
11 |
public BioSeqNameView (System.Xml.XmlNode xmlSequence) |
12 |
{ |
13 |
TextTag _tag; |
14 |
|
15 |
_tag = new TextTag("sequence_title"); |
16 |
_tag.SizePoints=8; |
17 |
Buffer.TagTable.Add(_tag); |
18 |
|
19 |
_xmlSequence = xmlSequence; |
20 |
Buffer.Text = _xmlSequence.Attributes["title"].Value; |
21 |
Buffer.ApplyTag (_tag, Buffer.StartIter, Buffer.EndIter); |
22 |
|
23 |
|
24 |
|
25 |
this.Buffer.Changed += change_xmlSequence; |
26 |
|
27 |
} |
28 |
protected void change_xmlSequence (object obj, System.EventArgs arg) { |
29 |
|
30 |
Buffer.ApplyTag ("sequence_title", Buffer.StartIter, Buffer.EndIter); |
31 |
|
32 |
_xmlSequence.Attributes["title"].Value = Buffer.Text; |
33 |
} |
34 |
|
35 |
} |