Esempio n. 1
0
 /// <summary>
 /// detatch ReneringWindow from this RenderingSurface
 /// </summary>
 /// <param name="w"></param>
 protected void DetatchWindow(RenderingWindow w)
 {
     if (d_windows.Remove(w))
     {
         Invalidate();
     }
 }
Esempio n. 2
0
        /// <summary>
        /// Create and return a reference to a child RenderingWindow object that
        /// will render back onto this RenderingSurface when it's draw member
        /// function is called.
        ///
        /// The RenderingWindow returned is initially owned by the RenderingSurface
        /// that created it.
        /// </summary>
        /// <param name="target">
        ///     TextureTarget object that will receive rendered output from the
        ///     RenderingWindow being creatd.
        /// </param>
        /// <returns>
        /// Reference to a RenderingWindow object.
        /// </returns>
        /// <remarks>
        /// Since RenderingWindow is a RenderingSurface, the same note from the
        /// constructor applies here, and that is the passed in TextureTarget
        /// remains under the ownership of whichever part of the system created
        /// it.
        /// </remarks>
        public virtual RenderingWindow CreateRenderingWindow(ITextureTarget target)
        {
            var w = new RenderingWindow(target, this);

            AttachWindow(w);
            return(w);
        }
Esempio n. 3
0
 /// <summary>
 /// Destroy a RenderingWindow we own.  If we are not the present owner of
 /// the given RenderingWindow, nothing happens.
 /// </summary>
 /// <param name="window">
 /// RenderingWindow object that is to be destroyed.
 /// </param>
 /// <remarks>
 /// Destroying a RenderingWindow will not also destroy the TextureTarget
 /// that was given when the RenderingWindow was created.  The TextureTarget
 /// should be destoyed elsewhere.
 /// </remarks>
 public virtual void DestroyRenderingWindow(RenderingWindow window)
 {
     if (window.GetOwner() == this)
     {
         DetatchWindow(window);
         // TODO: CEGUI_DELETE_AO & window;
     }
 }
Esempio n. 4
0
        /// <summary>
        /// Transfer ownership of the given RenderingWindow to this
        /// RenderingSurface.  The result is \e generally the same as if this
        /// RenderingSurface had created the RenderingWindow in the first place.
        /// </summary>
        /// <param name="window">
        /// RenderingWindow object that this RenderingSurface is to take ownership of.
        /// </param>
        public virtual void TransferRenderingWindow(RenderingWindow window)
        {
            if (window.GetOwner() != this)
            {
                // detach window from it's current owner
                window.GetOwner().DetatchWindow(window);
                // add window to this surface.
                AttachWindow(window);

                window.SetOwner(this);
            }
        }
Esempio n. 5
0
 /// <summary>
 /// attach ReneringWindow from this RenderingSurface
 /// </summary>
 /// <param name="w"></param>
 protected void AttachWindow(RenderingWindow w)
 {
     d_windows.Add(w);
     Invalidate();
 }