Пример #1
0
        protected void AllocEventBox(bool visibleWindow = false)
        {
            // Wraps the widget with an event box. Required for some
            // widgets such as Label which doesn't have its own gdk window

            if (!NeedsEventBox)
            {
                return;
            }

            if (eventBox == null && !EventsRootWidget.GetHasWindow())
            {
                if (EventsRootWidget is Gtk.EventBox)
                {
                    ((Gtk.EventBox)EventsRootWidget).VisibleWindow = true;
                    return;
                }
                eventBox               = new Gtk.EventBox();
                eventBox.Visible       = Widget.Visible;
                eventBox.Sensitive     = Widget.Sensitive;
                eventBox.VisibleWindow = visibleWindow;
                GtkEngine.ReplaceChild(Widget, eventBox);
                eventBox.Add(Widget);
            }
        }
Пример #2
0
 public DesignerBox()
 {
     surface = new Gtk.EventBox();
     surface.ShowAll();
     surface.VisibleWindow = false;
     surface.Parent        = this;
 }
 public DesignerBox()
 {
     surface = new Gtk.EventBox ();
     surface.ShowAll ();
     surface.VisibleWindow = false;
     surface.Parent = this;
 }
Пример #4
0
 public CheckBoxHandler()
 {
     Control = new Gtk.CheckButton();
     box     = new Gtk.EventBox {
         Child = Control
     };
 }
Пример #5
0
 public override void Initialize()
 {
     var w = new Gtk.EventBox ();
     w.VisibleWindow = false;
     Widget = w;
     Widget.Show ();
 }
Пример #6
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget CardLib.CardRow
     Stetic.BinContainer.Attach(this);
     this.HeightRequest = 108;
     this.Name = "CardLib.CardRow";
     // Container child CardLib.CardRow.Gtk.Container+ContainerChild
     this.eventbox1 = new Gtk.EventBox();
     this.eventbox1.Events = ((Gdk.EventMask)(4));
     this.eventbox1.Name = "eventbox1";
     this.eventbox1.BorderWidth = ((uint)(5));
     // Container child eventbox1.Gtk.Container+ContainerChild
     this.drawingarea1 = new Gtk.DrawingArea();
     this.drawingarea1.HeightRequest = 98;
     this.drawingarea1.Name = "drawingarea1";
     this.eventbox1.Add(this.drawingarea1);
     this.Add(this.eventbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
     this.eventbox1.MotionNotifyEvent += new Gtk.MotionNotifyEventHandler(this.OnEventbox1MotionNotifyEvent);
     this.eventbox1.LeaveNotifyEvent += new Gtk.LeaveNotifyEventHandler(this.OnEventbox1LeaveNotifyEvent);
     this.eventbox1.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnEventbox1ButtonPressEvent);
     this.drawingarea1.ExposeEvent += new Gtk.ExposeEventHandler(this.OnDrawingarea1ExposeEvent);
 }
Пример #7
0
        public ActionGroupEditor()
        {
            changedEvent = new ObjectWrapperEventHandler(OnActionChanged);

            Gtk.Fixed fx = new Gtk.Fixed();
            table               = new Gtk.Table(0, 0, false);
            table.RowSpacing    = 8;
            table.ColumnSpacing = 8;
            table.BorderWidth   = 12;

            Gtk.EventBox ebox = new Gtk.EventBox();
            ebox.ModifyBg(Gtk.StateType.Normal, this.Style.Backgrounds [0]);
            headerLabel = new EditableLabel();
            headerLabel.MarkupTemplate = "<b>$TEXT</b>";
            headerLabel.Changed       += OnGroupNameChanged;
            Gtk.VBox  vbox     = new Gtk.VBox();
            Gtk.Label grpLabel = new Gtk.Label();
            grpLabel.Xalign = 0;
            grpLabel.Markup = string.Format("<small><i>{0}</i></small>", Catalog.GetString("Action Group"));
//			vbox.PackStart (grpLabel, false, false, 0);
            vbox.PackStart(headerLabel, false, false, 3);
            vbox.BorderWidth = 12;
            ebox.Add(vbox);

            Gtk.VBox box = new Gtk.VBox();
            box.Spacing = 6;
            box.PackStart(ebox, false, false, 0);
            box.PackStart(table, false, false, 0);

            fx.Put(box, 0, 0);
            Add(fx);
            ShowAll();
        }
Пример #8
0
        public void Initialize(PropertyDescriptor prop)
        {
            if (!prop.PropertyType.IsEnum)
            {
                throw new ApplicationException("Enumeration editor does not support editing values of type " + prop.PropertyType);
            }

            ebox = new Gtk.EventBox();
            ebox.Show();
            PackStart(ebox, true, true, 0);

            combo                     = Gtk.ComboBoxEntry.NewText();
            combo.Changed            += combo_Changed;
            combo.Entry.IsEditable    = false;
            combo.Entry.HasFrame      = false;
            combo.Entry.HeightRequest = combo.SizeRequest().Height;                     // The combo does not set the entry to the correct size when it does not have a frame
            combo.Show();
            ebox.Add(combo);

            tips = new Gtk.Tooltips();

            enm = Registry.LookupEnum(prop.PropertyType.FullName);
            foreach (Enum value in enm.Values)
            {
                combo.AppendText(enm[value].Label);
            }
        }
Пример #9
0
        public ActionGroupEditor()
        {
            changedEvent = new ObjectWrapperEventHandler (OnActionChanged);

            Gtk.Fixed fx = new Gtk.Fixed ();
            table = new Gtk.Table (0, 0, false);
            table.RowSpacing = 8;
            table.ColumnSpacing = 8;
            table.BorderWidth = 12;

            Gtk.EventBox ebox = new Gtk.EventBox ();
            ebox.ModifyBg (Gtk.StateType.Normal, this.Style.Backgrounds [0]);
            headerLabel = new EditableLabel ();
            headerLabel.MarkupTemplate = "<b>$TEXT</b>";
            headerLabel.Changed += OnGroupNameChanged;
            Gtk.VBox vbox = new Gtk.VBox ();
            Gtk.Label grpLabel = new Gtk.Label ();
            grpLabel.Xalign = 0;
            grpLabel.Markup = "<small><i>Action Group</i></small>";
            //			vbox.PackStart (grpLabel, false, false, 0);
            vbox.PackStart (headerLabel, false, false, 3);
            vbox.BorderWidth = 12;
            ebox.Add (vbox);

            Gtk.VBox box = new Gtk.VBox ();
            box.Spacing = 6;
            box.PackStart (ebox, false, false, 0);
            box.PackStart (table, false, false, 0);

            fx.Put (box, 0, 0);
            Add (fx);
            ShowAll ();
        }
Пример #10
0
 public TableLayoutHandler()
 {
     align = new Gtk.Alignment(0, 0, 1.0F, 1.0F);
     box   = new Gtk.EventBox {
         Child = align
     };
 }
Пример #11
0
        //Add the shows to the table
        //Each one is stored in an eventbox
        protected void populateTable()
        {
            int curShow;

            if (isSearch)
            {
                curShow = start;
            }
            else
            {
                curShow = 0;
            }

            for (uint i = 0; i < 5; i++)
            {
                if (curShow >= shows.Count)
                {
                    break;
                }

                for (uint j = 0; j < 5; j++)
                {
                    if (curShow >= shows.Count)
                    {
                        break;
                    }

                    //show item
                    Gtk.Image img = new Gtk.Image();
                    if (shows[curShow].thumb != null)
                    {
                        img.Pixbuf = shows[curShow].thumb;
                    }

                    Gtk.Label lbl = new Gtk.Label(shows[curShow].title);
                    lbl.ModifyFont(Pango.FontDescription.FromString("12"));
                    Gtk.VBox box = new Gtk.VBox();
                    box.Add(img);
                    box.Add(lbl);
                    Gtk.EventBox eventbox = new Gtk.EventBox();
                    eventbox.Add(box);

                    //create event for clicking show
                    Func <Show, Gtk.ButtonPressEventHandler> ButtonPressWrapper = ((show) => ((s, e) => { OnShowSelected(s, e, show); }));
                    eventbox.ButtonPressEvent += ButtonPressWrapper(shows[curShow]);

                    //create hover events
                    Func <Gtk.EventBox, Gtk.EnterNotifyEventHandler> EnterNotifyWrapper = ((Gtk.EventBox eBox) => ((s, e) => { OnHoverEnter(s, e, eBox); }));
                    eventbox.EnterNotifyEvent += EnterNotifyWrapper(eventbox);

                    Func <Gtk.EventBox, Gtk.LeaveNotifyEventHandler> LeaveNotifyWrapper = ((Gtk.EventBox eBox) => ((s, e) => { OnHoverLeave(s, e, eBox); }));
                    eventbox.LeaveNotifyEvent += LeaveNotifyWrapper(eventbox);

                    table.Attach(eventbox, j, j + 1, i, i + 1);

                    curShow++;
                }
            }
        }
