MouseEventArgs.cs :  » Game » RealmForge » Axiom » Input » C# / CSharp Open Source

Home
C# / CSharp Open Source
1.2.6.4 mono .net core
2.2.6.4 mono core
3.Aspect Oriented Frameworks
4.Bloggers
5.Build Systems
6.Business Application
7.Charting Reporting Tools
8.Chat Servers
9.Code Coverage Tools
10.Content Management Systems CMS
11.CRM ERP
12.Database
13.Development
14.Email
15.Forum
16.Game
17.GIS
18.GUI
19.IDEs
20.Installers Generators
21.Inversion of Control Dependency Injection
22.Issue Tracking
23.Logging Tools
24.Message
25.Mobile
26.Network Clients
27.Network Servers
28.Office
29.PDF
30.Persistence Frameworks
31.Portals
32.Profilers
33.Project Management
34.RSS RDF
35.Rule Engines
36.Script
37.Search Engines
38.Sound Audio
39.Source Control
40.SQL Clients
41.Template Engines
42.Testing
43.UML
44.Web Frameworks
45.Web Service
46.Web Testing
47.Wiki Engines
48.Windows Presentation Foundation
49.Workflows
50.XML Parsers
C# / C Sharp
C# / C Sharp by API
C# / CSharp Tutorial
C# / CSharp Open Source » Game » RealmForge 
RealmForge » Axiom » Input » MouseEventArgs.cs
using System;

namespace Axiom.Input{
  /// <summary>
  ///    Events args for mouse input events.
  /// </summary>
  public class MouseEventArgs : InputEventArgs {
    #region Fields

    /// <summary>
    ///    X coordinate of the mouse.
    /// </summary>
    protected float x;

    /// <summary>
    ///    Y coordinate of the mouse.
    /// </summary>
    protected float y;

    /// <summary>
    ///    Z coordinate of the mouse.
    /// </summary>
    protected float z;

    /// <summary>
    ///    Relative X coordinate of the mouse.
    /// </summary>
    protected float relativeX;

    /// <summary>
    ///    Relative Y coordinate of the mouse.
    /// </summary>
    protected float relativeY;

    /// <summary>
    ///    Relative Z coordinate of the mouse.
    /// </summary>
    protected float relativeZ;

    /// <summary>
    ///    Mouse button pressed during this event.
    /// </summary>
    protected MouseButtons button;

    #endregion Fields

    #region Constructors

    /// <summary>
    ///    Constructor.
    /// </summary>
    /// <param name="button">Mouse button pressed.</param>
    /// <param name="modifiers">Any modifier keys that are down.</param>
    /// <param name="x">Mouse X position.</param>
    /// <param name="y">Mouse Y position.</param>
    /// <param name="z">Mouse Z position.</param>
    public MouseEventArgs(MouseButtons button, ModifierKeys modifiers, float x, float y, float z) 
      : this(button, modifiers, x, y, z, 0, 0, 0) {}

    /// <summary>
    ///    Constructor.
    /// </summary>
    /// <param name="button">Mouse button pressed.</param>
    /// <param name="modifiers">Any modifier keys that are down.</param>
    /// <param name="x">Mouse X position.</param>
    /// <param name="y">Mouse Y position.</param>
    /// <param name="z">Mouse Z position.</param>
    /// <param name="relX">Relative mouse X position.</param>
    /// <param name="relY">Relative mouse Y position.</param>
    /// <param name="relZ">Relative mouse Z position.</param>
    public MouseEventArgs(MouseButtons button, ModifierKeys modifiers, float x, float y, float z, float relX, float relY, float relZ) : base(modifiers) {
      this.button = button;
      this.x = x;
      this.y = y;
      this.z = z;
      this.relativeX = relX;
      this.relativeY = relY;
      this.relativeZ = relZ;
    }

    #endregion Constructors

    #region Properties

    /// <summary>
    ///    Mouse button pressed during this event.
    /// </summary>
    public MouseButtons Button {
      get {
        return button;
      }
    }

    /// <summary>
    ///    Mouse X coordinate.
    /// </summary>
    public float X {
      get {
        return x;
      }
    }

    /// <summary>
    ///    Mouse Y coordinate.
    /// </summary>
    public float Y {
      get {
        return y;
      }
    }

    /// <summary>
    ///    Mouse Z coordinate.
    /// </summary>
    public float Z {
      get {
        return z;
      }
    }

    /// <summary>
    ///    Relative mouse X coordinate.
    /// </summary>
    public float RelativeX {
      get {
        return relativeX;
      }
    }

    /// <summary>
    ///    Relative mouse Y coordinate.
    /// </summary>
    public float RelativeY {
      get {
        return relativeY;
      }
    }

    /// <summary>
    ///    Relative mouse Z coordinate.
    /// </summary>
    public float RelativeZ {
      get {
        return relativeZ;
      }
    }

    #endregion Properties
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.