This repository has been archived by the owner on Mar 6, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 29
/
ProtogameUserInterfaceModule.cs
81 lines (77 loc) · 4.92 KB
/
ProtogameUserInterfaceModule.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
using Protoinject;
namespace Protogame
{
public class ProtogameUserInterfaceModule : IProtoinjectModule
{
public void Load(IKernel kernel)
{
kernel.Bind<IUserInterfaceFactory>().ToFactory();
kernel.Bind<IUserInterfaceController>().To<DefaultUserInterfaceController>().AllowManyPerScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<CanvasUserInterfaceNodeProcessor>()
.Named("canvas")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<ContainerUserInterfaceNodeProcessor>()
.Named("container")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<ButtonUserInterfaceNodeProcessor>()
.Named("button")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<TextBoxUserInterfaceNodeProcessor>()
.Named("textbox")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<LabelUserInterfaceNodeProcessor>()
.Named("label")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<ListViewUserInterfaceNodeProcessor>()
.Named("listview")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<ListItemUserInterfaceNodeProcessor>()
.Named("listitem")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<CanvasFragmentUserInterfaceNodeProcessor>()
.Named("fragment")
.InSingletonScope();
kernel.Bind<IUserInterfaceNodeProcessor>()
.To<TextureUserInterfaceNodeProcessor>()
.Named("texture")
.InSingletonScope();
kernel.Bind<ISkinRenderer<AdjustedContainer>>().To<BasicAdjustedContainerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<AudioPlayer>>().To<BasicAudioPlayerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<Button>>().To<BasicButtonSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<Canvas>>().To<BasicCanvasSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<FileSelect>>().To<BasicFileSelectSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<FixedContainer>>().To<BasicFixedContainerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<FontViewer>>().To<BasicFontViewerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<Form>>().To<BasicFormSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<HorizontalContainer>>().To<BasicHorizontalContainerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<Label>>().To<BasicLabelSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<Link>>().To<BasicLinkSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<ListItem>>().To<BasicListItemSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<ListView>>().To<BasicListViewSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<MainMenu>>().To<BasicMainMenuSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<MenuItem>>().To<BasicMenuItemSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<RelativeContainer>>().To<BasicRelativeContainerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<ScrollableContainer>>().To<BasicScrollableContainerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<SingleContainer>>().To<BasicSingleContainerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<TextBox>>().To<BasicTextBoxSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<TextureViewer>>().To<BasicTextureViewerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<TreeItem>>().To<BasicTreeItemSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<TreeView>>().To<BasicTreeViewSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<VerticalContainer>>().To<BasicVerticalContainerSkinRenderer>().InSingletonScope();
kernel.Bind<ISkinRenderer<Window>>().To<BasicWindowSkinRenderer>().InSingletonScope();
kernel.Bind<IBasicSkinHelper>().To<BasicSkinHelper>().InSingletonScope();
kernel.Bind<ISkinLayout>().To<BasicSkinLayout>().InSingletonScope();
kernel.Bind<ISkinDelegator>().To<DefaultSkinDelegator>().InSingletonScope();
kernel.Bind<ILayoutPosition>().To<DefaultLayoutPosition>().InSingletonScope();
kernel.Bind<INodeColorParser>().To<DefaultNodeColorParser>().InSingletonScope();
}
}
}