~ubuntu-branches/ubuntu/jaunty/muine/jaunty-proposed

« back to all changes in this revision

Viewing changes to src/EllipsizingLabel.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2005-11-08 00:40:42 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20051108004042-l6x5vw65u3f2l1dc
Tags: 0.8.3-7ubuntu2
Rebuild against new libdbus-1-cil

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2004 Jorn Baayen <jorn@nl.linux.org>
 
2
 * Copyright (C) 2004, 2005 Jorn Baayen <jbaayen@gnome.org>
3
3
 *
4
4
 * This program is free software; you can redistribute it and/or
5
5
 * modify it under the terms of the GNU General Public License as
21
21
using System.Collections;
22
22
using System.Runtime.InteropServices;
23
23
 
24
 
using Gtk;
 
24
// FIXME: Ditch this whole thing once we use Gtk+ 2.6
25
25
 
26
 
public class EllipsizingLabel : Label
 
26
namespace Muine
27
27
{
28
 
        [DllImport ("libmuine")]
29
 
        private static extern IntPtr rb_ellipsizing_label_new (string text);
30
 
        
31
 
        public EllipsizingLabel (string text) : base (text)
32
 
        {
33
 
                Raw = rb_ellipsizing_label_new (text);
34
 
        }
35
 
 
36
 
        ~EllipsizingLabel ()
37
 
        {
38
 
                Dispose ();
39
 
        }
40
 
 
41
 
        [DllImport ("libmuine")]
42
 
        private static extern void rb_ellipsizing_label_set_text (IntPtr label,
43
 
                                                                  string text);
44
 
 
45
 
        public new string Text {
46
 
                set {
47
 
                        rb_ellipsizing_label_set_text (Raw, value);
48
 
                }
49
 
                
50
 
                get {
51
 
                        return ((Label) this).Text;
 
28
        public class EllipsizingLabel : Gtk.Label
 
29
        {
 
30
                // Constructor
 
31
                [DllImport ("libmuine")]
 
32
                private static extern IntPtr rb_ellipsizing_label_new (string text);
 
33
 
 
34
                /// <summary>
 
35
                ///     Create a new <see cref="EllipsizingLabel" />.
 
36
                /// </summary>          
 
37
                public EllipsizingLabel () : base ("")
 
38
                {
 
39
                        Raw = rb_ellipsizing_label_new ("");
 
40
                }
 
41
 
 
42
                // Destructor
 
43
                ~EllipsizingLabel ()
 
44
                {
 
45
                        Dispose ();
 
46
                }
 
47
 
 
48
                // Properties
 
49
                // Properties :: Text (set; get;) (Gtk.Label)
 
50
                [DllImport ("libmuine")]
 
51
                private static extern void rb_ellipsizing_label_set_text (IntPtr label, string text);
 
52
 
 
53
                /// <summary>
 
54
                ///     The text within the <see cref="EllipsizingLabel" /> widget.
 
55
                /// </summary>
 
56
                /// <param name="value">
 
57
                ///     The text to set.
 
58
                /// </param>
 
59
                /// <returns>
 
60
                ///     A <see cref="String" />.
 
61
                /// </returns>
 
62
                public new string Text {
 
63
                        set { rb_ellipsizing_label_set_text (Raw, value); }
 
64
                        get { return base.Text; }
 
65
                }
 
66
 
 
67
                // Properties :: Markup (set; get;) (Gtk.Label)
 
68
                [DllImport ("libmuine")]
 
69
                private static extern void rb_ellipsizing_label_set_markup (IntPtr label, string markup);
 
70
 
 
71
                /// <summary>
 
72
                ///     A markup string to be parsed with Pango and shown in the
 
73
                ///     <see cref="EllipsizingLabel" />.
 
74
                /// </summary>
 
75
                /// <param name="value">
 
76
                ///     A markup string (see Pango markup format).
 
77
                /// </param>
 
78
                public new string Markup {
 
79
                        set { rb_ellipsizing_label_set_markup (Raw, value); }
52
80
                }
53
81
        }
54
82
}