Пример #12
0
 public LinkButtonHandler()
 {
     Control = new Gtk.LinkButton(string.Empty);
     Control.SetAlignment(0f, .5f);
     Control.TooltipText = null;
     box       = new Gtk.EventBox();
     box.Child = Control;
 }
Пример #13
0
 public TableLayoutHandler()
 {
     align = new Gtk.Alignment(0, 0, 1.0F, 1.0F);
     box   = new Gtk.EventBox {
         Child = align
     };
     Control = new Gtk.Table(1, 1, false);
 }
Пример #14
0
        public override void Initialize()
        {
            var w = new Gtk.EventBox();

            w.VisibleWindow = false;
            Widget          = w;
            Widget.Show();
        }
Пример #15
0
 public CheckBoxHandler()
 {
     Control          = new Gtk.CheckButton();
     Control.Toggled += HandleControlToggled;
     box              = new Gtk.EventBox {
         Child = Control
     };
 }
Пример #16
0
        public NoteDialog(Gtk.Window parentWindow, ITask task)
            : base()
        {
            this.ParentWindow = parentWindow.GdkWindow;
            this.task = task;
            this.Title = String.Format(Catalog.GetString("Notes for: {0:s}"), task.Text);
            this.HasSeparator = false;
            this.SetSizeRequest(500,320);
            this.Icon = Utilities.GetIcon ("tasque", 16);
            //this.Flags = Gtk.DialogFlags.DestroyWithParent;

            sw.VscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.HscrollbarPolicy = Gtk.PolicyType.Never;

            sw.BorderWidth = 0;
            sw.CanFocus = true;
            sw.Show ();

            Gtk.EventBox innerEb = new Gtk.EventBox();
            innerEb.BorderWidth = 0;

            targetVBox = new Gtk.VBox();
            targetVBox.BorderWidth = 5;
            targetVBox.Show ();
            innerEb.Add(targetVBox);
            innerEb.Show ();

            if(task.Notes != null) {
                foreach (var note in task.Notes) {
                    NoteWidget noteWidget = new NoteWidget (note);
                    noteWidget.TextChanged += OnNoteTextChanged;
                    noteWidget.DeleteButtonClicked += OnDeleteButtonClicked;
                    noteWidget.EditCanceled += OnEditCanceled;
                    noteWidget.Show ();
                    targetVBox.PackStart (noteWidget, false, false, 0);
                }
            }

            sw.AddWithViewport(innerEb);
            sw.Show ();

            VBox.PackStart (sw, true, true, 0);

            if(task.NoteSupport == NoteSupport.Multiple) {
                addButton = new Gtk.Button(Gtk.Stock.Add);
                addButton.Show();
                this.ActionArea.PackStart(addButton);
                addButton.Clicked += OnAddButtonClicked;
            }

            AddButton (Gtk.Stock.Close, Gtk.ResponseType.Close);

            Response += delegate (object sender, Gtk.ResponseArgs args) {
                // Hide the window.  The TaskWindow watches for when the
                // dialog is hidden and will take care of the rest.
                Hide ();
            };
        }
Пример #17
0
		public DesignerBox ()
		{
			this.FixContainerLeak ();

			surface = new Gtk.EventBox ();
			surface.ShowAll ();
			surface.VisibleWindow = false;
			surface.Parent = this;
		}
Пример #18
0
        public DesignerBox()
        {
            this.FixContainerLeak();

            surface = new Gtk.EventBox();
            surface.ShowAll();
            surface.VisibleWindow = false;
            surface.Parent        = this;
        }
Пример #19
0
        public CalendarHandler()
        {
            Control = new Gtk.Calendar {
                Date = DateTime.Today
            };

            align       = new Gtk.EventBox();
            align.Child = Control;
        }
Пример #20
0
 public TableLayoutHandler()
 {
     align = new Gtk.Alignment(0, 0, 1.0F, 1.0F);
     box   = new Gtk.EventBox {
         Child = align
     };
     Spacing = TableLayout.DefaultSpacing;
     Padding = TableLayout.DefaultPadding;
 }
Пример #21
0
 public LabelHandler()
 {
     eventBox = new Gtk.EventBox();
     //eventBox.VisibleWindow = false;
     Control = new EtoLabel();
     Wrap    = WrapMode.Word;
     Control.SetAlignment(0, 0);
     eventBox.Child = Control;
 }
Пример #22
0
 public LinkButtonHandler()
 {
     Control             = new Gtk.LinkButton(string.Empty);
     Control.Xalign      = 0f;
     Control.Yalign      = .5f;
     Control.TooltipText = null;
     box       = new Gtk.EventBox();
     box.Child = Control;
 }
Пример #23
0
 void HideAddLabel()
 {
     if (emptyLabel != null)
     {
         table.Remove(emptyLabel);
         emptyLabel.ButtonPressEvent -= OnAddClicked;
     }
     emptyLabel = null;
 }
Пример #24
0
        public CalendarHandler()
        {
            Control = new Gtk.Calendar {
                Date = DateTime.Today
            };
            Control.DaySelected += HandleDaySelected;

            align       = new Gtk.EventBox();
            align.Child = Control;
        }
Пример #25
0
        public void CustomBuild()
        {
            this.vboxWindow = new Gtk.VBox ();
            this.vboxWindow.Name = "vboxWindow";

            this.evntboxTitleBar = new Gtk.EventBox ();
            this.evntboxTitleBar.Name = "evntboxTitleBar";
            this.evntboxTitleBar.Visible = false;
            this.evntboxTitleBar.ChildVisible = false;
            this.evntboxTitleBar.Sensitive = false;
            this.vboxWindow.PackStart(this.evntboxTitleBar, false, false, 0);

            this.vboxClient = new Gtk.VBox ();
            this.vboxClient.Name = "vboxClient";
            this.vboxWindow.PackStart(this.vboxClient, true, true, 0);

            this.hboxTitleBar = new Gtk.HBox ();
            this.hboxTitleBar.Name = "hboxTitleBar";
            this.evntboxTitleBar.Add (this.hboxTitleBar);

            this.labelCaption = new Gtk.Label ();
            this.labelCaption.Name = "labelCaption";
            this.labelCaption.Xalign = 0f;
            this.labelCaption.LabelProp = Mono.Unix.Catalog.GetString ("Title");
            this.labelCaption.SingleLineMode = true;
            this.hboxTitleBar.PackStart (this.labelCaption, true, true, 0);

            this.btnMinimize = new Gtk.Button ();
            this.btnMinimize.Name = "btnMinimize";
            this.btnMinimize.WidthRequest = 22;
            this.btnMinimize.HeightRequest = 22;
            this.btnMinimize.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnMinimize, false, false, 0);

            this.btnMaximize = new Gtk.Button ();
            this.btnMaximize.Name = "btnMaximize";
            this.btnMaximize.WidthRequest = 22;
            this.btnMaximize.HeightRequest = 22;
            this.btnMaximize.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnMaximize, false, false, 0);

            this.btnClose = new Gtk.Button ();
            this.btnClose.Name = "btnClose";
            this.btnClose.WidthRequest = 22;
            this.btnClose.HeightRequest = 22;
            this.btnClose.CanFocus = false;
            this.hboxTitleBar.PackStart (this.btnClose, false, false, 0);

            this.btnMinimize.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.minimizeBtnId);
            this.btnMinimize.SetAlignment(0.5f, 0.5f);
            this.btnMaximize.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.maximizeBtnId);
            this.btnMaximize.SetAlignment(0.5f, 0.5f);
            this.btnClose.Image = new Gtk.Image(Assembly.GetExecutingAssembly(), ThemeHelper.closeBtnId);
            this.btnClose.SetAlignment(0.5f, 0.5f);
        }
 public Gtk.EventBox AddLabelWidget(Gtk.Label label)
 {
     box.Remove(clear_button);
     statusLabelEventBox       = new Gtk.EventBox();
     statusLabelEventBox.Child = label;
     box.PackStart(statusLabelEventBox, false, false, 0);
     box.PackStart(clear_button, false, false, 0);
     UpdateStyle();
     box.ShowAll();
     return(statusLabelEventBox);
 }
