_cef_label_button_t

Struct _cef_label_button_t 

Source
#[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_t

Base structure.

§as_menu_button: Option<unsafe extern "C" fn(self_: *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(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] ”, 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(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§

impl Clone for _cef_label_button_t

Source§

fn clone(&self) -> _cef_label_button_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for _cef_label_button_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for _cef_label_button_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.