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(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 ListComboBoxTouch(Window pSourceWindow, string pLabelText, List <string> pItemList, string pInitialValue, bool pAddUndefinedValue, bool pRequired) : base(pSourceWindow, pLabelText) { //Entry _listComboBox = new ListComboBox(pItemList, pInitialValue, pAddUndefinedValue, pRequired); _listComboBox.ComboBoxCell.FontDesc = _fontDescription; //Pack Vbox.PackStart(_listComboBox); }
public Dialog(Drawable drawable, VariableSet variables) : base("Mezzotint", drawable, variables, () => new DrawablePreview(drawable)) { var type = new GimpComboBox(GetVariable <int>("type"), new string[] { _("Fine dots"), _("Medium dots"), _("Grainy dots"), _("Coarse dots"), _("Short lines"), _("Medium lines"), _("Long lines"), _("Short strokes"), _("Medium strokes"), _("Long strokes") }); Vbox.PackStart(type, false, false, 0); }
public Dialog(Drawable drawable, VariableSet variables) : base(_("Forge"), drawable, variables, () => new AspectPreview(drawable)) { _type = GetVariable <int>("type"); var hbox = new HBox(false, 12); Vbox.PackStart(hbox); CreateTypeFrame(hbox); CreateRandomSeedEntry(hbox); CreateParametersTable(); }
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 ListRadioButtonTouch(Window pSourceWindow, string pLabelText, List <string> pItemList, string pInitialValue, bool pRequired) : base(pSourceWindow, pLabelText) { _listRadioButton = new ListRadioButton(pItemList, pInitialValue); for (int i = 0; i < _listRadioButton.RadioButtonList.Count; i++) { _listRadioButton.RadioButtonList[i].Child.ModifyFont(_fontDescription); } //Pack EventBox evbox = new EventBox(); evbox.Add(_listRadioButton); evbox.Add(Vbox); Vbox.BorderWidth = 5; Vbox.PackStart(evbox); }
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 CheckButtonBoxGroup(string pLabelText, Dictionary <string, bool> pButtonGroup) : base(pLabelText) { VBox vbox = new VBox() { BorderWidth = 5 }; EventBox eventBox = new EventBox() { BorderWidth = 2 }; int key = -1; foreach (var item in pButtonGroup) { key++; //CheckButtonExtended CheckButtonExtended checkButtonExtended = new CheckButtonExtended(item.Key) { Active = item.Value, Index = key }; checkButtonExtended.Child.ModifyFont(_fontDescription); checkButtonExtended.Clicked += checkButtonExtended_Clicked; //Pack in local Vbox vbox.PackStart(checkButtonExtended); //Add to value List _buttons.Add(checkButtonExtended); //Add checkButton to items if (item.Value) { _items.Add(key, checkButtonExtended); } } //Put in White EventBox eventBox.Add(vbox); //Pack in Base VBox Vbox.PackStart(eventBox); }
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(); }; }