MouseEvent.cs :  » GUI » SharpVectorGraphics » SharpVectors » Dom » Events » 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 » GUI » SharpVectorGraphics 
SharpVectorGraphics » SharpVectors » Dom » Events » MouseEvent.cs
using System;

using SharpVectors.Dom.Views;

namespace SharpVectors.Dom.Events{
  /// <summary>
  /// Summary description for MouseEvent.
  /// </summary>
  public class MouseEvent
    : UiEvent
    , IMouseEvent
  {
    #region Private Fields
    
    private long screenX;
    private long screeny;
    private long clientX;
    private long clientY;
    private bool crtlKey;
    private bool shiftKey;
    private bool altKey;
    private bool metaKey;
    private ushort button;
    private IEventTarget relatedTarget;
    private bool altGraphKey;
    
    #endregion
    
    #region Constructors
    
    public MouseEvent()
    {
    }
    
    public MouseEvent(
      string eventType,
      bool bubbles,
      bool cancelable,
      IAbstractView view,
      long detail,
      long screenX,
      long screenY,
      long clientX,
      long clientY,
      bool ctrlKey,
      bool altKey,
      bool shiftKey,
      bool metaKey,
      ushort button,
      IEventTarget relatedTarget)
    {
      InitMouseEvent(
        eventType, bubbles, cancelable, view, detail,
        screenX, screenY, clientX, clientY,
        ctrlKey, altKey, shiftKey, metaKey, button,
        relatedTarget);
    }
    
    public MouseEvent(
      string namespaceUri,
      string eventType,
      bool bubbles,
      bool cancelable,
      IAbstractView view,
      long detail,
      long screenX,
      long screenY,
      long clientX,
      long clientY,
      bool ctrlKey,
      bool altKey,
      bool shiftKey,
      bool metaKey,
      ushort button,
      IEventTarget relatedTarget,
      bool altGraphKey)
    {
      InitMouseEventNs(
        namespaceUri, eventType, bubbles, cancelable, view, detail,
        screenX, screenY, clientX, clientY,
        ctrlKey, altKey, shiftKey, metaKey, button,
        relatedTarget, altGraphKey);
    }
    
    public MouseEvent(
      EventType eventType,
      bool bubbles,
      bool cancelable,
      IAbstractView view,
      long detail,
      long screenX,
      long screenY,
      long clientX,
      long clientY,
      bool ctrlKey,
      bool altKey,
      bool shiftKey,
      bool metaKey,
      ushort button,
      IEventTarget relatedTarget,
      bool altGraphKey)
    {
      InitMouseEventNs(
        eventType.NamespaceUri, eventType.Name,
        bubbles, cancelable, view, detail,
        screenX, screenY, clientX, clientY,
        ctrlKey, altKey, shiftKey, metaKey, button,
        relatedTarget, altGraphKey);
    }
    
    #endregion
    
    #region IMouseEvent interface
    
    #region Public Properties
    
    public long ScreenX
    {
      get
      {
        return screenX;
      }
    }
    
    public long ScreenY
    {
      get
      {
        return screeny;
      }
    }
    
    public long ClientX
    {
      get
      {
        return clientX;
      }
    }
    
    public long ClientY
    {
      get
      {
        return clientY;
      }
    }
    
    public bool CtrlKey
    {
      get
      {
        return crtlKey;
      }
    }
    
    public bool ShiftKey
    {
      get
      {
        return shiftKey;
      }
    }
    
    public bool AltKey
    {
      get
      {
        return altKey;
      }
    }
    
    public bool MetaKey
    {
      get
      {
        return metaKey;
      }
    }
    
    public ushort Button
    {
      get
      {
        return button;
      }
    }
    
    public IEventTarget RelatedTarget
    {
      get
      {
        return relatedTarget;
      }
    }
    
    public bool AltGraphKey
    {
      get
      {
        return altGraphKey;
      }
    }
    
    #endregion
    
    #region Public Methods
    
    public void InitMouseEvent(
      string eventType,
      bool bubbles,
      bool cancelable,
      IAbstractView view,
      long detail,
      long screenX,
      long screenY,
      long clientX,
      long clientY,
      bool ctrlKey,
      bool altKey,
      bool shiftKey,
      bool metaKey,
      ushort button,
      IEventTarget relatedTarget)
    {
      InitUiEvent(eventType, bubbles, cancelable, view, detail);
      
      this.screenX = screenX;
      this.screeny = screeny;
      this.clientX = clientX;
      this.clientY = clientY;
      this.crtlKey = crtlKey;
      this.shiftKey = shiftKey;
      this.altKey = altKey;
      this.metaKey = metaKey;
      this.button = button;
      this.relatedTarget = relatedTarget;
      this.altGraphKey = altGraphKey;
    }
    
    public void InitMouseEventNs(
      string namespaceUri,
      string eventType,
      bool bubbles,
      bool cancelable,
      IAbstractView view,
      long detail,
      long screenX,
      long screenY,
      long clientX,
      long clientY,
      bool ctrlKey,
      bool altKey,
      bool shiftKey,
      bool metaKey,
      ushort button,
      IEventTarget relatedTarget,
      bool altGraphKey)
    {
      InitUiEventNs(
        namespaceUri, eventType, bubbles, cancelable, view, detail);
      
      this.screenX = screenX;
      this.screeny = screeny;
      this.clientX = clientX;
      this.clientY = clientY;
      this.crtlKey = crtlKey;
      this.shiftKey = shiftKey;
      this.altKey = altKey;
      this.metaKey = metaKey;
      this.button = button;
      this.relatedTarget = relatedTarget;
      this.altGraphKey = altGraphKey;
    }
    
    #endregion
    
    #endregion
  }
}
www.java2v.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.