132 lines
5.6 KiB
C++
132 lines
5.6 KiB
C++
// Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights
|
|
// 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.
|
|
//
|
|
// $hash=d1fc5e01c9f9a4908cd5de4983f5b1c1cfdceccc$
|
|
//
|
|
|
|
#ifndef CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|
|
#define CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|
|
#pragma once
|
|
|
|
#if !defined(WRAPPING_CEF_SHARED)
|
|
#error This file can be included wrapper-side only
|
|
#endif
|
|
|
|
#include "include/capi/cef_menu_model_capi.h"
|
|
#include "include/cef_menu_model.h"
|
|
#include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
|
|
|
|
// Wrap a C structure with a C++ class.
|
|
// This class may be instantiated and accessed wrapper-side only.
|
|
class CefMenuModelCToCpp : public CefCToCppRefCounted<CefMenuModelCToCpp,
|
|
CefMenuModel,
|
|
cef_menu_model_t> {
|
|
public:
|
|
CefMenuModelCToCpp();
|
|
virtual ~CefMenuModelCToCpp();
|
|
|
|
// CefMenuModel methods.
|
|
bool IsSubMenu() override;
|
|
bool Clear() override;
|
|
size_t GetCount() override;
|
|
bool AddSeparator() override;
|
|
bool AddItem(int command_id, const CefString& label) override;
|
|
bool AddCheckItem(int command_id, const CefString& label) override;
|
|
bool AddRadioItem(int command_id,
|
|
const CefString& label,
|
|
int group_id) override;
|
|
CefRefPtr<CefMenuModel> AddSubMenu(int command_id,
|
|
const CefString& label) override;
|
|
bool InsertSeparatorAt(size_t index) override;
|
|
bool InsertItemAt(size_t index,
|
|
int command_id,
|
|
const CefString& label) override;
|
|
bool InsertCheckItemAt(size_t index,
|
|
int command_id,
|
|
const CefString& label) override;
|
|
bool InsertRadioItemAt(size_t index,
|
|
int command_id,
|
|
const CefString& label,
|
|
int group_id) override;
|
|
CefRefPtr<CefMenuModel> InsertSubMenuAt(size_t index,
|
|
int command_id,
|
|
const CefString& label) override;
|
|
bool Remove(int command_id) override;
|
|
bool RemoveAt(size_t index) override;
|
|
int GetIndexOf(int command_id) override;
|
|
int GetCommandIdAt(size_t index) override;
|
|
bool SetCommandIdAt(size_t index, int command_id) override;
|
|
CefString GetLabel(int command_id) override;
|
|
CefString GetLabelAt(size_t index) override;
|
|
bool SetLabel(int command_id, const CefString& label) override;
|
|
bool SetLabelAt(size_t index, const CefString& label) override;
|
|
MenuItemType GetType(int command_id) override;
|
|
MenuItemType GetTypeAt(size_t index) override;
|
|
int GetGroupId(int command_id) override;
|
|
int GetGroupIdAt(size_t index) override;
|
|
bool SetGroupId(int command_id, int group_id) override;
|
|
bool SetGroupIdAt(size_t index, int group_id) override;
|
|
CefRefPtr<CefMenuModel> GetSubMenu(int command_id) override;
|
|
CefRefPtr<CefMenuModel> GetSubMenuAt(size_t index) override;
|
|
bool IsVisible(int command_id) override;
|
|
bool IsVisibleAt(size_t index) override;
|
|
bool SetVisible(int command_id, bool visible) override;
|
|
bool SetVisibleAt(size_t index, bool visible) override;
|
|
bool IsEnabled(int command_id) override;
|
|
bool IsEnabledAt(size_t index) override;
|
|
bool SetEnabled(int command_id, bool enabled) override;
|
|
bool SetEnabledAt(size_t index, bool enabled) override;
|
|
bool IsChecked(int command_id) override;
|
|
bool IsCheckedAt(size_t index) override;
|
|
bool SetChecked(int command_id, bool checked) override;
|
|
bool SetCheckedAt(size_t index, bool checked) override;
|
|
bool HasAccelerator(int command_id) override;
|
|
bool HasAcceleratorAt(size_t index) override;
|
|
bool SetAccelerator(int command_id,
|
|
int key_code,
|
|
bool shift_pressed,
|
|
bool ctrl_pressed,
|
|
bool alt_pressed) override;
|
|
bool SetAcceleratorAt(size_t index,
|
|
int key_code,
|
|
bool shift_pressed,
|
|
bool ctrl_pressed,
|
|
bool alt_pressed) override;
|
|
bool RemoveAccelerator(int command_id) override;
|
|
bool RemoveAcceleratorAt(size_t index) override;
|
|
bool GetAccelerator(int command_id,
|
|
int& key_code,
|
|
bool& shift_pressed,
|
|
bool& ctrl_pressed,
|
|
bool& alt_pressed) override;
|
|
bool GetAcceleratorAt(size_t 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;
|
|
bool SetFontList(int command_id, const CefString& font_list) override;
|
|
bool SetFontListAt(int index, const CefString& font_list) override;
|
|
};
|
|
|
|
#endif // CEF_LIBCEF_DLL_CTOCPP_MENU_MODEL_CTOCPP_H_
|