Пример #27
0
        void SetErrorMode()
        {
            Gtk.Label lab = new Gtk.Label();
            lab.Markup = "<b>" + Catalog.GetString("The form designer could not be loaded") + "</b>";
            Gtk.EventBox box = new Gtk.EventBox();
            box.Add(lab);

            widget     = Stetic.UserInterface.CreateWidgetDesigner(box, 100, 100);
            rootWidget = null;

            OnRootWidgetChanged();
        }
Пример #28
0
 public LabelHandler()
 {
     eventBox = new Gtk.EventBox();
     eventBox.VisibleWindow = false;
     Control = new EtoLabel {
         SingleLineMode = false,
         LineWrap       = true,
         LineWrapMode   = Pango.WrapMode.Word
     };
     Control.SetAlignment(0, 0);
     eventBox.Child = (Gtk.Label)Control;
 }
        //Add the seasons to the table
        //Each one is stored in an eventbox
        protected void populateTable()
        {
            int curSeason = start;

            for (uint i = 0; i < 5; i++)
            {
                if (curSeason >= show.numOfSeasons)
                {
                    break;
                }

                for (uint j = 0; j < 5; j++)
                {
                    if (curSeason >= show.numOfSeasons)
                    {
                        break;
                    }

                    //season item
                    Gtk.Image img = new Gtk.Image();
                    if (show.thumb != null)
                    {
                        img.Pixbuf = show.thumb;
                    }

                    Gtk.Label lbl = new Gtk.Label("Season " + (curSeason + 1).ToString());
                    lbl.ModifyFont(Pango.FontDescription.FromString("12"));

                    Gtk.VBox box = new Gtk.VBox();
                    box.Add(img);
                    box.Add(lbl);
                    Gtk.EventBox eventbox = new Gtk.EventBox();
                    eventbox.Add(box);

                    //create event for clicking season
                    Func <int, Gtk.ButtonPressEventHandler> ButtonPressWrapper = ((season) => ((s, e) => { OnSeasonSelected(s, e, season); }));
                    eventbox.ButtonPressEvent += ButtonPressWrapper(curSeason);

                    //create hover events
                    Func <Gtk.EventBox, Gtk.EnterNotifyEventHandler> EnterNotifyWrapper = ((Gtk.EventBox eBox) => ((s, e) => { OnHoverEnter(s, e, eBox); }));
                    eventbox.EnterNotifyEvent += EnterNotifyWrapper(eventbox);

                    Func <Gtk.EventBox, Gtk.LeaveNotifyEventHandler> LeaveNotifyWrapper = ((Gtk.EventBox eBox) => ((s, e) => { OnHoverLeave(s, e, eBox); }));
                    eventbox.LeaveNotifyEvent += LeaveNotifyWrapper(eventbox);

                    table.Attach(eventbox, j, j + 1, i, i + 1);

                    curSeason++;
                }
            }
        }
        //Add the seasons to the table
        //Each one is stored in an eventbox
        protected void populateTable()
        {
            int curEpisode = start;

            for (uint i = 0; i < 5; i++)
            {
                if (curEpisode >= season.episodes.Count)
                {
                    break;
                }

                for (uint j = 0; j < 5; j++)
                {
                    if (curEpisode >= season.episodes.Count)
                    {
                        break;
                    }

                    //episode item
                    Gtk.Image img = new Gtk.Image();
                    if (season.episodes[curEpisode].thumb != null)
                    {
                        img.Pixbuf = season.episodes[curEpisode].thumb;
                    }

                    Gtk.Label lbl = new Gtk.Label((curEpisode + 1).ToString() + ". " + season.episodes[curEpisode].title);
                    lbl.ModifyFont(Pango.FontDescription.FromString("12"));
                    Gtk.VBox box = new Gtk.VBox();
                    box.Add(img);
                    box.Add(lbl);
                    Gtk.EventBox eventbox = new Gtk.EventBox();
                    eventbox.Add(box);

                    //create event for clicking an episode
                    Func <Episode, Gtk.ButtonPressEventHandler> ButtonPressWrapper = ((ep) => ((s, e) => { OnEpisodeSelected(s, e, ep); }));
                    eventbox.ButtonPressEvent += ButtonPressWrapper(season.episodes[curEpisode]);

                    //create hover events
                    Func <Gtk.EventBox, Gtk.EnterNotifyEventHandler> EnterNotifyWrapper = ((Gtk.EventBox eBox) => ((s, e) => { OnHoverEnter(s, e, eBox); }));
                    eventbox.EnterNotifyEvent += EnterNotifyWrapper(eventbox);

                    Func <Gtk.EventBox, Gtk.LeaveNotifyEventHandler> LeaveNotifyWrapper = ((Gtk.EventBox eBox) => ((s, e) => { OnHoverLeave(s, e, eBox); }));
                    eventbox.LeaveNotifyEvent += LeaveNotifyWrapper(eventbox);

                    table.Attach(eventbox, j, j + 1, i, i + 1);

                    curEpisode++;
                }
            }
        }
Пример #31
0
        public LabelHandler()
        {
            eventBox = new EtoEventBox {
                Handler = this
            };
#if GTK2
            eventBox.ResizeMode = Gtk.ResizeMode.Immediate;
#endif
            Control        = new EtoLabel();
            Control.Xalign = 0;
            Control.Yalign = 0;
            eventBox.Child = Control;
            Wrap           = WrapMode.Word;
        }
Пример #32
0
        public void Initialize(EditSession session)
        {
            editSession = session;
            prop        = session.Property;

            ICollection valuesCollection = prop.Converter.GetStandardValues();

            values = new TraceLab.Core.Components.EnumValue[valuesCollection.Count];
            valuesCollection.CopyTo(values, 0);

            //values = System.Enum.GetValues (prop.PropertyType);
            Hashtable names = new Hashtable();

            foreach (FieldInfo f in prop.PropertyType.GetFields())
            {
                DescriptionAttribute att = (DescriptionAttribute)Attribute.GetCustomAttribute(f, typeof(DescriptionAttribute));
                if (att != null)
                {
                    names [f.Name] = att.Description;
                }
                else
                {
                    names [f.Name] = f.Name;
                }
            }


            ebox = new Gtk.EventBox();
            ebox.Show();
            PackStart(ebox, true, true, 0);

            combo                     = Gtk.ComboBoxEntry.NewText();
            combo.Changed            += combo_Changed;
            combo.Entry.IsEditable    = false;
            combo.Entry.CanFocus      = false;
            combo.Entry.HasFrame      = false;
            combo.Entry.HeightRequest = combo.SizeRequest().Height;
            combo.Show();
            ebox.Add(combo);

            foreach (TraceLab.Core.Components.EnumValue value in values)
            {
                string str = prop.Converter.ConvertToString(value);
                if (names.Contains(str))
                {
                    str = (string)names [str];
                }
                combo.AppendText(str);
            }
        }
Пример #33
0
        public void Initialize(EditSession session)
        {
            PropertyDescriptor prop = session.Property;

            if (!prop.PropertyType.IsEnum)
            {
                throw new ApplicationException("Enumeration editor does not support editing values of type " + prop.PropertyType);
            }

            values = System.Enum.GetValues(prop.PropertyType);
            Hashtable names = new Hashtable();

            foreach (FieldInfo f in prop.PropertyType.GetFields())
            {
                DescriptionAttribute att = (DescriptionAttribute)Attribute.GetCustomAttribute(f, typeof(DescriptionAttribute));
                if (att != null)
                {
                    names [f.Name] = att.Description;
                }
                else
                {
                    names [f.Name] = f.Name;
                }
            }


            ebox = new Gtk.EventBox();
            ebox.Show();
            PackStart(ebox, true, true, 0);

            combo                     = Gtk.ComboBoxEntry.NewText();
            combo.Changed            += combo_Changed;
            combo.Entry.IsEditable    = false;
            combo.Entry.CanFocus      = false;
            combo.Entry.HasFrame      = false;
            combo.Entry.HeightRequest = combo.SizeRequest().Height;
            combo.Show();
            ebox.Add(combo);

            foreach (object value in values)
            {
                string str = prop.Converter.ConvertToString(value);
                if (names.Contains(str))
                {
                    str = (string)names [str];
                }
                combo.AppendText(str);
            }
        }
