예제 #1
0
        public PinnedWatchWidget(TextEditor editor, PinnedWatch watch)
        {
            objectValue = watch.Value;
            Editor      = editor;
            Watch       = watch;

            valueTree                = new ObjectValueTreeView();
            valueTree.AllowAdding    = false;
            valueTree.AllowEditing   = true;
            valueTree.AllowPinning   = true;
            valueTree.HeadersVisible = false;
            valueTree.CompactView    = true;
            valueTree.PinnedWatch    = watch;
            if (objectValue != null)
            {
                valueTree.AddValue(objectValue);
            }

            valueTree.ButtonPressEvent   += HandleValueTreeButtonPressEvent;
            valueTree.ButtonReleaseEvent += HandleValueTreeButtonReleaseEvent;
            valueTree.MotionNotifyEvent  += HandleValueTreeMotionNotifyEvent;

            Gtk.Frame fr = new Gtk.Frame();
            fr.ShadowType = Gtk.ShadowType.Out;
            fr.Add(valueTree);
            Add(fr);
            HandleEditorOptionsChanged(null, null);
            ShowAll();
            //unpin.Hide ();
            Editor.EditorOptionsChanged += HandleEditorOptionsChanged;

            DebuggingService.PausedEvent  += HandleDebuggingServicePausedEvent;
            DebuggingService.ResumedEvent += HandleDebuggingServiceResumedEvent;
        }
예제 #2
0
        public ImageSelectorEditor()
        {
            Spacing                = 3;
            imageFrame             = new Gtk.Frame();
            imageFrame.Shadow      = Gtk.ShadowType.In;
            imageFrame.BorderWidth = 2;
            PackStart(imageFrame, false, false, 0);

            image = new Gtk.Image(GnomeStock.Blank, Gtk.IconSize.Button);
            imageFrame.Add(image);

            Gtk.Frame frame = new Gtk.Frame();
            entry             = new Gtk.Label();
            entry.Xalign      = 0;
            frame.Shadow      = Gtk.ShadowType.In;
            frame.BorderWidth = 2;
            frame.Add(entry);
            PackStart(frame, true, true, 0);

            clearButton          = new Gtk.Button(new Gtk.Image(Gtk.Stock.Clear, Gtk.IconSize.Menu));
            clearButton.Clicked += OnClearImage;
            PackStart(clearButton, false, false, 0);

            button = new Gtk.Button("...");
            PackStart(button, false, false, 0);
            button.Clicked += button_Clicked;
            ShowAll();
        }
 public override void Initialize()
 {
     textView = new GtkMultilineTextEntry();
     Widget   = new Gtk.Frame();
     ((Gtk.Frame)Widget).Add(textView);
     ((Gtk.Frame)Widget).ShadowType = Gtk.ShadowType.In;
     Widget.ShowAll();
     ShowFrame = true;
     InitializeMultiLine();
 }
예제 #4
0
        public GtkSharpFrame(Widget shellobject, string caption)
            : base(shellobject)
        {
            frame = new Gtk.Frame(caption);
            GtkSharpDriver.InitWidget(frame, shellobject);
            frame.Show();

            fixchild = new Gtk.Fixed();
            frame.Add(fixchild);
            fixchild.Show();
        }
예제 #5
0
        Gtk.Widget CreateFakeItem()
        {
            Gtk.Frame frm = new Gtk.Frame();
            frm.ShadowType = Gtk.ShadowType.Out;
            int w, h;

            Gtk.Icon.SizeLookup(parentToolbar.IconSize, out w, out h);
            frm.WidthRequest  = w;
            frm.HeightRequest = h;
            return(frm);
        }
예제 #6
0
        Gtk.Widget GenerateButtonsForData(PaletteHeaderData data)
        {
            Gtk.Grid grid = new Gtk.Grid();

            if (data.IsResolvable)
            {
                System.Drawing.Color[][] colors = data.GetPalettes();

                int row = 0;
                int col = 0;

                int numCols = 8; // Reduce this to sort colors into separate rows

                for (int i = 0; i < data.NumPalettes; i++)
                {
                    Gtk.Box box = new Gtk.VBox();

                    for (int j = 0; j < 4; j++)
                    {
                        int paletteIndex = i;
                        int colorIndex   = j;

                        Cairo.Color     color  = CairoHelper.ConvertColor(colors[i][j]);
                        Gtk.ColorButton button = new Gtk.ColorButton(color.ToRGBA());
                        button.ColorSet += (sender, args) => {
                            data.SetColor(paletteIndex, colorIndex, button.Rgba.ToDrawingColor());
                        };
                        box.Add(button);
                    }

                    Gtk.Frame frame = new Gtk.Frame();
                    frame.Label       = (i + data.FirstPalette).ToString();
                    frame.LabelXalign = 0.5f;
                    frame.Add(box);
                    grid.Attach(frame, col, row, 1, 1);
                    col++;
                    if (col == numCols)
                    {
                        col = 0;
                        row++;
                    }
                }
            }

            Gtk.Frame outsideFrame = new Gtk.Frame();
            outsideFrame.Add(grid);
            outsideFrame.Label = data.PointerName
                                 + " [" + (data.PaletteType == PaletteType.Background ? "BG" : "OBJ") + "]";
            outsideFrame.LabelXalign = 0.5f;

            return(outsideFrame);
        }
예제 #7
0
        private void Build()
        {
            var frmFile = new Gtk.Frame( "" );
            var frmFormat = new Gtk.Frame( "" );
            var frmNumQuestions = new Gtk.Frame( "" );
            var hBoxFile = new Gtk.HBox( false, 5 );

            this.BuildIcons();

            // Frame labels
            ( (Gtk.Label) frmFile.LabelWidget ).Markup = "<b>File</b>";
            ( (Gtk.Label) frmFormat.LabelWidget ).Markup = "<b>Format</b>";
            ( (Gtk.Label) frmNumQuestions.LabelWidget ).Markup = "<b>Number of questions</b>";

            // File chooser
            this.edFileName = new Gtk.Entry { IsEditable = false };
            this.btSaveAs = new Gtk.Button( "..." );
            this.btSaveAs.Clicked += (sender, e) => this.OnSaveAsClicked();
            hBoxFile.PackStart( this.edFileName, true, true, 5 );
            hBoxFile.PackStart( this.btSaveAs, false, false, 5 );
            frmFile.Add( hBoxFile );

            // Combo box of formats
            this.cbFormat = new Gtk.ComboBox( new string[] {} );

            foreach(string f in Enum.GetNames( typeof( Transformer.Format ) ) ) {
                this.cbFormat.AppendText( f );
            }

            this.cbFormat.Active = 0;
            this.cbFormat.Changed += (sender, e) => this.UpdateExtensionHonoringFormat();
            frmFormat.Add( this.cbFormat );

            // Spinner for number of questions
            this.sbNumQuestions = new Gtk.SpinButton( 1, this.Document.CountQuestions, 1 );
            this.sbNumQuestions.Value = this.Document.CountQuestions;
            frmNumQuestions.Add( this.sbNumQuestions );

            // Layout
            this.VBox.PackStart( frmFile, true, true, 5 );
            this.VBox.PackStart( frmFormat, true, false, 5 );
            this.VBox.PackStart( frmNumQuestions, true, false, 5 );

            // Buttons
            this.btSave = new Gtk.Button( new Gtk.Image( this.iconSave ) );
            this.btSave.Clicked += (sender, e) => this.Respond( Gtk.ResponseType.Accept );
            this.btClose = new Gtk.Button( new Gtk.Image( this.iconClose ) );
            this.btClose.Clicked += (sender, e) => this.Respond( Gtk.ResponseType.Close );
            this.ActionArea.PackStart( btClose );
            this.ActionArea.PackStart( btSave );
            this.ShowAll();
        }
예제 #8
0
 public GrabDialog()
 {
     Decorated            = false;
     this.SkipPagerHint   = true;
     this.SkipTaskbarHint = true;
     this.WindowPosition  = Gtk.WindowPosition.CenterOnParent;
     Gtk.Frame f = new Gtk.Frame();
     f.Shadow = Gtk.ShadowType.Out;
     this.VBox.PackStart(f, true, true, 0);
     Gtk.Label lab = new Gtk.Label(Catalog.GetString("Press the key combination you want to assign to the accelerator..."));
     lab.Xpad = 12;
     lab.Ypad = 12;
     f.Add(lab);
     ShowAll();
 }
예제 #9
0
		// Drag function for automatic sources, called from DragBegin
		public static void Drag (Gtk.Widget source, Gdk.DragContext ctx, WidgetDropCallback dropCallback, string label)
		{
			Gtk.Frame fr = new Gtk.Frame ();
			fr.ShadowType = Gtk.ShadowType.Out;
			Gtk.HBox box = new Gtk.HBox ();
			box.Spacing = 3;
			box.BorderWidth = 3;
			box.PackStart (new Gtk.Image (widgetIcon), false, false, 0);
			Gtk.Label lab = new Gtk.Label (label);
			lab.Xalign = 0;
			box.PackStart (lab, true, true, 0);
			fr.Add (box);
			fr.ShowAll ();
			Drag (source, ctx, dropCallback, fr);
		}
예제 #10
0
 // Drag function for automatic sources, called from DragBegin
 public static void Drag(Gtk.Widget source, Gdk.DragContext ctx, WidgetDropCallback dropCallback, string label)
 {
     Gtk.Frame fr = new Gtk.Frame();
     fr.ShadowType = Gtk.ShadowType.Out;
     Gtk.HBox box = new Gtk.HBox();
     box.Spacing     = 3;
     box.BorderWidth = 3;
     box.PackStart(new Gtk.Image(widgetIcon), false, false, 0);
     Gtk.Label lab = new Gtk.Label(label);
     lab.Xalign = 0;
     box.PackStart(lab, true, true, 0);
     fr.Add(box);
     fr.ShowAll();
     Drag(source, ctx, dropCallback, fr);
 }
예제 #11
0
        ActionMenuItem InsertAction(Wrapper.Action action, int n)
        {
            uint row = (uint)n / columns;
            uint col = (uint)(n % columns) * 3;

            IDesignArea    designArea = GetDesignArea();
            ActionTreeNode node       = new ActionTreeNode(Gtk.UIManagerItemType.Menuitem, "", action);
            ActionMenuItem aitem      = new ActionMenuItem(designArea, project, this, node);

            aitem.KeyPressEvent += OnItemKeyPress;
            aitem.MinWidth       = 150;
            aitem.Attach(table, row, col);

            Gtk.Frame fr = new Gtk.Frame();
            fr.Shadow = Gtk.ShadowType.Out;
            aitem.Add(fr);

            items.Add(aitem);
            return(aitem);
        }
        public StockItemEditor()
        {
            Spacing                = 3;
            imageFrame             = new Gtk.Frame();
            imageFrame.Shadow      = Gtk.ShadowType.In;
            imageFrame.BorderWidth = 2;
            PackStart(imageFrame, false, false, 0);

            image = new Gtk.Image(GnomeStock.Blank, Gtk.IconSize.Button);
            imageFrame.Add(image);

            entry          = new Gtk.Entry();
            entry.Changed += OnTextChanged;
            entry.HasFrame = false;
            PackStart(entry, true, true, 0);

            button = new Gtk.Button();
            button.Add(new Gtk.Arrow(Gtk.ArrowType.Down, Gtk.ShadowType.Out));
            PackStart(button, false, false, 0);
            button.Clicked += button_Clicked;
            ShowAll();
        }
예제 #13
0
파일: StockItem.cs 프로젝트: mono/stetic
        public StockItemEditor()
        {
            Spacing = 3;
            imageFrame = new Gtk.Frame ();
            imageFrame.Shadow = Gtk.ShadowType.In;
            imageFrame.BorderWidth = 2;
            PackStart (imageFrame, false, false, 0);

            image = new Gtk.Image (Gnome.Stock.Blank, Gtk.IconSize.Button);
            imageFrame.Add (image);

            entry = new Gtk.Entry ();
            entry.Changed += OnTextChanged;
            entry.HasFrame = false;
            PackStart (entry, true, true, 0);

            button = new Gtk.Button ();
            button.Add (new Gtk.Arrow (Gtk.ArrowType.Down, Gtk.ShadowType.Out));
            PackStart (button, false, false, 0);
            button.Clicked += button_Clicked;
            ShowAll ();
        }
예제 #14
0
        public FileScout()
        {
            fb.DirectoryChangedEvent += new DirectoryChangedEventHandler (OnDirChanged);
            filelister.RowActivated += new Gtk.RowActivatedHandler (FileSelected);
            Runtime.ProjectService.CombineOpened += (CombineEventHandler) Runtime.DispatchService.GuiDispatch (new CombineEventHandler(OnCombineOpened));
            Runtime.ProjectService.CombineClosed += (CombineEventHandler) Runtime.DispatchService.GuiDispatch (new CombineEventHandler(OnCombineClosed));

            Gtk.Frame treef  = new Gtk.Frame ();
            treef.Add (fb);

            Gtk.ScrolledWindow listsw = new Gtk.ScrolledWindow ();
            listsw.ShadowType = Gtk.ShadowType.In;
            listsw.Add (filelister);

            this.Pack1 (treef, true, true);
            this.Pack2 (listsw, true, true);

            fb.SelectFirst ();

            OnDirChanged (fb.CurrentDir);
            this.ShowAll ();
        }
예제 #15
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.HTMLWidget
     Stetic.BinContainer.Attach(this);
     this.Name = "ocmgtk.HTMLWidget";
     // Container child ocmgtk.HTMLWidget.Gtk.Container+ContainerChild
     this.frame4 = new Gtk.Frame();
     this.frame4.Name = "frame4";
     this.frame4.ShadowType = ((Gtk.ShadowType)(0));
     this.frame4.LabelYalign = 0F;
     // Container child frame4.Gtk.Container+ContainerChild
     this.htmlScroll = new Gtk.ScrolledWindow();
     this.htmlScroll.CanFocus = true;
     this.htmlScroll.Name = "htmlScroll";
     this.htmlScroll.ShadowType = ((Gtk.ShadowType)(1));
     this.frame4.Add(this.htmlScroll);
     this.Add(this.frame4);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
예제 #16
0
        private void OnViewFrames()
        {
            var dlg = new Gtk.Dialog("Frames", this, Gtk.DialogFlags.Modal);

            var frame1 = new Gtk.Frame("<b>Frame1</b>");

            ((Gtk.Label)frame1.LabelWidget).UseMarkup = true;
            frame1.Add(new Gtk.Label("This is frame1"));
            var frame2 = new Gtk.Frame("<b>Frame2</b>");

            ((Gtk.Label)frame2.LabelWidget).UseMarkup = true;
            frame2.Add(new Gtk.Label("This is frame2"));
            var frame3 = new Gtk.Frame("<b>Frame3</b>");

            ((Gtk.Label)frame3.LabelWidget).UseMarkup = true;
            frame3.Add(new Gtk.Label("This is frame3"));


            dlg.VBox.PackStart(frame1, true, true, 5);
            dlg.VBox.PackStart(frame2, true, true, 5);
            dlg.VBox.PackStart(frame3, true, true, 5);

            dlg.SetGeometryHints(
                dlg,
                new Gdk.Geometry()
            {
                MinHeight = 200,
                MinWidth  = 320
            },
                Gdk.WindowHints.MinSize
                );

            dlg.AddButton("Ok", Gtk.ResponseType.Ok);
            dlg.ShowAll();
            dlg.Run();
            dlg.Destroy();
        }
예제 #17
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.HTMLWidget
     Stetic.BinContainer.Attach(this);
     this.Name = "ocmgtk.HTMLWidget";
     // Container child ocmgtk.HTMLWidget.Gtk.Container+ContainerChild
     this.frame4             = new Gtk.Frame();
     this.frame4.Name        = "frame4";
     this.frame4.ShadowType  = ((Gtk.ShadowType)(0));
     this.frame4.LabelYalign = 0F;
     // Container child frame4.Gtk.Container+ContainerChild
     this.htmlScroll            = new Gtk.ScrolledWindow();
     this.htmlScroll.CanFocus   = true;
     this.htmlScroll.Name       = "htmlScroll";
     this.htmlScroll.ShadowType = ((Gtk.ShadowType)(1));
     this.frame4.Add(this.htmlScroll);
     this.Add(this.frame4);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.Hide();
 }
예제 #18
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Pastebin.PastebinConfig
     Stetic.BinContainer.Attach(this);
     this.Name = "Pastebin.PastebinConfig";
     // Container child Pastebin.PastebinConfig.Gtk.Container+ContainerChild
     this.vbox1         = new Gtk.VBox();
     this.vbox1.Name    = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name        = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.cmbProvider      = Gtk.ComboBox.NewText();
     this.cmbProvider.Name = "cmbProvider";
     this.vbox2.Add(this.cmbProvider);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.cmbProvider]));
     w1.Position = 0;
     w1.Expand   = false;
     w1.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.lblCodes           = new Gtk.Label();
     this.lblCodes.Name      = "lblCodes";
     this.lblCodes.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Supported Codes\t\t\t");
     this.hbox1.Add(this.lblCodes);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.lblCodes]));
     w2.Position = 0;
     w2.Expand   = false;
     w2.Fill     = false;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w3.Position = 1;
     w3.Expand   = false;
     w3.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.GtkScrolledWindow            = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name       = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.treeCodes                = new Gtk.TreeView();
     this.treeCodes.CanFocus       = true;
     this.treeCodes.Name           = "treeCodes";
     this.treeCodes.EnableSearch   = false;
     this.treeCodes.HeadersVisible = false;
     this.GtkScrolledWindow.Add(this.treeCodes);
     this.vbox2.Add(this.GtkScrolledWindow);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.GtkScrolledWindow]));
     w5.Position = 2;
     this.GtkAlignment.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel3           = new Gtk.Label();
     this.GtkLabel3.Name      = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>Pastebin Provider</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel3;
     this.vbox1.Add(this.frame1);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1]));
     w8.Position = 0;
     this.Add(this.vbox1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.Show();
     this.cmbProvider.Changed += new System.EventHandler(this.cmbProviderChanged);
 }
예제 #19
0
        public GroupChatView(GroupChatModel groupChat)
            : base(groupChat)
        {
            Trace.Call(groupChat);

            _GroupChatModel = groupChat;

            // person list
            Participants = new List<PersonModel>();
            _OutputHPaned = new Gtk.HPaned();

            Gtk.TreeView tv = new Gtk.TreeView();
            _PersonTreeView = tv;
            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            PersonScrolledWindow = sw;
            sw.ShadowType = Gtk.ShadowType.None;
            sw.HscrollbarPolicy = Gtk.PolicyType.Never;

            //tv.CanFocus = false;
            tv.BorderWidth = 0;
            tv.Selection.Mode = Gtk.SelectionMode.Multiple;
            sw.Add(tv);

            Gtk.TreeViewColumn column;
            var cellr = new Gtk.CellRendererText() {
                Ellipsize = Pango.EllipsizeMode.End
            };
            IdentityNameCellRenderer = cellr;
            column = new Gtk.TreeViewColumn(String.Empty, cellr);
            column.SortColumnId = 0;
            column.Spacing = 0;
            column.SortIndicator = false;
            column.Expand = true;
            column.Sizing = Gtk.TreeViewColumnSizing.Autosize;
            // FIXME: this callback leaks memory
            column.SetCellDataFunc(cellr, new Gtk.TreeCellDataFunc(RenderPersonIdentityName));
            tv.AppendColumn(column);
            _IdentityNameColumn = column;

            Gtk.ListStore liststore = new Gtk.ListStore(typeof(PersonModel));
            liststore.SetSortColumnId(0, Gtk.SortType.Ascending);
            liststore.SetSortFunc(0, new Gtk.TreeIterCompareFunc(SortPersonListStore));
            _PersonListStore = liststore;

            tv.Model = liststore;
            tv.SearchColumn = 0;
            tv.SearchEqualFunc = (model, col, key, iter) => {
                var person = (PersonModel) model.GetValue(iter, col);
                // Ladies and gentlemen welcome to C
                // 0 means it matched but 0 as bool is false. So if it matches
                // we have to return false. Still not clear? true is false and
                // false is true, weirdo! If you think this is retarded,
                // yes it is.
                return !person.IdentityName.StartsWith(key, StringComparison.InvariantCultureIgnoreCase);
            };
            tv.EnableSearch = true;
            tv.HeadersVisible = false;
            tv.RowActivated += new Gtk.RowActivatedHandler(OnPersonsRowActivated);
            tv.FocusOutEvent += OnPersonTreeViewFocusOutEvent;

            // popup menu
            _PersonMenu = new Gtk.Menu();
            // don't loose the focus else we lose the selection too!
            // see OnPersonTreeViewFocusOutEvent()
            _PersonMenu.TakeFocus = false;
            _PersonMenu.Shown += OnPersonMenuShown;

            _PersonTreeView.ButtonPressEvent += _OnPersonTreeViewButtonPressEvent;
            _PersonTreeView.KeyPressEvent += OnPersonTreeViewKeyPressEvent;
            // frame needed for events when selecting something in the treeview
            _PersonTreeViewFrame = new Gtk.Frame() {
                ShadowType = Gtk.ShadowType.In
            };
            _PersonTreeViewFrame.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(_OnUserListButtonReleaseEvent);
            _PersonTreeViewFrame.Add(sw);

            // topic
            // don't worry, ApplyConfig() will add us to the OutputVBox!
            _OutputVBox = new Gtk.VBox() {
                Spacing = 1
            };

            _TopicTextView = new MessageTextView();
            _TopicTextView.Editable = false;
            _TopicTextView.WrapMode = Gtk.WrapMode.WordChar;
            _TopicScrolledWindow = new Gtk.ScrolledWindow();
            _TopicScrolledWindow.ShadowType = Gtk.ShadowType.In;
            _TopicScrolledWindow.HscrollbarPolicy = Gtk.PolicyType.Never;
            _TopicScrolledWindow.Add(_TopicTextView);
            // make sure the topic is invisible and remains by default and
            // visible when a topic gets set
            _TopicScrolledWindow.ShowAll();
            _TopicScrolledWindow.Visible = false;
            _TopicScrolledWindow.NoShowAll = true;
            _TopicScrolledWindow.SizeRequested += delegate(object o, Gtk.SizeRequestedArgs args) {
                // predict and set useful topic heigth
                int lineWidth, lineHeight;
                using (var layout = _TopicTextView.CreatePangoLayout("Test Topic")) {
                    layout.GetPixelSize(out lineWidth, out lineHeight);
                }
                var lineSpacing = _TopicTextView.PixelsAboveLines +
                                  _TopicTextView.PixelsBelowLines;
                var it = _TopicTextView.Buffer.StartIter;
                int newLines = 1;
                // move to end of next visual line
                while (_TopicTextView.ForwardDisplayLineEnd(ref it)) {
                    newLines++;
                    // calling ForwardDisplayLineEnd repeatedly stays on the same position
                    // therefor we move one cursor position further
                    it.ForwardCursorPosition();
                }
                newLines = Math.Min(newLines, 3);
                var bestSize = new Gtk.Requisition() {
                    Height = ((lineHeight + lineSpacing) * newLines) + 4
                };
                args.Requisition = bestSize;
            };

            Add(_OutputHPaned);

            //ApplyConfig(Frontend.UserConfig);

            ShowAll();
        }
예제 #20
0
        Gtk.Widget CreateFakeWidget(string typeName)
        {
            Stetic.Custom c = new Stetic.Custom();
            // Give it some default size
            c.WidthRequest  = 20;
            c.HeightRequest = 20;

            Gtk.Container box = null;

            switch (typeClassDescriptor.Name)
            {
            case "Gtk.Alignment":
                box = new Gtk.Alignment(0.5f, 0.5f, 1f, 1f);
                break;

            case "Gtk.Fixed":
                box = new Gtk.Alignment(0.5f, 0.5f, 1f, 1f);
                break;

            case "Gtk.Frame":
                box = new Gtk.Frame();
                break;

            case "Gtk.Box":
            case "Gtk.HBox":
            {
                Gtk.HBox cc = new Gtk.HBox();
                cc.PackStart(c, true, true, 0);
                return(cc);
            }

            case "Gtk.VBox":
            {
                Gtk.VBox cc = new Gtk.VBox();
                cc.PackStart(c, true, true, 0);
                return(cc);
            }

            case "Gtk.Paned":
            case "Gtk.VPaned":
            {
                Gtk.VPaned cc = new Gtk.VPaned();
                cc.Add1(c);
                return(cc);
            }

            case "Gtk.HPaned":
            {
                Gtk.HPaned cc = new Gtk.HPaned();
                cc.Add1(c);
                return(cc);
            }

            case "Gtk.Notebook":
            {
                Gtk.Notebook nb = new Gtk.Notebook();
                nb.ShowTabs = false;
                nb.AppendPage(c, null);
                return(nb);
            }

            case "Gtk.ScrolledWindow":
            {
                Gtk.ScrolledWindow cc = new Gtk.ScrolledWindow();
                cc.VscrollbarPolicy = Gtk.PolicyType.Never;
                cc.HscrollbarPolicy = Gtk.PolicyType.Never;
                cc.AddWithViewport(c);
                return(cc);
            }

            case "Gtk.Table":
            {
                Gtk.Table t = new Gtk.Table(1, 1, false);
                t.Attach(c, 0, 1, 0, 1);
                return(t);
            }

            case "Gtk.ButtonBox":
                return(new Gtk.HButtonBox());
            }
            if (box != null)
            {
                box.Add(c);
                return(box);
            }
            else
            {
                Stetic.CustomWidget custom = new Stetic.CustomWidget();
                if (custom.Child != null)
                {
                    custom.Remove(custom.Child);
                }
                custom.Add(c);
                return(custom);
            }
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget MainWindow
     this.Name           = "MainWindow";
     this.Title          = Mono.Unix.Catalog.GetString("(ymt5gui) mt5 to objf");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.BorderWidth    = ((uint)(3));
     // Container child MainWindow.Gtk.Container+ContainerChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame1      = new Gtk.Frame();
     this.frame1.Name = "frame1";
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name        = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox4         = new Gtk.VBox();
     this.vbox4.Name    = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.checkbutton2               = new Gtk.CheckButton();
     this.checkbutton2.CanFocus      = true;
     this.checkbutton2.Name          = "checkbutton2";
     this.checkbutton2.Label         = Mono.Unix.Catalog.GetString("extract all mt5 from directory");
     this.checkbutton2.DrawIndicator = true;
     this.checkbutton2.UseUnderline  = true;
     this.vbox4.Add(this.checkbutton2);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox4[this.checkbutton2]));
     w1.Position = 0;
     w1.Expand   = false;
     w1.Fill     = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.filechooserbutton1      = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Sélectionner un fichier"), ((Gtk.FileChooserAction)(0)));
     this.filechooserbutton1.Name = "filechooserbutton1";
     this.vbox4.Add(this.filechooserbutton1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox4[this.filechooserbutton1]));
     w2.Position = 1;
     w2.Expand   = false;
     w2.Fill     = false;
     this.GtkAlignment.Add(this.vbox4);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel2           = new Gtk.Label();
     this.GtkLabel2.Name      = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>M</b>T5 path");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel2;
     this.vbox2.Add(this.frame1);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame1]));
     w5.Position = 0;
     w5.Expand   = false;
     w5.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame2      = new Gtk.Frame();
     this.frame2.Name = "frame2";
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment1             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name        = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.vbox3         = new Gtk.VBox();
     this.vbox3.Name    = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.frame4            = new Gtk.Frame();
     this.frame4.Name       = "frame4";
     this.frame4.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame4.Gtk.Container+ContainerChild
     this.GtkAlignment3             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name        = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.filechooserbutton2      = new Gtk.FileChooserButton(Mono.Unix.Catalog.GetString("Sélectionner un fichier"), ((Gtk.FileChooserAction)(2)));
     this.filechooserbutton2.Name = "filechooserbutton2";
     this.GtkAlignment3.Add(this.filechooserbutton2);
     this.frame4.Add(this.GtkAlignment3);
     this.GtkLabel6           = new Gtk.Label();
     this.GtkLabel6.Name      = "GtkLabel6";
     this.GtkLabel6.LabelProp = Mono.Unix.Catalog.GetString("Output path to objf");
     this.GtkLabel6.UseMarkup = true;
     this.frame4.LabelWidget  = this.GtkLabel6;
     this.vbox3.Add(this.frame4);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox3[this.frame4]));
     w8.Position = 0;
     w8.Expand   = false;
     w8.Fill     = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.checkbutton1               = new Gtk.CheckButton();
     this.checkbutton1.CanFocus      = true;
     this.checkbutton1.Name          = "checkbutton1";
     this.checkbutton1.Label         = Mono.Unix.Catalog.GetString("do not use triangle strip (obj compatible)");
     this.checkbutton1.Active        = true;
     this.checkbutton1.DrawIndicator = true;
     this.checkbutton1.UseUnderline  = true;
     this.vbox3.Add(this.checkbutton1);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox3[this.checkbutton1]));
     w9.Position = 1;
     w9.Expand   = false;
     w9.Fill     = false;
     this.GtkAlignment1.Add(this.vbox3);
     this.frame2.Add(this.GtkAlignment1);
     this.GtkLabel5           = new Gtk.Label();
     this.GtkLabel5.Name      = "GtkLabel5";
     this.GtkLabel5.LabelProp = Mono.Unix.Catalog.GetString("<b>O</b>bjf pathes");
     this.GtkLabel5.UseMarkup = true;
     this.frame2.LabelWidget  = this.GtkLabel5;
     this.vbox2.Add(this.frame2);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame2]));
     w12.Position = 1;
     w12.Expand   = false;
     w12.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame3      = new Gtk.Frame();
     this.frame3.Name = "frame3";
     // Container child frame3.Gtk.Container+ContainerChild
     this.GtkAlignment2             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name        = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.button2              = new Gtk.Button();
     this.button2.CanFocus     = true;
     this.button2.Name         = "button2";
     this.button2.UseUnderline = true;
     this.button2.Label        = Mono.Unix.Catalog.GetString("Generate");
     this.hbox1.Add(this.button2);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox1[this.button2]));
     w13.Position = 0;
     w13.Expand   = false;
     w13.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.vbox1         = new Gtk.VBox();
     this.vbox1.Name    = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.progressbar1      = new Gtk.ProgressBar();
     this.progressbar1.Name = "progressbar1";
     this.vbox1.Add(this.progressbar1);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox1[this.progressbar1]));
     w14.Position = 0;
     w14.Expand   = false;
     w14.Fill     = false;
     this.hbox1.Add(this.vbox1);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox1]));
     w15.Position = 1;
     this.GtkAlignment2.Add(this.hbox1);
     this.frame3.Add(this.GtkAlignment2);
     this.GtkLabel10           = new Gtk.Label();
     this.GtkLabel10.Name      = "GtkLabel10";
     this.GtkLabel10.LabelProp = Mono.Unix.Catalog.GetString("<b>M</b>t52objf");
     this.GtkLabel10.UseMarkup = true;
     this.frame3.LabelWidget   = this.GtkLabel10;
     this.vbox2.Add(this.frame3);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame3]));
     w18.Position = 2;
     w18.Expand   = false;
     w18.Fill     = false;
     this.Add(this.vbox2);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 764;
     this.DefaultHeight = 218;
     this.Show();
     this.DeleteEvent          += new Gtk.DeleteEventHandler(this.OnDeleteEvent);
     this.checkbutton2.Toggled += new System.EventHandler(this.onMt5DirectoryToggle);
     this.button2.Clicked      += new System.EventHandler(this.OnButton2Clicked);
 }
