MouseFlags.cs 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. namespace Terminal.Gui;
  2. /// <summary>Mouse flags reported in <see cref="Terminal.Gui.MouseEventArgs"/>.</summary>
  3. /// <remarks>They just happen to map to the ncurses ones.</remarks>
  4. [Flags]
  5. public enum MouseFlags
  6. {
  7. /// <summary>
  8. /// No mouse event. This is the default value for <see cref="Terminal.Gui.MouseEventArgs.Flags"/> when no mouse event is being reported.
  9. /// </summary>
  10. None = 0,
  11. /// <summary>The first mouse button was pressed.</summary>
  12. Button1Pressed = 0x2,
  13. /// <summary>The first mouse button was released.</summary>
  14. Button1Released = 0x1,
  15. /// <summary>The first mouse button was clicked (press+release).</summary>
  16. Button1Clicked = 0x4,
  17. /// <summary>The first mouse button was double-clicked.</summary>
  18. Button1DoubleClicked = 0x8,
  19. /// <summary>The first mouse button was triple-clicked.</summary>
  20. Button1TripleClicked = 0x10,
  21. /// <summary>The second mouse button was pressed.</summary>
  22. Button2Pressed = 0x80,
  23. /// <summary>The second mouse button was released.</summary>
  24. Button2Released = 0x40,
  25. /// <summary>The second mouse button was clicked (press+release).</summary>
  26. Button2Clicked = 0x100,
  27. /// <summary>The second mouse button was double-clicked.</summary>
  28. Button2DoubleClicked = 0x200,
  29. /// <summary>The second mouse button was triple-clicked.</summary>
  30. Button2TripleClicked = 0x400,
  31. /// <summary>The third mouse button was pressed.</summary>
  32. Button3Pressed = 0x2000,
  33. /// <summary>The third mouse button was released.</summary>
  34. Button3Released = 0x1000,
  35. /// <summary>The third mouse button was clicked (press+release).</summary>
  36. Button3Clicked = 0x4000,
  37. /// <summary>The third mouse button was double-clicked.</summary>
  38. Button3DoubleClicked = 0x8000,
  39. /// <summary>The third mouse button was triple-clicked.</summary>
  40. Button3TripleClicked = 0x10000,
  41. /// <summary>The fourth mouse button was pressed.</summary>
  42. Button4Pressed = 0x80000,
  43. /// <summary>The fourth mouse button was released.</summary>
  44. Button4Released = 0x40000,
  45. /// <summary>The fourth button was clicked (press+release).</summary>
  46. Button4Clicked = 0x100000,
  47. /// <summary>The fourth button was double-clicked.</summary>
  48. Button4DoubleClicked = 0x200000,
  49. /// <summary>The fourth button was triple-clicked.</summary>
  50. Button4TripleClicked = 0x400000,
  51. /// <summary>Flag: the shift key was pressed when the mouse button took place.</summary>
  52. ButtonShift = 0x2000000,
  53. /// <summary>Flag: the ctrl key was pressed when the mouse button took place.</summary>
  54. ButtonCtrl = 0x1000000,
  55. /// <summary>Flag: the alt key was pressed when the mouse button took place.</summary>
  56. ButtonAlt = 0x4000000,
  57. /// <summary>The mouse position is being reported in this event.</summary>
  58. ReportMousePosition = 0x8000000,
  59. /// <summary>Vertical button wheeled up.</summary>
  60. WheeledUp = 0x10000000,
  61. /// <summary>Vertical button wheeled down.</summary>
  62. WheeledDown = 0x20000000,
  63. /// <summary>Vertical button wheeled up while pressing ButtonCtrl.</summary>
  64. WheeledLeft = ButtonCtrl | WheeledUp,
  65. /// <summary>Vertical button wheeled down while pressing ButtonCtrl.</summary>
  66. WheeledRight = ButtonCtrl | WheeledDown,
  67. /// <summary>Mask that captures all the events.</summary>
  68. AllEvents = 0x7ffffff
  69. }