pub trait TheListLayoutTrait: TheLayout {
Show 13 methods
// Required methods
fn add_item(&mut self, item: TheListItem, ctx: &mut TheContext);
fn new_item_selected(&mut self, item: TheId);
fn clear(&mut self);
fn remove(&mut self, id: TheId);
fn deselect_all(&mut self);
fn selected(&self) -> Option<TheId>;
fn set_item_size(&mut self, item_size: i32);
fn set_item_icon(&mut self, id: Uuid, image: TheRGBABuffer);
fn select_first_item(&mut self, ctx: &mut TheContext);
fn select_item(
&mut self,
uuid: Uuid,
ctx: &mut TheContext,
send_event: bool,
) -> bool;
fn select_item_at(
&mut self,
index: i32,
ctx: &mut TheContext,
send_event: bool,
) -> bool;
fn set_item_text(&mut self, id: Uuid, text: String);
fn scroll_by(&mut self, delta: Vec2<i32>);
}Expand description
TheListLayout specific functions.
Required Methods§
Sourcefn add_item(&mut self, item: TheListItem, ctx: &mut TheContext)
fn add_item(&mut self, item: TheListItem, ctx: &mut TheContext)
Adds an item.
Sourcefn new_item_selected(&mut self, item: TheId)
fn new_item_selected(&mut self, item: TheId)
A new item was selected, manage the selection states.
Sourcefn deselect_all(&mut self)
fn deselect_all(&mut self)
Deselect all items.
Sourcefn set_item_size(&mut self, item_size: i32)
fn set_item_size(&mut self, item_size: i32)
Set the height of the items
Sourcefn set_item_icon(&mut self, id: Uuid, image: TheRGBABuffer)
fn set_item_icon(&mut self, id: Uuid, image: TheRGBABuffer)
Sets the icon for an item.
Sourcefn select_first_item(&mut self, ctx: &mut TheContext)
fn select_first_item(&mut self, ctx: &mut TheContext)
Selects the first item (and sends events)
Sourcefn select_item(
&mut self,
uuid: Uuid,
ctx: &mut TheContext,
send_event: bool,
) -> bool
fn select_item( &mut self, uuid: Uuid, ctx: &mut TheContext, send_event: bool, ) -> bool
Selects the item of the given uuid.
Sourcefn select_item_at(
&mut self,
index: i32,
ctx: &mut TheContext,
send_event: bool,
) -> bool
fn select_item_at( &mut self, index: i32, ctx: &mut TheContext, send_event: bool, ) -> bool
Selects the item at the given index.
Sourcefn set_item_text(&mut self, id: Uuid, text: String)
fn set_item_text(&mut self, id: Uuid, text: String)
Sets the text for an item