/// <summary>Create a UI object from the necessary properties in the specified model.</summary> /// <param name="model">Efl model</param> /// <param name="parent">Efl canvas</param> /// <returns>Created UI object</returns> public Eina.Future Create(Efl.Model model, Efl.Gfx.Entity parent) { var _ret_var = Efl.Ui.FactoryNativeInherit.efl_ui_factory_create_ptr.Value.Delegate(this.NativeHandle, model, parent); Eina.Error.RaiseIfUnhandledException(); return(_ret_var); }
///<summary>Constructor for FactoryItemCreatedEvent.</summary> public FactoryItemCreatedEvent( Efl.Model Model = default(Efl.Model), Efl.Gfx.Entity Item = default(Efl.Gfx.Entity)) { this.Model = Model; this.Item = Item; }
/// <summary>Create a UI object from the necessary properties in the specified model.</summary> /// <param name="model">Efl model</param> /// <param name="parent">Efl canvas</param> /// <returns>Created UI object</returns> virtual public Eina.Future Create(Efl.Model model, Efl.Gfx.Entity parent) { var _ret_var = Efl.Ui.FactoryNativeInherit.efl_ui_factory_create_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), model, parent); Eina.Error.RaiseIfUnhandledException(); return(_ret_var); }
///<summary>Creates a new instance.</summary> ///<param name="parent">Parent instance.</param> ///<param name="model">Model that is/will be See <see cref="Efl.Ui.View.SetModel"/></param> ///<param name="index">Position of this object in the parent model. See <see cref="Efl.CompositeModel.SetIndex"/></param> public CompositeModel(Efl.Object parent , Efl.Model model, uint?index = null) : base(efl_composite_model_class_get(), typeof(CompositeModel), parent) { if (Efl.Eo.Globals.ParamHelperCheck(model)) { SetModel(Efl.Eo.Globals.GetParamHelper(model)); } if (Efl.Eo.Globals.ParamHelperCheck(index)) { SetIndex(Efl.Eo.Globals.GetParamHelper(index)); } FinishInstantiation(); }
private static void model_set(System.IntPtr obj, System.IntPtr pd, Efl.Model model) { Eina.Log.Debug("function efl_ui_view_model_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if (wrapper != null) { try { ((View)wrapper).SetModel(model); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_view_model_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), model); } }
///<summary>Creates a new instance.</summary> ///<param name="parent">Parent instance.</param> ///<param name="model">Model that is/will be See <see cref="Efl.Ui.View.SetModel"/></param> ///<param name="childrenBind">Define if we will intercept all childrens object reference and bind them through the ViewModel with the same property logic as this one. Be careful of recursivity. See <see cref="Efl.ViewModel.SetChildrenBind"/></param> ///<param name="index">Position of this object in the parent model. See <see cref="Efl.CompositeModel.SetIndex"/></param> public ViewModel(Efl.Object parent , Efl.Model model, bool?childrenBind = null, uint?index = null) : base(efl_view_model_class_get(), typeof(ViewModel), parent) { if (Efl.Eo.Globals.ParamHelperCheck(model)) { SetModel(Efl.Eo.Globals.GetParamHelper(model)); } if (Efl.Eo.Globals.ParamHelperCheck(childrenBind)) { SetChildrenBind(Efl.Eo.Globals.GetParamHelper(childrenBind)); } if (Efl.Eo.Globals.ParamHelperCheck(index)) { SetIndex(Efl.Eo.Globals.GetParamHelper(index)); } FinishInstantiation(); }
///<summary>Constructor for ListViewLayoutItem.</summary> public ListViewLayoutItem( Efl.Ui.Layout Layout = default(Efl.Ui.Layout), Eina.Future Layout_request = default(Eina.Future), Efl.Model Children = default(Efl.Model), int Index_offset = default(int), System.IntPtr Tree_node = default(System.IntPtr), Eina.Size2D Min = default(Eina.Size2D), Eina.Size2D Size = default(Eina.Size2D), Eina.Position2D Pos = default(Eina.Position2D)) { this.Layout = Layout; this.Layout_request = Layout_request; this.Children = Children; this.Index_offset = Index_offset; this.Tree_node = Tree_node; this.Min = Min; this.Size = Size; this.Pos = Pos; }
private static Eina.Future create(System.IntPtr obj, System.IntPtr pd, Efl.Model model, Efl.Gfx.Entity parent) { Eina.Log.Debug("function efl_ui_factory_create was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if (wrapper != null) { Eina.Future _ret_var = default(Eina.Future); try { _ret_var = ((Factory)wrapper).Create(model, parent); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); } else { return(efl_ui_factory_create_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), model, parent)); } }
private static Efl.Model model_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_ui_view_model_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if (wrapper != null) { Efl.Model _ret_var = default(Efl.Model); try { _ret_var = ((CompositeModel)wrapper).GetModel(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return(_ret_var); } else { return(efl_ui_view_model_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)))); } }
/// <summary>Model that is/will be</summary> /// <param name="model">Efl model</param> /// <returns></returns> public void SetModel(Efl.Model model) { Efl.Ui.ViewNativeInherit.efl_ui_view_model_set_ptr.Value.Delegate(this.NativeHandle, model); Eina.Error.RaiseIfUnhandledException(); }
public System.Threading.Tasks.Task <Eina.Value> CreateAsync(Efl.Model model, Efl.Gfx.Entity parent, System.Threading.CancellationToken token = default(System.Threading.CancellationToken)) { Eina.Future future = Create(model, parent); return(Efl.Eo.Globals.WrapAsync(future, token)); }
/// <summary>Model that is/will be</summary> /// <param name="model">Efl model</param> /// <returns></returns> virtual public void SetModel(Efl.Model model) { Efl.Ui.ViewNativeInherit.efl_ui_view_model_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), model); Eina.Error.RaiseIfUnhandledException(); }