On Fri, 2011-02-25 at 01:57 +0100, Chris Kühl wrote: > On Wed, Feb 23, 2011 at 9:11 PM, Brian Gregg <[email protected]> > wrote: > > Hi all, > > > > Someone on IRC suggested I email this list, specifically asking for Chris > > Kuhl. > > > > I'm having trouble with Clutter::Scritable (cluttermm-1.2 if that matters, > > OS X as well). I'm looking for a simple example of how to implement the > > Clutter::Scriptable interface so I can script my custom Clutter::Actor's. > > I don't need any custom properties right now, I just want to be able to > > script the properties of Clutter::Actor (width, height, position, etc.). > > > > Hi Brian, > > Being that the JSON objects are using C-types it's not clear to me yet > how to script a custom actor using cluttermm. I'll look at this more > deeply tomorrow.
You can define a custom GType when deriving in C++. You must call the virtual base constructor (weirdness ahoy) in your initializer list: http://git.gnome.org/browse/gtkmm-documentation/tree/examples/book/custom/custom_widget/mywidget.cc#n26 Then you can presumably just mention that GType name in your JSON script. If it helps, you can add regular GObject properties by just using Glib:property_proxy<> as a member variable. > However, from what you are describing you may be able to use the > simple Clutter::Script example I just committed. > http://git.gnome.org/browse/cluttermm/tree/examples/script.cc > > Sorry I can't be more helpful at the moment. -- [email protected] www.murrayc.com www.openismus.com _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
