5
// Lluis Sanchez <lluis@xamarin.com>
7
// Copyright (c) 2012 Xamarin Inc
9
// Permission is hereby granted, free of charge, to any person obtaining a copy
10
// of this software and associated documentation files (the "Software"), to deal
11
// in the Software without restriction, including without limitation the rights
12
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13
// copies of the Software, and to permit persons to whom the Software is
14
// furnished to do so, subject to the following conditions:
16
// The above copyright notice and this permission notice shall be included in
17
// all copies or substantial portions of the Software.
19
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
28
namespace MonoDevelop.Components.Docking
30
public sealed class DockVisualStyle
32
public Gdk.Color? PadBackgroundColor { get; set; }
33
public Gdk.Color? PadTitleLabelColor { get; set; }
34
public DockTabStyle? TabStyle { get; set; }
35
public Gdk.Color? TreeBackgroundColor { get; set; }
36
public bool? ShowPadTitleIcon { get; set; }
37
public bool? UppercaseTitles { get; set; }
38
public bool? ExpandedTabs { get; set; }
39
public Gdk.Color? InactivePadBackgroundColor { get; set; }
40
public int? PadTitleHeight { get; set; }
42
// When set, pads in a region with this style can't be stacked horizontally
43
public bool? SingleColumnMode { get; set; }
45
// When set, pads in a region with this style can't be stacked vertically
46
public bool? SingleRowMode { get; set; }
48
public DockVisualStyle ()
52
public DockVisualStyle Clone ()
54
return (DockVisualStyle) MemberwiseClone ();
57
public void CopyValuesFrom (DockVisualStyle style)
59
if (style.PadBackgroundColor != null)
60
PadBackgroundColor = style.PadBackgroundColor;
61
if (style.PadTitleLabelColor != null)
62
PadTitleLabelColor = style.PadTitleLabelColor;
63
if (style.TabStyle != null)
64
TabStyle = style.TabStyle;
65
if (style.TreeBackgroundColor != null)
66
TreeBackgroundColor = style.TreeBackgroundColor;
67
if (style.ShowPadTitleIcon != null)
68
ShowPadTitleIcon = style.ShowPadTitleIcon;
69
if (style.UppercaseTitles != null)
70
UppercaseTitles = style.UppercaseTitles;
71
if (style.ExpandedTabs != null)
72
ExpandedTabs = style.ExpandedTabs;
73
if (style.InactivePadBackgroundColor != null)
74
InactivePadBackgroundColor = style.InactivePadBackgroundColor;
75
if (style.PadTitleHeight != null)
76
PadTitleHeight = style.PadTitleHeight;
77
if (style.SingleColumnMode != null)
78
SingleColumnMode = style.SingleColumnMode;
79
if (style.SingleRowMode != null)
80
SingleRowMode = style.SingleRowMode;
83
public static DockVisualStyle CreateDefaultStyle ()
85
DockVisualStyle s = new DockVisualStyle ();
86
s.PadBackgroundColor = new Gdk.Color (0,0,0);
87
s.PadTitleLabelColor = new Gdk.Color (0,0,0);
88
s.TabStyle = DockTabStyle.Normal;
89
s.TreeBackgroundColor = null;
90
s.ShowPadTitleIcon = true;
91
s.UppercaseTitles = false;
92
s.ExpandedTabs = false;
93
s.InactivePadBackgroundColor = new Gdk.Color (0,0,0);
94
s.PadTitleHeight = -1;
95
s.SingleRowMode = false;
96
s.SingleColumnMode = false;
101
public enum DockTabStyle