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=409d4b16fb5d1dcc66c8553ed2fdd8b6465c8664$ 13 // 14 15 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_CTOCPP_H_ 16 #define CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_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_box_layout_capi.h" 24 #include "include/capi/views/cef_fill_layout_capi.h" 25 #include "include/capi/views/cef_layout_capi.h" 26 #include "include/capi/views/cef_panel_capi.h" 27 #include "include/capi/views/cef_window_capi.h" 28 #include "include/views/cef_box_layout.h" 29 #include "include/views/cef_fill_layout.h" 30 #include "include/views/cef_layout.h" 31 #include "include/views/cef_panel.h" 32 #include "include/views/cef_window.h" 33 #include "libcef_dll/ctocpp/ctocpp_ref_counted.h" 34 35 // Wrap a C structure with a C++ class. 36 // This class may be instantiated and accessed wrapper-side only. 37 class CefPanelCToCpp 38 : public CefCToCppRefCounted<CefPanelCToCpp, CefPanel, cef_panel_t> { 39 public: 40 CefPanelCToCpp(); 41 virtual ~CefPanelCToCpp(); 42 43 // CefPanel methods. 44 CefRefPtr<CefWindow> AsWindow() override; 45 CefRefPtr<CefFillLayout> SetToFillLayout() override; 46 CefRefPtr<CefBoxLayout> SetToBoxLayout( 47 const CefBoxLayoutSettings& settings) override; 48 CefRefPtr<CefLayout> GetLayout() override; 49 void Layout() override; 50 void AddChildView(CefRefPtr<CefView> view) override; 51 void AddChildViewAt(CefRefPtr<CefView> view, int index) override; 52 void ReorderChildView(CefRefPtr<CefView> view, int index) override; 53 void RemoveChildView(CefRefPtr<CefView> view) override; 54 void RemoveAllChildViews() override; 55 size_t GetChildViewCount() override; 56 CefRefPtr<CefView> GetChildViewAt(int index) override; 57 58 // CefView methods. 59 CefRefPtr<CefBrowserView> AsBrowserView() override; 60 CefRefPtr<CefButton> AsButton() override; 61 CefRefPtr<CefPanel> AsPanel() override; 62 CefRefPtr<CefScrollView> AsScrollView() override; 63 CefRefPtr<CefTextfield> AsTextfield() override; 64 CefString GetTypeString() override; 65 CefString ToString(bool include_children) override; 66 bool IsValid() override; 67 bool IsAttached() override; 68 bool IsSame(CefRefPtr<CefView> that) override; 69 CefRefPtr<CefViewDelegate> GetDelegate() override; 70 CefRefPtr<CefWindow> GetWindow() override; 71 int GetID() override; 72 void SetID(int id) override; 73 int GetGroupID() override; 74 void SetGroupID(int group_id) override; 75 CefRefPtr<CefView> GetParentView() override; 76 CefRefPtr<CefView> GetViewForID(int id) override; 77 void SetBounds(const CefRect& bounds) override; 78 CefRect GetBounds() override; 79 CefRect GetBoundsInScreen() override; 80 void SetSize(const CefSize& size) override; 81 CefSize GetSize() override; 82 void SetPosition(const CefPoint& position) override; 83 CefPoint GetPosition() override; 84 void SetInsets(const CefInsets& insets) override; 85 CefInsets GetInsets() override; 86 CefSize GetPreferredSize() override; 87 void SizeToPreferredSize() override; 88 CefSize GetMinimumSize() override; 89 CefSize GetMaximumSize() override; 90 int GetHeightForWidth(int width) override; 91 void InvalidateLayout() override; 92 void SetVisible(bool visible) override; 93 bool IsVisible() override; 94 bool IsDrawn() override; 95 void SetEnabled(bool enabled) override; 96 bool IsEnabled() override; 97 void SetFocusable(bool focusable) override; 98 bool IsFocusable() override; 99 bool IsAccessibilityFocusable() override; 100 void RequestFocus() override; 101 void SetBackgroundColor(cef_color_t color) override; 102 cef_color_t GetBackgroundColor() override; 103 bool ConvertPointToScreen(CefPoint& point) override; 104 bool ConvertPointFromScreen(CefPoint& point) override; 105 bool ConvertPointToWindow(CefPoint& point) override; 106 bool ConvertPointFromWindow(CefPoint& point) override; 107 bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) override; 108 bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) override; 109 }; 110 111 #endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_PANEL_CTOCPP_H_ 112