示例#1
0
 /// <summary>
 /// Constructor.
 /// </summary>
 /// <param name="tooltipPrefix">The tooltip prefix, which usually describes the tool's function.</param>
 protected MouseImageViewerTool(string tooltipPrefix)
     : base()
 {
     _tooltipPrefix              = tooltipPrefix;
     _mousebuttonBehaviour       = MouseButtonHandlerBehaviour.Default;
     _mouseButton                = XMouseButtons.None;
     _defaultMouseButtonShortcut = null;
     _mouseWheelShortcut         = null;
     _active = false;
 }
示例#2
0
        /// <summary>
        /// Gets the <see cref="IMouseWheelHandler"/> associated with a shortcut.
        /// </summary>
        /// <param name="shortcut">The shortcut for which an <see cref="IMouseWheelHandler"/> is to be found.</param>
        /// <returns>An <see cref="IMouseWheelHandler"/> or null.</returns>
        public IMouseWheelHandler GetMouseWheelHandler(MouseWheelShortcut shortcut)
        {
            if (shortcut == null)
            {
                return(null);
            }

            return((from mouseTool in GetMouseTools()
                    where shortcut.Equals(mouseTool.MouseWheelShortcut)
                    select mouseTool).FirstOrDefault());
        }
		/// <summary>
		/// Gets the <see cref="IMouseWheelHandler"/> associated with a shortcut.
		/// </summary>
		/// <param name="shortcut">The shortcut for which an <see cref="IMouseWheelHandler"/> is to be found.</param>
		/// <returns>An <see cref="IMouseWheelHandler"/> or null.</returns>
		public IMouseWheelHandler GetMouseWheelHandler(MouseWheelShortcut shortcut)
		{
			if (shortcut == null)
				return null;

            return (from mouseTool in GetMouseTools()
                        where shortcut.Equals(mouseTool.MouseWheelShortcut)
                    select mouseTool).FirstOrDefault();
        }
		/// <summary>
		/// Constructor.
		/// </summary>
		public MouseWheelMessage(int wheelDelta, bool control, bool alt, bool shift)
		{
			_wheelDelta = wheelDelta;
			_wheelShortcut = new MouseWheelShortcut(control, alt, shift);
		}
示例#5
0
		/// <summary>
		/// Constructor.
		/// </summary>
		/// <param name="tooltipPrefix">The tooltip prefix, which usually describes the tool's function.</param>
		protected MouseImageViewerTool(string tooltipPrefix)
			: base()
		{
			_tooltipPrefix = tooltipPrefix;
			_mousebuttonBehaviour = MouseButtonHandlerBehaviour.Default;
			_mouseButton = XMouseButtons.None;
			_defaultMouseButtonShortcut = null;
			_mouseWheelShortcut = null;
			_active = false;
		}
 /// <summary>
 /// Constructor that accepts <see cref="ModifierFlags"/> as input.
 /// </summary>
 /// <param name="modifiers"></param>
 public MouseWheelHandlerAttribute(ModifierFlags modifiers)
 {
     _shortcut = new MouseWheelShortcut(modifiers);
 }
示例#7
0
 /// <summary>
 /// Constructor.
 /// </summary>
 public MouseWheelMessage(int wheelDelta, bool control, bool alt, bool shift)
 {
     _wheelDelta    = wheelDelta;
     _wheelShortcut = new MouseWheelShortcut(control, alt, shift);
 }
示例#8
0
		/// <summary>
		/// Constructor that accepts <see cref="ModifierFlags"/> as input.
		/// </summary>
		/// <param name="modifiers"></param>
		public MouseWheelHandlerAttribute(ModifierFlags modifiers)
		{
			_shortcut = new MouseWheelShortcut(modifiers);
		}