예제 #22
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget LinuxGUITest.BalanceBoardInformation
     Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this);
     Gtk.UIManager       w2 = new Gtk.UIManager();
     Gtk.ActionGroup     w3 = new Gtk.ActionGroup("Default");
     this.BalanceBoardAction            = new Gtk.Action("BalanceBoardAction", Mono.Unix.Catalog.GetString("BalanceBoard"), null, null);
     this.BalanceBoardAction.ShortLabel = Mono.Unix.Catalog.GetString("BalanceBoard");
     w3.Add(this.BalanceBoardAction, null);
     this.DisconnectAction            = new Gtk.Action("DisconnectAction", Mono.Unix.Catalog.GetString("Disconnect"), null, null);
     this.DisconnectAction.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect");
     w3.Add(this.DisconnectAction, null);
     w2.InsertActionGroup(w3, 0);
     this.Name = "LinuxGUITest.BalanceBoardInformation";
     // Container child LinuxGUITest.BalanceBoardInformation.Gtk.Container+ContainerChild
     this.vbox1         = new Gtk.VBox();
     this.vbox1.Name    = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     w2.AddUiFromString("<ui><menubar name='menubar1'><menu action='BalanceBoardAction'><menuitem action='DisconnectAction'/></menu></menubar></ui>");
     this.menubar1      = ((Gtk.MenuBar)(w2.GetWidget("/menubar1")));
     this.menubar1.Name = "menubar1";
     this.vbox1.Add(this.menubar1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
     w4.Position = 0;
     w4.Expand   = false;
     w4.Fill     = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hseparator2      = new Gtk.HSeparator();
     this.hseparator2.Name = "hseparator2";
     this.vbox1.Add(this.hseparator2);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox1[this.hseparator2]));
     w5.Position = 1;
     w5.Expand   = false;
     w5.Fill     = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox4         = new Gtk.HBox();
     this.hbox4.Name    = "hbox4";
     this.hbox4.Spacing = 6;
     // Container child hbox4.Gtk.Box+BoxChild
     this.checkboxLed               = new Gtk.CheckButton();
     this.checkboxLed.CanFocus      = true;
     this.checkboxLed.Name          = "checkboxLed";
     this.checkboxLed.Label         = Mono.Unix.Catalog.GetString("Led");
     this.checkboxLed.DrawIndicator = true;
     this.checkboxLed.UseUnderline  = true;
     this.hbox4.Add(this.checkboxLed);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox4[this.checkboxLed]));
     w6.Position = 0;
     // Container child hbox4.Gtk.Box+BoxChild
     this.lblButton           = new Gtk.Label();
     this.lblButton.Name      = "lblButton";
     this.lblButton.LabelProp = Mono.Unix.Catalog.GetString("Button");
     this.hbox4.Add(this.lblButton);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox4[this.lblButton]));
     w7.Position = 1;
     w7.Expand   = false;
     w7.Fill     = false;
     // Container child hbox4.Gtk.Box+BoxChild
     this.entryButton               = new Gtk.Entry();
     this.entryButton.CanFocus      = true;
     this.entryButton.Name          = "entryButton";
     this.entryButton.IsEditable    = false;
     this.entryButton.InvisibleChar = '●';
     this.hbox4.Add(this.entryButton);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox4[this.entryButton]));
     w8.Position = 2;
     this.vbox1.Add(this.hbox4);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox4]));
     w9.Position = 2;
     w9.Expand   = false;
     w9.Fill     = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name        = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox3         = new Gtk.VBox();
     this.vbox3.Name    = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.table4               = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table4.Name          = "table4";
     this.table4.RowSpacing    = ((uint)(6));
     this.table4.ColumnSpacing = ((uint)(6));
     // Container child table4.Gtk.Table+TableChild
     this.entryBottomLeft               = new Gtk.Entry();
     this.entryBottomLeft.CanFocus      = true;
     this.entryBottomLeft.Name          = "entryBottomLeft";
     this.entryBottomLeft.IsEditable    = false;
     this.entryBottomLeft.InvisibleChar = '●';
     this.table4.Add(this.entryBottomLeft);
     Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table4[this.entryBottomLeft]));
     w10.TopAttach    = ((uint)(1));
     w10.BottomAttach = ((uint)(2));
     w10.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.entryBottomRight               = new Gtk.Entry();
     this.entryBottomRight.CanFocus      = true;
     this.entryBottomRight.Name          = "entryBottomRight";
     this.entryBottomRight.IsEditable    = false;
     this.entryBottomRight.InvisibleChar = '●';
     this.table4.Add(this.entryBottomRight);
     Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table4[this.entryBottomRight]));
     w11.TopAttach    = ((uint)(1));
     w11.BottomAttach = ((uint)(2));
     w11.LeftAttach   = ((uint)(1));
     w11.RightAttach  = ((uint)(2));
     w11.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.entryTopLeft               = new Gtk.Entry();
     this.entryTopLeft.CanFocus      = true;
     this.entryTopLeft.Name          = "entryTopLeft";
     this.entryTopLeft.IsEditable    = false;
     this.entryTopLeft.InvisibleChar = '●';
     this.table4.Add(this.entryTopLeft);
     Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table4[this.entryTopLeft]));
     w12.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.entryTopRight               = new Gtk.Entry();
     this.entryTopRight.CanFocus      = true;
     this.entryTopRight.Name          = "entryTopRight";
     this.entryTopRight.IsEditable    = false;
     this.entryTopRight.InvisibleChar = '●';
     this.table4.Add(this.entryTopRight);
     Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.table4[this.entryTopRight]));
     w13.LeftAttach  = ((uint)(1));
     w13.RightAttach = ((uint)(2));
     w13.YOptions    = ((Gtk.AttachOptions)(4));
     this.vbox3.Add(this.table4);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox3[this.table4]));
     w14.Position = 0;
     w14.Expand   = false;
     w14.Fill     = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.hbox3         = new Gtk.HBox();
     this.hbox3.Name    = "hbox3";
     this.hbox3.Spacing = 6;
     // Container child hbox3.Gtk.Box+BoxChild
     this.lblTotalWeight           = new Gtk.Label();
     this.lblTotalWeight.Name      = "lblTotalWeight";
     this.lblTotalWeight.LabelProp = Mono.Unix.Catalog.GetString("Total Weight");
     this.hbox3.Add(this.lblTotalWeight);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox3[this.lblTotalWeight]));
     w15.Position = 0;
     w15.Expand   = false;
     w15.Fill     = false;
     // Container child hbox3.Gtk.Box+BoxChild
     this.entryTotalWeight               = new Gtk.Entry();
     this.entryTotalWeight.CanFocus      = true;
     this.entryTotalWeight.Name          = "entryTotalWeight";
     this.entryTotalWeight.IsEditable    = false;
     this.entryTotalWeight.InvisibleChar = '●';
     this.hbox3.Add(this.entryTotalWeight);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox3[this.entryTotalWeight]));
     w16.Position = 1;
     // Container child hbox3.Gtk.Box+BoxChild
     this.entryAverageWeight               = new Gtk.Entry();
     this.entryAverageWeight.CanFocus      = true;
     this.entryAverageWeight.Name          = "entryAverageWeight";
     this.entryAverageWeight.IsEditable    = false;
     this.entryAverageWeight.InvisibleChar = '●';
     this.hbox3.Add(this.entryAverageWeight);
     Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.hbox3[this.entryAverageWeight]));
     w17.PackType = ((Gtk.PackType)(1));
     w17.Position = 2;
     // Container child hbox3.Gtk.Box+BoxChild
     this.labelAverageWeight           = new Gtk.Label();
     this.labelAverageWeight.Name      = "labelAverageWeight";
     this.labelAverageWeight.LabelProp = Mono.Unix.Catalog.GetString("Average");
     this.hbox3.Add(this.labelAverageWeight);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.hbox3[this.labelAverageWeight]));
     w18.PackType = ((Gtk.PackType)(1));
     w18.Position = 3;
     w18.Expand   = false;
     w18.Fill     = false;
     this.vbox3.Add(this.hbox3);
     Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3]));
     w19.Position = 1;
     w19.Expand   = false;
     w19.Fill     = false;
     this.GtkAlignment.Add(this.vbox3);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel2           = new Gtk.Label();
     this.GtkLabel2.Name      = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Weight Sensors</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel2;
     this.vbox1.Add(this.frame1);
     Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1]));
     w22.Position = 3;
     w22.Expand   = false;
     w22.Fill     = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame2            = new Gtk.Frame();
     this.frame2.Name       = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment1             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name        = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.drawingareaBalance      = new Gtk.DrawingArea();
     this.drawingareaBalance.Name = "drawingareaBalance";
     this.GtkAlignment1.Add(this.drawingareaBalance);
     this.frame2.Add(this.GtkAlignment1);
     this.GtkLabel3           = new Gtk.Label();
     this.GtkLabel3.Name      = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>Balance</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame2.LabelWidget  = this.GtkLabel3;
     this.vbox1.Add(this.frame2);
     Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2]));
     w25.Position = 4;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.btnUpdateBattery              = new Gtk.Button();
     this.btnUpdateBattery.CanFocus     = true;
     this.btnUpdateBattery.Name         = "btnUpdateBattery";
     this.btnUpdateBattery.UseUnderline = true;
     this.btnUpdateBattery.Label        = Mono.Unix.Catalog.GetString("Update Battery");
     this.hbox1.Add(this.btnUpdateBattery);
     Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnUpdateBattery]));
     w26.Position = 0;
     w26.Expand   = false;
     w26.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.progressbar1      = new Gtk.ProgressBar();
     this.progressbar1.Name = "progressbar1";
     this.hbox1.Add(this.progressbar1);
     Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.hbox1[this.progressbar1]));
     w27.Position = 1;
     this.vbox1.Add(this.hbox1);
     Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
     w28.Position = 5;
     w28.Expand   = false;
     w28.Fill     = false;
     this.Add(this.vbox1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     w1.SetUiManager(w2);
     this.Show();
     this.DisconnectAction.Activated     += new System.EventHandler(this.OnDisconnectActionActivated);
     this.checkboxLed.Pressed            += new System.EventHandler(this.OnCheckboxLedPressed);
     this.drawingareaBalance.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingareaBalanceExposeEvent);
     this.btnUpdateBattery.Pressed       += new System.EventHandler(this.OnBtnUpdateBatteryPressed);
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget LinuxGUITest.BalanceBoardInformation
     Stetic.BinContainer w1 = Stetic.BinContainer.Attach(this);
     Gtk.UIManager w2 = new Gtk.UIManager();
     Gtk.ActionGroup w3 = new Gtk.ActionGroup("Default");
     this.BalanceBoardAction = new Gtk.Action("BalanceBoardAction", Mono.Unix.Catalog.GetString("BalanceBoard"), null, null);
     this.BalanceBoardAction.ShortLabel = Mono.Unix.Catalog.GetString("BalanceBoard");
     w3.Add(this.BalanceBoardAction, null);
     this.DisconnectAction = new Gtk.Action("DisconnectAction", Mono.Unix.Catalog.GetString("Disconnect"), null, null);
     this.DisconnectAction.ShortLabel = Mono.Unix.Catalog.GetString("Disconnect");
     w3.Add(this.DisconnectAction, null);
     w2.InsertActionGroup(w3, 0);
     this.Name = "LinuxGUITest.BalanceBoardInformation";
     // Container child LinuxGUITest.BalanceBoardInformation.Gtk.Container+ContainerChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     w2.AddUiFromString("<ui><menubar name='menubar1'><menu action='BalanceBoardAction'><menuitem action='DisconnectAction'/></menu></menubar></ui>");
     this.menubar1 = ((Gtk.MenuBar)(w2.GetWidget("/menubar1")));
     this.menubar1.Name = "menubar1";
     this.vbox1.Add(this.menubar1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hseparator2 = new Gtk.HSeparator();
     this.hseparator2.Name = "hseparator2";
     this.vbox1.Add(this.hseparator2);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox1[this.hseparator2]));
     w5.Position = 1;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox4 = new Gtk.HBox();
     this.hbox4.Name = "hbox4";
     this.hbox4.Spacing = 6;
     // Container child hbox4.Gtk.Box+BoxChild
     this.checkboxLed = new Gtk.CheckButton();
     this.checkboxLed.CanFocus = true;
     this.checkboxLed.Name = "checkboxLed";
     this.checkboxLed.Label = Mono.Unix.Catalog.GetString("Led");
     this.checkboxLed.DrawIndicator = true;
     this.checkboxLed.UseUnderline = true;
     this.hbox4.Add(this.checkboxLed);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox4[this.checkboxLed]));
     w6.Position = 0;
     // Container child hbox4.Gtk.Box+BoxChild
     this.lblButton = new Gtk.Label();
     this.lblButton.Name = "lblButton";
     this.lblButton.LabelProp = Mono.Unix.Catalog.GetString("Button");
     this.hbox4.Add(this.lblButton);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.hbox4[this.lblButton]));
     w7.Position = 1;
     w7.Expand = false;
     w7.Fill = false;
     // Container child hbox4.Gtk.Box+BoxChild
     this.entryButton = new Gtk.Entry();
     this.entryButton.CanFocus = true;
     this.entryButton.Name = "entryButton";
     this.entryButton.IsEditable = false;
     this.entryButton.InvisibleChar = '●';
     this.hbox4.Add(this.entryButton);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox4[this.entryButton]));
     w8.Position = 2;
     this.vbox1.Add(this.hbox4);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox4]));
     w9.Position = 2;
     w9.Expand = false;
     w9.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.table4 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table4.Name = "table4";
     this.table4.RowSpacing = ((uint)(6));
     this.table4.ColumnSpacing = ((uint)(6));
     // Container child table4.Gtk.Table+TableChild
     this.entryBottomLeft = new Gtk.Entry();
     this.entryBottomLeft.CanFocus = true;
     this.entryBottomLeft.Name = "entryBottomLeft";
     this.entryBottomLeft.IsEditable = false;
     this.entryBottomLeft.InvisibleChar = '●';
     this.table4.Add(this.entryBottomLeft);
     Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table4[this.entryBottomLeft]));
     w10.TopAttach = ((uint)(1));
     w10.BottomAttach = ((uint)(2));
     w10.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.entryBottomRight = new Gtk.Entry();
     this.entryBottomRight.CanFocus = true;
     this.entryBottomRight.Name = "entryBottomRight";
     this.entryBottomRight.IsEditable = false;
     this.entryBottomRight.InvisibleChar = '●';
     this.table4.Add(this.entryBottomRight);
     Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table4[this.entryBottomRight]));
     w11.TopAttach = ((uint)(1));
     w11.BottomAttach = ((uint)(2));
     w11.LeftAttach = ((uint)(1));
     w11.RightAttach = ((uint)(2));
     w11.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.entryTopLeft = new Gtk.Entry();
     this.entryTopLeft.CanFocus = true;
     this.entryTopLeft.Name = "entryTopLeft";
     this.entryTopLeft.IsEditable = false;
     this.entryTopLeft.InvisibleChar = '●';
     this.table4.Add(this.entryTopLeft);
     Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table4[this.entryTopLeft]));
     w12.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.entryTopRight = new Gtk.Entry();
     this.entryTopRight.CanFocus = true;
     this.entryTopRight.Name = "entryTopRight";
     this.entryTopRight.IsEditable = false;
     this.entryTopRight.InvisibleChar = '●';
     this.table4.Add(this.entryTopRight);
     Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.table4[this.entryTopRight]));
     w13.LeftAttach = ((uint)(1));
     w13.RightAttach = ((uint)(2));
     w13.YOptions = ((Gtk.AttachOptions)(4));
     this.vbox3.Add(this.table4);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox3[this.table4]));
     w14.Position = 0;
     w14.Expand = false;
     w14.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.hbox3 = new Gtk.HBox();
     this.hbox3.Name = "hbox3";
     this.hbox3.Spacing = 6;
     // Container child hbox3.Gtk.Box+BoxChild
     this.lblTotalWeight = new Gtk.Label();
     this.lblTotalWeight.Name = "lblTotalWeight";
     this.lblTotalWeight.LabelProp = Mono.Unix.Catalog.GetString("Total Weight");
     this.hbox3.Add(this.lblTotalWeight);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox3[this.lblTotalWeight]));
     w15.Position = 0;
     w15.Expand = false;
     w15.Fill = false;
     // Container child hbox3.Gtk.Box+BoxChild
     this.entryTotalWeight = new Gtk.Entry();
     this.entryTotalWeight.CanFocus = true;
     this.entryTotalWeight.Name = "entryTotalWeight";
     this.entryTotalWeight.IsEditable = false;
     this.entryTotalWeight.InvisibleChar = '●';
     this.hbox3.Add(this.entryTotalWeight);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox3[this.entryTotalWeight]));
     w16.Position = 1;
     // Container child hbox3.Gtk.Box+BoxChild
     this.entryAverageWeight = new Gtk.Entry();
     this.entryAverageWeight.CanFocus = true;
     this.entryAverageWeight.Name = "entryAverageWeight";
     this.entryAverageWeight.IsEditable = false;
     this.entryAverageWeight.InvisibleChar = '●';
     this.hbox3.Add(this.entryAverageWeight);
     Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.hbox3[this.entryAverageWeight]));
     w17.PackType = ((Gtk.PackType)(1));
     w17.Position = 2;
     // Container child hbox3.Gtk.Box+BoxChild
     this.labelAverageWeight = new Gtk.Label();
     this.labelAverageWeight.Name = "labelAverageWeight";
     this.labelAverageWeight.LabelProp = Mono.Unix.Catalog.GetString("Average");
     this.hbox3.Add(this.labelAverageWeight);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.hbox3[this.labelAverageWeight]));
     w18.PackType = ((Gtk.PackType)(1));
     w18.Position = 3;
     w18.Expand = false;
     w18.Fill = false;
     this.vbox3.Add(this.hbox3);
     Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbox3]));
     w19.Position = 1;
     w19.Expand = false;
     w19.Fill = false;
     this.GtkAlignment.Add(this.vbox3);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel2 = new Gtk.Label();
     this.GtkLabel2.Name = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Weight Sensors</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel2;
     this.vbox1.Add(this.frame1);
     Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1]));
     w22.Position = 3;
     w22.Expand = false;
     w22.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame2 = new Gtk.Frame();
     this.frame2.Name = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.drawingareaBalance = new Gtk.DrawingArea();
     this.drawingareaBalance.Name = "drawingareaBalance";
     this.GtkAlignment1.Add(this.drawingareaBalance);
     this.frame2.Add(this.GtkAlignment1);
     this.GtkLabel3 = new Gtk.Label();
     this.GtkLabel3.Name = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>Balance</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame2.LabelWidget = this.GtkLabel3;
     this.vbox1.Add(this.frame2);
     Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2]));
     w25.Position = 4;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.btnUpdateBattery = new Gtk.Button();
     this.btnUpdateBattery.CanFocus = true;
     this.btnUpdateBattery.Name = "btnUpdateBattery";
     this.btnUpdateBattery.UseUnderline = true;
     this.btnUpdateBattery.Label = Mono.Unix.Catalog.GetString("Update Battery");
     this.hbox1.Add(this.btnUpdateBattery);
     Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.hbox1[this.btnUpdateBattery]));
     w26.Position = 0;
     w26.Expand = false;
     w26.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.progressbar1 = new Gtk.ProgressBar();
     this.progressbar1.Name = "progressbar1";
     this.hbox1.Add(this.progressbar1);
     Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.hbox1[this.progressbar1]));
     w27.Position = 1;
     this.vbox1.Add(this.hbox1);
     Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
     w28.Position = 5;
     w28.Expand = false;
     w28.Fill = false;
     this.Add(this.vbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     w1.SetUiManager(w2);
     this.Show();
     this.DisconnectAction.Activated += new System.EventHandler(this.OnDisconnectActionActivated);
     this.checkboxLed.Pressed += new System.EventHandler(this.OnCheckboxLedPressed);
     this.drawingareaBalance.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingareaBalanceExposeEvent);
     this.btnUpdateBattery.Pressed += new System.EventHandler(this.OnBtnUpdateBatteryPressed);
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget mperfmon.NewCounter
     this.Name           = "mperfmon.NewCounter";
     this.Title          = Mono.Unix.Catalog.GetString("Add performance counter");
     this.TypeHint       = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.HasSeparator   = false;
     // Internal child mperfmon.NewCounter.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.table2               = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table2.Name          = "table2";
     this.table2.RowSpacing    = ((uint)(6));
     this.table2.ColumnSpacing = ((uint)(6));
     // Container child table2.Gtk.Table+TableChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment3             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name        = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.GtkScrolledWindow            = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name       = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.counters                  = new Gtk.TreeView();
     this.counters.CanFocus         = true;
     this.counters.Name             = "counters";
     this.counters.HeadersClickable = true;
     this.GtkScrolledWindow.Add(this.counters);
     this.GtkAlignment3.Add(this.GtkScrolledWindow);
     this.frame1.Add(this.GtkAlignment3);
     this.GtkLabel3           = new Gtk.Label();
     this.GtkLabel3.Name      = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>Counters:</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel3;
     this.table2.Add(this.frame1);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table2[this.frame1]));
     w5.TopAttach    = ((uint)(1));
     w5.BottomAttach = ((uint)(2));
     // Container child table2.Gtk.Table+TableChild
     this.frame2            = new Gtk.Frame();
     this.frame2.Name       = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment2             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name        = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.GtkScrolledWindow1            = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow1.Name       = "GtkScrolledWindow1";
     this.GtkScrolledWindow1.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
     this.instances                  = new Gtk.TreeView();
     this.instances.CanFocus         = true;
     this.instances.Name             = "instances";
     this.instances.HeadersClickable = true;
     this.GtkScrolledWindow1.Add(this.instances);
     this.GtkAlignment2.Add(this.GtkScrolledWindow1);
     this.frame2.Add(this.GtkAlignment2);
     this.GtkLabel2           = new Gtk.Label();
     this.GtkLabel2.Name      = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Instances:</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame2.LabelWidget  = this.GtkLabel2;
     this.table2.Add(this.frame2);
     Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table2[this.frame2]));
     w9.TopAttach    = ((uint)(1));
     w9.BottomAttach = ((uint)(2));
     w9.LeftAttach   = ((uint)(1));
     w9.RightAttach  = ((uint)(2));
     // Container child table2.Gtk.Table+TableChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label1           = new Gtk.Label();
     this.label1.Name      = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Category");
     this.hbox1.Add(this.label1);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
     w10.Position = 0;
     w10.Expand   = false;
     w10.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.categories        = Gtk.ComboBox.NewText();
     this.categories.Name   = "categories";
     this.categories.Active = 0;
     this.hbox1.Add(this.categories);
     Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox1[this.categories]));
     w11.Position = 1;
     w11.Expand   = false;
     w11.Fill     = false;
     this.table2.Add(this.hbox1);
     Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table2[this.hbox1]));
     w12.RightAttach = ((uint)(2));
     w12.XOptions    = ((Gtk.AttachOptions)(0));
     w12.YOptions    = ((Gtk.AttachOptions)(4));
     w1.Add(this.table2);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(w1[this.table2]));
     w13.Position = 0;
     w13.Padding  = ((uint)(6));
     // Internal child mperfmon.NewCounter.ActionArea
     Gtk.HButtonBox w14 = this.ActionArea;
     w14.Name        = "dialog1_ActionArea";
     w14.Spacing     = 6;
     w14.BorderWidth = ((uint)(5));
     w14.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w15 = ((Gtk.ButtonBox.ButtonBoxChild)(w14[this.buttonCancel]));
     w15.Expand = false;
     w15.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w16 = ((Gtk.ButtonBox.ButtonBoxChild)(w14[this.buttonOk]));
     w16.Position = 1;
     w16.Expand   = false;
     w16.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 565;
     this.DefaultHeight = 359;
     this.Show();
     this.categories.Changed    += new System.EventHandler(this.OnCategorySelected);
     this.counters.RowActivated += new Gtk.RowActivatedHandler(this.OnCounterRow);
 }
 protected virtual void Build() {
     Stetic.Gui.Initialize();
     // Widget CBinding.CodeGenerationPanel
     Stetic.BinContainer.Attach(this);
     this.Name = "CBinding.CodeGenerationPanel";
     // Container child CBinding.CodeGenerationPanel.Gtk.Container+ContainerChild
     this.notebook1 = new Gtk.Notebook();
     this.notebook1.CanFocus = true;
     this.notebook1.Name = "notebook1";
     this.notebook1.CurrentPage = 0;
     // Container child notebook1.Gtk.Notebook+NotebookChild
     this.vbox6 = new Gtk.VBox();
     this.vbox6.Name = "vbox6";
     this.vbox6.Spacing = 3;
     // Container child vbox6.Gtk.Box+BoxChild
     this.table1 = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
     this.table1.Name = "table1";
     this.table1.RowSpacing = ((uint)(5));
     this.table1.ColumnSpacing = ((uint)(5));
     this.table1.BorderWidth = ((uint)(2));
     // Container child table1.Gtk.Table+TableChild
     this.label4 = new Gtk.Label();
     this.label4.Name = "label4";
     this.label4.Xpad = 10;
     this.label4.Xalign = 0F;
     this.label4.LabelProp = Mono.Unix.Catalog.GetString("Warning Level:");
     this.table1.Add(this.label4);
     Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
     w1.XOptions = ((Gtk.AttachOptions)(4));
     w1.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label5 = new Gtk.Label();
     this.label5.Name = "label5";
     this.label5.Xpad = 10;
     this.label5.Xalign = 0F;
     this.label5.LabelProp = Mono.Unix.Catalog.GetString("Optimization Level:");
     this.table1.Add(this.label5);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.label5]));
     w2.TopAttach = ((uint)(1));
     w2.BottomAttach = ((uint)(2));
     w2.XOptions = ((Gtk.AttachOptions)(4));
     w2.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label6 = new Gtk.Label();
     this.label6.Name = "label6";
     this.label6.Xpad = 10;
     this.label6.Xalign = 0F;
     this.label6.LabelProp = Mono.Unix.Catalog.GetString("Target:");
     this.table1.Add(this.label6);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.label6]));
     w3.TopAttach = ((uint)(2));
     w3.BottomAttach = ((uint)(3));
     w3.XOptions = ((Gtk.AttachOptions)(4));
     w3.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.optimizationSpinButton = new Gtk.SpinButton(0, 3, 1);
     this.optimizationSpinButton.CanFocus = true;
     this.optimizationSpinButton.Name = "optimizationSpinButton";
     this.optimizationSpinButton.Adjustment.PageIncrement = 10;
     this.optimizationSpinButton.ClimbRate = 1;
     this.optimizationSpinButton.Numeric = true;
     this.table1.Add(this.optimizationSpinButton);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.optimizationSpinButton]));
     w4.TopAttach = ((uint)(1));
     w4.BottomAttach = ((uint)(2));
     w4.LeftAttach = ((uint)(1));
     w4.RightAttach = ((uint)(2));
     w4.XOptions = ((Gtk.AttachOptions)(4));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.targetComboBox = Gtk.ComboBox.NewText();
     this.targetComboBox.AppendText(Mono.Unix.Catalog.GetString("Executable"));
     this.targetComboBox.AppendText(Mono.Unix.Catalog.GetString("Static Library"));
     this.targetComboBox.AppendText(Mono.Unix.Catalog.GetString("Shared Object"));
     this.targetComboBox.Name = "targetComboBox";
     this.table1.Add(this.targetComboBox);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.targetComboBox]));
     w5.TopAttach = ((uint)(2));
     w5.BottomAttach = ((uint)(3));
     w5.LeftAttach = ((uint)(1));
     w5.RightAttach = ((uint)(2));
     w5.XOptions = ((Gtk.AttachOptions)(4));
     w5.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 1;
     // Container child vbox1.Gtk.Box+BoxChild
     this.noWarningRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("no warnings"));
     this.noWarningRadio.CanFocus = true;
     this.noWarningRadio.Name = "noWarningRadio";
     this.noWarningRadio.Active = true;
     this.noWarningRadio.DrawIndicator = true;
     this.noWarningRadio.UseUnderline = true;
     this.noWarningRadio.Group = new GLib.SList(System.IntPtr.Zero);
     this.vbox1.Add(this.noWarningRadio);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox1[this.noWarningRadio]));
     w6.Position = 0;
     w6.Expand = false;
     w6.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.normalWarningRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("normal"));
     this.normalWarningRadio.CanFocus = true;
     this.normalWarningRadio.Name = "normalWarningRadio";
     this.normalWarningRadio.DrawIndicator = true;
     this.normalWarningRadio.UseUnderline = true;
     this.normalWarningRadio.Group = this.noWarningRadio.Group;
     this.vbox1.Add(this.normalWarningRadio);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox1[this.normalWarningRadio]));
     w7.Position = 1;
     w7.Expand = false;
     w7.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.allWarningRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("all"));
     this.allWarningRadio.CanFocus = true;
     this.allWarningRadio.Name = "allWarningRadio";
     this.allWarningRadio.DrawIndicator = true;
     this.allWarningRadio.UseUnderline = true;
     this.allWarningRadio.Group = this.noWarningRadio.Group;
     this.vbox1.Add(this.allWarningRadio);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.vbox1[this.allWarningRadio]));
     w8.Position = 2;
     w8.Expand = false;
     w8.Fill = false;
     this.table1.Add(this.vbox1);
     Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table1[this.vbox1]));
     w9.LeftAttach = ((uint)(1));
     w9.RightAttach = ((uint)(2));
     w9.XOptions = ((Gtk.AttachOptions)(4));
     w9.YOptions = ((Gtk.AttachOptions)(4));
     this.vbox6.Add(this.table1);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox6[this.table1]));
     w10.Position = 0;
     w10.Expand = false;
     w10.Fill = false;
     // Container child vbox6.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label12 = new Gtk.Label();
     this.label12.Name = "label12";
     this.label12.Xpad = 13;
     this.label12.Xalign = 0F;
     this.label12.LabelProp = Mono.Unix.Catalog.GetString("Define Symbols:");
     this.hbox1.Add(this.label12);
     Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox1[this.label12]));
     w11.Position = 0;
     w11.Expand = false;
     w11.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.defineSymbolsTextEntry = new Gtk.Entry();
     Gtk.Tooltips w12 = new Gtk.Tooltips();
     w12.SetTip(this.defineSymbolsTextEntry, "A space seperated list of symbols to define.", "A space seperated list of symbols to define.");
     this.defineSymbolsTextEntry.CanFocus = true;
     this.defineSymbolsTextEntry.Name = "defineSymbolsTextEntry";
     this.defineSymbolsTextEntry.IsEditable = true;
     this.defineSymbolsTextEntry.InvisibleChar = '●';
     this.hbox1.Add(this.defineSymbolsTextEntry);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox1[this.defineSymbolsTextEntry]));
     w13.Position = 1;
     w13.Padding = ((uint)(14));
     this.vbox6.Add(this.hbox1);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox6[this.hbox1]));
     w14.Position = 1;
     w14.Expand = false;
     w14.Fill = false;
     // Container child vbox6.Gtk.Box+BoxChild
     this.frame2 = new Gtk.Frame();
     this.frame2.Name = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     this.frame2.LabelXalign = 0F;
     this.frame2.LabelYalign = 0F;
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.table5 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table5.Name = "table5";
     this.table5.RowSpacing = ((uint)(6));
     this.table5.ColumnSpacing = ((uint)(9));
     this.table5.BorderWidth = ((uint)(6));
     // Container child table5.Gtk.Table+TableChild
     this.label11 = new Gtk.Label();
     this.label11.Name = "label11";
     this.label11.Xalign = 0F;
     this.label11.LabelProp = Mono.Unix.Catalog.GetString("Extra Linker Options");
     this.table5.Add(this.label11);
     Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(this.table5[this.label11]));
     w15.LeftAttach = ((uint)(1));
     w15.RightAttach = ((uint)(2));
     w15.XOptions = ((Gtk.AttachOptions)(4));
     w15.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table5.Gtk.Table+TableChild
     this.label7 = new Gtk.Label();
     this.label7.Name = "label7";
     this.label7.Xalign = 0F;
     this.label7.LabelProp = Mono.Unix.Catalog.GetString("Extra Compiler Options");
     this.table5.Add(this.label7);
     Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.table5[this.label7]));
     w16.XOptions = ((Gtk.AttachOptions)(4));
     w16.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table5.Gtk.Table+TableChild
     this.scrolledwindow4 = new Gtk.ScrolledWindow();
     this.scrolledwindow4.CanFocus = true;
     this.scrolledwindow4.Name = "scrolledwindow4";
     this.scrolledwindow4.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow4.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow4.ShadowType = ((Gtk.ShadowType)(1));
     // Container child scrolledwindow4.Gtk.Container+ContainerChild
     this.extraCompilerTextView = new Gtk.TextView();
     w12.SetTip(this.extraCompilerTextView, "A newline seperated list of extra options to send to the compiler.\nOne option can be in more than one line.\nExample:\n\t`pkg-config\n\t--cflags\n\tcairo`", "A newline seperated list of extra options to send to the compiler.\nOne option can be in more than one line.\nExample:\n\t`pkg-config\n\t--cflags\n\tcairo`");
     this.extraCompilerTextView.CanFocus = true;
     this.extraCompilerTextView.Name = "extraCompilerTextView";
     this.scrolledwindow4.Add(this.extraCompilerTextView);
     this.table5.Add(this.scrolledwindow4);
     Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table5[this.scrolledwindow4]));
     w18.TopAttach = ((uint)(1));
     w18.BottomAttach = ((uint)(2));
     // Container child table5.Gtk.Table+TableChild
     this.scrolledwindow5 = new Gtk.ScrolledWindow();
     this.scrolledwindow5.CanFocus = true;
     this.scrolledwindow5.Name = "scrolledwindow5";
     this.scrolledwindow5.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow5.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow5.ShadowType = ((Gtk.ShadowType)(1));
     // Container child scrolledwindow5.Gtk.Container+ContainerChild
     this.extraLinkerTextView = new Gtk.TextView();
     w12.SetTip(this.extraLinkerTextView, "A newline seperated list of extra options to send to the linker.\nOne option can be in more than one line.\nExample:\n\t`pkg-config\n\t--libs\n\tcairo`", "A newline seperated list of extra options to send to the linker.\nOne option can be in more than one line.\nExample:\n\t`pkg-config\n\t--libs\n\tcairo`");
     this.extraLinkerTextView.CanFocus = true;
     this.extraLinkerTextView.Name = "extraLinkerTextView";
     this.scrolledwindow5.Add(this.extraLinkerTextView);
     this.table5.Add(this.scrolledwindow5);
     Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(this.table5[this.scrolledwindow5]));
     w20.TopAttach = ((uint)(1));
     w20.BottomAttach = ((uint)(2));
     w20.LeftAttach = ((uint)(1));
     w20.RightAttach = ((uint)(2));
     this.GtkAlignment.Add(this.table5);
     this.frame2.Add(this.GtkAlignment);
     this.GtkLabel12 = new Gtk.Label();
     this.GtkLabel12.Name = "GtkLabel12";
     this.GtkLabel12.LabelProp = Mono.Unix.Catalog.GetString("<b>Extra Options</b>");
     this.GtkLabel12.UseMarkup = true;
     this.frame2.LabelWidget = this.GtkLabel12;
     this.vbox6.Add(this.frame2);
     Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.vbox6[this.frame2]));
     w23.Position = 2;
     this.notebook1.Add(this.vbox6);
     Gtk.Notebook.NotebookChild w24 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.vbox6]));
     w24.TabExpand = false;
     // Notebook tab
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Code Generation");
     this.notebook1.SetTabLabel(this.vbox6, this.label1);
     // Container child notebook1.Gtk.Notebook+NotebookChild
     this.table2 = new Gtk.Table(((uint)(2)), ((uint)(3)), false);
     this.table2.Name = "table2";
     this.table2.RowSpacing = ((uint)(10));
     this.table2.ColumnSpacing = ((uint)(10));
     this.table2.BorderWidth = ((uint)(3));
     // Container child table2.Gtk.Table+TableChild
     this.addLibButton = new Gtk.Button();
     this.addLibButton.Sensitive = false;
     this.addLibButton.CanFocus = true;
     this.addLibButton.Name = "addLibButton";
     this.addLibButton.UseUnderline = true;
     this.addLibButton.Label = Mono.Unix.Catalog.GetString("Add");
     this.table2.Add(this.addLibButton);
     Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.table2[this.addLibButton]));
     w25.LeftAttach = ((uint)(2));
     w25.RightAttach = ((uint)(3));
     w25.XOptions = ((Gtk.AttachOptions)(4));
     w25.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label8 = new Gtk.Label();
     this.label8.Name = "label8";
     this.label8.LabelProp = Mono.Unix.Catalog.GetString("Library:");
     this.table2.Add(this.label8);
     Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(this.table2[this.label8]));
     w26.XOptions = ((Gtk.AttachOptions)(4));
     w26.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.libAddEntry = new Gtk.Entry();
     this.libAddEntry.CanFocus = true;
     this.libAddEntry.Name = "libAddEntry";
     this.libAddEntry.IsEditable = true;
     this.libAddEntry.InvisibleChar = '●';
     this.table2.Add(this.libAddEntry);
     Gtk.Table.TableChild w27 = ((Gtk.Table.TableChild)(this.table2[this.libAddEntry]));
     w27.LeftAttach = ((uint)(1));
     w27.RightAttach = ((uint)(2));
     w27.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.scrolledwindow1 = new Gtk.ScrolledWindow();
     this.scrolledwindow1.CanFocus = true;
     this.scrolledwindow1.Name = "scrolledwindow1";
     this.scrolledwindow1.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow1.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow1.ShadowType = ((Gtk.ShadowType)(1));
     // Container child scrolledwindow1.Gtk.Container+ContainerChild
     this.libTreeView = new Gtk.TreeView();
     this.libTreeView.CanFocus = true;
     this.libTreeView.Name = "libTreeView";
     this.libTreeView.HeadersClickable = true;
     this.scrolledwindow1.Add(this.libTreeView);
     this.table2.Add(this.scrolledwindow1);
     Gtk.Table.TableChild w29 = ((Gtk.Table.TableChild)(this.table2[this.scrolledwindow1]));
     w29.TopAttach = ((uint)(1));
     w29.BottomAttach = ((uint)(2));
     w29.LeftAttach = ((uint)(1));
     w29.RightAttach = ((uint)(2));
     // Container child table2.Gtk.Table+TableChild
     this.vbox4 = new Gtk.VBox();
     this.vbox4.Name = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.browseButton = new Gtk.Button();
     this.browseButton.CanFocus = true;
     this.browseButton.Name = "browseButton";
     this.browseButton.UseUnderline = true;
     this.browseButton.Label = Mono.Unix.Catalog.GetString("Browse...");
     this.vbox4.Add(this.browseButton);
     Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.vbox4[this.browseButton]));
     w30.Position = 0;
     w30.Expand = false;
     w30.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.removeLibButton = new Gtk.Button();
     this.removeLibButton.Sensitive = false;
     this.removeLibButton.CanFocus = true;
     this.removeLibButton.Name = "removeLibButton";
     this.removeLibButton.UseUnderline = true;
     this.removeLibButton.Label = Mono.Unix.Catalog.GetString("Remove");
     this.vbox4.Add(this.removeLibButton);
     Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.vbox4[this.removeLibButton]));
     w31.Position = 1;
     w31.Expand = false;
     w31.Fill = false;
     this.table2.Add(this.vbox4);
     Gtk.Table.TableChild w32 = ((Gtk.Table.TableChild)(this.table2[this.vbox4]));
     w32.TopAttach = ((uint)(1));
     w32.BottomAttach = ((uint)(2));
     w32.LeftAttach = ((uint)(2));
     w32.RightAttach = ((uint)(3));
     w32.XOptions = ((Gtk.AttachOptions)(4));
     this.notebook1.Add(this.table2);
     Gtk.Notebook.NotebookChild w33 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.table2]));
     w33.Position = 1;
     w33.TabExpand = false;
     // Notebook tab
     this.label2 = new Gtk.Label();
     this.label2.Name = "label2";
     this.label2.LabelProp = Mono.Unix.Catalog.GetString("Libraries");
     this.notebook1.SetTabLabel(this.table2, this.label2);
     // Container child notebook1.Gtk.Notebook+NotebookChild
     this.vbox7 = new Gtk.VBox();
     this.vbox7.Name = "vbox7";
     this.vbox7.Spacing = 6;
     this.vbox7.BorderWidth = ((uint)(3));
     // Container child vbox7.Gtk.Box+BoxChild
     this.table4 = new Gtk.Table(((uint)(2)), ((uint)(3)), false);
     this.table4.Name = "table4";
     this.table4.RowSpacing = ((uint)(10));
     this.table4.ColumnSpacing = ((uint)(10));
     // Container child table4.Gtk.Table+TableChild
     this.label10 = new Gtk.Label();
     this.label10.Name = "label10";
     this.label10.LabelProp = Mono.Unix.Catalog.GetString("Library:");
     this.table4.Add(this.label10);
     Gtk.Table.TableChild w34 = ((Gtk.Table.TableChild)(this.table4[this.label10]));
     w34.XOptions = ((Gtk.AttachOptions)(4));
     w34.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.libPathAddButton = new Gtk.Button();
     this.libPathAddButton.Sensitive = false;
     this.libPathAddButton.CanFocus = true;
     this.libPathAddButton.Name = "libPathAddButton";
     this.libPathAddButton.UseUnderline = true;
     this.libPathAddButton.Label = Mono.Unix.Catalog.GetString("Add");
     this.table4.Add(this.libPathAddButton);
     Gtk.Table.TableChild w35 = ((Gtk.Table.TableChild)(this.table4[this.libPathAddButton]));
     w35.LeftAttach = ((uint)(2));
     w35.RightAttach = ((uint)(3));
     w35.XOptions = ((Gtk.AttachOptions)(4));
     w35.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.libPathEntry = new Gtk.Entry();
     this.libPathEntry.CanFocus = true;
     this.libPathEntry.Name = "libPathEntry";
     this.libPathEntry.IsEditable = true;
     this.libPathEntry.InvisibleChar = '●';
     this.table4.Add(this.libPathEntry);
     Gtk.Table.TableChild w36 = ((Gtk.Table.TableChild)(this.table4[this.libPathEntry]));
     w36.LeftAttach = ((uint)(1));
     w36.RightAttach = ((uint)(2));
     w36.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.scrolledwindow3 = new Gtk.ScrolledWindow();
     this.scrolledwindow3.CanFocus = true;
     this.scrolledwindow3.Name = "scrolledwindow3";
     this.scrolledwindow3.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow3.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow3.ShadowType = ((Gtk.ShadowType)(1));
     // Container child scrolledwindow3.Gtk.Container+ContainerChild
     this.libPathTreeView = new Gtk.TreeView();
     this.libPathTreeView.CanFocus = true;
     this.libPathTreeView.Name = "libPathTreeView";
     this.libPathTreeView.HeadersClickable = true;
     this.scrolledwindow3.Add(this.libPathTreeView);
     this.table4.Add(this.scrolledwindow3);
     Gtk.Table.TableChild w38 = ((Gtk.Table.TableChild)(this.table4[this.scrolledwindow3]));
     w38.TopAttach = ((uint)(1));
     w38.BottomAttach = ((uint)(2));
     w38.LeftAttach = ((uint)(1));
     w38.RightAttach = ((uint)(2));
     // Container child table4.Gtk.Table+TableChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.libPathBrowseButton = new Gtk.Button();
     this.libPathBrowseButton.CanFocus = true;
     this.libPathBrowseButton.Name = "libPathBrowseButton";
     this.libPathBrowseButton.UseUnderline = true;
     this.libPathBrowseButton.Label = Mono.Unix.Catalog.GetString("Browse...");
     this.vbox3.Add(this.libPathBrowseButton);
     Gtk.Box.BoxChild w39 = ((Gtk.Box.BoxChild)(this.vbox3[this.libPathBrowseButton]));
     w39.Position = 0;
     w39.Expand = false;
     w39.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.libPathRemoveButton = new Gtk.Button();
     this.libPathRemoveButton.Sensitive = false;
     this.libPathRemoveButton.CanFocus = true;
     this.libPathRemoveButton.Name = "libPathRemoveButton";
     this.libPathRemoveButton.UseUnderline = true;
     this.libPathRemoveButton.Label = Mono.Unix.Catalog.GetString("Remove");
     this.vbox3.Add(this.libPathRemoveButton);
     Gtk.Box.BoxChild w40 = ((Gtk.Box.BoxChild)(this.vbox3[this.libPathRemoveButton]));
     w40.Position = 1;
     w40.Expand = false;
     w40.Fill = false;
     this.table4.Add(this.vbox3);
     Gtk.Table.TableChild w41 = ((Gtk.Table.TableChild)(this.table4[this.vbox3]));
     w41.TopAttach = ((uint)(1));
     w41.BottomAttach = ((uint)(2));
     w41.LeftAttach = ((uint)(2));
     w41.RightAttach = ((uint)(3));
     w41.XOptions = ((Gtk.AttachOptions)(4));
     this.vbox7.Add(this.table4);
     Gtk.Box.BoxChild w42 = ((Gtk.Box.BoxChild)(this.vbox7[this.table4]));
     w42.Position = 0;
     // Container child vbox7.Gtk.Box+BoxChild
     this.table3 = new Gtk.Table(((uint)(2)), ((uint)(3)), false);
     this.table3.Name = "table3";
     this.table3.RowSpacing = ((uint)(10));
     this.table3.ColumnSpacing = ((uint)(10));
     // Container child table3.Gtk.Table+TableChild
     this.includePathAddButton = new Gtk.Button();
     this.includePathAddButton.Sensitive = false;
     this.includePathAddButton.CanFocus = true;
     this.includePathAddButton.Name = "includePathAddButton";
     this.includePathAddButton.UseUnderline = true;
     this.includePathAddButton.Label = Mono.Unix.Catalog.GetString("Add");
     this.table3.Add(this.includePathAddButton);
     Gtk.Table.TableChild w43 = ((Gtk.Table.TableChild)(this.table3[this.includePathAddButton]));
     w43.LeftAttach = ((uint)(2));
     w43.RightAttach = ((uint)(3));
     w43.XOptions = ((Gtk.AttachOptions)(4));
     w43.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table3.Gtk.Table+TableChild
     this.includePathEntry = new Gtk.Entry();
     this.includePathEntry.CanFocus = true;
     this.includePathEntry.Name = "includePathEntry";
     this.includePathEntry.IsEditable = true;
     this.includePathEntry.InvisibleChar = '●';
     this.table3.Add(this.includePathEntry);
     Gtk.Table.TableChild w44 = ((Gtk.Table.TableChild)(this.table3[this.includePathEntry]));
     w44.LeftAttach = ((uint)(1));
     w44.RightAttach = ((uint)(2));
     w44.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table3.Gtk.Table+TableChild
     this.label9 = new Gtk.Label();
     this.label9.Name = "label9";
     this.label9.LabelProp = Mono.Unix.Catalog.GetString("Include:");
     this.table3.Add(this.label9);
     Gtk.Table.TableChild w45 = ((Gtk.Table.TableChild)(this.table3[this.label9]));
     w45.XOptions = ((Gtk.AttachOptions)(4));
     w45.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table3.Gtk.Table+TableChild
     this.scrolledwindow2 = new Gtk.ScrolledWindow();
     this.scrolledwindow2.CanFocus = true;
     this.scrolledwindow2.Name = "scrolledwindow2";
     this.scrolledwindow2.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow2.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.scrolledwindow2.ShadowType = ((Gtk.ShadowType)(1));
     // Container child scrolledwindow2.Gtk.Container+ContainerChild
     this.includePathTreeView = new Gtk.TreeView();
     this.includePathTreeView.CanFocus = true;
     this.includePathTreeView.Name = "includePathTreeView";
     this.includePathTreeView.HeadersClickable = true;
     this.scrolledwindow2.Add(this.includePathTreeView);
     this.table3.Add(this.scrolledwindow2);
     Gtk.Table.TableChild w47 = ((Gtk.Table.TableChild)(this.table3[this.scrolledwindow2]));
     w47.TopAttach = ((uint)(1));
     w47.BottomAttach = ((uint)(2));
     w47.LeftAttach = ((uint)(1));
     w47.RightAttach = ((uint)(2));
     // Container child table3.Gtk.Table+TableChild
     this.vbox5 = new Gtk.VBox();
     this.vbox5.Name = "vbox5";
     this.vbox5.Spacing = 6;
     // Container child vbox5.Gtk.Box+BoxChild
     this.includePathBrowseButton = new Gtk.Button();
     this.includePathBrowseButton.CanFocus = true;
     this.includePathBrowseButton.Name = "includePathBrowseButton";
     this.includePathBrowseButton.UseUnderline = true;
     this.includePathBrowseButton.Label = Mono.Unix.Catalog.GetString("Browse...");
     this.vbox5.Add(this.includePathBrowseButton);
     Gtk.Box.BoxChild w48 = ((Gtk.Box.BoxChild)(this.vbox5[this.includePathBrowseButton]));
     w48.Position = 0;
     w48.Expand = false;
     w48.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.includePathRemoveButton = new Gtk.Button();
     this.includePathRemoveButton.Sensitive = false;
     this.includePathRemoveButton.CanFocus = true;
     this.includePathRemoveButton.Name = "includePathRemoveButton";
     this.includePathRemoveButton.UseUnderline = true;
     this.includePathRemoveButton.Label = Mono.Unix.Catalog.GetString("Remove");
     this.vbox5.Add(this.includePathRemoveButton);
     Gtk.Box.BoxChild w49 = ((Gtk.Box.BoxChild)(this.vbox5[this.includePathRemoveButton]));
     w49.Position = 1;
     w49.Expand = false;
     w49.Fill = false;
     this.table3.Add(this.vbox5);
     Gtk.Table.TableChild w50 = ((Gtk.Table.TableChild)(this.table3[this.vbox5]));
     w50.TopAttach = ((uint)(1));
     w50.BottomAttach = ((uint)(2));
     w50.LeftAttach = ((uint)(2));
     w50.RightAttach = ((uint)(3));
     w50.XOptions = ((Gtk.AttachOptions)(4));
     this.vbox7.Add(this.table3);
     Gtk.Box.BoxChild w51 = ((Gtk.Box.BoxChild)(this.vbox7[this.table3]));
     w51.Position = 1;
     this.notebook1.Add(this.vbox7);
     Gtk.Notebook.NotebookChild w52 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.vbox7]));
     w52.Position = 2;
     w52.TabExpand = false;
     // Notebook tab
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Paths");
     this.notebook1.SetTabLabel(this.vbox7, this.label3);
     this.Add(this.notebook1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.browseButton.Clicked += new System.EventHandler(this.OnBrowseButtonClick);
     this.removeLibButton.Clicked += new System.EventHandler(this.OnRemoveLibButtonClicked);
     this.removeLibButton.Clicked += new System.EventHandler(this.OnLibRemoved);
     this.libTreeView.CursorChanged += new System.EventHandler(this.OnLibTreeViewCursorChanged);
     this.libAddEntry.Changed += new System.EventHandler(this.OnLibAddEntryChanged);
     this.libAddEntry.Activated += new System.EventHandler(this.OnLibAddEntryActivated);
     this.addLibButton.Clicked += new System.EventHandler(this.OnLibAdded);
     this.libPathBrowseButton.Clicked += new System.EventHandler(this.OnLibPathBrowseButtonClick);
     this.libPathRemoveButton.Clicked += new System.EventHandler(this.OnLibPathRemoveButtonClicked);
     this.libPathRemoveButton.Clicked += new System.EventHandler(this.OnLibPathRemoved);
     this.libPathTreeView.CursorChanged += new System.EventHandler(this.OnLibPathTreeViewCursorChanged);
     this.libPathEntry.Changed += new System.EventHandler(this.OnLibPathEntryChanged);
     this.libPathEntry.Activated += new System.EventHandler(this.OnLibPathEntryActivated);
     this.libPathAddButton.Clicked += new System.EventHandler(this.OnLibPathAdded);
     this.includePathBrowseButton.Clicked += new System.EventHandler(this.OnIncludePathBrowseButtonClick);
     this.includePathRemoveButton.Clicked += new System.EventHandler(this.OnIncludePathRemoveButtonClicked);
     this.includePathRemoveButton.Clicked += new System.EventHandler(this.OnIncludePathRemoved);
     this.includePathTreeView.CursorChanged += new System.EventHandler(this.OnIncludePathTreeViewCursorChanged);
     this.includePathEntry.Changed += new System.EventHandler(this.OnIncludePathEntryChanged);
     this.includePathEntry.Activated += new System.EventHandler(this.OnIncludePathEntryActivated);
     this.includePathAddButton.Clicked += new System.EventHandler(this.OnIncludePathAdded);
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Monsoon.CreateTorrentDialog
     this.Name = "Monsoon.CreateTorrentDialog";
     this.Title = Mono.Unix.Catalog.GetString("Create a torrent");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Internal child Monsoon.CreateTorrentDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.vbox5 = new Gtk.VBox();
     this.vbox5.Name = "vbox5";
     this.vbox5.Spacing = 6;
     // Container child vbox5.Gtk.Box+BoxChild
     this.selectFileHbox = new Gtk.HBox();
     this.selectFileHbox.Name = "selectFileHbox";
     this.selectFileHbox.Spacing = 6;
     // Container child selectFileHbox.Gtk.Box+BoxChild
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Path:");
     this.selectFileHbox.Add(this.label1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.selectFileHbox[this.label1]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     this.vbox5.Add(this.selectFileHbox);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox5[this.selectFileHbox]));
     w3.Position = 0;
     w3.Expand = false;
     w3.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.table1 = new Gtk.Table(((uint)(1)), ((uint)(2)), false);
     this.table1.Name = "table1";
     this.table1.RowSpacing = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.fileRadioButton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Single File"));
     this.fileRadioButton.CanFocus = true;
     this.fileRadioButton.Name = "fileRadioButton";
     this.fileRadioButton.Active = true;
     this.fileRadioButton.DrawIndicator = true;
     this.fileRadioButton.UseUnderline = true;
     this.fileRadioButton.Group = new GLib.SList(System.IntPtr.Zero);
     this.table1.Add(this.fileRadioButton);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.fileRadioButton]));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.folderRadioButton = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Folder"));
     this.folderRadioButton.CanFocus = true;
     this.folderRadioButton.Name = "folderRadioButton";
     this.folderRadioButton.DrawIndicator = true;
     this.folderRadioButton.UseUnderline = true;
     this.folderRadioButton.Group = this.fileRadioButton.Group;
     this.table1.Add(this.folderRadioButton);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.folderRadioButton]));
     w5.LeftAttach = ((uint)(1));
     w5.RightAttach = ((uint)(2));
     w5.YOptions = ((Gtk.AttachOptions)(4));
     this.vbox5.Add(this.table1);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox5[this.table1]));
     w6.Position = 1;
     w6.Expand = false;
     w6.Fill = false;
     this.GtkAlignment2.Add(this.vbox5);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel2 = new Gtk.Label();
     this.GtkLabel2.Name = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Select source</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel2;
     this.vbox2.Add(this.frame1);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame1]));
     w9.Position = 0;
     w9.Expand = false;
     w9.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame2 = new Gtk.Frame();
     this.frame2.Name = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment3 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.hbox2 = new Gtk.HBox();
     this.hbox2.Name = "hbox2";
     this.hbox2.Spacing = 6;
     // Container child hbox2.Gtk.Box+BoxChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.trackerEntry = new Gtk.Entry();
     this.trackerEntry.CanFocus = true;
     this.trackerEntry.Name = "trackerEntry";
     this.trackerEntry.IsEditable = true;
     this.trackerEntry.InvisibleChar = '●';
     this.vbox3.Add(this.trackerEntry);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox3[this.trackerEntry]));
     w10.Position = 0;
     w10.Expand = false;
     w10.Fill = false;
     // Container child vbox3.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.trackerTreeView = new Gtk.TreeView();
     this.trackerTreeView.CanFocus = true;
     this.trackerTreeView.Name = "trackerTreeView";
     this.scrolledwindow1.Add(this.trackerTreeView);
     this.vbox3.Add(this.scrolledwindow1);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox3[this.scrolledwindow1]));
     w12.Position = 1;
     this.hbox2.Add(this.vbox3);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox3]));
     w13.Position = 0;
     // Container child hbox2.Gtk.Box+BoxChild
     this.vbox4 = new Gtk.VBox();
     this.vbox4.Name = "vbox4";
     this.vbox4.Spacing = 6;
     // Container child vbox4.Gtk.Box+BoxChild
     this.addTrackerButton = new Gtk.Button();
     this.addTrackerButton.Sensitive = false;
     this.addTrackerButton.CanFocus = true;
     this.addTrackerButton.Name = "addTrackerButton";
     this.addTrackerButton.UseUnderline = true;
     // Container child addTrackerButton.Gtk.Container+ContainerChild
     Gtk.Alignment w14 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     Gtk.HBox w15 = new Gtk.HBox();
     w15.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Image w16 = new Gtk.Image();
     w16.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-add", Gtk.IconSize.Menu, 16);
     w15.Add(w16);
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Label w18 = new Gtk.Label();
     w18.LabelProp = Mono.Unix.Catalog.GetString("Add");
     w18.UseUnderline = true;
     w15.Add(w18);
     w14.Add(w15);
     this.addTrackerButton.Add(w14);
     this.vbox4.Add(this.addTrackerButton);
     Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.vbox4[this.addTrackerButton]));
     w22.Position = 0;
     w22.Expand = false;
     w22.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.removeTrackerButton = new Gtk.Button();
     this.removeTrackerButton.Sensitive = false;
     this.removeTrackerButton.CanFocus = true;
     this.removeTrackerButton.Name = "removeTrackerButton";
     this.removeTrackerButton.UseUnderline = true;
     // Container child removeTrackerButton.Gtk.Container+ContainerChild
     Gtk.Alignment w23 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     Gtk.HBox w24 = new Gtk.HBox();
     w24.Spacing = 2;
     // Container child GtkHBox1.Gtk.Container+ContainerChild
     Gtk.Image w25 = new Gtk.Image();
     w25.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-remove", Gtk.IconSize.Menu, 16);
     w24.Add(w25);
     // Container child GtkHBox1.Gtk.Container+ContainerChild
     Gtk.Label w27 = new Gtk.Label();
     w27.LabelProp = Mono.Unix.Catalog.GetString("Remove");
     w27.UseUnderline = true;
     w24.Add(w27);
     w23.Add(w24);
     this.removeTrackerButton.Add(w23);
     this.vbox4.Add(this.removeTrackerButton);
     Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.vbox4[this.removeTrackerButton]));
     w31.Position = 1;
     w31.Expand = false;
     w31.Fill = false;
     this.hbox2.Add(this.vbox4);
     Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox4]));
     w32.Position = 1;
     w32.Expand = false;
     w32.Fill = false;
     this.GtkAlignment3.Add(this.hbox2);
     this.frame2.Add(this.GtkAlignment3);
     this.GtkLabel5 = new Gtk.Label();
     this.GtkLabel5.Name = "GtkLabel5";
     this.GtkLabel5.LabelProp = Mono.Unix.Catalog.GetString("<b>Set a tracker</b>");
     this.GtkLabel5.UseMarkup = true;
     this.frame2.LabelWidget = this.GtkLabel5;
     this.vbox2.Add(this.frame2);
     Gtk.Box.BoxChild w35 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame2]));
     w35.Position = 1;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame3 = new Gtk.Frame();
     this.frame3.Name = "frame3";
     this.frame3.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame3.Gtk.Container+ContainerChild
     this.GtkAlignment4 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment4.Name = "GtkAlignment4";
     this.GtkAlignment4.LeftPadding = ((uint)(12));
     // Container child GtkAlignment4.Gtk.Container+ContainerChild
     this.vbox6 = new Gtk.VBox();
     this.vbox6.Name = "vbox6";
     this.vbox6.Spacing = 6;
     // Container child vbox6.Gtk.Box+BoxChild
     this.hbox4 = new Gtk.HBox();
     this.hbox4.Name = "hbox4";
     this.hbox4.Spacing = 6;
     // Container child hbox4.Gtk.Box+BoxChild
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Comment:");
     this.hbox4.Add(this.label3);
     Gtk.Box.BoxChild w36 = ((Gtk.Box.BoxChild)(this.hbox4[this.label3]));
     w36.Position = 0;
     w36.Expand = false;
     w36.Fill = false;
     // Container child hbox4.Gtk.Box+BoxChild
     this.commentEntry = new Gtk.Entry();
     this.commentEntry.CanFocus = true;
     this.commentEntry.Name = "commentEntry";
     this.commentEntry.IsEditable = true;
     this.commentEntry.InvisibleChar = '●';
     this.hbox4.Add(this.commentEntry);
     Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(this.hbox4[this.commentEntry]));
     w37.Position = 1;
     this.vbox6.Add(this.hbox4);
     Gtk.Box.BoxChild w38 = ((Gtk.Box.BoxChild)(this.vbox6[this.hbox4]));
     w38.Position = 0;
     w38.Expand = false;
     w38.Fill = false;
     // Container child vbox6.Gtk.Box+BoxChild
     this.hbox5 = new Gtk.HBox();
     this.hbox5.Name = "hbox5";
     this.hbox5.Spacing = 6;
     // Container child hbox5.Gtk.Box+BoxChild
     this.startSeedingCheckBox = new Gtk.CheckButton();
     this.startSeedingCheckBox.CanFocus = true;
     this.startSeedingCheckBox.Name = "startSeedingCheckBox";
     this.startSeedingCheckBox.Label = Mono.Unix.Catalog.GetString("Start seeding");
     this.startSeedingCheckBox.Active = true;
     this.startSeedingCheckBox.DrawIndicator = true;
     this.startSeedingCheckBox.UseUnderline = true;
     this.hbox5.Add(this.startSeedingCheckBox);
     Gtk.Box.BoxChild w39 = ((Gtk.Box.BoxChild)(this.hbox5[this.startSeedingCheckBox]));
     w39.Position = 0;
     this.vbox6.Add(this.hbox5);
     Gtk.Box.BoxChild w40 = ((Gtk.Box.BoxChild)(this.vbox6[this.hbox5]));
     w40.Position = 1;
     w40.Expand = false;
     w40.Fill = false;
     // Container child vbox6.Gtk.Box+BoxChild
     this.hbox6 = new Gtk.HBox();
     this.hbox6.Name = "hbox6";
     this.hbox6.Spacing = 6;
     // Container child hbox6.Gtk.Box+BoxChild
     this.hiddenFilesCheckBox = new Gtk.CheckButton();
     this.hiddenFilesCheckBox.CanFocus = true;
     this.hiddenFilesCheckBox.Name = "hiddenFilesCheckBox";
     this.hiddenFilesCheckBox.Label = Mono.Unix.Catalog.GetString("Ignore hidden files");
     this.hiddenFilesCheckBox.Active = true;
     this.hiddenFilesCheckBox.DrawIndicator = true;
     this.hiddenFilesCheckBox.UseUnderline = true;
     this.hbox6.Add(this.hiddenFilesCheckBox);
     Gtk.Box.BoxChild w41 = ((Gtk.Box.BoxChild)(this.hbox6[this.hiddenFilesCheckBox]));
     w41.Position = 0;
     this.vbox6.Add(this.hbox6);
     Gtk.Box.BoxChild w42 = ((Gtk.Box.BoxChild)(this.vbox6[this.hbox6]));
     w42.Position = 2;
     w42.Expand = false;
     w42.Fill = false;
     this.GtkAlignment4.Add(this.vbox6);
     this.frame3.Add(this.GtkAlignment4);
     this.GtkLabel8 = new Gtk.Label();
     this.GtkLabel8.Name = "GtkLabel8";
     this.GtkLabel8.LabelProp = Mono.Unix.Catalog.GetString("<b>Miscellaneous</b>");
     this.GtkLabel8.UseMarkup = true;
     this.frame3.LabelWidget = this.GtkLabel8;
     this.vbox2.Add(this.frame3);
     Gtk.Box.BoxChild w45 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame3]));
     w45.Position = 2;
     w45.Expand = false;
     w45.Fill = false;
     w1.Add(this.vbox2);
     Gtk.Box.BoxChild w46 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
     w46.Position = 0;
     // Internal child Monsoon.CreateTorrentDialog.ActionArea
     Gtk.HButtonBox w47 = this.ActionArea;
     w47.Name = "GtkDialog_ActionArea";
     w47.Spacing = 6;
     w47.BorderWidth = ((uint)(5));
     w47.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child GtkDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w48 = ((Gtk.ButtonBox.ButtonBoxChild)(w47[this.buttonCancel]));
     w48.Expand = false;
     w48.Fill = false;
     // Container child GtkDialog_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.Sensitive = false;
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w49 = ((Gtk.ButtonBox.ButtonBoxChild)(w47[this.buttonOk]));
     w49.Position = 1;
     w49.Expand = false;
     w49.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 403;
     this.DefaultHeight = 438;
     this.Show();
     this.folderRadioButton.Toggled += new System.EventHandler(this.OnFolderRadioButtonToggled);
     this.fileRadioButton.Toggled += new System.EventHandler(this.OnFileRadioButtonToggled);
     this.trackerEntry.Changed += new System.EventHandler(this.OnTrackerEntryChanged);
     this.addTrackerButton.Clicked += new System.EventHandler(this.OnAddTrackerButtonClicked);
     this.removeTrackerButton.Clicked += new System.EventHandler(this.OnRemoveTrackerButtonClicked);
     this.buttonOk.Clicked += new System.EventHandler(this.OnCreateButtonClicked);
 }
