private void build() { this.vbox1 = new VBox(); this.label1 = new Label("Vital Statistics"); Pango.FontDescription d = new Pango.FontDescription(); d.Weight = Pango.Weight.Bold; this.label1.ModifyFont(d); this.stWidget = new VitalWidget(this.session, "Strength", 40); this.mdWidget = new VitalWidget(this.session, "Manual Dexterity", 40); this.iqWidget = new VitalWidget(this.session, "I.Q.", 40); this.agWidget = new VitalWidget(this.session, "Agility", 40); this.cnWidget = new VitalWidget(this.session, "Constitution", 40); this.inWidget = new VitalWidget(this.session, "Intuition", 40); this.arWidget = new VitalWidget(this.session, "Agression", 40); this.chWidget = new VitalWidget(this.session, "Charisma", 40); this.vbox1.PackStart(this.label1, true, true, 0); this.vbox1.PackStart(this.stWidget, true, true, 0); this.vbox1.PackStart(this.mdWidget, true, true, 0); this.vbox1.PackStart(this.iqWidget, true, true, 0); this.vbox1.PackStart(this.agWidget, true, true, 0); this.vbox1.PackStart(this.cnWidget, true, true, 0); this.vbox1.PackStart(this.inWidget, true, true, 0); this.vbox1.PackStart(this.arWidget, true, true, 0); this.vbox1.PackStart(this.chWidget, true, true, 0); this.Add(this.vbox1); }
Widget ConstructItemsUI() { Glade.XML gui = LoadInterface("items_vbox"); if (gui == null) { return(null); } Gtk.VBox container = gui.GetWidget("items_vbox") as VBox; locked_check = gui.GetWidget("locked_check") as CheckButton; Gtk.TreeView items_list = gui.GetWidget("items_list") as TreeView; locked_check.Toggled += new EventHandler(AllLockedToggledCb); if (master != null) { master.NotifyLocked += new EventHandler(MasterLockedNotifyCb); // force update now MasterLockedNotifyCb(master, EventArgs.Empty); } // set models items_list.Model = itemsModel; // construct list views CellRendererToggle renderer = new CellRendererToggle(); renderer.Toggled += new ToggledHandler(ShowToggledCb); TreeViewColumn column = new TreeViewColumn("Visible", renderer, "active", 1); items_list.AppendColumn(column); items_list.AppendColumn("Item", new CellRendererText(), "text", 0); return(container); }
private void createGui(Gtk.Window app1, ChronopicRegisterPort crp, string labelStr) { chronopic_contacts_real_win = new Window("Chronopic connection"); chronopic_contacts_real_win.AllowGrow = false; chronopic_contacts_real_win.Modal = true; chronopic_contacts_real_win.TransientFor = app1; chronopic_contacts_real_win.BorderWidth = 20; chronopic_contacts_real_win.DeleteEvent += on_delete_event; Gtk.VBox vbox_main = new Gtk.VBox(false, 20); chronopic_contacts_real_win.Add(vbox_main); LogB.Information("Connecting real (starting connection)"); LogB.Information("Press test button on Chronopic"); Gtk.Label labelMessage = new Gtk.Label(); labelMessage.Text = labelStr + "\n" + "\n" + Catalog.GetString("Port") + ": " + crp.Port + "\n" + Catalog.GetString("Serial Number") + ": " + crp.SerialNumber; vbox_main.Add(labelMessage); progressbar = new Gtk.ProgressBar(); vbox_main.Add(progressbar); Gtk.Button button_cancel = new Gtk.Button("Cancel"); button_cancel.Clicked += new EventHandler(on_button_cancel_clicked); Gtk.HButtonBox hbox = new Gtk.HButtonBox(); hbox.Add(button_cancel); vbox_main.Add(hbox); chronopic_contacts_real_win.ShowAll(); }
public void SetMainWindow(MainWindow mw) { mainWindow = mw; centro = mainWindow.GetCentro(); GLib.Timeout.Add(1000, TimeHandler); GLib.Timeout.Add(1000, ProgressHandler); }
public DockFrame () { GtkWorkarounds.FixContainerLeak (this); dockBarTop = new DockBar (this, Gtk.PositionType.Top); dockBarBottom = new DockBar (this, Gtk.PositionType.Bottom); dockBarLeft = new DockBar (this, Gtk.PositionType.Left); dockBarRight = new DockBar (this, Gtk.PositionType.Right); container = new DockContainer (this); HBox hbox = new HBox (); hbox.PackStart (dockBarLeft, false, false, 0); hbox.PackStart (container, true, true, 0); hbox.PackStart (dockBarRight, false, false, 0); mainBox = new VBox (); mainBox.PackStart (dockBarTop, false, false, 0); mainBox.PackStart (hbox, true, true, 0); mainBox.PackStart (dockBarBottom, false, false, 0); Add (mainBox); mainBox.ShowAll (); mainBox.NoShowAll = true; CompactGuiLevel = 2; UpdateDockbarsVisibility (); DefaultVisualStyle = new DockVisualStyle (); }
void LoadGui(MonoDevelopProxy proxy, string document, string fileName) { System.Diagnostics.Trace.WriteLine("Creating AspNetEdit EditorHost"); host = new EditorHost(proxy); host.Initialise(document, fileName); System.Diagnostics.Trace.WriteLine("Created AspNetEdit EditorHost"); System.Diagnostics.Trace.WriteLine("Building AspNetEdit GUI"); Gtk.VBox outerBox = new Gtk.VBox(); geckoFrame = new Frame(); geckoFrame.Shadow = ShadowType.In; geckoFrame.Add(host.DesignerView); outerBox.PackEnd(geckoFrame, true, true, 0); Toolbar tb = BuildToolbar(); outerBox.PackStart(tb, false, false, 0); outerBox.ShowAll(); base.DesignerWidget = outerBox; //grid picks up some services from the designer host propertyGrid = new PropertyGrid(host.Services); propertyGrid.ShowAll(); base.PropertyGridWidget = propertyGrid; System.Diagnostics.Trace.WriteLine("Built AspNetEdit GUI"); }
public SdiWorkspaceWindow (DefaultWorkbench workbench, IViewContent content, Notebook tabControl, TabLabel tabLabel) : base () { this.workbench = workbench; this.tabControl = tabControl; this.content = content; this.tabLabel = tabLabel; this.tabPage = content.Control; content.WorkbenchWindow = this; content.ContentNameChanged += new EventHandler(SetTitleEvent); content.DirtyChanged += new EventHandler(SetTitleEvent); content.BeforeSave += new EventHandler(BeforeSave); content.ContentChanged += new EventHandler (OnContentChanged); ShadowType = ShadowType.None; box = new VBox (); box.PackStart (content.Control); Add (box); box.Show (); SetTitleEvent(null, null); commandHandler = new ViewCommandHandlers (this); Show (); }
public static int Main(string[] args) { Application.Init(); win = new Gtk.Window("Scribble XInput Demo"); win.DeleteEvent += new DeleteEventHandler(WindowDelete); vBox = new VBox(false, 0); win.Add(vBox); darea = new Gtk.DrawingArea(); darea.SetSizeRequest(200, 200); darea.ExtensionEvents = ExtensionMode.Cursor; vBox.PackStart(darea, true, true, 0); darea.ExposeEvent += new ExposeEventHandler(ExposeEvent); darea.ConfigureEvent += new ConfigureEventHandler(ConfigureEvent); darea.MotionNotifyEvent += new MotionNotifyEventHandler(MotionNotifyEvent); darea.ButtonPressEvent += new ButtonPressEventHandler(ButtonPressEvent); darea.Events = EventMask.ExposureMask | EventMask.LeaveNotifyMask | EventMask.ButtonPressMask | EventMask.PointerMotionMask; inputButton = new Button("Input Dialog"); vBox.PackStart(inputButton, false, false, 0); inputButton.Clicked += new EventHandler(InputButtonClicked); quitButton = new Button("Quit"); vBox.PackStart(quitButton, false, false, 0); quitButton.Clicked += new EventHandler(QuitButtonClicked); win.ShowAll(); Application.Run(); return(0); }
private void createButton() { Gtk.VBox vbox = new Gtk.VBox(); Gtk.Image image = new Gtk.Image(); addUserPhotoIfExists(image); image.HeightRequest = 150; image.Visible = true; Gtk.Label label_select = new Gtk.Label("Select !"); label_select.Visible = false; //hide this to the user until button is clicked first time Gtk.Label label_id = new Gtk.Label(personID.ToString()); label_id.Visible = false; //hide this to the user Gtk.Viewport viewport = new Gtk.Viewport(); UtilGtk.ViewportColorDefault(viewport); Gtk.Label label_name = new Gtk.Label(personName); label_name.Visible = true; label_name.Show(); viewport.Add(label_name); viewport.Show(); vbox.PackStart(image); //0 vbox.PackStart(label_id); //1 vbox.PackEnd(viewport, false, false, 1); //2 (contains label_name) vbox.Show(); button = new Button(vbox); button.WidthRequest = 150; button.HeightRequest = 170; }
public Toolbar(Gtk.HBox main_hbox, Gtk.VBox framework_vbox) { this.main_hbox = main_hbox; this.framework_vbox = framework_vbox; ToolbarStyle = ToolbarStyle.Both; BuildToolBar(); }
public void Initialize(EditSession session) { PropertyDescriptor prop = session.Property; if (!prop.PropertyType.IsEnum) { throw new ApplicationException("Flags editor does not support editing values of type " + prop.PropertyType); } Spacing = 3; propType = prop.PropertyType; property = prop.Description; if (property == null || property.Length == 0) { property = prop.Name; } // For small enums, the editor is a list of checkboxes inside a frame // For large enums (>5), use a selector dialog. values = System.Enum.GetValues(prop.PropertyType); if (values.Length < 6) { Gtk.VBox vbox = new Gtk.VBox(true, 3); flags = new Hashtable(); foreach (object value in values) { Gtk.CheckButton check = new Gtk.CheckButton(value.ToString()); check.TooltipText = value.ToString(); ulong uintVal = Convert.ToUInt64(value); flags[check] = uintVal; flags[uintVal] = check; check.Toggled += FlagToggled; vbox.PackStart(check, false, false, 0); } Gtk.Frame frame = new Gtk.Frame(); frame.Add(vbox); frame.ShowAll(); PackStart(frame, true, true, 0); } else { flagsLabel = new Gtk.Entry(); flagsLabel.IsEditable = false; flagsLabel.HasFrame = false; flagsLabel.ShowAll(); PackStart(flagsLabel, true, true, 0); Gtk.Button but = new Gtk.Button("..."); but.Clicked += OnSelectFlags; but.ShowAll(); PackStart(but, false, false, 0); } }
public AutoHideBox (DockFrame frame, DockItem item, Gtk.PositionType pos, int size) { this.position = pos; this.frame = frame; this.targetSize = size; horiz = pos == PositionType.Left || pos == PositionType.Right; startPos = pos == PositionType.Top || pos == PositionType.Left; Events = Events | Gdk.EventMask.EnterNotifyMask | Gdk.EventMask.LeaveNotifyMask; Box fr; CustomFrame cframe = new CustomFrame (); switch (pos) { case PositionType.Left: cframe.SetMargins (1, 1, 0, 1); break; case PositionType.Right: cframe.SetMargins (1, 1, 1, 0); break; case PositionType.Top: cframe.SetMargins (0, 1, 1, 1); break; case PositionType.Bottom: cframe.SetMargins (1, 0, 1, 1); break; } EventBox sepBox = new EventBox (); cframe.Add (sepBox); if (horiz) { fr = new HBox (); sepBox.Realized += delegate { sepBox.GdkWindow.Cursor = resizeCursorW; }; sepBox.WidthRequest = gripSize; } else { fr = new VBox (); sepBox.Realized += delegate { sepBox.GdkWindow.Cursor = resizeCursorH; }; sepBox.HeightRequest = gripSize; } sepBox.Events = EventMask.AllEventsMask; if (pos == PositionType.Left || pos == PositionType.Top) fr.PackEnd (cframe, false, false, 0); else fr.PackStart (cframe, false, false, 0); Add (fr); ShowAll (); Hide (); scrollable = new ScrollableContainer (); scrollable.ScrollMode = false; scrollable.Show (); if (item.Widget.Parent != null) { ((Gtk.Container)item.Widget.Parent).Remove (item.Widget); } item.Widget.Show (); scrollable.Add (item.Widget); fr.PackStart (scrollable, true, true, 0); sepBox.ButtonPressEvent += OnSizeButtonPress; sepBox.ButtonReleaseEvent += OnSizeButtonRelease; sepBox.MotionNotifyEvent += OnSizeMotion; sepBox.ExposeEvent += OnGripExpose; sepBox.EnterNotifyEvent += delegate { insideGrip = true; sepBox.QueueDraw (); }; sepBox.LeaveNotifyEvent += delegate { insideGrip = false; sepBox.QueueDraw (); }; }
/// <summary> /// Add the twitts to the box /// </summary> public void AddTwitts() { if (w4 != null) { w4.Destroy (); w4 = null; } w4 = new Gtk.Viewport (); w4.ShadowType = ((Gtk.ShadowType)(0)); scrolledwindow.Add (w4); area_status = null; scrolledwindow.Remove (area_status); // Container child GtkViewport.Gtk.Container+ContainerChild area_status = new Gtk.VBox (); area_status.Name = "area_status"; area_status.Spacing = 6; w4.Add (area_status); scrolledwindow.Add (w4); Status [] sts = ObjectCalls.GetPublicTimeline (); foreach (Status st in sts) { StatusViewItem stItem = new StatusViewItem (st); area_status.Add (stItem); if (st.StatusId != sts [sts.Length - 1].StatusId) area_status.Add (new Gtk.HSeparator ()); } }
public DockItemContainer (DockFrame frame, DockItem item) { this.item = item; mainBox = new VBox (); Add (mainBox); mainBox.ResizeMode = Gtk.ResizeMode.Queue; mainBox.Spacing = 0; ShowAll (); mainBox.PackStart (item.GetToolbar (PositionType.Top).Container, false, false, 0); HBox hbox = new HBox (); hbox.Show (); hbox.PackStart (item.GetToolbar (PositionType.Left).Container, false, false, 0); contentBox = new HBox (); contentBox.Show (); hbox.PackStart (contentBox, true, true, 0); hbox.PackStart (item.GetToolbar (PositionType.Right).Container, false, false, 0); mainBox.PackStart (hbox, true, true, 0); mainBox.PackStart (item.GetToolbar (PositionType.Bottom).Container, false, false, 0); }
public override Widget ConfigurationWidget() { VBox h = new VBox (); r = new HScale (0, 100, 1); r.ModifyBg (StateType.Selected, new Color (0xff, 0, 0)); r.Value = 80; r.ValueChanged += SettingsChanged; h.Add (r); g = new HScale (0, 100, 1); g.ModifyBg (StateType.Selected, new Color (0, 0xff, 0)); g.Value = 10; g.ValueChanged += SettingsChanged; h.Add (g); b = new HScale (0, 100, 1); b.ModifyBg (StateType.Selected, new Color (0, 0, 0xff)); b.Value = 10; b.ValueChanged += SettingsChanged; h.Add (b); c = new Curve (); c.CurveType = CurveType.Spline; c.SetRange (0, 255, 0, 255); h.Add (c); Button btn = new Button (Gtk.Stock.Refresh); btn.Clicked += delegate {UpdatePreview ();}; h.Add (btn); return h; }
public static void Main() { BusG.Init (); Application.Init (); tv = new TextView (); ScrolledWindow sw = new ScrolledWindow (); sw.Add (tv); Button btn = new Button ("Click me"); btn.Clicked += OnClick; Button btnq = new Button ("Click me (thread)"); btnq.Clicked += OnClickQuit; VBox vb = new VBox (false, 2); vb.PackStart (sw, true, true, 0); vb.PackStart (btn, false, true, 0); vb.PackStart (btnq, false, true, 0); Window win = new Window ("D-Bus#"); win.SetDefaultSize (640, 480); win.Add (vb); win.Destroyed += delegate {Application.Quit ();}; win.ShowAll (); bus = Bus.Session.GetObject<IBus> ("org.freedesktop.DBus", new ObjectPath ("/org/freedesktop/DBus")); Application.Run (); }
public WelcomePageNewsFeed(string title, string newsUrl, string id, int limit = 5, int spacing = Styles.WelcomeScreen.Pad.News.Item.MarginBottom) : base(title) { Accessible.Name = "WelcomePage.NewsFeed"; Accessible.Description = "A list of new items"; box = new VBox(false, spacing); box.Accessible.SetShouldIgnore(true); if (string.IsNullOrEmpty(newsUrl)) { throw new Exception("News feed is missing src attribute"); } if (string.IsNullOrEmpty(id)) { throw new Exception("News feed is missing id attribute"); } this.newsUrl = newsUrl; this.id = id; this.limit = limit; UpdateNews(); LoadNews(); SetContent(box); ContentAlignment.TopPadding += 10; WidthRequest = Styles.WelcomeScreen.Pad.News.Width; }
public DockToolbarFrame () { vbox = new VBox (); Add (vbox); DockToolbarPanel topPanel = new DockToolbarPanel (this, Placement.Top); DockToolbarPanel bottomPanel = new DockToolbarPanel (this, Placement.Bottom); DockToolbarPanel leftPanel = new DockToolbarPanel (this, Placement.Left); DockToolbarPanel rightPanel = new DockToolbarPanel (this, Placement.Right); panels = new DockToolbarPanel [4]; panels [(int)Placement.Top] = topPanel; panels [(int)Placement.Bottom] = bottomPanel; panels [(int)Placement.Left] = leftPanel; panels [(int)Placement.Right] = rightPanel; vbox.PackStart (topPanel, false, false, 0); HBox hbox = new HBox (); contentBox = new VBox (); hbox.PackStart (leftPanel, false, false, 0); hbox.PackStart (contentBox, true, true, 0); hbox.PackStart (rightPanel, false, false, 0); vbox.PackStart (hbox, true, true, 0); vbox.PackStart (bottomPanel, false, false, 0); this.Events = EventMask.ButtonPressMask | EventMask.ButtonReleaseMask | EventMask.PointerMotionMask; ShowAll (); }
private void build() { this.Modal = true; this.HeightRequest = 400; this.WidthRequest = 600; this.Title = "Battle Preferences"; this.IconName = Stock.Preferences; this.vb1 = new VBox(true, 1); this.sw1 = new ScrolledWindow(); this.generalExp = new Expander("General Options"); this.generalExp.Add(new Label("Print some options description here")); this.sourcesExp = new Expander("Sources"); this.generationExp = new Expander("Generation Options"); this.printExp = new Expander("Print Options"); this.reportExp = new Expander("Report Options"); this.vb1.PackStart(generalExp, false, true, 1); this.vb1.PackStart(sourcesExp, false, true, 1); this.vb1.PackStart(generationExp, false, true, 1); this.vb1.PackStart(printExp, false, true, 1); this.vb1.PackStart(reportExp, false, true, 1); this.sw1.Add(this.vb1); this.cancelBtn = new Button("Cancel"); this.applyBtn = new Button("Apply"); this.saveBtn = new Button("Save"); this.cancelBtn.Image = new Image(Stock.Cancel, Gtk.IconSize.Button); this.applyBtn.Image = new Image(Stock.Apply, Gtk.IconSize.Button); this.saveBtn.Image = new Image(Stock.Save, IconSize.Button); this.ActionArea.PackStart(cancelBtn, false, false, 1); this.ActionArea.PackStart(applyBtn, false, false, 1); this.ActionArea.PackEnd(saveBtn, false, false, 1); this.VBox.PackStart(this.sw1, true, true, 1); this.ShowAll(); }
public static void Main() { BusG.Init (); Application.Init (); btn = new Button ("Click me"); btn.Clicked += OnClick; VBox vb = new VBox (false, 2); vb.PackStart (btn, false, true, 0); Window win = new Window ("D-Bus#"); win.SetDefaultSize (640, 480); win.Add (vb); win.Destroyed += delegate {Application.Quit ();}; win.ShowAll (); bus = Bus.Session; string bus_name = "org.ndesk.gtest"; ObjectPath path = new ObjectPath ("/org/ndesk/btn"); if (bus.RequestName (bus_name) == RequestNameReply.PrimaryOwner) { bus.Register (path, btn); rbtn = btn; } else { rbtn = bus.GetObject<Button> (bus_name, path); } //run the main loop Application.Run (); }
public DateMultiSelect() { DateTime now = DateTime.Now; this.ShadowType = ShadowType.EtchedOut; this.BorderWidth = 0; MonthCombo = new ComboBox(); DayCombo = new ComboBox(); YearCombo = new ComboBox(); Calendar = new Gtk.Calendar(); TopVbox = new VBox(); ComboHbox = new HBox(); ComboHbox.Add(MonthCombo); ComboHbox.Add(DayCombo); ComboHbox.Add(YearCombo); TopVbox.Add(ComboHbox); TopVbox.Add(Calendar); this.Add(TopVbox); SetDate(DateTime.Now); MonthCombo.Changed += OnComboChanged; DayCombo.Changed += OnComboChanged; YearCombo.Changed += OnComboChanged; Calendar.DaySelected += OnCalendarChanged; ShowAll(); }
private Gtk.Widget MakeViewPage() { Gtk.VBox vbox = new Gtk.VBox(false, 0); vbox.BorderWidth = 6; textLabel = new Gtk.Label(); textLabel.Xalign = 0; textLabel.UseUnderline = false; textLabel.Justify = Gtk.Justification.Left; textLabel.Wrap = true; textLabel.Text = text; textLabel.Show(); vbox.PackStart(textLabel, true, true, 0); Gtk.HButtonBox hButtonBox = new Gtk.HButtonBox(); hButtonBox.Layout = Gtk.ButtonBoxStyle.End; deleteButton = new Gtk.Button(Gtk.Stock.Delete); deleteButton.Clicked += OnDeleteButtonClicked; deleteButton.Show(); hButtonBox.PackStart(deleteButton, false, false, 0); editButton = new Gtk.Button(Gtk.Stock.Edit); editButton.Clicked += OnEditButtonClicked; editButton.Show(); hButtonBox.PackStart(editButton, false, false, 0); hButtonBox.Show(); vbox.PackStart(hButtonBox, false, false, 0); vbox.Show(); return(vbox); }
public SparkleWindow() : base("") { BorderWidth = 0; IconName = "folder-sparkleshare"; Resizable = true; WindowPosition = WindowPosition.Center; SetDefaultSize (640, 480); Buttons = CreateButtonBox (); HBox = new HBox (false, 6); string image_path = SparkleHelpers.CombineMore (Defines.DATAROOTDIR, "sparkleshare", "pixmaps", "side-splash.png"); Image side_splash = new Image (image_path); VBox = new VBox (false, 0); Wrapper = new VBox (false, 0) { BorderWidth = 30 }; VBox.PackStart (Wrapper, true, true, 0); VBox.PackStart (Buttons, false, false, 0); HBox.PackStart (side_splash, false, false, 0); HBox.PackStart (VBox, true, true, 0); base.Add (HBox); }
private Widget CreateWidgets() { VBox vbox = new VBox(false, 0); Label l = new Label("<span size=\"large\">Base Colors</span>"); vbox.PackStart(l, false, false, 0); l.UseMarkup = true; l.Xalign = 0; vbox.PackStart(CreateColorBox("Normal", this.Style.Base(StateType.Normal))); vbox.PackStart(CreateColorBox("Active", this.Style.Base(StateType.Active))); vbox.PackStart(CreateColorBox("Prelight", this.Style.Base(StateType.Prelight))); vbox.PackStart(CreateColorBox("Selected", this.Style.Base(StateType.Selected))); vbox.PackStart(CreateColorBox("Insensitive", this.Style.Base(StateType.Insensitive))); l = new Label("<span size=\"large\">Background Colors</span>"); vbox.PackStart(l, false, false, 0); l.UseMarkup = true; l.Xalign = 0; vbox.PackStart(CreateColorBox("Normal", this.Style.Background(StateType.Normal))); vbox.PackStart(CreateColorBox("Active", this.Style.Background(StateType.Active))); vbox.PackStart(CreateColorBox("Prelight", this.Style.Background(StateType.Prelight))); vbox.PackStart(CreateColorBox("Selected", this.Style.Background(StateType.Selected))); vbox.PackStart(CreateColorBox("Insensitive", this.Style.Background(StateType.Insensitive))); l = new Label("<span size=\"large\">Foreground Colors</span>"); vbox.PackStart(l, false, false, 0); l.UseMarkup = true; l.Xalign = 0; vbox.PackStart(CreateColorBox("Normal", this.Style.Foreground(StateType.Normal))); vbox.PackStart(CreateColorBox("Active", this.Style.Foreground(StateType.Active))); vbox.PackStart(CreateColorBox("Prelight", this.Style.Foreground(StateType.Prelight))); vbox.PackStart(CreateColorBox("Selected", this.Style.Foreground(StateType.Selected))); vbox.PackStart(CreateColorBox("Insensitive", this.Style.Foreground(StateType.Insensitive))); vbox.ShowAll(); return vbox; }
private void CreateWidgets() { this.Title = APP_NAME; this.SetDefaultSize(700, 500); this.DeleteEvent += new DeleteEventHandler(OnDeleteEvent); CreateActions(); CreateToolbar(); CreateExprBar(); CreateWebView(); CreateFindbar(); CreateStatusBar(); Gtk.ScrolledWindow scroll = new Gtk.ScrolledWindow(); scroll.Add(webview); vbox = new Gtk.VBox(false, 1); vbox.PackStart(toolbar, false, false, 0); vbox.PackStart(exprbar, false, false, 0); vbox.PackStart(scroll); //vbox.PackStart (findbar, false, false, 0); vbox.PackEnd(statusbar, false, true, 0); this.Add(vbox); this.ShowAll(); }
public CanvasExample () { Gtk.Window win = new Gtk.Window ("Canvas example"); win.DeleteEvent += new DeleteEventHandler (Window_Delete); VBox vbox = new VBox (false, 0); win.Add (vbox); vbox.PackStart (new Label ("Drag - move object.\n" + "Double click - change color\n" + "Right click - delete object"), false, false, 0); canvas = new Canvas (); canvas.SetSizeRequest (width, height); canvas.SetScrollRegion (0.0, 0.0, (double) width, (double) height); vbox.PackStart (canvas, false, false, 0); HBox hbox = new HBox (false, 0); vbox.PackStart (hbox, false, false, 0); Button add_button = new Button ("Add an object"); add_button.Clicked += new EventHandler (AddObject); hbox.PackStart (add_button, false, false, 0); Button quit_button = new Button ("Quit"); quit_button.Clicked += new EventHandler (Quit); hbox.PackStart (quit_button, false, false, 0); win.ShowAll (); }
public Shell() : base("Mono Heap Profiler") { entries = new ActionEntry[] { new ActionEntry ("FileMenu", null, "_File", null, null, null), new ActionEntry ("OpenAction", Stock.Open, null, "<control>O", "Open a profile...", new EventHandler (OnOpen)), new ActionEntry ("QuitAction", Stock.Quit, null, "<control>Q", "Quit the application", delegate { Application.Quit (); }), }; DefaultSize = new Gdk.Size (700, 700); DeleteEvent += delegate { Application.Quit (); }; main_box = new VBox (false, 0); Add (main_box); shell_commands = new ActionGroup ("TestActions"); shell_commands.Add (entries); uim = new UIManager (); uim.AddWidget += delegate (object obj, AddWidgetArgs args) { args.Widget.Show (); main_box.PackStart (args.Widget, false, true, 0); }; uim.ConnectProxy += OnProxyConnect; uim.InsertActionGroup (shell_commands, 0); uim.AddUiFromResource ("shell-ui.xml"); AddAccelGroup (uim.AccelGroup); sb = new Statusbar (); main_box.PackEnd (sb, false, true, 0); pager = new ShellPager (this); main_box.PackEnd (pager, true, true, 0); }
public TrackInfoPopup() : base(Gtk.WindowType.Popup) { BorderWidth = 8; AppPaintable = true; Resizable = false; TypeHint = Gdk.WindowTypeHint.Notification; VBox box = new VBox (); box.Spacing = 4; header = new ClassicTrackInfoDisplay (); header.SetSizeRequest (320, 64); seek_slider = new ConnectedSeekSlider (SeekSliderLayout.Horizontal); seek_slider.StreamPositionLabel.FormatString = "<small>{0}</small>"; seek_slider.LeftPadding = 0; seek_slider.RightPadding = 0; box.PackStart (header, true, true, 0); box.PackStart (seek_slider, false, false, 0); Add (box); box.ShowAll (); }
public DemoApplicationWindow () : base ("Application Window") { SetDefaultSize (200, 200); vbox = new VBox (false, 0); Add (vbox); AddActions (); statusbar = new Statusbar (); UpdateStatus (); vbox.PackEnd (statusbar, false, false, 0); ScrolledWindow sw = new ScrolledWindow (); sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); sw.ShadowType = ShadowType.In; vbox.PackEnd (sw, true, true, 0); TextView textview = new TextView (); textview.Buffer.MarkSet += new MarkSetHandler (MarkSet); sw.Add (textview); textview.GrabFocus (); ShowAll (); }
void BuildLayout () { primary_vbox = new VBox (); var label = new Label ("Super duper test UI!"); label.Show (); primary_vbox.Add (label); var button_box = new HButtonBox (); button_box.Show (); primary_vbox.Add (button_box); var folder_button = new FileChooserButton ("Select import folder", FileChooserAction.SelectFolder); folder_button.FileSet += delegate { folder = folder_button.Uri; Log.Information ("Selected " + folder); }; folder_button.Show (); button_box.Add (folder_button); var import_button = new Button { Label = "Start Import" }; import_button.Activated += StartImport; import_button.Clicked += StartImport; import_button.Show (); button_box.Add (import_button); primary_vbox.Show (); Add (primary_vbox); }
public BDialog(string aName, Gtk.Window aParent, string aText) : base(aName, aParent, Gtk.DialogFlags.NoSeparator) { // setup dialog this.Modal = true; this.BorderWidth = 6; this.HasSeparator = false; this.Resizable = false; this.VBox.Spacing=12; // graphic items hbox = new Gtk.HBox(); Gtk.VBox labelBox = new VBox(); label = new Gtk.Label(); image = new Gtk.Image(); hbox.Spacing=12; hbox.BorderWidth=6; this.VBox.Add(hbox); // set-up image image.Yalign=0.0F; hbox.Add(image); // set-up label label.Yalign=0.0F; label.Xalign=0.0F; label.UseMarkup=true; label.Wrap=true; label.Markup=aText; // add to dialog labelBox.Add(label); hbox.Add(labelBox); }
// "Coming Soon: Profile, Friends, Events etc") public LastfmSourceContents () : base () { HscrollbarPolicy = PolicyType.Never; VscrollbarPolicy = PolicyType.Automatic; viewport = new Viewport (); viewport.ShadowType = ShadowType.None; main_box = new VBox (); main_box.Spacing = 6; main_box.BorderWidth = 5; main_box.ReallocateRedraws = true; // Clamp the width, preventing horizontal scrolling SizeAllocated += delegate (object o, SizeAllocatedArgs args) { // TODO '- 10' worked for Nereid, but not for Cubano; properly calculate the right width we should request main_box.WidthRequest = args.Allocation.Width - 30; }; viewport.Add (main_box); StyleSet += delegate { viewport.ModifyBg (StateType.Normal, Style.Base (StateType.Normal)); viewport.ModifyFg (StateType.Normal, Style.Text (StateType.Normal)); }; AddWithFrame (viewport); ShowAll (); }
public ConfigurationDialog (LCDService plugin) { this.plugin = plugin; Title = AddinManager.CurrentLocalizer.GetString ("LCD configuration"); BorderWidth = 5; HasSeparator = false; Resizable = false; VBox lcdproc_box = new VBox (); HBox host_box = new HBox (); host_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Hostname:")), false, false, 3); host_entry = new Entry (); host_box.PackStart (host_entry, true, true, 3); host_entry.Text = this.plugin.Host; host_entry.Changed += new EventHandler (Host_Changed); HBox port_box = new HBox (); port_box.PackStart (new Label (AddinManager.CurrentLocalizer.GetString ("Port:")), false, false, 3); port_spin = new SpinButton (1, 65535, 1); port_box.PackStart (port_spin, true, true, 3); port_spin.Value = this.plugin.Port; port_spin.Changed += new EventHandler (Port_Changed); Frame lcdproc_frame = new Frame (AddinManager.CurrentLocalizer.GetString ("LCDProc Daemon:")); lcdproc_box.PackStart (host_box); lcdproc_box.PackStart (port_box); lcdproc_frame.Add (lcdproc_box); lcdproc_frame.ShowAll (); VBox.PackStart (lcdproc_frame, false, false, 3); AddButton (Stock.Close, ResponseType.Close); }
private void build() { this.vbox1 = new VBox(); this.toolbar1 = new Toolbar(); this.aboutbtn1 = new ToolButton(Stock.About); this.aboutbtn1.Label = "About"; this.aboutbtn1.IsImportant = true; this.toolbar1.ToolbarStyle = ToolbarStyle.BothHoriz; this.toolbar1.Add(this.aboutbtn1); this.vbox1.PackStart(this.toolbar1, false, true, 0); this.treestore1 = this.populateTreeStoreFromSession(); this.scrollw1 = new ScrolledWindow(); this.hpaned1 = new HPaned(); this.treeview1 = new TreeView(this.treestore1); this.treeview1.HeadersVisible = true; this.treeview1.AppendColumn("Session", new CellRendererText(), "text", 0); this.treeview1.AppendColumn("Name", new CellRendererText(), "text", 1); this.treeview1.ExpandAll(); this.scrollw1.Add(this.treeview1); this.iconview1 = new IconView(); this.hpaned1.Add1(this.scrollw1); this.hpaned1.Add2(this.iconview1); this.hpaned1.Position = 254; this.vbox1.PackStart(this.hpaned1, true, true, 0); this.statusbar1 = new Statusbar(); this.vbox1.PackEnd(this.statusbar1, false, true, 0); this.Add(this.vbox1); this.SetSizeRequest(800,600); this.DeleteEvent += HandleDeleteEvent; }
public SetupWindow() : base("SparkleShare Setup") { SetWmclass ("SparkleShare", "SparkleShare"); IconName = "org.sparkleshare.SparkleShare"; Resizable = false; WindowPosition = WindowPosition.CenterAlways; Deletable = false; TypeHint = Gdk.WindowTypeHint.Dialog; SetSizeRequest (400, 400); DeleteEvent += delegate (object sender, DeleteEventArgs args) { args.RetVal = true; }; VBox layout_vertical = new VBox (false, 16); layout_vertical.BorderWidth = 16; this.content_area = new EventBox (); this.option_area = new EventBox (); this.buttons = CreateButtonBox (); HBox layout_actions = new HBox (false , 16); layout_actions.PackStart (this.option_area, true, true, 0); layout_actions.PackStart (this.buttons, false, false, 0); layout_vertical.PackStart (this.content_area, true, true, 0); layout_vertical.PackStart (layout_actions, false, false, 0); base.Add (layout_vertical); }
public Gtk.Button CreateButton() { Gtk.VBox vbox = new Gtk.VBox(); Gtk.Image image = new Gtk.Image(); string photoFile = Util.GetPhotoFileName(true, p.UniqueID); if(photoFile != "" && File.Exists(photoFile)) { try { Pixbuf pixbuf = new Pixbuf (photoFile); //from a file image.Pixbuf = pixbuf; image.Visible = true; } catch { LogB.Warning("catched while adding photo"); } } Gtk.Label label_id = new Gtk.Label(p.UniqueID.ToString()); label_id.Visible = false; //hide this to the user Gtk.Label label_name = new Gtk.Label(p.Name); label_name.Visible = true; vbox.PackStart(image); vbox.PackStart(label_id); vbox.PackEnd(label_name, false, false, 1); vbox.Show(); Button b = new Button(vbox); b.WidthRequest=150; return b; }
public DemoTreeStore () : base ("Card planning sheet") { VBox vbox = new VBox (false, 8); vbox.BorderWidth = 8; Add (vbox); vbox.PackStart (new Label ("Jonathan's Holiday Card Planning Sheet"), false, false, 0); ScrolledWindow sw = new ScrolledWindow (); sw.ShadowType = ShadowType.EtchedIn; sw.SetPolicy (PolicyType.Automatic, PolicyType.Automatic); vbox.PackStart (sw, true, true, 0); // create model CreateModel (); // create tree view TreeView treeView = new TreeView (store); treeView.RulesHint = true; treeView.Selection.Mode = SelectionMode.Multiple; AddColumns (treeView); sw.Add (treeView); // expand all rows after the treeview widget has been realized treeView.Realized += new EventHandler (ExpandRows); SetDefaultSize (650, 400); ShowAll (); }
public DockFrame () { shadedContainer = new ShadedContainer (); dockBarTop = new DockBar (this, Gtk.PositionType.Top); dockBarBottom = new DockBar (this, Gtk.PositionType.Bottom); dockBarLeft = new DockBar (this, Gtk.PositionType.Left); dockBarRight = new DockBar (this, Gtk.PositionType.Right); container = new DockContainer (this); HBox hbox = new HBox (); hbox.PackStart (dockBarLeft, false, false, 0); hbox.PackStart (container, true, true, 0); hbox.PackStart (dockBarRight, false, false, 0); mainBox = new VBox (); mainBox.PackStart (dockBarTop, false, false, 0); mainBox.PackStart (hbox, true, true, 0); mainBox.PackStart (dockBarBottom, false, false, 0); Add (mainBox); mainBox.ShowAll (); mainBox.NoShowAll = true; CompactGuiLevel = 2; dockBarTop.UpdateVisibility (); dockBarBottom.UpdateVisibility (); dockBarLeft.UpdateVisibility (); dockBarRight.UpdateVisibility (); }
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); }
public ComboBoxDialog() { Title = "Gtk Combo Box Dialog"; WidthRequest = 500; HeightRequest = 400; var vbox = new VBox (); this.VBox.PackStart (vbox); comboBox = new ComboBox (); vbox.PackStart (comboBox, false, false, 0); listStore = new ListStore (typeof(string), typeof(ComboBoxItem)); comboBox.Model = listStore; var cell = new CellRendererText (); comboBox.PackStart (cell, true); comboBox.AddAttribute (cell, "text", 0); AddItems (); Child.ShowAll (); Show (); }
public NodeKeyInfo(NodeKey key) : base(Gtk.WindowType.Toplevel) { this.Build (); int childNodes = key.ChildNodes != null ? key.ChildNodes.Count : 0; int values = key.ChildValues != null ? key.ChildValues.Count : 0; byte[] classnameData = key.ClassnameData != null ? key.ClassnameData : new byte[] {}; string name = key.Name != null ? key.Name : string.Empty; DateTime timestamp = key.Timestamp != null ? key.Timestamp : DateTime.MinValue; Label nameLabel = new Label("Name: " + name); Label timestampLabel = new Label("Timestamp: " + timestamp.ToLongDateString()); Label childNodesLabel = new Label("Child nodes: " + childNodes); Label valueCountLabel = new Label("Values: " + values); //Label data = new Label(BitConverter.ToString(classnameData).Replace('-', ' ')); VBox box = new VBox(); box.PackStart(nameLabel, false, false, 30); box.PackStart(timestampLabel, false, false, 30); box.PackStart(childNodesLabel, false, false, 30); box.PackStart(valueCountLabel, false, false, 30); //data.Wrap = true; //box.PackStart(data, false, false, 0); this.Add(box); this.ShowAll(); }
//this is a popup so it behaves like other splashes on Windows, i.e. doesn't show up as a second window in the taskbar. public SplashScreenForm () : base (Gtk.WindowType.Popup) { AppPaintable = true; this.Decorated = false; this.WindowPosition = WindowPosition.Center; this.TypeHint = Gdk.WindowTypeHint.Splashscreen; try { using (var stream = BrandingService.GetStream ("SplashScreen.png", true)) bitmap = new Gdk.Pixbuf (stream); } catch (Exception e) { LoggingService.LogError ("Can't load splash screen pixbuf 'SplashScreen.png'.", e); } progress = new ProgressBar(); progress.Fraction = 0.00; progress.HeightRequest = 6; vbox = new VBox(); vbox.BorderWidth = 12; label = new Gtk.Label (); label.UseMarkup = true; label.Xalign = 0; vbox.PackEnd (progress, false, true, 0); vbox.PackEnd (label, false, true, 3); this.Add (vbox); if (bitmap != null) this.Resize (bitmap.Width, bitmap.Height); }
private void Build() { global::Stetic.Gui.Initialize(this); this.Name = "Client.Forms.MicroChat"; this.Title = "Micro chat"; this.Icon = global::Gdk.Pixbuf.LoadFromResource("Client.Resources.pigeon_clip_art_hight.ico"); this.WindowPosition = Gtk.WindowPosition.Center; vbox = new VBox(); scrollback_mc = new Scrollback(); scrollback_mc.isMicro = true; scrollback_mc.Create(); this.TypeHint = Gdk.WindowTypeHint.Normal; this.DefaultHeight = 420; this.DefaultWidth = 680; scrollback_mc.Events = ((global::Gdk.EventMask)(256)); scrollback_mc.Name = "scrollback1"; this.DeleteEvent += new DeleteEventHandler(Close); vbox.Add(scrollback_mc); this.Add(vbox); if ((this.Child != null)) { this.Child.ShowAll(); } this.Hide(); }
private void createContent(int connectedCount, int unknownCount) { //create top hbox Gtk.HBox hbox = new Gtk.HBox(false, 12); Pixbuf pixbuf = new Pixbuf(null, Util.GetImagePath(false) + "image_chronopic_connect_big.png"); //hbox image Gtk.Image image = new Gtk.Image(); image.Pixbuf = pixbuf; hbox.Add(image); //hbox label Gtk.Label label = new Gtk.Label(); label.Text = writeLabel(connectedCount, unknownCount); hbox.Add(label); vbox_main.Add(hbox); //table if (connectedCount > 0) { createTable(); Gtk.VBox vboxTV = new Gtk.VBox(false, 10); vboxTV.Add(table_main); vbox_main.Add(vboxTV); } }
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 Splash() : base(Gtk.WindowType.Toplevel) { /* set background image */ Gdk.Pixbuf one = new Gdk.Pixbuf(Functions.logoFile); Gtk.VBox vbox = new Gtk.VBox(); Gtk.Image image = new Gtk.Image(one); vbox.Add(image); Label startLabel = new Label(); startLabel.Text = "CEW startet..."; vbox.Add(startLabel); this.Add(vbox); this.SetSizeRequest(500, 300); this.WindowPosition = WindowPosition.Center; this.Decorated = false; this.HasFocus = false; this.HasFrame = false; this.KeepAbove = true; this.Modal = false; this.SkipPagerHint = true; this.SkipTaskbarHint = true; this.TypeHint = Gdk.WindowTypeHint.Splashscreen; this.ShowAll(); Hourglass = true; while (Application.EventsPending()) { Application.RunIteration(); } }
public void Initialize(PropertyDescriptor prop) { if (!prop.PropertyType.IsEnum) { throw new ApplicationException("Flags editor does not support editing values of type " + prop.PropertyType); } property = prop.Label; Spacing = 3; // For small enums, the editor is a list of checkboxes inside a frame // For large enums (>5), use a selector dialog. enm = Registry.LookupEnum(prop.PropertyType.FullName); if (enm.Values.Length < 6) { Gtk.VBox vbox = new Gtk.VBox(true, 3); tips = new Gtk.Tooltips(); flags = new Hashtable(); foreach (Enum value in enm.Values) { EnumValue eval = enm[value]; if (eval.Label == "") { continue; } Gtk.CheckButton check = new Gtk.CheckButton(eval.Label); tips.SetTip(check, eval.Description, eval.Description); uint uintVal = (uint)(int)eval.Value; flags[check] = uintVal; flags[uintVal] = check; check.Toggled += FlagToggled; vbox.PackStart(check, false, false, 0); } Gtk.Frame frame = new Gtk.Frame(); frame.Add(vbox); frame.ShowAll(); PackStart(frame, true, true, 0); } else { flagsLabel = new Gtk.Entry(); flagsLabel.IsEditable = false; flagsLabel.HasFrame = false; flagsLabel.ShowAll(); PackStart(flagsLabel, true, true, 0); Gtk.Button but = new Gtk.Button("..."); but.Clicked += OnSelectFlags; but.ShowAll(); PackStart(but, false, false, 0); } }
public override bool GetPreferenceTabWidget(PreferencesDialog parent, out string tabLabel, out Gtk.Widget preferenceWidget) { Gtk.Label label; Gtk.SpinButton menuNoteCountSpinner; Gtk.Alignment align; int menuNoteCount; // Addin's tab caption tabLabel = Catalog.GetString("Advanced"); Gtk.VBox opts_list = new Gtk.VBox(false, 12); opts_list.BorderWidth = 12; opts_list.Show(); align = new Gtk.Alignment(0.5f, 0.5f, 0.0f, 1.0f); align.Show(); opts_list.PackStart(align, false, false, 0); Gtk.Table table = new Gtk.Table(1, 2, false); table.ColumnSpacing = 6; table.RowSpacing = 6; table.Show(); align.Add(table); // Menu Note Count option label = new Gtk.Label(Catalog.GetString("Minimum number of notes to show in Recent list (maximum 18)")); label.UseMarkup = true; label.Justify = Gtk.Justification.Left; label.SetAlignment(0.0f, 0.5f); label.Show(); table.Attach(label, 0, 1, 0, 1); menuNoteCount = (int)Preferences.Get(Preferences.MENU_NOTE_COUNT); // we have a hard limit of 18 set, thus not allowing anything bigger than 18 menuNoteCountSpinner = new Gtk.SpinButton(1, 18, 1); menuNoteCountSpinner.Value = menuNoteCount <= 18 ? menuNoteCount : 18; menuNoteCountSpinner.Show(); table.Attach(menuNoteCountSpinner, 1, 2, 0, 1); menuNoteCountSpinner.ValueChanged += UpdateMenuNoteCountPreference; if (opts_list != null) { preferenceWidget = opts_list; return(true); } else { preferenceWidget = null; return(false); } }
// ============================================ // PUBLIC Constructors // ============================================ /// Create New NyFolder Window public Window() : base(Info.Name + " " + Info.Version) { // Initialize Window this.SetDefaultSize(620, 320); DefaultIcon = StockIcons.GetPixbuf("NyFolderIcon"); this.DeleteEvent += new DeleteEventHandler(OnWindowDelete); // Initialize VBox this.vboxMain = new Gtk.VBox(false, 2); this.Add(this.vboxMain); // Initialize Menu Manager this.menuManager = new MenuManager(); this.menuManager.Activated += new EventHandler(OnMenuActivated); this.AddAccelGroup(this.menuManager.AccelGroup); // Initialize HBox Menu this.hboxMenu = new Gtk.HBox(false, 0); this.vboxMain.PackStart(hboxMenu, false, false, 0); // Initialize MenuBar Gtk.MenuBar menuBar = this.MenuBar; this.hboxMenu.PackStart(menuBar, false, false, 0); // Initialize HBox this.hbox = new Gtk.HBox(); this.vboxMain.PackStart(this.hbox, true, true, 2); // Initialize Left VBox this.vboxLeft = new Gtk.VBox(false, 2); this.hbox.PackStart(this.vboxLeft, false, false, 2); // Initialize User Panel this.userPanel = new UserPanel(); this.vboxLeft.PackStart(this.userPanel, false, false, 2); // Initialize Right VBox this.vboxRight = new Gtk.VBox(false, 2); this.hbox.PackStart(this.vboxRight, true, true, 2); // Initialize ToolBar Gtk.Toolbar toolBar = this.ToolBar; toolBar.ShowArrow = true; toolBar.IconSize = Gtk.IconSize.LargeToolbar; toolBar.ToolbarStyle = ToolbarStyle.Both; this.vboxRight.PackStart(toolBar, false, false, 2); // Initialize Notebook Viewer this.notebookViewer = new NotebookViewer(); this.vboxRight.PackStart(this.notebookViewer, true, true, 2); // Initialize Status Bar this.statusBar = new Gtk.Statusbar(); this.vboxMain.PackEnd(this.statusBar, false, false, 0); // Window Show All this.ShowAll(); }
private void build() { this.SetDefaultSize(1000, 600); this.vbox1 = new VBox(); this.toolbar1 = new Toolbar(); this.toolbar1.ToolbarStyle = ToolbarStyle.BothHoriz; this.newcharbutton = new ToolButton(Stock.New); this.newcharbutton.Label = "New"; this.newcharbutton.TooltipText = "New Character"; this.newcharbutton.IsImportant = true; this.newcharbutton.Clicked += HandleNewcharbuttonClicked; this.toolbar1.Add(this.newcharbutton); this.savecharbutton = new ToolButton(Stock.Save); this.savecharbutton.Label = "Save"; this.savecharbutton.TooltipText = "Save Character"; this.savecharbutton.Clicked += HandleSavecharbuttonClicked; this.toolbar1.Add(this.savecharbutton); this.printcharbutton = new ToolButton(Stock.Print); this.printcharbutton.Label = "Print"; this.printcharbutton.TooltipText = "Print Character"; this.printcharbutton.Clicked += HandlePrintcharbuttonClicked; this.toolbar1.Add(this.printcharbutton); this.toolbar1.Add(new SeparatorToolItem()); this.rollbutton = new ToolButton(Stock.Refresh); this.rollbutton.Label = "Roll"; this.rollbutton.TooltipText = "Roll Characteristics"; this.rollbutton.IsImportant = true; this.rollbutton.Clicked += HandleRollbuttonClicked; this.toolbar1.Add(this.rollbutton); this.aboutbutton = new ToolButton(Stock.About); this.aboutbutton.Label = "About"; this.aboutbutton.TooltipText = "About Adeptus"; this.aboutbutton.Clicked += HandleAboutbuttonClicked; SeparatorToolItem sti = new SeparatorToolItem(); sti.Draw = false; sti.Expand = true; this.toolbar1.Add(sti); this.toolbar1.Add(this.aboutbutton); this.frame1 = new Frame(); this.frame1.Add(new Image(Gdk.Pixbuf.LoadFromResource("Adeptus.Gui.EmperorVHorus.jpg"))); this.statusbar1 = new Statusbar(); this.statusbar1.Push(0, "Ready"); this.vbox1.PackStart(this.toolbar1, false, true, 0); this.vbox1.PackStart(this.frame1, true, true, 0); this.vbox1.PackEnd(this.statusbar1, false, true, 0); this.Add(this.vbox1); }
public testuu() : base("Main window") { Gtk.VBox vbox = new Gtk.VBox(false, 10); Add(vbox); ipentry = new HollyLibrary.HIpEntry(); ipentry.Text = "255.255.255.255"; vbox.PackStart(ipentry, false, false, 0); ShowAll(); }
/// <summary> /// Creates a Gtk.Widget that's used to configure the service. This /// will be used in the Synchronization Preferences. Preferences should /// not automatically be saved by a GConf Property Editor. Preferences /// should be saved when SaveConfiguration () is called. /// </summary> public override Gtk.Widget CreatePreferencesControl() { Gtk.VBox container = new Gtk.VBox(false, 0); container.PackStart(GtkUtil.newMarkupLabel(Catalog.GetString("<span weight='bold'>Server Settings:</span>"))); SetupGuiServerRelated(container, 4); container.PackStart(new Gtk.Label()); container.PackStart(GtkUtil.newMarkupLabel(Catalog.GetString("<span weight='bold'>Encryption Settings:</span>"))); SetupGuiEncryptionRelated(container, 4); container.ShowAll(); return(container); }
public CS_PlayListAdmin(CS_PlayListsView plsview, CS_PlayListsModel mdl, CS_PlayListCollection cl) { _col = cl; _model = mdl; Gtk.HBox hb = new Gtk.HBox(); Gtk.Button _add = new Gtk.Button(Gtk.Stock.Add); _add.Clicked += delegate(object sender, EventArgs args) { OnAddPls(); }; Gtk.Button _remove = new Gtk.Button(Gtk.Stock.Remove); _remove.Clicked += delegate(object sender, EventArgs args) { OnRemovePls(); }; hb.PackStart(_add); hb.PackStart(_remove); plsscroll = new Gtk.ScrolledWindow(); plsscroll.Add(plsview); _pls = null; _pls_name = new Gtk.Entry(); _pls_model = new CS_PlayListModel(); _pls_view = new CS_PlayListView(); _pls_view.SetModel(_pls_model); plscroll = new Gtk.ScrolledWindow(); plscroll.Add(_pls_view); _pls_view.DragEnd += delegate(object sender, DragEndArgs args) { Console.WriteLine(args); }; Gtk.VBox plsvbox = new Gtk.VBox(); plsvbox.PackStart(_pls_name, false, false, 2); plsvbox.PackEnd(plscroll); Gtk.VPaned vpn = new Gtk.VPaned(); vpn.Add1(plsscroll); vpn.Add2(plsvbox); base.PackStart(hb, false, false, 2); base.PackEnd(vpn); base.ShowAll(); mdl.SetListener(delegate(CS_PlayList pls) { _pls = pls; _pls_model.SetPlayList(_pls); _pls_name.Text = _pls.PlsName; }); }
public void ShowControlBox(Gtk.VBox labels, Gtk.VBox widgets) { Label label = new Label("Target height:"); heightscale = new HScale(minheight, maxheight, (maxheight - minheight) / 20); heightscale.Value = lastheight; heightscale.ValueChanged += new EventHandler(heightscale_ValueChanged); labels.PackEnd(label); widgets.PackEnd(heightscale); labels.ShowAll(); widgets.ShowAll(); }
private void createButtons() { Frame frame = new Frame(); frame.ShadowType = ShadowType.In; frame.LabelXalign = 0f; frame.LabelYalign = 0.5f; frame.Label = Catalog.GetString("There is a known problem on macOS:"); Gtk.Label label_macOS = new Gtk.Label( Catalog.GetString("If Chronopic is disconnected after jumps or runs execution,\nthat port will be blocked until restart of machine.")); Gtk.VBox vbox_m = new Gtk.VBox(); vbox_m.PackStart(label_macOS, false, false, 8); Gtk.HBox hbox_m = new Gtk.HBox(); hbox_m.PackStart(vbox_m, false, false, 8); if (UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX) { frame.Add(hbox_m); vbox_main.Add(frame); } FakeButtonCloseSerialPort = new Gtk.Button(); Gtk.Button button_close_serial_port = new Gtk.Button("Close serial port (debug)"); button_close_serial_port.Clicked += new EventHandler(on_button_close_serial_port_clicked); //---- button close start ---> Gtk.Button button_close = new Gtk.Button("Close Window"); button_close.CanFocus = true; button_close.IsFocus = true; button_close.Clicked += new EventHandler(on_button_close_clicked); Gtk.AccelGroup ag = new Gtk.AccelGroup(); //button can be called clicking Escape key chronopic_register_win.AddAccelGroup(ag); button_close.AddAccelerator ("activate", ag, new Gtk.AccelKey (Gdk.Key.Escape, Gdk.ModifierType.None, Gtk.AccelFlags.Visible)); //<---- button close end //add buttons to containers Gtk.HButtonBox hbox = new Gtk.HButtonBox(); //hbox.Add(button_close_serial_port); hbox.Add(button_close); vbox_main.Add(hbox); }
public void Build() { this.window = new Window("BattleNames"); this.window.SetDefaultSize(800, 600); this.window.DeleteEvent += HandleWindowDeleteEvent; this.vbox = new VBox(); { this.tbar = new Toolbar(); this.tbar.ToolbarStyle = ToolbarStyle.BothHoriz; { this.generatebutton = new ToolButton(Stock.New); this.generatebutton.TooltipText = "Generate a new battle name"; this.generatebutton.Label = "Generate"; this.generatebutton.IsImportant = true; this.generatebutton.Clicked += HandleGeneratebuttonClicked; this.clearbutton = new ToolButton(Stock.Clear); this.clearbutton.TooltipText = "Clear output"; this.clearbutton.Label = "Clear"; this.clearbutton.Clicked += HandleClearbuttonClicked; } this.tbar.Add(this.generatebutton); this.tbar.Add(this.clearbutton); this.hpaned = new HPaned(); { this.treescrolledwindow = new ScrolledWindow(); this.treeview = new TreeView(); this.treeview.AppendColumn("Name", new CellRendererText(), "text", 0); this.treeview.HeadersVisible = true; this.treeview.Model = this.treestore; this.treescrolledwindow.Add(this.treeview); this.textscrolledwindow = new ScrolledWindow(); this.textview = new TextView(); this.textview.Editable = false; this.textscrolledwindow.Add(this.textview); } this.hpaned.Pack1(this.treescrolledwindow, false, true); this.hpaned.Pack2(this.textscrolledwindow, true, true); this.hpaned.Position = 200; this.sbar = new Statusbar(); } this.vbox.PackStart(this.tbar, false, true, 0); this.vbox.PackStart(this.hpaned, true, true, 0); this.vbox.PackEnd(this.sbar, false, true, 0); this.window.Add(this.vbox); }
private Array getButtonBoxElements(Gtk.Button button) { //access the vbox Gtk.VBox box = (Gtk.VBox)button.Child; /* * LogB.Information("printing children"); * foreach(Gtk.Widget w in box.Children) * LogB.Information(w.ToString()); */ //access the members of vbox return(box.Children); }
public PaletteBackend(ApplicationBackend app) { this.app = app; box = new Gtk.VBox(false, 0); AddWithViewport(box); groups = new Hashtable(); Registry.RegistryChanged += OnRegistryChanged; ShowGroup("window", Catalog.GetString("Windows")); ShowGroup("widget", Catalog.GetString("Widgets")); ShowGroup("container", Catalog.GetString("Containers")); // ShowGroup ("toolbaritem", "Toolbar Items"); ShowGroup("actions", Catalog.GetString("Actions")); }
public static void Main(string[] args) { Application.Init(); var window = new Gtk.Window(Gtk.WindowType.Toplevel) { Title = "Treemap Example", BorderWidth = 0, //12, }; window.SetDefaultSize(640, 480); window.DeleteEvent += delegate { Gtk.Application.Quit(); }; window.Show(); var vbox = new Gtk.VBox(false, 6); window.Add(vbox); vbox.Show(); var treemap = new TreeMap.TreeMap() { Model = BuildModel(), TextColumn = 0, WeightColumn = 1, Title = "Treemap Example", }; vbox.PackStart(treemap, true, true, 0); treemap.Show(); var buttonbox = new Gtk.HButtonBox(); buttonbox.BorderWidth = 12; buttonbox.Layout = Gtk.ButtonBoxStyle.End; vbox.PackStart(buttonbox, false, true, 0); buttonbox.Show(); var close = new Gtk.Button(Gtk.Stock.Close); close.CanDefault = true; close.Clicked += delegate { Gtk.Application.Quit(); }; buttonbox.PackStart(close, false, true, 0); window.Default = close; close.Show(); Application.Run(); }
protected Tab InsertButton(int index, string label, BaseViewContent viewContent) { CheckCreateSubViewToolbar(); updating = true; var addedContent = (index == 0 || subViewToolbar.TabCount == 0) && IdeApp.Workbench.ActiveDocument == Document; var widgetBox = new Gtk.VBox(); var tab = new Tab(subViewToolbar, label) { Tag = viewContent }; if (tab.Accessible != null) { tab.Accessible.Help = viewContent.TabAccessibilityDescription; } // If this is the current displayed document we need to add the control immediately as the tab is already active. if (addedContent) { widgetBox.Add(viewContent.Control); widgetBox.Show(); } subViewToolbar.InsertTab(index, tab); subViewNotebook.InsertPage(widgetBox, new Gtk.Label(), index); tab.Activated += (sender, e) => { if (!addedContent) { widgetBox.Add(viewContent.Control); widgetBox.Show(); addedContent = true; } int page = viewContents.IndexOf((BaseViewContent)tab.Tag); SetCurrentView(page); QueueDraw(); }; EnsureToolbarBoxSeparator(); updating = false; if (index == 0) { ShowPage(0); } return(tab); }