~~Title: Efl.Ui.Factory~~ ====== Efl.Ui.Factory (interface) ====== ===== Description ===== %%Interface for factory-pattern object creation.%% %%This object represents a Factory in the factory pattern. Objects should be created via the method %%[[:develop:api:efl:ui:view_factory:method:create_with_event|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 %%[[:develop:api:efl:ui:factory:method:release|Efl.Ui.Factory.release]]%%.%% %%It is recommended to not create your own %%[[:develop:api:efl:ui:factory|Efl.Ui.Factory]]%% and use event handler as much as possible.%% {{page>:develop:api-include:efl:ui:factory:description&nouser&nolink&nodate}} ===== Inheritance ===== => [[:develop:api:efl:ui:property_bind|Efl.Ui.Property_Bind]] //(interface)// ++++ Full hierarchy | * [[:develop:api:efl:ui:property_bind|Efl.Ui.Property_Bind]] //(interface)// * [[:develop:api:efl:ui:factory_bind|Efl.Ui.Factory_Bind]] //(interface)// ++++ ===== Members ===== **[[:develop:api:efl:ui:factory:method:release|release]]**\\ > %%Release a UI object and disconnect from models.%% void efl_ui_factory_release(Eo *obj, Eina_Iterator *ui_views); \\ **[[:develop:api:efl:ui:factory:method:create|create]]** ''protected''\\ > %%Create a UI object from the necessary properties in the specified model.%% Eina_Future *efl_ui_factory_create(Eo *obj, Eina_Iterator *models); \\ ==== Inherited ==== ^ [[:develop:api:efl:ui:factory_bind|Efl.Ui.Factory_Bind]] ^^^ | | **[[:develop:api:efl:ui:factory_bind:method:factory_bind|factory_bind]]** | %%bind the factory with the given key string. when the data is ready or changed, factory create the object and bind the data to the key action and process promised work. Note: the input %%[[:develop:api:efl:ui:factory|Efl.Ui.Factory]]%% need to be %%[[:develop:api:efl:ui:property_bind:method:property_bind|Efl.Ui.Property_Bind.property_bind]]%% at least once.%% | ^ [[:develop:api:efl:ui:property_bind|Efl.Ui.Property_Bind]] ^^^ | | **[[:develop:api:efl:ui:property_bind:method:property_bind|property_bind]]** | %%bind property data with the given key string. when the data is ready or changed, bind the data to the key action and process promised work.%% | ===== Events ===== **[[:develop:api:efl:ui:factory:event:item_building|item,building]]**\\ > %%Event triggered when an item has processed %%[[:develop:api:efl:object:method:finalize|Efl.Object.finalize]]%%, but before all the factory are done building it. Note: if the %%[[:develop:api:efl:ui:factory|Efl.Ui.Factory]]%% does keep a cache of object, this will be called when object are pulled out of the cache.%% EFL_UI_FACTORY_EVENT_ITEM_BUILDING(Efl_Gfx_Entity *) \\ **[[:develop:api:efl:ui:factory:event:item_constructing|item,constructing]]**\\ > %%Event triggered when an item is under construction (between the %%[[:develop:api:efl:object:method:constructor|Efl.Object.constructor]]%% and %%[[:develop:api:efl:object:method:finalize|Efl.Object.finalize]]%% call on the item). Note: If the %%[[:develop:api:efl:ui:factory|Efl.Ui.Factory]]%% does keep a cache of objects, this won't be called when objects are pulled out of the cache.%% EFL_UI_FACTORY_EVENT_ITEM_CONSTRUCTING(Efl_Gfx_Entity *) \\ **[[:develop:api:efl:ui:factory:event:item_created|item,created]]**\\ > %%Event triggered when an item has been successfully created by the factory and is about to be used by an %%[[:develop:api:efl:ui:view|Efl.Ui.View]]%%.%% EFL_UI_FACTORY_EVENT_ITEM_CREATED(Efl_Gfx_Entity *) \\ **[[:develop:api:efl:ui:factory:event:item_releasing|item,releasing]]**\\ > %%Event triggered when an item is being released by the %%[[:develop:api:efl:ui:factory|Efl.Ui.Factory]]%%. It must be assumed that after this call, the object can be recycle to another %%[[:develop:api:efl:ui:view|Efl.Ui.View]]%% and there can be more than one call for the same item.%% EFL_UI_FACTORY_EVENT_ITEM_RELEASING(Efl_Gfx_Entity *) \\ ==== Inherited ==== ^ [[:develop:api:efl:ui:property_bind|Efl.Ui.Property_Bind]] ^^^ | | **[[:develop:api:efl:ui:property_bind:event:properties_changed|properties,changed]]** | %%Event dispatched when a property on the object has changed due to a user interaction on the object that a model could be interested in.%% | | | **[[:develop:api:efl:ui:property_bind:event:property_bound|property,bound]]** | %%Event dispatched when a property on the object is bound to a model. This is useful to avoid generating too many events.%% |