Ejemplo n.º 1
0
 /// <summary>
 /// The core of the Draw() method, where the rectangle actually gets painted.
 /// Vertical views use a rotated drawing routine.
 /// </summary>
 /// <param name="vdrb"></param>
 /// <param name="rootb"></param>
 /// <param name="hdc"></param>
 /// <param name="drawRect"></param>
 /// <param name="backColor"></param>
 /// <param name="drawSel"></param>
 /// <param name="clipRect"></param>
 public virtual void DrawTheRoot(IVwDrawRootBuffered vdrb, IVwRootBox rootb, IntPtr hdc,
                                 SIL.FieldWorks.Common.Utils.Rect drawRect, uint backColor, bool drawSel,
                                 Rectangle clipRect)
 {
     vdrb.DrawTheRoot(rootb, hdc, clipRect, backColor,
                      drawSel, m_site);
 }
Ejemplo n.º 2
0
 /// -----------------------------------------------------------------------------------
 /// <summary>
 /// The core of the Draw() method, where the rectangle actually gets painted.
 /// Vertical views use a rotated drawing routine.
 /// </summary>
 /// <param name="vdrb"></param>
 /// <param name="rootb"></param>
 /// <param name="hdc"></param>
 /// <param name="drawRect"></param>
 /// <param name="backColor"></param>
 /// <param name="drawSel"></param>
 /// <param name="clipRect"></param>
 /// -----------------------------------------------------------------------------------
 public override void DrawTheRoot(IVwDrawRootBuffered vdrb, IVwRootBox rootb, IntPtr hdc,
                                  Rect drawRect, uint backColor, bool drawSel,
                                  Rectangle clipRect)
 {
     vdrb.DrawTheRootRotated(rootb, hdc, drawRect, backColor,
                             drawSel, m_site, 1);
 }
Ejemplo n.º 3
0
		/// <summary>
		/// The core of the Draw() method, where the rectangle actually gets painted.
		/// Vertical views use a rotated drawing routine.
		/// </summary>
		/// <param name="vdrb"></param>
		/// <param name="rootb"></param>
		/// <param name="hdc"></param>
		/// <param name="drawRect"></param>
		/// <param name="backColor"></param>
		/// <param name="drawSel"></param>
		/// <param name="clipRect"></param>
		public virtual void DrawTheRoot(IVwDrawRootBuffered vdrb, IVwRootBox rootb, IntPtr hdc,
			SIL.FieldWorks.Common.Utils.Rect drawRect, uint backColor, bool drawSel,
			Rectangle clipRect)
		{
			vdrb.DrawTheRoot(rootb, hdc, clipRect, backColor,
				drawSel, m_site);
		}
Ejemplo n.º 4
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// The core of the Draw() method, where the rectangle actually gets painted.
		/// Vertical views use a rotated drawing routine.
		/// </summary>
		/// <param name="vdrb"></param>
		/// <param name="rootb"></param>
		/// <param name="hdc"></param>
		/// <param name="drawRect"></param>
		/// <param name="backColor"></param>
		/// <param name="drawSel"></param>
		/// <param name="clipRect"></param>
		/// -----------------------------------------------------------------------------------
		public override void DrawTheRoot(IVwDrawRootBuffered vdrb, IVwRootBox rootb, IntPtr hdc,
			SIL.Utils.Rect drawRect, uint backColor, bool drawSel,
			Rectangle clipRect)
		{
			vdrb.DrawTheRootRotated(rootb, hdc, drawRect, backColor,
				drawSel, m_site, 1);
		}
Ejemplo n.º 5
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Override this method in your subclass.
		/// It should make a root box and initialize it with appropriate data and
		/// view constructor, etc.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public virtual void MakeRoot()
		{
			CheckDisposed();
			if (!GotCacheOrWs || (DesignMode && !AllowPaintingInDesigner))
				return;

			SetAccessibleName(Name);

#if !__MonoCS__
			m_vdrb = VwDrawRootBufferedClass.Create();
#else
			m_vdrb = new SIL.FieldWorks.Views.VwDrawRootBuffered(); // Managed object on Linux
#endif
			m_fRootboxMade = true;
		}