Пример #34
0
        void AllocEventBox(bool visibleWindow = false)
        {
            // Wraps the widget with an event box. Required for some
            // widgets such as Label which doesn't have its own gdk window

            if (eventBox == null && EventsRootWidget.IsNoWindow)
            {
                eventBox               = new Gtk.EventBox();
                eventBox.Visible       = Widget.Visible;
                eventBox.Sensitive     = Widget.Sensitive;
                eventBox.VisibleWindow = visibleWindow;
                GtkEngine.ReplaceChild(Widget, eventBox);
                eventBox.Add(Widget);
            }
        }
Пример #35
0
        private void AddToTable(uint row, uint col, Gtk.Widget control, uint colSpan = 1)
        {
            var box = new Gtk.EventBox();
            var al  = new Gtk.Alignment(0, 0, control.GetType() == typeof(Gtk.Entry) ? 1 : 0, 1);

            al.SetPadding(0, 0, 5, 5);
            al.Add(control);
            box.Add(al);

            if (row % 2 == 1)
            {
                box.ModifyBg(Gtk.StateType.Normal, _altRowColor);
            }

            tblContainer.Attach(box, col, col + colSpan, row, row + 1, Gtk.AttachOptions.Fill, Gtk.AttachOptions.Fill, 0, 0);
        }
Пример #36
0
        void PlaceAddLabel(int n)
        {
            HideAddLabel();

            uint r = (uint)n / columns;
            uint c = (uint)(n % columns) * 3;

            emptyLabel = new Gtk.EventBox();
            emptyLabel.VisibleWindow = false;
            Gtk.Label label = new Gtk.Label();
            label.Xalign = 0;
            label.Markup = "<i><span foreground='darkgrey'>" + Catalog.GetString("Click to create action") + "</span></i>";
            emptyLabel.Add(label);
            emptyLabel.ButtonPressEvent += OnAddClicked;
            table.Attach(emptyLabel, c, c + 3, r, r + 1);
        }
        void Fill()
        {
            menuItems.Clear();

            uint           n        = 0;
            ActionMenuItem editItem = null;

            if (nodes.Count > 0)
            {
                foreach (ActionTreeNode node in nodes)
                {
                    ActionMenuItem item = new ActionMenuItem(wrapper, this, node);
                    item.KeyPressEvent += OnItemKeyPress;
                    item.Attach(table, n++, 0);
                    menuItems.Add(item);
                    // If adding an action with an empty name, select and start editing it
//					if (node.Action != null && node.Action.Name.Length == 0)
//						editItem = item;
                }
            }

            emptyLabel = new Gtk.EventBox();
            emptyLabel.VisibleWindow = false;
            Gtk.Label label = new Gtk.Label();
            label.Xalign = 0;
            label.Markup = "<i><span foreground='darkgrey'>" + Catalog.GetString("Click to create action") + "</span></i>";
            emptyLabel.Add(label);
            emptyLabel.ButtonPressEvent += OnAddClicked;
            table.Attach(emptyLabel, 1, 2, n, n + 1);

            ShowAll();

            if (editItem != null)
            {
                // If there is an item with an empty action, it means that it was an item that was
                // being edited. Restart the editing now.
                GLib.Timeout.Add(200, delegate
                {
                    editItem.Select();
                    editItem.EditingDone += OnEditingDone;
                    editItem.StartEditing();
                    return(false);
                });
            }
        }
Пример #38
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Pinta.ColorPanelWidget
     Stetic.BinContainer.Attach(this);
     this.HeightRequest = 24;
     this.Name = "Pinta.ColorPanelWidget";
     // Container child Pinta.ColorPanelWidget.Gtk.Container+ContainerChild
     this.eventbox = new Gtk.EventBox();
     this.eventbox.Events = ((Gdk.EventMask)(256));
     this.eventbox.Name = "eventbox";
     this.eventbox.VisibleWindow = false;
     this.Add(this.eventbox);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
Пример #39
0
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget Pinta.ColorGradientWidget
     Stetic.BinContainer.Attach(this);
     this.CanFocus = true;
     this.Events = ((Gdk.EventMask)(1534));
     this.Name = "Pinta.ColorGradientWidget";
     // Container child Pinta.ColorGradientWidget.Gtk.Container+ContainerChild
     this.eventbox = new Gtk.EventBox();
     this.eventbox.Events = ((Gdk.EventMask)(790));
     this.eventbox.Name = "eventbox";
     this.eventbox.VisibleWindow = false;
     this.Add(this.eventbox);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget omvviewerlight.ScaleImage
     Stetic.BinContainer.Attach(this);
     this.Name = "omvviewerlight.ScaleImage";
     // Container child omvviewerlight.ScaleImage.Gtk.Container+ContainerChild
     this.eventbox2 = new Gtk.EventBox();
     this.eventbox2.Name = "eventbox2";
     // Container child eventbox2.Gtk.Container+ContainerChild
     this.dispimage = new Gtk.Image();
     this.dispimage.Name = "dispimage";
     this.eventbox2.Add(this.dispimage);
     this.Add(this.eventbox2);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
Пример #41
0
		void AddCreateItemLabel ()
		{
			HideSpacerItem ();
			Gtk.EventBox ebox = new Gtk.EventBox ();
			ebox.VisibleWindow = false;
			Gtk.Label emptyLabel = new Gtk.Label ();
			emptyLabel.Xalign = 0;
			if (this.Orientation == Gtk.Orientation.Vertical)
				emptyLabel.Markup = "<i><span foreground='darkgrey'>" + Catalog.GetString ("New\nbutton") + "</span></i>";
			else
				emptyLabel.Markup = "<i><span foreground='darkgrey'>" + Catalog.GetString ("New button") + "</span></i>";
			ebox.BorderWidth = 3;
			ebox.Add (emptyLabel);
			Gtk.ToolItem mit = new Gtk.ToolItem ();
			mit.Child = ebox;
			ebox.ButtonPressEvent += OnNewItemPress;
			Insert (mit, -1);
			mit.ShowAll ();
			addLabel = mit;
		}
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget HollyLibrary.HRegExEntry
     Stetic.BinContainer.Attach(this);
     this.Name = "HollyLibrary.HRegExEntry";
     // Container child HollyLibrary.HRegExEntry.Gtk.Container+ContainerChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     this.hbox1.BorderWidth = ((uint)(5));
     // Container child hbox1.Gtk.Box+BoxChild
     this.TextBox = new Gtk.Entry();
     this.TextBox.CanFocus = true;
     this.TextBox.Name = "TextBox";
     this.TextBox.IsEditable = true;
     this.TextBox.HasFrame = false;
     this.TextBox.InvisibleChar = '●';
     this.hbox1.Add(this.TextBox);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.TextBox]));
     w1.Position = 0;
     // Container child hbox1.Gtk.Box+BoxChild
     this.EbErrorImage = new Gtk.EventBox();
     this.EbErrorImage.Name = "EbErrorImage";
     this.EbErrorImage.VisibleWindow = false;
     // Container child EbErrorImage.Gtk.Container+ContainerChild
     this.ErrorImage = new Gtk.Image();
     this.ErrorImage.Name = "ErrorImage";
     this.EbErrorImage.Add(this.ErrorImage);
     this.hbox1.Add(this.EbErrorImage);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.hbox1[this.EbErrorImage]));
     w3.Position = 1;
     w3.Expand = false;
     w3.Fill = false;
     this.Add(this.hbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.TextBox.Changed += new System.EventHandler(this.OnTextBoxChanged);
 }
