Skip to main content

ComboBoxTextExt

Trait ComboBoxTextExt 

Source
pub trait ComboBoxTextExt:
    IsA<ComboBoxText>
    + Sealed
    + 'static {
    // Provided methods
    fn append(&self, id: Option<&str>, text: &str) { ... }
    fn append_text(&self, text: &str) { ... }
    fn active_text(&self) -> Option<GString> { ... }
    fn insert(&self, position: i32, id: Option<&str>, text: &str) { ... }
    fn insert_text(&self, position: i32, text: &str) { ... }
    fn prepend(&self, id: Option<&str>, text: &str) { ... }
    fn prepend_text(&self, text: &str) { ... }
    fn remove(&self, position: i32) { ... }
    fn remove_all(&self) { ... }
}
Expand description

Trait containing all ComboBoxText methods.

§Implementors

ComboBoxText

Provided Methods§

Source

fn append(&self, id: Option<&str>, text: &str)

Appends text to the list of strings stored in self. If id is non-None then it is used as the ID of the row.

This is the same as calling insert() with a position of -1.

§id

a string ID for this value, or None

§text

A string

Source

fn append_text(&self, text: &str)

Appends text to the list of strings stored in self.

This is the same as calling insert_text() with a position of -1.

§text

A string

Source

fn active_text(&self) -> Option<GString>

Returns the currently active string in self, or None if none is selected. If self contains an entry, this function will return its contents (which will not necessarily be an item from the list).

§Returns

a newly allocated string containing the currently active text. Must be freed with g_free().

Source

fn insert(&self, position: i32, id: Option<&str>, text: &str)

Inserts text at position in the list of strings stored in self. If id is non-None then it is used as the ID of the row. See id-column.

If position is negative then text is appended.

§position

An index to insert text

§id

a string ID for this value, or None

§text

A string to display

Source

fn insert_text(&self, position: i32, text: &str)

Inserts text at position in the list of strings stored in self.

If position is negative then text is appended.

This is the same as calling insert() with a None ID string.

§position

An index to insert text

§text

A string

Source

fn prepend(&self, id: Option<&str>, text: &str)

Prepends text to the list of strings stored in self. If id is non-None then it is used as the ID of the row.

This is the same as calling insert() with a position of 0.

§id

a string ID for this value, or None

§text

a string

Source

fn prepend_text(&self, text: &str)

Prepends text to the list of strings stored in self.

This is the same as calling insert_text() with a position of 0.

§text

A string

Source

fn remove(&self, position: i32)

Removes the string at position from self.

§position

Index of the item to remove

Source

fn remove_all(&self)

Removes all the text entries from the combo box.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§