예제 #1
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));
        }