public Dialog(Image image, Drawable drawable, VariableSet variables) : base("Ministeck", drawable, variables, () => new DrawablePreview(drawable)) { _image = image; var table = new GimpTable(2, 2) { ColumnSpacing = 6, RowSpacing = 6 }; Vbox.PackStart(table, false, false, 0); var size = new GimpSpinButton(3, 100, 1, GetVariable <int>("size")); table.AttachAligned(0, 0, _("_Size:"), 0.0, 0.5, size, 2, true); var limit = new GimpCheckButton(_("_Limit Shapes"), GetVariable <bool>("limit")); table.Attach(limit, 2, 3, 0, 1); var colorButton = new GimpColorButton("", 16, 16, GetVariable <RGB>("color"), ColorAreaType.Flat) { Update = true }; table.AttachAligned(0, 1, _("C_olor:"), 0.0, 0.5, colorButton, 1, true); }
public Dialog(VariableSet variables) : base("JavaFX", variables) { var table = new GimpTable(4, 3) {ColumnSpacing = 6, RowSpacing = 6}; VBox.PackStart(table, false, false, 0); // Fix me: dialog is still empty }
void CreateStatusLabel(GimpTable table) { _statusLabel = new Label(_("Server stopped")); table.AttachAligned(0, 1, _("Status:"), 0.0, 0.5, _statusLabel, 2, true); }
public Dialog(VariableSet variables) : base("Splitter", variables) { var vbox = new VBox(false, 12) {BorderWidth = 12}; VBox.PackStart(vbox, true, true, 0); var table = new GimpTable(4, 2) {ColumnSpacing = 6, RowSpacing = 6}; vbox.PackStart(table, false, false, 0); var hbox = new HBox(false, 6); table.Attach(hbox, 0, 2, 0, 1); hbox.Add(new Label("f(x, y):")); hbox.Add(new GimpEntry(GetVariable<string>("formula"))); hbox.Add(new Label("= 0")); table.Attach(CreateLayerFrame("Layer 1", "translate_1_x", "translate_1_y", "rotate_1"), 0, 1, 1, 2); table.Attach(CreateLayerFrame("Layer 2", "translate_2_x", "translate_2_y", "rotate_2"), 1, 2, 1, 2); table.Attach(new GimpCheckButton(_("_Merge visible layers"), GetVariable<bool>("merge")), 0, 1, 3, 4); table.Attach(CreateAdvancedOptions(), 1, 2, 3, 4); var keep = new GimpComboBox(GetVariable<int>("keep_layer"), new string[]{_("Both Layers"), _("Layer 1"), _("Layer 2")}); table.AttachAligned(0, 5, _("Keep:"), 0.0, 0.5, keep, 1, true); }
protected PicturePackageFrame(uint rows, uint columns, string label) : base(label) { Table = new GimpTable(rows, columns) { ColumnSpacing = 6, RowSpacing = 6}; Add(Table); }
public Dialog(Drawable drawable, VariableSet variables) : base("QR", drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(4, 2) { ColumnSpacing = 6, RowSpacing = 6 }; var text = CreateText(); table.Attach(text, 0, 2, 0, 2); var encoding = CreateOutputEncoding(); table.Attach(encoding, 0, 1, 2, 3); var errorCorrection = CreateErrorCorrection(); table.Attach(errorCorrection, 1, 2, 2, 3); CreateMargin(table); Vbox.PackStart(table, false, false, 0); InvalidatePreview(); }
void CreateColorButton(GimpTable table, int row, string label, Variable<RGB> color) { var button = new GimpColorButton("", 16, 16, color, ColorAreaType.Flat) {Update = true}; table.AttachAligned(0, row, label, 0.0, 0.5, button, 1, true); }
void CreateRandomSeedWidget(GimpTable table) { var seed = GetVariable <UInt32>("seed"); var randomSeed = GetVariable <bool>("random_seed"); var seedWidget = new RandomSeed(seed, randomSeed); table.AttachAligned(0, 0, _("Random _Seed:"), 0.0, 0.5, seedWidget, 2, true); }
void CreateRandomSeedWidget(GimpTable table) { var seed = GetVariable<UInt32>("seed"); var randomSeed = GetVariable<bool>("random_seed"); var seedWidget = new RandomSeed(seed, randomSeed); table.AttachAligned(0, 0, _("Random _Seed:"), 0.0, 0.5, seedWidget, 2, true); }
void CreateColorButton(GimpTable table, int column, int row, string label, string identifier) { var color = GetVariable<RGB>(identifier); var button = new GimpColorButton("", 16, 16, color, ColorAreaType.Flat) {Update = true}; table.AttachAligned(column, row, _(label), 0.0, 0.5, button, 1, true); }
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); }; }
protected PicturePackageFrame(uint rows, uint columns, string label) : base(label) { Table = new GimpTable(rows, columns) { ColumnSpacing = 6, RowSpacing = 6 }; Add(Table); }
public Dialog(Drawable drawable, VariableSet variables) : base(_("Pointillize"), drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(1, 3); VBox.PackStart(table, false, false, 0); new ScaleEntry(table, 0, 1, _("Cell _Size:"), 150, 3, GetVariable<int>("cell_size"), 3.0, 300.0, 1.0, 8.0, 0); }
public Dialog(VariableSet variables) : base(_("Difference Clouds"), variables) { var table = new GimpTable(3, 4) {ColumnSpacing = 6, RowSpacing = 6}; VBox.PackStart(table, false, false, 0); CreateRandomSeedWidget(table); CreateTurbulenceEntry(table); }
void CreateColorButton(GimpTable table, int row, string label, Variable <RGB> color) { var button = new GimpColorButton("", 16, 16, color, ColorAreaType.Flat) { Update = true }; table.AttachAligned(0, row, label, 0.0, 0.5, button, 1, true); }
void AddSpinButton(GimpTable table, int row, int min, int max, string label, Variable <int> variable) { var spinner = new GimpSpinButton(min, max, 1, variable) { WidthChars = 4 }; table.AttachAligned(0, row, _(label), 0.0, 0.5, spinner, 1, true); }
public Dialog(VariableSet variables) : base("ShapeCollage", variables) { var table = new GimpTable(4, 3) { ColumnSpacing = 6, RowSpacing = 6 }; VBox.PackStart(table, false, false, 0); }
public Dialog(VariableSet variables) : base("JavaFX", variables) { var table = new GimpTable(4, 3) { ColumnSpacing = 6, RowSpacing = 6 }; VBox.PackStart(table, false, false, 0); // Fix me: dialog is still empty }
public Dialog(Drawable drawable, VariableSet variables) : base("Shatter", drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(4, 3, false) { ColumnSpacing = 6, RowSpacing = 6}; Vbox.PackStart(table, false, false, 0); new ScaleEntry(table, 0, 1, "Pieces:", 150, 3, GetVariable<int>("pieces"), 1.0, 256.0, 1.0, 8.0, 0); }
public Dialog(Drawable drawable, VariableSet variables) : base(_("Pointillize"), drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(1, 3); VBox.PackStart(table, false, false, 0); new ScaleEntry(table, 0, 1, _("Cell _Size:"), 150, 3, GetVariable <int>("cell_size"), 3.0, 300.0, 1.0, 8.0, 0); }
public PreferencesDialog(Variable<RGB> active, Variable<RGB> inactive) : base(_("Slice Preferences"), _("SliceTool")) { var table = new GimpTable(2, 2, false) {BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6}; VBox.PackStart(table, true, true, 0); CreateColorButton(table, 0, _("Active tile border color:"), active); CreateColorButton(table, 1, _("Inactive tile border color:"), inactive); }
void CreateColorButton(GimpTable table, int column, int row, string label, string identifier) { var color = GetVariable <RGB>(identifier); var button = new GimpColorButton("", 16, 16, color, ColorAreaType.Flat) { Update = true }; table.AttachAligned(column, row, _(label), 0.0, 0.5, button, 1, true); }
public AdvancedDialog(Variable<UInt32> seed, Variable<bool> randomSeed) : base(_("Advanced Settings"), _("Splitter")) { var table = new GimpTable(1, 2, false) { BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6}; VBox.PackStart(table, true, true, 0); var random = new RandomSeed(seed, randomSeed); table.AttachAligned(0, 0, _("Random _Seed:"), 0.0, 0.5, random, 2, true); }
public Dialog(VariableSet variables) : base(_("UpdateCheck"), variables) { var vbox = new VBox(false, 12) {BorderWidth = 12}; VBox.PackStart(vbox, true, true, 0); var table = new GimpTable(4, 3) {ColumnSpacing = 6, RowSpacing = 6}; vbox.PackStart(table, true, true, 0); table.Attach(new GimpCheckButton(_("Check _GIMP"), GetVariable<bool>("check_gimp")), 0, 1, 0, 1); table.Attach(new GimpCheckButton(_("Check G_IMP#"), GetVariable<bool>("check_gimp_sharp")), 0, 1, 1, 2); table.Attach(new GimpCheckButton(_("Check _Unstable Releases"), GetVariable<bool>("check_unstable")), 0, 1, 2, 3); var enableProxy = GetVariable<bool>("enable_proxy"); var httpProxy = GetVariable<string>("http_proxy"); var port = GetVariable<string>("port"); string tmp = Gimp.RcQuery("update-enable-proxy"); enableProxy.Value = (tmp != null || tmp == "true"); httpProxy.Value = Gimp.RcQuery("update-http-proxy") ?? ""; port.Value = Gimp.RcQuery("update-port") ?? ""; var expander = new Expander(_("Proxy settings")); var proxyBox = new VBox(false, 12); proxyBox.Add(new GimpCheckButton(_("Manual proxy configuration"), enableProxy)); var hbox = new HBox(false, 12) {Sensitive = enableProxy.Value}; proxyBox.Add(hbox); hbox.Add(new Label(_("HTTP Proxy:"))); hbox.Add(new GimpEntry(httpProxy)); hbox.Add(new Label(_("Port:"))); hbox.Add(new GimpEntry(port) {WidthChars = 4}); enableProxy.ValueChanged += delegate { hbox.Sensitive = enableProxy.Value; }; expander.Add(proxyBox); table.Attach(expander, 0, 1, 3, 4); }
void CreateStartAndStopButtons(GimpTable table) { var start = new Button(Stock.Execute); start.Clicked += delegate { StartServer(); }; table.Attach(start, 3, 4, 0, 1); var stop = new Button(Stock.Stop); stop.Clicked += delegate { StopServer(); }; table.Attach(stop, 3, 4, 1, 2); }
public Dialog(Drawable drawable, VariableSet variables) : base("Shatter", drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(4, 3, false) { ColumnSpacing = 6, RowSpacing = 6 }; Vbox.PackStart(table, false, false, 0); new ScaleEntry(table, 0, 1, "Pieces:", 150, 3, GetVariable <int>("pieces"), 1.0, 256.0, 1.0, 8.0, 0); }
public Dialog(VariableSet variables) : base(_("Difference Clouds"), variables) { var table = new GimpTable(3, 4) { ColumnSpacing = 6, RowSpacing = 6 }; VBox.PackStart(table, false, false, 0); CreateRandomSeedWidget(table); CreateTurbulenceEntry(table); }
public TableDialog(Variable<int> rows, Variable<int> columns) : base(_("Insert Table"), _("SliceTool")) { var table = new GimpTable(2, 3, false) {BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6}; VBox.PackStart(table, true, true, 0); new ScaleEntry(table, 0, 1, _("Co_lumns"), 150, 3, columns, 1.0, 16.0, 1.0, 1.0, 0); new ScaleEntry(table, 0, 2, _("_Rows"), 150, 3, rows, 1.0, 16.0, 1.0, 1.0, 0); }
public PreferencesDialog(Variable <RGB> active, Variable <RGB> inactive) : base(_("Slice Preferences"), _("SliceTool")) { var table = new GimpTable(2, 2, false) { BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6 }; VBox.PackStart(table, true, true, 0); CreateColorButton(table, 0, _("Active tile border color:"), active); CreateColorButton(table, 1, _("Inactive tile border color:"), inactive); }
void CreateTrimAwayWidget(VBox parent) { var frame = new GimpFrame(_("Trim Away")); parent.PackStart(frame, true, true, 0); var table = new GimpTable(2, 2) {ColumnSpacing = 6, RowSpacing = 6}; frame.Add(table); CreateTrimWidget(table, 0, 0, _("_Top"), "top"); CreateTrimWidget(table, 1, 0, _("_Left"), "left"); CreateTrimWidget(table, 0, 1, _("_Bottom"), "bottom"); CreateTrimWidget(table, 1, 1, _("_Right"), "right"); }
void CreateRandomEntry(VBox vbox) { var table = new GimpTable(1, 3) { ColumnSpacing = 6, RowSpacing = 6 }; vbox.Add(table); var seed = new RandomSeed(GetVariable <UInt32>("seed"), GetVariable <bool>("random_seed")); table.AttachAligned(0, 0, _("Random _Seed:"), 0.0, 0.5, seed, 2, true); }
public AdvancedDialog(Variable <UInt32> seed, Variable <bool> randomSeed) : base(_("Advanced Settings"), _("Splitter")) { var table = new GimpTable(1, 2, false) { BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6 }; VBox.PackStart(table, true, true, 0); var random = new RandomSeed(seed, randomSeed); table.AttachAligned(0, 0, _("Random _Seed:"), 0.0, 0.5, random, 2, true); }
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 Dialog(VariableSet variables) : base("WebServer", variables) { _port = GetVariable<int>("port"); var vbox = new VBox(false, 12) {BorderWidth = 12}; VBox.PackStart(vbox, true, true, 0); var table = new GimpTable(4, 4) {ColumnSpacing = 6, RowSpacing = 6}; vbox.PackStart(table, false, false, 0); CreatePort(table); CreateStatusLabel(table); CreateStartAndStopButtons(table); }
public Dialog(Image image, Drawable drawable, VariableSet variables) : base("Raindrops", drawable, variables, () => new AspectPreview(drawable)) { _image = image; var table = new GimpTable(2, 2, false) {ColumnSpacing = 6, RowSpacing = 6}; Vbox.PackStart(table, false, false, 0); CreateDropSizeEntry(table); CreateNumberEntry(table); CreateFishEyeEntry(table); // variables.ValueChanged += delegate {InvalidatePreview();}; }
GimpTable CreateFramedTable(VBox vbox, string label, uint rows, uint columns) { var frame = new GimpFrame(_(label)); vbox.Add(frame); var table = new GimpTable(rows, columns) { ColumnSpacing = 6, RowSpacing = 6 }; frame.Add(table); return(table); }
public TableDialog(Variable <int> rows, Variable <int> columns) : base(_("Insert Table"), _("SliceTool")) { var table = new GimpTable(2, 3, false) { BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6 }; VBox.PackStart(table, true, true, 0); new ScaleEntry(table, 0, 1, _("Co_lumns"), 150, 3, columns, 1.0, 16.0, 1.0, 1.0, 0); new ScaleEntry(table, 0, 2, _("_Rows"), 150, 3, rows, 1.0, 16.0, 1.0, 1.0, 0); }
public RolloverDialog() : base(_("Rollover Creator"), _("SliceTool")) { var table = new GimpTable(7, 3, false) {BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6}; VBox.PackStart(table, true, true, 0); _mouseOver = new RolloverEntry(table, _("_Mouse over"), 0); _mouseOut = new RolloverEntry(table, _("Mo_use out"), 1); _mouseClick = new RolloverEntry(table, _("Mous_e click"), 2); _mouseDoubleClick = new RolloverEntry(table, _("Mouse dou_ble click"), 3); _mouseUp = new RolloverEntry(table, _("Mouse _up"), 4); _mouseDown = new RolloverEntry(table, _("Mouse _down"), 5); var label = new Label(_("If a file is not given for the rollover, the original file will be used.")); table.Attach(label, 0, 2, 6, 7); }
void CreateTrimAwayWidget(VBox parent) { var frame = new GimpFrame(_("Trim Away")); parent.PackStart(frame, true, true, 0); var table = new GimpTable(2, 2) { ColumnSpacing = 6, RowSpacing = 6 }; frame.Add(table); CreateTrimWidget(table, 0, 0, _("_Top"), "top"); CreateTrimWidget(table, 1, 0, _("_Left"), "left"); CreateTrimWidget(table, 0, 1, _("_Bottom"), "bottom"); CreateTrimWidget(table, 1, 1, _("_Right"), "right"); }
public Dialog(Drawable drawable, VariableSet variables) : base(_("Swirlies"), drawable, variables, () => new AspectPreview(drawable)) { _progress = new ProgressBar(); Vbox.PackStart(_progress, false, false, 0); var table = new GimpTable(4, 3, false) {ColumnSpacing = 6, RowSpacing = 6}; Vbox.PackStart(table, false, false, 0); var seed = new RandomSeed(GetVariable<UInt32>("seed"), GetVariable<bool>("random_seed")); table.AttachAligned(0, 0, _("Random _Seed:"), 0.0, 0.5, seed, 2, true); new ScaleEntry(table, 0, 1, _("Po_ints:"), 150, 3, GetVariable<int>("points"), 1.0, 16.0, 1.0, 8.0, 0); }
void CreateParametersTable() { var table = new GimpTable(4, 6) { ColumnSpacing = 10, RowSpacing = 10 }; Vbox.PackEnd(table); CreateDimensionEntry(table); CreatePowerEntry(table); CreateGlaciersEntry(table); CreateIceEntry(table); CreateHourEntry(table); CreateInclinationEntry(table); CreateStarPercentageEntry(table); CreateSaturationEntry(table); }
public Dialog(Image image, Drawable drawable, VariableSet variables) : base("Raindrops", drawable, variables, () => new AspectPreview(drawable)) { _image = image; var table = new GimpTable(2, 2, false) { ColumnSpacing = 6, RowSpacing = 6 }; Vbox.PackStart(table, false, false, 0); CreateDropSizeEntry(table); CreateNumberEntry(table); CreateFishEyeEntry(table); // variables.ValueChanged += delegate {InvalidatePreview();}; }
public Dialog(VariableSet variables) : base("Splitter", variables) { var vbox = new VBox(false, 12) { BorderWidth = 12 }; VBox.PackStart(vbox, true, true, 0); var table = new GimpTable(4, 2) { ColumnSpacing = 6, RowSpacing = 6 }; vbox.PackStart(table, false, false, 0); var hbox = new HBox(false, 6); table.Attach(hbox, 0, 2, 0, 1); hbox.Add(new Label("f(x, y):")); hbox.Add(new GimpEntry(GetVariable <string>("formula"))); hbox.Add(new Label("= 0")); table.Attach(CreateLayerFrame("Layer 1", "translate_1_x", "translate_1_y", "rotate_1"), 0, 1, 1, 2); table.Attach(CreateLayerFrame("Layer 2", "translate_2_x", "translate_2_y", "rotate_2"), 1, 2, 1, 2); table.Attach(new GimpCheckButton(_("_Merge visible layers"), GetVariable <bool>("merge")), 0, 1, 3, 4); table.Attach(CreateAdvancedOptions(), 1, 2, 3, 4); var keep = new GimpComboBox(GetVariable <int>("keep_layer"), new string[] { _("Both Layers"), _("Layer 1"), _("Layer 2") }); table.AttachAligned(0, 5, _("Keep:"), 0.0, 0.5, keep, 1, true); }
GimpFrame CreateLayerFrame(string frameLabel, string translateX, string translateY, string rotate) { var frame = new GimpFrame(_(frameLabel)); var table = new GimpTable(3, 3) { BorderWidth = 12, RowSpacing = 12, ColumnSpacing = 12 }; frame.Add(table); AddSpinButton(table, 0, int.MinValue, int.MaxValue, "Translate X:", GetVariable <int>(translateX)); AddSpinButton(table, 1, int.MinValue, int.MaxValue, "Translate Y:", GetVariable <int>(translateY)); AddSpinButton(table, 2, 0, 360, "Rotate:", GetVariable <int>(rotate)); return(frame); }
public RolloverDialog() : base(_("Rollover Creator"), _("SliceTool")) { var table = new GimpTable(7, 3, false) { BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6 }; VBox.PackStart(table, true, true, 0); _mouseOver = new RolloverEntry(table, _("_Mouse over"), 0); _mouseOut = new RolloverEntry(table, _("Mo_use out"), 1); _mouseClick = new RolloverEntry(table, _("Mous_e click"), 2); _mouseDoubleClick = new RolloverEntry(table, _("Mouse dou_ble click"), 3); _mouseUp = new RolloverEntry(table, _("Mouse _up"), 4); _mouseDown = new RolloverEntry(table, _("Mouse _down"), 5); var label = new Label(_("If a file is not given for the rollover, the original file will be used.")); table.Attach(label, 0, 2, 6, 7); }
public RolloverEntry(GimpTable table, string label, uint row) : base(Catalog.GetString("Select Image"), "", false, true) { var button = new CheckButton(label); button.Clicked += delegate { bool active = button.Active; Sensitive = active; if (!active) { FileName = ""; } }; table.Attach(button, 0, 1, row, row + 1); Sensitive = false; table.Attach(this, 1, 2, row, row + 1); }
public Dialog(Drawable drawable, VariableSet variables) : base("QR", drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(4, 2) { ColumnSpacing = 6, RowSpacing = 6}; var text = CreateText(); table.Attach(text, 0, 2, 0, 2); var encoding = CreateOutputEncoding(); table.Attach(encoding, 0, 1, 2, 3); var errorCorrection = CreateErrorCorrection(); table.Attach(errorCorrection, 1, 2, 2, 3); CreateMargin(table); Vbox.PackStart(table, false, false, 0); InvalidatePreview(); }
public Dialog(Drawable drawable, VariableSet variables) : base(_("Swirlies"), drawable, variables, () => new AspectPreview(drawable)) { _progress = new ProgressBar(); Vbox.PackStart(_progress, false, false, 0); var table = new GimpTable(4, 3, false) { ColumnSpacing = 6, RowSpacing = 6 }; Vbox.PackStart(table, false, false, 0); var seed = new RandomSeed(GetVariable <UInt32>("seed"), GetVariable <bool>("random_seed")); table.AttachAligned(0, 0, _("Random _Seed:"), 0.0, 0.5, seed, 2, true); new ScaleEntry(table, 0, 1, _("Po_ints:"), 150, 3, GetVariable <int>("points"), 1.0, 16.0, 1.0, 8.0, 0); }
public Dialog(Drawable drawable, VariableSet variables) : base("ncp", drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(4, 3) { ColumnSpacing = 6, RowSpacing = 6 }; Vbox.PackStart(table, false, false, 0); var pointsVariable = GetVariable <int>("points"); var closest = GetVariable <int>("closest"); var color = GetVariable <bool>("color"); CreateRandomSeedWidget(table); CreatePointsWidget(table, pointsVariable); CreateClosestEntryWidget(table, closest, pointsVariable); CreateUseColorWidget(table, color); pointsVariable.ValueChanged += delegate { int points = pointsVariable.Value; if (points > _closestEntry.Upper) { _closestEntry.Upper = points; } if (points < closest.Value) { closest.Value = points; _closestEntry.Upper = closest.Value; _closestEntry.Value = closest.Value; } else { InvalidatePreview(); } }; closest.ValueChanged += delegate { InvalidatePreview(); }; color.ValueChanged += delegate { InvalidatePreview(); }; }
public Dialog(Image image, Drawable drawable, VariableSet variables) : base("Ministeck", drawable, variables, () => new DrawablePreview(drawable)) { _image = image; var table = new GimpTable(2, 2) {ColumnSpacing = 6, RowSpacing = 6}; Vbox.PackStart(table, false, false, 0); var size = new GimpSpinButton(3, 100, 1, GetVariable<int>("size")); table.AttachAligned(0, 0, _("_Size:"), 0.0, 0.5, size, 2, true); var limit = new GimpCheckButton(_("_Limit Shapes"), GetVariable<bool>("limit")); table.Attach(limit, 2, 3, 0, 1); var colorButton = new GimpColorButton("", 16, 16, GetVariable<RGB>("color"), ColorAreaType.Flat) {Update = true}; table.AttachAligned(0, 1, _("C_olor:"), 0.0, 0.5, colorButton, 1, true); }
public Dialog(VariableSet variables) : base("WebServer", variables) { _port = GetVariable <int>("port"); var vbox = new VBox(false, 12) { BorderWidth = 12 }; VBox.PackStart(vbox, true, true, 0); var table = new GimpTable(4, 4) { ColumnSpacing = 6, RowSpacing = 6 }; vbox.PackStart(table, false, false, 0); CreatePort(table); CreateStatusLabel(table); CreateStartAndStopButtons(table); }
public Dialog(Drawable drawable, VariableSet variables) : base("ncp", drawable, variables, () => new AspectPreview(drawable)) { var table = new GimpTable(4, 3) {ColumnSpacing = 6, RowSpacing = 6}; Vbox.PackStart(table, false, false, 0); var pointsVariable = GetVariable<int>("points"); var closest = GetVariable<int>("closest"); var color = GetVariable<bool>("color"); CreateRandomSeedWidget(table); CreatePointsWidget(table, pointsVariable); CreateClosestEntryWidget(table, closest, pointsVariable); CreateUseColorWidget(table, color); pointsVariable.ValueChanged += delegate { int points = pointsVariable.Value; if (points > _closestEntry.Upper) { _closestEntry.Upper = points; } if (points < closest.Value) { closest.Value = points; _closestEntry.Upper = closest.Value; _closestEntry.Value = closest.Value; } else { InvalidatePreview(); } }; closest.ValueChanged += delegate {InvalidatePreview();}; color.ValueChanged += delegate {InvalidatePreview();}; }
void CreateParametersTable() { var table = new GimpTable(4, 6) {ColumnSpacing = 10, RowSpacing = 10}; Vbox.PackEnd(table); CreateDimensionEntry(table); CreatePowerEntry(table); CreateGlaciersEntry(table); CreateIceEntry(table); CreateHourEntry(table); CreateInclinationEntry(table); CreateStarPercentageEntry(table); CreateSaturationEntry(table); }
public TestReportDialog(int passedNumber, int failedNumber, List<string> resultsAL) : base("UnitTest", "UnitTest", IntPtr.Zero, 0, null, "UnitTest", Stock.Ok, ResponseType.Ok) { string testReport; SetSizeRequest(700,400); var passedLabel = new Label("Passed : " + passedNumber); var failedLabel = new Label("Failed : " + failedNumber); var table = new GimpTable(2, 10, false) { BorderWidth = 12, ColumnSpacing = 6, RowSpacing = 6}; var frame = new Frame("Tests results:"); _filterEntry = new Entry(); _filterEntry.Changed += delegate { filter.Refilter(); }; var filterLabel = new Label("Assembly Search:"); var filterBox = new HBox(); filterBox.PackStart(filterLabel, false, false, 20); filterBox.PackEnd(_filterEntry, true, true, 20); var tree = new TreeView(); var assemblyColumn = new TreeViewColumn() {Title = "Assembly"}; var assemblyNameCell = new CellRendererText(); assemblyColumn.PackStart(assemblyNameCell, true); var resultColumn = new TreeViewColumn() {Title = "Result"}; var resultReportCell = new CellRendererText() {Editable = false}; resultColumn.PackStart(resultReportCell, true); tree.AppendColumn(assemblyColumn); tree.AppendColumn(resultColumn); var resultListStore = new ListStore(typeof(string), typeof(string)); foreach (string tmp in resultsAL) { int pos = tmp.IndexOf(":"); string assembly = tmp.Substring(0, pos); // +2 because of the ': ' testReport = tmp.Substring(pos + 2, tmp.Length - (pos + 2)); resultListStore.AppendValues(assembly, testReport); } assemblyColumn.SetCellDataFunc(assemblyNameCell, new TreeCellDataFunc(RenderAssembly)); resultColumn.SetCellDataFunc(resultReportCell, new TreeCellDataFunc(RenderResult)); filter = new TreeModelFilter(resultListStore, null); filter.VisibleFunc = new TreeModelFilterVisibleFunc(FilterTree); tree.Model = filter; var sw = new ScrolledWindow() {ShadowType = ShadowType.EtchedIn}; sw.SetPolicy(PolicyType.Automatic, PolicyType.Automatic); sw.Add(tree); var swBox = new HBox(); swBox.PackStart(sw, true, true, 20); table.AttachAligned(0, 0, "", 0.0, 0.5, passedLabel, 1, true); table.AttachAligned(0, 1, "", 0.0, 0.5, failedLabel, 1, true); frame.Add(table); var dummyFrameBox = new HBox(); dummyFrameBox.PackStart(frame, true, true, 20); VBox.PackStart(dummyFrameBox, false, false, 0); VBox.PackStart(swBox, true, true, 0); VBox.PackStart(filterBox, false, false , 0); }
GimpFrame CreateLayerFrame(string frameLabel, string translateX, string translateY, string rotate) { var frame = new GimpFrame(_(frameLabel)); var table = new GimpTable(3, 3) {BorderWidth = 12, RowSpacing = 12, ColumnSpacing = 12}; frame.Add(table); AddSpinButton(table, 0, int.MinValue, int.MaxValue, "Translate X:", GetVariable<int>(translateX)); AddSpinButton(table, 1, int.MinValue, int.MaxValue, "Translate Y:", GetVariable<int>(translateY)); AddSpinButton(table, 2, 0, 360, "Rotate:", GetVariable<int>(rotate)); return frame; }
void AddSpinButton(GimpTable table, int row, int min, int max, string label, Variable<int> variable) { var spinner = new GimpSpinButton(min, max, 1, variable) {WidthChars = 4}; table.AttachAligned(0, row, _(label), 0.0, 0.5, spinner, 1, true); }
void CreateTurbulenceEntry(GimpTable table) { new ScaleEntry(table, 0, 1, _("_Turbulence"), 150, 3, GetVariable<double>("turbulence"), 0.0, 7.0, 0.1, 1.0, 1); }
protected override GimpDialog CreateDialog() { gimp_ui_init("Colorize", true); var dialog = DialogNew("Colorize", "Colorize", IntPtr.Zero, 0, Gimp.StandardHelpFunc, "Colorize"); var vbox = new VBox(false, 12) {BorderWidth = 12}; dialog.VBox.PackStart(vbox, true, true, 0); var table = new GimpTable(6, 1, false) {ColumnSpacing = 6, RowSpacing = 6}; vbox.PackStart(table, true, true, 0); _combo = new DrawableComboBox(DialogMarkedConstrain, IntPtr.Zero); _combo.Connect(-1, DialogMarkedCallback, IntPtr.Zero); _combo.Active = _drawable; // _marked = combo.Active; table.Attach(_combo, 0, 1, 0, 1); var includeOriginal = new CheckButton(_("Marked images includes original image")); includeOriginal.Active = _includeOriginal; includeOriginal.Toggled += delegate { _includeOriginal = includeOriginal.Active; }; table.Attach(includeOriginal, 0, 1, 1, 2); var unselectedAreas = new CheckButton(_("Unselected areas are mask")); unselectedAreas.Active = _unselectedAreas; unselectedAreas.Toggled += delegate { _unselectedAreas = unselectedAreas.Active; }; table.Attach(unselectedAreas, 0, 1, 2, 3); var pureWhite = new CheckButton(_("Pure white is mask")); pureWhite.Active = _pureWhite; pureWhite.Toggled += delegate { _pureWhite = pureWhite.Active; }; table.Attach(pureWhite, 0, 1, 3, 4); var useChroma = new CheckButton(_("Use chroma in addition to luminance (for color images)")); useChroma.Active = _useChroma; useChroma.Toggled += delegate { _useChroma = useChroma.Active; }; table.Attach(useChroma, 0, 1, 4, 5); var useEntireImage = new CheckButton(_("Unselected areas are mask")); useEntireImage.Active = _useEntireImage; useEntireImage.Toggled += delegate { _useEntireImage = useEntireImage.Active; }; table.Attach(useEntireImage, 0, 1, 5, 6); return dialog; }