2018-01-03 21:46:26 +01:00
|
|
|
// Copyright (c) 2018 The Chromium Embedded Framework Authors. All rights
|
2012-04-19 22:31:46 +02:00
|
|
|
// reserved. Use of this source code is governed by a BSD-style license that
|
|
|
|
// can be found in the LICENSE file.
|
|
|
|
//
|
|
|
|
// ---------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// This file was generated by the CEF translator tool. If making changes by
|
|
|
|
// hand only do so within the body of existing method and function
|
|
|
|
// implementations. See the translator.README.txt file in the tools directory
|
|
|
|
// for more information.
|
|
|
|
//
|
2018-01-03 21:46:26 +01:00
|
|
|
// $hash=94f26cbfa0d7640f58400b478f205eb114aa450d$
|
2017-05-17 11:29:28 +02:00
|
|
|
//
|
2012-04-19 22:31:46 +02:00
|
|
|
|
|
|
|
#ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|
|
|
|
#define CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|
|
|
|
#pragma once
|
|
|
|
|
2016-11-18 00:52:42 +01:00
|
|
|
#if !defined(WRAPPING_CEF_SHARED)
|
|
|
|
#error This file can be included wrapper-side only
|
|
|
|
#endif
|
2012-04-19 22:31:46 +02:00
|
|
|
|
|
|
|
#include "include/capi/cef_menu_model_capi.h"
|
2017-05-17 11:29:28 +02:00
|
|
|
#include "include/cef_menu_model.h"
|
2017-02-09 23:07:43 +01:00
|
|
|
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
2012-04-19 22:31:46 +02:00
|
|
|
|
|
|
|
// Wrap a C structure with a C++ class.
|
|
|
|
// This class may be instantiated and accessed wrapper-side only.
|
2017-05-17 11:29:28 +02:00
|
|
|
class CefMenuModelCToCpp : public CefCToCppRefCounted<CefMenuModelCToCpp,
|
|
|
|
CefMenuModel,
|
|
|
|
cef_menu_model_t> {
|
2012-04-19 22:31:46 +02:00
|
|
|
public:
|
2015-04-26 20:40:01 +02:00
|
|
|
CefMenuModelCToCpp();
|
2012-04-19 22:31:46 +02:00
|
|
|
|
2015-04-26 20:40:01 +02:00
|
|
|
// CefMenuModel methods.
|
2017-02-22 19:05:27 +01:00
|
|
|
bool IsSubMenu() OVERRIDE;
|
2015-04-26 20:40:01 +02:00
|
|
|
bool Clear() OVERRIDE;
|
|
|
|
int GetCount() OVERRIDE;
|
|
|
|
bool AddSeparator() OVERRIDE;
|
|
|
|
bool AddItem(int command_id, const CefString& label) OVERRIDE;
|
|
|
|
bool AddCheckItem(int command_id, const CefString& label) OVERRIDE;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool AddRadioItem(int command_id,
|
|
|
|
const CefString& label,
|
|
|
|
int group_id) OVERRIDE;
|
2015-04-26 20:40:01 +02:00
|
|
|
CefRefPtr<CefMenuModel> AddSubMenu(int command_id,
|
2017-05-17 11:29:28 +02:00
|
|
|
const CefString& label) OVERRIDE;
|
2015-04-26 20:40:01 +02:00
|
|
|
bool InsertSeparatorAt(int index) OVERRIDE;
|
|
|
|
bool InsertItemAt(int index, int command_id, const CefString& label) OVERRIDE;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool InsertCheckItemAt(int index,
|
|
|
|
int command_id,
|
|
|
|
const CefString& label) OVERRIDE;
|
|
|
|
bool InsertRadioItemAt(int index,
|
|
|
|
int command_id,
|
|
|
|
const CefString& label,
|
|
|
|
int group_id) OVERRIDE;
|
|
|
|
CefRefPtr<CefMenuModel> InsertSubMenuAt(int index,
|
|
|
|
int command_id,
|
|
|
|
const CefString& label) OVERRIDE;
|
2015-04-26 20:40:01 +02:00
|
|
|
bool Remove(int command_id) OVERRIDE;
|
|
|
|
bool RemoveAt(int index) OVERRIDE;
|
|
|
|
int GetIndexOf(int command_id) OVERRIDE;
|
|
|
|
int GetCommandIdAt(int index) OVERRIDE;
|
|
|
|
bool SetCommandIdAt(int index, int command_id) OVERRIDE;
|
|
|
|
CefString GetLabel(int command_id) OVERRIDE;
|
|
|
|
CefString GetLabelAt(int index) OVERRIDE;
|
|
|
|
bool SetLabel(int command_id, const CefString& label) OVERRIDE;
|
|
|
|
bool SetLabelAt(int index, const CefString& label) OVERRIDE;
|
|
|
|
MenuItemType GetType(int command_id) OVERRIDE;
|
|
|
|
MenuItemType GetTypeAt(int index) OVERRIDE;
|
|
|
|
int GetGroupId(int command_id) OVERRIDE;
|
|
|
|
int GetGroupIdAt(int index) OVERRIDE;
|
|
|
|
bool SetGroupId(int command_id, int group_id) OVERRIDE;
|
|
|
|
bool SetGroupIdAt(int index, int group_id) OVERRIDE;
|
|
|
|
CefRefPtr<CefMenuModel> GetSubMenu(int command_id) OVERRIDE;
|
|
|
|
CefRefPtr<CefMenuModel> GetSubMenuAt(int index) OVERRIDE;
|
|
|
|
bool IsVisible(int command_id) OVERRIDE;
|
|
|
|
bool IsVisibleAt(int index) OVERRIDE;
|
|
|
|
bool SetVisible(int command_id, bool visible) OVERRIDE;
|
|
|
|
bool SetVisibleAt(int index, bool visible) OVERRIDE;
|
|
|
|
bool IsEnabled(int command_id) OVERRIDE;
|
|
|
|
bool IsEnabledAt(int index) OVERRIDE;
|
|
|
|
bool SetEnabled(int command_id, bool enabled) OVERRIDE;
|
|
|
|
bool SetEnabledAt(int index, bool enabled) OVERRIDE;
|
|
|
|
bool IsChecked(int command_id) OVERRIDE;
|
|
|
|
bool IsCheckedAt(int index) OVERRIDE;
|
|
|
|
bool SetChecked(int command_id, bool checked) OVERRIDE;
|
|
|
|
bool SetCheckedAt(int index, bool checked) OVERRIDE;
|
|
|
|
bool HasAccelerator(int command_id) OVERRIDE;
|
|
|
|
bool HasAcceleratorAt(int index) OVERRIDE;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool SetAccelerator(int command_id,
|
|
|
|
int key_code,
|
|
|
|
bool shift_pressed,
|
|
|
|
bool ctrl_pressed,
|
|
|
|
bool alt_pressed) OVERRIDE;
|
|
|
|
bool SetAcceleratorAt(int index,
|
|
|
|
int key_code,
|
|
|
|
bool shift_pressed,
|
|
|
|
bool ctrl_pressed,
|
|
|
|
bool alt_pressed) OVERRIDE;
|
2015-04-26 20:40:01 +02:00
|
|
|
bool RemoveAccelerator(int command_id) OVERRIDE;
|
|
|
|
bool RemoveAcceleratorAt(int index) OVERRIDE;
|
2017-05-17 11:29:28 +02:00
|
|
|
bool GetAccelerator(int command_id,
|
|
|
|
int& key_code,
|
|
|
|
bool& shift_pressed,
|
|
|
|
bool& ctrl_pressed,
|
|
|
|
bool& alt_pressed) OVERRIDE;
|
|
|
|
bool GetAcceleratorAt(int index,
|
|
|
|
int& key_code,
|
|
|
|
bool& shift_pressed,
|
|
|
|
bool& ctrl_pressed,
|
|
|
|
bool& alt_pressed) OVERRIDE;
|
|
|
|
bool SetColor(int command_id,
|
|
|
|
cef_menu_color_type_t color_type,
|
|
|
|
cef_color_t color) OVERRIDE;
|
|
|
|
bool SetColorAt(int index,
|
|
|
|
cef_menu_color_type_t color_type,
|
|
|
|
cef_color_t color) OVERRIDE;
|
|
|
|
bool GetColor(int command_id,
|
|
|
|
cef_menu_color_type_t color_type,
|
|
|
|
cef_color_t& color) OVERRIDE;
|
|
|
|
bool GetColorAt(int index,
|
|
|
|
cef_menu_color_type_t color_type,
|
|
|
|
cef_color_t& color) OVERRIDE;
|
2017-02-25 06:03:31 +01:00
|
|
|
bool SetFontList(int command_id, const CefString& font_list) OVERRIDE;
|
|
|
|
bool SetFontListAt(int index, const CefString& font_list) OVERRIDE;
|
2012-04-19 22:31:46 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|