Skip to main content

ComboTrait

Trait ComboTrait 

Source
pub trait ComboTrait {
Show 23 methods // Required method fn as_ptr(&self) -> *mut Combo; // Provided methods fn on_filter<F>(&self, handler: F) where F: FnMut(&EvText) -> EvTextFilter + 'static { ... } fn on_change<F>(&self, handler: F) where F: FnMut(&EvText) -> bool + 'static { ... } fn text(&self, text: &str) { ... } fn align(&self, align: Align) { ... } fn tooltip(&self, text: &str) { ... } fn color(&self, color: Color) { ... } fn color_focus(&self, color: Color) { ... } fn background_color(&self, color: Color) { ... } fn background_color_focus(&self, color: Color) { ... } fn placeholder_text(&self, text: &str) { ... } fn placeholder_color(&self, color: Color) { ... } fn placeholder_style(&self, style: FontStyle) { ... } fn get_text(&self, index: u32) -> String { ... } fn count(&self) -> u32 { ... } fn add_element(&self, text: &str) { ... } fn add_image_element<T>(&self, text: &str, image: &T) where T: ImageTrait { ... } fn set_element(&self, index: u32, text: &str) { ... } fn set_image_element<T>(&self, index: u32, text: &str, image: &T) where T: ImageTrait { ... } fn insert_element(&self, index: u32, text: &str) { ... } fn insert_image_element<T>(&self, index: u32, text: &str, image: &T) where T: ImageTrait { ... } fn delete_element(&self, index: u32) { ... } fn duplicates(&self, duplicates: bool) { ... }
}
Expand description

The combo trait.

Required Methods§

Source

fn as_ptr(&self) -> *mut Combo

Returns a raw pointer to the combo object.

Provided Methods§

Source

fn on_filter<F>(&self, handler: F)
where F: FnMut(&EvText) -> EvTextFilter + 'static,

Set a function to filter the text while editing.

Source

fn on_change<F>(&self, handler: F)
where F: FnMut(&EvText) -> bool + 'static,

Set a function to be called when the text has changed.

§Remarks

This event will also be launched when you select an item from the list, a sign that the text has changed in the edit box. See Validate texts and GUI Events.

Source

fn text(&self, text: &str)

Set the combo edit text.

Source

fn align(&self, align: Align)

Set text alignment.

Source

fn tooltip(&self, text: &str)

Assign a tooltip to the control combo.

Source

fn color(&self, color: Color)

Set the color of the combo text.

Source

fn color_focus(&self, color: Color)

Sets the color of the text, when the control has the keyboard focus.

Source

fn background_color(&self, color: Color)

Set the background color.

Source

fn background_color_focus(&self, color: Color)

Sets the background color when the control has keyboard focus.

Source

fn placeholder_text(&self, text: &str)

Set an explanatory text for when the control is blank.

Source

fn placeholder_color(&self, color: Color)

Set the color of the placeholder text.

Source

fn placeholder_style(&self, style: FontStyle)

Set the font style for the placeholder.

Source

fn get_text(&self, index: u32) -> String

Get control text.

Source

fn count(&self) -> u32

Gets the number of items in the dropdown list.

Source

fn add_element(&self, text: &str)

Add a new item to the drop-down list.

Source

fn add_image_element<T>(&self, text: &str, image: &T)
where T: ImageTrait,

Add a new item with image to the drop-down list.

Source

fn set_element(&self, index: u32, text: &str)

Edit an item from the drop-down list.

Source

fn set_image_element<T>(&self, index: u32, text: &str, image: &T)
where T: ImageTrait,

Edit an item with image from the drop-down list.

Source

fn insert_element(&self, index: u32, text: &str)

Insert an item in the drop-down list.

Source

fn insert_image_element<T>(&self, index: u32, text: &str, image: &T)
where T: ImageTrait,

Insert an item with image in the drop-down list.

Source

fn delete_element(&self, index: u32)

Remove an item from the drop-down list.

Source

fn duplicates(&self, duplicates: bool)

Prevents duplicate texts from the drop-down list.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§