Ejemplo n.º 6
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			Debug.WriteLineIf(!disposing, "****************** Missing Dispose() call for " + GetType().Name + "******************");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
				// Do this here, before disposing m_messageSequencer,
				// as we still get messages during dispose.
				// Once the the base class has shut down the window handle,
				// we are good to go on.
				// If we find we getting messages during this call,
				// we will be forced to call DestroyHandle() first.
				// That is done part way through the base method code,
				// but it may not be soon enough, for all the re-entrant events
				// that keep showing up.
				m_fAllowLayout = false;
				DestroyHandle();
			}

			base.Dispose(disposing);

			if (disposing)
			{
				if (m_rootb != null)
					CloseRootBox();

				if (m_Timer != null)
				{
					m_Timer.Stop();
					m_Timer.Tick -= OnTimer;
					m_Timer.Dispose();
				}

				// Remove the filter when we are disposed now.
				if (m_messageFilterInstalled)
				{
					Application.RemoveMessageFilter(this);
					m_messageFilterInstalled = false;
				}

				if (m_editingHelper != null)
					m_editingHelper.Dispose();
				if (m_messageSequencer != null)
					m_messageSequencer.Dispose();
				if (m_graphicsManager != null)
				{
					// Uninit() first in case we're in the middle of displaying something.  See LT-7365.
					m_graphicsManager.Uninit();
					m_graphicsManager.Dispose();
				}
				if (components != null)
					components.Dispose();
				#if __MonoCS__
				KeyboardController.Unregister(this);
				#endif
			}

			if (m_vdrb != null && Marshal.IsComObject(m_vdrb))
				Marshal.ReleaseComObject(m_vdrb);
			m_vdrb = null;
			if (m_styleSheet != null && Marshal.IsComObject(m_styleSheet))
				Marshal.ReleaseComObject(m_styleSheet);
			if (m_rootb != null && Marshal.IsComObject(m_rootb))
				Marshal.ReleaseComObject(m_rootb);
			m_rootb = null;
			m_styleSheet = null;
			m_graphicsManager = null;
			m_editingHelper = null;
			m_Timer = null;
			m_mediator = null;
			m_wsf = null;
			m_messageSequencer = null;

			// Don't do it here.
			//base.Dispose( disposing );

			m_fDisposed = true;
		}
Ejemplo n.º 7
0
		/// -----------------------------------------------------------------------------------
		/// <summary>
		/// Clean up any resources being used.
		/// </summary>
		/// -----------------------------------------------------------------------------------
		protected override void Dispose(bool disposing)
		{
			//Debug.WriteLineIf(!disposing, "****************** " + GetType().Name + " 'disposing' is false. ******************");
			// Must not be run more than once.
			if (IsDisposed)
				return;

			if (disposing)
			{
				// Do as early as possible, we don't want to do more spell checking while being disposed.
				Application.Idle -= new EventHandler(Application_Idle);
				// Do this here, before disposing m_messageSequencer,
				// as we still get messages during dispose.
				// Once the the base class has shut down the window handle,
				// we are good to go on.
				// If we find we getting messages during this call,
				// we will be forced to call DestroyHandle() first.
				// That is done part way through the base method code,
				// but it may not be soon enough, for all the re-entrant events
				// that keep showing up.
				DestroyHandle();
			}

			base.Dispose(disposing);

			if (disposing)
			{
				if (m_rootb != null)
					CloseRootBox();

				if (g_focusRootSite == this)
					g_focusRootSite = null;
				if (m_Timer != null)
				{
					m_Timer.Stop();
					m_Timer.Tick -= new EventHandler(OnTimer);
					m_Timer.Dispose();
				}

				// Remove the filter when we are disposed now.
				if (m_messageFilterInstalled)
				{
					Application.RemoveMessageFilter(this);
					m_messageFilterInstalled = false;
				}

				if (m_editingHelper != null)
					m_editingHelper.Dispose();
				if (m_messageSequencer != null)
					m_messageSequencer.Dispose();
				if (m_graphicsManager != null)
				{
					// Uninit() first in case we're in the middle of displaying something.  See LT-7365.
					m_graphicsManager.Uninit();
					m_graphicsManager.Dispose();
				}
				if (components != null)
					components.Dispose();
			}

			if (m_vdrb != null && Marshal.IsComObject(m_vdrb))
				Marshal.ReleaseComObject(m_vdrb);
			m_vdrb = null;
			if (m_styleSheet != null && Marshal.IsComObject(m_styleSheet))
				Marshal.ReleaseComObject(m_styleSheet);
			m_rootb = null;
			m_styleSheet = null;
			m_graphicsManager = null;
			m_editingHelper = null;
			m_Timer = null;
			m_mediator = null;
			m_wsf = null;
			m_styleSheet = null;
			m_savedSelection = null;
			m_messageSequencer = null;

			// Don't do it here.
			//base.Dispose( disposing );

			m_fDisposed = true;
		}
Ejemplo n.º 8
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Override this method in your subclass.
		/// It should make a root box and initialize it with appropriate data and
		/// view constructor, etc.
		/// </summary>
		/// ------------------------------------------------------------------------------------
		public virtual void MakeRoot()
		{
			CheckDisposed();
			if (!GotCacheOrWs || (DesignMode && !AllowPaintingInDesigner))
				return;

			SetAccessibleName(Name);
			m_vdrb = VwDrawRootBufferedClass.Create();
			m_fRootboxMade = true;
		}