static public void Initilize(GtkEngine engine) { engine.AddSimpleInstancer <Button>(); engine.AddPublicPropertyAttributeLinksForType <Button>(); engine.AddFunctionInfo <Button>("action", (b, s) => b.Clicked += s.GetEventHandler()); engine.AddSimpleInstancer <ToggleButton>("Toggle"); engine.AddPublicPropertyAttributeLinksForType <ToggleButton>(); engine.AddSimpleInstancer <Switch>(); engine.AddPublicPropertyAttributeLinksForType <Switch>(); engine.AddSimpleInstancer <CheckButton>("CheckBox"); engine.AddPublicPropertyAttributeLinksForType <CheckButton>(); }
static public void Initilize(GtkEngine engine) { engine.AddSimpleInstancer <MenuBar>("Menu"); engine.AddPublicPropertyAttributeLinksForType <MenuBar>(); engine.AddSimpleInstancer <MenuItem>("MenuItem"); engine.AddPublicPropertyAttributeLinksForType <MenuItem>(); engine.AddLinkInfo <MenuItem, string>("label", (i, s) => i.SetChild(new AccelLabel(s).Chain(l => l.AccelWidget = i)) ); engine.AddFunctionInfo <MenuItem>("action", (i, s) => i.Activated += s.GetEventHandler()); engine.AddSingleDynamicChildInfo <MenuItem, Widget>("contents", (i, w) => i.SetChild(w)); engine.AddDynamicChildrenInfo <MenuItem, MenuItem>( (i, p) => i.RemoveSubmenuChildAt(p), (i, c) => i.AddSubmenuChild(c), (i, p, c) => i.InsertSubmenuChild(p, c) ); }