[]Struct gtk::ComboBoxText

pub struct ComboBoxText(_, _);

A ComboBoxText is a simple variant of ComboBox that hides the model-view complexity for simple text-only use cases.

To create a ComboBoxText, use ComboBoxText::new or ComboBoxText::new_with_entry.

You can add items to a ComboBoxText with ComboBoxTextExt::append_text, ComboBoxTextExt::insert_text or ComboBoxTextExt::prepend_text and remove options with ComboBoxTextExt::remove.

If the ComboBoxText contains an entry (via the “has-entry” property), its contents can be retrieved using ComboBoxTextExt::get_active_text. The entry itself can be accessed by calling BinExt::get_child on the combo box.

You should not call ComboBoxExt::set_model or attempt to pack more cells into this combo box via its CellLayout interface.

ComboBoxText as Buildable

The ComboBoxText implementation of the Buildable interface supports adding items directly using the <items> element and specifying <item> elements for each item. Each <item> element can specify the “id” corresponding to the appended text and also supports the regular translation attributes “translatable”, “context” and “comments”.

Here is a UI definition fragment specifying ComboBoxText items:

combobox
╰── box.linked
    ├── entry.combo
    ├── button.combo
    ╰── window.popup

ComboBoxText has a single CSS node with name combobox. It adds the style class .combo to the main CSS nodes of its entry and button children, and the .linked class to the node of its internal box.

Implements

ComboBoxTextExt, ComboBoxExt, BinExt, ContainerExt, WidgetExt, glib::object::ObjectExt, BuildableExt, CellEditableExt, CellLayoutExt, ComboBoxExtManual, WidgetExtManual, BuildableExtManual

Implementations

impl ComboBoxText[src]

pub fn new() -> ComboBoxText[src]

Creates a new ComboBoxText, which is a ComboBox just displaying strings.

Returns

A new ComboBoxText

pub fn with_entry() -> ComboBoxText[src]

Trait Implementations

impl Clone for ComboBoxText

impl Debug for ComboBoxText

impl Default for ComboBoxText[src]

impl Display for ComboBoxText[src]

impl Eq for ComboBoxText

impl Hash for ComboBoxText

impl IsA<Bin> for ComboBoxText

impl IsA<Buildable> for ComboBoxText

impl IsA<CellEditable> for ComboBoxText

impl IsA<CellLayout> for ComboBoxText

impl IsA<ComboBox> for ComboBoxText

impl IsA<Container> for ComboBoxText

impl IsA<Widget> for ComboBoxText

impl Ord for ComboBoxText

impl<T: ObjectType> PartialEq<T> for ComboBoxText

impl<T: ObjectType> PartialOrd<T> for ComboBoxText

impl StaticType for ComboBoxText

Auto Trait Implementations

impl RefUnwindSafe for ComboBoxText

impl !Send for ComboBoxText

impl !Sync for ComboBoxText

impl Unpin for ComboBoxText

impl UnwindSafe for ComboBoxText

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<Super, Sub> CanDowncast<Sub> for Super where
    Sub: IsA<Super>,
    Super: IsA<Super>, 

impl<T> Cast for T where
    T: ObjectType, 

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ObjectExt for T where
    T: ObjectType, 

impl<'a, T> ToGlibContainerFromSlice<'a, *const GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *const GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<Array>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GList> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<List>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<'a, T> ToGlibContainerFromSlice<'a, *mut GPtrArray> for T where
    T: GlibPtrDefault + ToGlibPtr<'a, <T as GlibPtrDefault>::GlibType>, 

type Storage = (Option<PtrArray>, Vec<Stash<'a, <T as GlibPtrDefault>::GlibType, T>>)

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.