Files
cefsharp/CefSharp.Core.Runtime/Internals/CefContextMenuParamsWrapper.cpp
T
Alex Maitland 52374b74a7 Core - Remove IContextMenuParams.IsPepperMenu
This is a breaking change

Resolves #3460
2021-03-27 11:17:23 +10:00

149 lines
3.9 KiB
C++

// Copyright © 2014 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.
#include "Stdafx.h"
#include "CefContextMenuParamsWrapper.h"
namespace CefSharp
{
namespace Internals
{
int CefContextMenuParamsWrapper::YCoord::get()
{
ThrowIfDisposed();
return _wrappedInfo->GetYCoord();
}
int CefContextMenuParamsWrapper::XCoord::get()
{
ThrowIfDisposed();
return _wrappedInfo->GetXCoord();
}
ContextMenuType CefContextMenuParamsWrapper::TypeFlags::get()
{
ThrowIfDisposed();
return (ContextMenuType)_wrappedInfo->GetTypeFlags();
}
String^ CefContextMenuParamsWrapper::LinkUrl::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetLinkUrl());
}
String^ CefContextMenuParamsWrapper::UnfilteredLinkUrl::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetUnfilteredLinkUrl());
}
String^ CefContextMenuParamsWrapper::SourceUrl::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetSourceUrl());
}
bool CefContextMenuParamsWrapper::HasImageContents::get()
{
ThrowIfDisposed();
return _wrappedInfo->HasImageContents();
}
String^ CefContextMenuParamsWrapper::PageUrl::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetPageUrl());
}
String^ CefContextMenuParamsWrapper::FrameUrl::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetFrameUrl());
}
String^ CefContextMenuParamsWrapper::FrameCharset::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetFrameCharset());
}
ContextMenuMediaType CefContextMenuParamsWrapper::MediaType::get()
{
ThrowIfDisposed();
return (ContextMenuMediaType)_wrappedInfo->GetMediaType();
}
ContextMenuMediaState CefContextMenuParamsWrapper::MediaStateFlags::get()
{
ThrowIfDisposed();
return (ContextMenuMediaState)_wrappedInfo->GetMediaStateFlags();
}
String^ CefContextMenuParamsWrapper::SelectionText::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetSelectionText());
}
String^ CefContextMenuParamsWrapper::MisspelledWord::get()
{
ThrowIfDisposed();
return StringUtils::ToClr(_wrappedInfo->GetMisspelledWord());
}
List<String^>^ CefContextMenuParamsWrapper::DictionarySuggestions::get()
{
ThrowIfDisposed();
std::vector<CefString>& dictionarySuggestions = std::vector<CefString>();
bool result = _wrappedInfo->GetDictionarySuggestions(dictionarySuggestions);
return StringUtils::ToClr(dictionarySuggestions);
}
bool CefContextMenuParamsWrapper::IsEditable::get()
{
ThrowIfDisposed();
return _wrappedInfo->IsEditable();
}
bool CefContextMenuParamsWrapper::IsSpellCheckEnabled::get()
{
ThrowIfDisposed();
return _wrappedInfo->IsSpellCheckEnabled();
}
ContextMenuEditState CefContextMenuParamsWrapper::EditStateFlags::get()
{
ThrowIfDisposed();
return (ContextMenuEditState)_wrappedInfo->GetEditStateFlags();
}
bool CefContextMenuParamsWrapper::IsCustomMenu::get()
{
ThrowIfDisposed();
return _wrappedInfo->IsCustomMenu();
}
}
}