mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-04 10:22:55 +00:00
6ce9958d2d
* WPF - Add System.Windows.Controls.ContextMenu based ContextMenuHandler Based of https://github.com/chromiumembedded/cef/blob/ba46b8c53ed0f46cec82a1aebaec173784deb6e4/libcef/browser/menu_manager.cc#L385 * Add model class instead of passing in params
59 lines
2.0 KiB
C#
59 lines
2.0 KiB
C#
// Copyright © 2021 The CefSharp Authors. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
|
|
|
|
using System.Collections.Generic;
|
|
|
|
namespace CefSharp.Wpf.Handler
|
|
{
|
|
/// <summary>
|
|
/// ContextMenuExecuteModel
|
|
/// </summary>
|
|
public class ContextMenuExecuteModel
|
|
{
|
|
/// <summary>
|
|
/// Menu Command
|
|
/// </summary>
|
|
public CefMenuCommand MenuCommand { get; private set; }
|
|
/// <summary>
|
|
/// Dictioanry Suggestions
|
|
/// </summary>
|
|
public IList<string> DictionarySuggestions { get; private set; }
|
|
/// <summary>
|
|
/// X Coordinate
|
|
/// </summary>
|
|
public int XCoord { get; private set; }
|
|
/// <summary>
|
|
/// Y Coordinate
|
|
/// </summary>
|
|
public int YCoord { get; private set; }
|
|
/// <summary>
|
|
/// Selection Text
|
|
/// </summary>
|
|
public string SelectionText { get; private set; }
|
|
/// <summary>
|
|
/// Misspelled Word
|
|
/// </summary>
|
|
public string MisspelledWord { get; private set; }
|
|
|
|
/// <summary>
|
|
/// Default constructor
|
|
/// </summary>
|
|
/// <param name="menuCommand">menu command</param>
|
|
/// <param name="dictionarySuggestions">dictioanry suggestion</param>
|
|
/// <param name="xCoord">x coordinate</param>
|
|
/// <param name="yCoord">y coordinate</param>
|
|
/// <param name="selectionText">selection text</param>
|
|
/// <param name="misspelledWord">misspelled word</param>
|
|
public ContextMenuExecuteModel(CefMenuCommand menuCommand, IList<string> dictionarySuggestions, int xCoord, int yCoord, string selectionText, string misspelledWord)
|
|
{
|
|
MenuCommand = menuCommand;
|
|
DictionarySuggestions = dictionarySuggestions;
|
|
XCoord = xCoord;
|
|
YCoord = yCoord;
|
|
SelectionText = selectionText;
|
|
MisspelledWord = misspelledWord;
|
|
}
|
|
}
|
|
}
|