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 ParameterInformationWindow() { heading = new Gtk.Label(""); heading.Xalign = 0; heading.Wrap = false; desc = new DescriptionLabel(); count = new Gtk.Label(""); var mainBox = new HBox(false, 2); 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(heading, true, true, 0); var vBox2 = new VBox(); vBox2.BorderWidth = 3; vBox2.PackStart(mainBox, false, false, 0); vBox2.PackStart(desc, true, true, 4); Add(vBox2); EnableTransparencyControl = true; ShowAll(); }
public ParameterInformationWindow () { heading = new Gtk.Label (""); heading.Xalign = 0; heading.Wrap = false; desc = new DescriptionLabel (); count = new Gtk.Label (""); var mainBox = new HBox (false, 2); 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 (heading, true, true, 0); var vBox2 = new VBox (); vBox2.BorderWidth = 3; vBox2.PackStart (mainBox, false, false, 0); vBox2.PackStart (desc, true, true, 4); Add (vBox2); EnableTransparencyControl = true; ShowAll (); }
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; }
protected void Construct (Widget buttonWidget, Menu menu, bool showArrow) { WidgetFlags |= WidgetFlags.NoWindow; button_widget = buttonWidget; Menu = menu; toggle_button.Parent = this; toggle_button.FocusOnClick = false; toggle_button.Relief = ReliefStyle.None; toggle_button.Pressed += delegate { ShowMenu (); toggle_button.Active = true; }; toggle_button.Activated += delegate { ShowMenu (); }; box.Parent = this; if (showArrow) { box.PackStart (button_widget, true, true, 0); alignment = new Alignment (0f, 0.5f, 0f, 0f); arrow = new Arrow (ArrowType.Down, ShadowType.None); alignment.Add (arrow); box.PackStart (alignment, false, false, 5); size_widget = box; FocusChain = new Widget[] {toggle_button, box}; alignment.ShowAll (); alignment.NoShowAll = true; } else { toggle_button.Add (button_widget); size_widget = toggle_button; } ShowAll (); }
public DeclarationViewWindow() : base(WindowType.Popup) { overloads = new ArrayList (); this.AllowShrink = false; this.AllowGrow = false; headlabel = new HeaderWidget (); // headlabel.LineWrap = true; // headlabel.Xalign = 0; bodylabel = new Label (""); bodylabel.LineWrap = true; bodylabel.Xalign = 0; VBox vb = new VBox (false, 0); vb.PackStart (headlabel, true, true, 0); vb.PackStart (bodylabel, true, true, 3); left = new Arrow (ArrowType.Left, ShadowType.None); right = new Arrow (ArrowType.Right, ShadowType.None); HBox hb = new HBox (false, 0); hb.Spacing = 4; hb.PackStart (left, false, true, 0); hb.PackStart (vb, true, true, 0); hb.PackStart (right, false, true, 0); helplabel = new Label (""); helplabel.Xpad = 2; helplabel.Ypad = 2; helplabel.Xalign = 1; helplabel.UseMarkup = true; helplabel.Markup = ""; helpbox = new VBox (false, 0); helpbox.PackStart (new HSeparator (), false, true, 0); helpbox.PackStart (helplabel, false, true, 0); VBox vb2 = new VBox (false, 0); vb2.Spacing = 4; vb2.PackStart (hb, true, true, 0); vb2.PackStart (helpbox, false, true, 0); Frame frame = new Frame (); frame.Add (vb2); this.Add (frame); }
public DeclarationViewWindow() : base() { this.AllowShrink = false; this.AllowGrow = false; EnableTransparencyControl = true; headlabel = new FixedWidthWrapLabel (); headlabel.Indent = -20; headlabel.Wrap = Pango.WrapMode.WordChar; headlabel.BreakOnCamelCasing = true; headlabel.BreakOnPunctuation = true; bodylabel = new FixedWidthWrapLabel (); bodylabel.Wrap = Pango.WrapMode.WordChar; bodylabel.BreakOnCamelCasing = true; bodylabel.BreakOnPunctuation = true; VBox vb = new VBox (false, 0); vb.PackStart (headlabel, true, true, 0); vb.PackStart (bodylabel, true, true, 3); left = new Arrow (ArrowType.Left, ShadowType.None); right = new Arrow (ArrowType.Right, ShadowType.None); HBox hb = new HBox (false, 0); hb.Spacing = 4; hb.PackStart (left, false, true, 0); hb.PackStart (vb, true, true, 0); hb.PackStart (right, false, true, 0); helplabel = new Label (string.Empty); helplabel.Xalign = 1; helpbox = new VBox (false, 0); helpbox.PackStart (new HSeparator (), false, true, 0); helpbox.PackStart (helplabel, false, true, 0); helpbox.BorderWidth = 2; VBox vb2 = new VBox (false, 0); vb2.Spacing = 4; vb2.PackStart (hb, true, true, 0); vb2.PackStart (helpbox, false, true, 0); this.Add (vb2); ShowAll (); }
public OptionButton(string buttonLabel) : base(GType) { HBox hbox = new HBox(false, 0); label = new Label(buttonLabel); hbox.PackStart(label, false, false, 5); Alignment al = new Alignment(0,0,0,0); hbox.PackStart(al, true, true, 0); Arrow ba = new Arrow(ArrowType.Down, ShadowType.None); ba.Xalign = (float)1; ba.Yalign = (float).5; hbox.PackStart(ba, false, false, 5); Add(hbox); curIndex = 0; }
public MenuButton() { hbox = new HBox (); Image = new Image (); hbox.PackStart (Image, false, false, 1); Image.Show (); this.titleLabel = new Label (); this.titleLabel.Xalign = 0; hbox.PackStart (this.titleLabel, true, true, 1); this.titleLabel.Show (); this.arrow = new Arrow (ArrowType.Down, ShadowType.None); hbox.PackStart (arrow, false, false, 1); arrow.Show (); this.Add (hbox); hbox.Show (); }
public MenuButton (string label, Menu menu, ArrowType arrow_type) : base () { HBox hbox = new HBox (); this.image = new Image (); hbox.PackStart (this.image, false, false, 1); image.Show (); this.label = new Label (label); this.label.Xalign = 0; hbox.PackStart (this.label, true, true, 1); this.label.Show (); this.arrow = new Arrow (arrow_type, ShadowType.None); hbox.PackStart (arrow, false, false, 1); arrow.Show (); Menu = menu; this.Add (hbox); hbox.Show (); }
public MenusToolButton(Gtk.Menu menu, string icon) : base(null, null) // base (icon) { HBox box = new HBox(false, 0); box.BorderWidth = 2; /* Now on to the image stuff */ Gtk.Image image = new Gtk.Image(MainClass.Tools.GetIconFromStock(icon, Gtk.IconSize.SmallToolbar)); Gtk.Arrow arrow = new Gtk.Arrow(Gtk.ArrowType.Down, Gtk.ShadowType.None); /* Create a label for the button */ Label label = new Label("label_text"); /* Pack the image and label into the box */ box.PackStart(image, false, false, 3); box.PackStart(arrow, false, false, 3); image.Show(); label.Show(); this.IconWidget = box; this.menu = menu; //this.Menu = menu; this.Events = Gdk.EventMask.AllEventsMask; Child.Events = Gdk.EventMask.AllEventsMask; this.Clicked += delegate(object sender, EventArgs e) { this.menu.Popup(null, null, new Gtk.MenuPositionFunc(OnPosition), 3, Gtk.Global.CurrentEventTime); }; if (string.IsNullOrEmpty(icon)) { this.Expand = false; this.Homogeneous = false; this.IconWidget = new Gtk.Arrow(Gtk.ArrowType.Down, Gtk.ShadowType.None); } }
// base (icon) public MenusToolButton(Gtk.Menu menu, string icon) : base(null,null) { HBox box = new HBox(false, 0); box.BorderWidth = 2; /* Now on to the image stuff */ Gtk.Image image = new Gtk.Image(MainClass.Tools.GetIconFromStock(icon, Gtk.IconSize.SmallToolbar)); Gtk.Arrow arrow = new Gtk.Arrow (Gtk.ArrowType.Down, Gtk.ShadowType.None); /* Create a label for the button */ Label label = new Label ("label_text"); /* Pack the image and label into the box */ box.PackStart (image, false, false, 3); box.PackStart(arrow , false, false, 3); image.Show(); label.Show(); this.IconWidget = box; this.menu = menu; //this.Menu = menu; this.Events = Gdk.EventMask.AllEventsMask; Child.Events = Gdk.EventMask.AllEventsMask; this.Clicked+= delegate(object sender, EventArgs e) { this.menu.Popup (null, null, new Gtk.MenuPositionFunc (OnPosition), 3, Gtk.Global.CurrentEventTime); }; if (string.IsNullOrEmpty (icon)) { this.Expand = false; this.Homogeneous = false; this.IconWidget = new Gtk.Arrow (Gtk.ArrowType.Down, Gtk.ShadowType.None); } }
// Makes sure everything is in place before showing the widget public new void ShowAll() { if (Children.Length == 2) { ToggleButton = (ToggleButton) Children [0]; ToggleButton.Remove (ToggleButton.Child); } else { ToggleButton = new ToggleButton (); ToggleButton.Relief = ReliefStyle.None; ToggleButton.Clicked += ToggleView; PackStart (ToggleButton, false, false, 6); } HBox layout_horizontal = new HBox (false, 12); layout_horizontal.BorderWidth = 6; TreeIter iter; Store.GetIter (out iter, new TreePath (GetSelected ().ToString())); string text = (string) Store.GetValue (iter, 1); Gdk.Pixbuf pixbuf = (Gdk.Pixbuf) Store.GetValue (iter, 0); Label label = new Label (text.Replace (SelectedTextColor, SecondaryTextColor)); label.UseMarkup = true; Arrow arrow_down = new Arrow (ArrowType.Down, ShadowType.None); layout_horizontal.PackStart (new Image (pixbuf), false, false, 0); layout_horizontal.PackStart (label, false, false, 0); layout_horizontal.PackStart (new Label (""), true, true, 0); layout_horizontal.PackStart (arrow_down, false, false, 0); ToggleButton.Add (layout_horizontal); ReorderChild (ToggleButton, 0); TreePath path = new TreePath (Selected.ToString()); IconView.SelectPath (path); base.ShowAll (); }
void CreateWidget() { Homogeneous = false; Spacing = 1; Add (date_entry = new Entry () {WidthChars = 10, IsEditable = true}); date_entry.Changed += HandleDateEntryChanged; date_entry.Show (); var bbox = new HBox (); Widget w; bbox.Add (w = calendar_label = new Label (Catalog.GetString ("Calendar"))); w.Show (); bbox.Add (w = new Arrow (ArrowType.Down, ShadowType.Out)); w.Show (); bbox.Show (); Add (date_button = new Button (bbox)); date_button.Clicked += HandleCalendarButtonClicked; date_button.Show (); Add (time_entry = new Entry () {WidthChars = 12, IsEditable = true}); time_entry.Changed += HandleTimeEntryChanged; time_entry.Show (); Add (offset_entry = new Entry () {WidthChars = 6, IsEditable = true}); offset_entry.Changed += HandleOffsetEntryChanged; offset_entry.Show (); calendar = new Calendar (); calendar.DaySelected += HandleCalendarDaySelected; calendar.DaySelectedDoubleClick += HandleCalendarDaySelectedDoubleClick; var frame = new Frame (); frame.Add (calendar); calendar.Show (); calendar_popup = new Window (WindowType.Popup) {DestroyWithParent = true, Resizable = false}; calendar_popup.Add (frame); calendar_popup.DeleteEvent += HandlePopupDeleted; calendar_popup.KeyPressEvent += HandlePopupKeyPressed; calendar_popup.ButtonPressEvent += HandlePopupButtonPressed; frame.Show (); UpdateWidget (); }