cef_label_button_t

Type Alias cef_label_button_t 

Source
pub type cef_label_button_t = _cef_label_button_t;
Expand description

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

NOTE: This struct is allocated DLL-side.

Aliased Type§

#[repr(C)]
pub struct cef_label_button_t { pub base: _cef_button_t, pub as_menu_button: Option<unsafe extern "C" fn(*mut _cef_label_button_t) -> *mut _cef_menu_button_t>, pub set_text: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_string_utf16_t)>, pub get_text: Option<unsafe extern "C" fn(*mut _cef_label_button_t) -> *mut _cef_string_utf16_t>, pub set_image: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_button_state_t, *mut _cef_image_t)>, pub get_image: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_button_state_t) -> *mut _cef_image_t>, pub set_text_color: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_button_state_t, u32)>, pub set_enabled_text_colors: Option<unsafe extern "C" fn(*mut _cef_label_button_t, u32)>, pub set_font_list: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_string_utf16_t)>, pub set_horizontal_alignment: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_horizontal_alignment_t)>, pub set_minimum_size: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_size_t)>, pub set_maximum_size: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_size_t)>, }

Fields§

§base: _cef_button_t

Base structure.

§as_menu_button: Option<unsafe extern "C" fn(*mut _cef_label_button_t) -> *mut _cef_menu_button_t>

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

§set_text: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_string_utf16_t)>

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

§get_text: Option<unsafe extern "C" fn(*mut _cef_label_button_t) -> *mut _cef_string_utf16_t>

Returns the text shown on the LabelButton.

§set_image: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_button_state_t, *mut _cef_image_t)>

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.

§get_image: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_button_state_t) -> *mut _cef_image_t>

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.

§set_text_color: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_button_state_t, u32)>

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

§set_enabled_text_colors: Option<unsafe extern "C" fn(*mut _cef_label_button_t, u32)>

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

§set_font_list: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_string_utf16_t)>

Sets the font list. The format is “<FONT_FAMILY_LIST>,[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”
§set_horizontal_alignment: Option<unsafe extern "C" fn(*mut _cef_label_button_t, cef_horizontal_alignment_t)>

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

§set_minimum_size: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_size_t)>

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

§set_maximum_size: Option<unsafe extern "C" fn(*mut _cef_label_button_t, *const _cef_size_t)>

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