Trait components::ActorManagerExt[][src]

pub trait ActorManagerExt: 'static {
    fn add_actor<P: Is<Actor>, Q: Is<Actor>>(
        &self,
        container: &P,
        actor: &Q
    ) -> u64;
fn cancel_operation(&self, id: u64);
fn cancel_operations<P: Is<Actor>>(&self, actor: &P);
fn get_n_operations(&self) -> u32;
fn get_stage(&self) -> Option<Stage>;
fn get_time_slice(&self) -> u32;
fn remove_actor<P: Is<Actor>, Q: Is<Actor>>(
        &self,
        container: &P,
        actor: &Q
    ) -> u64;
fn remove_container<P: Is<Actor>>(&self, container: &P);
fn set_time_slice(&self, msecs: u32);
fn connect_actor_finished<F: Fn(&Self, &Actor) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_n_operations_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId;
fn connect_property_time_slice_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Required methods

fn add_actor<P: Is<Actor>, Q: Is<Actor>>(&self, container: &P, actor: &Q) -> u64[src]

add_actor: @manager: A #ActorManager @container: A #Actor @actor: A #Actor

Adds @actor to @container. The actor may not be parented immediately, or at all, if the operation is cancelled.

On successful completion, the #ActorManager::actor_added signal will be fired.

Returns: The ID for this operation.

fn cancel_operation(&self, id: u64)[src]

cancel_operation: @manager: A #ActorManager @id: An operation ID

Cancels the given operation, if it exists. The #ActorManager::operation_cancelled signal is fired whenever an operation is cancelled.

fn cancel_operations<P: Is<Actor>>(&self, actor: &P)[src]

cancel_operations: @manager: A #ActorManager @actor: A #Actor

Cancels all operations associated with the given actor.

fn get_n_operations(&self) -> u32[src]

create_actor: @manager: A #ActorManager @create_func: A #Actor creation function @userdata: data to be passed to the function, or %None @destroy_func: callback to invoke before the operation is removed

Creates a #Actor. The actor may not be created immediately, or at all, if the operation is cancelled.

On successful completion, the #ActorManager::actor_created signal will be fired.

Returns: The ID for this operation.

get_n_operations: @manager: A #ActorManager

Retrieves the amount of operations left in the queue.

Returns: Number of operations left to perform

fn get_stage(&self) -> Option<Stage>[src]

get_stage: @manager: A #ActorManager

Gets the #Stage the actor manager is associated with.

Returns: (transfer none): The #Stage the actor is associated with.

fn get_time_slice(&self) -> u32[src]

get_time_slice: @manager: A #ActorManager

Retrieves the current time slice being used for operations.

Returns: The time-slice being used, in milliseconds

fn remove_actor<P: Is<Actor>, Q: Is<Actor>>(
    &self,
    container: &P,
    actor: &Q
) -> u64
[src]

remove_actor: @manager: A #ActorManager @container: A #Actor @actor: A #Actor

Removes @actor from @container.

On successful completion, the #ActorManager::actor_removed signal will be fired.

The actor may not be removed immediately, and thus you may want to set the actor’s opacity to 0 before calling this function.

Returns: The ID for this operation.

fn remove_container<P: Is<Actor>>(&self, container: &P)[src]

remove_container: @manager: A #ActorManager @container: A #Actor

Removes the container. This is a utility function that works by first removing all the children of the container, then the children itself. This effectively spreads the load of removing a large container. All prior operations associated with this container will be cancelled.

The container may not be removed immediately, and thus you may want to set the container’s opacity to 0 before calling this function.

fn set_time_slice(&self, msecs: u32)[src]

set_time_slice: @manager: A #ActorManager @msecs: A time, in milliseconds

Sets the amount of time the actor manager will spend performing operations, before yielding to allow any necessary redrawing to occur.

Lower times will lead to smoother performance, but will increase the amount of time it takes for operations to complete.

fn connect_actor_finished<F: Fn(&Self, &Actor) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_property_n_operations_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

fn connect_property_time_slice_notify<F: Fn(&Self) + 'static>(
    &self,
    f: F
) -> SignalHandlerId
[src]

Loading content...

Implementors

impl<O: Is<ActorManager>> ActorManagerExt for O[src]

fn add_actor<P: Is<Actor>, Q: Is<Actor>>(&self, container: &P, actor: &Q) -> u64[src]

add_actor: @manager: A #ActorManager @container: A #Actor @actor: A #Actor

Adds @actor to @container. The actor may not be parented immediately, or at all, if the operation is cancelled.

On successful completion, the #ActorManager::actor_added signal will be fired.

Returns: The ID for this operation.

fn cancel_operation(&self, id: u64)[src]

cancel_operation: @manager: A #ActorManager @id: An operation ID

Cancels the given operation, if it exists. The #ActorManager::operation_cancelled signal is fired whenever an operation is cancelled.

fn cancel_operations<P: Is<Actor>>(&self, actor: &P)[src]

cancel_operations: @manager: A #ActorManager @actor: A #Actor

Cancels all operations associated with the given actor.

fn get_n_operations(&self) -> u32[src]

create_actor: @manager: A #ActorManager @create_func: A #Actor creation function @userdata: data to be passed to the function, or %None @destroy_func: callback to invoke before the operation is removed

Creates a #Actor. The actor may not be created immediately, or at all, if the operation is cancelled.

On successful completion, the #ActorManager::actor_created signal will be fired.

Returns: The ID for this operation.

get_n_operations: @manager: A #ActorManager

Retrieves the amount of operations left in the queue.

Returns: Number of operations left to perform

fn get_stage(&self) -> Option<Stage>[src]

get_stage: @manager: A #ActorManager

Gets the #Stage the actor manager is associated with.

Returns: (transfer none): The #Stage the actor is associated with.

fn get_time_slice(&self) -> u32[src]

get_time_slice: @manager: A #ActorManager

Retrieves the current time slice being used for operations.

Returns: The time-slice being used, in milliseconds

fn remove_actor<P: Is<Actor>, Q: Is<Actor>>(
    &self,
    container: &P,
    actor: &Q
) -> u64
[src]

remove_actor: @manager: A #ActorManager @container: A #Actor @actor: A #Actor

Removes @actor from @container.

On successful completion, the #ActorManager::actor_removed signal will be fired.

The actor may not be removed immediately, and thus you may want to set the actor’s opacity to 0 before calling this function.

Returns: The ID for this operation.

fn remove_container<P: Is<Actor>>(&self, container: &P)[src]

remove_container: @manager: A #ActorManager @container: A #Actor

Removes the container. This is a utility function that works by first removing all the children of the container, then the children itself. This effectively spreads the load of removing a large container. All prior operations associated with this container will be cancelled.

The container may not be removed immediately, and thus you may want to set the container’s opacity to 0 before calling this function.

fn set_time_slice(&self, msecs: u32)[src]

set_time_slice: @manager: A #ActorManager @msecs: A time, in milliseconds

Sets the amount of time the actor manager will spend performing operations, before yielding to allow any necessary redrawing to occur.

Lower times will lead to smoother performance, but will increase the amount of time it takes for operations to complete.

Loading content...