~ubuntu-branches/ubuntu/saucy/monodevelop/saucy-proposed

« back to all changes in this revision

Viewing changes to src/addins/AspNet/MonoDevelop.AspNet/gtk-gui/generated.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2010-09-10 16:54:48 UTC
  • mfrom: (19.1.1 experimental)
  • Revision ID: james.westby@ubuntu.com-20100910165448-0rybfk25zd4o9431
Tags: 2.4+dfsg-2
* debian/patches/inject_Mono.Debugger.Soft_source.patch,
  debian/patches/use_system_Mono.Debugger.Soft.patch,
  debian/control:
  + Build against system Soft Debugger, since we now have a new
    enough Mono to match MonoDevelop's required API

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// ------------------------------------------------------------------------------
2
 
//  <autogenerated>
3
 
//      This code was generated by a tool.
4
 
//      
5
 
// 
6
 
//      Changes to this file may cause incorrect behavior and will be lost if 
7
 
//      the code is regenerated.
8
 
//  </autogenerated>
9
 
// ------------------------------------------------------------------------------
10
 
 
11
 
namespace Stetic {
12
 
    
13
 
    internal class Gui {
14
 
        
15
 
        private static bool initialized;
16
 
        
17
 
        internal static void Initialize(Gtk.Widget iconRenderer) {
18
 
            if ((Stetic.Gui.initialized == false)) {
19
 
                Stetic.Gui.initialized = true;
20
 
            }
21
 
        }
22
 
    }
23
 
    
24
 
    internal class BinContainer {
25
 
        
26
 
        private Gtk.Widget child;
27
 
        
28
 
        private Gtk.UIManager uimanager;
29
 
        
30
 
        public static BinContainer Attach(Gtk.Bin bin) {
31
 
            BinContainer bc = new BinContainer();
32
 
            bin.SizeRequested += new Gtk.SizeRequestedHandler(bc.OnSizeRequested);
33
 
            bin.SizeAllocated += new Gtk.SizeAllocatedHandler(bc.OnSizeAllocated);
34
 
            bin.Added += new Gtk.AddedHandler(bc.OnAdded);
35
 
            return bc;
36
 
        }
37
 
        
38
 
        private void OnSizeRequested(object sender, Gtk.SizeRequestedArgs args) {
39
 
            if ((this.child != null)) {
40
 
                args.Requisition = this.child.SizeRequest();
41
 
            }
42
 
        }
43
 
        
44
 
        private void OnSizeAllocated(object sender, Gtk.SizeAllocatedArgs args) {
45
 
            if ((this.child != null)) {
46
 
                this.child.Allocation = args.Allocation;
47
 
            }
48
 
        }
49
 
        
50
 
        private void OnAdded(object sender, Gtk.AddedArgs args) {
51
 
            this.child = args.Widget;
52
 
        }
53
 
        
54
 
        public void SetUiManager(Gtk.UIManager uim) {
55
 
            this.uimanager = uim;
56
 
            this.child.Realized += new System.EventHandler(this.OnRealized);
57
 
        }
58
 
        
59
 
        private void OnRealized(object sender, System.EventArgs args) {
60
 
            if ((this.uimanager != null)) {
61
 
                Gtk.Widget w;
62
 
                w = this.child.Toplevel;
63
 
                if (((w != null) && typeof(Gtk.Window).IsInstanceOfType(w))) {
64
 
                    ((Gtk.Window)(w)).AddAccelGroup(this.uimanager.AccelGroup);
65
 
                    this.uimanager = null;
66
 
                }
67
 
            }
68
 
        }
69
 
    }
70
 
    
71
 
    internal class IconLoader {
72
 
        
73
 
