// Copyright © 2016 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.
#pragma once
#include "Stdafx.h"
namespace CefSharp
{
namespace Core
{
///
/// Class representing popup window features.
///
///
[System::ComponentModel::EditorBrowsableAttribute(System::ComponentModel::EditorBrowsableState::Never)]
public ref class PopupFeatures : IPopupFeatures
{
private:
const CefPopupFeatures* _popupFeatures;
internal:
///
/// Constructor.
///
/// The popup features.
PopupFeatures(const CefPopupFeatures* popupFeatures)
{
_popupFeatures = popupFeatures;
}
public:
!PopupFeatures()
{
_popupFeatures = NULL;
}
~PopupFeatures()
{
this->!PopupFeatures();
}
virtual property System::Nullable X
{
System::Nullable get() { return _popupFeatures->xSet ? _popupFeatures->x : Nullable(); }
}
virtual property System::Nullable Y
{
System::Nullable get() { return _popupFeatures->ySet ? _popupFeatures->y : Nullable(); }
}
virtual property System::Nullable Width
{
System::Nullable get() { return _popupFeatures->widthSet ? _popupFeatures->width : Nullable(); }
}
virtual property System::Nullable Height
{
System::Nullable get() { return _popupFeatures->heightSet ? _popupFeatures->height : Nullable(); }
}
virtual property bool MenuBarVisible
{
bool get() { return _popupFeatures->menuBarVisible == 1; }
}
virtual property bool StatusBarVisible
{
bool get() { return _popupFeatures->statusBarVisible == 1; }
}
virtual property bool ToolBarVisible
{
bool get() { return _popupFeatures->toolBarVisible == 1; }
}
virtual property bool ScrollbarsVisible
{
bool get() { return _popupFeatures->scrollbarsVisible == 1; }
}
};
}
}