1 // Copyright (c) 2022 The Chromium Embedded Framework Authors. All rights 2 // reserved. Use of this source code is governed by a BSD-style license that 3 // can be found in the LICENSE file. 4 // 5 // --------------------------------------------------------------------------- 6 // 7 // This file was generated by the CEF translator tool. If making changes by 8 // hand only do so within the body of existing method and function 9 // implementations. See the translator.README.txt file in the tools directory 10 // for more information. 11 // 12 // $hash=41f123659afc521684bb6b273ab831944efc4611$ 13 // 14 15 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_ 16 #define CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_ 17 #pragma once 18 19 #if !defined(WRAPPING_CEF_SHARED) 20 #error This file can be included wrapper-side only 21 #endif 22 23 #include "include/capi/views/cef_menu_button_capi.h" 24 #include "include/views/cef_menu_button.h" 25 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h" 26 27 // Wrap a C structure with a C++ class. 28 // This class may be instantiated and accessed wrapper-side only. 29 class CefMenuButtonCToCpp : public CefCToCppRefCounted<CefMenuButtonCToCpp, 30 CefMenuButton, 31 cef_menu_button_t> { 32 public: 33 CefMenuButtonCToCpp(); 34 virtual ~CefMenuButtonCToCpp(); 35 36 // CefMenuButton methods. 37 void ShowMenu(CefRefPtr<CefMenuModel> menu_model, 38 const CefPoint& screen_point, 39 cef_menu_anchor_position_t anchor_position) override; 40 void TriggerMenu() override; 41 42 // CefLabelButton methods. 43 CefRefPtr<CefMenuButton> AsMenuButton() override; 44 void SetText(const CefString& text) override; 45 CefString GetText() override; 46 void SetImage(cef_button_state_t button_state, 47 CefRefPtr<CefImage> image) override; 48 CefRefPtr<CefImage> GetImage(cef_button_state_t button_state) override; 49 void SetTextColor(cef_button_state_t for_state, cef_color_t color) override; 50 void SetEnabledTextColors(cef_color_t color) override; 51 void SetFontList(const CefString& font_list) override; 52 void SetHorizontalAlignment(cef_horizontal_alignment_t alignment) override; 53 void SetMinimumSize(const CefSize& size) override; 54 void SetMaximumSize(const CefSize& size) override; 55 56 // CefButton methods. 57 CefRefPtr<CefLabelButton> AsLabelButton() override; 58 void SetState(cef_button_state_t state) override; 59 cef_button_state_t GetState() override; 60 void SetInkDropEnabled(bool enabled) override; 61 void SetTooltipText(const CefString& tooltip_text) override; 62 void SetAccessibleName(const CefString& name) override; 63 64 // CefView methods. 65 CefRefPtr<CefBrowserView> AsBrowserView() override; 66 CefRefPtr<CefButton> AsButton() override; 67 CefRefPtr<CefPanel> AsPanel() override; 68 CefRefPtr<CefScrollView> AsScrollView() override; 69 CefRefPtr<CefTextfield> AsTextfield() override; 70 CefString GetTypeString() override; 71 CefString ToString(bool include_children) override; 72 bool IsValid() override; 73 bool IsAttached() override; 74 bool IsSame(CefRefPtr<CefView> that) override; 75 CefRefPtr<CefViewDelegate> GetDelegate() override; 76 CefRefPtr<CefWindow> GetWindow() override; 77 int GetID() override; 78 void SetID(int id) override; 79 int GetGroupID() override; 80 void SetGroupID(int group_id) override; 81 CefRefPtr<CefView> GetParentView() override; 82 CefRefPtr<CefView> GetViewForID(int id) override; 83 void SetBounds(const CefRect& bounds) override; 84 CefRect GetBounds() override; 85 CefRect GetBoundsInScreen() override; 86 void SetSize(const CefSize& size) override; 87 CefSize GetSize() override; 88 void SetPosition(const CefPoint& position) override; 89 CefPoint GetPosition() override; 90 void SetInsets(const CefInsets& insets) override; 91 CefInsets GetInsets() override; 92 CefSize GetPreferredSize() override; 93 void SizeToPreferredSize() override; 94 CefSize GetMinimumSize() override; 95 CefSize GetMaximumSize() override; 96 int GetHeightForWidth(int width) override; 97 void InvalidateLayout() override; 98 void SetVisible(bool visible) override; 99 bool IsVisible() override; 100 bool IsDrawn() override; 101 void SetEnabled(bool enabled) override; 102 bool IsEnabled() override; 103 void SetFocusable(bool focusable) override; 104 bool IsFocusable() override; 105 bool IsAccessibilityFocusable() override; 106 void RequestFocus() override; 107 void SetBackgroundColor(cef_color_t color) override; 108 cef_color_t GetBackgroundColor() override; 109 bool ConvertPointToScreen(CefPoint& point) override; 110 bool ConvertPointFromScreen(CefPoint& point) override; 111 bool ConvertPointToWindow(CefPoint& point) override; 112 bool ConvertPointFromWindow(CefPoint& point) override; 113 bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) override; 114 bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) override; 115 }; 116 117 #endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_ 118