public GuiTreeviewRenderer( IGuiLayout guiLayout, IRowClickableLocations <TSource> rowClickableLocations, ICachingObserver <TSource> itemCache, ITreeviewRowRenderer <TSource> treeviewRowRenderer) { if (guiLayout == null) { throw new ArgumentNullException("guiLayout"); } if (rowClickableLocations == null) { throw new ArgumentNullException("rowClickableLocations"); } if (itemCache == null) { throw new ArgumentNullException("itemCache"); } if (treeviewRowRenderer == null) { throw new ArgumentNullException("treeviewRowRenderer"); } this.guiLayout = guiLayout; this.rowClickableLocations = rowClickableLocations; this.itemCache = itemCache; this.treeviewRowRenderer = treeviewRowRenderer; this.itemCache = itemCache; }
private void DefaultInit() { if (this.treeviewIcons == null) { this.treeviewIcons = new TextureAssetTreeviewIcons <Treeview_DataModel>(); } this.iconRenderer = new GuiTreeviewIconRenderer <Treeview_DataModel>(this.gui, this.treeviewIcons); this.hierarchyLinesRenderer = new TreeviewHierarchyLinesRenderer <Treeview_DataModel>(this.iconRenderer); this.rowRenderer = new GuiTreeviewRowRenderer <Treeview_DataModel>(this.guiLayout, this.iconRenderer, this.rowClickableLocations, this.hierarchyLinesRenderer); this.treeviewRenderer = new GuiTreeviewRenderer <Treeview_DataModel>(this.guiLayout, this.rowClickableLocations, this.cachingObserver, this.rowRenderer); this.treeview = new Treeview <Treeview_DataModel>(); }