Пример #43
0
		public void Initialize (PropertyDescriptor prop)
		{
			if (!prop.PropertyType.IsEnum)
				throw new ApplicationException ("Enumeration editor does not support editing values of type " + prop.PropertyType);
				
			ebox = new Gtk.EventBox ();
			ebox.Show ();
			PackStart (ebox, true, true, 0);

			combo = Gtk.ComboBoxEntry.NewText ();
			combo.Changed += combo_Changed;
			combo.Entry.IsEditable = false;
			combo.Entry.HasFrame = false;
			combo.Entry.HeightRequest = combo.SizeRequest ().Height;	// The combo does not set the entry to the correct size when it does not have a frame
			combo.Show ();
			ebox.Add (combo);

			enm = Registry.LookupEnum (prop.PropertyType.FullName);
			foreach (Enum value in enm.Values)
				combo.AppendText (enm[value].Label);
		}
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget HollyLibrary.HImageCheckBox
     Stetic.BinContainer.Attach(this);
     this.Name = "HollyLibrary.HImageCheckBox";
     // Container child HollyLibrary.HImageCheckBox.Gtk.Container+ContainerChild
     this.ECheckbox = new Gtk.EventBox();
     this.ECheckbox.Events = ((Gdk.EventMask)(86004));
     this.ECheckbox.Name = "ECheckbox";
     // Container child ECheckbox.Gtk.Container+ContainerChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     this.hbox1.BorderWidth = ((uint)(3));
     // Container child hbox1.Gtk.Box+BoxChild
     this.ImgCheck = new Gtk.Image();
     this.ImgCheck.Name = "ImgCheck";
     this.hbox1.Add(this.ImgCheck);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.ImgCheck]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.LblText = new HollyLibrary.HLabel();
     this.LblText.Name = "LblText";
     this.LblText.LabelProp = "hlabel1";
     this.LblText.TextOverwritesIcon = false;
     this.LblText.HorizontalLine = false;
     this.LblText.TextInSelectionRectangle = false;
     this.hbox1.Add(this.LblText);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.LblText]));
     w2.Position = 1;
     this.ECheckbox.Add(this.hbox1);
     this.Add(this.ECheckbox);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget ocmgtk.AttributeFilterWidget
     Stetic.BinContainer.Attach(this);
     this.Name = "ocmgtk.AttributeFilterWidget";
     // Container child ocmgtk.AttributeFilterWidget.Gtk.Container+ContainerChild
     this.eventbox1 = new Gtk.EventBox();
     this.eventbox1.Name = "eventbox1";
     // Container child eventbox1.Gtk.Container+ContainerChild
     this.attrIcon = new Gtk.Image();
     this.attrIcon.Name = "attrIcon";
     this.eventbox1.Add(this.attrIcon);
     this.Add(this.eventbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Hide();
     this.eventbox1.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnPress);
     this.eventbox1.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(this.OnRelease);
     this.attrIcon.ButtonReleaseEvent += new Gtk.ButtonReleaseEventHandler(this.OnRelease);
 }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget omvviewerlight.Map
     Stetic.BinContainer.Attach(this);
     this.Name = "omvviewerlight.Map";
     // Container child omvviewerlight.Map.Gtk.Container+ContainerChild
     this.eventbox1 = new Gtk.EventBox();
     this.eventbox1.Name = "eventbox1";
     // Container child eventbox1.Gtk.Container+ContainerChild
     this.image = new Gtk.Image();
     this.image.Events = ((Gdk.EventMask)(256));
     this.image.ExtensionEvents = ((Gdk.ExtensionMode)(1));
     this.image.Name = "image";
     this.eventbox1.Add(this.image);
     this.Add(this.eventbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.eventbox1.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnEventbox1ButtonPressEvent);
 }
