Trait IListBoxItemGenerator3D
pub trait IListBoxItemGenerator3D: AsAny {
// Required methods
fn attach(&self, node: Weak<Node3D>) -> Result<(), Error>;
fn detach(&self, node: Weak<Node3D>) -> Result<(), Error>;
fn acquire_item(&self, index: usize) -> Result<Weak<Node3D>, Error>;
fn release_item(&self, node: Option<Weak<Node3D>>) -> Result<(), Error>;
fn get_item_index(
&self,
node: Option<Weak<Node3D>>,
) -> Result<Option<usize>, Error>;
fn get_item_size(&self, index: usize) -> Result<Vector3, Error>;
fn get_count(&self) -> Result<usize, Error>;
}Required Methods§
fn acquire_item(&self, index: usize) -> Result<Weak<Node3D>, Error>
fn acquire_item(&self, index: usize) -> Result<Weak<Node3D>, Error>
Gets the object to display at the given index. If the object already exists and was not freed, the method returns the object from cache.
fn release_item(&self, node: Option<Weak<Node3D>>) -> Result<(), Error>
fn release_item(&self, node: Option<Weak<Node3D>>) -> Result<(), Error>
Frees the object returned by getObject.
fn get_item_index(
&self,
node: Option<Weak<Node3D>>,
) -> Result<Option<usize>, Error>
fn get_item_index( &self, node: Option<Weak<Node3D>>, ) -> Result<Option<usize>, Error>
Gets the index of the object returned by getObject.
fn get_item_size(&self, index: usize) -> Result<Vector3, Error>
fn get_item_size(&self, index: usize) -> Result<Vector3, Error>
Gets the size of the object to display at the given index. If you do not provide an object prototype to the list box, Kanzi uses the size that this method returns. If it is not possible to determine the item size without acquiring the item first, returns an unbounded layout value. It is recommended to cache the sizes of objects.