~do-win/do/test-paths

« back to all changes in this revision

Viewing changes to Do.Interface.Windows/src/Do.Interface/UIContext.cs

  • Committer: Hardeep S
  • Date: 2009-06-23 03:53:12 UTC
  • Revision ID: ootz0rz@gmail.com-20090623035312-it8tb5wkha6nf31p
Added Do.Interface.Windows, and a bunch of cleanup with old MonoDevelop files elsewhere

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// UIContext.cs
 
2
// 
 
3
// GNOME Do is the legal property of its developers. Please refer to the
 
4
// COPYRIGHT file distributed with this source distribution.
 
5
//
 
6
// This program is free software: you can redistribute it and/or modify
 
7
// it under the terms of the GNU General Public License as published by
 
8
// the Free Software Foundation, either version 3 of the License, or
 
9
// (at your option) any later version.
 
10
//
 
11
// This program is distributed in the hope that it will be useful,
 
12
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
// GNU General Public License for more details.
 
15
//
 
16
// You should have received a copy of the GNU General Public License
 
17
// along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
18
//
 
19
 
 
20
using System;
 
21
using System.Collections.Generic;
 
22
 
 
23
using Do.Universe;
 
24
 
 
25
namespace Do.Interface
 
26
{
 
27
        
 
28
        
 
29
        public class UIContext : IUIContext
 
30
        {
 
31
                private Item selection;
 
32
                private IList<Item> results;
 
33
                
 
34
                private int cursor;
 
35
                private int[] secondary;
 
36
                private string query;
 
37
                
 
38
                private bool largeText;
 
39
                private TextModeType textType;
 
40
                
 
41
                private IUIContext parentContext;
 
42
                        
 
43
                public Item Selection {
 
44
                        get {
 
45
                                return selection;
 
46
                        }
 
47
                }
 
48
 
 
49
                public IList<Item> Results {
 
50
                        get {
 
51
                                return results;
 
52
                        }
 
53
                }
 
54
 
 
55
                public int Cursor {
 
56
                        get {
 
57
                                return cursor;
 
58
                        }
 
59
                }
 
60
 
 
61
                public int[] SecondaryCursors {
 
62
                        get {
 
63
                                return secondary;
 
64
                        }
 
65
                }
 
66
 
 
67
                public string Query {
 
68
                        get {
 
69
                                return query;
 
70
                        }
 
71
                }
 
72
                
 
73
                public bool LargeTextDisplay {
 
74
                        get {
 
75
                                return largeText;
 
76
                        }
 
77
                }
 
78
                
 
79
                public TextModeType LargeTextModeType {
 
80
                        get {
 
81
                                return textType;
 
82
                        }
 
83
                }
 
84
                
 
85
                public IUIContext ParentContext {
 
86
                        get {
 
87
                                return parentContext;
 
88
                        }
 
89
                }
 
90
                
 
91
                public UIContext(Item selection, IList<Item> results, int cursor, int[] secondaryCursors, 
 
92
                                 string query, bool largeTextDisplay, TextModeType type, IUIContext parentContext)
 
93
                {
 
94
                        this.selection  = selection;
 
95
                        this.results    = results;
 
96
                        this.cursor     = cursor;
 
97
                        this.secondary  = secondaryCursors;
 
98
                        this.query      = query;
 
99
                        this.largeText  = largeTextDisplay;
 
100
                        this.parentContext = parentContext;
 
101
                        this.textType   = type;
 
102
                }
 
103
        }
 
104
}