• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2021 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=b8208488ed5afed11401a1e2dd647af06a8fe25a$
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   CefSize GetPreferredSize() OVERRIDE;
91   void SizeToPreferredSize() OVERRIDE;
92   CefSize GetMinimumSize() OVERRIDE;
93   CefSize GetMaximumSize() OVERRIDE;
94   int GetHeightForWidth(int width) OVERRIDE;
95   void InvalidateLayout() OVERRIDE;
96   void SetVisible(bool visible) OVERRIDE;
97   bool IsVisible() OVERRIDE;
98   bool IsDrawn() OVERRIDE;
99   void SetEnabled(bool enabled) OVERRIDE;
100   bool IsEnabled() OVERRIDE;
101   void SetFocusable(bool focusable) OVERRIDE;
102   bool IsFocusable() OVERRIDE;
103   bool IsAccessibilityFocusable() OVERRIDE;
104   void RequestFocus() OVERRIDE;
105   void SetBackgroundColor(cef_color_t color) OVERRIDE;
106   cef_color_t GetBackgroundColor() OVERRIDE;
107   bool ConvertPointToScreen(CefPoint& point) OVERRIDE;
108   bool ConvertPointFromScreen(CefPoint& point) OVERRIDE;
109   bool ConvertPointToWindow(CefPoint& point) OVERRIDE;
110   bool ConvertPointFromWindow(CefPoint& point) OVERRIDE;
111   bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) OVERRIDE;
112   bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) OVERRIDE;
113 };
114 
115 #endif  // CEF_LIBCEF_DLL_CTOCPP_VIEWS_MENU_BUTTON_CTOCPP_H_
116