Re: Creating composite PopupMenuItems

2012-05-29 Thread Amy C
On 30 May 2012 12:42, Jasper St. Pierre wrote: >> It all works up until I try to add the PopupSwitchMenuItem to the >> St.BoxLayout, complaining about "Object 0x... proto 0x... doesn't have >> a dynamically registered class, it has Object". > > Right, PopupSwitchMenuItem is a JS object, not a Clut

Re: Creating composite PopupMenuItems

2012-05-29 Thread Jasper St. Pierre
On Tue, May 29, 2012 at 10:31 PM, Amy C wrote: > Ok, I've tried creating a St.BoxLayout to hold the St.Button, St.Icon > and PopupSwitchMenuItem in like so (snippet): > >  this.box = new St.BoxLayout({vertical: false}); > >  this.button = new St.Button(...); >  this.box.add(this.button); > >  this

Re: Creating composite PopupMenuItems

2012-05-29 Thread Amy C
Ok, I've tried creating a St.BoxLayout to hold the St.Button, St.Icon and PopupSwitchMenuItem in like so (snippet): this.box = new St.BoxLayout({vertical: false}); this.button = new St.Button(...); this.box.add(this.button); this.icon = new St.Icon(...); this.box.add(this.icon); thi

Re: Creating composite PopupMenuItems

2012-05-28 Thread Amy C
But PopupSwitchMenuItem/PopupBaseMenuItem do not have this method, only addActor, and menuItem.actor.insert_child_at_index seems not to exist. If I use insert_child_at_index on some private member of the PopupSwitchMenuItem I'd have to make sure I did everything else that PopupSwitchMenuItem.addAc

Re: Creating composite PopupMenuItems

2012-05-28 Thread Tim
you can use `insert_child_at_index()` to put actor before existing ones On 29/05/12 14:15, Amy C wrote: > Hi all, > > I'd like to create a PopupMenuItem that is basically a > PopupSwitchMenuItem (the label + toggle) and to the *left* of that, a > button and an icon. > > Now if the button/icon were

Creating composite PopupMenuItems

2012-05-28 Thread Amy C
Hi all, I'd like to create a PopupMenuItem that is basically a PopupSwitchMenuItem (the label + toggle) and to the *left* of that, a button and an icon. Now if the button/icon were to the right I'd just create a PopupSwitchMenuItem and call .addActor( theButton ) and .addActor( theIcon ). How ca