• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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=b09c6865b321dbc52440a306dabdf0357bf41a12$
13 //
14 
15 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_
16 #define CEF_LIBCEF_DLL_CTOCPP_VIEWS_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_button_capi.h"
24 #include "include/capi/views/cef_label_button_capi.h"
25 #include "include/views/cef_button.h"
26 #include "include/views/cef_label_button.h"
27 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h"
28 
29 // Wrap a C structure with a C++ class.
30 // This class may be instantiated and accessed wrapper-side only.
31 class CefButtonCToCpp
32     : public CefCToCppRefCounted<CefButtonCToCpp, CefButton, cef_button_t> {
33  public:
34   CefButtonCToCpp();
35   virtual ~CefButtonCToCpp();
36 
37   // CefButton methods.
38   CefRefPtr<CefLabelButton> AsLabelButton() override;
39   void SetState(cef_button_state_t state) override;
40   cef_button_state_t GetState() override;
41   void SetInkDropEnabled(bool enabled) override;
42   void SetTooltipText(const CefString& tooltip_text) override;
43   void SetAccessibleName(const CefString& name) override;
44 
45   // CefView methods.
46   CefRefPtr<CefBrowserView> AsBrowserView() override;
47   CefRefPtr<CefButton> AsButton() override;
48   CefRefPtr<CefPanel> AsPanel() override;
49   CefRefPtr<CefScrollView> AsScrollView() override;
50   CefRefPtr<CefTextfield> AsTextfield() override;
51   CefString GetTypeString() override;
52   CefString ToString(bool include_children) override;
53   bool IsValid() override;
54   bool IsAttached() override;
55   bool IsSame(CefRefPtr<CefView> that) override;
56   CefRefPtr<CefViewDelegate> GetDelegate() override;
57   CefRefPtr<CefWindow> GetWindow() override;
58   int GetID() override;
59   void SetID(int id) override;
60   int GetGroupID() override;
61   void SetGroupID(int group_id) override;
62   CefRefPtr<CefView> GetParentView() override;
63   CefRefPtr<CefView> GetViewForID(int id) override;
64   void SetBounds(const CefRect& bounds) override;
65   CefRect GetBounds() override;
66   CefRect GetBoundsInScreen() override;
67   void SetSize(const CefSize& size) override;
68   CefSize GetSize() override;
69   void SetPosition(const CefPoint& position) override;
70   CefPoint GetPosition() override;
71   void SetInsets(const CefInsets& insets) override;
72   CefInsets GetInsets() override;
73   CefSize GetPreferredSize() override;
74   void SizeToPreferredSize() override;
75   CefSize GetMinimumSize() override;
76   CefSize GetMaximumSize() override;
77   int GetHeightForWidth(int width) override;
78   void InvalidateLayout() override;
79   void SetVisible(bool visible) override;
80   bool IsVisible() override;
81   bool IsDrawn() override;
82   void SetEnabled(bool enabled) override;
83   bool IsEnabled() override;
84   void SetFocusable(bool focusable) override;
85   bool IsFocusable() override;
86   bool IsAccessibilityFocusable() override;
87   void RequestFocus() override;
88   void SetBackgroundColor(cef_color_t color) override;
89   cef_color_t GetBackgroundColor() override;
90   bool ConvertPointToScreen(CefPoint& point) override;
91   bool ConvertPointFromScreen(CefPoint& point) override;
92   bool ConvertPointToWindow(CefPoint& point) override;
93   bool ConvertPointFromWindow(CefPoint& point) override;
94   bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) override;
95   bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) override;
96 };
97 
98 #endif  // CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_
99