        public static Gdk.Pixbuf LoadIcon(Gtk.Widget widget, string name, Gtk.IconSize size, int sz) {
74
 
            Gdk.Pixbuf res = widget.RenderIcon(name, size, null);
75
 
            if ((res != null)) {
76
 
                return res;
77
 
            }
78
 
            else {
79
 
                try {
80
 
                    return Gtk.IconTheme.Default.LoadIcon(name, sz, 0);
81
 
                }
82
 
                catch (System.Exception ) {
83
 
                    if ((name != "gtk-missing-image")) {
84
 
                        return Stetic.IconLoader.LoadIcon(widget, "gtk-missing-image", size, sz);
85
 
                    }
86
 
                    else {
87
 
                        Gdk.Pixmap pmap = new Gdk.Pixmap(Gdk.Screen.Default.RootWindow, sz, sz);
88
 
                        Gdk.GC gc = new Gdk.GC(pmap);
89
 
                        gc.RgbFgColor = new Gdk.Color(255, 255, 255);
90
 
                        pmap.DrawRectangle(gc, true, 0, 0, sz, sz);
91
 
                        gc.RgbFgColor = new Gdk.Color(0, 0, 0);
92
 
                        pmap.DrawRectangle(gc, false, 0, 0, (sz - 1), (sz - 1));
93
 
                        gc.SetLineAttributes(3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
94
 
                        gc.RgbFgColor = new Gdk.Color(255, 0, 0);
95
 
                        pmap.DrawLine(gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
96
 
                        pmap.DrawLine(gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
97
 
                        return Gdk.Pixbuf.FromDrawable(pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
98
 
                    }
99
 
                }
100
 
            }
101
 
        }
102
 
    }
103
 
    
104
 
    internal class ActionGroups {
105
 
        
106
 
        public static Gtk.ActionGroup GetActionGroup(System.Type type) {
107
 
            return Stetic.ActionGroups.GetActionGroup(type.FullName);
108
 
        }
109
 
        
110
 
        public static Gtk.ActionGroup GetActionGroup(string name) {
111
 
            return null;
112
 
        }
113
 
    }
 
1
 
 
2
// This file has been generated by the GUI designer. Do not modify.
 
3
namespace Stetic
 
4
{
 
5
        internal class Gui
 
6
        {
 
7
                private static bool initialized;
 
8
 
 
9
                static internal void Initialize (Gtk.Widget iconRenderer)
 
10
                {
 
11
                        if ((Stetic.Gui.initialized == false)) {
 
12
                                Stetic.Gui.initialized = true;
 
13
                        }
 
14
                }
 
15
        }
 
16
 
 
17
        internal class BinContainer
 
18
        {
 
19
                private Gtk.Widget child;
 
20
 
 
21
                private Gtk.UIManager uimanager;
 
22
 
 
23
                public static BinContainer Attach (Gtk.Bin bin)
 
24
                {
 
25
                        BinContainer bc = new BinContainer ();
 
26
                        bin.SizeRequested += new Gtk.SizeRequestedHandler (bc.OnSizeRequested);
 
27
                        bin.SizeAllocated += new Gtk.SizeAllocatedHandler (bc.OnSizeAllocated);
 
28
                        bin.Added += new Gtk.AddedHandler (bc.OnAdded);
 
29
                        return bc;
 
30
                }
 
31
 
 
32
                private void OnSizeRequested (object sender, Gtk.SizeRequestedArgs args)
 
33
                {
 
34
                        if ((this.child != null)) {
 
35
                                args.Requisition = this.child.SizeRequest ();
 
36
                        }
 
37
                }
 
38
 
 
39
                private void OnSizeAllocated (object sender, Gtk.SizeAllocatedArgs args)
 
40
                {
 
41
                        if ((this.child != null)) {
 
42
                                this.child.Allocation = args.Allocation;
 
43
                        }
 
44
                }
 
45
 
 
46
                private void OnAdded (object sender, Gtk.AddedArgs args)
 
47
                {
 
48
                        this.child = args.Widget;
 
49
                }
 
50
 
 
51
                public void SetUiManager (Gtk.UIManager uim)
 
52
                {
 
53
                        this.uimanager = uim;
 
54
                        this.child.Realized += new System.EventHandler (this.OnRealized);
 
55
                }
 
56
 
 
57
                private void OnRealized (object sender, System.EventArgs args)
 
58
                {
 
59
                        if ((this.uimanager != null)) {
 
60
                                Gtk.Widget w;
 
61
                                w = this.child.Toplevel;
 
62
                                if (((w != null) && typeof(Gtk.Window).IsInstanceOfType (w))) {
 
63
                                        ((Gtk.Window)(w)).AddAccelGroup (this.uimanager.AccelGroup);
 
64
                                        this.uimanager = null;
 
65
                                }
 
66
                        }
 
67
                }
 
68
        }
 
69
 
 
70
        internal class IconLoader
 
71
        {
 
72
                public static Gdk.Pixbuf LoadIcon (Gtk.Widget widget, string name, Gtk.IconSize size)
 
73
                {
 
74
                        Gdk.Pixbuf res = widget.RenderIcon (name, size, null);
 
75
                        if ((res != null)) {
 
76
                                return res;
 
77
                        } else {
 
78
                                int sz;
 
79
                                int sy;
 
80
                                global::Gtk.Icon.SizeLookup (size, out sz, out sy);
 
81
                                try {
 
82
                                        return Gtk.IconTheme.Default.LoadIcon (name, sz, 0);
 
83
                                } catch (System.Exception) {
 
84
                                        if ((name != "gtk-missing-image")) {
 
85
                                                return Stetic.IconLoader.LoadIcon (widget, "gtk-missing-image", size);
 
86
                                        } else {
 
87
                                                Gdk.Pixmap pmap = new Gdk.Pixmap (Gdk.Screen.Default.RootWindow, sz, sz);
 
88
                                                Gdk.GC gc = new Gdk.GC (pmap);
 
89
                                                gc.RgbFgColor = new Gdk.Color (255, 255, 255);
 
90
                                                pmap.DrawRectangle (gc, true, 0, 0, sz, sz);
 
91
                                                gc.RgbFgColor = new Gdk.Color (0, 0, 0);
 
92
                                                pmap.DrawRectangle (gc, false, 0, 0, (sz - 1), (sz - 1));
 
93
                                                gc.SetLineAttributes (3, Gdk.LineStyle.Solid, Gdk.CapStyle.Round, Gdk.JoinStyle.Round);
 
94
                                                gc.RgbFgColor = new Gdk.Color (255, 0, 0);
 
95
                                                pmap.DrawLine (gc, (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)), ((sz - 1) - (sz / 4)));
 
96
                                                pmap.DrawLine (gc, ((sz - 1) - (sz / 4)), (sz / 4), (sz / 4), ((sz - 1) - (sz / 4)));
 
97
                                                return Gdk.Pixbuf.FromDrawable (pmap, pmap.Colormap, 0, 0, 0, 0, sz, sz);
 
98
                                        }
 
99
                                }
 
100
                        }
 
101
                }
 
102
        }
 
103
 
 
104
        internal class ActionGroups
 
105
        {
 
106
                public static Gtk.ActionGroup GetActionGroup (System.Type type)
 
107
                {
 
108
                        return Stetic.ActionGroups.GetActionGroup (type.FullName);
 
109
                }
 
110
 
 
111
                public static Gtk.ActionGroup GetActionGroup (string name)
 
112
                {
 
113
                        return null;
 
114
                }
 
115
        }
114
116
}