Пример #47
0
 private void Build()
 {
     global::Stetic.Gui.Initialize(this);
     // Widget Client.Forms.Help
     this.WidthRequest = 520;
     this.HeightRequest = 600;
     this.Name = "Client.Forms.Help";
     this.Title = "Help";
     this.Icon = global::Gdk.Pixbuf.LoadFromResource("Client.Resources.pigeon_clip_art_hight.ico");
     this.WindowPosition = ((global::Gtk.WindowPosition)(1));
     this.Resizable = false;
     this.AllowGrow = false;
     // Container child Client.Forms.Help.Gtk.Container+ContainerChild
     this.fixed1 = new global::Gtk.Fixed();
     this.fixed1.Name = "fixed1";
     this.fixed1.HasWindow = false;
     // Container child fixed1.Gtk.Fixed+FixedChild
     this.label2 = new global::Gtk.Label();
     this.label2.Name = "label2";
     this.label2.LabelProp = "Made by: Petr Bena";
     this.fixed1.Add(this.label2);
     global::Gtk.Fixed.FixedChild w1 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[this.label2]));
     w1.X = 20;
     w1.Y = 61;
     // Container child fixed1.Gtk.Fixed+FixedChild
     Gtk.EventBox eb = new Gtk.EventBox();
     eb.ButtonPressEvent += new Gtk.ButtonPressEventHandler(Link);
     this.label3 = new global::Gtk.Label();
     this.label3.Name = "label3";
     this.label3.UseUnderline = true;
     this.label3.ModifyFg(Gtk.StateType.Normal, Core.FromColor(System.Drawing.Color.Blue));
     this.label3.Markup = "<a href=\"\">http://pidgeonclient.org/wiki/</a>";
     this.label3.UseUnderline = true;
     eb.Add(this.label3);
     this.fixed1.Add(eb);
     global::Gtk.Fixed.FixedChild w2 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[eb]));
     w2.X = 20;
     w2.Y = 87;
     // Container child fixed1.Gtk.Fixed+FixedChild
     this.label4 = new global::Gtk.Label();
     this.label4.Name = "label4";
     this.fixed1.Add(this.label4);
     global::Gtk.Fixed.FixedChild w3 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[this.label4]));
     w3.X = 20;
     w3.Y = 127;
     // Container child fixed1.Gtk.Fixed+FixedChild
     this.image2 = new global::Gtk.Image();
     this.image2.Name = "image2";
     this.image2.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("Client.Resources.Pigeon_clip_art_hight_mini.png");
     this.fixed1.Add(this.image2);
     global::Gtk.Fixed.FixedChild w4 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[this.image2]));
     w4.X = 342;
     w4.Y = 47;
     // Container child fixed1.Gtk.Fixed+FixedChild
     this.label1 = new global::Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = "Pidgeon";
     this.fixed1.Add(this.label1);
     global::Gtk.Fixed.FixedChild w5 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[this.label1]));
     w5.X = 220;
     w5.Y = 14;
     // Container child fixed1.Gtk.Fixed+FixedChild
     this.GtkScrolledWindow = new global::Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((global::Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.textview1 = new global::Gtk.TextView();
     this.textview1.Buffer.Text = "About:\n\nThe pidgeon project was established as an open source which anyone can edit or improve, or even suggest new features to. The source code is located at gitorious (link is available on wiki), but in order to submit patches, you don't need to be a member of the project.\n\nThat means:\nEveryone who wants to contribute to this project, is welcome and definitely should be able to do that, there is no need to request any permissions to modify the core sources or to develop plugins. If you like this project and you want to contribute to make pidgeon even better, please see our website\n\nLicense:\n\nThis program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or  (at your option) version 3.\n\nThis program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of\n\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.";
     this.textview1.WidthRequest = 500;
     this.textview1.HeightRequest = 400;
     this.textview1.CanFocus = true;
     this.textview1.Name = "textview1";
     this.textview1.Editable = false;
     this.textview1.WrapMode = ((global::Gtk.WrapMode)(2));
     this.GtkScrolledWindow.Add(this.textview1);
     this.fixed1.Add(this.GtkScrolledWindow);
     global::Gtk.Fixed.FixedChild w7 = ((global::Gtk.Fixed.FixedChild)(this.fixed1[this.GtkScrolledWindow]));
     w7.X = 8;
     w7.Y = 171;
     this.Add(this.fixed1);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 579;
     this.DefaultHeight = 629;
     this.Show();
 }
Пример #48
0
        void AllocEventBox()
        {
            // Wraps the widget with an event box. Required for some
            // widgets such as Label which doesn't have its own gdk window

            if (eventBox == null && Widget.IsNoWindow) {
                eventBox = new Gtk.EventBox ();
                eventBox.Visible = Widget.Visible;
                eventBox.Sensitive = Widget.Sensitive;
                if (alignment != null) {
                    alignment.Remove (alignment.Child);
                    alignment.Add (eventBox);
                } else
                    GtkEngine.ReplaceChild (Widget, eventBox);
                eventBox.Add (Widget);
            }
        }
Пример #49
0
 private void Build()
 {
     global::Stetic.Gui.Initialize(this);
     // Widget Client.Forms.Notification
     this.Name = "notification";
     this.Title = "Notification";
     this.TypeHint = Gdk.WindowTypeHint.Normal;
     this.WindowPosition = ((global::Gtk.WindowPosition)(4));
     // Container child Client.Forms.Notification.Gtk.Container+ContainerChild
     this.vbox1 = new global::Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.Icon = Gdk.Pixbuf.LoadFromResource("Client.Resources.pigeon_clip_art_hight.ico");
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.label1 = new global::Gtk.Label();
     this.label1.HeightRequest = 20;
     this.label1.Name = "label1";
     this.label1.LabelProp = "Notification";
     this.vbox1.Add(this.label1);
     global::Gtk.Box.BoxChild w1 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.label1]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox1 = new global::Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.image1 = new global::Gtk.Image();
     this.image1.Name = "image1";
     this.image1.Pixbuf = global::Gdk.Pixbuf.LoadFromResource("Client.Resources.icon.png");
     this.hbox1.Add(this.image1);
     global::Gtk.Box.BoxChild w2 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.image1]));
     w2.Position = 0;
     w2.Expand = false;
     w2.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label2 = new global::Gtk.Label();
     this.label2.Name = "label2";
     this.label2.WidthRequest = 260;
     this.label2.Wrap = true;
     this.label2.LabelProp = "Description";
     this.hbox1.Add(this.label2);
     global::Gtk.Box.BoxChild w3 = ((global::Gtk.Box.BoxChild)(this.hbox1[this.label2]));
     w3.Position = 1;
     w3.Expand = false;
     w3.Fill = false;
     this.vbox1.Add(this.hbox1);
     global::Gtk.Box.BoxChild w4 = ((global::Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
     w4.Position = 1;
     w4.Expand = false;
     w4.Fill = false;
     root = new Gtk.EventBox();
     root.ModifyBg(Gtk.StateType.Normal, Core.FromColor(System.Drawing.Color.Orange));
     root.Add(this.vbox1);
     this.Decorated = false;
     this.Add(root);
     if ((this.Child != null))
     {
         this.Child.ShowAll();
     }
     this.DefaultWidth = 460;
     this.DefaultHeight = 220;
 }
Пример #50
0
        public ChatView(ChatModel chat)
        {
            Trace.Call(chat);

            _ChatModel = chat;
            _Name = _ChatModel.Name;
            ID = _ChatModel.ID;
            Name = _Name;

            MessageTextView tv = new MessageTextView();
            _EndMark = tv.Buffer.CreateMark("end", tv.Buffer.EndIter, false);
            tv.ShowTimestamps = true;
            tv.ShowMarkerline = true;
            tv.Editable = false;
            tv.CursorVisible = true;
            tv.WrapMode = Gtk.WrapMode.Char;
            tv.MessageAdded += OnMessageTextViewMessageAdded;
            tv.MessageHighlighted += OnMessageTextViewMessageHighlighted;
            tv.PopulatePopup += OnMessageTextViewPopulatePopup;
            _OutputMessageTextView = tv;

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            //sw.HscrollbarPolicy = Gtk.PolicyType.Never;
            sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.VscrollbarPolicy = Gtk.PolicyType.Always;
            sw.ShadowType = Gtk.ShadowType.In;
            sw.Add(_OutputMessageTextView);
            _OutputScrolledWindow = sw;

            // popup menu
            _TabMenu = new Gtk.Menu();

            Gtk.ImageMenuItem close_item = new Gtk.ImageMenuItem(Gtk.Stock.Close, null);
            close_item.Activated += new EventHandler(OnTabMenuCloseActivated);
            _TabMenu.Append(close_item);
            _TabMenu.ShowAll();

            //FocusChild = _OutputTextView;
            //CanFocus = false;

            _TabLabel = new Gtk.Label();
            _TabLabel.Text = _Name;

            _TabHBox = new Gtk.HBox();
            _TabHBox.PackEnd(new Gtk.Fixed(), true, true, 0);
            _TabHBox.PackEnd(_TabLabel, false, false, 0);
            _TabHBox.ShowAll();

            _TabEventBox = new Gtk.EventBox();
            _TabEventBox.VisibleWindow = false;
            _TabEventBox.ButtonPressEvent += new Gtk.ButtonPressEventHandler(OnTabButtonPress);
            _TabEventBox.Add(_TabHBox);
            _TabEventBox.ShowAll();

            _ThemeSettings = new ThemeSettings();

            // OPT-TODO: this should use a TaskStack instead of TaskQueue
            _LastSeenHighlightQueue = new TaskQueue("LastSeenHighlightQueue("+_Name+")");
            _LastSeenHighlightQueue.AbortedEvent += OnLastSeenHighlightQueueAbortedEvent;
            _LastSeenHighlightQueue.ExceptionEvent += OnLastSeenHighlightQueueExceptionEvent;
        }
Пример #51
0
		public override void Initialize ()
		{
			Widget = new Gtk.EventBox ();
			Widget.Show ();
		}
Пример #52
0
        protected void AllocEventBox(bool visibleWindow = false)
        {
            // Wraps the widget with an event box. Required for some
            // widgets such as Label which doesn't have its own gdk window

            if (eventBox == null && EventsRootWidget.IsNoWindow) {
                if (EventsRootWidget is Gtk.EventBox) {
                    ((Gtk.EventBox)EventsRootWidget).VisibleWindow = true;
                    return;
                }
                eventBox = new Gtk.EventBox ();
                eventBox.Visible = Widget.Visible;
                eventBox.Sensitive = Widget.Sensitive;
                eventBox.VisibleWindow = visibleWindow;
                GtkEngine.ReplaceChild (Widget, eventBox);
                eventBox.Add (Widget);
            }
        }
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget omvviewerlight.PlacesSearch
     Stetic.BinContainer.Attach(this);
     this.Name = "omvviewerlight.PlacesSearch";
     // Container child omvviewerlight.PlacesSearch.Gtk.Container+ContainerChild
     this.vbox1 = new Gtk.VBox();
     this.vbox1.Name = "vbox1";
     this.vbox1.Spacing = 6;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox1 = new Gtk.HBox();
     this.hbox1.Name = "hbox1";
     this.hbox1.Spacing = 6;
     // Container child hbox1.Gtk.Box+BoxChild
     this.label1 = new Gtk.Label();
     this.label1.Name = "label1";
     this.label1.LabelProp = Mono.Unix.Catalog.GetString("Find");
     this.hbox1.Add(this.label1);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.hbox1[this.label1]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child hbox1.Gtk.Box+BoxChild
     this.entry1 = new Gtk.Entry();
     this.entry1.CanFocus = true;
     this.entry1.Name = "entry1";
     this.entry1.IsEditable = true;
     this.entry1.InvisibleChar = '●';
     this.hbox1.Add(this.entry1);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.hbox1[this.entry1]));
     w2.Position = 1;
     // Container child hbox1.Gtk.Box+BoxChild
     this.button_search = new Gtk.Button();
     this.button_search.CanFocus = true;
     this.button_search.Name = "button_search";
     this.button_search.UseUnderline = true;
     // Container child button_search.Gtk.Container+ContainerChild
     Gtk.Alignment w3 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     Gtk.HBox w4 = new Gtk.HBox();
     w4.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Image w5 = new Gtk.Image();
     w5.Pixbuf = MainClass.GetResource("status_search_btn.png");
     w4.Add(w5);
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Label w7 = new Gtk.Label();
     w7.LabelProp = Mono.Unix.Catalog.GetString("Search");
     w7.UseUnderline = true;
     w4.Add(w7);
     w3.Add(w4);
     this.button_search.Add(w3);
     this.hbox1.Add(this.button_search);
     Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.hbox1[this.button_search]));
     w11.Position = 2;
     w11.Expand = false;
     w11.Fill = false;
     this.vbox1.Add(this.hbox1);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox1]));
     w12.Position = 0;
     w12.Expand = false;
     w12.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.label_info = new Gtk.Label();
     this.label_info.Name = "label_info";
     this.label_info.Xalign = 0F;
     this.label_info.LabelProp = Mono.Unix.Catalog.GetString("Type in a name and press search to begin");
     this.vbox1.Add(this.label_info);
     Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox1[this.label_info]));
     w13.Position = 1;
     w13.Expand = false;
     w13.Fill = false;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox2 = new Gtk.HBox();
     this.hbox2.Name = "hbox2";
     this.hbox2.Spacing = 6;
     // Container child hbox2.Gtk.Box+BoxChild
     this.GtkScrolledWindow = new Gtk.ScrolledWindow();
     this.GtkScrolledWindow.Name = "GtkScrolledWindow";
     this.GtkScrolledWindow.ShadowType = ((Gtk.ShadowType)(1));
     // Container child GtkScrolledWindow.Gtk.Container+ContainerChild
     this.treeview1 = new Gtk.TreeView();
     this.treeview1.WidthRequest = 650;
     this.treeview1.CanFocus = true;
     this.treeview1.Name = "treeview1";
     this.GtkScrolledWindow.Add(this.treeview1);
     this.hbox2.Add(this.GtkScrolledWindow);
     Gtk.Box.BoxChild w15 = ((Gtk.Box.BoxChild)(this.hbox2[this.GtkScrolledWindow]));
     w15.Position = 0;
     // Container child hbox2.Gtk.Box+BoxChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     this.vbox2.Spacing = 6;
     // Container child vbox2.Gtk.Box+BoxChild
     this.checkbutton_mature = new Gtk.CheckButton();
     this.checkbutton_mature.CanFocus = true;
     this.checkbutton_mature.Name = "checkbutton_mature";
     this.checkbutton_mature.Label = Mono.Unix.Catalog.GetString("Enable Mature");
     this.checkbutton_mature.Active = true;
     this.checkbutton_mature.DrawIndicator = true;
     this.checkbutton_mature.UseUnderline = true;
     this.vbox2.Add(this.checkbutton_mature);
     Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.vbox2[this.checkbutton_mature]));
     w16.Position = 0;
     w16.Expand = false;
     w16.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.eventbox3 = new Gtk.EventBox();
     this.eventbox3.Name = "eventbox3";
     // Container child eventbox3.Gtk.Container+ContainerChild
     this.image_parcel = new Gtk.Image();
     this.image_parcel.WidthRequest = 175;
     this.image_parcel.HeightRequest = 175;
     this.image_parcel.Name = "image_parcel";
     this.eventbox3.Add(this.image_parcel);
     this.vbox2.Add(this.eventbox3);
     Gtk.Box.BoxChild w18 = ((Gtk.Box.BoxChild)(this.vbox2[this.eventbox3]));
     w18.Position = 1;
     w18.Expand = false;
     w18.Fill = false;
     this.hbox2.Add(this.vbox2);
     Gtk.Box.BoxChild w19 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox2]));
     w19.Position = 1;
     w19.Expand = false;
     w19.Fill = false;
     this.vbox1.Add(this.hbox2);
     Gtk.Box.BoxChild w20 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox2]));
     w20.Position = 2;
     // Container child vbox1.Gtk.Box+BoxChild
     this.hbox3 = new Gtk.HBox();
     this.hbox3.Name = "hbox3";
     this.hbox3.Spacing = 6;
     // Container child hbox3.Gtk.Box+BoxChild
     this.button_TP = new Gtk.Button();
     this.button_TP.CanFocus = true;
     this.button_TP.Name = "button_TP";
     this.button_TP.UseUnderline = true;
     // Container child button_TP.Gtk.Container+ContainerChild
     Gtk.Alignment w21 = new Gtk.Alignment(0.5F, 0.5F, 0F, 0F);
     // Container child GtkAlignment.Gtk.Container+ContainerChild
     Gtk.HBox w22 = new Gtk.HBox();
     w22.Spacing = 2;
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Image w23 = new Gtk.Image();
     w23.Pixbuf = MainClass.GetResource("icon_place.png");
     w22.Add(w23);
     // Container child GtkHBox.Gtk.Container+ContainerChild
     Gtk.Label w25 = new Gtk.Label();
     w25.LabelProp = Mono.Unix.Catalog.GetString("Teleport");
     w25.UseUnderline = true;
     w22.Add(w25);
     w21.Add(w22);
     this.button_TP.Add(w21);
     this.hbox3.Add(this.button_TP);
     Gtk.Box.BoxChild w29 = ((Gtk.Box.BoxChild)(this.hbox3[this.button_TP]));
     w29.Position = 0;
     w29.Expand = false;
     w29.Fill = false;
     this.vbox1.Add(this.hbox3);
     Gtk.Box.BoxChild w30 = ((Gtk.Box.BoxChild)(this.vbox1[this.hbox3]));
     w30.Position = 3;
     w30.Expand = false;
     w30.Fill = false;
     this.Add(this.vbox1);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
     this.button_search.Clicked += new System.EventHandler(this.OnButtonSearchClicked);
     this.treeview1.CursorChanged += new System.EventHandler(this.OnTreeview1CursorChanged);
     this.eventbox3.ButtonPressEvent += new Gtk.ButtonPressEventHandler(this.OnEventbox3ButtonPressEvent);
     this.button_TP.Clicked += new System.EventHandler(this.OnButtonTPClicked);
 }