예제 #27
0
        public ValueReferenceEditor(Project p, ValueReferenceGroup vrg, int rows, string frameText=null)
            : base(1.0F,1.0F,1.0F,1.0F)
        {
            Project = p;

            valueReferenceGroup = vrg;
            maxBounds = new int[valueReferenceGroup.GetNumValueReferences()];
            widgetPositions = new Tuple<uint,uint>[maxBounds.Count];
            widgets = new Gtk.Widget[maxBounds.Count];

            table = new Gtk.Table(2, 2, false);
            uint x=0,y=0;

            int cnt=0;
            foreach (ValueReference r in valueReferenceGroup.GetValueReferences()) {
                int index = cnt;
                cnt++;

                if (y >= rows) {
                    y = 0;
                    x += 3;
                }

                widgetPositions[index] = new Tuple<uint,uint>(x,y);

                if (r.ConstantsMapping != null) {
                    ComboBoxFromConstants comboBox = new ComboBoxFromConstants();
                    comboBox.SetConstantsMapping(r.ConstantsMapping);

                    comboBox.Changed += delegate(object sender, EventArgs e) {
                        r.SetValue(comboBox.ActiveValue);
                    };

                    dataModifiedExternalEvent += delegate() {
                        comboBox.ActiveValue = r.GetIntValue();
                    };

                    table.Attach(new Gtk.Label(r.Name), x+0,x+1,y,y+1);
                    table.Attach(comboBox, x+1,x+2,y,y+1);
                    widgets[index] = comboBox;

                    goto loopEnd;
                }
                // ConstantsMapping == null

                switch(r.ValueType) {
                    case DataValueType.String:
                    default:
                        {
                            table.Attach(new Gtk.Label(r.Name), x+0,x+1, y, y+1);
                            Gtk.Entry entry = new Gtk.Entry();
                            if (!r.Editable)
                                entry.Sensitive = false;
                            dataModifiedExternalEvent += delegate() {
                                entry.Text = r.GetStringValue();
                                OnDataModifiedInternal();
                            };
                            table.Attach(entry, x+1,x+2, y, y+1);
                            widgets[index] = entry;
                            break;
                        }
                    case DataValueType.Byte:
                    case DataValueType.HalfByte:
            byteCase:
                        {
                            table.Attach(new Gtk.Label(r.Name), x+0,x+1, y, y+1);
                            SpinButtonHexadecimal spinButton = new SpinButtonHexadecimal(0,255);
                            if (!r.Editable)
                                spinButton.Sensitive = false;
                            if (r.ValueType == DataValueType.HalfByte) {
                                spinButton.Digits = 1;
                                spinButton.Adjustment.Upper = 15;
                            }
                            else
                                spinButton.Digits = 2;
                            spinButton.ValueChanged += delegate(object sender, EventArgs e) {
                                Gtk.SpinButton button = sender as Gtk.SpinButton;
                                if (maxBounds[index] == 0 || button.ValueAsInt <= maxBounds[index]) {
                                    r.SetValue(button.ValueAsInt);
                                }
                                else
                                    button.Value = maxBounds[index];
                                OnDataModifiedInternal();
                            };
                            dataModifiedExternalEvent += delegate() {
                                spinButton.Value = r.GetIntValue();
                            };
                            table.Attach(spinButton, x+1,x+2, y, y+1);
                            widgets[index] = spinButton;
                        }
                        break;

                    case DataValueType.WarpDestIndex:
                        {
                            Gtk.Button newDestButton = new Gtk.Button("New\nDestination");
                            newDestButton.Clicked += delegate(object sender, EventArgs e) {
                                WarpSourceData warpData = (WarpSourceData)r.Data;
                                WarpDestGroup destGroup = warpData.GetReferencedDestGroup();
                                // Check if there's unused destination data
                                // already
                                for (int i=0; i<destGroup.GetNumWarpDests(); i++) {
                                    WarpDestData destData = destGroup.GetWarpDest(i);
                                    if (destData.GetNumReferences() == 0) {
                                        Gtk.MessageDialog d = new Gtk.MessageDialog(null,
                                                Gtk.DialogFlags.DestroyWithParent,
                                                Gtk.MessageType.Warning,
                                                Gtk.ButtonsType.YesNo,
                                                "Destination index " + i.ToString("X2") + " is not used by any sources. Use this index?\n\n(\"No\" will create a new destination instead.)");
                                        Gtk.ResponseType response = (Gtk.ResponseType)d.Run();
                                        d.Destroy();

                                        if (response == Gtk.ResponseType.Yes)
                                            warpData.SetDestData(destGroup.GetWarpDest(i));
                                        else if (response == Gtk.ResponseType.No)
                                            warpData.SetDestData(destGroup.AddDestData());
                                        break;
                                    }
                                }
                            };
                            table.Attach(newDestButton, x+2,x+3, y, y+2);
                        }
                        goto byteCase;

                    case DataValueType.Word:
                        {
                            table.Attach(new Gtk.Label(r.Name), x+0,x+1, y, y+1);
                            SpinButtonHexadecimal spinButton = new SpinButtonHexadecimal(0,0xffff);
                            if (!r.Editable)
                                spinButton.Sensitive = false;
                            spinButton.Digits = 4;
                            spinButton.ValueChanged += delegate(object sender, EventArgs e) {
                                Gtk.SpinButton button = sender as Gtk.SpinButton;
                                if (maxBounds[index] == 0 || button.ValueAsInt <= maxBounds[index]) {
                                    r.SetValue(button.ValueAsInt);
                                }
                                else
                                    button.Value = maxBounds[index];
                                OnDataModifiedInternal();
                            };
                            dataModifiedExternalEvent += delegate() {
                                spinButton.Value = r.GetIntValue();
                            };
                            table.Attach(spinButton, x+1,x+2, y, y+1);
                            widgets[index] = spinButton;
                        }
                        break;
                    case DataValueType.ByteBit:
                        {
                            table.Attach(new Gtk.Label(r.Name), x+0,x+1, y, y+1);
                            Gtk.CheckButton checkButton = new Gtk.CheckButton();
                            checkButton.CanFocus = false;
                            if (!r.Editable)
                                checkButton.Sensitive = false;
                            checkButton.Toggled += delegate(object sender, EventArgs e) {
                                Gtk.CheckButton button = sender as Gtk.CheckButton;
                                r.SetValue(button.Active ? 1 : 0);
                                OnDataModifiedInternal();
                            };
                            dataModifiedExternalEvent += delegate() {
                                checkButton.Active = r.GetIntValue() == 1;
                            };
                            table.Attach(checkButton, x+1,x+2, y, y+1);
                            widgets[index] = checkButton;
                        }
                        break;
                    case DataValueType.ByteBits:
                        {
                            table.Attach(new Gtk.Label(r.Name), x+0,x+1, y, y+1);
                            SpinButtonHexadecimal spinButton = new SpinButtonHexadecimal(0,r.MaxValue);
                            if (!r.Editable)
                                spinButton.Sensitive = false;
                            spinButton.Digits = (uint)((r.MaxValue+0xf)/0x10);
                            spinButton.ValueChanged += delegate(object sender, EventArgs e) {
                                Gtk.SpinButton button = sender as Gtk.SpinButton;
                                if (maxBounds[index] == 0 || button.ValueAsInt <= maxBounds[index]) {
                                    r.SetValue(button.ValueAsInt);
                                }
                                else
                                    button.Value = maxBounds[index];
                                OnDataModifiedInternal();
                            };
                            dataModifiedExternalEvent += delegate() {
                                spinButton.Value = r.GetIntValue();
                            };
                            table.Attach(spinButton, x+1,x+2, y, y+1);
                            widgets[index] = spinButton;
                        }
                        break;
                    case DataValueType.ObjectPointer:
                        {
                            table.Attach(new Gtk.Label(r.Name), x+0,x+1, y, y+1);

                            Gtk.Entry entry = new Gtk.Entry();
                            if (!r.Editable)
                                entry.Sensitive = false;
                            entry.Changed += delegate(object sender, EventArgs e) {
                                UpdatePointerTextBox(sender as Gtk.Entry, r);
                                OnDataModifiedInternal();
                            };
                            table.Attach(entry, x+1,x+2, y, y+1);
                            widgets[index] = entry;

                            pointerFrame = new Gtk.Frame();
                            pointerFrame.Label = "Pointer data (possibly shared)";
                            pointerFrame.BorderWidth = 5;

                            y++;
                            table.Attach(pointerFrame, x+0,x+2, y, y+1);

                            dataModifiedExternalEvent += delegate() {
                                entry.Text = r.GetStringValue();
                                UpdatePointerTextBox(entry, r);
                            };
                        }
                        break;
                }

            loopEnd:
                y++;
            }

            table.ColumnSpacing = 6;

            if (frameText != null) {
                var frame = new Gtk.Frame(frameText);
                frame.Add(table);
                this.Add(frame);
            }
            else
                this.Add(table);

            this.ShowAll();

            Data lastData = null;
            foreach (ValueReference r in valueReferenceGroup.GetValueReferences()) {
                if (lastData != r.Data) {
                    lastData = r.Data;
                    r.Data.AddDataModifiedHandler(OnDataModifiedExternal);
                    // Destroy handler
                    this.Destroyed += delegate(object sender, EventArgs e) {
                        r.Data.RemoveDataModifiedHandler(OnDataModifiedExternal);
                    };
                }
            }

            // Initial values
            if (dataModifiedExternalEvent != null)
                dataModifiedExternalEvent();
        }
예제 #28
0
		public FeedbackDialog (int x, int y): base (Gtk.WindowType.Toplevel)
		{
			SetDefaultSize (350, 200);
			if (x == -1 && y == -1) {
				int ww, wh;
				IdeApp.Workbench.RootWindow.GdkWindow.GetSize (out ww, out wh);
				IdeApp.Workbench.RootWindow.GdkWindow.GetOrigin (out x, out y);
				x = ww / 2 - 350 / 2;
				y = wh / 2 - 200 / 2;
				Move (x, y);
			} else
				Move (x - 350, y - 200);

			mainFrame = new Gtk.Frame ();
			
			mainBox = new Gtk.VBox ();
			mainBox.BorderWidth = 12;
			mainBox.Spacing = 6;
			headerBox = new Gtk.HBox ();
			mailEntry = new EntryWithEmptyMessage ();
			mailEntry.EmptyMessage = GettextCatalog.GetString ("email address");
			Decorated = false;
			mainFrame.ShadowType = Gtk.ShadowType.Out;
			
			// Header
			
			headerBox.Spacing = 6;
			mailLabel = new Gtk.Label ();
			headerBox.PackStart (mailLabel, false, false, 0);
			Gtk.Button changeButton = new Gtk.Button ("(Change)");
			changeButton.Relief = Gtk.ReliefStyle.None;
			headerBox.PackStart (changeButton, false, false, 0);
			changeButton.Clicked += HandleChangeButtonClicked;
			mainBox.PackStart (headerBox, false, false, 0);
			mainBox.PackStart (mailEntry, false, false, 0);
			mailWarningLabel = new Gtk.Label (GettextCatalog.GetString ("Please enter a valid e-mail address"));
			mailWarningLabel.Xalign = 0;
			mainBox.PackStart (mailWarningLabel, false, false, 0);
			
			// Body
			
			textEntry = new TextViewWithEmptyMessage ();
			textEntry.EmptyMessage = GettextCatalog.GetString (
				"Tell us how we can make {0} better.",
				BrandingService.SuiteName
			);
			textEntry.AcceptsTab = false;
			textEntry.WrapMode = Gtk.WrapMode.Word;
			textEntry.WidthRequest = 300;
			var sw = new Gtk.ScrolledWindow ();
			sw.ShadowType = Gtk.ShadowType.In;
			sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
			sw.HscrollbarPolicy = Gtk.PolicyType.Never;
			sw.Add (textEntry);
			mainBox.PackStart (sw, true, true, 0);
			bodyWarningLabel = new Gtk.Label (GettextCatalog.GetString ("Please enter some feedback"));
			bodyWarningLabel.Xalign = 0;
			mainBox.PackStart (bodyWarningLabel, false, false, 0);
			
			// Bottom
			
			Gtk.HBox bottomBox = new Gtk.HBox (false, 6);
			Gtk.Label countLabel = new Gtk.Label ();
			countLabel.Xalign = 0;
			bottomBox.PackStart (countLabel, false, false, 0);
			
			Gtk.Button sendButton = new Gtk.Button (GettextCatalog.GetString ("Send Feedback"));
			sendButton.Clicked += HandleSendButtonClicked;
			bottomBox.PackEnd (sendButton, false, false, 0);
			mainBox.PackStart (bottomBox, false, false, 0);
			
			// Init
			
			mainBox.ShowAll ();
			
			mailWarningLabel.Hide ();
			bodyWarningLabel.Hide ();
			
			string mail = FeedbackService.ReporterEMail;
			if (string.IsNullOrEmpty (mail))
				mail = AuthorInformation.Default.Email;
			
			if (string.IsNullOrEmpty (mail)) {
				headerBox.Hide ();
				mailEntry.GrabFocus ();
			}
			else {
				mailEntry.Text = mail;
				mailEntry.Hide ();
				mailLabel.Text = GettextCatalog.GetString ("From: {0}", mail);
				textEntry.GrabFocus ();
			}
			if (FeedbackService.FeedbacksSent > 0)
				countLabel.Text = GettextCatalog.GetString ("Your feedbacks: {0}", FeedbackService.FeedbacksSent);
			else
				countLabel.Hide ();
			
			mainFrame.Show ();
			mainFrame.Add (mainBox);
			Add (mainFrame);
		}
