ComboBox
struct · ferroui-controls · v0.5.0
struct ComboBox
A drop-down list control.
Members
TYPEto_refTEMPLATE_PARTSPSEUDO_CLASSESis_drop_down_open_propertyis_editable_propertymax_drop_down_height_propertyselection_box_item_propertyplaceholder_text_propertyplaceholder_foreground_propertyhorizontal_content_alignment_propertyvertical_content_alignment_propertytext_propertyselection_box_item_template_propertyconstructnewdrop_down_closeddrop_down_openedis_drop_down_openset_is_drop_down_openis_editableset_is_editablemax_drop_down_heightset_max_drop_down_heightselection_box_itemset_selection_box_itemplaceholder_textset_placeholder_textplaceholder_foregroundset_placeholder_foregroundhorizontal_content_alignmentset_horizontal_content_alignmentvertical_content_alignmentset_vertical_content_alignmentselection_box_item_templateset_selection_box_item_templatetextset_textclear
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ComboBox>
Returns a strong reference to this object.
TEMPLATE_PARTS
const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
The named parts expected in the control template.
PSEUDO_CLASSES
const PSEUDO_CLASSES: PseudoClassesAttribute
The pseudoclasses set by the class.
is_drop_down_open_property
fn is_drop_down_open_property() -> &'static StyledProperty<bool>
Defines the IsDropDownOpen property.
is_editable_property
fn is_editable_property() -> &'static StyledProperty<bool>
Defines the IsEditable property.
max_drop_down_height_property
fn max_drop_down_height_property() -> &'static StyledProperty<f64>
Defines the MaxDropDownHeight property.
selection_box_item_property
fn selection_box_item_property() -> &'static DirectProperty<ComboBox, Option<BoxedValue>>
Defines the SelectionBoxItem property.
placeholder_text_property
fn placeholder_text_property() -> &'static StyledProperty<Option<String>>
Defines the PlaceholderText property.
placeholder_foreground_property
fn placeholder_foreground_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
Defines the PlaceholderForeground property.
horizontal_content_alignment_property
fn horizontal_content_alignment_property() -> &'static StyledProperty<HorizontalAlignment>
Defines the HorizontalContentAlignment property.
vertical_content_alignment_property
fn vertical_content_alignment_property() -> &'static StyledProperty<VerticalAlignment>
Defines the VerticalContentAlignment property.
text_property
fn text_property() -> &'static StyledProperty<Option<String>>
Defines the Text property.
selection_box_item_template_property
fn selection_box_item_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
Defines the SelectionBoxItemTemplate property.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
drop_down_closed
fn drop_down_closed(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Occurs after the drop-down (popup) list of the ComboBox closes.
Dropping the returned guard removes the handler; Subscription::detach keeps it for the
life of the combo box.
drop_down_opened
fn drop_down_opened(self: &Self, handler: impl Fn() -> () + 'static) -> Subscription
Occurs after the drop-down (popup) list of the ComboBox opens.
Dropping the returned guard removes the handler; Subscription::detach keeps it for the
life of the combo box.
is_drop_down_open
fn is_drop_down_open(self: &Self) -> bool
Gets or sets a value indicating whether the dropdown is currently open.
set_is_drop_down_open
fn set_is_drop_down_open(self: &Self, value: bool)
is_editable
fn is_editable(self: &Self) -> bool
Gets or sets a value indicating whether the control is editable.
set_is_editable
fn set_is_editable(self: &Self, value: bool)
max_drop_down_height
fn max_drop_down_height(self: &Self) -> f64
Gets or sets the maximum height for the dropdown list.
set_max_drop_down_height
fn set_max_drop_down_height(self: &Self, value: f64)
selection_box_item
fn selection_box_item(self: &Self) -> Option<BoxedValue>
Gets the item to display as the control's content.
set_selection_box_item
fn set_selection_box_item(self: &Self, value: Option<BoxedValue>)
Sets the item to display as the control's content.
placeholder_text
fn placeholder_text(self: &Self) -> Option<String>
Gets or sets the placeholder text.
set_placeholder_text
fn set_placeholder_text(self: &Self, value: Option<String>)
placeholder_foreground
fn placeholder_foreground(self: &Self) -> Option<Rc<dyn IBrush>>
Gets or sets the brush that renders the placeholder text.
set_placeholder_foreground
fn set_placeholder_foreground(self: &Self, value: Option<Rc<dyn IBrush>>)
horizontal_content_alignment
fn horizontal_content_alignment(self: &Self) -> HorizontalAlignment
Gets or sets the horizontal alignment of the content within the control.
set_horizontal_content_alignment
fn set_horizontal_content_alignment(self: &Self, value: HorizontalAlignment)
vertical_content_alignment
fn vertical_content_alignment(self: &Self) -> VerticalAlignment
Gets or sets the vertical alignment of the content within the control.
set_vertical_content_alignment
fn set_vertical_content_alignment(self: &Self, value: VerticalAlignment)
selection_box_item_template
fn selection_box_item_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
Gets or sets the data template used to display the selected item. This has a higher priority than the item template if set.
set_selection_box_item_template
fn set_selection_box_item_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
text
fn text(self: &Self) -> Option<String>
Gets or sets the text used when the control is editable. Does nothing if it is not editable.
set_text
fn set_text(self: &Self, value: Option<String>)
clear
fn clear(self: &Self)
Clears the selection.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtSelectingItemsControlImplExtControlImplExtItemsControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<ComboBox>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplLayoutableImplInteractiveImplControlImplFerroObjectImplVisualImplInputElementImplTemplatedControlImplItemsControlImplSelectingItemsControlImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.