~ubuntu-branches/ubuntu/hardy/monodevelop/hardy

« back to all changes in this revision

Viewing changes to Extras/Deployment/MonoDevelop.Deployment/gtk-gui/generated.cs

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Dröge
  • Date: 2007-07-16 13:29:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20070716132954-pzjpp1tbvotxw30v
Tags: 0.14+dfsg-1ubuntu1
* Sync with Debian, remaining changes:
  + debian/control:
    - Build depend on firefox-dev, depend on firefox.
    - Adjust Maintainer field.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// ------------------------------------------------------------------------------
 
2
//  <autogenerated>
 
3
//      This code was generated by a tool.
 
4
//      Mono Runtime Version: 2.0.50727.42
 
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
    
 
14
    internal class Gui {
 
15
        
 
16
        private static bool initialized;
 
17
        
 
18
        internal static void Initialize() {
 
19
            if ((Stetic.Gui.initialized == false)) {
 
20
                Stetic.Gui.initialized = true;
 
21
            }
 
22
        }
 
23
    }
 
24
    
 
25
    internal class BinContainer {
 
26
        
 
27
        private Gtk.Widget child;
 
28
        
 
29
        private Gtk.UIManager uimanager;
 
30
        
 
31
        public static BinContainer Attach(Gtk.Bin bin) {
 
32
            BinContainer bc = new BinContainer();
 
33
            bin.SizeRequested += new Gtk.SizeRequestedHandler(bc.OnSizeRequested);
 
34
            bin.SizeAllocated += new Gtk.SizeAllocatedHandler(bc.OnSizeAllocated);
 
35
            bin.Added += new Gtk.AddedHandler(bc.OnAdded);
 
36
            return bc;
 
37
        }
 
38
        
 
39
        private void OnSizeRequested(object sender, Gtk.SizeRequestedArgs args) {
 
40
            if ((this.child != null)) {
 
41
                args.Requisition = this.child.SizeRequest();
 
42
            }
 
43
        }
 
44
        
 
45
        private void OnSizeAllocated(object sender, Gtk.SizeAllocatedArgs args) {
 
46
            if ((this.child != null)) {
 
47
                this.child.Allocation = args.Allocation;
 
48
            }
 
49
        }
 
50
        
 
51
        private void OnAdded(object sender, Gtk.AddedArgs args) {
 
52
            this.child = args.Widget;
 
53
        }
 
54
        
 
55
        public void SetUiManager(Gtk.UIManager uim) {
 
56
            this.uimanager = uim;
 
57
            this.child.Realized += new System.EventHandler(this.OnRealized);
 
58
        }
 
59
        
 
60
        private void OnRealized(object sender, System.EventArgs args) {
 
61
            if ((this.uimanager != null)) {
 
62
                Gtk.Widget w;
 
63
                w = this.child.Toplevel;
 
64
                if (((w != null) && typeof(Gtk.Window).IsInstanceOfType(w))) {
 
65
                    ((Gtk.Window)(w)).AddAccelGroup(this.uimanager.AccelGroup);
 
66
                    this.uimanager = null;
 
67
                }
 
68
            }
 
69
        }
 
70
    }
 
71
    
 
72
    internal class ActionGroups {
 
73
        
 
74
        public static Gtk.ActionGroup GetActionGroup(System.Type type) {
 
75
            return Stetic.ActionGroups.GetActionGroup(type.FullName);
 
76
        }
 
77
        
 
78
        public static Gtk.ActionGroup GetActionGroup(string name) {
 
79
            return null;
 
80
        }
 
81
    }
 
82
}