public Format(RectangleSet rectangles) : base(_("File Type")) { var table = new Table(2, 2, true) { RowSpacing = 6 }; Add(table); _format = new ComboBox(new string[] { "gif", "jpg", "png" }); table.Attach(_format, 0, 1, 0, 1); _apply = new CheckButton(_("Apply to _whole image")); _apply.Activated += delegate { Rectangle.GlobalExtension = Extension; }; table.Attach(_apply, 0, 2, 1, 2); rectangles.SelectedRectangleChanged += (sender, args) => { if (!Apply) { args.OldSelected.Extension = Extension; Extension = args.NewSelected.Extension; } }; }
public CellPropertiesFrame(RectangleSet rectangles) : base(_("Cell Properties")) { var vbox = new VBox(false, 12); Add(vbox); var table = new GimpTable(3, 2, false) { ColumnSpacing = 6, RowSpacing = 6 }; vbox.Add(table); _url = new Entry(); table.AttachAligned(0, 0, _("_Link:"), 0.0, 0.5, _url, 3, false); _altText = new Entry(); table.AttachAligned(0, 1, _("Alt_ernative text:"), 0.0, 0.5, _altText, 3, false); _target = new Entry(); table.AttachAligned(0, 2, _("_Target:"), 0.0, 0.5, _target, 3, false); var hbox = new HBox(false, 12); vbox.Add(hbox); table = new GimpTable(3, 4, false) { ColumnSpacing = 6, RowSpacing = 6 }; hbox.PackStart(table, false, false, 0); _left = new Label(" "); table.AttachAligned(0, 0, _("Left:"), 0.0, 0.5, _left, 1, false); _right = new Label(" "); table.AttachAligned(0, 1, _("Right:"), 0.0, 0.5, _right, 1, false); _top = new Label(" "); table.AttachAligned(2, 0, _("Top:"), 0.0, 0.5, _top, 1, false); _bottom = new Label(" "); table.AttachAligned(2, 1, _("Bottom:"), 0.0, 0.5, _bottom, 1, false); _include = new CheckButton(_("_Include cell in table")) { Active = true }; table.Attach(_include, 0, 3, 2, 3); rectangles.SelectedRectangleChanged += (sender, args) => { SetRectangleData(args.OldSelected); GetRectangleData(args.NewSelected); }; }
public CellPropertiesFrame(RectangleSet rectangles) : base(_("Cell Properties")) { var vbox = new VBox(false, 12); Add(vbox); var table = new GimpTable(3, 2, false) {ColumnSpacing = 6, RowSpacing = 6}; vbox.Add(table); _url = new Entry(); table.AttachAligned(0, 0, _("_Link:"), 0.0, 0.5, _url, 3, false); _altText = new Entry(); table.AttachAligned(0, 1, _("Alt_ernative text:"), 0.0, 0.5, _altText, 3, false); _target = new Entry(); table.AttachAligned(0, 2, _("_Target:"), 0.0, 0.5, _target, 3, false); var hbox = new HBox(false, 12); vbox.Add(hbox); table = new GimpTable(3, 4, false) {ColumnSpacing = 6, RowSpacing = 6}; hbox.PackStart(table, false, false, 0); _left = new Label(" "); table.AttachAligned(0, 0, _("Left:"), 0.0, 0.5, _left, 1, false); _right = new Label(" "); table.AttachAligned(0, 1, _("Right:"), 0.0, 0.5, _right, 1, false); _top = new Label(" "); table.AttachAligned(2, 0, _("Top:"), 0.0, 0.5, _top, 1, false); _bottom = new Label(" "); table.AttachAligned(2, 1, _("Bottom:"), 0.0, 0.5, _bottom, 1, false); _include = new CheckButton(_("_Include cell in table")) {Active = true}; table.Attach(_include, 0, 3, 2, 3); rectangles.SelectedRectangleChanged += (sender, args) => { SetRectangleData(args.OldSelected); GetRectangleData(args.NewSelected); }; }
public Format(RectangleSet rectangles) : base(_("File Type")) { var table = new Table(2, 2, true) {RowSpacing = 6}; Add(table); _format = new ComboBox(new string[]{"gif", "jpg", "png"}); table.Attach(_format, 0, 1, 0, 1); _apply = new CheckButton(_("Apply to _whole image")); _apply.Activated += delegate {Rectangle.GlobalExtension = Extension;}; table.Attach(_apply, 0, 2, 1, 2); rectangles.SelectedRectangleChanged += (sender, args) => { if (!Apply) { args.OldSelected.Extension = Extension; Extension = args.NewSelected.Extension; } }; }