Welcome to mirror list, hosted at ThFree Co, Russian Federation.

MainWindow.cs « gtk-gui « TextEditorLib « Samples - github.com/mono/mono-addins.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 7bd6cad70ab32facb261524b8172160e55959927 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
// ------------------------------------------------------------------------------
//  <autogenerated>
//      This code was generated by a tool.
//      
// 
//      Changes to this file may cause incorrect behavior and will be lost if 
//      the code is regenerated.
//  </autogenerated>
// ------------------------------------------------------------------------------



public partial class MainWindow {
    
    private Gtk.UIManager UIManager;
    
    private Gtk.VBox vbox2;
    
    private Gtk.MenuBar menubar;
    
    private Gtk.Toolbar toolbar;
    
    private Gtk.ScrolledWindow scrolledwindow1;
    
    private Gtk.TextView textview;
    
    private Gtk.VBox console;
    
    private Gtk.HBox hbox1;
    
    private Gtk.Label label1;
    
    private Gtk.Button button1;
    
    private Gtk.ScrolledWindow scrolledwindow2;
    
    private Gtk.TextView consoleView;
    
    private Gtk.Statusbar statusbar1;
    
    protected virtual void Build() {
        Stetic.Gui.Initialize(this);
        // Widget MainWindow
        this.UIManager = new Gtk.UIManager();
        Gtk.ActionGroup w1 = new Gtk.ActionGroup("Default");
        this.UIManager.InsertActionGroup(w1, 0);
        this.AddAccelGroup(this.UIManager.AccelGroup);
        this.Name = "MainWindow";
        this.Title = Mono.Unix.Catalog.GetString("Text Editor");
        // Container child MainWindow.Gtk.Container+ContainerChild
        this.vbox2 = new Gtk.VBox();
        this.vbox2.Name = "vbox2";
        // Container child vbox2.Gtk.Box+BoxChild
        this.UIManager.AddUiFromString("<ui><menubar name='menubar'/></ui>");
        this.menubar = ((Gtk.MenuBar)(this.UIManager.GetWidget("/menubar")));
        this.menubar.Name = "menubar";
        this.vbox2.Add(this.menubar);
        Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.menubar]));
        w2.Position = 0;
        w2.Expand = false;
        w2.Fill = false;
        // Container child vbox2.Gtk.Box+BoxChild
        this.UIManager.AddUiFromString("<ui><toolbar name='toolbar'/></ui>");
        this.toolbar = ((Gtk.Toolbar)(this.UIManager.GetWidget("/toolbar")));
        this.toolbar.Name = "toolbar";
        this.toolbar.ShowArrow = false;
        this.toolbar.ToolbarStyle = ((Gtk.ToolbarStyle)(0));
        this.vbox2.Add(this.toolbar);
        Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.toolbar]));
        w3.Position = 1;
        w3.Expand = false;
        w3.Fill = false;
        // Container child vbox2.Gtk.Box+BoxChild
        this.scrolledwindow1 = new Gtk.ScrolledWindow();
        this.scrolledwindow1.CanFocus = true;
        this.scrolledwindow1.Name = "scrolledwindow1";
        this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
        // Container child scrolledwindow1.Gtk.Container+ContainerChild
        this.textview = new Gtk.TextView();
        this.textview.CanFocus = true;
        this.textview.Name = "textview";
        this.scrolledwindow1.Add(this.textview);
        this.vbox2.Add(this.scrolledwindow1);
        Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.scrolledwindow1]));
        w5.Position = 2;
        // Container child vbox2.Gtk.Box+BoxChild
        this.console = new Gtk.VBox();
        this.console.Name = "console";
        this.console.Spacing = 6;
        this.console.BorderWidth = ((uint)(6));
        // Container child console.Gtk.Box+BoxChild
        this.hbox1 = new Gtk.HBox();
        this.hbox1.Name = "hbox1";
        // Container child hbox1.Gtk.Box+BoxChild
        this.label1 = new Gtk.Label();
        this.label1.Name = "label1";
        this.label1.Xalign = 0F;
        this.label1.LabelProp = Mono.Unix.Catalog.GetString("Console");
        this.hbox1.Add(this.label1);
        Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
        w6.Position = 0;
        w6.Expand = false;
        w6.Fill = false;
        // Container child hbox1.Gtk.Box+BoxChild
        this.button1 = new Gtk.Button();
        this.button1.WidthRequest = 27;
        this.button1.HeightRequest = 20;
        this.button1.Name = "button1";
        this.button1.UseUnderline = true;
        this.button1.Relief = ((Gtk.ReliefStyle)(2));
        // Container child button1.Gtk.Container+ContainerChild
        Gtk.Alignment w7 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
        // Container child GtkAlignment.Gtk.Container+ContainerChild
        Gtk.HBox w8 = new Gtk.HBox();
        w8.Spacing = 2;
        // Container child GtkHBox.Gtk.Container+ContainerChild
        Gtk.Image w9 = new Gtk.Image();
        w9.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-close", Gtk.IconSize.Menu, 16);
        w8.Add(w9);
        // Container child GtkHBox.Gtk.Container+ContainerChild
        Gtk.Label w11 = new Gtk.Label();
        w8.Add(w11);
        w7.Add(w8);
        this.button1.Add(w7);
        this.hbox1.Add(this.button1);
        Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox1[this.button1]));
        w15.PackType = ((Gtk.PackType)(1));
        w15.Position = 1;
        w15.Expand = false;
        w15.Fill = false;
        this.console.Add(this.hbox1);
        Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.console[this.hbox1]));
        w16.Position = 0;
        w16.Expand = false;
        w16.Fill = false;
        // Container child console.Gtk.Box+BoxChild
        this.scrolledwindow2 = new Gtk.ScrolledWindow();
        this.scrolledwindow2.CanFocus = true;
        this.scrolledwindow2.Name = "scrolledwindow2";
        this.scrolledwindow2.ShadowType = ((Gtk.ShadowType)(1));
        // Container child scrolledwindow2.Gtk.Container+ContainerChild
        this.consoleView = new Gtk.TextView();
        this.consoleView.CanFocus = true;
        this.consoleView.Name = "consoleView";
        this.scrolledwindow2.Add(this.consoleView);
        this.console.Add(this.scrolledwindow2);
        Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.console[this.scrolledwindow2]));
        w18.Position = 1;
        this.vbox2.Add(this.console);
        Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox2[this.console]));
        w19.Position = 3;
        w19.Expand = false;
        w19.Fill = false;
        // Container child vbox2.Gtk.Box+BoxChild
        this.statusbar1 = new Gtk.Statusbar();
        this.statusbar1.Name = "statusbar1";
        this.statusbar1.Spacing = 2;
        this.vbox2.Add(this.statusbar1);
        Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.vbox2[this.statusbar1]));
        w20.Position = 4;
        w20.Expand = false;
        w20.Fill = false;
        this.Add(this.vbox2);
        if ((this.Child != null)) {
            this.Child.ShowAll();
        }
        this.DefaultWidth = 586;
        this.DefaultHeight = 356;
        this.Show();
        this.DeleteEvent += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
        this.button1.Clicked += new System.EventHandler(this.OnButton1Clicked);
    }
}