예제 #29
0
        public ValueReferenceEditor(Project p, ValueReferenceGroup vrg, int rows, string frameText = null)
            : base(1.0F, 1.0F, 1.0F, 1.0F)
        {
            Project = p;

            valueReferenceGroup = vrg;
            maxBounds           = new int[valueReferenceGroup.GetNumValueReferences()];
            widgetGrids         = new List <Gtk.Grid>();
            widgetPositions     = new Tuple <int, int> [maxBounds.Count];
            widgetLists         = new List <IList <Gtk.Widget> >();

            Gtk.Box hbox = new Gtk.HBox();
            hbox.Spacing = 6;

            Func <Gtk.Grid> newGrid = () => {
                Gtk.Grid g = new Gtk.Grid();
                g.ColumnSpacing = 6;
                g.RowSpacing    = 2;
                hbox.Add(g);
                return(g);
            };

            Gtk.Grid grid = newGrid();
            int      x = 0, y = 0;


            // Do not use "foreach" here. The "valueReferenceGroup" may be changed. So, whenever we
            // access a ValueReference from within an event handler, we must do so though the
            // "valueReferenceGroup" class variable, and NOT though an alias (like with foreach).
            for (int tmpCounter = 0; tmpCounter < valueReferenceGroup.Count; tmpCounter++)
            {
                int i = tmpCounter; // Variable must be distinct within each closure

                if (y >= rows)
                {
                    y    = 0;
                    x    = 0;
                    grid = newGrid();
                }

                // Each ValueReference may use up to 3 widgets in the grid row
                Gtk.Widget[] widgetList = new Gtk.Widget[3];

                widgetPositions[i] = new Tuple <int, int>(x, y);

                Action <Gtk.SpinButton> setSpinButtonLimits = (spinButton) => {
                    if (valueReferenceGroup[i].MaxValue < 0x10)
                    {
                        spinButton.Digits = 1;
                    }
                    else if (valueReferenceGroup[i].MaxValue < 0x100)
                    {
                        spinButton.Digits = 2;
                    }
                    else if (valueReferenceGroup[i].MaxValue < 0x1000)
                    {
                        spinButton.Digits = 3;
                    }
                    else
                    {
                        spinButton.Digits = 4;
                    }
                    spinButton.Adjustment.Lower = valueReferenceGroup[i].MinValue;
                    spinButton.Adjustment.Upper = valueReferenceGroup[i].MaxValue;
                };

                int entryWidgetWidth = 1;

                // If it has a ConstantsMapping, use a combobox instead of anything else
                if (valueReferenceGroup[i].ConstantsMapping != null)
                {
                    ComboBoxFromConstants comboBox = new ComboBoxFromConstants(showHelp: true, vertical: true);
                    comboBox.SetConstantsMapping(valueReferenceGroup[i].ConstantsMapping);

                    // Must put this before the "Changed" handler below to avoid
                    // it being fired (for some reason?)
                    setSpinButtonLimits(comboBox.SpinButton);

                    comboBox.Changed += delegate(object sender, EventArgs e) {
                        valueReferenceGroup[i].SetValue(comboBox.ActiveValue);
                        OnDataModifiedInternal();
                    };

                    dataModifiedExternalEvent += delegate() {
                        comboBox.ActiveValue = valueReferenceGroup[i].GetIntValue();
                    };

                    /*
                     * comboBox.MarginTop = 4;
                     * comboBox.MarginBottom = 4;
                     */

                    widgetList[0] = new Gtk.Label(valueReferenceGroup[i].Name);
                    widgetList[1] = comboBox;

                    entryWidgetWidth = 2;

                    goto loopEnd;
                }
                // ConstantsMapping == null

                switch (valueReferenceGroup[i].ValueType)
                {
                case ValueReferenceType.String:
                {
                    widgetList[0] = new Gtk.Label(valueReferenceGroup[i].Name);

                    Gtk.Entry entry = new Gtk.Entry();
                    if (!valueReferenceGroup[i].Editable)
                    {
                        entry.Sensitive = false;
                    }
                    dataModifiedExternalEvent += delegate() {
                        entry.Text = valueReferenceGroup[i].GetStringValue();
                        OnDataModifiedInternal();
                    };

                    widgetList[1] = entry;
                    break;
                }

                case ValueReferenceType.Int:
                {
                    widgetList[0] = new Gtk.Label(valueReferenceGroup[i].Name);

                    SpinButtonHexadecimal spinButton =
                        new SpinButtonHexadecimal(valueReferenceGroup[i].MinValue, valueReferenceGroup[i].MaxValue);
                    if (!valueReferenceGroup[i].Editable)
                    {
                        spinButton.Sensitive = false;
                    }
                    setSpinButtonLimits(spinButton);
                    spinButton.ValueChanged += delegate(object sender, EventArgs e) {
                        Gtk.SpinButton button = sender as Gtk.SpinButton;
                        if (maxBounds[i] == 0 || button.ValueAsInt <= maxBounds[i])
                        {
                            valueReferenceGroup[i].SetValue(button.ValueAsInt);
                        }
                        else
                        {
                            button.Value = maxBounds[i];
                        }
                        OnDataModifiedInternal();
                    };
                    dataModifiedExternalEvent += delegate() {
                        spinButton.Value = valueReferenceGroup[i].GetIntValue();
                    };

                    widgetList[1] = spinButton;
                }
                break;

                case ValueReferenceType.Bool:
                {
                    widgetList[0] = new Gtk.Label(valueReferenceGroup[i].Name);

                    Gtk.CheckButton checkButton = new Gtk.CheckButton();
                    checkButton.FocusOnClick = false;
                    if (!valueReferenceGroup[i].Editable)
                    {
                        checkButton.Sensitive = false;
                    }
                    checkButton.Toggled += delegate(object sender, EventArgs e) {
                        Gtk.CheckButton button = sender as Gtk.CheckButton;
                        valueReferenceGroup[i].SetValue(button.Active ? 1 : 0);
                        OnDataModifiedInternal();
                    };
                    dataModifiedExternalEvent += delegate() {
                        checkButton.Active = valueReferenceGroup[i].GetIntValue() == 1;
                    };

                    widgetList[1] = checkButton;
                }
                break;
                }

loopEnd:
                grid.Attach(widgetList[0], x, y, 1, 1);
                grid.Attach(widgetList[1], x + 1, y, entryWidgetWidth, 1);

                widgetList[2]         = new Gtk.Alignment(0, 0.5f, 0, 0); // Container for help button
                widgetList[2].Hexpand = true;                             // Let this absorb any extra space
                grid.Attach(widgetList[2], x + 2, y, 1, 1);

                widgetGrids.Add(grid);
                widgetLists.Add(widgetList);

                if (valueReferenceGroup[i].Tooltip != null)
                {
                    SetTooltip(i, valueReferenceGroup[i].Tooltip);
                }
                y++;
            }

            if (frameText != null)
            {
                var frame = new Gtk.Frame(frameText);
                frame.Add(hbox);
                this.Add(frame);
            }
            else
            {
                this.Add(hbox);
            }

            this.ShowAll();

            // Initial values
            if (dataModifiedExternalEvent != null)
            {
                dataModifiedExternalEvent();
            }

            UpdateHelpButtons();

            AddModifiedHandlers();
            this.Destroyed += (sender, args) => RemoveModifiedHandlers();
        }
예제 #30
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.CorrectedCoordinatesDlg
     this.Name            = "ocmgtk.CorrectedCoordinatesDlg";
     this.Title           = Mono.Unix.Catalog.GetString("Corrected Coordinates");
     this.WindowPosition  = ((Gtk.WindowPosition)(4));
     this.Modal           = true;
     this.BorderWidth     = ((uint)(6));
     this.Resizable       = false;
     this.AllowGrow       = false;
     this.SkipPagerHint   = true;
     this.SkipTaskbarHint = true;
     // Internal child ocmgtk.CorrectedCoordinatesDlg.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.Spacing     = 6;
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment3             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name        = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label1           = new Gtk.Label();
     this.label1.Name      = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Coodinate:");
     this.hbox1.Add(this.label1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
     w2.Position = 0;
     w2.Expand   = false;
     w2.Fill     = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.origLabel           = new Gtk.Label();
     this.origLabel.Name      = "origLabel";
     this.origLabel.Xalign    = 0F;
     this.origLabel.LabelProp = "<unknown>";
     this.hbox1.Add(this.origLabel);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.origLabel]));
     w3.Position = 1;
     w3.Expand   = false;
     w3.Fill     = false;
     this.GtkAlignment3.Add(this.hbox1);
     this.frame1.Add(this.GtkAlignment3);
     this.GtkLabel4           = new Gtk.Label();
     this.GtkLabel4.Name      = "GtkLabel4";
     this.GtkLabel4.LabelProp = Mono.Unix.Catalog.GetString("<b>Original Location</b>");
     this.GtkLabel4.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel4;
     w1.Add(this.frame1);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(w1[this.frame1]));
     w6.Position = 0;
     w6.Expand   = false;
     w6.Fill     = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame3            = new Gtk.Frame();
     this.frame3.Name       = "frame3";
     this.frame3.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame3.Gtk.Container+ContainerChild
     this.GtkAlignment4             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment4.Name        = "GtkAlignment4";
     this.GtkAlignment4.LeftPadding = ((uint)(12));
     // Container child GtkAlignment4.Gtk.Container+ContainerChild
     this.coordEntry           = new ocmgtk.LocationWidget();
     this.coordEntry.Events    = ((Gdk.EventMask)(256));
     this.coordEntry.Name      = "coordEntry";
     this.coordEntry.Latitude  = 0;
     this.coordEntry.Longitude = 0;
     this.GtkAlignment4.Add(this.coordEntry);
     this.frame3.Add(this.GtkAlignment4);
     this.GtkLabel5           = new Gtk.Label();
     this.GtkLabel5.Name      = "GtkLabel5";
     this.GtkLabel5.LabelProp = Mono.Unix.Catalog.GetString("<b>Corrected Location</b>");
     this.GtkLabel5.UseMarkup = true;
     this.frame3.LabelWidget  = this.GtkLabel5;
     w1.Add(this.frame3);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(w1[this.frame3]));
     w9.Position = 1;
     w9.Expand   = false;
     w9.Fill     = false;
     // Internal child ocmgtk.CorrectedCoordinatesDlg.ActionArea
     Gtk.HButtonBox w10 = this.ActionArea;
     w10.Name        = "dialog1_ActionArea";
     w10.Spacing     = 10;
     w10.BorderWidth = ((uint)(5));
     w10.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w11 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonCancel]));
     w11.Expand = false;
     w11.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.resetButton              = new Gtk.Button();
     this.resetButton.Sensitive    = false;
     this.resetButton.CanFocus     = true;
     this.resetButton.Name         = "resetButton";
     this.resetButton.UseUnderline = true;
     this.resetButton.Label        = Mono.Unix.Catalog.GetString("Reset");
     w10.Add(this.resetButton);
     Gtk.ButtonBox.ButtonBoxChild w12 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.resetButton]));
     w12.Position = 1;
     w12.Expand   = false;
     w12.Fill     = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w13 = ((Gtk.ButtonBox.ButtonBoxChild)(w10[this.buttonOk]));
     w13.Position = 2;
     w13.Expand   = false;
     w13.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 433;
     this.DefaultHeight = 231;
     this.Show();
     this.buttonCancel.Clicked += new System.EventHandler(this.OnCancelClick);
     this.resetButton.Clicked  += new System.EventHandler(this.OnResetClick);
     this.buttonOk.Clicked     += new System.EventHandler(this.OnOKClick);
 }
예제 #31
0
        private Atk.Object GetAccessible(BasicWidgetType type, string text, object preWidget, bool real, bool embeddedImage)
        {
            Atk.Object     accessible = null;
            Gtk.Widget     widget     = null;
            Gtk.Adjustment adj        = new Gtk.Adjustment(50, 0, 100, 1, 10, 20);
            switch (type)
            {
            case BasicWidgetType.Label:
                widget = new Gtk.Label();
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealLabel();
                }
                ((Gtk.Label)widget).Text = text;
                break;

            case BasicWidgetType.NormalButton:
                widget = new Gtk.Button();
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealButton(embeddedImage);
                }
                ((Gtk.Button)widget).Label = text;
                break;

            case BasicWidgetType.Window:
                widget = new Gtk.Window(text);
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealWindow();
                }
                break;

            case BasicWidgetType.CheckBox:
                widget = new Gtk.CheckButton();
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealCheckBox(embeddedImage);
                }
                ((Gtk.CheckButton)widget).Label = text;
                break;

            case BasicWidgetType.RadioButton:
                if (!real)
                {
                    throw new NotSupportedException("We cannot use non-real radio buttons because of some wierd behaviour");
                }

                widget = GailTestApp.MainClass.GiveMeARealRadioButton(embeddedImage);
                RunInGuiThread(delegate {
                    ((Gtk.CheckButton)widget).Label = text;
                });
                break;

            case BasicWidgetType.StatusBar:
                widget = new Gtk.Statusbar();
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealStatusbar();
                }
                ((Gtk.Statusbar)widget).Push(0, text);
                break;

            case BasicWidgetType.TextBoxEntry:
                if (!real)
                {
                    throw new NotSupportedException();
                }

                widget = GailTestApp.MainClass.GiveMeARealEntry(true);
                RunInGuiThread(delegate {
                    ((Gtk.Entry)widget).Text = text;
                });
                break;

            case BasicWidgetType.RichTextBox:
            case BasicWidgetType.TextBoxView:
                if (!real)
                {
                    throw new NotSupportedException();
                }

                widget = GailTestApp.MainClass.GiveMeARealTextView();
                RunInGuiThread(delegate {
                    ((Gtk.TextView)widget).Buffer.Text = text;
                });
                break;

            case BasicWidgetType.PasswordCharTextBoxEntry:
                if (!real)
                {
                    throw new NotSupportedException();
                }

                widget = GailTestApp.MainClass.GiveMeARealEntry(false);
                RunInGuiThread(delegate {
                    ((Gtk.Entry)widget).Text = text;
                });
                break;

            case BasicWidgetType.HScrollBar:
                widget = new Gtk.HScrollbar(adj);
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealHScrollbar();
                }
                break;

            case BasicWidgetType.VScrollBar:
                widget = new Gtk.VScrollbar(adj);
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealVScrollbar();
                }
                break;

            case BasicWidgetType.ProgressBar:
                widget = new Gtk.ProgressBar(adj);
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealProgressBar();
                }
                break;

            case BasicWidgetType.Spinner:
                widget = new Gtk.SpinButton(adj, 1, 2);
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealSpinButton();
                }
                break;

            case BasicWidgetType.PictureBox:
                widget = new Gtk.Image();
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealImage(embeddedImage);
                }
                break;

            case BasicWidgetType.ListView:
            case BasicWidgetType.TreeView:
                Gtk.TreeStore store       = null;
                List <string> columnNames = new List <String> ();
                XmlDocument   xml         = new XmlDocument();
                xml.LoadXml(text);
                foreach (XmlElement th in xml.GetElementsByTagName("th"))
                {
                    foreach (XmlElement td in th.GetElementsByTagName("td"))
                    {
                        columnNames.Add(td.InnerText);
                    }
                }
                if (columnNames.Count == 0)
                {
                    columnNames.Add(string.Empty);
                }
                if (columnNames.Count == 1)
                {
                    store = new Gtk.TreeStore(typeof(string));
                }
                else if (columnNames.Count == 2)
                {
                    store = new Gtk.TreeStore(typeof(string), typeof(string));
                }
                else if (columnNames.Count == 3)
                {
                    store = new Gtk.TreeStore(typeof(string), typeof(string), typeof(string));
                }
                else
                {
                    Assert.Fail("This test only supports 1-3 columns; got " + columnNames.Count);
                }
                Gtk.TreeIter[] iters = new Gtk.TreeIter [8];
                XmlElement     root  = xml.DocumentElement;
                for (XmlNode node = root.FirstChild; node != null; node = node.NextSibling)
                {
                    if (node.Name == "tr")
                    {
                        AddToTreeStore(store, iters, 0, node);
                    }
                }
                widget = new Gtk.TreeView(store);
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealTreeView();
                    RunInGuiThread(delegate {
                        ((Gtk.TreeView)widget).Model = store;
                    });
                }

                RunInGuiThread(delegate {
                    Gtk.TreeView treeView = (Gtk.TreeView)widget;
                    int i;
                    for (i = treeView.Columns.Length - 1; i >= 0; i--)
                    {
                        treeView.RemoveColumn(treeView.Columns [i]);
                    }
                    i = 0;
                    foreach (string columnName in columnNames)
                    {
                        Gtk.TreeViewColumn col = new Gtk.TreeViewColumn();
                        col.Title = columnName;
                        treeView.AppendColumn(col);
                        Gtk.CellRendererText cell = new Gtk.CellRendererText();
                        col.PackStart(cell, true);
                        col.AddAttribute(cell, "text", i++);
                    }
                    ((Gtk.TreeView)widget).HeadersClickable = text.Contains("<th>");
                    ((Gtk.TreeView)widget).HeadersVisible   = ((Gtk.TreeView)widget).HeadersClickable;
                });
                break;

            case BasicWidgetType.ContainerPanel:
                widget = new Gtk.Frame();
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealFrame();
                }
                break;

            case BasicWidgetType.HSplitContainer:
                widget = new Gtk.HPaned();
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealHPaned();
                }
                break;

            case BasicWidgetType.VTrackBar:
                widget = new Gtk.VScale(adj);
                if (real)
                {
                    widget = GailTestApp.MainClass.GiveMeARealVScale();
                }
                break;

            case BasicWidgetType.ComboBoxDropDownEntry:
            case BasicWidgetType.ComboBoxDropDownList:
            case BasicWidgetType.ComboBoxSimple:
                throw new NotSupportedException("You have to use the GetObject overload that receives a name array");

            default:
                throw new NotImplementedException("The widget finder backend still hasn't got support for " +
                                                  type.ToString());
            }

            accessible            = widget.Accessible;
            mappings [accessible] = widget;

            return(accessible);
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget omvviewerlight.LoginControl
     Stetic.BinContainer.Attach(this);
     this.Name = "omvviewerlight.LoginControl";
     // Container child omvviewerlight.LoginControl.Gtk.Container+ContainerChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Homogeneous = true;
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("First name");
     this.vbox2.Add(this.label1);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.label1]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.label2 = new Gtk.Label();
     this.label2.Name = "label2";
     this.label2.LabelProp = Mono.Unix.Catalog.GetString("Last Name");
     this.vbox2.Add(this.label2);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.label2]));
     w2.Position = 1;
     w2.Expand = false;
     w2.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Password");
     this.vbox2.Add(this.label3);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.label3]));
     w3.Position = 2;
     w3.Expand = false;
     w3.Fill = false;
     this.hbox1.Add(this.vbox2);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox2]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.entry_first = new Gtk.Entry();
     this.entry_first.CanFocus = true;
     this.entry_first.Name = "entry_first";
     this.entry_first.IsEditable = true;
     this.entry_first.InvisibleChar = '●';
     this.vbox3.Add(this.entry_first);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox3[this.entry_first]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.entry_last = new Gtk.Entry();
     this.entry_last.CanFocus = true;
     this.entry_last.Name = "entry_last";
     this.entry_last.IsEditable = true;
     this.entry_last.InvisibleChar = '●';
     this.vbox3.Add(this.entry_last);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox3[this.entry_last]));
     w6.Position = 1;
     w6.Expand = false;
     w6.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.entry_pass = new Gtk.Entry();
     this.entry_pass.CanFocus = true;
     this.entry_pass.Name = "entry_pass";
     this.entry_pass.IsEditable = true;
     this.entry_pass.InvisibleChar = '●';
     this.vbox3.Add(this.entry_pass);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox3[this.entry_pass]));
     w7.Position = 2;
     w7.Expand = false;
     w7.Fill = false;
     this.hbox1.Add(this.vbox3);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox1[this.vbox3]));
     w8.Position = 1;
     // Container child hbox1.Gtk.Box+BoxChild
     this.button_login = new Gtk.Button();
     this.button_login.WidthRequest = 100;
     this.button_login.HeightRequest = 50;
     this.button_login.CanFocus = true;
     this.button_login.Name = "button_login";
     this.button_login.UseUnderline = true;
     // Container child button_login.Gtk.Container+ContainerChild
     Gtk.Alignment w9 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     Gtk.HBox w10 = new Gtk.HBox();
     w10.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Image w11 = new Gtk.Image();
     w11.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-connect", Gtk.IconSize.Menu, 16);
     w10.Add(w11);
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Label w13 = new Gtk.Label();
     w13.LabelProp = Mono.Unix.Catalog.GetString("Login");
     w13.UseUnderline = true;
     w10.Add(w13);
     w9.Add(w10);
     this.button_login.Add(w9);
     this.hbox1.Add(this.button_login);
     Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(this.hbox1[this.button_login]));
     w17.Position = 2;
     w17.Expand = false;
     w17.Fill = false;
     this.vbox1.Add(this.hbox1);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
     w18.Position = 0;
     w18.Expand = false;
     w18.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.vbox5 = new Gtk.VBox();
     this.vbox5.Name = "vbox5";
     this.vbox5.Spacing = 6;
     // Container child vbox5.Gtk.Box+BoxChild
     this.hbox2 = new Gtk.HBox();
     this.hbox2.Name = "hbox2";
     this.hbox2.Spacing = 6;
     // Container child hbox2.Gtk.Box+BoxChild
     this.checkbutton_rememberpass = new Gtk.CheckButton();
     this.checkbutton_rememberpass.CanFocus = true;
     this.checkbutton_rememberpass.Name = "checkbutton_rememberpass";
     this.checkbutton_rememberpass.Label = Mono.Unix.Catalog.GetString("Remember password");
     this.checkbutton_rememberpass.DrawIndicator = true;
     this.checkbutton_rememberpass.UseUnderline = true;
     this.hbox2.Add(this.checkbutton_rememberpass);
     Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.hbox2[this.checkbutton_rememberpass]));
     w19.Position = 0;
     this.vbox5.Add(this.hbox2);
     Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.vbox5[this.hbox2]));
     w20.Position = 0;
     w20.Expand = false;
     w20.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.hbox5 = new Gtk.HBox();
     this.hbox5.Name = "hbox5";
     this.hbox5.Spacing = 6;
     // Container child hbox5.Gtk.Box+BoxChild
     this.label6 = new Gtk.Label();
     this.label6.Name = "label6";
     this.label6.LabelProp = Mono.Unix.Catalog.GetString("Login to");
     this.hbox5.Add(this.label6);
     Gtk.Box.BoxChild w21 = ((Gtk.Box.BoxChild)(this.hbox5[this.label6]));
     w21.Position = 0;
     w21.Expand = false;
     w21.Fill = false;
     // Container child hbox5.Gtk.Box+BoxChild
     this.hbox4 = new Gtk.HBox();
     this.hbox4.Name = "hbox4";
     this.hbox4.Spacing = 5;
     // Container child hbox4.Gtk.Box+BoxChild
     this.radiobutton1 = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Home"));
     this.radiobutton1.CanFocus = true;
     this.radiobutton1.Name = "radiobutton1";
     this.radiobutton1.DrawIndicator = true;
     this.radiobutton1.UseUnderline = true;
     this.radiobutton1.Group = new GLib.SList(System.IntPtr.Zero);
     this.hbox4.Add(this.radiobutton1);
     Gtk.Box.BoxChild w22 = ((Gtk.Box.BoxChild)(this.hbox4[this.radiobutton1]));
     w22.Position = 0;
     // Container child hbox4.Gtk.Box+BoxChild
     this.radiobutton2 = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Last"));
     this.radiobutton2.CanFocus = true;
     this.radiobutton2.Name = "radiobutton2";
     this.radiobutton2.DrawIndicator = true;
     this.radiobutton2.UseUnderline = true;
     this.radiobutton2.Group = this.radiobutton1.Group;
     this.hbox4.Add(this.radiobutton2);
     Gtk.Box.BoxChild w23 = ((Gtk.Box.BoxChild)(this.hbox4[this.radiobutton2]));
     w23.Position = 1;
     // Container child hbox4.Gtk.Box+BoxChild
     this.radiobutton3 = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Location"));
     this.radiobutton3.CanFocus = true;
     this.radiobutton3.Name = "radiobutton3";
     this.radiobutton3.DrawIndicator = true;
     this.radiobutton3.UseUnderline = true;
     this.radiobutton3.Group = this.radiobutton1.Group;
     this.hbox4.Add(this.radiobutton3);
     Gtk.Box.BoxChild w24 = ((Gtk.Box.BoxChild)(this.hbox4[this.radiobutton3]));
     w24.Position = 2;
     // Container child hbox4.Gtk.Box+BoxChild
     this.entry_location = new Gtk.Entry();
     this.entry_location.CanFocus = true;
     this.entry_location.Name = "entry_location";
     this.entry_location.IsEditable = true;
     this.entry_location.InvisibleChar = '●';
     this.hbox4.Add(this.entry_location);
     Gtk.Box.BoxChild w25 = ((Gtk.Box.BoxChild)(this.hbox4[this.entry_location]));
     w25.Position = 3;
     this.hbox5.Add(this.hbox4);
     Gtk.Box.BoxChild w26 = ((Gtk.Box.BoxChild)(this.hbox5[this.hbox4]));
     w26.Position = 1;
     w26.Expand = false;
     w26.Fill = false;
     // Container child hbox5.Gtk.Box+BoxChild
     this.progressbar2 = new Gtk.ProgressBar();
     this.progressbar2.Name = "progressbar2";
     this.hbox5.Add(this.progressbar2);
     Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.hbox5[this.progressbar2]));
     w27.PackType = ((Gtk.PackType)(1));
     w27.Position = 2;
     this.vbox5.Add(this.hbox5);
     Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.vbox5[this.hbox5]));
     w28.Position = 1;
     w28.Expand = false;
     w28.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.hbox6 = new Gtk.HBox();
     this.hbox6.Name = "hbox6";
     this.hbox6.Spacing = 6;
     // Container child hbox6.Gtk.Box+BoxChild
     this.label4 = new Gtk.Label();
     this.label4.Name = "label4";
     this.label4.LabelProp = Mono.Unix.Catalog.GetString("Connect to grid ");
     this.hbox6.Add(this.label4);
     Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox6[this.label4]));
     w29.Position = 0;
     w29.Expand = false;
     w29.Fill = false;
     // Container child hbox6.Gtk.Box+BoxChild
     this.combobox_grid = Gtk.ComboBox.NewText();
     this.combobox_grid.WidthRequest = 140;
     this.combobox_grid.Name = "combobox_grid";
     this.hbox6.Add(this.combobox_grid);
     Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.hbox6[this.combobox_grid]));
     w30.Position = 1;
     w30.Expand = false;
     w30.Fill = false;
     // Container child hbox6.Gtk.Box+BoxChild
     this.label5 = new Gtk.Label();
     this.label5.Name = "label5";
     this.label5.LabelProp = Mono.Unix.Catalog.GetString("URI");
     this.hbox6.Add(this.label5);
     Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(this.hbox6[this.label5]));
     w31.Position = 2;
     w31.Expand = false;
     w31.Fill = false;
     // Container child hbox6.Gtk.Box+BoxChild
     this.entry_loginuri = new Gtk.Entry();
     this.entry_loginuri.CanFocus = true;
     this.entry_loginuri.Name = "entry_loginuri";
     this.entry_loginuri.IsEditable = true;
     this.entry_loginuri.InvisibleChar = '●';
     this.hbox6.Add(this.entry_loginuri);
     Gtk.Box.BoxChild w32 = ((Gtk.Box.BoxChild)(this.hbox6[this.entry_loginuri]));
     w32.Position = 3;
     this.vbox5.Add(this.hbox6);
     Gtk.Box.BoxChild w33 = ((Gtk.Box.BoxChild)(this.vbox5[this.hbox6]));
     w33.Position = 2;
     w33.Expand = false;
     w33.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.textview_loginmsg = new Gtk.TextView();
     this.textview_loginmsg.HeightRequest = 35;
     this.textview_loginmsg.CanFocus = true;
     this.textview_loginmsg.Name = "textview_loginmsg";
     this.textview_loginmsg.Editable = false;
     this.textview_loginmsg.WrapMode = ((Gtk.WrapMode)(2));
     this.GtkAlignment1.Add(this.textview_loginmsg);
     this.frame1.Add(this.GtkAlignment1);
     this.GtkLabel5 = new Gtk.Label();
     this.GtkLabel5.Name = "GtkLabel5";
     this.GtkLabel5.LabelProp = Mono.Unix.Catalog.GetString("<b>Login message</b>");
     this.GtkLabel5.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel5;
     this.vbox5.Add(this.frame1);
     Gtk.Box.BoxChild w36 = ((Gtk.Box.BoxChild)(this.vbox5[this.frame1]));
     w36.Position = 3;
     // Container child vbox5.Gtk.Box+BoxChild
     this.frame2 = new Gtk.Frame();
     this.frame2.Name = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.GtkScrolledWindow1 = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow1.Name = "GtkScrolledWindow1";
     this.GtkScrolledWindow1.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow1.Gtk.Container+ContainerChild
     this.textview_log = new Gtk.TextView();
     this.textview_log.CanFocus = true;
     this.textview_log.Name = "textview_log";
     this.textview_log.Editable = false;
     this.textview_log.WrapMode = ((Gtk.WrapMode)(2));
     this.GtkScrolledWindow1.Add(this.textview_log);
     this.GtkAlignment2.Add(this.GtkScrolledWindow1);
     this.frame2.Add(this.GtkAlignment2);
     this.GtkLabel6 = new Gtk.Label();
     this.GtkLabel6.Name = "GtkLabel6";
     this.GtkLabel6.LabelProp = Mono.Unix.Catalog.GetString("<b>Debug log</b>");
     this.GtkLabel6.UseMarkup = true;
     this.frame2.LabelWidget = this.GtkLabel6;
     this.vbox5.Add(this.frame2);
     Gtk.Box.BoxChild w40 = ((Gtk.Box.BoxChild)(this.vbox5[this.frame2]));
     w40.Position = 4;
     this.vbox1.Add(this.vbox5);
     Gtk.Box.BoxChild w41 = ((Gtk.Box.BoxChild)(this.vbox1[this.vbox5]));
     w41.Position = 1;
     this.Add(this.vbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.button_login.Clicked += new System.EventHandler(this.OnButton1Clicked);
     this.checkbutton_rememberpass.Clicked += new System.EventHandler(this.OnCheckbuttonRememberpassClicked);
     this.combobox_grid.Changed += new System.EventHandler(this.OnComboboxGridChanged);
 }
예제 #33
0
		Gtk.Widget CreateFakeItem ()
		{
			Gtk.Frame frm = new Gtk.Frame ();
			frm.ShadowType = Gtk.ShadowType.Out;
			int w, h;
			Gtk.Icon.SizeLookup (parentToolbar.IconSize, out w, out h);
			frm.WidthRequest = w;
			frm.HeightRequest = h;
			return frm;
		}
예제 #34
0
        public void SetFrameType(FrameType type)
        {
            Frame f = (Frame) Frontend;

            switch (type) {
            case FrameType.Custom:
                if (!(Widget is HeaderBox)) {
                    HeaderBox box = new HeaderBox ();
                    box.Show ();
                    box.BackgroundColor = UsingCustomBackgroundColor ? (Color?)BackgroundColor : null;
                    #pragma warning disable 618
                    box.SetMargins ((int)f.BorderWidthTop, (int)f.BorderWidthBottom, (int)f.BorderWidthLeft, (int)f.BorderWidthRight);
                    #pragma warning restore 618
                    box.SetPadding ((int)f.Padding.Top, (int)f.Padding.Bottom, (int)f.Padding.Left, (int)f.Padding.Right);
                    if (borderColor != null)
                        box.SetBorderColor (borderColor.Value);
                    var c = paddingAlign != null ? paddingAlign.Child : Widget.Child;
                    if (c != null) {
                        ((Gtk.Container)c.Parent).Remove (c);
                        box.Add (c);
                    }
                    Widget = box;
                    if (paddingAlign != null) {
                        paddingAlign.Destroy ();
                        paddingAlign = null;
                    }
                }
                break;
            case FrameType.WidgetBox:
                if (!(Widget is Gtk.Frame)) {
                    var c = Widget.Child;
                    if (c != null)
                        Widget.Remove (c);
                    Gtk.Frame gf = new Gtk.Frame ();
                    if (!string.IsNullOrEmpty (label))
                        gf.Label = label;
                    if (f.Padding.HorizontalSpacing != 0 || f.Padding.VerticalSpacing != 0) {
                        paddingAlign = new Gtk.Alignment (0, 0, 1, 1);
                        paddingAlign.Show ();
                        UreatePaddingAlign (f.Padding.Top, f.Padding.Bottom, f.Padding.Left, f.Padding.Right);
                        if (c != null)
                            paddingAlign.Add (c);
                        gf.Add (paddingAlign);
                    } else {
                        if (c != null)
                            gf.Add (c);
                    }
                    gf.Show ();
                    Widget = gf;
                }
                break;
            }
        }
