Example #1
0
        static public void SetPacking(Stetic.Wrapper.Container.ContainerChild wrapper, XmlElement child_elem)
        {
            XmlElement packing = child_elem["packing"];

            if (packing == null)
            {
                return;
            }

            Gtk.Container.ContainerChild cc = wrapper.Wrapped as Gtk.Container.ContainerChild;

            TypedClassDescriptor klass = wrapper.ClassDescriptor as TypedClassDescriptor;

            if (klass == null)
            {
                throw new GladeException("The widget class " + cc.GetType() + " is not supported by Glade");
            }

            Hashtable rawProps, overrideProps;

            ExtractProperties(klass, packing, out rawProps, out overrideProps);

            string[]     propNames;
            GLib.Value[] propVals;
            ParseProperties(cc.Parent.GetType(), true, rawProps.Values,
                            out propNames, out propVals);

            for (int i = 0; i < propNames.Length; i++)
            {
                cc.Parent.ChildSetProperty(cc.Child, propNames[i], propVals[i]);
            }
            MarkTranslatables(cc, rawProps);

            SetOverrideProperties(wrapper, overrideProps);
            MarkTranslatables(cc, overrideProps);
        }