<!--#include virtual="/NR/System/WBC/Internals/Main/WBCApp.inc"-->

<!--#include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/UIStringConstants/InternalLinksUIStrings.inc" -->
<!--#include virtual="/NR/System/WBC/Customizable/WBCFuncPagesConfig/MLSDisplayConfig/SiteBrowseDlgsConfig.inc" -->

<!--#include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/InternalLinks/EntryProgrammingConstants.inc" -->
<!--#include virtual="/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/InternalLinks/InternalProgrammingConstants.inc" -->

<!--#include virtual="/NR/System/WBC/Internals/ServerControls/TreeControl/CNCTreeControl.inc"-->
<!--#include virtual="/NR/System/WBC/Internals/ServerControls/TreeControl/CNCTreeDom_NRChannels.inc"-->
<!--#include file="CNCTreeRenderer_InternalLinks.inc" -->

<%
' ********************************************************************
' Copyright (C) 2001 Microsoft Corporation. All rights reserved.
'
'	IMPORTANT.  Please read the legal.txt file, located in the
'	"<CMS Install Directory>\Server\httpexec\WBC\Internals"
'	directory, governing the use of this internal file."
' ********************************************************************

' ********************************************************************
' File:		/NR/System/WBC/Internals/WBCFuncPages/Cross-Browser/PageOperation/
'			/EditMode/PageCopy/CNCASPPageManager_TreeFrame.inc
' Version: 	Microsoft Content Management Server
' Author:	Microsoft Corporation.
' Purpose:	Encapsulate the ASP logic associated with ChannelsBrowse.asp
'
' Implements the INCASPPageManager interface:
'	- Sub InitManager()
'
' Exposes the following properties:
'	- Property TreeControl
'	- Property ASPUtilsObject
'	- Property CodePage
'	- Property Charset
'	- Property Error
' ********************************************************************

Class CNCASPPageManager_TreeFrame

	Public TreeControl

	' -- For MLS display
	Public ASPUtilsObject
	Public Charset
	Public CodePage

	' -- Error code
	Public Error


	' ---- [Private] Class standard initialization routine
	Private Sub Class_Initialize()
		Set TreeControl= Nothing
		Set ASPUtilsObject = Nothing
		Error = ""
	End Sub

	' ---- [Public] InitManager will take care of all programming logic in the ASP page
	Public Sub InitManager()
		Call SetupTreeControl()

		' -- Setup MLS Info
		Call SetupMLSInfo()
	End Sub

	' ---- [Private] Set up TreeControl for displaying Channels as a Tree
	Private Sub SetupTreeControl()
		Set TreeControl = New CNCTreeControl

		Dim pNCTreeDom, pNCTreeRenderer
		Set pNCTreeDom = New CNCTreeDom_NRChannels
		Set pNCTreeRenderer = New CNCTreeRenderer_InternalLinks
		If (Request.QueryString(IDS_QSTR_INTERNALLINKS_FRESHTREE) = IDS_INTERNALLINKS_FRESHTREE_TRUE) Then
			Call TreeControl.InitTreeControl( "InternalLinks", pNCTreeDom, pNCTreeRenderer, True)
		Else
			Call TreeControl.InitTreeControl( "InternalLinks", pNCTreeDom, pNCTreeRenderer, False)
		End If

		' During round trip, these QPARAM will be retained when come back from server
		Call TreeControl.PropagateParameter( IDS_QSTR_INTERNALLINKS_FRESHTREE, IDS_INTERNALLINKS_FRESHTREE_FALSE )
		Call TreeControl.PropagateParameter( "NRMODE", "Unpublished" )

		TreeControl.DisplayLeafs = True
		TreeControl.IndentWidth = 15
		TreeControl.NodeSpacing = 2
		TreeControl.NodePadding = 2
		TreeControl.EnableJavaScriptHooks = True
	End Sub

	' ---- [Private] Set up the MLS info this ASP page will be running under
	Private Sub SetupMLSInfo()
		Set ASPUtilsObject = GetInitializedASPUtils()
		' -- there is no current object context so pass in Nothing
		CodePage = GetCodePageForSiteBrowse( Nothing, ASPUtilsObject )
		Charset = GetCharacterSetForSiteBrowse( Nothing )
	End Sub

End Class

%>