예제 #35
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.WaypointDialog
     this.Name           = "ocmgtk.WaypointDialog";
     this.Title          = Mono.Unix.Catalog.GetString("Add/Edit Waypoint...");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.BorderWidth    = ((uint)(6));
     // Internal child ocmgtk.WaypointDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name        = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.table1               = new Gtk.Table(((uint)(4)), ((uint)(2)), false);
     this.table1.Name          = "table1";
     this.table1.RowSpacing    = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.alignment2              = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment2.Name         = "alignment2";
     this.alignment2.TopPadding   = ((uint)(6));
     this.alignment2.RightPadding = ((uint)(12));
     // Container child alignment2.Gtk.Container+ContainerChild
     this.nameEntry               = new Gtk.Entry();
     this.nameEntry.CanFocus      = true;
     this.nameEntry.Name          = "nameEntry";
     this.nameEntry.IsEditable    = true;
     this.nameEntry.InvisibleChar = '•';
     this.alignment2.Add(this.nameEntry);
     this.table1.Add(this.alignment2);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table1[this.alignment2]));
     w3.LeftAttach  = ((uint)(1));
     w3.RightAttach = ((uint)(2));
     w3.YOptions    = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.alignment3              = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment3.Name         = "alignment3";
     this.alignment3.TopPadding   = ((uint)(6));
     this.alignment3.RightPadding = ((uint)(12));
     // Container child alignment3.Gtk.Container+ContainerChild
     this.flagEntry = Gtk.ComboBox.NewText();
     this.flagEntry.AppendText(Mono.Unix.Catalog.GetString("Final Location"));
     this.flagEntry.AppendText(Mono.Unix.Catalog.GetString("Parking Area"));
     this.flagEntry.AppendText(Mono.Unix.Catalog.GetString("Question To Answer"));
     this.flagEntry.AppendText(Mono.Unix.Catalog.GetString("Reference Point"));
     this.flagEntry.AppendText(Mono.Unix.Catalog.GetString("Stages of a Multicache"));
     this.flagEntry.AppendText(Mono.Unix.Catalog.GetString("Trailhead"));
     this.flagEntry.AppendText(Mono.Unix.Catalog.GetString("Other"));
     this.flagEntry.Name   = "flagEntry";
     this.flagEntry.Active = 0;
     this.alignment3.Add(this.flagEntry);
     this.table1.Add(this.alignment3);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.alignment3]));
     w5.TopAttach    = ((uint)(1));
     w5.BottomAttach = ((uint)(2));
     w5.LeftAttach   = ((uint)(1));
     w5.RightAttach  = ((uint)(2));
     w5.XOptions     = ((Gtk.AttachOptions)(4));
     w5.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.hseparator1      = new Gtk.HSeparator();
     this.hseparator1.Name = "hseparator1";
     this.table1.Add(this.hseparator1);
     Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.hseparator1]));
     w6.TopAttach    = ((uint)(2));
     w6.BottomAttach = ((uint)(3));
     w6.RightAttach  = ((uint)(2));
     w6.XOptions     = ((Gtk.AttachOptions)(4));
     w6.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.hseparator2      = new Gtk.HSeparator();
     this.hseparator2.Name = "hseparator2";
     this.table1.Add(this.hseparator2);
     Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.hseparator2]));
     w7.TopAttach    = ((uint)(3));
     w7.BottomAttach = ((uint)(4));
     w7.RightAttach  = ((uint)(2));
     w7.XOptions     = ((Gtk.AttachOptions)(4));
     w7.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label1           = new Gtk.Label();
     this.label1.Name      = "label1";
     this.label1.Xalign    = 0F;
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Name:");
     this.table1.Add(this.label1);
     Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table1[this.label1]));
     w8.XOptions = ((Gtk.AttachOptions)(4));
     w8.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label5           = new Gtk.Label();
     this.label5.Name      = "label5";
     this.label5.Xalign    = 0F;
     this.label5.LabelProp = Mono.Unix.Catalog.GetString("Symbol:");
     this.table1.Add(this.label5);
     Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table1[this.label5]));
     w9.TopAttach    = ((uint)(1));
     w9.BottomAttach = ((uint)(2));
     w9.XOptions     = ((Gtk.AttachOptions)(4));
     w9.YOptions     = ((Gtk.AttachOptions)(4));
     w1.Add(this.table1);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(w1[this.table1]));
     w10.Position = 0;
     w10.Expand   = false;
     w10.Fill     = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name        = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.locationWidget           = new ocmgtk.LocationWidget();
     this.locationWidget.Events    = ((Gdk.EventMask)(256));
     this.locationWidget.Name      = "locationWidget";
     this.locationWidget.Latitude  = 0;
     this.locationWidget.Longitude = 0;
     this.GtkAlignment2.Add(this.locationWidget);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel2           = new Gtk.Label();
     this.GtkLabel2.Name      = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("<b>Location</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel2;
     w1.Add(this.frame1);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(w1[this.frame1]));
     w13.Position = 1;
     w13.Expand   = false;
     w13.Fill     = false;
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame2            = new Gtk.Frame();
     this.frame2.Name       = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment3             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name        = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.GtkScrolledWindow            = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name       = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.descriptionEntry          = new Gtk.TextView();
     this.descriptionEntry.CanFocus = true;
     this.descriptionEntry.Name     = "descriptionEntry";
     this.GtkScrolledWindow.Add(this.descriptionEntry);
     this.GtkAlignment3.Add(this.GtkScrolledWindow);
     this.frame2.Add(this.GtkAlignment3);
     this.GtkLabel3           = new Gtk.Label();
     this.GtkLabel3.Name      = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>Description</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame2.LabelWidget  = this.GtkLabel3;
     w1.Add(this.frame2);
     Gtk.Box.BoxChild w17 = ((Gtk.Box.BoxChild)(w1[this.frame2]));
     w17.Position = 2;
     // Internal child ocmgtk.WaypointDialog.ActionArea
     Gtk.HButtonBox w18 = this.ActionArea;
     w18.Name        = "dialog1_ActionArea";
     w18.Spacing     = 10;
     w18.BorderWidth = ((uint)(5));
     w18.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel              = new Gtk.Button();
     this.buttonCancel.CanDefault   = true;
     this.buttonCancel.CanFocus     = true;
     this.buttonCancel.Name         = "buttonCancel";
     this.buttonCancel.UseStock     = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label        = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w19 = ((Gtk.ButtonBox.ButtonBoxChild)(w18[this.buttonCancel]));
     w19.Expand = false;
     w19.Fill   = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk              = new Gtk.Button();
     this.buttonOk.CanDefault   = true;
     this.buttonOk.CanFocus     = true;
     this.buttonOk.Name         = "buttonOk";
     this.buttonOk.UseStock     = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label        = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w20 = ((Gtk.ButtonBox.ButtonBoxChild)(w18[this.buttonOk]));
     w20.Position = 1;
     w20.Expand   = false;
     w20.Fill     = false;
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 704;
     this.DefaultHeight = 473;
     this.Show();
     this.flagEntry.Changed    += new System.EventHandler(this.OnSelectionChanged);
     this.buttonCancel.Clicked += new System.EventHandler(this.OnButtonCancelClicked);
     this.buttonOk.Clicked     += new System.EventHandler(this.OnOKClicked);
 }
예제 #36
0
        public ImageSelectorEditor()
        {
            Spacing = 3;
            imageFrame = new Gtk.Frame ();
            imageFrame.Shadow = Gtk.ShadowType.In;
            imageFrame.BorderWidth = 2;
            PackStart (imageFrame, false, false, 0);

            image = new Gtk.Image (Gnome.Stock.Blank, Gtk.IconSize.Button);
            imageFrame.Add (image);

            Gtk.Frame frame = new Gtk.Frame ();
            entry = new Gtk.Label ();
            entry.Xalign = 0;
            frame.Shadow = Gtk.ShadowType.In;
            frame.BorderWidth = 2;
            frame.Add (entry);
            PackStart (frame, true, true, 0);

            clearButton = new Gtk.Button (new Gtk.Image (Gtk.Stock.Clear, Gtk.IconSize.Menu));
            clearButton.Clicked += OnClearImage;
            PackStart (clearButton, false, false, 0);

            button = new Gtk.Button ("...");
            PackStart (button, false, false, 0);
            button.Clicked += button_Clicked;
            ShowAll ();
        }
예제 #37
0
        public FeedbackDialog(int x, int y) : base(Gtk.WindowType.Toplevel)
        {
            SetDefaultSize(350, 200);
            if (x == -1 && y == -1)
            {
                int ww, wh;
                IdeApp.Workbench.RootWindow.GdkWindow.GetSize(out ww, out wh);
                IdeApp.Workbench.RootWindow.GdkWindow.GetOrigin(out x, out y);
                x = ww / 2 - 350 / 2;
                y = wh / 2 - 200 / 2;
                Move(x, y);
            }
            else
            {
                Move(x - 350, y - 200);
            }

            mainFrame = new Gtk.Frame();

            mainBox                = new Gtk.VBox();
            mainBox.BorderWidth    = 12;
            mainBox.Spacing        = 6;
            headerBox              = new Gtk.HBox();
            mailEntry              = new EntryWithEmptyMessage();
            mailEntry.EmptyMessage = GettextCatalog.GetString("email address");
            Decorated              = false;
            mainFrame.ShadowType   = Gtk.ShadowType.Out;

            // Header

            headerBox.Spacing = 6;
            mailLabel         = new Gtk.Label();
            headerBox.PackStart(mailLabel, false, false, 0);
            Gtk.Button changeButton = new Gtk.Button("(Change)");
            changeButton.Relief = Gtk.ReliefStyle.None;
            headerBox.PackStart(changeButton, false, false, 0);
            changeButton.Clicked += HandleChangeButtonClicked;
            mainBox.PackStart(headerBox, false, false, 0);
            mainBox.PackStart(mailEntry, false, false, 0);
            mailWarningLabel        = new Gtk.Label(GettextCatalog.GetString("Please enter a valid e-mail address"));
            mailWarningLabel.Xalign = 0;
            mainBox.PackStart(mailWarningLabel, false, false, 0);

            // Body

            textEntry = new TextViewWithEmptyMessage();
            textEntry.EmptyMessage = GettextCatalog.GetString(
                "Tell us how we can make {0} better.",
                BrandingService.SuiteName
                );
            textEntry.AcceptsTab   = false;
            textEntry.WrapMode     = Gtk.WrapMode.Word;
            textEntry.WidthRequest = 300;
            var sw = new Gtk.ScrolledWindow();

            sw.ShadowType       = Gtk.ShadowType.In;
            sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.HscrollbarPolicy = Gtk.PolicyType.Never;
            sw.Add(textEntry);
            mainBox.PackStart(sw, true, true, 0);
            bodyWarningLabel        = new Gtk.Label(GettextCatalog.GetString("Please enter some feedback"));
            bodyWarningLabel.Xalign = 0;
            mainBox.PackStart(bodyWarningLabel, false, false, 0);

            // Bottom

            Gtk.HBox  bottomBox  = new Gtk.HBox(false, 6);
            Gtk.Label countLabel = new Gtk.Label();
            countLabel.Xalign = 0;
            bottomBox.PackStart(countLabel, false, false, 0);

            Gtk.Button sendButton = new Gtk.Button(GettextCatalog.GetString("Send Feedback"));
            sendButton.Clicked += HandleSendButtonClicked;
            bottomBox.PackEnd(sendButton, false, false, 0);
            mainBox.PackStart(bottomBox, false, false, 0);

            // Init

            mainBox.ShowAll();

            mailWarningLabel.Hide();
            bodyWarningLabel.Hide();

            string mail = FeedbackService.ReporterEMail;

            if (string.IsNullOrEmpty(mail))
            {
                mail = AuthorInformation.Default.Email;
            }

            if (string.IsNullOrEmpty(mail))
            {
                headerBox.Hide();
                mailEntry.GrabFocus();
            }
            else
            {
                mailEntry.Text = mail;
                mailEntry.Hide();
                mailLabel.Text = GettextCatalog.GetString("From: {0}", mail);
                textEntry.GrabFocus();
            }
            if (FeedbackService.FeedbacksSent > 0)
            {
                countLabel.Text = GettextCatalog.GetString("Your feedbacks: {0}", FeedbackService.FeedbacksSent);
            }
            else
            {
                countLabel.Hide();
            }

            mainFrame.Show();
            mainFrame.Add(mainBox);
            Add(mainFrame);
        }
예제 #38
0
 public Control()
 {
     box             = new Gtk.Frame();
     box.BorderWidth = 0;
     box.ShadowType  = Gtk.ShadowType.None;
 }
예제 #39
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ImageShack.ImageShackConfig
     Stetic.BinContainer.Attach(this);
     this.Name = "ImageShack.ImageShackConfig";
     // Container child ImageShack.ImageShackConfig.Gtk.Container+ContainerChild
     this.vbox1         = new Gtk.VBox();
     this.vbox1.Name    = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment1             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name        = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label2           = new Gtk.Label();
     this.label2.Name      = "label2";
     this.label2.Xalign    = 0F;
     this.label2.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("If you have an ImageShack account, a registration code allows you to save images to the My Images sections of your account.\n\nPlease log-in to your ImageShack account before getting your registration code.");
     this.label2.Wrap      = true;
     this.hbox1.Add(this.label2);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.label2]));
     w1.Position = 0;
     w1.Expand   = false;
     w1.Fill     = false;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w2.Position = 0;
     w2.Expand   = false;
     w2.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox2             = new Gtk.HBox();
     this.hbox2.Name        = "hbox2";
     this.hbox2.Spacing     = 6;
     this.hbox2.BorderWidth = ((uint)(3));
     // Container child hbox2.Gtk.Box+BoxChild
     this.label1              = new Gtk.Label();
     this.label1.Name         = "label1";
     this.label1.Xalign       = 0F;
     this.label1.LabelProp    = Mono.Addins.AddinManager.CurrentLocalizer.GetString("_Registration Code");
     this.label1.UseUnderline = true;
     this.hbox2.Add(this.label1);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox2[this.label1]));
     w3.Position = 0;
     w3.Expand   = false;
     w3.Fill     = false;
     // Container child hbox2.Gtk.Box+BoxChild
     this.RegistrationCodeEntry               = new Gtk.Entry();
     this.RegistrationCodeEntry.CanFocus      = true;
     this.RegistrationCodeEntry.Name          = "RegistrationCodeEntry";
     this.RegistrationCodeEntry.IsEditable    = true;
     this.RegistrationCodeEntry.WidthChars    = 35;
     this.RegistrationCodeEntry.InvisibleChar = '●';
     this.hbox2.Add(this.RegistrationCodeEntry);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox2[this.RegistrationCodeEntry]));
     w4.Position = 1;
     w4.Expand   = false;
     this.vbox2.Add(this.hbox2);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox2]));
     w5.Position = 1;
     w5.Expand   = false;
     w5.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox3             = new Gtk.HBox();
     this.hbox3.Name        = "hbox3";
     this.hbox3.Spacing     = 6;
     this.hbox3.BorderWidth = ((uint)(3));
     // Container child hbox3.Gtk.Box+BoxChild
     this.RegistrationButton              = new Gtk.Button();
     this.RegistrationButton.CanFocus     = true;
     this.RegistrationButton.Name         = "RegistrationButton";
     this.RegistrationButton.UseUnderline = true;
     this.RegistrationButton.Xalign       = 0F;
     this.RegistrationButton.Label        = Mono.Addins.AddinManager.CurrentLocalizer.GetString("_Get Registration Code");
     this.hbox3.Add(this.RegistrationButton);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.hbox3[this.RegistrationButton]));
     w6.Position = 0;
     w6.Expand   = false;
     w6.Fill     = false;
     this.vbox2.Add(this.hbox3);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox3]));
     w7.Position = 2;
     w7.Expand   = false;
     w7.Fill     = false;
     this.GtkAlignment1.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment1);
     this.GtkLabel1           = new Gtk.Label();
     this.GtkLabel1.Name      = "GtkLabel1";
     this.GtkLabel1.Xalign    = 0F;
     this.GtkLabel1.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>Registration Code</b>");
     this.GtkLabel1.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel1;
     this.vbox1.Add(this.frame1);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1]));
     w10.Position = 0;
     w10.Expand   = false;
     w10.Fill     = false;
     this.Add(this.vbox1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.label1.MnemonicWidget = this.RegistrationCodeEntry;
     this.Show();
     this.RegistrationCodeEntry.Changed += new System.EventHandler(this.OnRegistrationCodeEntryChanged);
     this.RegistrationButton.Clicked    += new System.EventHandler(this.OnRegistrationButtonClicked);
 }
예제 #40
0
        private void BuildNameFrame()
        {
            var vbBox = new Gtk.VBox( false, 5 );

            // The frame
            this.frmName = new Gtk.Frame( "Name" );
            this.frmName.Add( vbBox );

            // Given name
            var hbGivenName = new Gtk.HBox( false, 5 );
            this.edName = new Gtk.Entry();
            hbGivenName.PackStart( new Gtk.Label(){ Markup = "<b>Name</b>" }, false, false, 5 );
            hbGivenName.PackStart( this.edName, true, true, 5 );

            // Family name
            var hbFamilyName = new Gtk.HBox( false, 5 );
            this.edSurname = new Gtk.Entry();
            hbFamilyName.PackStart( new Gtk.Label() { Markup = "<b>Surname</b> <i>(or activity)</i>" }, false, false, 5 );
            hbFamilyName.PackStart( this.edSurname, true, true, 5 );

            vbBox.PackStart( hbGivenName, true, true, 5 );
            vbBox.PackStart( hbFamilyName, true, true, 5 );
            this.vbPage1.PackStart( this.frmName, true, true, 5 );
        }
 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget Gedcom.UI.GTK.PreferencesDialog
     this.Name = "Gedcom.UI.GTK.PreferencesDialog";
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.HasSeparator = false;
     // Internal child Gedcom.UI.GTK.PreferencesDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.notebook1 = new Gtk.Notebook();
     this.notebook1.CanFocus = true;
     this.notebook1.Name = "notebook1";
     this.notebook1.CurrentPage = 2;
     this.notebook1.BorderWidth = ((uint)(6));
     // Container child notebook1.Gtk.Notebook+NotebookChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     this.vbox2.BorderWidth = ((uint)(6));
     // Container child vbox2.Gtk.Box+BoxChild
     this.LoadLastOpenedCheckbutton = new Gtk.CheckButton();
     this.LoadLastOpenedCheckbutton.CanFocus = true;
     this.LoadLastOpenedCheckbutton.Name = "LoadLastOpenedCheckbutton";
     this.LoadLastOpenedCheckbutton.Label = Mono.Unix.Catalog.GetString("Load Last Opened File on Startup");
     this.LoadLastOpenedCheckbutton.DrawIndicator = true;
     this.LoadLastOpenedCheckbutton.UseUnderline = true;
     this.vbox2.Add(this.LoadLastOpenedCheckbutton);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.LoadLastOpenedCheckbutton]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     this.notebook1.Add(this.vbox2);
     // Notebook tab
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("General");
     this.notebook1.SetTabLabel(this.vbox2, this.label1);
     this.label1.ShowAll();
     // Container child notebook1.Gtk.Notebook+NotebookChild
     this.table1 = new Gtk.Table(((uint)(2)), ((uint)(2)), false);
     this.table1.Name = "table1";
     this.table1.RowSpacing = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     this.table1.BorderWidth = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.AddressView = new Gedcom.UI.GTK.Widgets.AddressView();
     this.AddressView.Events = ((Gdk.EventMask)(256));
     this.AddressView.Name = "AddressView";
     this.table1.Add(this.AddressView);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.AddressView]));
     w4.TopAttach = ((uint)(1));
     w4.BottomAttach = ((uint)(2));
     w4.RightAttach = ((uint)(2));
     // Container child table1.Gtk.Table+TableChild
     this.label4 = new Gtk.Label();
     this.label4.Name = "label4";
     this.label4.Xalign = 0F;
     this.label4.LabelProp = Mono.Unix.Catalog.GetString("Name:");
     this.table1.Add(this.label4);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
     w5.XOptions = ((Gtk.AttachOptions)(4));
     w5.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.NameEntry = new Gtk.Entry();
     this.NameEntry.CanFocus = true;
     this.NameEntry.Name = "NameEntry";
     this.NameEntry.IsEditable = true;
     this.NameEntry.InvisibleChar = '●';
     this.table1.Add(this.NameEntry);
     Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.NameEntry]));
     w6.LeftAttach = ((uint)(1));
     w6.RightAttach = ((uint)(2));
     w6.YOptions = ((Gtk.AttachOptions)(4));
     this.notebook1.Add(this.table1);
     Gtk.Notebook.NotebookChild w7 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.table1]));
     w7.Position = 1;
     // Notebook tab
     this.label2 = new Gtk.Label();
     this.label2.Name = "label2";
     this.label2.LabelProp = Mono.Unix.Catalog.GetString("Submitter");
     this.notebook1.SetTabLabel(this.table1, this.label2);
     this.label2.ShowAll();
     // Container child notebook1.Gtk.Notebook+NotebookChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     this.vbox3.BorderWidth = ((uint)(6));
     // Container child vbox3.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.table2 = new Gtk.Table(((uint)(8)), ((uint)(3)), false);
     this.table2.Name = "table2";
     this.table2.RowSpacing = ((uint)(6));
     this.table2.ColumnSpacing = ((uint)(6));
     this.table2.BorderWidth = ((uint)(6));
     // Container child table2.Gtk.Table+TableChild
     this.AllowHypenAndUnderscoreLoadCheckbutton = new Gtk.CheckButton();
     this.AllowHypenAndUnderscoreLoadCheckbutton.CanFocus = true;
     this.AllowHypenAndUnderscoreLoadCheckbutton.Name = "AllowHypenAndUnderscoreLoadCheckbutton";
     this.AllowHypenAndUnderscoreLoadCheckbutton.Label = "";
     this.AllowHypenAndUnderscoreLoadCheckbutton.DrawIndicator = true;
     this.AllowHypenAndUnderscoreLoadCheckbutton.UseUnderline = true;
     this.table2.Add(this.AllowHypenAndUnderscoreLoadCheckbutton);
     Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table2[this.AllowHypenAndUnderscoreLoadCheckbutton]));
     w8.TopAttach = ((uint)(1));
     w8.BottomAttach = ((uint)(2));
     w8.LeftAttach = ((uint)(1));
     w8.RightAttach = ((uint)(2));
     w8.XOptions = ((Gtk.AttachOptions)(4));
     w8.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.AllowInformationSeparatorOneLoadCheckbutton = new Gtk.CheckButton();
     this.AllowInformationSeparatorOneLoadCheckbutton.CanFocus = true;
     this.AllowInformationSeparatorOneLoadCheckbutton.Name = "AllowInformationSeparatorOneLoadCheckbutton";
     this.AllowInformationSeparatorOneLoadCheckbutton.Label = "";
     this.AllowInformationSeparatorOneLoadCheckbutton.DrawIndicator = true;
     this.AllowInformationSeparatorOneLoadCheckbutton.UseUnderline = true;
     this.table2.Add(this.AllowInformationSeparatorOneLoadCheckbutton);
     Gtk.Table.TableChild w9 = ((Gtk.Table.TableChild)(this.table2[this.AllowInformationSeparatorOneLoadCheckbutton]));
     w9.TopAttach = ((uint)(2));
     w9.BottomAttach = ((uint)(3));
     w9.LeftAttach = ((uint)(1));
     w9.RightAttach = ((uint)(2));
     w9.XOptions = ((Gtk.AttachOptions)(4));
     w9.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.AllowInformationSeparatorOneSaveCheckbutton = new Gtk.CheckButton();
     this.AllowInformationSeparatorOneSaveCheckbutton.CanFocus = true;
     this.AllowInformationSeparatorOneSaveCheckbutton.Name = "AllowInformationSeparatorOneSaveCheckbutton";
     this.AllowInformationSeparatorOneSaveCheckbutton.Label = "";
     this.AllowInformationSeparatorOneSaveCheckbutton.DrawIndicator = true;
     this.AllowInformationSeparatorOneSaveCheckbutton.UseUnderline = true;
     this.table2.Add(this.AllowInformationSeparatorOneSaveCheckbutton);
     Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table2[this.AllowInformationSeparatorOneSaveCheckbutton]));
     w10.TopAttach = ((uint)(2));
     w10.BottomAttach = ((uint)(3));
     w10.LeftAttach = ((uint)(2));
     w10.RightAttach = ((uint)(3));
     w10.XOptions = ((Gtk.AttachOptions)(4));
     w10.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.AllowLineTabsLoadCheckbutton = new Gtk.CheckButton();
     this.AllowLineTabsLoadCheckbutton.CanFocus = true;
     this.AllowLineTabsLoadCheckbutton.Name = "AllowLineTabsLoadCheckbutton";
     this.AllowLineTabsLoadCheckbutton.Label = "";
     this.AllowLineTabsLoadCheckbutton.DrawIndicator = true;
     this.AllowLineTabsLoadCheckbutton.UseUnderline = true;
     this.table2.Add(this.AllowLineTabsLoadCheckbutton);
     Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table2[this.AllowLineTabsLoadCheckbutton]));
     w11.TopAttach = ((uint)(3));
     w11.BottomAttach = ((uint)(4));
     w11.LeftAttach = ((uint)(1));
     w11.RightAttach = ((uint)(2));
     w11.XOptions = ((Gtk.AttachOptions)(4));
     w11.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.AllowLineTabsSaveCheckbutton = new Gtk.CheckButton();
     this.AllowLineTabsSaveCheckbutton.CanFocus = true;
     this.AllowLineTabsSaveCheckbutton.Name = "AllowLineTabsSaveCheckbutton";
     this.AllowLineTabsSaveCheckbutton.Label = "";
     this.AllowLineTabsSaveCheckbutton.DrawIndicator = true;
     this.AllowLineTabsSaveCheckbutton.UseUnderline = true;
     this.table2.Add(this.AllowLineTabsSaveCheckbutton);
     Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table2[this.AllowLineTabsSaveCheckbutton]));
     w12.TopAttach = ((uint)(3));
     w12.BottomAttach = ((uint)(4));
     w12.LeftAttach = ((uint)(2));
     w12.RightAttach = ((uint)(3));
     w12.XOptions = ((Gtk.AttachOptions)(4));
     w12.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.AllowTabsLoadCheckbutton = new Gtk.CheckButton();
     this.AllowTabsLoadCheckbutton.CanFocus = true;
     this.AllowTabsLoadCheckbutton.Name = "AllowTabsLoadCheckbutton";
     this.AllowTabsLoadCheckbutton.Label = "";
     this.AllowTabsLoadCheckbutton.DrawIndicator = true;
     this.AllowTabsLoadCheckbutton.UseUnderline = true;
     this.table2.Add(this.AllowTabsLoadCheckbutton);
     Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.table2[this.AllowTabsLoadCheckbutton]));
     w13.TopAttach = ((uint)(4));
     w13.BottomAttach = ((uint)(5));
     w13.LeftAttach = ((uint)(1));
     w13.RightAttach = ((uint)(2));
     w13.XOptions = ((Gtk.AttachOptions)(4));
     w13.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.AllowTabsSaveCheckbutton = new Gtk.CheckButton();
     this.AllowTabsSaveCheckbutton.CanFocus = true;
     this.AllowTabsSaveCheckbutton.Name = "AllowTabsSaveCheckbutton";
     this.AllowTabsSaveCheckbutton.Label = "";
     this.AllowTabsSaveCheckbutton.DrawIndicator = true;
     this.AllowTabsSaveCheckbutton.UseUnderline = true;
     this.table2.Add(this.AllowTabsSaveCheckbutton);
     Gtk.Table.TableChild w14 = ((Gtk.Table.TableChild)(this.table2[this.AllowTabsSaveCheckbutton]));
     w14.TopAttach = ((uint)(4));
     w14.BottomAttach = ((uint)(5));
     w14.LeftAttach = ((uint)(2));
     w14.RightAttach = ((uint)(3));
     w14.XOptions = ((Gtk.AttachOptions)(4));
     w14.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.ApplyConcContOnNewLineHackCheckbutton = new Gtk.CheckButton();
     this.ApplyConcContOnNewLineHackCheckbutton.CanFocus = true;
     this.ApplyConcContOnNewLineHackCheckbutton.Name = "ApplyConcContOnNewLineHackCheckbutton";
     this.ApplyConcContOnNewLineHackCheckbutton.Label = "";
     this.ApplyConcContOnNewLineHackCheckbutton.DrawIndicator = true;
     this.ApplyConcContOnNewLineHackCheckbutton.UseUnderline = true;
     this.table2.Add(this.ApplyConcContOnNewLineHackCheckbutton);
     Gtk.Table.TableChild w15 = ((Gtk.Table.TableChild)(this.table2[this.ApplyConcContOnNewLineHackCheckbutton]));
     w15.TopAttach = ((uint)(5));
     w15.BottomAttach = ((uint)(6));
     w15.LeftAttach = ((uint)(1));
     w15.RightAttach = ((uint)(2));
     w15.XOptions = ((Gtk.AttachOptions)(4));
     w15.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.IgnoreInvalidDelimeterCheckbutton = new Gtk.CheckButton();
     this.IgnoreInvalidDelimeterCheckbutton.CanFocus = true;
     this.IgnoreInvalidDelimeterCheckbutton.Name = "IgnoreInvalidDelimeterCheckbutton";
     this.IgnoreInvalidDelimeterCheckbutton.Label = "";
     this.IgnoreInvalidDelimeterCheckbutton.DrawIndicator = true;
     this.IgnoreInvalidDelimeterCheckbutton.UseUnderline = true;
     this.table2.Add(this.IgnoreInvalidDelimeterCheckbutton);
     Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.table2[this.IgnoreInvalidDelimeterCheckbutton]));
     w16.TopAttach = ((uint)(6));
     w16.BottomAttach = ((uint)(7));
     w16.LeftAttach = ((uint)(1));
     w16.RightAttach = ((uint)(2));
     w16.XOptions = ((Gtk.AttachOptions)(4));
     w16.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.IgnoreMissingLineTerminatorCheckbutton = new Gtk.CheckButton();
     this.IgnoreMissingLineTerminatorCheckbutton.CanFocus = true;
     this.IgnoreMissingLineTerminatorCheckbutton.Name = "IgnoreMissingLineTerminatorCheckbutton";
     this.IgnoreMissingLineTerminatorCheckbutton.Label = "";
     this.IgnoreMissingLineTerminatorCheckbutton.DrawIndicator = true;
     this.IgnoreMissingLineTerminatorCheckbutton.UseUnderline = true;
     this.table2.Add(this.IgnoreMissingLineTerminatorCheckbutton);
     Gtk.Table.TableChild w17 = ((Gtk.Table.TableChild)(this.table2[this.IgnoreMissingLineTerminatorCheckbutton]));
     w17.TopAttach = ((uint)(7));
     w17.BottomAttach = ((uint)(8));
     w17.LeftAttach = ((uint)(1));
     w17.RightAttach = ((uint)(2));
     w17.XOptions = ((Gtk.AttachOptions)(4));
     w17.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label10 = new Gtk.Label();
     this.label10.Name = "label10";
     this.label10.Xalign = 0F;
     this.label10.LabelProp = Mono.Unix.Catalog.GetString("Apply Conc / Cont On New Line Hack");
     this.table2.Add(this.label10);
     Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table2[this.label10]));
     w18.TopAttach = ((uint)(5));
     w18.BottomAttach = ((uint)(6));
     w18.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label11 = new Gtk.Label();
     this.label11.Name = "label11";
     this.label11.Xalign = 0F;
     this.label11.LabelProp = Mono.Unix.Catalog.GetString("Ignore Invalid Delimeter");
     this.table2.Add(this.label11);
     Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(this.table2[this.label11]));
     w19.TopAttach = ((uint)(6));
     w19.BottomAttach = ((uint)(7));
     w19.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label12 = new Gtk.Label();
     this.label12.Name = "label12";
     this.label12.Xalign = 0F;
     this.label12.LabelProp = Mono.Unix.Catalog.GetString("Ignore Missing Line Terminator");
     this.table2.Add(this.label12);
     Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(this.table2[this.label12]));
     w20.TopAttach = ((uint)(7));
     w20.BottomAttach = ((uint)(8));
     w20.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label13 = new Gtk.Label();
     this.label13.Name = "label13";
     this.label13.Xalign = 0F;
     this.label13.LabelProp = Mono.Unix.Catalog.GetString("Allow Line Tabs");
     this.table2.Add(this.label13);
     Gtk.Table.TableChild w21 = ((Gtk.Table.TableChild)(this.table2[this.label13]));
     w21.TopAttach = ((uint)(3));
     w21.BottomAttach = ((uint)(4));
     w21.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label5 = new Gtk.Label();
     this.label5.Name = "label5";
     this.label5.LabelProp = Mono.Unix.Catalog.GetString("<b>Load</b>");
     this.label5.UseMarkup = true;
     this.table2.Add(this.label5);
     Gtk.Table.TableChild w22 = ((Gtk.Table.TableChild)(this.table2[this.label5]));
     w22.LeftAttach = ((uint)(1));
     w22.RightAttach = ((uint)(2));
     w22.XOptions = ((Gtk.AttachOptions)(4));
     w22.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label6 = new Gtk.Label();
     this.label6.Name = "label6";
     this.label6.LabelProp = Mono.Unix.Catalog.GetString("<b>Save</b>");
     this.label6.UseMarkup = true;
     this.table2.Add(this.label6);
     Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(this.table2[this.label6]));
     w23.LeftAttach = ((uint)(2));
     w23.RightAttach = ((uint)(3));
     w23.XOptions = ((Gtk.AttachOptions)(4));
     w23.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label7 = new Gtk.Label();
     this.label7.Name = "label7";
     this.label7.Xalign = 0F;
     this.label7.LabelProp = Mono.Unix.Catalog.GetString("Allow \"-\" and \"_\" in tag names");
     this.table2.Add(this.label7);
     Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(this.table2[this.label7]));
     w24.TopAttach = ((uint)(1));
     w24.BottomAttach = ((uint)(2));
     w24.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label8 = new Gtk.Label();
     this.label8.Name = "label8";
     this.label8.Xalign = 0F;
     this.label8.LabelProp = Mono.Unix.Catalog.GetString("Allow Information Separator One Character");
     this.table2.Add(this.label8);
     Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.table2[this.label8]));
     w25.TopAttach = ((uint)(2));
     w25.BottomAttach = ((uint)(3));
     w25.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.label9 = new Gtk.Label();
     this.label9.Name = "label9";
     this.label9.Xalign = 0F;
     this.label9.LabelProp = Mono.Unix.Catalog.GetString("Allow Tabs");
     this.table2.Add(this.label9);
     Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(this.table2[this.label9]));
     w26.TopAttach = ((uint)(4));
     w26.BottomAttach = ((uint)(5));
     w26.XOptions = ((Gtk.AttachOptions)(4));
     w26.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment1.Add(this.table2);
     this.frame1.Add(this.GtkAlignment1);
     this.GtkLabel11 = new Gtk.Label();
     this.GtkLabel11.Name = "GtkLabel11";
     this.GtkLabel11.LabelProp = Mono.Unix.Catalog.GetString("<b>GEDCOM Settings</b>");
     this.GtkLabel11.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel11;
     this.vbox3.Add(this.frame1);
     Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.vbox3[this.frame1]));
     w29.Position = 0;
     w29.Expand = false;
     w29.Fill = false;
     this.notebook1.Add(this.vbox3);
     Gtk.Notebook.NotebookChild w30 = ((Gtk.Notebook.NotebookChild)(this.notebook1[this.vbox3]));
     w30.Position = 2;
     // Notebook tab
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Advanced");
     this.notebook1.SetTabLabel(this.vbox3, this.label3);
     this.label3.ShowAll();
     w1.Add(this.notebook1);
     Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(w1[this.notebook1]));
     w31.Position = 0;
     // Internal child Gedcom.UI.GTK.PreferencesDialog.ActionArea
     Gtk.HButtonBox w32 = this.ActionArea;
     w32.Name = "dialog1_ActionArea";
     w32.Spacing = 6;
     w32.BorderWidth = ((uint)(5));
     w32.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-close";
     this.AddActionWidget(this.buttonOk, -7);
     Gtk.ButtonBox.ButtonBoxChild w33 = ((Gtk.ButtonBox.ButtonBoxChild)(w32[this.buttonOk]));
     w33.Expand = false;
     w33.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 464;
     this.DefaultHeight = 399;
     this.Show();
     this.LoadLastOpenedCheckbutton.Toggled += new System.EventHandler(this.LoadLastOpenedCheckbutton_Toggled);
     this.IgnoreMissingLineTerminatorCheckbutton.Toggled += new System.EventHandler(this.IgnoreMissingLineTerminatorCheckbutton_Toggled);
     this.IgnoreInvalidDelimeterCheckbutton.Toggled += new System.EventHandler(this.IgnoreInvalidDelimeterCheckbutton_Toggled);
     this.ApplyConcContOnNewLineHackCheckbutton.Toggled += new System.EventHandler(this.ApplyConcContOnNewLineHackCheckbutton_Toggled);
     this.AllowTabsSaveCheckbutton.Toggled += new System.EventHandler(this.AllowTabsSaveCheckbutton_Toggled);
     this.AllowTabsLoadCheckbutton.Toggled += new System.EventHandler(this.AllowTabsLoadCheckbutton_Toggled);
     this.AllowLineTabsSaveCheckbutton.Toggled += new System.EventHandler(this.AllowLineTabsSaveCheckbutton_Toggled);
     this.AllowLineTabsLoadCheckbutton.Toggled += new System.EventHandler(this.AllowLineTabsLoadCheckbutton_Toggled);
     this.AllowInformationSeparatorOneSaveCheckbutton.Toggled += new System.EventHandler(this.AllowInformationSeparatorOneSaveCheckbutton_Toggled);
     this.AllowInformationSeparatorOneLoadCheckbutton.Toggled += new System.EventHandler(this.AllowInformationSeparatorOneLoadCheckbutton_Toggled);
     this.AllowHypenAndUnderscoreLoadCheckbutton.Toggled += new System.EventHandler(this.AllowHypenAndUnderscoreLoadCheckbutton_Toggled);
 }
