예제 #1
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddSimpleConstructor <AcceleratorItem, string, string, string, string>(
                (s, k, m, f) => new AcceleratorItem(s, k.ConvertEX <Gdk.Key>(), m.ConvertEX <Gdk.ModifierType>(), f.ConvertEX <AccelFlags>())
                );

            engine.AddSimpleConstructor <AcceleratorItem, string, string, string>(
                (s, k, m) => new AcceleratorItem(s, k.ConvertEX <Gdk.Key>(), m.ConvertEX <Gdk.ModifierType>())
                );

            engine.AddSimpleConstructor <AcceleratorItem, string, string>(
                (s, p) => new AcceleratorItem(s, p)
                );

            engine.AddSingleStaticChildInfo <Widget, AcceleratorItem>("accelerator", (w, a) => w.AddBasicAccelerator(a));
        }
예제 #2
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddSimpleInstancer <Notebook>("TabControl");
            engine.AddPublicPropertyAttributeLinksForType <Notebook>();

            engine.AddGeneralModifier <Notebook>(n => n.Shown += (s, e) =>
                                                                 n.GetTabs().Process(t => t.ShowAll())
                                                 );

            engine.AddSelectableDynamicChildrenInfo <Notebook, NotebookItem>(
                (n, i) => n.RemoveNotebookItemAt(i),
                (n, i) => n.AddNotebookItem(i),
                (n, p, i) => n.InsertNotebookItem(p, i)
                )
            .AddSingleIndexChildSelectorLinkInfo("selected", "Page");

            engine.AddSimpleConstructor <NotebookItem, string, Widget>("TabItem", (t, p) => new NotebookItem(t, p));
            engine.AddSimpleConstructor <NotebookItem, Widget, Widget>("TabItem", (t, p) => new NotebookItem(t, p));
        }