// Copyright © 2010-2015 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.
namespace CefSharp
{
public interface IMenuModel
{
///
/// Returns the number of items in this menu.
///
int Count { get; }
///
/// Remove all menu items. Can be used to disable the context menu. Returns true on success.
///
///
bool Clear();
///
/// Returns the label at the specified index or empty if not found due to
/// invalid range or the index being a separator.
///
/// specified index
/// Label or empty if not found due to invalid range or the index being a separator.
string GetLabelAt(int index);
///
/// Returns the command id at the specified index or -1 if not found due to invalid range or the index being a separator.
///
/// the index
/// Command or -1 if not found due to invalid range or the index being a separator.
CefMenuCommand GetCommandIdAt(int index);
///
/// Removes the item with the specified commandId.
///
/// the command Id
/// Returns true on success
bool Remove(CefMenuCommand commandId);
///
/// Add an item to the menu.
///
///
///
/// Returns true on success.
bool AddItem(CefMenuCommand commandId, string label);
///
/// Add a separator to the menu.
///
/// Returns true on success.
bool AddSeparator();
}
}