예제 #42
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget sermon2.streamview
     Gtk.UIManager   w1 = new Gtk.UIManager();
     Gtk.ActionGroup w2 = new Gtk.ActionGroup("Default");
     this.FileAction            = new Gtk.Action("FileAction", Mono.Unix.Catalog.GetString("File"), null, null);
     this.FileAction.ShortLabel = Mono.Unix.Catalog.GetString("File");
     w2.Add(this.FileAction, null);
     this.EditAction            = new Gtk.Action("EditAction", Mono.Unix.Catalog.GetString("Edit"), null, null);
     this.EditAction.ShortLabel = Mono.Unix.Catalog.GetString("Edit");
     w2.Add(this.EditAction, null);
     this.ClearAction            = new Gtk.Action("ClearAction", Mono.Unix.Catalog.GetString("Clear"), null, "gtk-cancel");
     this.ClearAction.ShortLabel = Mono.Unix.Catalog.GetString("Clear");
     w2.Add(this.ClearAction, null);
     this.loremIpsumAction            = new Gtk.Action("loremIpsumAction", Mono.Unix.Catalog.GetString("lorem ipsum"), null, "gtk-spell-check");
     this.loremIpsumAction.ShortLabel = Mono.Unix.Catalog.GetString("lorem ipsum");
     w2.Add(this.loremIpsumAction, null);
     w1.InsertActionGroup(w2, 0);
     this.AddAccelGroup(w1.AccelGroup);
     this.Name           = "sermon2.streamview";
     this.Title          = Mono.Unix.Catalog.GetString("streamview");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.BorderWidth    = ((uint)(3));
     // Container child sermon2.streamview.Gtk.Container+ContainerChild
     this.vbox1         = new Gtk.VBox();
     this.vbox1.Name    = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     w1.AddUiFromString("<ui><menubar name='menubar1'><menu action='FileAction'/><menu action='EditAction'><menuitem action='ClearAction'/><menuitem action='loremIpsumAction'/></menu></menubar></ui>");
     this.menubar1      = ((Gtk.MenuBar)(w1.GetWidget("/menubar1")));
     this.menubar1.Name = "menubar1";
     this.vbox1.Add(this.menubar1);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox1[this.menubar1]));
     w3.Position = 0;
     w3.Expand   = false;
     w3.Fill     = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(1));
     // Container child frame1.Gtk.Container+ContainerChild
     this.alignment4      = new Gtk.Alignment(0.5F, 0.5F, 1F, 1F);
     this.alignment4.Name = "alignment4";
     // Container child alignment4.Gtk.Container+ContainerChild
     this.hexview1 = new sermon2.hexview();
     this.hexview1.WidthRequest  = 440;
     this.hexview1.HeightRequest = 186;
     this.hexview1.Events        = ((Gdk.EventMask)(256));
     this.hexview1.Name          = "hexview1";
     this.alignment4.Add(this.hexview1);
     this.frame1.Add(this.alignment4);
     this.GtkLabel3           = new Gtk.Label();
     this.GtkLabel3.Name      = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("<b>stream</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame1.LabelWidget  = this.GtkLabel3;
     this.vbox1.Add(this.frame1);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1]));
     w6.Position = 1;
     // Container child vbox1.Gtk.Box+BoxChild
     this.statusbar1         = new Gtk.Statusbar();
     this.statusbar1.Name    = "statusbar1";
     this.statusbar1.Spacing = 6;
     this.vbox1.Add(this.statusbar1);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox1[this.statusbar1]));
     w7.PackType = ((Gtk.PackType)(1));
     w7.Position = 2;
     w7.Expand   = false;
     w7.Fill     = false;
     this.Add(this.vbox1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth  = 450;
     this.DefaultHeight = 452;
     this.Show();
     this.ClearAction.Activated      += new System.EventHandler(this.OnClearActionActivated);
     this.loremIpsumAction.Activated += new System.EventHandler(this.OnLoremIpsumActionActivated);
 }
 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget MonoDevelop.Database.Designer.TriggersEditorWidget
     Stetic.BinContainer.Attach(this);
     this.Name = "MonoDevelop.Database.Designer.TriggersEditorWidget";
     // Container child MonoDevelop.Database.Designer.TriggersEditorWidget.Gtk.Container+ContainerChild
     this.vpaned = new Gtk.VPaned();
     this.vpaned.CanFocus = true;
     this.vpaned.Name = "vpaned";
     this.vpaned.Position = 205;
     // Container child vpaned.Gtk.Paned+PanedChild
     this.hbox = new Gtk.HBox();
     this.hbox.Name = "hbox";
     this.hbox.Spacing = 6;
     // Container child hbox.Gtk.Box+BoxChild
     this.windowTriggers = new Gtk.ScrolledWindow();
     this.windowTriggers.CanFocus = true;
     this.windowTriggers.Name = "windowTriggers";
     this.windowTriggers.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.windowTriggers.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.windowTriggers.ShadowType = ((Gtk.ShadowType)(1));
     // Container child windowTriggers.Gtk.Container+ContainerChild
     this.listTriggers = new Gtk.TreeView();
     this.listTriggers.CanFocus = true;
     this.listTriggers.Name = "listTriggers";
     this.listTriggers.HeadersClickable = true;
     this.windowTriggers.Add(this.listTriggers);
     this.hbox.Add(this.windowTriggers);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox[this.windowTriggers]));
     w2.Position = 0;
     // Container child hbox.Gtk.Box+BoxChild
     this.vbuttonbox = new Gtk.VButtonBox();
     this.vbuttonbox.Name = "vbuttonbox";
     this.vbuttonbox.Spacing = 6;
     this.vbuttonbox.LayoutStyle = ((Gtk.ButtonBoxStyle)(3));
     // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild
     this.buttonAdd = new Gtk.Button();
     this.buttonAdd.CanFocus = true;
     this.buttonAdd.Name = "buttonAdd";
     this.buttonAdd.UseStock = true;
     this.buttonAdd.UseUnderline = true;
     this.buttonAdd.Label = "gtk-add";
     this.vbuttonbox.Add(this.buttonAdd);
     Gtk.ButtonBox.ButtonBoxChild w3 = ((Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.buttonAdd]));
     w3.Expand = false;
     w3.Fill = false;
     // Container child vbuttonbox.Gtk.ButtonBox+ButtonBoxChild
     this.buttonRemove = new Gtk.Button();
     this.buttonRemove.Sensitive = false;
     this.buttonRemove.CanFocus = true;
     this.buttonRemove.Name = "buttonRemove";
     this.buttonRemove.UseStock = true;
     this.buttonRemove.UseUnderline = true;
     this.buttonRemove.Label = "gtk-remove";
     this.vbuttonbox.Add(this.buttonRemove);
     Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(this.vbuttonbox[this.buttonRemove]));
     w4.Position = 1;
     w4.Expand = false;
     w4.Fill = false;
     this.hbox.Add(this.vbuttonbox);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox[this.vbuttonbox]));
     w5.Position = 1;
     w5.Expand = false;
     w5.Fill = false;
     this.vpaned.Add(this.hbox);
     Gtk.Paned.PanedChild w6 = ((Gtk.Paned.PanedChild)(this.vpaned[this.hbox]));
     w6.Resize = false;
     // Container child vpaned.Gtk.Paned+PanedChild
     this.frame = new Gtk.Frame();
     this.frame.Name = "frame";
     this.frame.ShadowType = ((Gtk.ShadowType)(0));
     this.frame.LabelXalign = 0F;
     // Container child frame.Gtk.Container+ContainerChild
     this.alignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.alignment.Name = "alignment";
     this.alignment.LeftPadding = ((uint)(12));
     // Container child alignment.Gtk.Container+ContainerChild
     this.sqlEditor = new MonoDevelop.Database.Components.SqlEditorWidget();
     this.sqlEditor.HeightRequest = 80;
     this.sqlEditor.Events = ((Gdk.EventMask)(256));
     this.sqlEditor.Name = "sqlEditor";
     this.sqlEditor.Editable = false;
     this.alignment.Add(this.sqlEditor);
     this.frame.Add(this.alignment);
     this.GtkLabel2 = new Gtk.Label();
     this.GtkLabel2.Name = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("Statement");
     this.GtkLabel2.UseMarkup = true;
     this.frame.LabelWidget = this.GtkLabel2;
     this.vpaned.Add(this.frame);
     this.Add(this.vpaned);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.buttonAdd.Clicked += new System.EventHandler(this.AddClicked);
     this.buttonRemove.Clicked += new System.EventHandler(this.RemoveClicked);
 }
예제 #44
0
        public GroupChatView(GroupChatModel groupChat)
            : base(groupChat)
        {
            Trace.Call(groupChat);

            _GroupChatModel = groupChat;

            // person list
            _OutputHPaned = new Gtk.HPaned();

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            _PersonScrolledWindow = sw;
            //sw.WidthRequest = 150;
            sw.HscrollbarPolicy = Gtk.PolicyType.Never;

            Gtk.TreeView tv = new Gtk.TreeView();
            _PersonTreeView = tv;
            //tv.CanFocus = false;
            tv.BorderWidth = 0;
            tv.Selection.Mode = Gtk.SelectionMode.Multiple;
            sw.Add(tv);

            Gtk.TreeViewColumn column;
            Gtk.CellRendererText cellr = new Gtk.CellRendererText();
            cellr.WidthChars = 12;
            column = new Gtk.TreeViewColumn(String.Empty, cellr);
            column.SortColumnId = 0;
            column.Spacing = 0;
            column.SortIndicator = false;
            column.Sizing = Gtk.TreeViewColumnSizing.Autosize;
            column.SetCellDataFunc(cellr, new Gtk.TreeCellDataFunc(RenderPersonIdentityName));
            tv.AppendColumn(column);
            _IdentityNameColumn = column;

            Gtk.ListStore liststore = new Gtk.ListStore(typeof(PersonModel));
            liststore.SetSortColumnId(0, Gtk.SortType.Ascending);
            liststore.SetSortFunc(0, new Gtk.TreeIterCompareFunc(SortPersonListStore));
            _PersonListStore = liststore;

            tv.Model = liststore;
            tv.RowActivated += new Gtk.RowActivatedHandler(OnPersonsRowActivated);
            tv.FocusOutEvent += OnPersonTreeViewFocusOutEvent;

            // popup menu
            _PersonMenu = new Gtk.Menu();
            // don't loose the focus else we lose the selection too!
            // see OnPersonTreeViewFocusOutEvent()
            _PersonMenu.TakeFocus = false;
            _PersonMenu.Shown += OnPersonMenuShown;

            _PersonTreeView.ButtonPressEvent += _OnPersonTreeViewButtonPressEvent;
            _PersonTreeView.KeyPressEvent += OnPersonTreeViewKeyPressEvent;
            // frame needed for events when selecting something in the treeview
            _PersonTreeViewFrame = new Gtk.Frame();
            _PersonTreeViewFrame.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(_OnUserListButtonReleaseEvent);
            _PersonTreeViewFrame.Add(sw);

            // topic
            // don't worry, ApplyConfig() will add us to the OutputVBox!
            _OutputVBox = new Gtk.VBox();

            _TopicTextView = new MessageTextView();
            _TopicTextView.Editable = false;
            _TopicTextView.WrapMode = Gtk.WrapMode.WordChar;
            _TopicScrolledWindow = new Gtk.ScrolledWindow();
            _TopicScrolledWindow.ShadowType = Gtk.ShadowType.In;
            // when using PolicyType.Never, it will try to grow but never shrinks!
            _TopicScrolledWindow.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            _TopicScrolledWindow.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            _TopicScrolledWindow.Add(_TopicTextView);
            // make sure the topic is invisible and remains by default and
            // visible when a topic gets set
            _TopicScrolledWindow.ShowAll();
            _TopicScrolledWindow.Visible = false;
            _TopicScrolledWindow.NoShowAll = true;

            Add(_OutputHPaned);

            //ApplyConfig(Frontend.UserConfig);

            ShowAll();
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Tomboy.TomboyConfiguration
     Stetic.BinContainer.Attach(this);
     this.Name = "Tomboy.TomboyConfiguration";
     // Container child Tomboy.TomboyConfiguration.Gtk.Container+ContainerChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     this.frame1.BorderWidth = ((uint)(1));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.deriveTitleCheckButton = new Gtk.CheckButton();
     this.deriveTitleCheckButton.CanFocus = true;
     this.deriveTitleCheckButton.Name = "deriveTitleCheckButton";
     this.deriveTitleCheckButton.Label = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Use note content as note title when no title is specified.");
     this.deriveTitleCheckButton.DrawIndicator = true;
     this.deriveTitleCheckButton.UseUnderline = true;
     this.vbox2.Add(this.deriveTitleCheckButton);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.deriveTitleCheckButton]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     this.GtkAlignment.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel3 = new Gtk.Label();
     this.GtkLabel3.Name = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>Default New Note Title</b>");
     this.GtkLabel3.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel3;
     this.vbox1.Add(this.frame1);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     w4.Padding = ((uint)(5));
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame2 = new Gtk.Frame();
     this.frame2.Name = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     this.frame2.BorderWidth = ((uint)(1));
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.contentFirstRadioButton = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("First pane is content, second pane is title."));
     this.contentFirstRadioButton.CanFocus = true;
     this.contentFirstRadioButton.Name = "contentFirstRadioButton";
     this.contentFirstRadioButton.Active = true;
     this.contentFirstRadioButton.DrawIndicator = true;
     this.contentFirstRadioButton.UseUnderline = true;
     this.contentFirstRadioButton.Group = new GLib.SList(System.IntPtr.Zero);
     this.vbox3.Add(this.contentFirstRadioButton);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox3[this.contentFirstRadioButton]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.titleFirstRadioButton = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("First pane is title, second pane is content."));
     this.titleFirstRadioButton.CanFocus = true;
     this.titleFirstRadioButton.Name = "titleFirstRadioButton";
     this.titleFirstRadioButton.DrawIndicator = true;
     this.titleFirstRadioButton.UseUnderline = true;
     this.titleFirstRadioButton.Group = this.contentFirstRadioButton.Group;
     this.vbox3.Add(this.titleFirstRadioButton);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox3[this.titleFirstRadioButton]));
     w6.Position = 1;
     w6.Expand = false;
     w6.Fill = false;
     this.GtkAlignment1.Add(this.vbox3);
     this.frame2.Add(this.GtkAlignment1);
     this.GtkLabel2 = new Gtk.Label();
     this.GtkLabel2.Name = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>New Note Title and Content Entry</b>");
     this.GtkLabel2.UseMarkup = true;
     this.frame2.LabelWidget = this.GtkLabel2;
     this.vbox1.Add(this.frame2);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2]));
     w9.Position = 1;
     w9.Expand = false;
     w9.Fill = false;
     this.Add(this.vbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget Mono.CSharp.Gui.ProcessSelector
     this.Name = "Mono.CSharp.Gui.ProcessSelector";
     this.Title = Mono.Unix.Catalog.GetString("Select Mono Process to Attach");
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     // Internal child Mono.CSharp.Gui.ProcessSelector.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     this.frame1.BorderWidth = ((uint)(2));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.GtkScrolledWindow = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.treeview = new Gtk.TreeView();
     this.treeview.CanFocus = true;
     this.treeview.Name = "treeview";
     this.GtkScrolledWindow.Add(this.treeview);
     this.GtkAlignment.Add(this.GtkScrolledWindow);
     this.frame1.Add(this.GtkAlignment);
     this.GtkLabel = new Gtk.Label();
     this.GtkLabel.Name = "GtkLabel";
     this.GtkLabel.LabelProp = Mono.Unix.Catalog.GetString("<b>Processes:</b>");
     this.GtkLabel.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel;
     w1.Add(this.frame1);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(w1[this.frame1]));
     w5.Position = 0;
     w5.Padding = ((uint)(3));
     // Internal child Mono.CSharp.Gui.ProcessSelector.ActionArea
     Gtk.HButtonBox w6 = this.ActionArea;
     w6.Name = "dialog1_ActionArea";
     w6.Spacing = 6;
     w6.BorderWidth = ((uint)(5));
     w6.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w7 = ((Gtk.ButtonBox.ButtonBoxChild)(w6[this.buttonCancel]));
     w7.Expand = false;
     w7.Fill = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = Mono.Unix.Catalog.GetString("_Attach");
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w8 = ((Gtk.ButtonBox.ButtonBoxChild)(w6[this.buttonOk]));
     w8.Position = 1;
     w8.Expand = false;
     w8.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 400;
     this.DefaultHeight = 300;
     this.Show();
     this.Close += new System.EventHandler(this.OnClose);
 }
예제 #47
0
        void InitializeWidget()
        {
            _viewModel.Init();

            // one row per option and one per group
            tblContainer.NRows         = (uint)(_viewModel.GroupedOptions.Sum(x => x.Count()) + _viewModel.GroupedOptions.Count()) + 1;
            tblContainer.NColumns      = 2;
            tblContainer.RowSpacing    = 0;
            tblContainer.ColumnSpacing = 0;
            tblContainer.BorderWidth   = 0;

            uint r = 0;

            var btn = new Gtk.Button();

            btn.Label        = "Reset to defaults";
            btn.WidthRequest = 150;
            btn.Clicked     += (sender, e) =>
            {
                _viewModel.ResetToDefaults();

                foreach (var item in tblContainer.Children)
                {
                    item.Destroy();
                }

                InitializeWidget();
            };
            tblContainer.Attach(btn, 0, 2, r, r + 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
            r++;

            foreach (var optionGroup in _viewModel.GroupedOptions)
            {
                // group label
                var grouplbl = new Gtk.Label();
                grouplbl.SetAlignment(0f, 0.5f);
                grouplbl.HeightRequest = 40;
                grouplbl.Markup        = $"<b> {optionGroup.Key}</b>";

                var box = new Gtk.EventBox();
                box.ModifyBg(Gtk.StateType.Normal, _groupHeaderColor);
                box.Add(grouplbl);
                tblContainer.Attach(box, 0, 2, r, r + 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
                r++;

                foreach (var option in optionGroup)
                {
                    // name label
                    var lbl = new Gtk.Label(option.Name)
                    {
                        TooltipText = option.Description
                    };
                    lbl.SetAlignment(0f, 0.5f);
                    lbl.HeightRequest = 30;
                    AddToTable(r, 0, lbl);

                    var type = option.PropertyType;
                    if (type == typeof(bool))
                    {
                        var chk = new Gtk.CheckButton {
                            Active = (bool)option.Property.GetValue(_viewModel.Options)
                        };
                        chk.Clicked += (sender, e) =>
                        {
                            option.Property.SetValue(_viewModel.Options, chk.Active);
                            _viewModel.IsDirty = true;
                        };
                        AddToTable(r, 1, chk);
                    }
                    else if (type == typeof(int))
                    {
                        var val  = (int)option.Property.GetValue(_viewModel.Options);
                        var spin = new Gtk.SpinButton(0, 10, 1)
                        {
                            Value = val, WidthChars = 3
                        };
                        spin.ValueChanged += (sender, e) =>
                        {
                            option.Property.SetValue(_viewModel.Options, (int)spin.Value);
                            _viewModel.IsDirty = true;
                        };
                        AddToTable(r, 1, spin);
                    }
                    else if (type == typeof(byte))
                    {
                        var val  = (byte)option.Property.GetValue(_viewModel.Options);
                        var spin = new Gtk.SpinButton(0, 10, 1)
                        {
                            Value = val, WidthChars = 3
                        };
                        spin.ValueChanged += (sender, e) =>
                        {
                            option.Property.SetValue(_viewModel.Options, (byte)spin.Value);
                            _viewModel.IsDirty = true;
                        };
                        AddToTable(r, 1, spin);
                    }
                    else if (type == typeof(string))
                    {
                        var val = (string)option.Property.GetValue(_viewModel.Options);
                        var txt = new Gtk.Entry(val);
                        txt.Alignment = 0;
                        txt.Changed  += (sender, e) =>
                        {
                            option.Property.SetValue(_viewModel.Options, txt.Text);
                            _viewModel.IsDirty = true;
                        };
                        AddToTable(r, 1, txt);
                    }
                    else if (type == typeof(string[]))
                    {
                        var vals = (string[])option.Property.GetValue(_viewModel.Options);
                        var val  = string.Join(Environment.NewLine, vals);
                        var txt  = new Gtk.TextView(new Gtk.TextBuffer(new Gtk.TextTagTable()));
                        txt.LeftMargin  = 5;
                        txt.RightMargin = 5;
                        txt.BorderWidth = 1;
                        txt.SetSizeRequest(320, 150);
                        txt.Buffer.Text     = val;
                        txt.Buffer.Changed += (sender, e) =>
                        {
                            var newVals = txt.Buffer.Text.Split(Environment.NewLine.ToCharArray());
                            option.Property.SetValue(_viewModel.Options, newVals);
                            _viewModel.IsDirty = true;
                        };

                        var frame = new Gtk.Frame();
                        frame.Shadow      = Gtk.ShadowType.In;
                        frame.BorderWidth = 5;
                        frame.Child       = txt;

                        AddToTable(r, 1, frame);
                    }
                    else if (type.IsEnum)
                    {
                        var val    = option.Property.GetValue(_viewModel.Options);
                        var values = Enum.GetNames(type);
                        var cmb    = new Gtk.ComboBox(values);
                        cmb.Active   = Array.IndexOf(values, val.ToString());
                        cmb.Changed += (sender, e) =>
                        {
                            option.Property.SetValue(_viewModel.Options, Enum.Parse(type, cmb.ActiveText));
                            _viewModel.IsDirty = true;
                        };
                        AddToTable(r, 1, cmb);
                    }

                    r++;
                }
            }

            alContainer.ShowAll();
        }
예제 #48
0
        public GroupChatView(GroupChatModel groupChat)
            : base(groupChat)
        {
            Trace.Call(groupChat);

            _GroupChatModel = groupChat;

            // person list
            _OutputHPaned = new Gtk.HPaned();

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            _PersonScrolledWindow = sw;
            //sw.WidthRequest = 150;
            sw.HscrollbarPolicy = Gtk.PolicyType.Never;

            Gtk.TreeView tv = new Gtk.TreeView();
            _PersonTreeView = tv;
            //tv.CanFocus = false;
            tv.BorderWidth = 0;
            tv.Selection.Mode = Gtk.SelectionMode.Multiple;
            sw.Add(tv);

            Gtk.TreeViewColumn column;
            Gtk.CellRendererText cellr = new Gtk.CellRendererText();
            cellr.WidthChars = 12;
            column = new Gtk.TreeViewColumn(String.Empty, cellr);
            column.SortColumnId = 0;
            column.Spacing = 0;
            column.SortIndicator = false;
            column.Sizing = Gtk.TreeViewColumnSizing.Autosize;
            column.SetCellDataFunc(cellr, new Gtk.TreeCellDataFunc(RenderPersonIdentityName));
            tv.AppendColumn(column);
            _IdentityNameColumn = column;

            Gtk.ListStore liststore = new Gtk.ListStore(typeof(PersonModel));
            liststore.SetSortColumnId(0, Gtk.SortType.Ascending);
            liststore.SetSortFunc(0, new Gtk.TreeIterCompareFunc(SortPersonListStore));
            _PersonListStore = liststore;

            tv.Model = liststore;
            tv.RowActivated += new Gtk.RowActivatedHandler(OnPersonsRowActivated);
            tv.FocusOutEvent += OnPersonTreeViewFocusOutEvent;

            // popup menu
            _PersonMenu = new Gtk.Menu();
            // don't loose the focus else we lose the selection too!
            // see OnPersonTreeViewFocusOutEvent()
            _PersonMenu.TakeFocus = false;
            _PersonMenu.Shown += OnPersonMenuShown;

            _PersonTreeView.ButtonPressEvent += _OnPersonTreeViewButtonPressEvent;
            _PersonTreeView.KeyPressEvent += OnPersonTreeViewKeyPressEvent;
            // frame needed for events when selecting something in the treeview
            _PersonTreeViewFrame = new Gtk.Frame();
            _PersonTreeViewFrame.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(_OnUserListButtonReleaseEvent);
            _PersonTreeViewFrame.Add(sw);

            // topic
            // don't worry, ApplyConfig() will add us to the OutputVBox!
            _OutputVBox = new Gtk.VBox();

            _TopicTextView = new MessageTextView();
            _TopicTextView.Editable = false;
            _TopicTextView.WrapMode = Gtk.WrapMode.WordChar;
            _TopicScrolledWindow = new Gtk.ScrolledWindow();
            _TopicScrolledWindow.ShadowType = Gtk.ShadowType.In;
            // when using PolicyType.Never, it will try to grow but never shrinks!
            _TopicScrolledWindow.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            _TopicScrolledWindow.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            _TopicScrolledWindow.Add(_TopicTextView);
            // make sure the topic is invisible and remains by default and
            // visible when a topic gets set
            _TopicScrolledWindow.ShowAll();
            _TopicScrolledWindow.Visible = false;
            _TopicScrolledWindow.NoShowAll = true;
            _TopicScrolledWindow.SizeRequested += delegate(object o, Gtk.SizeRequestedArgs args) {
                // predict and set useful topic heigth
                Pango.Layout layout = _TopicTextView.CreatePangoLayout("Test Topic");
                int lineWidth, lineHeigth;
                layout.GetPixelSize(out lineWidth, out lineHeigth);
                var lineSpacing = _TopicTextView.PixelsAboveLines +
                                  _TopicTextView.PixelsBelowLines;
                var text = Topic != null ? Topic.ToString() : String.Empty;
                // hardcoded to 2 lines for now
                var newLines = text.Length > 0 ? 2 : 0;
                var bestSize = new Gtk.Requisition() {
                    Height = ((lineHeigth + lineSpacing) * newLines) + 2
                };
                args.Requisition = bestSize;
            };

            Add(_OutputHPaned);

            //ApplyConfig(Frontend.UserConfig);

            ShowAll();
        }
예제 #49
0
 public FrameBackend()
 {
     Widget = new Gtk.Frame ();
     Widget.Show ();
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.OCMQueryPage2
     Stetic.BinContainer.Attach(this);
     this.Name = "ocmgtk.OCMQueryPage2";
     // Container child ocmgtk.OCMQueryPage2.Gtk.Container+ContainerChild
     this.vbox5 = new Gtk.VBox();
     this.vbox5.Name = "vbox5";
     this.vbox5.Spacing = 6;
     this.vbox5.BorderWidth = ((uint)(6));
     // Container child vbox5.Gtk.Box+BoxChild
     this.frame4 = new Gtk.Frame();
     this.frame4.Name = "frame4";
     this.frame4.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame4.Gtk.Container+ContainerChild
     this.GtkAlignment1 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment1.Name = "GtkAlignment1";
     this.GtkAlignment1.LeftPadding = ((uint)(12));
     // Container child GtkAlignment1.Gtk.Container+ContainerChild
     this.table1 = new Gtk.Table(((uint)(3)), ((uint)(2)), false);
     this.table1.Name = "table1";
     this.table1.RowSpacing = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     this.table1.BorderWidth = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.allContRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Has any container size"));
     this.allContRadio.CanFocus = true;
     this.allContRadio.Name = "allContRadio";
     this.allContRadio.Active = true;
     this.allContRadio.DrawIndicator = true;
     this.allContRadio.UseUnderline = true;
     this.allContRadio.Group = new GLib.SList(System.IntPtr.Zero);
     this.table1.Add(this.allContRadio);
     Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table1[this.allContRadio]));
     w1.XOptions = ((Gtk.AttachOptions)(4));
     w1.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.contFrame = new Gtk.Frame();
     this.contFrame.Sensitive = false;
     this.contFrame.Name = "contFrame";
     // Container child contFrame.Gtk.Container+ContainerChild
     this.GtkAlignment = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.table2 = new Gtk.Table(((uint)(2)), ((uint)(3)), false);
     this.table2.Name = "table2";
     this.table2.RowSpacing = ((uint)(6));
     this.table2.ColumnSpacing = ((uint)(6));
     // Container child table2.Gtk.Table+TableChild
     this.largeCheck = new Gtk.CheckButton();
     this.largeCheck.CanFocus = true;
     this.largeCheck.Name = "largeCheck";
     this.largeCheck.Label = Mono.Unix.Catalog.GetString("Large");
     this.largeCheck.DrawIndicator = true;
     this.largeCheck.UseUnderline = true;
     this.table2.Add(this.largeCheck);
     Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table2[this.largeCheck]));
     w2.TopAttach = ((uint)(1));
     w2.BottomAttach = ((uint)(2));
     w2.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.microCheck = new Gtk.CheckButton();
     this.microCheck.CanFocus = true;
     this.microCheck.Name = "microCheck";
     this.microCheck.Label = Mono.Unix.Catalog.GetString("Micro");
     this.microCheck.DrawIndicator = true;
     this.microCheck.UseUnderline = true;
     this.table2.Add(this.microCheck);
     Gtk.Table.TableChild w3 = ((Gtk.Table.TableChild)(this.table2[this.microCheck]));
     w3.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.notChosenCheck = new Gtk.CheckButton();
     this.notChosenCheck.CanFocus = true;
     this.notChosenCheck.Name = "notChosenCheck";
     this.notChosenCheck.Label = Mono.Unix.Catalog.GetString("Not Chosen");
     this.notChosenCheck.DrawIndicator = true;
     this.notChosenCheck.UseUnderline = true;
     this.table2.Add(this.notChosenCheck);
     Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table2[this.notChosenCheck]));
     w4.TopAttach = ((uint)(1));
     w4.BottomAttach = ((uint)(2));
     w4.LeftAttach = ((uint)(2));
     w4.RightAttach = ((uint)(3));
     w4.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.regularCheck = new Gtk.CheckButton();
     this.regularCheck.CanFocus = true;
     this.regularCheck.Name = "regularCheck";
     this.regularCheck.Label = Mono.Unix.Catalog.GetString("Regular");
     this.regularCheck.DrawIndicator = true;
     this.regularCheck.UseUnderline = true;
     this.table2.Add(this.regularCheck);
     Gtk.Table.TableChild w5 = ((Gtk.Table.TableChild)(this.table2[this.regularCheck]));
     w5.LeftAttach = ((uint)(2));
     w5.RightAttach = ((uint)(3));
     w5.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.smallCheck = new Gtk.CheckButton();
     this.smallCheck.CanFocus = true;
     this.smallCheck.Name = "smallCheck";
     this.smallCheck.Label = Mono.Unix.Catalog.GetString("Small");
     this.smallCheck.DrawIndicator = true;
     this.smallCheck.UseUnderline = true;
     this.table2.Add(this.smallCheck);
     Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table2[this.smallCheck]));
     w6.LeftAttach = ((uint)(1));
     w6.RightAttach = ((uint)(2));
     w6.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table2.Gtk.Table+TableChild
     this.virtualCheck = new Gtk.CheckButton();
     this.virtualCheck.CanFocus = true;
     this.virtualCheck.Name = "virtualCheck";
     this.virtualCheck.Label = Mono.Unix.Catalog.GetString("Virtual");
     this.virtualCheck.DrawIndicator = true;
     this.virtualCheck.UseUnderline = true;
     this.table2.Add(this.virtualCheck);
     Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table2[this.virtualCheck]));
     w7.TopAttach = ((uint)(1));
     w7.BottomAttach = ((uint)(2));
     w7.LeftAttach = ((uint)(1));
     w7.RightAttach = ((uint)(2));
     w7.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment.Add(this.table2);
     this.contFrame.Add(this.GtkAlignment);
     this.table1.Add(this.contFrame);
     Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table1[this.contFrame]));
     w10.TopAttach = ((uint)(2));
     w10.BottomAttach = ((uint)(3));
     w10.RightAttach = ((uint)(2));
     w10.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.selRado = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Has any of the following sizes:"));
     this.selRado.CanFocus = true;
     this.selRado.Name = "selRado";
     this.selRado.DrawIndicator = true;
     this.selRado.UseUnderline = true;
     this.selRado.Group = this.allContRadio.Group;
     this.table1.Add(this.selRado);
     Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table1[this.selRado]));
     w11.TopAttach = ((uint)(1));
     w11.BottomAttach = ((uint)(2));
     w11.XOptions = ((Gtk.AttachOptions)(4));
     w11.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment1.Add(this.table1);
     this.frame4.Add(this.GtkAlignment1);
     this.GtkLabel12 = new Gtk.Label();
     this.GtkLabel12.Name = "GtkLabel12";
     this.GtkLabel12.LabelProp = Mono.Unix.Catalog.GetString("<b>Container Type</b>");
     this.GtkLabel12.UseMarkup = true;
     this.frame4.LabelWidget = this.GtkLabel12;
     this.vbox5.Add(this.frame4);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.vbox5[this.frame4]));
     w14.Position = 0;
     w14.Expand = false;
     w14.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.frame5 = new Gtk.Frame();
     this.frame5.Name = "frame5";
     this.frame5.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame5.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.descCheck = new Gtk.CheckButton();
     this.descCheck.CanFocus = true;
     this.descCheck.Name = "descCheck";
     this.descCheck.Label = Mono.Unix.Catalog.GetString("Description contains the following words:");
     this.descCheck.DrawIndicator = true;
     this.descCheck.UseUnderline = true;
     this.hbox1.Add(this.descCheck);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox1[this.descCheck]));
     w15.Position = 0;
     w15.Expand = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.descEntry = new Gtk.Entry();
     this.descEntry.Sensitive = false;
     this.descEntry.CanFocus = true;
     this.descEntry.Name = "descEntry";
     this.descEntry.IsEditable = true;
     this.descEntry.InvisibleChar = '•';
     this.hbox1.Add(this.descEntry);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.hbox1[this.descEntry]));
     w16.Position = 1;
     this.GtkAlignment2.Add(this.hbox1);
     this.frame5.Add(this.GtkAlignment2);
     this.GtkLabel13 = new Gtk.Label();
     this.GtkLabel13.Name = "GtkLabel13";
     this.GtkLabel13.LabelProp = Mono.Unix.Catalog.GetString("<b>Cache Description</b>");
     this.GtkLabel13.UseMarkup = true;
     this.frame5.LabelWidget = this.GtkLabel13;
     this.vbox5.Add(this.frame5);
     Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.vbox5[this.frame5]));
     w19.Position = 1;
     w19.Expand = false;
     w19.Fill = false;
     // Container child vbox5.Gtk.Box+BoxChild
     this.frame7 = new Gtk.Frame();
     this.frame7.Name = "frame7";
     this.frame7.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame7.Gtk.Container+ContainerChild
     this.GtkAlignment3 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.vbox7 = new Gtk.VBox();
     this.vbox7.Name = "vbox7";
     this.vbox7.Spacing = 6;
     // Container child vbox7.Gtk.Box+BoxChild
     this.markedCheck = new Gtk.CheckButton();
     this.markedCheck.CanFocus = true;
     this.markedCheck.Name = "markedCheck";
     this.markedCheck.Label = Mono.Unix.Catalog.GetString("Only caches that are marked:");
     this.markedCheck.DrawIndicator = true;
     this.markedCheck.UseUnderline = true;
     this.vbox7.Add(this.markedCheck);
     Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.vbox7[this.markedCheck]));
     w20.Position = 0;
     w20.Expand = false;
     w20.Fill = false;
     // Container child vbox7.Gtk.Box+BoxChild
     this.markFrame = new Gtk.Frame();
     this.markFrame.Sensitive = false;
     this.markFrame.Name = "markFrame";
     this.markFrame.ShadowType = ((Gtk.ShadowType)(1));
     // Container child markFrame.Gtk.Container+ContainerChild
     this.GtkAlignment5 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment5.Name = "GtkAlignment5";
     this.GtkAlignment5.LeftPadding = ((uint)(12));
     // Container child GtkAlignment5.Gtk.Container+ContainerChild
     this.table3 = new Gtk.Table(((uint)(2)), ((uint)(3)), false);
     this.table3.Name = "table3";
     this.table3.RowSpacing = ((uint)(6));
     this.table3.ColumnSpacing = ((uint)(6));
     // Container child table3.Gtk.Table+TableChild
     this.dnfRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Didn't Find It"));
     this.dnfRadio.CanFocus = true;
     this.dnfRadio.Name = "dnfRadio";
     this.dnfRadio.Active = true;
     this.dnfRadio.DrawIndicator = true;
     this.dnfRadio.UseUnderline = true;
     this.dnfRadio.Group = new GLib.SList(System.IntPtr.Zero);
     this.table3.Add(this.dnfRadio);
     Gtk.Table.TableChild w21 = ((Gtk.Table.TableChild)(this.table3[this.dnfRadio]));
     w21.TopAttach = ((uint)(1));
     w21.BottomAttach = ((uint)(2));
     w21.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table3.Gtk.Table+TableChild
     this.ftfRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("First to Find"));
     this.ftfRadio.CanFocus = true;
     this.ftfRadio.Name = "ftfRadio";
     this.ftfRadio.DrawIndicator = true;
     this.ftfRadio.UseUnderline = true;
     this.ftfRadio.Group = this.dnfRadio.Group;
     this.table3.Add(this.ftfRadio);
     Gtk.Table.TableChild w22 = ((Gtk.Table.TableChild)(this.table3[this.ftfRadio]));
     w22.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table3.Gtk.Table+TableChild
     this.noDNFRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Not Didn't Find It"));
     this.noDNFRadio.CanFocus = true;
     this.noDNFRadio.Name = "noDNFRadio";
     this.noDNFRadio.DrawIndicator = true;
     this.noDNFRadio.UseUnderline = true;
     this.noDNFRadio.Group = this.dnfRadio.Group;
     this.table3.Add(this.noDNFRadio);
     Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(this.table3[this.noDNFRadio]));
     w23.TopAttach = ((uint)(1));
     w23.BottomAttach = ((uint)(2));
     w23.LeftAttach = ((uint)(1));
     w23.RightAttach = ((uint)(2));
     w23.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table3.Gtk.Table+TableChild
     this.noFTFRadio = new Gtk.RadioButton(Mono.Unix.Catalog.GetString("Not First to Find"));
     this.noFTFRadio.CanFocus = true;
     this.noFTFRadio.Name = "noFTFRadio";
     this.noFTFRadio.DrawIndicator = true;
     this.noFTFRadio.UseUnderline = true;
     this.noFTFRadio.Group = this.dnfRadio.Group;
     this.table3.Add(this.noFTFRadio);
     Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(this.table3[this.noFTFRadio]));
     w24.LeftAttach = ((uint)(1));
     w24.RightAttach = ((uint)(2));
     w24.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment5.Add(this.table3);
     this.markFrame.Add(this.GtkAlignment5);
     this.vbox7.Add(this.markFrame);
     Gtk.Box.BoxChild w27 = ((Gtk.Box.BoxChild)(this.vbox7[this.markFrame]));
     w27.Position = 1;
     w27.Expand = false;
     // Container child vbox7.Gtk.Box+BoxChild
     this.statusCheck = new Gtk.CheckButton();
     this.statusCheck.CanFocus = true;
     this.statusCheck.Name = "statusCheck";
     this.statusCheck.Label = Mono.Unix.Catalog.GetString("Caches with the following status flags:");
     this.statusCheck.DrawIndicator = true;
     this.statusCheck.UseUnderline = true;
     this.vbox7.Add(this.statusCheck);
     Gtk.Box.BoxChild w28 = ((Gtk.Box.BoxChild)(this.vbox7[this.statusCheck]));
     w28.Position = 2;
     w28.Expand = false;
     w28.Fill = false;
     // Container child vbox7.Gtk.Box+BoxChild
     this.statusFrame = new Gtk.Frame();
     this.statusFrame.Sensitive = false;
     this.statusFrame.Name = "statusFrame";
     this.statusFrame.ShadowType = ((Gtk.ShadowType)(1));
     // Container child statusFrame.Gtk.Container+ContainerChild
     this.GtkAlignment4 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment4.Name = "GtkAlignment4";
     this.GtkAlignment4.LeftPadding = ((uint)(12));
     // Container child GtkAlignment4.Gtk.Container+ContainerChild
     this.table4 = new Gtk.Table(((uint)(2)), ((uint)(4)), false);
     this.table4.Name = "table4";
     this.table4.RowSpacing = ((uint)(6));
     this.table4.ColumnSpacing = ((uint)(6));
     // Container child table4.Gtk.Table+TableChild
     this.archiveCheck = new Gtk.CheckButton();
     this.archiveCheck.CanFocus = true;
     this.archiveCheck.Name = "archiveCheck";
     this.archiveCheck.Label = Mono.Unix.Catalog.GetString("Archived");
     this.archiveCheck.Active = true;
     this.archiveCheck.DrawIndicator = true;
     this.archiveCheck.UseUnderline = true;
     this.table4.Add(this.archiveCheck);
     Gtk.Table.TableChild w29 = ((Gtk.Table.TableChild)(this.table4[this.archiveCheck]));
     w29.TopAttach = ((uint)(1));
     w29.BottomAttach = ((uint)(2));
     w29.LeftAttach = ((uint)(2));
     w29.RightAttach = ((uint)(3));
     w29.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.availCheck = new Gtk.CheckButton();
     this.availCheck.CanFocus = true;
     this.availCheck.Name = "availCheck";
     this.availCheck.Label = Mono.Unix.Catalog.GetString("Available");
     this.availCheck.Active = true;
     this.availCheck.DrawIndicator = true;
     this.availCheck.UseUnderline = true;
     this.table4.Add(this.availCheck);
     Gtk.Table.TableChild w30 = ((Gtk.Table.TableChild)(this.table4[this.availCheck]));
     w30.TopAttach = ((uint)(1));
     w30.BottomAttach = ((uint)(2));
     w30.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.disabledCheck = new Gtk.CheckButton();
     this.disabledCheck.CanFocus = true;
     this.disabledCheck.Name = "disabledCheck";
     this.disabledCheck.Label = Mono.Unix.Catalog.GetString("Disabled");
     this.disabledCheck.Active = true;
     this.disabledCheck.DrawIndicator = true;
     this.disabledCheck.UseUnderline = true;
     this.table4.Add(this.disabledCheck);
     Gtk.Table.TableChild w31 = ((Gtk.Table.TableChild)(this.table4[this.disabledCheck]));
     w31.TopAttach = ((uint)(1));
     w31.BottomAttach = ((uint)(2));
     w31.LeftAttach = ((uint)(1));
     w31.RightAttach = ((uint)(2));
     w31.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.foundCheck = new Gtk.CheckButton();
     this.foundCheck.CanFocus = true;
     this.foundCheck.Name = "foundCheck";
     this.foundCheck.Label = Mono.Unix.Catalog.GetString("Found");
     this.foundCheck.Active = true;
     this.foundCheck.DrawIndicator = true;
     this.foundCheck.UseUnderline = true;
     this.table4.Add(this.foundCheck);
     Gtk.Table.TableChild w32 = ((Gtk.Table.TableChild)(this.table4[this.foundCheck]));
     w32.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.mineCheck = new Gtk.CheckButton();
     this.mineCheck.CanFocus = true;
     this.mineCheck.Name = "mineCheck";
     this.mineCheck.Label = Mono.Unix.Catalog.GetString("Mine");
     this.mineCheck.Active = true;
     this.mineCheck.DrawIndicator = true;
     this.mineCheck.UseUnderline = true;
     this.table4.Add(this.mineCheck);
     Gtk.Table.TableChild w33 = ((Gtk.Table.TableChild)(this.table4[this.mineCheck]));
     w33.LeftAttach = ((uint)(2));
     w33.RightAttach = ((uint)(3));
     w33.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table4.Gtk.Table+TableChild
     this.notFoundCheck = new Gtk.CheckButton();
     this.notFoundCheck.CanFocus = true;
     this.notFoundCheck.Name = "notFoundCheck";
     this.notFoundCheck.Label = Mono.Unix.Catalog.GetString("Not Found");
     this.notFoundCheck.Active = true;
     this.notFoundCheck.DrawIndicator = true;
     this.notFoundCheck.UseUnderline = true;
     this.table4.Add(this.notFoundCheck);
     Gtk.Table.TableChild w34 = ((Gtk.Table.TableChild)(this.table4[this.notFoundCheck]));
     w34.LeftAttach = ((uint)(1));
     w34.RightAttach = ((uint)(2));
     w34.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment4.Add(this.table4);
     this.statusFrame.Add(this.GtkAlignment4);
     this.vbox7.Add(this.statusFrame);
     Gtk.Box.BoxChild w37 = ((Gtk.Box.BoxChild)(this.vbox7[this.statusFrame]));
     w37.Position = 3;
     w37.Expand = false;
     this.GtkAlignment3.Add(this.vbox7);
     this.frame7.Add(this.GtkAlignment3);
     this.GtkLabel20 = new Gtk.Label();
     this.GtkLabel20.Name = "GtkLabel20";
     this.GtkLabel20.LabelProp = Mono.Unix.Catalog.GetString("<b>Cache Status</b>");
     this.GtkLabel20.UseMarkup = true;
     this.frame7.LabelWidget = this.GtkLabel20;
     this.vbox5.Add(this.frame7);
     Gtk.Box.BoxChild w40 = ((Gtk.Box.BoxChild)(this.vbox5[this.frame7]));
     w40.Position = 2;
     w40.Expand = false;
     w40.Fill = false;
     this.Add(this.vbox5);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
     this.allContRadio.Toggled += new System.EventHandler(this.OnAnyToggle);
     this.descCheck.Toggled += new System.EventHandler(this.OnDescToggled);
     this.markedCheck.Toggled += new System.EventHandler(this.OnMarkedtoggle);
     this.statusCheck.Toggled += new System.EventHandler(this.OnStatusToggle);
 }
