示例#1
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddSimpleInstancer <Label>("Text");
            engine.AddPublicPropertyAttributeLinksForType <Label>();

            engine.AddSimpleInstancer <AccelLabel>();
            engine.AddPublicPropertyAttributeLinksForType <AccelLabel>();
        }
示例#2
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddSimpleInstancer("HorizontalSlider", () => new HScale(0.0, 1.0, 0.01));
            engine.AddPublicPropertyAttributeLinksForType <HScale>();

            engine.AddSimpleInstancer("VerticalSlider", () => new VScale(0.0, 1.0, 0.01));
            engine.AddPublicPropertyAttributeLinksForType <VScale>();

            engine.AddLinkInfo <Scale>("minimum", "Adjustment.Lower");
            engine.AddLinkInfo <Scale>("maximum", "Adjustment.Upper");
        }
示例#3
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddSimpleInstancer <LevelBar>();
            engine.AddPublicPropertyAttributeLinksForType <LevelBar>();

            engine.AddSimpleInstancer <ProgressBar>();
            engine.AddPublicPropertyAttributeLinksForType <ProgressBar>();

            engine.AddSimpleInstancer <HScrollbar>("HorizontalScrollbar");
            engine.AddPublicPropertyAttributeLinksForType <HScrollbar>();

            engine.AddSimpleInstancer <VScrollbar>("VectricalScrollbar");
            engine.AddPublicPropertyAttributeLinksForType <VScrollbar>();
        }
示例#4
0
        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>();
        }
示例#5
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddSimpleInstancer <ComboBoxText>("ComboBox");
            engine.AddPublicPropertyAttributeLinksForType <ComboBoxText>();

            engine.AddDynamicChildrenInfo <ComboBoxText, string>(
                (b, i) => b.Remove(i),
                (b, s) => b.AppendText(s),
                (b, i, s) => b.InsertText(i, s)
                );
        }
示例#6
0
        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)
                );
        }
示例#7
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddDynamicChildrenInfo <Container, Widget>((c, i) => c.RemoveChildAt(i), (c, w) => c.AddChild(w), (c, i, w) => c.InsertChild(i, w));

            engine.AddSimpleInstancer("HorizontalLayout", () => new Box(Orientation.Horizontal, 0));
            engine.AddSimpleInstancer("VerticalLayout", () => new Box(Orientation.Vertical, 0));
            engine.AddPublicPropertyAttributeLinksForType <Box>();

            engine.AddSimpleInstancer <Grid>();
            engine.AddPublicPropertyAttributeLinksForType <Grid>();

            engine.AddChildPropertyOfParentLinkInfo <Grid, Widget, int>("row", "top-attach");
            engine.AddChildPropertyOfParentLinkInfo <Grid, Widget, int>("column", "left-attach");

            engine.AddChildPropertyOfParentLinkInfo <Grid, Widget, int>("row_span", "height");
            engine.AddChildPropertyOfParentLinkInfo <Grid, Widget, int>("column_span", "width");

            engine.AddSimpleInstancer <HPaned>("HorizontalSplitContainer");
            engine.AddPublicPropertyAttributeLinksForType <HPaned>();

            engine.AddSimpleInstancer <VPaned>("VerticalSplitContainer");
            engine.AddPublicPropertyAttributeLinksForType <VPaned>();

            engine.AddSingleDynamicChildInfo <Paned, Widget>("child1", (p, w) => p.Add1(w));
            engine.AddSingleDynamicChildInfo <Paned, Widget>("child2", (p, w) => p.Add2(w));
            engine.AddStaticChildrenInfo <Paned, Widget>((p, w) => p.Add(w));

            engine.AddSimpleInstancer <FlowBox>();
            engine.AddPublicPropertyAttributeLinksForType <FlowBox>();
        }
示例#8
0
        static public void Initilize(GtkEngine engine)
        {
            engine.AddSimpleInstancer <Entry>("TextField");
            engine.AddPublicPropertyAttributeLinksForType <Entry>();

            engine.AddVariationInstancer <Entry>("SmallField", "TextField", e => {
                e.Focused += (o, args) => e.SelectAllText();
            });

            engine.AddVariationInstancer <Entry>("StringField", "SmallField", b => {
                b.InputPurpose = InputPurpose.FreeForm;
            });
            engine.AddVariationInstancer <Entry>("IntField", "SmallField", b => {
                b.InputPurpose = InputPurpose.Number;
            });
            engine.AddVariationInstancer <Entry>("FloatField", "SmallField", b => {
                b.InputPurpose = InputPurpose.Number;
            });

            engine.AddLinkInfo <Entry, string>("value", (e, v) => e.Text = v, e => e.Text);

            engine.AddSimpleInstancer <TextView>("TextBox");
            engine.AddPublicPropertyAttributeLinksForType <TextView>();
        }
示例#9
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));
        }
示例#10
0
 static public void Initilize(GtkEngine engine)
 {
     engine.AddSimpleInstancer <ScrolledWindow>("ScrollViewer");
     engine.AddPublicPropertyAttributeLinksForType <ScrolledWindow>();
 }
示例#11
0
 static public void Initilize(GtkEngine engine)
 {
     engine.AddSimpleInstancer <ListBox>();
     engine.AddPublicPropertyAttributeLinksForType <ListBox>();
 }
示例#12
0
 static public void Initilize(GtkEngine engine)
 {
     engine.AddSimpleInstancer <CustomDialog>("Dialog");
     engine.AddPublicPropertyAttributeLinksForType <CustomDialog>();
 }
示例#13
0
 static public void Initilize(GtkEngine engine)
 {
     engine.AddSimpleInstancer("Window", () => new Window(WindowType.Toplevel));
     engine.AddPublicPropertyAttributeLinksForType <Window>();
 }