public WelcomePageBarButton(string title, string href, string iconResource = null) { UpdateStyle(); VisibleWindow = false; this.Text = GettextCatalog.GetString(title); this.actionLink = href; if (!string.IsNullOrEmpty(iconResource)) { imageHover = Xwt.Drawing.Image.FromResource(iconResource); imageNormal = imageHover.WithAlpha(0.7); } IconTextSpacing = Styles.WelcomeScreen.Links.IconTextSpacing; image = new Xwt.ImageView(); label = CreateLabel(); imageWidget = image.ToGtkWidget(); box.PackStart(imageWidget, false, false, 0); if (imageNormal == null) { imageWidget.NoShowAll = true; } box.PackStart(label, false, false, 0); box.ShowAll(); Add(box); Gui.Styles.Changed += UpdateStyle; Update(); Events |= (Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.ButtonReleaseMask); }
public WelcomePageBarButton(string title, string href, string iconResource = null) { var actionHandler = new ActionDelegate(this); actionHandler.PerformPress += HandlePress; Accessible.Role = Atk.Role.Link; Accessible.SetTitle(title); if (!string.IsNullOrEmpty(href)) { Accessible.SetUrl(href); } Accessible.Description = "Opens the link in a web browser"; UpdateStyle(); VisibleWindow = false; this.Text = title; this.actionLink = href; if (!string.IsNullOrEmpty(iconResource)) { imageHover = Xwt.Drawing.Image.FromResource(iconResource); imageNormal = imageHover.WithAlpha(0.7); } box.Accessible.SetShouldIgnore(true); IconTextSpacing = Styles.WelcomeScreen.Links.IconTextSpacing; image = new Xwt.ImageView(); label = CreateLabel(); imageWidget = image.ToGtkWidget(); label.Accessible.SetShouldIgnore(true); imageWidget.Accessible.SetShouldIgnore(true); box.PackStart(imageWidget, false, false, 0); if (imageNormal == null) { imageWidget.NoShowAll = true; } box.PackStart(label, false, false, 0); box.ShowAll(); Add(box); Gui.Styles.Changed += UpdateStyle; Update(); Events |= (Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.ButtonReleaseMask); }
void FillKeyConfigs(IEnumerable <KeyConfigVM> keyConfigs) { RemoveAllChilds(keyConfigVBox); foreach (var config in keyConfigs) { HBox box; Label descLabel, keyLabel; Button edit; box = new HBox(); box.Homogeneous = false; box.Spacing = 5; descLabel = new Label(); descLabel.ModifyFg(StateType.Normal, Helpers.Misc.ToGdkColor(App.Current.Style.TextBase)); descLabel.ModifyFont(Pango.FontDescription.FromString(App.Current.Style.ContentFont)); descLabel.LabelProp = config.Description; descLabel.Justify = Justification.Left; descLabel.SetAlignment(0f, 0.5f); descLabel.WidthRequest = 300; keyLabel = new Label(); keyLabel.ModifyFont(Pango.FontDescription.FromString(App.Current.Style.ContentFont)); if (!config.Key.Defined) { keyLabel.ModifyFg(StateType.Normal, Helpers.Misc.ToGdkColor(App.Current.Style.ColorAccentError)); } else { keyLabel.ModifyFg(StateType.Normal, Helpers.Misc.ToGdkColor(App.Current.Style.TextBase)); } keyLabel.LabelProp = config.Key.ToString(); keyLabel.Justify = Justification.Left; keyLabel.SetAlignment(0f, 0.5f); keyLabel.WidthRequest = 200; edit = new Button(); //FIXME: This should use the BindingContext edit.BindManually(config.EditCommand); box.PackStart(edit, false, false, 0); box.PackStart(descLabel, false, false, 0); box.PackStart(keyLabel, false, true, 0); box.ShowAll(); keyConfigVBox.PackStart(box, false, false, 0); //FIXME: This should use a Label bind that will come with the new longomatch_fix branch config.PropertyChanged += (sender, e) => { if (e.PropertyName == "Key") { if (!config.Key.Defined) { keyLabel.ModifyFg(StateType.Normal, Helpers.Misc.ToGdkColor(App.Current.Style.ColorAccentError)); } else { keyLabel.ModifyFg(StateType.Normal, Helpers.Misc.ToGdkColor(App.Current.Style.TextBase)); } keyLabel.LabelProp = config.Key.ToString(); } }; } }
void TaskAdded(Task task) { if (taskProgBars.ContainsKey(task.TaskID)) { task.TaskID = GetAvailableTaskID(); } HBox tHBox = new HBox(); ProgressBar tProgBar = new ProgressBar(); tProgBar.Text = task.Status; tProgBar.HeightRequest = 22; tHBox.PackStart(tProgBar, true, true, 0); task.StatusChange += TaskStatusChange; task.ProgressChange += TaskProgressChange; lock (this) { taskProgBars.Add(task.TaskID, tHBox); } progBarVBox.PackEnd(tHBox, false, true, 0); tHBox.ShowAll(); }
private void BuildWidget() { box = new HBox(); entry = new FramelessEntry(this); clear_button = new HoverImageButton(IconSize.Menu, new string [] { "edit-clear", Stock.Clear }); box.PackStart(entry, true, true, 0); box.PackStart(clear_button, false, false, 0); Add(box); box.ShowAll(); entry.StyleSet += OnInnerEntryStyleSet; entry.StateChanged += OnInnerEntryStateChanged; entry.FocusInEvent += OnInnerEntryFocusEvent; entry.FocusOutEvent += OnInnerEntryFocusEvent; entry.Changed += OnInnerEntryChanged; clear_button.Image.Xpad = 2; clear_button.CanFocus = false; clear_button.ButtonReleaseEvent += OnButtonReleaseEvent; clear_button.Clicked += OnClearButtonClicked; clear_button.Visible = false; }
public Widget ResolveEditor(PropertyItem item = null) { HBox hBox = new HBox(); this.table = new Table(1u, 2u, false); this.combox = new ComboBox(); this.entry = new EntryCallBackEx(); this.combox.WidthRequest = 90; this.entry.WidthRequest = 115; this.combox.HeightRequest = 22; this.entry.HeightRequest = 22; this.table.Attach(this.combox, 0u, 1u, 0u, 1u, AttachOptions.Fill, AttachOptions.Fill, 0u, 0u); this.table.Attach(this.entry, 1u, 2u, 0u, 1u, AttachOptions.Expand | AttachOptions.Fill, AttachOptions.Fill, 0u, 0u); this.table.ShowAll(); Alignment alignment = new Alignment(0.5f, 0.5f, 1f, 1f); alignment.RightPadding = 30u; alignment.Add(this.table); alignment.ShowAll(); this.entry.Show(); hBox.Add(alignment); Box.BoxChild boxChild = hBox[alignment] as Box.BoxChild; boxChild.Position = 1; boxChild.Expand = true; boxChild.Fill = true; hBox.ShowAll(); this.SetControl(); this.table.ColumnSpacing = 10u; this.combox.Changed += new EventHandler(this.combox_Changed); this.entry.KeyReleaseEvent += new KeyReleaseEventHandler(this.entry_KeyReleaseEvent); this.entry.FocusOutEvent += new FocusOutEventHandler(this.entry_FocusOutEvent); this.ReadLanuageConfigFile(); return(hBox); }
Widget CreateInnerExceptionMessage() { var hboxMain = new HBox(); var vbox = new VBox(); var hbox = new HBox(); var icon = new ImageView(WarningIconPixbufInner); icon.Yalign = 0; hbox.PackStart(icon, false, false, 0); InnerExceptionTypeLabel = new Label(); InnerExceptionTypeLabel.UseMarkup = true; InnerExceptionTypeLabel.Xalign = 0; hbox.PackStart(InnerExceptionTypeLabel, false, true, 4); InnerExceptionMessageLabel = new Label(); InnerExceptionMessageLabel.Wrap = true; InnerExceptionMessageLabel.Xalign = 0; InnerExceptionMessageLabel.ModifyFont(Pango.FontDescription.FromString(Platform.IsWindows ? "9" : "11")); vbox.PackStart(hbox, false, true, 0); vbox.PackStart(InnerExceptionMessageLabel, true, true, 10); hboxMain.PackStart(vbox, true, true, 10); hboxMain.ShowAll(); return(hboxMain); }
private void CreatePanels(WindowShell shell) { HBox panel_container = shell.CreateWorkspace(); CreateDockAndPads(panel_container); panel_container.ShowAll(); }
/// <summary> /// Set up Dialog - Customize /// </summary> private void SetupDialog() { this.Title = Util.GS("Rename file"); this.Icon = new Gdk.Pixbuf(Util.ImagesPath("ifolder16.png")); this.HasSeparator = false; // this.BorderWidth = 10; this.SetDefaultSize(450, 100); this.Resizable = false; this.Modal = true; this.DefaultResponse = ResponseType.Ok; HBox hbox = new HBox(); Label nameLabel = new Label(Util.GS("File name:")); hbox.PackStart(nameLabel, false, false, 0); nameEntry = new Entry(); nameEntry.Changed += new EventHandler(OnNameChanged); nameEntry.ActivatesDefault = true; hbox.PackStart(nameEntry, true, true, 0); this.VBox.PackStart(hbox, true, true, 0); hbox.ShowAll(); this.AddButton(Stock.Cancel, ResponseType.Cancel); this.AddButton(Stock.Ok, ResponseType.Ok); this.SetResponseSensitive(ResponseType.Ok, false); this.DefaultResponse = ResponseType.Ok; }
private void BuildWidget() { HBox box = new HBox(); disk_bar_align = new Alignment(0.5f, 0.5f, 1.0f, 1.0f); disk_bar = new SegmentedBar(); disk_bar.ValueFormatter = DapValueFormatter; disk_bar.AddSegmentRgb(Catalog.GetString("Audio"), 0, 0x3465a4); disk_bar.AddSegmentRgb(Catalog.GetString("Video"), 0, 0x73d216); disk_bar.AddSegmentRgb(Catalog.GetString("Other"), 0, 0xf57900); disk_bar.AddSegment(Catalog.GetString("Free Space"), 0, disk_bar.RemainderColor, false); UpdateUsage(); disk_bar_align.Add(disk_bar); box.PackStart(disk_bar_align, true, true, 0); disk_bar_align.TopPadding = 6; Add(box); box.ShowAll(); SizeAllocated += delegate(object o, Gtk.SizeAllocatedArgs args) { SetBackground(); disk_bar.HorizontalPadding = (int)(args.Allocation.Width * 0.25); }; }
public ParameterInformationWindow() { desc = new Gtk.Label(""); desc.Xalign = 0; desc.Wrap = true; count = new Gtk.Label(""); mainBox = new HBox(false, 2); mainBox.BorderWidth = 3; HBox arrowHBox = new HBox(); goPrev = new Gtk.Arrow(Gtk.ArrowType.Up, ShadowType.None); arrowHBox.PackStart(goPrev, false, false, 0); arrowHBox.PackStart(count, false, false, 0); goNext = new Gtk.Arrow(Gtk.ArrowType.Down, ShadowType.None); arrowHBox.PackStart(goNext, false, false, 0); VBox vBox = new VBox(); vBox.PackStart(arrowHBox, false, false, 0); mainBox.PackStart(vBox, false, false, 0); mainBox.PackStart(desc, true, true, 0); mainBox.ShowAll(); this.Add(mainBox); EnableTransparencyControl = true; }
public WelcomePageBarButton(string title, string href, string iconResource = null) { FontFamily = Platform.IsMac ? Styles.WelcomeScreen.FontFamilyMac : Styles.WelcomeScreen.FontFamilyWindows; HoverColor = Styles.WelcomeScreen.Links.HoverColor; Color = Styles.WelcomeScreen.Links.Color; FontSize = Styles.WelcomeScreen.Links.FontSize; VisibleWindow = false; this.Text = GettextCatalog.GetString(title); this.actionLink = href; if (!string.IsNullOrEmpty(iconResource)) { imageHover = Gdk.Pixbuf.LoadFromResource(iconResource); imageNormal = ImageService.MakeTransparent(imageHover, 0.7); } HBox box = new HBox(); box.Spacing = Styles.WelcomeScreen.Links.IconTextSpacing; image = new Image(); label = new Label(); box.PackStart(image, false, false, 0); if (imageNormal == null) { image.NoShowAll = true; } box.PackStart(label, false, false, 0); box.ShowAll(); Add(box); Update(); Events |= (Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask | Gdk.EventMask.ButtonReleaseMask); }
public void Show() { field_chooser.ShowAll(); op_chooser.ShowAll(); value_box.ShowAll(); button_box.ShowAll(); }
public RatingMenuItem(object parent) : base() { HBox box = new HBox(); box.Spacing = 5; Label label = new Label(); label.Markup = String.Format("<i>{0}</i>", GLib.Markup.EscapeText(Catalog.GetString("Rating:"))); box.PackStart(label, false, false, 0); if (parent is FullScreenView) { FSpot.Utils.Log.Debug("PARENT IS FSVIEW"); FullScreenView fsview = parent as FullScreenView; entry = new Rating((int)fsview.View.Item.Current.Rating, true); } else if (MainWindow.Toplevel.Selection.Count == 1) { entry = new Rating((int)MainWindow.Toplevel.Selection[0].Rating, true); } else { entry = new Rating(-1, true); } entry.Changed += OnEntryChanged; box.PackStart(entry, false, false, 0); box.ShowAll(); Add(box); }
public static Gtk.Window Create() { HBox options = new HBox(false, 0); CheckButton check_button = null; window = new ColorSelectionDialog("Color selection dialog"); window.ColorSelection.HasOpacityControl = true; window.ColorSelection.HasPalette = true; window.SetDefaultSize(250, 200); window.ContentArea.PackStart(options, false, false, 0); window.ContentArea.BorderWidth = 10; check_button = new CheckButton("Show Opacity"); check_button.Active = true; options.PackStart(check_button, false, false, 0); check_button.Toggled += new EventHandler(Opacity_Callback); check_button = new CheckButton("Show Palette"); check_button.Active = true; options.PackEnd(check_button, false, false, 0); check_button.Toggled += new EventHandler(Palette_Callback); window.ColorSelection.ColorChanged += new EventHandler(Color_Changed); window.OkButton.Clicked += new EventHandler(Color_Selection_OK); window.CancelButton.Clicked += new EventHandler(Color_Selection_Cancel); options.ShowAll(); return(window); }
public void AddMessage(string msg, IconId icon) { if (lastImage != null) { HSeparator sep = new HSeparator(); sep.Show(); msgBox.PackStart(sep, false, false, 0); lastImage.IconSize = Gtk.IconSize.Menu; } HBox box = new HBox(); box.Spacing = 12; Alignment imgBox = new Alignment(0, 0, 0, 0); var img = new ImageView(icon, lastImage != null ? Gtk.IconSize.Menu : IconSize.Dialog); imgBox.Add(img); lastImage = img; box.PackStart(imgBox, false, false, 0); Label lab = new Label(msg); lab.UseUnderline = false; lab.Xalign = 0; lab.Yalign = 0; lab.Wrap = true; lab.WidthRequest = 500; box.PackStart(lab, true, true, 0); msgBox.PackStart(box, false, false, 0); box.ShowAll(); }
private void RefreshToolbar(HBox newToolbar) { _toolbar.Destroy(); _toolbar = newToolbar; _headerContainer.Add(_toolbar); _toolbar.ShowAll(); }
private void BuildViews() { var left = new VBox() { Spacing = 10 }; left.PackStart(new SearchHeader(), false, false, 0); left.PackStart(new Label() { Xalign = 0.0f, Xpad = 10, Markup = String.Format("<b><big>{0}</big></b>", GLib.Markup.EscapeText(Catalog.GetString("Most Recently Played"))) }, false, false, 0); left.PackStart(new RecentAlbumsView(), false, false, 0); var button = new Button(Catalog.GetString("Music Library")); button.Clicked += (o, e) => { ServiceManager.SourceManager.SetActiveSource(ServiceManager.SourceManager.MusicLibrary); ServiceManager.Get <MoblinService> ().PresentPrimaryInterface(); }; var hbox = new HBox(); hbox.PackStart(button, false, false, 0); hbox.ShowAll(); left.PackStart(hbox, false, false, 0); PackStart(left, true, true, 0); PackStart(new PlayQueueBox(), false, false, 0); ShowAll(); }
public void AddPage(Type t, Widget w) { pages [t] = w; HBox h = new HBox(false, 0); h.PackStart(new Label(t.ToString()), false, false, 0); Button b = new Button(new Image(close_image)); b.SetSizeRequest(18, 18); b.Clicked += delegate { shellnotebook.Remove(w); pages.Remove(t); if (shellnotebook.NPages == 1) { shellnotebook.ShowTabs = false; } }; h.PackStart(b, false, false, 0); h.ShowAll(); shellnotebook.Page = shellnotebook.AppendPage(w, h); if (shellnotebook.NPages > 1) { shellnotebook.ShowTabs = true; } }
/// <summary> /// Creates the panels. /// </summary> /// <param name='shell'> /// Shell. /// </param> private void CreatePanels() { HBox panelContainer = this.WindowShell.CreateLayout(); CreateDockAndPads(panelContainer); panelContainer.ShowAll(); }
public DocumentTab(Notebook docTabs) : base() { doc_tabs = docTabs; InitializeProperties (); editor = new DocumentEditor (); this.Add (editor); tab_label = new HBox (false, 2); title_label = new Label ("Untitled"); // Close tab button Button tabClose = new Button (); Image img = new Image (Stock.Close, IconSize.SmallToolbar); tabClose.Add (img); tabClose.Relief = ReliefStyle.None; tabClose.SetSizeRequest (23, 23); tabClose.Clicked += new EventHandler (OnTabClose); tab_label.PackStart (title_label, true, true, 0); tab_label.PackStart (tabClose, false, false, 2); tab_label.ShowAll (); }
private void AddTag(string tag, bool update) { HBox box; Label label; Button button; if (tagsDict.ContainsKey(tag)) { return; } box = new HBox(); label = new Label(tag); label.Justify = Justification.Left; button = new Button("gtk-delete"); button.Clicked += delegate { RemoveTag(tag); }; box.PackStart(label, true, false, 0); box.PackStart(button, false, false, 0); tagsbox.PackStart(box, false, false, 0); box.ShowAll(); tagsDict.Add(tag, box); if (update) { template.Add(tag); } }
/// <summary>Add a button to the button bar</summary> /// <param name="text">Text for button</param> /// <param name="image">Image for button</param> /// <param name="handler">Handler to call when user clicks on button</param> public void AddButton(string text, Image image, EventHandler handler) { if (ButtonsAreToolbar) { if (btnToolbar == null) { btnToolbar = new Toolbar(); btnToolbar.ToolbarStyle = ToolbarStyle.Both; buttonPanel.PackStart(btnToolbar, true, true, 0); } AddButton(CreateButton(text, image, handler, false)); } else { Button button = new Button(text); button.Image = image; button.Clicked += handler; button.BorderWidth = 5; if (image != null) { button.ImagePosition = PositionType.Top; image.Show(); } buttonPanel.PackStart(button, false, false, 0); } buttonPanel.ShowAll(); }
protected void InitializeExtraWidget() { PlaylistFormatDescription [] formats = PlaylistFileUtil.ExportFormats; int default_export_index = PlaylistFileUtil.GetFormatIndex(formats, playlist); // Build custom widget used to select the export format. store = new ListStore(typeof(string), typeof(PlaylistFormatDescription)); foreach (PlaylistFormatDescription format in formats) { store.AppendValues(format.FormatName, format); } HBox hBox = new HBox(false, 2); combobox = new ComboBox(store); CellRendererText crt = new CellRendererText(); combobox.PackStart(crt, true); combobox.SetAttributes(crt, "text", 0); combobox.Active = default_export_index; combobox.Changed += OnComboBoxChange; hBox.PackStart(new Label(Catalog.GetString("Select Format: ")), false, false, 0); hBox.PackStart(combobox, true, true, 0); combobox.ShowAll(); hBox.ShowAll(); ExtraWidget = hBox; }
public void AddMessage(string msg, string icon) { if (lastImage != null) { HSeparator sep = new HSeparator(); sep.Show(); msgBox.PackStart(sep, false, false, 0); lastImage.IconSize = (int)Gtk.IconSize.Button; } HBox box = new HBox(); box.Spacing = 12; Alignment imgBox = new Alignment(0, 0, 0, 0); Image img = new Image(icon, lastImage != null ? Gtk.IconSize.Button : IconSize.Dialog); imgBox.Add(img); lastImage = img; box.PackStart(imgBox, false, false, 0); Label lab = new Label(msg); lab.Xalign = 0; lab.Yalign = 0; lab.Wrap = true; lab.WidthRequest = 500; box.PackStart(lab, true, true, 0); msgBox.PackStart(box, false, false, 0); box.ShowAll(); }
public Widget ResolveEditor(PropertyItem item = null) { this.widget = new DefaultEditorGtk(); HBox hbox = new HBox(); Alignment alignment = new Alignment(0.5f, 0.5f, 1f, 1f); alignment.RightPadding = 30U; alignment.Add((Widget)this.widget); alignment.ShowAll(); this.widget.Show(); hbox.Add((Widget)alignment); Box.BoxChild boxChild = hbox[(Widget)alignment] as Box.BoxChild; boxChild.Position = 1; boxChild.Expand = true; boxChild.Fill = true; hbox.ShowAll(); if (item.DiaplayName == "Display_LabelFirstChar") { this.widget.MaxLength = 1; } this.SetControl(); this.widget.KeyReleaseEvent += new KeyReleaseEventHandler(this.widget_KeyReleaseEvent); this.widget.FocusOutEvent += new FocusOutEventHandler(this.widget_FocusOutEvent); return((Widget)hbox); }
void AppendFile(MediaFile file) { HBox box; Button delButton; Gtk.Image delImage; VideoFileInfo fileinfo; if (file == null) { return; } Files.Add(file); box = new HBox(); delButton = new Button(); delButton.Relief = ReliefStyle.None; delButton.CanFocus = false; delImage = new Gtk.Image("gtk-remove", IconSize.Button); delButton.Add(delImage); delButton.Clicked += (object sender, EventArgs e) => { filesbox.Remove(box); Files.Remove(file); CheckStatus(); }; fileinfo = new VideoFileInfo(); fileinfo.SetMediaFile(file); box.PackStart(fileinfo, true, true, 0); box.PackStart(delButton, false, false, 0); box.ShowAll(); filesbox.PackStart(box, false, true, 0); }
public void AddTab(ITdiTab tab, int after = -1) { if (tab.FailInitialize) { logger.Warn("Вкладка <{0}> не добавлена, так как сообщает что построена с ошибкой(Свойство FailInitialize) .", tab.TabName ); return; } HBox box = new HBox(); Label nameLable = new Label(tab.TabName); box.Add(nameLable); Image closeImage = new Image(Stock.Close, IconSize.Menu); Button closeButton = new Button(closeImage); closeButton.Relief = ReliefStyle.None; closeButton.Clicked += OnCloseButtonClicked; closeButton.ModifierStyle.Xthickness = 0; closeButton.ModifierStyle.Ythickness = 0; box.Add(closeButton); box.ShowAll(); var journalTab = tab as ITdiJournal; if (journalTab != null && ((journalTab.UseSlider == null && DefaultUseSlider) || journalTab.UseSlider.Value)) { TdiSliderTab slider = new TdiSliderTab((ITdiJournal)tab); tab = slider; } tab.CloseTab += HandleCloseTab; tab.TabNameChanged += OnTabNameChanged; _tabs.Add(new TdiTabInfo(tab, nameLable)); var vbox = new TabVBox(tab); int inserted; if (after >= 0) { inserted = this.InsertPage(vbox, box, after + 1); } else { inserted = this.AppendPage(vbox, box); } tab.TabParent = this; vbox.Show(); this.ShowTabs = true; if (TabAdded != null) { TabAdded(this, new TabAddedEventArgs(tab)); } this.CurrentPage = inserted; logger.Debug("Добавлена вкладка '{0}'", tab.TabName); //I-867 Если вкладка "заказы", if (tab is ITdiTabAddedNotifier) { //то открыть окно "контрагенты" ((ITdiTabAddedNotifier)tab).OnTabAdded(); } }
private void RefreshToolbar(HBox newToolbar) { _headerContainer.RemoveFromContainer(_toolbar); _toolbar = newToolbar; _headerContainer.Add(_toolbar); _toolbar.ShowAll(); }
// constructor that show the graphic interface to users public Graphics(Game g) : base(Gtk.WindowType.Toplevel) { Build(); int scale = 10; if (Screen.Height < 1000) { scale = 5; } this.game = g; VBox gridWrapper = new VBox(); HBox box = new HBox(); this.status = new Label(""); this.chooser = new Popup(this, this.game.getChooseableFigures(), handleChooser, scale); this.mainGrid = new GridWidget(this.game, clickHandler, scale); gridWrapper.PackStart(status, false, false, 0); gridWrapper.PackStart(this.mainGrid, false, false, 0); this.sidebarLeft = new SidebarWidget(g.getRemovedFigures(), "black", scale); box.PackStart(new HBox()); box.PackStart(this.sidebarLeft); box.PackStart(gridWrapper, false, false, 0); this.sidebarRight = new SidebarWidget(g.getRemovedFigures(), "white", scale); box.PackEnd(this.sidebarRight); box.PackStart(new HBox()); box.ShowAll(); this.Add(box); updateGui(this.game.initialState()); this.Show(); }