예제 #51
0
        public void Init()
        {
            this.Name = "OpenGraal.GraalIM.RCPlayerList";
            this.Title = global::Mono.Unix.Catalog.GetString("Players");
            this.Icon = global::Gdk.Pixbuf.LoadFromResource("OpenGraal.GraalIM.Resources.rcicon.ico");
            this.WidthRequest = 580;
            this.HeightRequest = 420;
            this._playerlistTabs = new global::Gtk.Notebook();
            this._playerlistTabs.CanFocus = true;
            this._playerlistTabs.Name = "_playerlistTabs";
            this._playerlistTabs.CurrentPage = 0;
            this._playerlistTabs.EnablePopup = true;
            this._playerlistTabs.Scrollable = true;

            this._thisServerLabel = new global::Gtk.Label();
            this._thisServerLabel.CanDefault = true;
            this._thisServerLabel.Name = "StatusTabLabel";
            this._thisServerLabel.LabelProp = global::Mono.Unix.Catalog.GetString("This server");

            this._playerList = new Gtk.TreeView();

            this._playerList.SetSizeRequest(230, 230);

            this._playerListModel = new Gtk.ListStore(typeof(Gdk.Pixbuf), typeof(string), typeof(int));
            //this.tree.Selection.Changed += new System.EventHandler(OnSelectionChanged);
            //this._playerList.CursorChanged += new System.EventHandler(OnSelectionChanged);
            /*
            this._playerList.ButtonPressEvent += new ButtonPressEventHandler(delegate(object o, ButtonPressEventArgs args)
                                                                      {
                System.Console.WriteLine(args.ToString());
            });
            */
            Gtk.CellRendererPixbuf pixbufrender = new Gtk.CellRendererPixbuf();
            Gtk.TreeViewColumn TypeCol = this._playerList.AppendColumn("", new Gtk.CellRendererPixbuf(), "pixbuf", 0);
            TypeCol.SortIndicator = true;
            TypeCol.SortColumnId = 0;
            Gtk.CellRendererPixbuf cellpb = new Gtk.CellRendererPixbuf();
            Gtk.CellRendererText cell = new Gtk.CellRendererText();
            TypeCol.PackStart(cellpb, false);
            TypeCol.PackStart(cell, false);

            Gtk.CellRendererText NickColText = new Gtk.CellRendererText();

            Gtk.TreeViewColumn NickCol = new Gtk.TreeViewColumn ();
            NickCol.PackStart(NickColText,true);
            NickCol.Title = "Artist";
            NickCol.SortIndicator = true;
            NickCol.SortColumnId = 1;

            NickCol.AddAttribute(NickColText, "text", 1);
            this._playerList.AppendColumn(NickCol);

            Gtk.TreeViewColumn AccCol = this._playerList.AppendColumn("Account", new Gtk.CellRendererText(), "text", 2);
            AccCol.SortIndicator = true;
            AccCol.SortColumnId = 2;
            Gtk.TreeViewColumn LvlCol = this._playerList.AppendColumn("Level", new Gtk.CellRendererText(), "text", 3);
            LvlCol.SortIndicator = true;
            LvlCol.SortColumnId = 3;
            Gtk.TreeViewColumn IdCol = this._playerList.AppendColumn("ID", new Gtk.CellRendererText(), "text", 4);
            IdCol.SortIndicator = true;
            IdCol.SortColumnId = 4;

            Gtk.TreeIter iter = _playerListModel.AppendValues("Admins");
            _playerListModel.AppendValues(iter, "Fannypack", "Nu Nu (Yeah Yeah) (double j and haze radio edit)");

            iter = _playerListModel.AppendValues("Players");
            _playerListModel.AppendValues(iter, "Nelly", "Country Grammer");

            this._playerList.FixedHeightMode = false;
            this._playerList.HeadersClickable = true;
            this._playerList.SearchColumn = 1;

            this._playerList.EnableSearch = true;
            this._playerList.EnableTreeLines = true;
            this._playerList.ShowExpanders = true;
            //this.tree.Vadjustment.
            //_playerListModel.AppendValues("", "Loading...", "");

            Gtk.Frame frame2 = new Gtk.Frame();
            this._playerList.Model = _playerListModel;

            this._playerListScroll = new global::Gtk.ScrolledWindow();
            this._playerListScroll.Name = "GtkScrolledWindow";
            this._playerListScroll.ShadowType = ((global::Gtk.ShadowType)(1));

            // Container child GtkScrolledWindow.Gtk.Container+ContainerChild

            this._playerListScroll.Add(this._playerList);

            this._playerlistTabs.Add(this._playerListScroll);
            this._playerlistTabs.SetTabLabel(this._playerListScroll, this._thisServerLabel);
            this._thisServerLabel.ShowAll();
            this.Add(this._playerlistTabs);
        }
        public void CreateGui()
        {
            Gtk.Image icn_reload=new Gtk.Image(Gtk.Stock.Refresh,Gtk.IconSize.Button);
            _reload=new Gtk.Button(icn_reload);
            _reload.Clicked+=OnReload;

            _performer=new Gtk.Entry(200);
            _title=new Gtk.Entry(200);
            _title.WidthChars=60;
            _performer.WidthChars=60;
            _subtitle=new Gtk.Entry(300);
            _subtitle.WidthChars=60;
            _composer=new Gtk.Entry(200);
            _composer.WidthChars=60;
            _year=new Gtk.Entry(20);
            _year.WidthChars=20;

            _image=new Gtk.Image();
            _image.SetSizeRequest (100,100);
            _imagefile=new Gtk.FileChooserButton("Choose image file",Gtk.FileChooserAction.Open);
            _imagefile.FileSet+=new EventHandler(EvtImageSet);

            Gtk.Image icn_add_track=new Gtk.Image(Gtk.Stock.Add,Gtk.IconSize.Button);
            _add_track=new Gtk.Button(icn_add_track);
            _add_track.Clicked+=OnAddTrack;

            Gtk.Image icn_del_track=new Gtk.Image(Gtk.Stock.Delete,Gtk.IconSize.Button);
            _del_track=new Gtk.Button(icn_del_track);
            _del_track.Clicked+=OnDelTrack;

            Gtk.Image icn_save=new Gtk.Image(Gtk.Stock.Save,Gtk.IconSize.Button);
            _save=new Gtk.Button(icn_save);
            _save.Clicked+=OnSave;

            _store=new Gtk.ListStore(typeof(int),typeof(string),typeof(string),typeof(string),typeof(string),typeof(string));
            _tracks=new Gtk.TreeView();
            {
                Gtk.CellRendererText cr0=new Gtk.CellRendererText();
                cr0.Scale=0.8;
                _tracks.AppendColumn ("Nr.", cr0, "text", 0);

                Gtk.CellRendererText cr_title=new Gtk.CellRendererText();
                cr_title.Scale=0.8;
                cr_title.Editable=true;
                cr_title.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(1,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Title", cr_title, "text", 1);

                Gtk.CellRendererText cr_artist=new Gtk.CellRendererText();
                cr_artist.Editable=true;
                cr_artist.Scale=0.8;
                cr_artist.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(2,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Artist", cr_artist, "text", 2);

                Gtk.CellRendererText cr_composer=new Gtk.CellRendererText();
                cr_composer.Editable=true;
                cr_composer.Scale=0.8;
                cr_composer.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(3,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Composer", cr_composer, "text", 3);

                Gtk.CellRendererText cr_piece=new Gtk.CellRendererText();
                cr_piece.Editable=true;
                cr_piece.Scale=0.8;
                cr_piece.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell(4,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Piece", cr_piece, "text", 4);

                Gtk.CellRendererText cr_time=new Gtk.CellRendererText();
                cr_time.Editable=true;
                cr_time.Scale=0.8;
                cr_time.Edited+=new Gtk.EditedHandler(delegate(object sender,Gtk.EditedArgs args) {
                    setCell (5,args.NewText,new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn ("Offset", cr_time, "text", 5);
            }

            _tracks.Model = _store;

            Gtk.Table tbl=new Gtk.Table(2,5,false);
            tbl.Attach (new Gtk.Label("Album:"),0,1,0,1);
            tbl.Attach (_title,1,2,0,1);
            tbl.Attach (new Gtk.Label("Artist:"),0,1,1,2);
            tbl.Attach (_performer,1,2,1,2);
            tbl.Attach (new Gtk.Label("Composer:"),0,1,2,3);
            tbl.Attach (_composer,1,2,2,3);
            tbl.Attach (new Gtk.Label("Subtitle:"),0,1,3,4);
            tbl.Attach (_subtitle,1,2,3,4);
            tbl.Attach (new Gtk.Label("year:"),0,1,4,5);
            tbl.Attach (_year,1,2,4,5);

            Gtk.Frame frm=new Gtk.Frame();
            frm.Add (tbl);

            Gtk.HBox hb2=new Gtk.HBox();
            hb2.PackEnd (_reload,false,false,1);
            hb2.PackEnd (_del_track,false,false,1);
            hb2.PackEnd (_add_track,false,false,1);
            hb2.PackEnd (_save,false,false,1);

            Gtk.HBox hb=new Gtk.HBox();
            Gtk.VBox vb1=new Gtk.VBox();
            vb1.PackStart (frm,false,false,0);
            vb1.PackStart (hb2,true,true,0);
            hb.PackStart (vb1,false,false,0);

            Gtk.Frame frm2=new Gtk.Frame();
            frm2.Add (_image);
            Gtk.VBox vbi=new Gtk.VBox();
            Gtk.HBox bb=new Gtk.HBox();
            bb.PackStart(new Gtk.VBox(),true,true,0);
            bb.PackStart(frm2,false,false,0);
            bb.PackEnd (new Gtk.VBox(),true,true,0);

            vbi.PackStart (bb,true,true,2);
            vbi.PackEnd (_imagefile,false,false,2);
            hb.PackEnd (vbi,true,true,2);

            Gtk.ScrolledWindow scroll=new Gtk.ScrolledWindow();
            scroll.Add (_tracks);
            scroll.SetSizeRequest (800,300);

            base.VBox.PackStart(hb,false,false,4);
            base.VBox.PackStart(scroll,true,true,0);
            base.VBox.ShowAll ();

            base.AddButton ("Close",0);
        }
예제 #53
0
        private void BuildContactFrame()
        {
            var vbBox = new Gtk.VBox( false, 5 );

            // The frame
            this.frmContact = new Gtk.Frame( "Main contact info" );
            this.frmContact.Add( vbBox );

            // Email
            var hbEmail = new Gtk.HBox( false, 5 );
            this.edEmail = new Gtk.Entry();
            this.btConnectEmail = new Gtk.Button( Gtk.Stock.Connect );
            this.btConnectEmail.Clicked += (sender, e) => this.OnConnect( sender );
            hbEmail.PackStart( new Gtk.Label(){ Markup = "<b>E.mail</b>" }, false, false, 5 );
            hbEmail.PackStart( this.edEmail, true, true, 5 );
            hbEmail.PackStart( this.btConnectEmail, false, false, 5 );

            // Mobile phone
            var hbMobilePhone = new Gtk.HBox( false, 5 );
            this.edMPhone = new Gtk.Entry();
            hbMobilePhone.PackStart( new Gtk.Label(){ Markup = "<b>Mobil phone</b>" }, false, false, 5 );
            hbMobilePhone.PackStart( this.edMPhone, true, true, 5 );

            vbBox.PackStart( hbEmail, true, true, 5 );
            vbBox.PackStart( hbMobilePhone, true, true, 5 );
            this.vbPage1.PackStart( this.frmContact, true, true, 5 );
        }
예제 #54
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget sermon2.LopConf
     Stetic.BinContainer.Attach(this);
     this.Name = "sermon2.LopConf";
     // Container child sermon2.LopConf.Gtk.Container+ContainerChild
     this.frame1            = new Gtk.Frame();
     this.frame1.Name       = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(1));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment             = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name        = "GtkAlignment";
     this.GtkAlignment.LeftPadding = ((uint)(12));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.table1               = new Gtk.Table(((uint)(2)), ((uint)(3)), false);
     this.table1.Name          = "table1";
     this.table1.RowSpacing    = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.escValueLabel           = new Gtk.Label();
     this.escValueLabel.Name      = "escValueLabel";
     this.escValueLabel.LabelProp = Mono.Unix.Catalog.GetString("escape code");
     this.table1.Add(this.escValueLabel);
     Gtk.Table.TableChild w1 = ((Gtk.Table.TableChild)(this.table1[this.escValueLabel]));
     w1.TopAttach    = ((uint)(1));
     w1.BottomAttach = ((uint)(2));
     w1.XOptions     = ((Gtk.AttachOptions)(4));
     w1.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.removeButton              = new Gtk.Button();
     this.removeButton.CanFocus     = true;
     this.removeButton.Name         = "removeButton";
     this.removeButton.UseUnderline = true;
     // Container child removeButton.Gtk.Container+ContainerChild
     Gtk.Alignment w2 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     Gtk.HBox w3 = new Gtk.HBox();
     w3.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Image w4 = new Gtk.Image();
     w4.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-delete", Gtk.IconSize.Menu, 16);
     w3.Add(w4);
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Label w6 = new Gtk.Label();
     w6.LabelProp    = Mono.Unix.Catalog.GetString("remove");
     w6.UseUnderline = true;
     w3.Add(w6);
     w2.Add(w3);
     this.removeButton.Add(w2);
     this.table1.Add(this.removeButton);
     Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table1[this.removeButton]));
     w10.TopAttach    = ((uint)(1));
     w10.BottomAttach = ((uint)(2));
     w10.LeftAttach   = ((uint)(2));
     w10.RightAttach  = ((uint)(3));
     w10.XOptions     = ((Gtk.AttachOptions)(4));
     w10.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.resetValueLabel           = new Gtk.Label();
     this.resetValueLabel.Name      = "resetValueLabel";
     this.resetValueLabel.LabelProp = Mono.Unix.Catalog.GetString("reset code");
     this.table1.Add(this.resetValueLabel);
     Gtk.Table.TableChild w11 = ((Gtk.Table.TableChild)(this.table1[this.resetValueLabel]));
     w11.XOptions = ((Gtk.AttachOptions)(4));
     w11.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.spinbutton1          = new Gtk.SpinButton(0, 255, 1);
     this.spinbutton1.CanFocus = true;
     this.spinbutton1.Name     = "spinbutton1";
     this.spinbutton1.Adjustment.PageIncrement = 10;
     this.spinbutton1.ClimbRate = 1;
     this.spinbutton1.Numeric   = true;
     this.spinbutton1.Value     = 66;
     this.spinbutton1.Wrap      = true;
     this.table1.Add(this.spinbutton1);
     Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table1[this.spinbutton1]));
     w12.LeftAttach  = ((uint)(1));
     w12.RightAttach = ((uint)(2));
     w12.XOptions    = ((Gtk.AttachOptions)(4));
     w12.YOptions    = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.spinbutton2          = new Gtk.SpinButton(0, 255, 1);
     this.spinbutton2.CanFocus = true;
     this.spinbutton2.Name     = "spinbutton2";
     this.spinbutton2.Adjustment.PageIncrement = 10;
     this.spinbutton2.ClimbRate = 1;
     this.spinbutton2.Numeric   = true;
     this.spinbutton2.Value     = 35;
     this.spinbutton2.Wrap      = true;
     this.table1.Add(this.spinbutton2);
     Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.table1[this.spinbutton2]));
     w13.TopAttach    = ((uint)(1));
     w13.BottomAttach = ((uint)(2));
     w13.LeftAttach   = ((uint)(1));
     w13.RightAttach  = ((uint)(2));
     w13.XOptions     = ((Gtk.AttachOptions)(4));
     w13.YOptions     = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.violationCheckButton               = new Gtk.CheckButton();
     this.violationCheckButton.CanFocus      = true;
     this.violationCheckButton.Name          = "violationCheckButton";
     this.violationCheckButton.Label         = Mono.Unix.Catalog.GetString("report violations");
     this.violationCheckButton.DrawIndicator = true;
     this.violationCheckButton.UseUnderline  = true;
     this.table1.Add(this.violationCheckButton);
     Gtk.Table.TableChild w14 = ((Gtk.Table.TableChild)(this.table1[this.violationCheckButton]));
     w14.LeftAttach  = ((uint)(2));
     w14.RightAttach = ((uint)(3));
     w14.XOptions    = ((Gtk.AttachOptions)(4));
     w14.YOptions    = ((Gtk.AttachOptions)(4));
     this.GtkAlignment.Add(this.table1);
     this.frame1.Add(this.GtkAlignment);
     this.frameLabel           = new Gtk.Label();
     this.frameLabel.Name      = "frameLabel";
     this.frameLabel.LabelProp = Mono.Unix.Catalog.GetString("<b>frame1</b>");
     this.frameLabel.UseMarkup = true;
     this.frame1.LabelWidget   = this.frameLabel;
     this.Add(this.frame1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.Show();
     this.removeButton.Released += new System.EventHandler(this.OnRemoveButtonReleased);
 }
