Class TCefLabelButtonRef

Description
Hierarchy
Fields
Methods
Properties

Unit

Declaration

type TCefLabelButtonRef = class(TCefButtonRef, ICefLabelButton)

Description

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

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/views/cef_label_button_capi.h">CEF source file: /include/capi/views/cef_label_button_capi.h (cef_label_button_t))

Hierarchy

Overview

Methods

Protected function AsMenuButton: ICefMenuButton;
Protected procedure SetText(const text_: ustring);
Protected function GetText: ustring;
Protected procedure SetImage(button_state: TCefButtonState; const image: ICefImage);
Protected function GetImage(button_state: TCefButtonState): ICefImage;
Protected procedure SetTextColor(for_state: TCefButtonState; color: TCefColor);
Protected procedure SetEnabledTextColors(color: TCefColor);
Protected procedure SetFontList(const font_list: ustring);
Protected procedure SetHorizontalAlignment(alignment: TCefHorizontalAlignment);
Protected procedure SetMinimumSize(const size_: TCefSize);
Protected procedure SetMaximumSize(const size_: TCefSize);
Public class function UnWrap(data: Pointer): ICefLabelButton;
Public class function CreateLabelButton(const delegate: ICefButtonDelegate; const text: ustring): ICefLabelButton;

Description

Methods

Protected function AsMenuButton: ICefMenuButton;

Returns this LabelButton as a MenuButton or NULL if this is not a MenuButton.

Protected procedure SetText(const text_: ustring);

Sets the text shown on the LabelButton. By default |text| will also be used as the accessible name.

Protected function GetText: ustring;

Returns the text shown on the LabelButton.

Protected procedure SetImage(button_state: TCefButtonState; const image: ICefImage);

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.

Protected function GetImage(button_state: TCefButtonState): ICefImage;

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.

Protected procedure SetTextColor(for_state: TCefButtonState; color: TCefColor);

Sets the text color shown for the specified button |for_state| to |color|.

Protected procedure SetEnabledTextColors(color: TCefColor);

Sets the text colors shown for the non-disabled states to |color|.

Protected procedure SetFontList(const font_list: ustring);

Sets the font list. The format is "<FONT_FAMILY_LIST>,[STYLES] <SIZE>", 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"

Protected procedure SetHorizontalAlignment(alignment: TCefHorizontalAlignment);

Sets the horizontal alignment; reversed in RTL. Default is CEF_HORIZONTAL_ALIGNMENT_CENTER.

Protected procedure SetMinimumSize(const size_: TCefSize);

Reset the minimum size of this LabelButton to |size|.

Protected procedure SetMaximumSize(const size_: TCefSize);

Reset the maximum size of this LabelButton to |size|.

Public class function UnWrap(data: Pointer): ICefLabelButton;

Returns a ICefLabelButton instance using a PCefLabelButton data pointer.

Public class function CreateLabelButton(const delegate: ICefButtonDelegate; const text: ustring): ICefLabelButton;

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.


Generated by PasDoc 0.16.0-snapshot.