#[repr(C)]pub struct _cef_label_button_t {
pub base: cef_button_t,
pub as_menu_button: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t) -> *mut _cef_menu_button_t>,
pub set_text: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, text: *const cef_string_t)>,
pub get_text: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t) -> cef_string_userfree_t>,
pub set_image: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, button_state: cef_button_state_t, image: *mut _cef_image_t)>,
pub get_image: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, button_state: cef_button_state_t) -> *mut _cef_image_t>,
pub set_text_color: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, for_state: cef_button_state_t, color: cef_color_t)>,
pub set_enabled_text_colors: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, color: cef_color_t)>,
pub set_font_list: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, font_list: *const cef_string_t)>,
pub set_horizontal_alignment: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, alignment: cef_horizontal_alignment_t)>,
pub set_minimum_size: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, size: *const cef_size_t)>,
pub set_maximum_size: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, size: *const cef_size_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.
Fields§
§base: cef_button_tBase structure.
Returns this LabelButton as a MenuButton or NULL if this is not a MenuButton.
set_text: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, text: *const cef_string_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(self_: *mut _cef_label_button_t) -> cef_string_userfree_t>Returns the text shown on the LabelButton.
set_image: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, button_state: cef_button_state_t, image: *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(self_: *mut _cef_label_button_t, button_state: 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(self_: *mut _cef_label_button_t, for_state: cef_button_state_t, color: cef_color_t)>Sets the text color shown for the specified button |for_state| to |color|.
set_enabled_text_colors: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, color: cef_color_t)>Sets the text colors shown for the non-disabled states to |color|.
set_font_list: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, font_list: *const cef_string_t)>Sets the font list. The format is “<FONT_FAMILY_LIST>,[STYLES]
- 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(self_: *mut _cef_label_button_t, alignment: 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(self_: *mut _cef_label_button_t, size: *const cef_size_t)>Reset the minimum size of this LabelButton to |size|.
set_maximum_size: Option<unsafe extern "C" fn(self_: *mut _cef_label_button_t, size: *const cef_size_t)>Reset the maximum size of this LabelButton to |size|.
Trait Implementations§
Source§fn clone(&self) -> _cef_label_button_t
fn clone(&self) -> _cef_label_button_t
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more