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=d96b3c829c698c7919bcaa4dd9b4f94d8800e6dc$ 13 // 14 15 #ifndef CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_CTOCPP_H_ 16 #define CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_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_textfield_capi.h" 24 #include "include/views/cef_textfield.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 CefTextfieldCToCpp : public CefCToCppRefCounted<CefTextfieldCToCpp, 30 CefTextfield, 31 cef_textfield_t> { 32 public: 33 CefTextfieldCToCpp(); 34 virtual ~CefTextfieldCToCpp(); 35 36 // CefTextfield methods. 37 void SetPasswordInput(bool password_input) override; 38 bool IsPasswordInput() override; 39 void SetReadOnly(bool read_only) override; 40 bool IsReadOnly() override; 41 CefString GetText() override; 42 void SetText(const CefString& text) override; 43 void AppendText(const CefString& text) override; 44 void InsertOrReplaceText(const CefString& text) override; 45 bool HasSelection() override; 46 CefString GetSelectedText() override; 47 void SelectAll(bool reversed) override; 48 void ClearSelection() override; 49 CefRange GetSelectedRange() override; 50 void SelectRange(const CefRange& range) override; 51 size_t GetCursorPosition() override; 52 void SetTextColor(cef_color_t color) override; 53 cef_color_t GetTextColor() override; 54 void SetSelectionTextColor(cef_color_t color) override; 55 cef_color_t GetSelectionTextColor() override; 56 void SetSelectionBackgroundColor(cef_color_t color) override; 57 cef_color_t GetSelectionBackgroundColor() override; 58 void SetFontList(const CefString& font_list) override; 59 void ApplyTextColor(cef_color_t color, const CefRange& range) override; 60 void ApplyTextStyle(cef_text_style_t style, 61 bool add, 62 const CefRange& range) override; 63 bool IsCommandEnabled(cef_text_field_commands_t command_id) override; 64 void ExecuteCommand(cef_text_field_commands_t command_id) override; 65 void ClearEditHistory() override; 66 void SetPlaceholderText(const CefString& text) override; 67 CefString GetPlaceholderText() override; 68 void SetPlaceholderTextColor(cef_color_t color) override; 69 void SetAccessibleName(const CefString& name) override; 70 71 // CefView methods. 72 CefRefPtr<CefBrowserView> AsBrowserView() override; 73 CefRefPtr<CefButton> AsButton() override; 74 CefRefPtr<CefPanel> AsPanel() override; 75 CefRefPtr<CefScrollView> AsScrollView() override; 76 CefRefPtr<CefTextfield> AsTextfield() override; 77 CefString GetTypeString() override; 78 CefString ToString(bool include_children) override; 79 bool IsValid() override; 80 bool IsAttached() override; 81 bool IsSame(CefRefPtr<CefView> that) override; 82 CefRefPtr<CefViewDelegate> GetDelegate() override; 83 CefRefPtr<CefWindow> GetWindow() override; 84 int GetID() override; 85 void SetID(int id) override; 86 int GetGroupID() override; 87 void SetGroupID(int group_id) override; 88 CefRefPtr<CefView> GetParentView() override; 89 CefRefPtr<CefView> GetViewForID(int id) override; 90 void SetBounds(const CefRect& bounds) override; 91 CefRect GetBounds() override; 92 CefRect GetBoundsInScreen() override; 93 void SetSize(const CefSize& size) override; 94 CefSize GetSize() override; 95 void SetPosition(const CefPoint& position) override; 96 CefPoint GetPosition() override; 97 void SetInsets(const CefInsets& insets) override; 98 CefInsets GetInsets() override; 99 CefSize GetPreferredSize() override; 100 void SizeToPreferredSize() override; 101 CefSize GetMinimumSize() override; 102 CefSize GetMaximumSize() override; 103 int GetHeightForWidth(int width) override; 104 void InvalidateLayout() override; 105 void SetVisible(bool visible) override; 106 bool IsVisible() override; 107 bool IsDrawn() override; 108 void SetEnabled(bool enabled) override; 109 bool IsEnabled() override; 110 void SetFocusable(bool focusable) override; 111 bool IsFocusable() override; 112 bool IsAccessibilityFocusable() override; 113 void RequestFocus() override; 114 void SetBackgroundColor(cef_color_t color) override; 115 cef_color_t GetBackgroundColor() override; 116 bool ConvertPointToScreen(CefPoint& point) override; 117 bool ConvertPointFromScreen(CefPoint& point) override; 118 bool ConvertPointToWindow(CefPoint& point) override; 119 bool ConvertPointFromWindow(CefPoint& point) override; 120 bool ConvertPointToView(CefRefPtr<CefView> view, CefPoint& point) override; 121 bool ConvertPointFromView(CefRefPtr<CefView> view, CefPoint& point) override; 122 }; 123 124 #endif // CEF_LIBCEF_DLL_CTOCPP_VIEWS_TEXTFIELD_CTOCPP_H_ 125