Struct droom_ui::timer::Timer [] [src]

pub struct Timer(_);

A timer which periodically invokes a callback when the time is up.

Ownership

The timer must be manually destroyed, thus for the user safety it returns a guarded object on the new constructor.

Please refer to the crate level documentation of IUP-Rust (the main doc page) for details on ownership of elements.

Methods

impl Timer
[src]

Constructs a timer.

Gets the set time interval in milliseconds or None if not set.

Sets the time interval in milliseconds.

In Windows the minimum value is 10ms.

Starts the timer.

Does nothing if the TIME attribute is not set i.e. set_time.

If you have multiple threads start the timer in the main thread.

Stops the timer.

Returns the current timer state.

Trait Implementations

impl Element for Timer
[src]

Gets the raw IUP handle associated with this element.

Constructs an Element from a raw IUP handle. Read more

Gets the [class name][1] the derived object should be targeting. [1]: http://webserver2.tecgraf.puc-rio.br/iup/en/func/iupgetclassname.html Read more

Constructs a specialized Element object from a general Handle if they are compatible.

Constructs from a name associated with a element handle (with Element::add_handle_name or LED).

Constructs an Element from a raw IUP handle. Read more

Destroys an interface element and all its children. Read more

Checks if a specific attribute exists in the element.

Returns the names of all attributes of an element that are set in its internal hash table only. Read more

Sets an interface element attribute. Read more

Gets an interface element attribute. Read more

Sets a raw interface element attribute. Read more

Gets a raw interface element attribute.

Associates a element with an attribute. Read more

Gets the handle associated with an attribute.

Clears the value associated with an attribute and use the default value.

Removes an attribute from element and its children if the attrib is inheritable. Read more

Returns the identifier of an interface element that has an associated handle name using Element::add_handle_name or using LED. Read more

Associates a handle name with an interface element. Read more

Clears the handle name association on the specified name. Read more

impl Debug for Timer
[src]

Formats the value using the given formatter.

impl Copy for Timer
[src]

impl Clone for Timer
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl DestroyCb for Timer
[src]

impl ActionCb for Timer
[src]

Called every time the defined time interval is reached.

To stop the callback from being called simply stop de timer with RUN=NO or Timer::stop.

CallbackReturn::Close will be processed.