Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefTextfield

CefBaseRefCounted
   |
   +--CefView
         |
         +--CefTextfield

   in cef_textfield.h

class CefTextfield
extends CefView

A Textfield supports editing of text. This control is custom rendered with no platform-specific code. Methods must be called on the browser process UI thread unless otherwise indicated.


Method Summary
 virtual void AppendText( const CefString& text )= 0
          Appends |text| to the previously-existing text.
 virtual void ApplyTextColor( cef_color_t color, const CefRange& range )= 0
          Applies |color| to the specified |range| without changing the default color.
 virtual void ApplyTextStyle( cef_text_style_t style, bool add, const CefRange& range )= 0
          Applies |style| to the specified |range| without changing the default style.
 virtual void ClearEditHistory()= 0
          Clears Edit history.
 virtual void ClearSelection()= 0
          Clears the text selection and sets the caret to the end.
 static CefRefPtr< CefTextfield > CreateTextfield( CefRefPtr< CefTextfieldDelegate > delegate )
          Create a new Textfield.
 virtual void ExecuteCommand( int command_id )= 0
          Performs the action associated with the specified command id.
 virtual size_t GetCursorPosition()= 0
          Returns the current cursor position.
 virtual CefString GetPlaceholderText()= 0
          Returns the placeholder text that will be displayed when the Textfield is empty.
 virtual CefRange GetSelectedRange()= 0
          Returns the selected logical text range.
 virtual CefString GetSelectedText()= 0
          Returns the currently selected text.
 virtual cef_color_t GetSelectionBackgroundColor()= 0
          Returns the selection background color.
 virtual cef_color_t GetSelectionTextColor()= 0
          Returns the selection text color.
 virtual CefString GetText()= 0
          Returns the currently displayed text.
 virtual cef_color_t GetTextColor()= 0
          Returns the text color.
 virtual bool HasSelection()= 0
          Returns true if there is any selected text.
 virtual void InsertOrReplaceText( const CefString& text )= 0
          Inserts |text| at the current cursor position replacing any selected text.
 virtual bool IsCommandEnabled( int command_id )= 0
          Returns true if the action associated with the specified command id is enabled.
 virtual bool IsPasswordInput()= 0
          Returns true if the text will be displayed as asterisks.
 virtual bool IsReadOnly()= 0
          Returns true if the text is read-only.
 virtual void SelectAll( bool reversed )= 0
          Selects all text.
 virtual void SelectRange( const CefRange& range )= 0
          Selects the specified logical text range.
 virtual void SetAccessibleName( const CefString& name )= 0
          Set the accessible name that will be exposed to assistive technology (AT).
 virtual void SetFontList( const CefString& font_list )= 0
          Sets the font list.
 virtual void SetPasswordInput( bool password_input )= 0
          Sets whether the text will be displayed as asterisks.
 virtual void SetPlaceholderText( const CefString& text )= 0
          Sets the placeholder text that will be displayed when the Textfield is empty.
 virtual void SetPlaceholderTextColor( cef_color_t color )= 0
          Sets the placeholder text color.
 virtual void SetReadOnly( bool read_only )= 0
          Sets whether the text will read-only.
 virtual void SetSelectionBackgroundColor( cef_color_t color )= 0
          Sets the selection background color.
 virtual void SetSelectionTextColor( cef_color_t color )= 0
          Sets the selection text color.
 virtual void SetText( const CefString& text )= 0
          Sets the contents to |text|.
 virtual void SetTextColor( cef_color_t color )= 0
          Sets the text color.
   
Methods inherited from class CefView
AsBrowserView, AsButton, AsPanel, AsScrollView, AsTextfield, GetTypeString, ToString, IsValid, IsAttached, IsSame, GetDelegate, GetWindow, GetID, SetID, GetGroupID, SetGroupID, GetParentView, GetViewForID, SetBounds, GetBounds, GetBoundsInScreen, SetSize, GetSize, SetPosition, GetPosition, GetPreferredSize, SizeToPreferredSize, GetMinimumSize, GetMaximumSize, GetHeightForWidth, InvalidateLayout, SetVisible, IsVisible, IsDrawn, SetEnabled, IsEnabled, SetFocusable, IsFocusable, IsAccessibilityFocusable, RequestFocus, SetBackgroundColor, GetBackgroundColor, ConvertPointToScreen, ConvertPointFromScreen, ConvertPointToWindow, ConvertPointFromWindow, ConvertPointToView, ConvertPointFromView
   
Methods inherited from class CefBaseRefCounted
AddRef, Release, HasOneRef, HasAtLeastOneRef
 

Method Detail

AppendText

public virtual void AppendText( const CefString& text )= 0;
Appends |text| to the previously-existing text.

ApplyTextColor

