44 lines
2.4 KiB
Plaintext
44 lines
2.4 KiB
Plaintext
struct @beta Efl.Ui.Factory_Item_Created_Event {
|
|
[[EFL UI Factory event structure provided when an item was just created.]]
|
|
model: Efl.Model; [[The model already set on the new item.]]
|
|
item: Efl.Gfx.Entity; [[The item that was just created.]]
|
|
}
|
|
|
|
interface @beta Efl.Ui.Factory extends Efl.Ui.Property_Bind, Efl.Ui.Factory_Bind
|
|
{
|
|
[[Interface for factory-pattern object creation.
|
|
|
|
This object represents a Factory in the factory pattern. Objects should be created via the method
|
|
@Efl.Ui.View_Factory.create_with_event, which will in turn call the necessary APIs from this interface.
|
|
Objects created this way should be removed using @.release.
|
|
|
|
It is recommended to not create your own @Efl.Ui.Factory and use event handler as much as possible.
|
|
]]
|
|
methods {
|
|
create @protected {
|
|
[[Create a UI object from the necessary properties in the specified model.
|
|
|
|
Note: This is the function you need to implement for a custom factory, but if you want to use a factory,
|
|
you should rely on @Efl.Ui.View_Factory.create_with_event.]]
|
|
params {
|
|
models: iterator<Efl.Model>; [[Efl iterator providing the model to be associated to the new item.
|
|
It should remain valid until the end of the function call.]]
|
|
}
|
|
return: future<Efl.Gfx.Entity>; [[Created UI object.]]
|
|
}
|
|
release {
|
|
[[Release a UI object and disconnect from models.]]
|
|
params {
|
|
ui_view: Efl.Gfx.Entity; [[Object to remove.]]
|
|
}
|
|
}
|
|
}
|
|
events {
|
|
item,constructing: Efl.Gfx.Entity; [[Event triggered when an item is under construction (between the @Efl.Object.constructor and @Efl.Object.finalize call on the item).
|
|
Note: If the @Efl.Ui.Factory does keep a cache of objects, this won't be called when objects are pulled out of the cache.]]
|
|
item,building: Efl.Gfx.Entity; [[Event triggered when an item has processed @Efl.Object.finalize, but before all the factory are done building it.
|
|
Note: if the @Efl.Ui.Factory does keep a cache of object, this will be called when object are pulled out of the cache.]]
|
|
item,created: Efl.Gfx.Entity; [[Event triggered when an item has been successfully created by the factory and is about to be used by an @Efl.Ui.View.]]
|
|
}
|
|
}
|