예제 #55
0
        private void BuildCategoriesFrame()
        {
            var vbBox = new Gtk.VBox( false, 5 );
            var vbExpandedBox = new Gtk.VBox( false, 5 );
            var hbAvailableCategories = new Gtk.HBox( false, 5 );
            var hbCurrentCategories = new Gtk.HBox( false, 5 );
            var exExpandCategories = new Gtk.Expander( "Categories" );

            // The frame
            this.frmCategories = new Gtk.Frame( "Manage categories" );
            this.frmCategories.Add( vbBox );

            // The expander
            exExpandCategories.Expanded = false;
            exExpandCategories.Add( vbExpandedBox );
            this.btAddCategory = new Gtk.Button( Gtk.Stock.Add );
            this.btAddCategory.Clicked += (sender, e) => this.OnAddCategory();
            this.btRemoveCategory = new Gtk.Button( Gtk.Stock.Add );
            this.btRemoveCategory.Clicked += (sender, e) => this.OnRemoveCategory();
            this.btRemoveCategory = new Gtk.Button( Gtk.Stock.Remove );
            this.cbAvailableCategories = new Gtk.ComboBox( new string[] { "" } );
            this.cbCurrentCategories = new Gtk.ComboBox( new string[] { "" } );
            hbAvailableCategories.PackStart( new Gtk.Label( "Available:" ), false, false, 5 );
            hbAvailableCategories.PackStart( this.cbAvailableCategories, true, true, 5 );
            hbAvailableCategories.PackStart( this.btAddCategory, false, false, 5 );
            hbCurrentCategories.PackStart( new Gtk.Label( "Current:" ), false, false, 5 );
            hbCurrentCategories.PackStart( this.cbCurrentCategories, true, true, 5 );
            hbCurrentCategories.PackStart( this.btRemoveCategory, false, false, 5 );
            vbExpandedBox.PackStart( hbCurrentCategories, true, true, 5 );
            vbExpandedBox.PackStart( hbAvailableCategories, true, true, 5 );

            // Categories
            this.lblCategories = new Gtk.Label() {  Markup = "<i>Current categories</i>:" };

            vbBox.PackStart( this.lblCategories, true, true, 5 );
            vbBox.PackStart( exExpandCategories, true, true, 5 );
            this.vbPage1.PackStart( this.frmCategories, true, true, 5 );
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.ExportPOIDialog
     this.WidthRequest = 600;
     this.Name = "ocmgtk.ExportPOIDialog";
     this.Title = Mono.Unix.Catalog.GetString("Export Garmin POI");
     this.TypeHint = ((Gdk.WindowTypeHint)(1));
     this.WindowPosition = ((Gtk.WindowPosition)(4));
     this.Modal = true;
     this.BorderWidth = ((uint)(6));
     this.Resizable = false;
     this.AllowGrow = false;
     this.SkipPagerHint = true;
     this.SkipTaskbarHint = true;
     // Internal child ocmgtk.ExportPOIDialog.VBox
     Gtk.VBox w1 = this.VBox;
     w1.Name = "dialog1_VBox";
     w1.BorderWidth = ((uint)(2));
     // Container child dialog1_VBox.Gtk.Box+BoxChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("File:");
     this.hbox1.Add(this.label1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.fileEntry = new Gtk.Entry();
     this.fileEntry.CanFocus = true;
     this.fileEntry.Name = "fileEntry";
     this.fileEntry.IsEditable = true;
     this.fileEntry.InvisibleChar = '●';
     this.hbox1.Add(this.fileEntry);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.fileEntry]));
     w3.Position = 1;
     // Container child hbox1.Gtk.Box+BoxChild
     this.fileButton = new Gtk.Button();
     this.fileButton.CanFocus = true;
     this.fileButton.Name = "fileButton";
     // Container child fileButton.Gtk.Container+ContainerChild
     this.image3 = new Gtk.Image();
     this.image3.Name = "image3";
     this.image3.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-open", Gtk.IconSize.Menu, 16);
     this.fileButton.Add(this.image3);
     this.fileButton.Label = null;
     this.hbox1.Add(this.fileButton);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.hbox1[this.fileButton]));
     w5.Position = 2;
     w5.Expand = false;
     w5.Fill = false;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w6.Position = 0;
     w6.Expand = false;
     w6.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.table1 = new Gtk.Table(((uint)(9)), ((uint)(2)), false);
     this.table1.Name = "table1";
     this.table1.RowSpacing = ((uint)(6));
     this.table1.ColumnSpacing = ((uint)(6));
     // Container child table1.Gtk.Table+TableChild
     this.catagoryEntry = new Gtk.Entry();
     this.catagoryEntry.CanFocus = true;
     this.catagoryEntry.Name = "catagoryEntry";
     this.catagoryEntry.Text = Mono.Unix.Catalog.GetString("Geocaches");
     this.catagoryEntry.IsEditable = true;
     this.catagoryEntry.InvisibleChar = '●';
     this.table1.Add(this.catagoryEntry);
     Gtk.Table.TableChild w7 = ((Gtk.Table.TableChild)(this.table1[this.catagoryEntry]));
     w7.TopAttach = ((uint)(2));
     w7.BottomAttach = ((uint)(3));
     w7.LeftAttach = ((uint)(1));
     w7.RightAttach = ((uint)(2));
     w7.XOptions = ((Gtk.AttachOptions)(4));
     w7.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.descCombo = Gtk.ComboBox.NewText();
     this.descCombo.AppendText(Mono.Unix.Catalog.GetString("Cache Name"));
     this.descCombo.AppendText(Mono.Unix.Catalog.GetString("Cache Code/Size/Hint"));
     this.descCombo.AppendText(Mono.Unix.Catalog.GetString("Cache Code/Size/Type"));
     this.descCombo.AppendText(Mono.Unix.Catalog.GetString("Full Paperless"));
     this.descCombo.Name = "descCombo";
     this.descCombo.Active = 0;
     this.table1.Add(this.descCombo);
     Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table1[this.descCombo]));
     w8.TopAttach = ((uint)(1));
     w8.BottomAttach = ((uint)(2));
     w8.LeftAttach = ((uint)(1));
     w8.RightAttach = ((uint)(2));
     w8.XOptions = ((Gtk.AttachOptions)(4));
     w8.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.hbox2 = new Gtk.HBox();
     this.hbox2.Name = "hbox2";
     this.hbox2.Spacing = 6;
     // Container child hbox2.Gtk.Box+BoxChild
     this.includeBMPCheck = new Gtk.CheckButton();
     this.includeBMPCheck.CanFocus = true;
     this.includeBMPCheck.Name = "includeBMPCheck";
     this.includeBMPCheck.Label = Mono.Unix.Catalog.GetString("BMP Icon:");
     this.includeBMPCheck.DrawIndicator = true;
     this.includeBMPCheck.UseUnderline = true;
     this.hbox2.Add(this.includeBMPCheck);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.hbox2[this.includeBMPCheck]));
     w9.Position = 0;
     w9.Expand = false;
     // Container child hbox2.Gtk.Box+BoxChild
     this.bmpFile = new Gtk.Entry();
     this.bmpFile.Sensitive = false;
     this.bmpFile.CanFocus = true;
     this.bmpFile.Name = "bmpFile";
     this.bmpFile.IsEditable = true;
     this.bmpFile.InvisibleChar = '●';
     this.hbox2.Add(this.bmpFile);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.hbox2[this.bmpFile]));
     w10.Position = 1;
     // Container child hbox2.Gtk.Box+BoxChild
     this.bmpButton = new Gtk.Button();
     this.bmpButton.Sensitive = false;
     this.bmpButton.CanFocus = true;
     this.bmpButton.Name = "bmpButton";
     // Container child bmpButton.Gtk.Container+ContainerChild
     this.image4 = new Gtk.Image();
     this.image4.Name = "image4";
     this.image4.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-open", Gtk.IconSize.Menu, 16);
     this.bmpButton.Add(this.image4);
     this.bmpButton.Label = null;
     this.hbox2.Add(this.bmpButton);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox2[this.bmpButton]));
     w12.Position = 2;
     w12.Expand = false;
     w12.Fill = false;
     this.table1.Add(this.hbox2);
     Gtk.Table.TableChild w13 = ((Gtk.Table.TableChild)(this.table1[this.hbox2]));
     w13.TopAttach = ((uint)(8));
     w13.BottomAttach = ((uint)(9));
     w13.RightAttach = ((uint)(2));
     w13.XOptions = ((Gtk.AttachOptions)(4));
     w13.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.hbox3 = new Gtk.HBox();
     this.hbox3.Name = "hbox3";
     this.hbox3.Spacing = 6;
     // Container child hbox3.Gtk.Box+BoxChild
     this.proxEntry = new Gtk.Entry();
     this.proxEntry.Sensitive = false;
     this.proxEntry.CanFocus = true;
     this.proxEntry.Name = "proxEntry";
     this.proxEntry.Text = Mono.Unix.Catalog.GetString("1");
     this.proxEntry.IsEditable = true;
     this.proxEntry.InvisibleChar = '●';
     this.hbox3.Add(this.proxEntry);
     Gtk.Box.BoxChild w14 = ((Gtk.Box.BoxChild)(this.hbox3[this.proxEntry]));
     w14.Position = 0;
     // Container child hbox3.Gtk.Box+BoxChild
     this.proxCombo = Gtk.ComboBox.NewText();
     this.proxCombo.AppendText(Mono.Unix.Catalog.GetString("kilometers"));
     this.proxCombo.AppendText(Mono.Unix.Catalog.GetString("miles"));
     this.proxCombo.Sensitive = false;
     this.proxCombo.Name = "proxCombo";
     this.proxCombo.Active = 0;
     this.hbox3.Add(this.proxCombo);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox3[this.proxCombo]));
     w15.Position = 1;
     w15.Expand = false;
     w15.Fill = false;
     this.table1.Add(this.hbox3);
     Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.table1[this.hbox3]));
     w16.TopAttach = ((uint)(3));
     w16.BottomAttach = ((uint)(4));
     w16.LeftAttach = ((uint)(1));
     w16.RightAttach = ((uint)(2));
     w16.XOptions = ((Gtk.AttachOptions)(4));
     w16.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.includeChildrenCheck = new Gtk.CheckButton();
     this.includeChildrenCheck.CanFocus = true;
     this.includeChildrenCheck.Name = "includeChildrenCheck";
     this.includeChildrenCheck.Label = Mono.Unix.Catalog.GetString("Include Child Waypoints");
     this.includeChildrenCheck.DrawIndicator = true;
     this.includeChildrenCheck.UseUnderline = true;
     this.table1.Add(this.includeChildrenCheck);
     Gtk.Table.TableChild w17 = ((Gtk.Table.TableChild)(this.table1[this.includeChildrenCheck]));
     w17.TopAttach = ((uint)(6));
     w17.BottomAttach = ((uint)(7));
     w17.RightAttach = ((uint)(2));
     w17.XOptions = ((Gtk.AttachOptions)(4));
     w17.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label2 = new Gtk.Label();
     this.label2.Name = "label2";
     this.label2.Xalign = 0F;
     this.label2.LabelProp = Mono.Unix.Catalog.GetString("Name:");
     this.table1.Add(this.label2);
     Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table1[this.label2]));
     w18.XOptions = ((Gtk.AttachOptions)(4));
     w18.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label3 = new Gtk.Label();
     this.label3.Name = "label3";
     this.label3.Xalign = 0F;
     this.label3.LabelProp = Mono.Unix.Catalog.GetString("Description:");
     this.table1.Add(this.label3);
     Gtk.Table.TableChild w19 = ((Gtk.Table.TableChild)(this.table1[this.label3]));
     w19.TopAttach = ((uint)(1));
     w19.BottomAttach = ((uint)(2));
     w19.XOptions = ((Gtk.AttachOptions)(4));
     w19.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.label4 = new Gtk.Label();
     this.label4.Name = "label4";
     this.label4.Xalign = 0F;
     this.label4.LabelProp = Mono.Unix.Catalog.GetString("Category:");
     this.table1.Add(this.label4);
     Gtk.Table.TableChild w20 = ((Gtk.Table.TableChild)(this.table1[this.label4]));
     w20.TopAttach = ((uint)(2));
     w20.BottomAttach = ((uint)(3));
     w20.XOptions = ((Gtk.AttachOptions)(4));
     w20.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.limitCaches = new Gtk.CheckButton();
     this.limitCaches.CanFocus = true;
     this.limitCaches.Name = "limitCaches";
     this.limitCaches.Label = Mono.Unix.Catalog.GetString("Limit Number of Geocaches");
     this.limitCaches.DrawIndicator = true;
     this.limitCaches.UseUnderline = true;
     this.table1.Add(this.limitCaches);
     Gtk.Table.TableChild w21 = ((Gtk.Table.TableChild)(this.table1[this.limitCaches]));
     w21.TopAttach = ((uint)(4));
     w21.BottomAttach = ((uint)(5));
     w21.XOptions = ((Gtk.AttachOptions)(4));
     w21.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.limitEntry = new Gtk.Entry();
     this.limitEntry.Sensitive = false;
     this.limitEntry.CanFocus = true;
     this.limitEntry.Name = "limitEntry";
     this.limitEntry.Text = Mono.Unix.Catalog.GetString("1000");
     this.limitEntry.IsEditable = true;
     this.limitEntry.InvisibleChar = '●';
     this.table1.Add(this.limitEntry);
     Gtk.Table.TableChild w22 = ((Gtk.Table.TableChild)(this.table1[this.limitEntry]));
     w22.TopAttach = ((uint)(4));
     w22.BottomAttach = ((uint)(5));
     w22.LeftAttach = ((uint)(1));
     w22.RightAttach = ((uint)(2));
     w22.XOptions = ((Gtk.AttachOptions)(4));
     w22.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.logCheck = new Gtk.CheckButton();
     this.logCheck.CanFocus = true;
     this.logCheck.Name = "logCheck";
     this.logCheck.Label = Mono.Unix.Catalog.GetString("Limit Number of Logs");
     this.logCheck.DrawIndicator = true;
     this.logCheck.UseUnderline = true;
     this.table1.Add(this.logCheck);
     Gtk.Table.TableChild w23 = ((Gtk.Table.TableChild)(this.table1[this.logCheck]));
     w23.TopAttach = ((uint)(5));
     w23.BottomAttach = ((uint)(6));
     w23.XOptions = ((Gtk.AttachOptions)(4));
     w23.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.logEntry = new Gtk.Entry();
     this.logEntry.Sensitive = false;
     this.logEntry.CanFocus = true;
     this.logEntry.Name = "logEntry";
     this.logEntry.Text = Mono.Unix.Catalog.GetString("5");
     this.logEntry.IsEditable = true;
     this.logEntry.InvisibleChar = '●';
     this.table1.Add(this.logEntry);
     Gtk.Table.TableChild w24 = ((Gtk.Table.TableChild)(this.table1[this.logEntry]));
     w24.TopAttach = ((uint)(5));
     w24.BottomAttach = ((uint)(6));
     w24.LeftAttach = ((uint)(1));
     w24.RightAttach = ((uint)(2));
     w24.XOptions = ((Gtk.AttachOptions)(4));
     w24.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.nameCombo = Gtk.ComboBox.NewText();
     this.nameCombo.AppendText(Mono.Unix.Catalog.GetString("Cache Code"));
     this.nameCombo.AppendText(Mono.Unix.Catalog.GetString("Cache Name"));
     this.nameCombo.Name = "nameCombo";
     this.nameCombo.Active = 0;
     this.table1.Add(this.nameCombo);
     Gtk.Table.TableChild w25 = ((Gtk.Table.TableChild)(this.table1[this.nameCombo]));
     w25.LeftAttach = ((uint)(1));
     w25.RightAttach = ((uint)(2));
     w25.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.proximityAlertCheck = new Gtk.CheckButton();
     this.proximityAlertCheck.CanFocus = true;
     this.proximityAlertCheck.Name = "proximityAlertCheck";
     this.proximityAlertCheck.Label = Mono.Unix.Catalog.GetString("Proximity Alert:");
     this.proximityAlertCheck.DrawIndicator = true;
     this.proximityAlertCheck.UseUnderline = true;
     this.table1.Add(this.proximityAlertCheck);
     Gtk.Table.TableChild w26 = ((Gtk.Table.TableChild)(this.table1[this.proximityAlertCheck]));
     w26.TopAttach = ((uint)(3));
     w26.BottomAttach = ((uint)(4));
     w26.XOptions = ((Gtk.AttachOptions)(4));
     w26.YOptions = ((Gtk.AttachOptions)(4));
     // Container child table1.Gtk.Table+TableChild
     this.useHTMLCheck = new Gtk.CheckButton();
     this.useHTMLCheck.CanFocus = true;
     this.useHTMLCheck.Name = "useHTMLCheck";
     this.useHTMLCheck.Label = Mono.Unix.Catalog.GetString("Convert HTML to Plain Text");
     this.useHTMLCheck.DrawIndicator = true;
     this.useHTMLCheck.UseUnderline = true;
     this.table1.Add(this.useHTMLCheck);
     Gtk.Table.TableChild w27 = ((Gtk.Table.TableChild)(this.table1[this.useHTMLCheck]));
     w27.TopAttach = ((uint)(7));
     w27.BottomAttach = ((uint)(8));
     w27.RightAttach = ((uint)(2));
     w27.XOptions = ((Gtk.AttachOptions)(4));
     w27.YOptions = ((Gtk.AttachOptions)(4));
     this.GtkAlignment2.Add(this.table1);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel4 = new Gtk.Label();
     this.GtkLabel4.Name = "GtkLabel4";
     this.GtkLabel4.LabelProp = Mono.Unix.Catalog.GetString("<b>POI Options</b>");
     this.GtkLabel4.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel4;
     this.vbox2.Add(this.frame1);
     Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.vbox2[this.frame1]));
     w30.Position = 1;
     w30.Expand = false;
     w30.Fill = false;
     w1.Add(this.vbox2);
     Gtk.Box.BoxChild w31 = ((Gtk.Box.BoxChild)(w1[this.vbox2]));
     w31.Position = 0;
     w31.Expand = false;
     w31.Fill = false;
     // Internal child ocmgtk.ExportPOIDialog.ActionArea
     Gtk.HButtonBox w32 = this.ActionArea;
     w32.Name = "dialog1_ActionArea";
     w32.Spacing = 10;
     w32.BorderWidth = ((uint)(5));
     w32.LayoutStyle = ((Gtk.ButtonBoxStyle)(4));
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonCancel = new Gtk.Button();
     this.buttonCancel.CanDefault = true;
     this.buttonCancel.CanFocus = true;
     this.buttonCancel.Name = "buttonCancel";
     this.buttonCancel.UseStock = true;
     this.buttonCancel.UseUnderline = true;
     this.buttonCancel.Label = "gtk-cancel";
     this.AddActionWidget(this.buttonCancel, -6);
     Gtk.ButtonBox.ButtonBoxChild w33 = ((Gtk.ButtonBox.ButtonBoxChild)(w32[this.buttonCancel]));
     w33.Expand = false;
     w33.Fill = false;
     // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
     this.buttonOk = new Gtk.Button();
     this.buttonOk.CanDefault = true;
     this.buttonOk.CanFocus = true;
     this.buttonOk.Name = "buttonOk";
     this.buttonOk.UseStock = true;
     this.buttonOk.UseUnderline = true;
     this.buttonOk.Label = "gtk-ok";
     this.AddActionWidget(this.buttonOk, -5);
     Gtk.ButtonBox.ButtonBoxChild w34 = ((Gtk.ButtonBox.ButtonBoxChild)(w32[this.buttonOk]));
     w34.Position = 1;
     w34.Expand = false;
     w34.Fill = false;
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 612;
     this.DefaultHeight = 415;
     this.Show();
     this.fileButton.Clicked += new System.EventHandler(this.OnFileClick);
     this.proximityAlertCheck.Toggled += new System.EventHandler(this.OnProxToggle);
     this.logCheck.Toggled += new System.EventHandler(this.OnLogToggle);
     this.limitCaches.Toggled += new System.EventHandler(this.OnCacheToggle);
     this.includeBMPCheck.Toggled += new System.EventHandler(this.OnBMPToggle);
     this.bmpButton.Clicked += new System.EventHandler(this.OnBMPClick);
     this.buttonCancel.Clicked += new System.EventHandler(this.OnCancelClick);
     this.buttonOk.Clicked += new System.EventHandler(this.OnOKClick);
 }
        public void CreateGui()
        {
            Gtk.Image icn_reload = new Gtk.Image(Gtk.Stock.Refresh, Gtk.IconSize.Button);
            _reload          = new Gtk.Button(icn_reload);
            _reload.Clicked += OnReload;

            _performer            = new Gtk.Entry(200);
            _title                = new Gtk.Entry(200);
            _title.WidthChars     = 60;
            _performer.WidthChars = 60;
            _subtitle             = new Gtk.Entry(300);
            _subtitle.WidthChars  = 60;
            _composer             = new Gtk.Entry(200);
            _composer.WidthChars  = 60;
            _year            = new Gtk.Entry(20);
            _year.WidthChars = 20;

            _image = new Gtk.Image();
            _image.SetSizeRequest(100, 100);
            _imagefile          = new Gtk.FileChooserButton("Choose image file", Gtk.FileChooserAction.Open);
            _imagefile.FileSet += new EventHandler(EvtImageSet);

            Gtk.Image icn_add_track = new Gtk.Image(Gtk.Stock.Add, Gtk.IconSize.Button);
            _add_track          = new Gtk.Button(icn_add_track);
            _add_track.Clicked += OnAddTrack;

            Gtk.Image icn_del_track = new Gtk.Image(Gtk.Stock.Delete, Gtk.IconSize.Button);
            _del_track          = new Gtk.Button(icn_del_track);
            _del_track.Clicked += OnDelTrack;

            Gtk.Image icn_save = new Gtk.Image(Gtk.Stock.Save, Gtk.IconSize.Button);
            _save          = new Gtk.Button(icn_save);
            _save.Clicked += OnSave;

            _store  = new Gtk.ListStore(typeof(int), typeof(string), typeof(string), typeof(string), typeof(string), typeof(string));
            _tracks = new Gtk.TreeView();
            {
                Gtk.CellRendererText cr0 = new Gtk.CellRendererText();
                cr0.Scale = 0.8;
                _tracks.AppendColumn("Nr.", cr0, "text", 0);

                Gtk.CellRendererText cr_title = new Gtk.CellRendererText();
                cr_title.Scale    = 0.8;
                cr_title.Editable = true;
                cr_title.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(1, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Title", cr_title, "text", 1);

                Gtk.CellRendererText cr_artist = new Gtk.CellRendererText();
                cr_artist.Editable = true;
                cr_artist.Scale    = 0.8;
                cr_artist.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(2, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Artist", cr_artist, "text", 2);

                Gtk.CellRendererText cr_composer = new Gtk.CellRendererText();
                cr_composer.Editable = true;
                cr_composer.Scale    = 0.8;
                cr_composer.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(3, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Composer", cr_composer, "text", 3);

                Gtk.CellRendererText cr_piece = new Gtk.CellRendererText();
                cr_piece.Editable = true;
                cr_piece.Scale    = 0.8;
                cr_piece.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(4, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Piece", cr_piece, "text", 4);

                Gtk.CellRendererText cr_time = new Gtk.CellRendererText();
                cr_time.Editable = true;
                cr_time.Scale    = 0.8;
                cr_time.Edited  += new Gtk.EditedHandler(delegate(object sender, Gtk.EditedArgs args) {
                    setCell(5, args.NewText, new Gtk.TreePath(args.Path));
                });
                _tracks.AppendColumn("Offset", cr_time, "text", 5);
            }

            _tracks.Model = _store;

            Gtk.Table tbl = new Gtk.Table(2, 5, false);
            tbl.Attach(new Gtk.Label("Album:"), 0, 1, 0, 1);
            tbl.Attach(_title, 1, 2, 0, 1);
            tbl.Attach(new Gtk.Label("Artist:"), 0, 1, 1, 2);
            tbl.Attach(_performer, 1, 2, 1, 2);
            tbl.Attach(new Gtk.Label("Composer:"), 0, 1, 2, 3);
            tbl.Attach(_composer, 1, 2, 2, 3);
            tbl.Attach(new Gtk.Label("Subtitle:"), 0, 1, 3, 4);
            tbl.Attach(_subtitle, 1, 2, 3, 4);
            tbl.Attach(new Gtk.Label("year:"), 0, 1, 4, 5);
            tbl.Attach(_year, 1, 2, 4, 5);

            Gtk.Frame frm = new Gtk.Frame();
            frm.Add(tbl);

            Gtk.HBox hb2 = new Gtk.HBox();
            hb2.PackEnd(_reload, false, false, 1);
            hb2.PackEnd(_del_track, false, false, 1);
            hb2.PackEnd(_add_track, false, false, 1);
            hb2.PackEnd(_save, false, false, 1);

            Gtk.HBox hb  = new Gtk.HBox();
            Gtk.VBox vb1 = new Gtk.VBox();
            vb1.PackStart(frm, false, false, 0);
            vb1.PackStart(hb2, true, true, 0);
            hb.PackStart(vb1, false, false, 0);

            Gtk.Frame frm2 = new Gtk.Frame();
            frm2.Add(_image);
            Gtk.VBox vbi = new Gtk.VBox();
            Gtk.HBox bb  = new Gtk.HBox();
            bb.PackStart(new Gtk.VBox(), true, true, 0);
            bb.PackStart(frm2, false, false, 0);
            bb.PackEnd(new Gtk.VBox(), true, true, 0);

            vbi.PackStart(bb, true, true, 2);
            vbi.PackEnd(_imagefile, false, false, 2);
            hb.PackEnd(vbi, true, true, 2);

            Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow();
            scroll.Add(_tracks);
            scroll.SetSizeRequest(800, 300);

            base.VBox.PackStart(hb, false, false, 4);
            base.VBox.PackStart(scroll, true, true, 0);
            base.VBox.ShowAll();

            base.AddButton("Close", 0);
        }
예제 #58
0
 protected virtual void Build()
 {
     dialog2 = new Gtk.Window("Copying files...");
     // Widget copy.CopyWidget
     dialog2.Name           = "copy.CopyWidget";
     dialog2.Title          = Mono.Unix.Catalog.GetString("CopyWidget");
     dialog2.WindowPosition = ((Gtk.WindowPosition)(3));
     // Container child copy.CopyWidget.Gtk.Container+ContainerChild
     this.vbox1         = new Gtk.VBox();
     this.vbox1.Name    = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.frame1             = new Gtk.Frame();
     this.frame1.Name        = "frame1";
     this.frame1.ShadowType  = ((Gtk.ShadowType)(2));
     this.frame1.LabelXalign = 1F;
     this.frame1.BorderWidth = ((uint)(6));
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment               = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment.Name          = "GtkAlignment";
     this.GtkAlignment.LeftPadding   = ((uint)(12));
     this.GtkAlignment.TopPadding    = ((uint)(6));
     this.GtkAlignment.RightPadding  = ((uint)(10));
     this.GtkAlignment.BottomPadding = ((uint)(10));
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     this.vbox2         = new Gtk.VBox();
     this.vbox2.Name    = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.hbox1         = new Gtk.HBox();
     this.hbox1.Name    = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.copyLabel           = new Gtk.Label();
     this.copyLabel.Name      = "copyLabel";
     this.copyLabel.LabelProp = Mono.Unix.Catalog.GetString("label2");
     this.hbox1.Add(this.copyLabel);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.copyLabel]));
     w1.Position = 0;
     w1.Expand   = false;
     w1.Fill     = false;
     this.vbox2.Add(this.hbox1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.hbox1]));
     w2.Position = 0;
     w2.Expand   = false;
     w2.Fill     = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.progressbar1      = new Gtk.ProgressBar();
     this.progressbar1.Name = "progressbar1";
     this.vbox2.Add(this.progressbar1);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.progressbar1]));
     w3.Position = 1;
     w3.Expand   = false;
     w3.Fill     = false;
     this.GtkAlignment.Add(this.vbox2);
     this.frame1.Add(this.GtkAlignment);
     this.frameLabel           = new Gtk.Label();
     this.frameLabel.Name      = "frameLabel";
     this.frameLabel.Xpad      = 8;
     this.frameLabel.LabelProp = Mono.Unix.Catalog.GetString("<b>GtkFrame</b>");
     this.frameLabel.UseMarkup = true;
     this.frame1.LabelWidget   = this.frameLabel;
     this.vbox1.Add(this.frame1);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame1]));
     w6.Position = 0;
     w6.Expand   = false;
     w6.Fill     = false;
     dialog2.Add(this.vbox1);
     if ((dialog2.Child != null))
     {
         dialog2.Child.ShowAll();
     }
     dialog2.DefaultWidth  = 400;
     dialog2.DefaultHeight = 100;
     //   dialog2.Show();
 }
 protected virtual void Build() {
     Stetic.Gui.Initialize(this);
     // Widget MonoDevelop.Database.Designer.ForeignKeyConstraintEditorWidget
     Stetic.BinContainer.Attach(this);
     this.Name = "MonoDevelop.Database.Designer.ForeignKeyConstraintEditorWidget";
     // Container child MonoDevelop.Database.Designer.ForeignKeyConstraintEditorWidget.Gtk.Container+ContainerChild
     this.hpaned = new Gtk.HPaned();
     this.hpaned.CanFocus = true;
     this.hpaned.Name = "hpaned";
     this.hpaned.Position = 293;
     // Container child hpaned.Gtk.Paned+PanedChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     this.vbox3.Spacing = 6;
     // Container child vbox3.Gtk.Box+BoxChild
     this.windowPK = new Gtk.ScrolledWindow();
     this.windowPK.CanFocus = true;
     this.windowPK.Name = "windowPK";
     this.windowPK.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.windowPK.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.windowPK.ShadowType = ((Gtk.ShadowType)(1));
     // Container child windowPK.Gtk.Container+ContainerChild
     this.listFK = new Gtk.TreeView();
     this.listFK.CanFocus = true;
     this.listFK.Name = "listFK";
     this.listFK.HeadersClickable = true;
     this.windowPK.Add(this.listFK);
     this.vbox3.Add(this.windowPK);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox3[this.windowPK]));
     w2.Position = 0;
     // Container child vbox3.Gtk.Box+BoxChild
     this.hbuttonbox = new Gtk.HButtonBox();
     this.hbuttonbox.Name = "hbuttonbox";
     this.hbuttonbox.Spacing = 6;
     this.hbuttonbox.LayoutStyle = ((Gtk.ButtonBoxStyle)(3));
     // Container child hbuttonbox.Gtk.ButtonBox+ButtonBoxChild
     this.buttonAdd = new Gtk.Button();
     this.buttonAdd.CanFocus = true;
     this.buttonAdd.Name = "buttonAdd";
     this.buttonAdd.UseStock = true;
     this.buttonAdd.UseUnderline = true;
     this.buttonAdd.Label = "gtk-add";
     this.hbuttonbox.Add(this.buttonAdd);
     Gtk.ButtonBox.ButtonBoxChild w3 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox[this.buttonAdd]));
     w3.Expand = false;
     w3.Fill = false;
     // Container child hbuttonbox.Gtk.ButtonBox+ButtonBoxChild
     this.buttonRemove = new Gtk.Button();
     this.buttonRemove.Sensitive = false;
     this.buttonRemove.CanFocus = true;
     this.buttonRemove.Name = "buttonRemove";
     this.buttonRemove.UseStock = true;
     this.buttonRemove.UseUnderline = true;
     this.buttonRemove.Label = "gtk-remove";
     this.hbuttonbox.Add(this.buttonRemove);
     Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(this.hbuttonbox[this.buttonRemove]));
     w4.Position = 1;
     w4.Expand = false;
     w4.Fill = false;
     this.vbox3.Add(this.hbuttonbox);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox3[this.hbuttonbox]));
     w5.Position = 1;
     w5.Expand = false;
     w5.Fill = false;
     this.hpaned.Add(this.vbox3);
     Gtk.Paned.PanedChild w6 = ((Gtk.Paned.PanedChild)(this.hpaned[this.vbox3]));
     w6.Resize = false;
     // Container child hpaned.Gtk.Paned+PanedChild
     this.vboxColumns = new Gtk.VBox();
     this.vboxColumns.Name = "vboxColumns";
     this.vboxColumns.Spacing = 6;
     // Container child vboxColumns.Gtk.Box+BoxChild
     this.frame1 = new Gtk.Frame();
     this.frame1.Name = "frame1";
     this.frame1.ShadowType = ((Gtk.ShadowType)(0));
     this.frame1.LabelXalign = 0F;
     // Container child frame1.Gtk.Container+ContainerChild
     this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment2.Name = "GtkAlignment2";
     this.GtkAlignment2.LeftPadding = ((uint)(12));
     // Container child GtkAlignment2.Gtk.Container+ContainerChild
     this.columnSelecter = new MonoDevelop.Database.Components.SelectColumnWidget();
     this.columnSelecter.Sensitive = false;
     this.columnSelecter.CanFocus = true;
     this.columnSelecter.Name = "columnSelecter";
     this.columnSelecter.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.columnSelecter.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.columnSelecter.ShadowType = ((Gtk.ShadowType)(1));
     this.columnSelecter.SingleCheck = false;
     this.GtkAlignment2.Add(this.columnSelecter);
     this.frame1.Add(this.GtkAlignment2);
     this.GtkLabel2 = new Gtk.Label();
     this.GtkLabel2.Name = "GtkLabel2";
     this.GtkLabel2.LabelProp = Mono.Unix.Catalog.GetString("Columns");
     this.GtkLabel2.UseMarkup = true;
     this.frame1.LabelWidget = this.GtkLabel2;
     this.vboxColumns.Add(this.frame1);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vboxColumns[this.frame1]));
     w9.Position = 0;
     // Container child vboxColumns.Gtk.Box+BoxChild
     this.frame2 = new Gtk.Frame();
     this.frame2.Name = "frame2";
     this.frame2.ShadowType = ((Gtk.ShadowType)(0));
     this.frame2.LabelXalign = 0F;
     // Container child frame2.Gtk.Container+ContainerChild
     this.GtkAlignment3 = new Gtk.Alignment(0F, 0F, 1F, 1F);
     this.GtkAlignment3.Name = "GtkAlignment3";
     this.GtkAlignment3.LeftPadding = ((uint)(12));
     // Container child GtkAlignment3.Gtk.Container+ContainerChild
     this.referenceColumnSelecter = new MonoDevelop.Database.Components.SelectColumnWidget();
     this.referenceColumnSelecter.Sensitive = false;
     this.referenceColumnSelecter.CanFocus = true;
     this.referenceColumnSelecter.Name = "referenceColumnSelecter";
     this.referenceColumnSelecter.VscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.referenceColumnSelecter.HscrollbarPolicy = ((Gtk.PolicyType)(1));
     this.referenceColumnSelecter.ShadowType = ((Gtk.ShadowType)(1));
     this.referenceColumnSelecter.SingleCheck = false;
     this.GtkAlignment3.Add(this.referenceColumnSelecter);
     this.frame2.Add(this.GtkAlignment3);
     this.GtkLabel3 = new Gtk.Label();
     this.GtkLabel3.Name = "GtkLabel3";
     this.GtkLabel3.LabelProp = Mono.Unix.Catalog.GetString("Reference Columns");
     this.GtkLabel3.UseMarkup = true;
     this.frame2.LabelWidget = this.GtkLabel3;
     this.vboxColumns.Add(this.frame2);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vboxColumns[this.frame2]));
     w12.Position = 1;
     this.hpaned.Add(this.vboxColumns);
     this.Add(this.hpaned);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
 }
예제 #60
0
        public ValueReferenceEditor(Project p, ValueReferenceGroup vrg, int rows, string frameText = null)
            : base(1.0F, 1.0F, 1.0F, 1.0F)
        {
            Project = p;

            valueReferenceGroup  = vrg;
            maxBounds            = new int[valueReferenceGroup.GetNumValueReferences()];
            widgetPositions      = new Tuple <uint, uint> [maxBounds.Count];
            widgets              = new Gtk.Widget[maxBounds.Count];
            helpButtonContainers = new Gtk.Container[maxBounds.Count];

            table = new Gtk.Table(2, 2, false);
            uint x = 0, y = 0;

            int cnt = 0;

            foreach (ValueReference r in valueReferenceGroup.GetValueReferences())
            {
                int index = cnt;
                cnt++;

                if (y >= rows)
                {
                    y  = 0;
                    x += 3;
                }

                widgetPositions[index] = new Tuple <uint, uint>(x, y);

                // If it has a ConstantsMapping, use a combobox instead of anything else
                if (r.ConstantsMapping != null)
                {
                    ComboBoxFromConstants comboBox = new ComboBoxFromConstants(false);
                    comboBox.SetConstantsMapping(r.ConstantsMapping);

                    comboBox.Changed += delegate(object sender, EventArgs e) {
                        r.SetValue(comboBox.ActiveValue);
                        OnDataModifiedInternal();
                    };

                    dataModifiedExternalEvent += delegate() {
                        comboBox.ActiveValue = r.GetIntValue();
                    };

                    table.Attach(new Gtk.Label(r.Name), x + 0, x + 1, y, y + 1);
                    table.Attach(comboBox, x + 1, x + 2, y, y + 1);
                    widgets[index] = comboBox;

                    helpButtonContainers[index] = new Gtk.HBox();
                    table.Attach(helpButtonContainers[index], x + 2, x + 3, y, y + 1, 0, Gtk.AttachOptions.Fill, 0, 0);

                    goto loopEnd;
                }
                // ConstantsMapping == null

                switch (r.ValueType)
                {
                case DataValueType.String:
                default:
                {
                    table.Attach(new Gtk.Label(r.Name), x + 0, x + 1, y, y + 1);
                    Gtk.Entry entry = new Gtk.Entry();
                    if (!r.Editable)
                    {
                        entry.Sensitive = false;
                    }
                    dataModifiedExternalEvent += delegate() {
                        entry.Text = r.GetStringValue();
                        OnDataModifiedInternal();
                    };
                    table.Attach(entry, x + 1, x + 2, y, y + 1);
                    widgets[index] = entry;

                    helpButtonContainers[index] = new Gtk.HBox();
                    table.Attach(helpButtonContainers[index], x + 2, x + 3, y, y + 1, 0, Gtk.AttachOptions.Fill, 0, 0);
                    break;
                }

                case DataValueType.Byte:
                case DataValueType.HalfByte:
byteCase:
                    {
                        table.Attach(new Gtk.Label(r.Name), x + 0, x + 1, y, y + 1);
                        SpinButtonHexadecimal spinButton = new SpinButtonHexadecimal(0, 255);
                        if (!r.Editable)
                        {
                            spinButton.Sensitive = false;
                        }
                        if (r.ValueType == DataValueType.HalfByte)
                        {
                            spinButton.Digits           = 1;
                            spinButton.Adjustment.Upper = 15;
                        }
                        else
                        {
                            spinButton.Digits = 2;
                        }
                        spinButton.ValueChanged += delegate(object sender, EventArgs e) {
                            Gtk.SpinButton button = sender as Gtk.SpinButton;
                            if (maxBounds[index] == 0 || button.ValueAsInt <= maxBounds[index])
                            {
                                r.SetValue(button.ValueAsInt);
                            }
                            else
                            {
                                button.Value = maxBounds[index];
                            }
                            OnDataModifiedInternal();
                        };
                        dataModifiedExternalEvent += delegate() {
                            spinButton.Value = r.GetIntValue();
                        };
                        table.Attach(spinButton, x + 1, x + 2, y, y + 1);
                        widgets[index] = spinButton;

                        helpButtonContainers[index] = new Gtk.HBox();
                        table.Attach(helpButtonContainers[index], x + 2, x + 3, y, y + 1, 0, Gtk.AttachOptions.Fill, 0, 0);
                    }
                    break;

                case DataValueType.WarpDestIndex:
                {
                    Gtk.Button newDestButton = new Gtk.Button("New\nDestination");
                    newDestButton.Clicked += delegate(object sender, EventArgs e) {
                        WarpSourceData warpData  = (WarpSourceData)r.Data;
                        WarpDestGroup  destGroup = warpData.GetReferencedDestGroup();
                        // Check if there's unused destination data
                        // already
                        for (int i = 0; i < destGroup.GetNumWarpDests(); i++)
                        {
                            WarpDestData destData = destGroup.GetWarpDest(i);
                            if (destData.GetNumReferences() == 0)
                            {
                                Gtk.MessageDialog d = new Gtk.MessageDialog(null,
                                                                            Gtk.DialogFlags.DestroyWithParent,
                                                                            Gtk.MessageType.Warning,
                                                                            Gtk.ButtonsType.YesNo,
                                                                            "Destination index " + i.ToString("X2") + " is not used by any sources. Use this index?\n\n(\"No\" will create a new destination instead.)");
                                Gtk.ResponseType response = (Gtk.ResponseType)d.Run();
                                d.Destroy();

                                if (response == Gtk.ResponseType.Yes)
                                {
                                    warpData.SetDestData(destGroup.GetWarpDest(i));
                                }
                                else if (response == Gtk.ResponseType.No)
                                {
                                    warpData.SetDestData(destGroup.AddDestData());
                                }
                                break;
                            }
                        }
                    };
                    table.Attach(newDestButton, x + 2, x + 3, y, y + 2);
                }
                    goto byteCase;

                case DataValueType.Word:
                {
                    table.Attach(new Gtk.Label(r.Name), x + 0, x + 1, y, y + 1);
                    SpinButtonHexadecimal spinButton = new SpinButtonHexadecimal(0, 0xffff);
                    if (!r.Editable)
                    {
                        spinButton.Sensitive = false;
                    }
                    spinButton.Digits        = 4;
                    spinButton.ValueChanged += delegate(object sender, EventArgs e) {
                        Gtk.SpinButton button = sender as Gtk.SpinButton;
                        if (maxBounds[index] == 0 || button.ValueAsInt <= maxBounds[index])
                        {
                            r.SetValue(button.ValueAsInt);
                        }
                        else
                        {
                            button.Value = maxBounds[index];
                        }
                        OnDataModifiedInternal();
                    };
                    dataModifiedExternalEvent += delegate() {
                        spinButton.Value = r.GetIntValue();
                    };
                    table.Attach(spinButton, x + 1, x + 2, y, y + 1);
                    widgets[index] = spinButton;

                    helpButtonContainers[index] = new Gtk.HBox();
                    table.Attach(helpButtonContainers[index], x + 2, x + 3, y, y + 1, 0, Gtk.AttachOptions.Fill, 0, 0);
                }
                break;

                case DataValueType.ByteBit:
                {
                    table.Attach(new Gtk.Label(r.Name), x + 0, x + 1, y, y + 1);
                    Gtk.CheckButton checkButton = new Gtk.CheckButton();
                    checkButton.CanFocus = false;
                    if (!r.Editable)
                    {
                        checkButton.Sensitive = false;
                    }
                    checkButton.Toggled += delegate(object sender, EventArgs e) {
                        Gtk.CheckButton button = sender as Gtk.CheckButton;
                        r.SetValue(button.Active ? 1 : 0);
                        OnDataModifiedInternal();
                    };
                    dataModifiedExternalEvent += delegate() {
                        checkButton.Active = r.GetIntValue() == 1;
                    };
                    table.Attach(checkButton, x + 1, x + 2, y, y + 1);
                    widgets[index] = checkButton;

                    helpButtonContainers[index] = new Gtk.HBox();
                    table.Attach(helpButtonContainers[index], x + 2, x + 3, y, y + 1, 0, Gtk.AttachOptions.Fill, 0, 0);
                }
                break;

                case DataValueType.ByteBits:
                case DataValueType.WordBits:
                {
                    table.Attach(new Gtk.Label(r.Name), x + 0, x + 1, y, y + 1);
                    SpinButtonHexadecimal spinButton = new SpinButtonHexadecimal(0, r.MaxValue);
                    if (!r.Editable)
                    {
                        spinButton.Sensitive = false;
                    }
                    spinButton.Digits        = (uint)Math.Pow(r.MaxValue, ((double)1) / 16) + 1;
                    spinButton.ValueChanged += delegate(object sender, EventArgs e) {
                        Gtk.SpinButton button = sender as Gtk.SpinButton;
                        if (maxBounds[index] == 0 || button.ValueAsInt <= maxBounds[index])
                        {
                            r.SetValue(button.ValueAsInt);
                        }
                        else
                        {
                            button.Value = maxBounds[index];
                        }
                        OnDataModifiedInternal();
                    };
                    dataModifiedExternalEvent += delegate() {
                        spinButton.Value = r.GetIntValue();
                    };
                    table.Attach(spinButton, x + 1, x + 2, y, y + 1);
                    widgets[index] = spinButton;

                    helpButtonContainers[index] = new Gtk.HBox();
                    table.Attach(helpButtonContainers[index], x + 2, x + 3, y, y + 1, 0, Gtk.AttachOptions.Fill, 0, 0);
                }
                break;

                case DataValueType.ObjectPointer:
                {
                    table.Attach(new Gtk.Label(r.Name), x + 0, x + 1, y, y + 1);

                    Gtk.Entry entry = new Gtk.Entry();
                    if (!r.Editable)
                    {
                        entry.Sensitive = false;
                    }
                    entry.Changed += delegate(object sender, EventArgs e) {
                        UpdatePointerTextBox(sender as Gtk.Entry, r);
                        OnDataModifiedInternal();
                    };
                    table.Attach(entry, x + 1, x + 2, y, y + 1);
                    widgets[index] = entry;

                    pointerFrame             = new Gtk.Frame();
                    pointerFrame.Label       = "Pointer data (possibly shared)";
                    pointerFrame.BorderWidth = 5;

                    y++;
                    table.Attach(pointerFrame, x + 0, x + 2, y, y + 1);

                    dataModifiedExternalEvent += delegate() {
                        entry.Text = r.GetStringValue();
                        UpdatePointerTextBox(entry, r);
                    };

                    helpButtonContainers[index] = new Gtk.HBox();
                    table.Attach(helpButtonContainers[index], x + 2, x + 3, y, y + 1, 0, Gtk.AttachOptions.Fill, 0, 0);
                }
                break;
                }

loopEnd:
                y++;
            }

            table.ColumnSpacing = 6;

            if (frameText != null)
            {
                var frame = new Gtk.Frame(frameText);
                frame.Add(table);
                this.Add(frame);
            }
            else
            {
                this.Add(table);
            }

            this.ShowAll();

            Data lastData = null;

            foreach (ValueReference r in valueReferenceGroup.GetValueReferences())
            {
                if (lastData != r.Data)
                {
                    lastData = r.Data;
                    r.Data.AddDataModifiedHandler(OnDataModifiedExternal);
                    // Destroy handler
                    this.Destroyed += delegate(object sender, EventArgs e) {
                        r.Data.RemoveDataModifiedHandler(OnDataModifiedExternal);
                    };
                }
            }

            // Initial values
            if (dataModifiedExternalEvent != null)
            {
                dataModifiedExternalEvent();
            }

            UpdateHelpButtons();
        }