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 CefLabelButton

CefBaseRefCounted
   |
   +--CefView
         |
         +--CefButton
               |
               +--CefLabelButton

   in cef_label_button.h
Direct Known Subclasses:
CefMenuButton

class CefLabelButton
extends CefButton

LabelButton is a button with optional text and/or icon. Methods must be called on the browser process UI thread unless otherwise indicated.


Method Summary
 virtual CefRefPtr< CefMenuButton > AsMenuButton()= 0
          Returns this LabelButton as a MenuButton or NULL if this is not a MenuButton.
 static CefRefPtr< CefLabelButton > CreateLabelButton( CefRefPtr< CefButtonDelegate > delegate, const CefString& text, bool with_frame )
          Create a new LabelButton.
 virtual CefRefPtr< CefImage > GetImage( cef_button_state_t button_state )= 0
          Returns the image shown for |button_state|.
 virtual CefString GetText()= 0
          Returns the text shown on the LabelButton.
 virtual void SetEnabledTextColors( cef_color_t color )= 0
          Sets the text colors shown for the non-disabled states to |color|.
 virtual void SetFontList( const CefString& font_list )= 0
          Sets the font list.
 virtual void SetHorizontalAlignment( cef_horizontal_alignment_t alignment )= 0
          Sets the horizontal alignment; reversed in RTL.
 virtual void SetImage( cef_button_state_t button_state, CefRefPtr< CefImage > image )= 0
          Sets the image shown for |button_state|.
 virtual void SetMaximumSize( const CefSize& size )= 0
          Reset the maximum size of this LabelButton to |size|.
 virtual void SetMinimumSize( const CefSize& size )= 0
          Reset the minimum size of this LabelButton to |size|.
 virtual void SetText( const CefString& text )= 0
          Sets the text shown on the LabelButton.
 virtual void SetTextColor( cef_button_state_t for_state, cef_color_t color )= 0
          Sets the text color shown for the specified button |for_state| to |color|.
   
Methods inherited from class CefButton
AsLabelButton, SetState, GetState, SetInkDropEnabled, SetTooltipText, SetAccessibleName
   
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

AsMenuButton

public virtual CefRefPtr< CefMenuButton > AsMenuButton()= 0;
Returns this LabelButton as a MenuButton or NULL if this is not a MenuButton.

CreateLabelButton

public static CefRefPtr< CefLabelButton > CreateLabelButton( CefRefPtr< CefButtonDelegate > delegate, const CefString& text, bool with_frame );
Create a new LabelButton. A |delegate| must be provided to handle the button click. |text| will be shown on the LabelButton and used as the default accessible name. If |with_frame| is true the button will have a visible frame at all times, center alignment, additional padding and a default minimum size of 70x33 DIP. If |with_frame| is false the button will only have a visible frame on hover/press, left alignment, less padding and no default minimum size.

GetImage

public virtual CefRefPtr< CefImage > GetImage( cef_button_state_t button_state )= 0;
Returns the image shown for |button_state|. If no image exists for that state then the image for CEF_BUTTON_STATE_NORMAL will be returned.

GetText

public virtual CefString GetText()= 0;
Returns the text shown on the LabelButton.

SetEnabledTextColors

public virtual void SetEnabledTextColors( cef_color_t color )= 0;
Sets the text colors shown for the non-disabled states to |color|.

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"

SetHorizontalAlignment

public virtual void SetHorizontalAlignment( cef_horizontal_alignment_t alignment )= 0;
Sets the horizontal alignment; reversed in RTL. Default is CEF_HORIZONTAL_ALIGNMENT_CENTER.

SetImage

public virtual void SetImage( cef_button_state_t button_state, CefRefPtr< CefImage > image )= 0;
Sets the image shown for |button_state|. When this Button is drawn if no image exists for the current state then the image for CEF_BUTTON_STATE_NORMAL, if any, will be shown.

SetMaximumSize

public virtual void SetMaximumSize( const CefSize& size )= 0;
Reset the maximum size of this LabelButton to |size|.

SetMinimumSize

public virtual void SetMinimumSize( const CefSize& size )= 0;
Reset the minimum size of this LabelButton to |size|.

SetText

public virtual void SetText( const CefString& text )= 0;
Sets the text shown on the LabelButton. By default |text| will also be used as the accessible name.

SetTextColor

public virtual void SetTextColor( cef_button_state_t for_state, cef_color_t color )= 0;
Sets the text color shown for the specified button |for_state| to |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