public virtual void ApplyTextColor( cef_color_t color, const CefRange& range )= 0;
Applies |color| to the specified |range| without changing the default color. If |range| is empty the color will be set on the complete text contents.

ApplyTextStyle

public virtual void ApplyTextStyle( cef_text_style_t style, bool add, const CefRange& range )= 0;
Applies |style| to the specified |range| without changing the default style. If |add| is true the style will be added, otherwise the style will be removed. If |range| is empty the style will be set on the complete text contents.

ClearEditHistory

public virtual void ClearEditHistory()= 0;
Clears Edit history.

ClearSelection

public virtual void ClearSelection()= 0;
Clears the text selection and sets the caret to the end.

CreateTextfield

public static CefRefPtr< CefTextfield > CreateTextfield( CefRefPtr< CefTextfieldDelegate > delegate );
Create a new Textfield.

ExecuteCommand

public virtual void ExecuteCommand( int command_id )= 0;
Performs the action associated with the specified command id. Valid values include IDS_APP_UNDO, IDS_APP_REDO, IDS_APP_CUT, IDS_APP_COPY, IDS_APP_PASTE, IDS_APP_DELETE, IDS_APP_SELECT_ALL, IDS_DELETE_* and IDS_MOVE_*. See include/cef_pack_strings.h for definitions.

GetCursorPosition

public virtual size_t GetCursorPosition()= 0;
Returns the current cursor position.

GetPlaceholderText

public virtual CefString GetPlaceholderText()= 0;
Returns the placeholder text that will be displayed when the Textfield is empty.

GetSelectedRange

public virtual CefRange GetSelectedRange()= 0;
Returns the selected logical text range.

GetSelectedText

public virtual CefString GetSelectedText()= 0;
Returns the currently selected text.

GetSelectionBackgroundColor

public virtual cef_color_t GetSelectionBackgroundColor()= 0;
Returns the selection background color.

GetSelectionTextColor

public virtual cef_color_t GetSelectionTextColor()= 0;
Returns the selection text color.

GetText

public virtual CefString GetText()= 0;
Returns the currently displayed text.

GetTextColor

public virtual cef_color_t GetTextColor()= 0;
Returns the text color.

HasSelection

public virtual bool HasSelection()= 0;
Returns true if there is any selected text.

InsertOrReplaceText

public virtual void InsertOrReplaceText( const CefString& text )= 0;
Inserts |text| at the current cursor position replacing any selected text.

IsCommandEnabled

public virtual bool IsCommandEnabled( int command_id )= 0;
Returns true if the action associated with the specified command id is enabled. See additional comments on ExecuteCommand().

IsPasswordInput

public virtual bool IsPasswordInput()= 0;
Returns true if the text will be displayed as asterisks.

IsReadOnly

public virtual bool IsReadOnly()= 0;
Returns true if the text is read-only.

SelectAll

public virtual void SelectAll( bool reversed )= 0;
Selects all text. If |reversed| is true the range will end at the logical beginning of the text; this generally shows the leading portion of text that overflows its display area.

SelectRange

public virtual void SelectRange( const CefRange& range )= 0;
Selects the specified logical text range.

SetAccessibleName

public virtual void SetAccessibleName( const CefString& name )= 0;
Set the accessible name that will be exposed to assistive technology (AT).

SetFontList

public virtual void SetFontList( const CefString& font_list )= 0;
Sets the font list. The format is ",[STYLES] ", where: - FONT_FAMILY_LIST is a comma-separated list of font family names, - STYLES is an optional space-separated list of style names (case-sensitive "Bold" and "Italic" are supported), and - SIZE is an integer font size in pixels with the suffix "px". Here are examples of valid font description strings: - "Arial, Helvetica, Bold Italic 14px" - "Arial, 14px"

SetPasswordInput

public virtual void SetPasswordInput( bool password_input )= 0;
Sets whether the text will be displayed as asterisks.

SetPlaceholderText

public virtual void SetPlaceholderText( const CefString& text )= 0;
Sets the placeholder text that will be displayed when the Textfield is empty.

SetPlaceholderTextColor

public virtual void SetPlaceholderTextColor( cef_color_t color )= 0;
Sets the placeholder text color.

SetReadOnly

public virtual void SetReadOnly( bool read_only )= 0;
Sets whether the text will read-only.

SetSelectionBackgroundColor

public virtual void SetSelectionBackgroundColor( cef_color_t color )= 0;
Sets the selection background color.

SetSelectionTextColor

public virtual void SetSelectionTextColor( cef_color_t color )= 0;
Sets the selection text color.

SetText

public virtual void SetText( const CefString& text )= 0;
Sets the contents to |text|. The cursor will be moved to end of the text if the current position is outside of the text range.

SetTextColor

public virtual void SetTextColor( cef_color_t color )= 0;
Sets the text color.

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt