NotifyWidgetAdded() private method

private NotifyWidgetAdded ( object obj, string name, string typeName ) : void
obj object
name string
typeName string
return void
コード例 #1
0
        public void AddWidget(Gtk.Widget widget)
        {
            if (!typeof(Gtk.Container).IsInstanceOfType(widget))
            {
                throw new System.ArgumentException("widget", "Only containers can be top level widgets");
            }
            topLevels.Add(new WidgetData(null, null, widget));

            if (!loading)
            {
                Stetic.Wrapper.Widget ww = Stetic.Wrapper.Widget.Lookup(widget);
                if (ww == null)
                {
                    throw new InvalidOperationException("Widget not wrapped");
                }
                if (frontend != null)
                {
                    frontend.NotifyWidgetAdded(Component.GetSafeReference(ww), widget.Name, ww.ClassDescriptor.Name);
                }
                OnWidgetAdded(new Stetic.Wrapper.WidgetEventArgs(ww));
            }
        }