~halega/+junk/sharpdevelop

« back to all changes in this revision

Viewing changes to src/Main/Base/Project/Src/Gui/AbstractPadContent.cs

  • Committer: sk
  • Date: 2011-09-10 05:17:57 UTC
  • Revision ID: halega@halega.com-20110910051757-qfouz1llya9m6boy
4.1.0.7915 Release Candidate 1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 
3
 
 
4
using System;
 
5
using System.Windows.Forms;
 
6
 
 
7
namespace ICSharpCode.SharpDevelop.Gui
 
8
{
 
9
        public abstract class AbstractPadContent : IPadContent
 
10
        {
 
11
                /// <inheritdoc/>
 
12
                public abstract object Control {
 
13
                        get;
 
14
                }
 
15
                
 
16
                /// <inheritdoc/>
 
17
                public virtual object InitiallyFocusedControl {
 
18
                        get {
 
19
                                return null;
 
20
                        }
 
21
                }
 
22
                
 
23
                public virtual void Dispose()
 
24
                {
 
25
                }
 
26
                
 
27
                public void BringToFront()
 
28
                {
 
29
                        PadDescriptor d = this.PadDescriptor;
 
30
                        if (d != null)
 
31
                                d.BringPadToFront();
 
32
                }
 
33
                
 
34
                protected virtual PadDescriptor PadDescriptor {
 
35
                        get {
 
36
                                if (WorkbenchSingleton.Workbench == null || WorkbenchSingleton.Workbench.WorkbenchLayout == null)
 
37
                                        return null;
 
38
                                return WorkbenchSingleton.Workbench.GetPad(GetType());
 
39
                        }
 
40
                }
 
41
        }
 
42
}