public Window(Screen screen, string title = "", Orientation orientation = Orientation.Vertical) : base(screen, title) { Clipped = true; layout = new BoxLayout(orientation, Alignment.Fill, 10, 10); CalcBorders(); InitBorderPanels(); }
public PopupWindow(Gadget parent) : base(parent.Screen) { layout = new BoxLayout(Orientation.Vertical, Alignment.Fill); parentGadget = parent; parentWindow = parent.Window; ThinBorder = true; }
public FileGadget(Gadget parent, IFileResolver fileResolver) : base(parent) { this.fileResolver = fileResolver; layout = new BoxLayout(Orientation.Vertical, Alignment.Fill); table = new TableGadget(this) { EvenColumns = false, SelectedCellChangedEvent = (o, i) => { TableSelectedChanged(); } }; table.AddColumn("Name", -1); table.AddColumn("Size", 64); table.AddColumn("Date", 130); table.AddColumn("Comment", 140); var dirBox = new BoxGadget(this, Orientation.Horizontal, Alignment.Fill); new LabelGadget(dirBox, "Drawer") { FixedWidth = 100 }; dirName = new StrGadget(dirBox) { FixedWidth = 300 }; var fileBox = new BoxGadget(this, Orientation.Horizontal, Alignment.Fill); new LabelGadget(fileBox, "File") { FixedWidth = 100 }; fileName = new StrGadget(fileBox) { FixedWidth = 300 }; var buttonBox = new BoxGadget(this, Orientation.Horizontal, Alignment.Fill, 0, 100); butOk = new ButtonGadget(buttonBox, "Open") { GadgetUpEvent = (o, i) => { Ok(); } }; butVolumes = new ButtonGadget(buttonBox, "Volumes") { GadgetUpEvent = (o, i) => { Volumes(); } }; butParent = new ButtonGadget(buttonBox, "Parent") { GadgetUpEvent = (o, i) => { GoToParent(); } }; butCancel = new ButtonGadget(buttonBox, "Cancel") { GadgetUpEvent = (o, i) => { Cancel(); } }; }
public BoxGadget(Gadget parent, Orientation orientation, Alignment alignment = Alignment.Middle, int margin = 0, int spacing = 0) : base(parent) { layout = new BoxLayout(orientation, alignment, margin, spacing); }