/// ------------------------------------------------------------------------------------- /// <summary> /// Configurer should call this method for each shared subordinate stream (such as /// foootnotes) after creating the main stream. /// </summary> /// <param name="stream">The shared subordinate stream.</param> /// <param name="vc">The view constructor to be used for laying out this stream</param> /// <param name="subStreamDelegate">Implements view-specific callback methods</param> /// ------------------------------------------------------------------------------------- public void AddSharedSubordinateStream(IVwLayoutStream stream, IVwViewConstructor vc, ISubordinateStreamDelegate subStreamDelegate) { CheckDisposed(); SubordinateStream subStream; subStream.m_fShared = true; subStream.m_vc = vc; subStream.m_delegate = subStreamDelegate; subStream.m_stream = stream; // We're not always the manager for the shared stream, but sometimes, and it is // better to have a valid object as manager then to get a crash :-) subStream.m_stream.SetManager(this); m_subStreams.Add(subStream); }
/// ------------------------------------------------------------------------------------- /// <summary> /// Configurer should call this method for each subordinate stream (such as foootnotes) /// after creating the main stream. /// </summary> /// <param name="hvoRoot">Top-level object to be displayed in this stream.</param> /// <param name="frag">The id of the top-level fragment for this stream</param> /// <param name="vc">The view constructor to be used for laying out this stream</param> /// <param name="subStreamDelegate">Implements view-specific callback methods</param> /// ------------------------------------------------------------------------------------- public void AddSubordinateStream(int hvoRoot, int frag, IVwViewConstructor vc, ISubordinateStreamDelegate subStreamDelegate) { CheckDisposed(); SubordinateStream subStream; subStream.m_fShared = false; subStream.m_vc = vc; subStream.m_delegate = subStreamDelegate; subStream.m_stream = VwLayoutStreamClass.Create(); PublicationControl.SetAccessibleStreamName(subStream.m_stream, Publication.AccessibleName + "_SubordinateStream"); subStream.m_stream.SetManager(this); IVwRootBox rootbox = (IVwRootBox)subStream.m_stream; rootbox.SetSite(Publication); rootbox.DataAccess = m_configurer.DataAccess; rootbox.SetRootObject(hvoRoot, vc, frag, m_configurer.StyleSheet); m_subStreams.Add(subStream); }