Change EvasObject's API visibility to protected from internal.
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Panel.cs
1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Text;
5 using System.Threading.Tasks;
6
7 namespace ElmSharp
8 {
9     public enum PanelDirection
10     {
11         /// <summary>
12         /// Top to bottom
13         /// </summary>
14         Top = 0,
15         /// <summary>
16         /// Bottom to top
17         /// </summary>
18         Bottom,
19         /// <summary>
20         /// Left to right
21         /// </summary>
22         Left,
23         /// <summary>
24         /// Right to left
25         /// </summary>
26         Right,
27     }
28
29     public class Panel : Layout
30     {
31         public Panel(EvasObject parent) : base(parent)
32         {
33         }
34
35         public bool IsOpen
36         {
37             get
38             {
39                 return !Interop.Elementary.elm_panel_hidden_get(Handle);
40             }
41             set
42             {
43                 Interop.Elementary.elm_panel_hidden_set(Handle, !value);
44             }
45         }
46
47         public PanelDirection Direction
48         {
49             get
50             {
51                 return (PanelDirection)Interop.Elementary.elm_panel_orient_get(Handle);
52             }
53             set
54             {
55                 Interop.Elementary.elm_panel_orient_set(Handle, (int)value);
56             }
57         }
58
59         public void SetScrollable(bool enable)
60         {
61             Interop.Elementary.elm_panel_scrollable_set(Handle, enable);
62         }
63
64         public void SetScrollableArea(double ratio)
65         {
66             Interop.Elementary.elm_panel_scrollable_content_size_set(Handle, ratio);
67         }
68
69         public void Toggle()
70         {
71             Interop.Elementary.elm_panel_toggle(Handle);
72         }
73
74         protected override IntPtr CreateHandle(EvasObject parent)
75         {
76             return Interop.Elementary.elm_panel_add(parent);
77         }
78     }
79 }