Пример #54
0
		void SetErrorMode ()
		{
			Gtk.Label lab = new Gtk.Label ();
			lab.Markup = "<b>" + Catalog.GetString ("The form designer could not be loaded") + "</b>";
			Gtk.EventBox box = new Gtk.EventBox ();
			box.Add (lab);
			
			widget = Stetic.UserInterface.CreateWidgetDesigner (box, 100, 100);
			rootWidget = null;
			
			OnRootWidgetChanged ();
		}
 protected virtual void Build()
 {
     Stetic.Gui.Initialize(this);
     // Widget omvviewerlight.LocalRegion
     Stetic.BinContainer.Attach(this);
     this.Name = "omvviewerlight.LocalRegion";
     // Container child omvviewerlight.LocalRegion.Gtk.Container+ContainerChild
     this.eventbox_master = new Gtk.EventBox();
     this.eventbox_master.Name = "eventbox_master";
     // Container child eventbox_master.Gtk.Container+ContainerChild
     this.hbox2 = new Gtk.HBox();
     this.hbox2.Name = "hbox2";
     // Container child hbox2.Gtk.Box+BoxChild
     this.vbox2 = new Gtk.VBox();
     this.vbox2.Name = "vbox2";
     // Container child vbox2.Gtk.Box+BoxChild
     this.map1 = new omvviewerlight.Map();
     this.map1.Events = ((Gdk.EventMask)(256));
     this.map1.Name = "map1";
     this.vbox2.Add(this.map1);
     Gtk.Box.BoxChild w1 = ((Gtk.Box.BoxChild)(this.vbox2[this.map1]));
     w1.Position = 0;
     w1.Expand = false;
     w1.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.map4 = new omvviewerlight.Map();
     this.map4.Events = ((Gdk.EventMask)(256));
     this.map4.Name = "map4";
     this.vbox2.Add(this.map4);
     Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(this.vbox2[this.map4]));
     w2.Position = 1;
     w2.Expand = false;
     w2.Fill = false;
     // Container child vbox2.Gtk.Box+BoxChild
     this.map7 = new omvviewerlight.Map();
     this.map7.Events = ((Gdk.EventMask)(256));
     this.map7.Name = "map7";
     this.vbox2.Add(this.map7);
     Gtk.Box.BoxChild w3 = ((Gtk.Box.BoxChild)(this.vbox2[this.map7]));
     w3.Position = 2;
     w3.Expand = false;
     w3.Fill = false;
     this.hbox2.Add(this.vbox2);
     Gtk.Box.BoxChild w4 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox2]));
     w4.Position = 0;
     w4.Expand = false;
     w4.Fill = false;
     // Container child hbox2.Gtk.Box+BoxChild
     this.vbox3 = new Gtk.VBox();
     this.vbox3.Name = "vbox3";
     // Container child vbox3.Gtk.Box+BoxChild
     this.map2 = new omvviewerlight.Map();
     this.map2.Events = ((Gdk.EventMask)(256));
     this.map2.Name = "map2";
     this.vbox3.Add(this.map2);
     Gtk.Box.BoxChild w5 = ((Gtk.Box.BoxChild)(this.vbox3[this.map2]));
     w5.Position = 0;
     w5.Expand = false;
     w5.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.map5 = new omvviewerlight.Map();
     this.map5.Events = ((Gdk.EventMask)(256));
     this.map5.Name = "map5";
     this.vbox3.Add(this.map5);
     Gtk.Box.BoxChild w6 = ((Gtk.Box.BoxChild)(this.vbox3[this.map5]));
     w6.Position = 1;
     w6.Expand = false;
     w6.Fill = false;
     // Container child vbox3.Gtk.Box+BoxChild
     this.map8 = new omvviewerlight.Map();
     this.map8.Events = ((Gdk.EventMask)(256));
     this.map8.Name = "map8";
     this.vbox3.Add(this.map8);
     Gtk.Box.BoxChild w7 = ((Gtk.Box.BoxChild)(this.vbox3[this.map8]));
     w7.Position = 2;
     w7.Expand = false;
     w7.Fill = false;
     this.hbox2.Add(this.vbox3);
     Gtk.Box.BoxChild w8 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox3]));
     w8.Position = 1;
     w8.Expand = false;
     w8.Fill = false;
     // Container child hbox2.Gtk.Box+BoxChild
     this.vbox4 = new Gtk.VBox();
     this.vbox4.Name = "vbox4";
     // Container child vbox4.Gtk.Box+BoxChild
     this.map3 = new omvviewerlight.Map();
     this.map3.Events = ((Gdk.EventMask)(256));
     this.map3.Name = "map3";
     this.vbox4.Add(this.map3);
     Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox4[this.map3]));
     w9.Position = 0;
     w9.Expand = false;
     w9.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.map6 = new omvviewerlight.Map();
     this.map6.Events = ((Gdk.EventMask)(256));
     this.map6.Name = "map6";
     this.vbox4.Add(this.map6);
     Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox4[this.map6]));
     w10.Position = 1;
     w10.Expand = false;
     w10.Fill = false;
     // Container child vbox4.Gtk.Box+BoxChild
     this.map9 = new omvviewerlight.Map();
     this.map9.Events = ((Gdk.EventMask)(256));
     this.map9.Name = "map9";
     this.vbox4.Add(this.map9);
     Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox4[this.map9]));
     w11.Position = 2;
     w11.Expand = false;
     w11.Fill = false;
     this.hbox2.Add(this.vbox4);
     Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.hbox2[this.vbox4]));
     w12.Position = 2;
     w12.Expand = false;
     w12.Fill = false;
     this.eventbox_master.Add(this.hbox2);
     this.Add(this.eventbox_master);
     if ((this.Child != null)) {
         this.Child.ShowAll();
     }
     this.Show();
 }
		public void Initialize (EditSession session)
		{
            editSession = session;
            prop = session.Property;
           
            ICollection valuesCollection = prop.Converter.GetStandardValues();
            values = new TraceLab.Core.Components.EnumValue[valuesCollection.Count];
            valuesCollection.CopyTo(values, 0);

			//values = System.Enum.GetValues (prop.PropertyType);
			Hashtable names = new Hashtable ();
			foreach (FieldInfo f in prop.PropertyType.GetFields ()) {
				DescriptionAttribute att = (DescriptionAttribute) Attribute.GetCustomAttribute (f, typeof(DescriptionAttribute));
				if (att != null)
					names [f.Name] = att.Description;
				else
					names [f.Name] = f.Name;
			}
				       
			
			ebox = new Gtk.EventBox ();
			ebox.Show ();
			PackStart (ebox, true, true, 0);

			combo = Gtk.ComboBoxEntry.NewText ();
			combo.Changed += combo_Changed;
			combo.Entry.IsEditable = false;
			combo.Entry.CanFocus = false;
			combo.Entry.HasFrame = false;
			combo.Entry.HeightRequest = combo.SizeRequest ().Height;
			combo.Show ();
			ebox.Add (combo);

            foreach (TraceLab.Core.Components.EnumValue value in values) {
				string str = prop.Converter.ConvertToString (value);
				if (names.Contains (str))
					str = (string) names [str];
				combo.AppendText (str);
			}
		}
