~bratsche/ubuntu/maverick/monodevelop/disable-appmenu

« back to all changes in this revision

Viewing changes to src/addins/Mono.Texteditor/Mono.TextEditor.Highlighting/IColorDefinition.cs

  • Committer: Bazaar Package Importer
  • Author(s): Stefan Ebner
  • Date: 2009-03-17 17:55:55 UTC
  • mfrom: (1.1.13 sid)
  • Revision ID: james.westby@ubuntu.com-20090317175555-2w5qbmu0l5maq6fq
Tags: 1.9.3+dfsg-1ubuntu1
* FFe for Monodevelop 2 granted by motu-release team :)
* Merge from Debian Unstable , remaining Ubuntu changes:
  + debian/control:
    - Update for Gnome# 2.24

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// IColorDefinition.cs
2
 
//
3
 
// Author:
4
 
//   Mike Krüger <mkrueger@novell.com>
5
 
//
6
 
// Copyright (c) 2008 Novell, Inc (http://www.novell.com)
7
 
//
8
 
// Permission is hereby granted, free of charge, to any person obtaining a copy
9
 
// of this software and associated documentation files (the "Software"), to deal
10
 
// in the Software without restriction, including without limitation the rights
11
 
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12
 
// copies of the Software, and to permit persons to whom the Software is
13
 
// furnished to do so, subject to the following conditions:
14
 
//
15
 
// The above copyright notice and this permission notice shall be included in
16
 
// all copies or substantial portions of the Software.
17
 
//
18
 
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19
 
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20
 
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21
 
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22
 
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23
 
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24
 
// THE SOFTWARE.
25
 
//
26
 
 
27
 
using System;
28
 
 
29
 
namespace Mono.TextEditor.Highlighting
30
 
{
31
 
        public interface IColorDefinition 
32
 
        {
33
 
                Gdk.Color Color {
34
 
                        get;
35
 
                }
36
 
        }
37
 
        
38
 
        class ColorDefinition : IColorDefinition
39
 
        {
40
 
                Gdk.Color color;
41
 
                
42
 
                public Gdk.Color Color {
43
 
                        get {
44
 
                                return color;
45
 
                        }
46
 
                }
47
 
                
48
 
                public ColorDefinition (Gdk.Color color)
49
 
                {
50
 
                        this.color = color;
51
 
                }
52
 
        }
53
 
 
54
 
        class ReferencedColorDefinition : IColorDefinition
55
 
        {
56
 
                Style style;
57
 
                string referencedColor;
58
 
                
59
 
                public Gdk.Color Color {
60
 
                        get {
61
 
                                return style.GetColorFromDefinition (referencedColor);
62
 
                        }
63
 
                }
64
 
                
65
 
                public ReferencedColorDefinition (Style style, string referencedColor)
66
 
                {
67
 
                        this.style           = style;
68
 
                        this.referencedColor = referencedColor;
69
 
                }
70
 
        }
71
 
}