PointerOptions.cs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright (c) 2024 Vuplex Inc. All rights reserved.
  2. //
  3. // Licensed under the Vuplex Commercial Software Library License, you may
  4. // not use this file except in compliance with the License. You may obtain
  5. // a copy of the License at
  6. //
  7. // https://vuplex.com/commercial-library-license
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. using System;
  15. namespace Vuplex.WebView {
  16. /// <summary>
  17. /// Options to alter pointer methods, like PointerUp() and PointerDown().
  18. /// </summary>
  19. public class PointerOptions {
  20. /// <summary>
  21. /// The button for the event. The default is MouseButton.Left.
  22. /// </summary>
  23. public MouseButton Button = MouseButton.Left;
  24. /// <summary>
  25. /// The number of clicks for the event. For example, for a double click,
  26. /// set this value to `2`. The default value is `1`.
  27. /// </summary>
  28. public int ClickCount = 1;
  29. /// <summary>
  30. /// Whether to prevent the click event from stealing focus from the currently focused webview.
  31. /// The default value is `false`.
  32. /// </summary>
  33. public bool PreventStealingFocus;
  34. public override string ToString() => $"Button = {Button}, ClickCount = {ClickCount}, PreventStealingFocus = {PreventStealingFocus}";
  35. }
  36. }