Пример #57
0
 public Gtk.EventBox AddLabelWidget(Gtk.Label label)
 {
     box.Remove (clear_button);
     statusLabelEventBox = new Gtk.EventBox ();
     statusLabelEventBox.Child = label;
     box.PackStart (statusLabelEventBox, false, false, 0);
     box.PackStart (clear_button, false, false, 0);
     UpdateStyle ();
     box.ShowAll ();
     return statusLabelEventBox;
 }
Пример #58
0
		void Fill ()
		{
			menuItems.Clear ();

			uint n = 0;
			ActionMenuItem editItem = null;
			
			if (nodes.Count > 0) {
				foreach (ActionTreeNode node in nodes) {
					ActionMenuItem item = new ActionMenuItem (wrapper, this, node);
					item.KeyPressEvent += OnItemKeyPress;
					item.Attach (table, n++, 0);
					menuItems.Add (item);
					// If adding an action with an empty name, select and start editing it
//					if (node.Action != null && node.Action.Name.Length == 0)
//						editItem = item;
				}
			}
			
			emptyLabel = new Gtk.EventBox ();
			emptyLabel.VisibleWindow = false;
			Gtk.Label label = new Gtk.Label ();
			label.Xalign = 0;
			label.Markup = "<i><span foreground='darkgrey'>" + Catalog.GetString ("Click to create action") + "</span></i>";
			emptyLabel.Add (label);
			emptyLabel.ButtonPressEvent += OnAddClicked;
			table.Attach (emptyLabel, 1, 2, n, n + 1);
			
			ShowAll ();
			
			if (editItem != null) {
				// If there is an item with an empty action, it means that it was an item that was
				// being edited. Restart the editing now.
				GLib.Timeout.Add (200, delegate {
					editItem.Select ();
					editItem.EditingDone += OnEditingDone;
					editItem.StartEditing ();
					return false;
				});
			}
		}
Пример #59
0
        public ChatView(ChatModel chat)
        {
            Trace.Call(chat);

            _ChatModel = chat;

            IsAutoScrolling = true;
            MessageTextView tv = new MessageTextView();
            _EndMark = tv.Buffer.CreateMark("end", tv.Buffer.EndIter, false);
            tv.ShowTimestamps = true;
            tv.ShowMarkerline = true;
            tv.Editable = false;
            tv.CursorVisible = true;
            tv.WrapMode = Gtk.WrapMode.Char;
            tv.MessageAdded += OnMessageTextViewMessageAdded;
            tv.MessageHighlighted += OnMessageTextViewMessageHighlighted;
            tv.PopulatePopup += OnMessageTextViewPopulatePopup;
            tv.SizeRequested += delegate {
                AutoScroll();
            };
            tv.PersonClicked += OnMessageTextViewPersonClicked;
            _OutputMessageTextView = tv;

            Gtk.ScrolledWindow sw = new Gtk.ScrolledWindow();
            _OutputScrolledWindow = sw;
            //sw.HscrollbarPolicy = Gtk.PolicyType.Never;
            sw.HscrollbarPolicy = Gtk.PolicyType.Automatic;
            sw.VscrollbarPolicy = Gtk.PolicyType.Always;
            sw.ShadowType = Gtk.ShadowType.In;
            sw.Vadjustment.ValueChanged += OnVadjustmentValueChanged;
            sw.Add(_OutputMessageTextView);

            // popup menu
            _TabMenu = new Gtk.Menu();
            _TabMenu.Shown += OnTabMenuShown;

            //FocusChild = _OutputTextView;
            //CanFocus = false;

            _TabLabel = new Gtk.Label();

            TabImage = DefaultTabImage;
            _TabHBox = new Gtk.HBox();
            _TabHBox.PackEnd(new Gtk.Fixed(), true, true, 0);
            _TabHBox.PackEnd(_TabLabel, false, false, 0);
            _TabHBox.PackStart(TabImage, false, false, 2);
            _TabHBox.ShowAll();

            _TabEventBox = new Gtk.EventBox();
            _TabEventBox.VisibleWindow = false;
            _TabEventBox.ButtonPressEvent += new Gtk.ButtonPressEventHandler(OnTabButtonPress);
            _TabEventBox.Add(_TabHBox);
            _TabEventBox.ShowAll();

            _ThemeSettings = new ThemeSettings();

            // OPT-TODO: this should use a TaskStack instead of TaskQueue
            _LastSeenHighlightQueue = new TaskQueue("LastSeenHighlightQueue("+ID+")");
            _LastSeenHighlightQueue.AbortedEvent += OnLastSeenHighlightQueueAbortedEvent;
            _LastSeenHighlightQueue.ExceptionEvent += OnLastSeenHighlightQueueExceptionEvent;
        }
        public void Initialize(EditSession session)
        {
            PropertyDescriptor prop = session.Property;

            if (!prop.PropertyType.IsEnum)
                throw new ApplicationException (Catalog.GetString("Enumeration editor does not support editing values of type ") + prop.PropertyType);

            values = System.Enum.GetValues (prop.PropertyType);
            Hashtable names = new Hashtable ();
            foreach (FieldInfo f in prop.PropertyType.GetFields ()) {
                DescriptionAttribute att = (DescriptionAttribute) Attribute.GetCustomAttribute (f, typeof(DescriptionAttribute));
                if (att != null)
                    names [f.Name] = att.Description;
                else
                    names [f.Name] = f.Name;
            }

            ebox = new Gtk.EventBox ();
            ebox.Show ();
            PackStart (ebox, true, true, 0);

            combo = Gtk.ComboBoxEntry.NewText ();
            combo.Changed += combo_Changed;
            combo.Entry.IsEditable = false;
            combo.Entry.CanFocus = false;
            combo.Entry.HasFrame = false;
            combo.Entry.HeightRequest = combo.SizeRequest ().Height;
            combo.Show ();
            ebox.Add (combo);

            foreach (object value in values) {
                string str = prop.Converter.ConvertToString (value);
                if (names.Contains (str))
                    str = (string) names [str];
                combo.AppendText (str);
            }
        }