• 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=2741cab25f5633f178ba1f924abe58e418f1f084$
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   CefSize GetPreferredSize() OVERRIDE;
72   void SizeToPreferredSize() OVERRIDE;
73   CefSize GetMinimumSize() OVERRIDE;
74   CefSize GetMaximumSize() OVERRIDE;
75   int GetHeightForWidth(int width) OVERRIDE;
76   void InvalidateLayout() OVERRIDE;
77   void SetVisible(bool visible) OVERRIDE;
78   bool IsVisible() OVERRIDE;
79   bool IsDrawn() OVERRIDE;
80   void SetEnabled(bool enabled) OVERRIDE;
81   bool IsEnabled() OVERRIDE;
82   void SetFocusable(bool focusable) OVERRIDE;
83   bool IsFocusable() OVERRIDE;
84   bool IsAccessibilityFocusable() OVERRIDE;
85   void RequestFocus() OVERRIDE;
86   void SetBackgroundColor(cef_color_t color) OVERRIDE;
87   cef_color_t GetBackgroundColor() OVERRIDE;
88   bool ConvertPointToScreen(CefPoint& point) OVERRIDE;
89   bool ConvertPointFromScreen(CefPoint& point) OVERRIDE;
90   bool ConvertPointToWindow(CefPoint& point) OVERRIDE;
91   bool ConvertPointFromWindow(CefPoint& point) OVERRIDE;
92   bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) OVERRIDE;
93   bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) OVERRIDE;
94 };
95 
96 #endif  // CEF_LIBCEF_DLL_CTOCPP_VIEWS_BUTTON_CTOCPP_H_
97