1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui {
8 /// <summary>Elementary panes class</summary>
10 public class Panes : Efl.Ui.LayoutBase, Efl.Eo.IWrapper,Efl.Ui.IClickable,Efl.Ui.IDirection
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (Panes))
16 return Efl.Ui.PanesNativeInherit.GetEflClassStatic();
18 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
22 efl_ui_panes_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 ///<param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
26 public Panes(Efl.Object parent
27 , System.String style = null) :
28 base(efl_ui_panes_class_get(), typeof(Panes), parent)
30 if (Efl.Eo.Globals.ParamHelperCheck(style))
31 SetStyle(Efl.Eo.Globals.GetParamHelper(style));
32 FinishInstantiation();
34 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
35 protected Panes(System.IntPtr raw) : base(raw)
37 RegisterEventProxies();
39 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
40 protected Panes(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
41 ///<summary>Verifies if the given object is equal to this one.</summary>
42 public override bool Equals(object obj)
44 var other = obj as Efl.Object;
47 return this.NativeHandle == other.NativeHandle;
49 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
50 public override int GetHashCode()
52 return this.NativeHandle.ToInt32();
54 ///<summary>Turns the native pointer into a string representation.</summary>
55 public override String ToString()
57 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
59 private static object PressEvtKey = new object();
60 /// <summary>Called when panes got pressed</summary>
61 public event EventHandler PressEvt
65 string key = "_ELM_PANES_EVENT_PRESS";
66 if (AddNativeEventHandler(efl.Libs.Elementary, key, this.evt_PressEvt_delegate)) {
67 eventHandlers.AddHandler(PressEvtKey , value);
69 Eina.Log.Error($"Error adding proxy for event {key}");
74 string key = "_ELM_PANES_EVENT_PRESS";
75 if (RemoveNativeEventHandler(key, this.evt_PressEvt_delegate)) {
76 eventHandlers.RemoveHandler(PressEvtKey , value);
78 Eina.Log.Error($"Error removing proxy for event {key}");
82 ///<summary>Method to raise event PressEvt.</summary>
83 public void On_PressEvt(EventArgs e)
87 evt = (EventHandler)eventHandlers[PressEvtKey];
91 Efl.EventCb evt_PressEvt_delegate;
92 private void on_PressEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
94 EventArgs args = EventArgs.Empty;
97 } catch (Exception e) {
98 Eina.Log.Error(e.ToString());
99 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
103 private static object UnpressEvtKey = new object();
104 /// <summary>Called when panes are no longer pressed</summary>
105 public event EventHandler UnpressEvt
109 string key = "_ELM_PANES_EVENT_UNPRESS";
110 if (AddNativeEventHandler(efl.Libs.Elementary, key, this.evt_UnpressEvt_delegate)) {
111 eventHandlers.AddHandler(UnpressEvtKey , value);
113 Eina.Log.Error($"Error adding proxy for event {key}");
118 string key = "_ELM_PANES_EVENT_UNPRESS";
119 if (RemoveNativeEventHandler(key, this.evt_UnpressEvt_delegate)) {
120 eventHandlers.RemoveHandler(UnpressEvtKey , value);
122 Eina.Log.Error($"Error removing proxy for event {key}");
126 ///<summary>Method to raise event UnpressEvt.</summary>
127 public void On_UnpressEvt(EventArgs e)
131 evt = (EventHandler)eventHandlers[UnpressEvtKey];
133 evt?.Invoke(this, e);
135 Efl.EventCb evt_UnpressEvt_delegate;
136 private void on_UnpressEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
138 EventArgs args = EventArgs.Empty;
141 } catch (Exception e) {
142 Eina.Log.Error(e.ToString());
143 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
147 private static object ClickedEvtKey = new object();
148 /// <summary>Called when object is clicked</summary>
149 public event EventHandler ClickedEvt
153 string key = "_EFL_UI_EVENT_CLICKED";
154 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ClickedEvt_delegate)) {
155 eventHandlers.AddHandler(ClickedEvtKey , value);
157 Eina.Log.Error($"Error adding proxy for event {key}");
162 string key = "_EFL_UI_EVENT_CLICKED";
163 if (RemoveNativeEventHandler(key, this.evt_ClickedEvt_delegate)) {
164 eventHandlers.RemoveHandler(ClickedEvtKey , value);
166 Eina.Log.Error($"Error removing proxy for event {key}");
170 ///<summary>Method to raise event ClickedEvt.</summary>
171 public void On_ClickedEvt(EventArgs e)
175 evt = (EventHandler)eventHandlers[ClickedEvtKey];
177 evt?.Invoke(this, e);
179 Efl.EventCb evt_ClickedEvt_delegate;
180 private void on_ClickedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
182 EventArgs args = EventArgs.Empty;
185 } catch (Exception e) {
186 Eina.Log.Error(e.ToString());
187 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
191 private static object ClickedDoubleEvtKey = new object();
192 /// <summary>Called when object receives a double click</summary>
193 public event EventHandler ClickedDoubleEvt
197 string key = "_EFL_UI_EVENT_CLICKED_DOUBLE";
198 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ClickedDoubleEvt_delegate)) {
199 eventHandlers.AddHandler(ClickedDoubleEvtKey , value);
201 Eina.Log.Error($"Error adding proxy for event {key}");
206 string key = "_EFL_UI_EVENT_CLICKED_DOUBLE";
207 if (RemoveNativeEventHandler(key, this.evt_ClickedDoubleEvt_delegate)) {
208 eventHandlers.RemoveHandler(ClickedDoubleEvtKey , value);
210 Eina.Log.Error($"Error removing proxy for event {key}");
214 ///<summary>Method to raise event ClickedDoubleEvt.</summary>
215 public void On_ClickedDoubleEvt(EventArgs e)
219 evt = (EventHandler)eventHandlers[ClickedDoubleEvtKey];
221 evt?.Invoke(this, e);
223 Efl.EventCb evt_ClickedDoubleEvt_delegate;
224 private void on_ClickedDoubleEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
226 EventArgs args = EventArgs.Empty;
228 On_ClickedDoubleEvt(args);
229 } catch (Exception e) {
230 Eina.Log.Error(e.ToString());
231 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
235 private static object ClickedTripleEvtKey = new object();
236 /// <summary>Called when object receives a triple click</summary>
237 public event EventHandler ClickedTripleEvt
241 string key = "_EFL_UI_EVENT_CLICKED_TRIPLE";
242 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ClickedTripleEvt_delegate)) {
243 eventHandlers.AddHandler(ClickedTripleEvtKey , value);
245 Eina.Log.Error($"Error adding proxy for event {key}");
250 string key = "_EFL_UI_EVENT_CLICKED_TRIPLE";
251 if (RemoveNativeEventHandler(key, this.evt_ClickedTripleEvt_delegate)) {
252 eventHandlers.RemoveHandler(ClickedTripleEvtKey , value);
254 Eina.Log.Error($"Error removing proxy for event {key}");
258 ///<summary>Method to raise event ClickedTripleEvt.</summary>
259 public void On_ClickedTripleEvt(EventArgs e)
263 evt = (EventHandler)eventHandlers[ClickedTripleEvtKey];
265 evt?.Invoke(this, e);
267 Efl.EventCb evt_ClickedTripleEvt_delegate;
268 private void on_ClickedTripleEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
270 EventArgs args = EventArgs.Empty;
272 On_ClickedTripleEvt(args);
273 } catch (Exception e) {
274 Eina.Log.Error(e.ToString());
275 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
279 private static object ClickedRightEvtKey = new object();
280 /// <summary>Called when object receives a right click</summary>
281 public event EventHandler<Efl.Ui.IClickableClickedRightEvt_Args> ClickedRightEvt
285 string key = "_EFL_UI_EVENT_CLICKED_RIGHT";
286 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_ClickedRightEvt_delegate)) {
287 eventHandlers.AddHandler(ClickedRightEvtKey , value);
289 Eina.Log.Error($"Error adding proxy for event {key}");
294 string key = "_EFL_UI_EVENT_CLICKED_RIGHT";
295 if (RemoveNativeEventHandler(key, this.evt_ClickedRightEvt_delegate)) {
296 eventHandlers.RemoveHandler(ClickedRightEvtKey , value);
298 Eina.Log.Error($"Error removing proxy for event {key}");
302 ///<summary>Method to raise event ClickedRightEvt.</summary>
303 public void On_ClickedRightEvt(Efl.Ui.IClickableClickedRightEvt_Args e)
305 EventHandler<Efl.Ui.IClickableClickedRightEvt_Args> evt;
307 evt = (EventHandler<Efl.Ui.IClickableClickedRightEvt_Args>)eventHandlers[ClickedRightEvtKey];
309 evt?.Invoke(this, e);
311 Efl.EventCb evt_ClickedRightEvt_delegate;
312 private void on_ClickedRightEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
314 Efl.Ui.IClickableClickedRightEvt_Args args = new Efl.Ui.IClickableClickedRightEvt_Args();
315 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Object);
317 On_ClickedRightEvt(args);
318 } catch (Exception e) {
319 Eina.Log.Error(e.ToString());
320 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
324 private static object PressedEvtKey = new object();
325 /// <summary>Called when the object is pressed</summary>
326 public event EventHandler<Efl.Ui.IClickablePressedEvt_Args> PressedEvt
330 string key = "_EFL_UI_EVENT_PRESSED";
331 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_PressedEvt_delegate)) {
332 eventHandlers.AddHandler(PressedEvtKey , value);
334 Eina.Log.Error($"Error adding proxy for event {key}");
339 string key = "_EFL_UI_EVENT_PRESSED";
340 if (RemoveNativeEventHandler(key, this.evt_PressedEvt_delegate)) {
341 eventHandlers.RemoveHandler(PressedEvtKey , value);
343 Eina.Log.Error($"Error removing proxy for event {key}");
347 ///<summary>Method to raise event PressedEvt.</summary>
348 public void On_PressedEvt(Efl.Ui.IClickablePressedEvt_Args e)
350 EventHandler<Efl.Ui.IClickablePressedEvt_Args> evt;
352 evt = (EventHandler<Efl.Ui.IClickablePressedEvt_Args>)eventHandlers[PressedEvtKey];
354 evt?.Invoke(this, e);
356 Efl.EventCb evt_PressedEvt_delegate;
357 private void on_PressedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
359 Efl.Ui.IClickablePressedEvt_Args args = new Efl.Ui.IClickablePressedEvt_Args();
360 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Object);
363 } catch (Exception e) {
364 Eina.Log.Error(e.ToString());
365 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
369 private static object UnpressedEvtKey = new object();
370 /// <summary>Called when the object is no longer pressed</summary>
371 public event EventHandler<Efl.Ui.IClickableUnpressedEvt_Args> UnpressedEvt
375 string key = "_EFL_UI_EVENT_UNPRESSED";
376 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_UnpressedEvt_delegate)) {
377 eventHandlers.AddHandler(UnpressedEvtKey , value);
379 Eina.Log.Error($"Error adding proxy for event {key}");
384 string key = "_EFL_UI_EVENT_UNPRESSED";
385 if (RemoveNativeEventHandler(key, this.evt_UnpressedEvt_delegate)) {
386 eventHandlers.RemoveHandler(UnpressedEvtKey , value);
388 Eina.Log.Error($"Error removing proxy for event {key}");
392 ///<summary>Method to raise event UnpressedEvt.</summary>
393 public void On_UnpressedEvt(Efl.Ui.IClickableUnpressedEvt_Args e)
395 EventHandler<Efl.Ui.IClickableUnpressedEvt_Args> evt;
397 evt = (EventHandler<Efl.Ui.IClickableUnpressedEvt_Args>)eventHandlers[UnpressedEvtKey];
399 evt?.Invoke(this, e);
401 Efl.EventCb evt_UnpressedEvt_delegate;
402 private void on_UnpressedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
404 Efl.Ui.IClickableUnpressedEvt_Args args = new Efl.Ui.IClickableUnpressedEvt_Args();
405 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Object);
407 On_UnpressedEvt(args);
408 } catch (Exception e) {
409 Eina.Log.Error(e.ToString());
410 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
414 private static object LongpressedEvtKey = new object();
415 /// <summary>Called when the object receives a long press</summary>
416 public event EventHandler<Efl.Ui.IClickableLongpressedEvt_Args> LongpressedEvt
420 string key = "_EFL_UI_EVENT_LONGPRESSED";
421 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_LongpressedEvt_delegate)) {
422 eventHandlers.AddHandler(LongpressedEvtKey , value);
424 Eina.Log.Error($"Error adding proxy for event {key}");
429 string key = "_EFL_UI_EVENT_LONGPRESSED";
430 if (RemoveNativeEventHandler(key, this.evt_LongpressedEvt_delegate)) {
431 eventHandlers.RemoveHandler(LongpressedEvtKey , value);
433 Eina.Log.Error($"Error removing proxy for event {key}");
437 ///<summary>Method to raise event LongpressedEvt.</summary>
438 public void On_LongpressedEvt(Efl.Ui.IClickableLongpressedEvt_Args e)
440 EventHandler<Efl.Ui.IClickableLongpressedEvt_Args> evt;
442 evt = (EventHandler<Efl.Ui.IClickableLongpressedEvt_Args>)eventHandlers[LongpressedEvtKey];
444 evt?.Invoke(this, e);
446 Efl.EventCb evt_LongpressedEvt_delegate;
447 private void on_LongpressedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
449 Efl.Ui.IClickableLongpressedEvt_Args args = new Efl.Ui.IClickableLongpressedEvt_Args();
450 args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.Object);
452 On_LongpressedEvt(args);
453 } catch (Exception e) {
454 Eina.Log.Error(e.ToString());
455 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
459 private static object RepeatedEvtKey = new object();
460 /// <summary>Called when the object receives repeated presses/clicks</summary>
461 public event EventHandler RepeatedEvt
465 string key = "_EFL_UI_EVENT_REPEATED";
466 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_RepeatedEvt_delegate)) {
467 eventHandlers.AddHandler(RepeatedEvtKey , value);
469 Eina.Log.Error($"Error adding proxy for event {key}");
474 string key = "_EFL_UI_EVENT_REPEATED";
475 if (RemoveNativeEventHandler(key, this.evt_RepeatedEvt_delegate)) {
476 eventHandlers.RemoveHandler(RepeatedEvtKey , value);
478 Eina.Log.Error($"Error removing proxy for event {key}");
482 ///<summary>Method to raise event RepeatedEvt.</summary>
483 public void On_RepeatedEvt(EventArgs e)
487 evt = (EventHandler)eventHandlers[RepeatedEvtKey];
489 evt?.Invoke(this, e);
491 Efl.EventCb evt_RepeatedEvt_delegate;
492 private void on_RepeatedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
494 EventArgs args = EventArgs.Empty;
496 On_RepeatedEvt(args);
497 } catch (Exception e) {
498 Eina.Log.Error(e.ToString());
499 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
503 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
504 protected override void RegisterEventProxies()
506 base.RegisterEventProxies();
507 evt_PressEvt_delegate = new Efl.EventCb(on_PressEvt_NativeCallback);
508 evt_UnpressEvt_delegate = new Efl.EventCb(on_UnpressEvt_NativeCallback);
509 evt_ClickedEvt_delegate = new Efl.EventCb(on_ClickedEvt_NativeCallback);
510 evt_ClickedDoubleEvt_delegate = new Efl.EventCb(on_ClickedDoubleEvt_NativeCallback);
511 evt_ClickedTripleEvt_delegate = new Efl.EventCb(on_ClickedTripleEvt_NativeCallback);
512 evt_ClickedRightEvt_delegate = new Efl.EventCb(on_ClickedRightEvt_NativeCallback);
513 evt_PressedEvt_delegate = new Efl.EventCb(on_PressedEvt_NativeCallback);
514 evt_UnpressedEvt_delegate = new Efl.EventCb(on_UnpressedEvt_NativeCallback);
515 evt_LongpressedEvt_delegate = new Efl.EventCb(on_LongpressedEvt_NativeCallback);
516 evt_RepeatedEvt_delegate = new Efl.EventCb(on_RepeatedEvt_NativeCallback);
518 /// <summary>The second half of the panes widget (right or bottom)</summary>
519 public Efl.Ui.PanesPart Second
523 return Efl.IPartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, "second") as Efl.Ui.PanesPart;
526 /// <summary>The first half of the panes widget (left or top)</summary>
527 public Efl.Ui.PanesPart First
531 return Efl.IPartNativeInherit.efl_part_get_ptr.Value.Delegate(NativeHandle, "first") as Efl.Ui.PanesPart;
534 /// <summary>Set the split ratio between panes widget first and second parts.
535 /// By default it's homogeneous, i.e., both sides have the same size.
537 /// If something different is required, it can be set with this function. For example, if the first content should be displayed over 75% of the panes size, <c>ratio</c> should be passed as 0.75. This way, second content will be resized to 25% of panes size.
539 /// If displayed vertically, first content is displayed at top, and second content at bottom.
541 /// Note: This ratio will change when user drags the panes bar.</summary>
542 /// <returns>Value between 0.0 and 1.0 representing split ratio between panes first and second parts.</returns>
543 virtual public double GetSplitRatio() {
544 var _ret_var = Efl.Ui.PanesNativeInherit.efl_ui_panes_split_ratio_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
545 Eina.Error.RaiseIfUnhandledException();
548 /// <summary>Set the split ratio between panes widget first and second parts.
549 /// By default it's homogeneous, i.e., both sides have the same size.
551 /// If something different is required, it can be set with this function. For example, if the first content should be displayed over 75% of the panes size, <c>ratio</c> should be passed as 0.75. This way, second content will be resized to 25% of panes size.
553 /// If displayed vertically, first content is displayed at top, and second content at bottom.
555 /// Note: This ratio will change when user drags the panes bar.</summary>
556 /// <param name="ratio">Value between 0.0 and 1.0 representing split ratio between panes first and second parts.</param>
557 /// <returns></returns>
558 virtual public void SetSplitRatio( double ratio) {
559 Efl.Ui.PanesNativeInherit.efl_ui_panes_split_ratio_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), ratio);
560 Eina.Error.RaiseIfUnhandledException();
562 /// <summary>Set whether the left and right panes can be resized by user interaction.
563 /// By default panes' contents are resizable by user interaction.</summary>
564 /// <returns>Use <c>true</c> to fix the left and right panes sizes and make them not to be resized by user interaction. Use <c>false</c> to make them resizable.</returns>
565 virtual public bool GetFixed() {
566 var _ret_var = Efl.Ui.PanesNativeInherit.efl_ui_panes_fixed_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
567 Eina.Error.RaiseIfUnhandledException();
570 /// <summary>Set whether the left and right panes can be resized by user interaction.
571 /// By default panes' contents are resizable by user interaction.</summary>
572 /// <param name="kw_fixed">Use <c>true</c> to fix the left and right panes sizes and make them not to be resized by user interaction. Use <c>false</c> to make them resizable.</param>
573 /// <returns></returns>
574 virtual public void SetFixed( bool kw_fixed) {
575 Efl.Ui.PanesNativeInherit.efl_ui_panes_fixed_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), kw_fixed);
576 Eina.Error.RaiseIfUnhandledException();
578 /// <summary>Control the direction of a given widget.
579 /// Use this function to change how your widget is to be disposed: vertically or horizontally or inverted vertically or inverted horizontally.
581 /// Mirroring as defined in <see cref="Efl.Ui.II18n"/> can invert the <c>horizontal</c> direction: it is <c>ltr</c> by default, but becomes <c>rtl</c> if the object is mirrored.</summary>
582 /// <returns>Direction of the widget.</returns>
583 virtual public Efl.Ui.Dir GetDirection() {
584 var _ret_var = Efl.Ui.IDirectionNativeInherit.efl_ui_direction_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
585 Eina.Error.RaiseIfUnhandledException();
588 /// <summary>Control the direction of a given widget.
589 /// Use this function to change how your widget is to be disposed: vertically or horizontally or inverted vertically or inverted horizontally.
591 /// Mirroring as defined in <see cref="Efl.Ui.II18n"/> can invert the <c>horizontal</c> direction: it is <c>ltr</c> by default, but becomes <c>rtl</c> if the object is mirrored.</summary>
592 /// <param name="dir">Direction of the widget.</param>
593 /// <returns></returns>
594 virtual public void SetDirection( Efl.Ui.Dir dir) {
595 Efl.Ui.IDirectionNativeInherit.efl_ui_direction_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), dir);
596 Eina.Error.RaiseIfUnhandledException();
598 /// <summary>Set the split ratio between panes widget first and second parts.
599 /// By default it's homogeneous, i.e., both sides have the same size.
601 /// If something different is required, it can be set with this function. For example, if the first content should be displayed over 75% of the panes size, <c>ratio</c> should be passed as 0.75. This way, second content will be resized to 25% of panes size.
603 /// If displayed vertically, first content is displayed at top, and second content at bottom.
605 /// Note: This ratio will change when user drags the panes bar.</summary>
606 /// <value>Value between 0.0 and 1.0 representing split ratio between panes first and second parts.</value>
607 public double SplitRatio {
608 get { return GetSplitRatio(); }
609 set { SetSplitRatio( value); }
611 /// <summary>Set whether the left and right panes can be resized by user interaction.
612 /// By default panes' contents are resizable by user interaction.</summary>
613 /// <value>Use <c>true</c> to fix the left and right panes sizes and make them not to be resized by user interaction. Use <c>false</c> to make them resizable.</value>
615 get { return GetFixed(); }
616 set { SetFixed( value); }
618 /// <summary>Control the direction of a given widget.
619 /// Use this function to change how your widget is to be disposed: vertically or horizontally or inverted vertically or inverted horizontally.
621 /// Mirroring as defined in <see cref="Efl.Ui.II18n"/> can invert the <c>horizontal</c> direction: it is <c>ltr</c> by default, but becomes <c>rtl</c> if the object is mirrored.</summary>
622 /// <value>Direction of the widget.</value>
623 public Efl.Ui.Dir Direction {
624 get { return GetDirection(); }
625 set { SetDirection( value); }
627 private static IntPtr GetEflClassStatic()
629 return Efl.Ui.Panes.efl_ui_panes_class_get();
632 public class PanesNativeInherit : Efl.Ui.LayoutBaseNativeInherit{
633 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
634 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
636 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
637 var methods = Efl.Eo.Globals.GetUserMethods(type);
638 if (efl_ui_panes_split_ratio_get_static_delegate == null)
639 efl_ui_panes_split_ratio_get_static_delegate = new efl_ui_panes_split_ratio_get_delegate(split_ratio_get);
640 if (methods.FirstOrDefault(m => m.Name == "GetSplitRatio") != null)
641 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_panes_split_ratio_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_split_ratio_get_static_delegate)});
642 if (efl_ui_panes_split_ratio_set_static_delegate == null)
643 efl_ui_panes_split_ratio_set_static_delegate = new efl_ui_panes_split_ratio_set_delegate(split_ratio_set);
644 if (methods.FirstOrDefault(m => m.Name == "SetSplitRatio") != null)
645 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_panes_split_ratio_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_split_ratio_set_static_delegate)});
646 if (efl_ui_panes_fixed_get_static_delegate == null)
647 efl_ui_panes_fixed_get_static_delegate = new efl_ui_panes_fixed_get_delegate(fixed_get);
648 if (methods.FirstOrDefault(m => m.Name == "GetFixed") != null)
649 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_panes_fixed_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_fixed_get_static_delegate)});
650 if (efl_ui_panes_fixed_set_static_delegate == null)
651 efl_ui_panes_fixed_set_static_delegate = new efl_ui_panes_fixed_set_delegate(fixed_set);
652 if (methods.FirstOrDefault(m => m.Name == "SetFixed") != null)
653 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_panes_fixed_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_panes_fixed_set_static_delegate)});
654 if (efl_ui_direction_get_static_delegate == null)
655 efl_ui_direction_get_static_delegate = new efl_ui_direction_get_delegate(direction_get);
656 if (methods.FirstOrDefault(m => m.Name == "GetDirection") != null)
657 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_direction_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_direction_get_static_delegate)});
658 if (efl_ui_direction_set_static_delegate == null)
659 efl_ui_direction_set_static_delegate = new efl_ui_direction_set_delegate(direction_set);
660 if (methods.FirstOrDefault(m => m.Name == "SetDirection") != null)
661 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_ui_direction_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_direction_set_static_delegate)});
662 descs.AddRange(base.GetEoOps(type));
665 public override IntPtr GetEflClass()
667 return Efl.Ui.Panes.efl_ui_panes_class_get();
669 public static new IntPtr GetEflClassStatic()
671 return Efl.Ui.Panes.efl_ui_panes_class_get();
675 private delegate double efl_ui_panes_split_ratio_get_delegate(System.IntPtr obj, System.IntPtr pd);
678 public delegate double efl_ui_panes_split_ratio_get_api_delegate(System.IntPtr obj);
679 public static Efl.Eo.FunctionWrapper<efl_ui_panes_split_ratio_get_api_delegate> efl_ui_panes_split_ratio_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_panes_split_ratio_get_api_delegate>(_Module, "efl_ui_panes_split_ratio_get");
680 private static double split_ratio_get(System.IntPtr obj, System.IntPtr pd)
682 Eina.Log.Debug("function efl_ui_panes_split_ratio_get was called");
683 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
684 if(wrapper != null) {
685 double _ret_var = default(double);
687 _ret_var = ((Panes)wrapper).GetSplitRatio();
688 } catch (Exception e) {
689 Eina.Log.Warning($"Callback error: {e.ToString()}");
690 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
694 return efl_ui_panes_split_ratio_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
697 private static efl_ui_panes_split_ratio_get_delegate efl_ui_panes_split_ratio_get_static_delegate;
700 private delegate void efl_ui_panes_split_ratio_set_delegate(System.IntPtr obj, System.IntPtr pd, double ratio);
703 public delegate void efl_ui_panes_split_ratio_set_api_delegate(System.IntPtr obj, double ratio);
704 public static Efl.Eo.FunctionWrapper<efl_ui_panes_split_ratio_set_api_delegate> efl_ui_panes_split_ratio_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_panes_split_ratio_set_api_delegate>(_Module, "efl_ui_panes_split_ratio_set");
705 private static void split_ratio_set(System.IntPtr obj, System.IntPtr pd, double ratio)
707 Eina.Log.Debug("function efl_ui_panes_split_ratio_set was called");
708 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
709 if(wrapper != null) {
712 ((Panes)wrapper).SetSplitRatio( ratio);
713 } catch (Exception e) {
714 Eina.Log.Warning($"Callback error: {e.ToString()}");
715 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
718 efl_ui_panes_split_ratio_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ratio);
721 private static efl_ui_panes_split_ratio_set_delegate efl_ui_panes_split_ratio_set_static_delegate;
724 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_ui_panes_fixed_get_delegate(System.IntPtr obj, System.IntPtr pd);
727 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_ui_panes_fixed_get_api_delegate(System.IntPtr obj);
728 public static Efl.Eo.FunctionWrapper<efl_ui_panes_fixed_get_api_delegate> efl_ui_panes_fixed_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_panes_fixed_get_api_delegate>(_Module, "efl_ui_panes_fixed_get");
729 private static bool fixed_get(System.IntPtr obj, System.IntPtr pd)
731 Eina.Log.Debug("function efl_ui_panes_fixed_get was called");
732 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
733 if(wrapper != null) {
734 bool _ret_var = default(bool);
736 _ret_var = ((Panes)wrapper).GetFixed();
737 } catch (Exception e) {
738 Eina.Log.Warning($"Callback error: {e.ToString()}");
739 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
743 return efl_ui_panes_fixed_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
746 private static efl_ui_panes_fixed_get_delegate efl_ui_panes_fixed_get_static_delegate;
749 private delegate void efl_ui_panes_fixed_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool kw_fixed);
752 public delegate void efl_ui_panes_fixed_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool kw_fixed);
753 public static Efl.Eo.FunctionWrapper<efl_ui_panes_fixed_set_api_delegate> efl_ui_panes_fixed_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_panes_fixed_set_api_delegate>(_Module, "efl_ui_panes_fixed_set");
754 private static void fixed_set(System.IntPtr obj, System.IntPtr pd, bool kw_fixed)
756 Eina.Log.Debug("function efl_ui_panes_fixed_set was called");
757 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
758 if(wrapper != null) {
761 ((Panes)wrapper).SetFixed( kw_fixed);
762 } catch (Exception e) {
763 Eina.Log.Warning($"Callback error: {e.ToString()}");
764 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
767 efl_ui_panes_fixed_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), kw_fixed);
770 private static efl_ui_panes_fixed_set_delegate efl_ui_panes_fixed_set_static_delegate;
773 private delegate Efl.Ui.Dir efl_ui_direction_get_delegate(System.IntPtr obj, System.IntPtr pd);
776 public delegate Efl.Ui.Dir efl_ui_direction_get_api_delegate(System.IntPtr obj);
777 public static Efl.Eo.FunctionWrapper<efl_ui_direction_get_api_delegate> efl_ui_direction_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_direction_get_api_delegate>(_Module, "efl_ui_direction_get");
778 private static Efl.Ui.Dir direction_get(System.IntPtr obj, System.IntPtr pd)
780 Eina.Log.Debug("function efl_ui_direction_get was called");
781 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
782 if(wrapper != null) {
783 Efl.Ui.Dir _ret_var = default(Efl.Ui.Dir);
785 _ret_var = ((Panes)wrapper).GetDirection();
786 } catch (Exception e) {
787 Eina.Log.Warning($"Callback error: {e.ToString()}");
788 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
792 return efl_ui_direction_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
795 private static efl_ui_direction_get_delegate efl_ui_direction_get_static_delegate;
798 private delegate void efl_ui_direction_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Dir dir);
801 public delegate void efl_ui_direction_set_api_delegate(System.IntPtr obj, Efl.Ui.Dir dir);
802 public static Efl.Eo.FunctionWrapper<efl_ui_direction_set_api_delegate> efl_ui_direction_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_direction_set_api_delegate>(_Module, "efl_ui_direction_set");
803 private static void direction_set(System.IntPtr obj, System.IntPtr pd, Efl.Ui.Dir dir)
805 Eina.Log.Debug("function efl_ui_direction_set was called");
806 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
807 if(wrapper != null) {
810 ((Panes)wrapper).SetDirection( dir);
811 } catch (Exception e) {
812 Eina.Log.Warning($"Callback error: {e.ToString()}");
813 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
816 efl_ui_direction_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), dir);
819 private static efl_ui_direction_set_delegate efl_ui_direction_set_static_delegate;