9d04b4dd06
the child properties for a given widget in a container, and generate the child properties as properties on those classes. * parser/gapi2xml.pl (addPropElem): don't prepend "child_" to child prop names any more * generator/ClassBase.cs (ClassBase): keep childprops separate from properties (GenChildProperties): create a subclass of Gtk.ContainerChild containing the container type's child properties, and override the Container indexer to return that type. * generator/ObjectGen.cs (Generate): call GenChildProperties * generator/Property.cs: * generator/ChildProperty.cs: Simplify these a bunch, since * child properties are now represented as C# properties as well. Also add [GLib.Property(cname)] and [Gtk.ChildProperty(cname)] attributes. * glib/Makefile.am (sources): add PropertyAttribute.cs * glib/PropertyAttribute.cs: attribute used to label GObject properties * gtk/Makefile.am (sources): add ChildPropertyAttribute.cs * gtk/gtk-api.raw: regenerate for parser changes (remove "Child"/"child_" from child property names). * gtk/ChildPropertyAttribute.cs: attribute used to label GtkContainer child properties * gtk/Container.custom: define the ContainerChild class, and an indexer to return instances of it. * doc/en/Gtk/: update for container child property change svn path=/trunk/gtk-sharp/; revision=36284
40 lines
1 KiB
C#
40 lines
1 KiB
C#
// ChildPropertyAttribute.cs
|
|
//
|
|
// Copyright (c) 2004 Novell, Inc.
|
|
//
|
|
// This program is free software; you can redistribute it and/or
|
|
// modify it under the terms of version 2 of the Lesser GNU General
|
|
// Public License as published by the Free Software Foundation.
|
|
//
|
|
// This program is distributed in the hope that it will be useful,
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
// Lesser General Public License for more details.
|
|
//
|
|
// You should have received a copy of the GNU Lesser General Public
|
|
// License along with this program; if not, write to the
|
|
// Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
|
// Boston, MA 02111-1307, USA.
|
|
|
|
|
|
namespace Gtk {
|
|
using System;
|
|
|
|
public sealed class ChildPropertyAttribute : Attribute {
|
|
string name;
|
|
|
|
public ChildPropertyAttribute (string name)
|
|
{
|
|
this.name = name;
|
|
}
|
|
|
|
public string Name {
|
|
get {
|
|
return name;
|
|
}
|
|
set {
|
|
name = value;
|
|
}
|
|
}
|
|
}
|
|
}
|