2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
22 /// Enumeration for the PanelDirection types.
24 /// <since_tizen> preview </since_tizen>
25 [Obsolete("This has been deprecated in API12")]
26 public enum PanelDirection
47 /// The Panel is a container that can contain subobjects.
49 /// <since_tizen> preview </since_tizen>
50 [Obsolete("This has been deprecated in API12")]
51 public class Panel : Layout
57 /// Creates and initializes a new instance of the Panel class.
59 /// <param name="parent">The EvasObject to which the new panel will be attached as a child.</param>
60 /// <since_tizen> preview </since_tizen>
61 [Obsolete("This has been deprecated in API12")]
62 public Panel(EvasObject parent) : base(parent)
64 _toggled = new SmartEvent(this, this.RealHandle, "toggled");
65 _scrolled = new SmartEvent(this, this.RealHandle, "scroll");
67 _toggled.On += (s, e) => Toggled?.Invoke(this, EventArgs.Empty);
68 _scrolled.On += (s, e) => Scrolled?.Invoke(this, EventArgs.Empty);
72 /// Sets or gets the hidden status of a given Panel widget.
74 /// <since_tizen> preview </since_tizen>
75 [Obsolete("This has been deprecated in API12")]
80 return !Interop.Elementary.elm_panel_hidden_get(RealHandle);
84 Interop.Elementary.elm_panel_hidden_set(RealHandle, !value);
89 /// Sets or gets the direction of a given Panel widget.
91 /// <since_tizen> preview </since_tizen>
92 [Obsolete("This has been deprecated in API12")]
93 public PanelDirection Direction
97 return (PanelDirection)Interop.Elementary.elm_panel_orient_get(RealHandle);
101 Interop.Elementary.elm_panel_orient_set(RealHandle, (int)value);
106 /// Toggled will be triggered when the panel is toggled.
108 /// <since_tizen> preview </since_tizen>
109 [Obsolete("This has been deprecated in API12")]
110 public event EventHandler Toggled;
113 /// Scrolled will be triggered when the panel has been scrolled. This event is emitted only when the panel is scrollable
115 /// <since_tizen> preview </since_tizen>
116 [Obsolete("This has been deprecated in API12")]
117 public event EventHandler Scrolled;
120 /// Enable or disable scrolling in the panel.
122 /// <param name="enable">
123 /// Bool value can be false or true.
125 /// <since_tizen> preview </since_tizen>
126 [Obsolete("This has been deprecated in API12")]
127 public void SetScrollable(bool enable)
129 Interop.Elementary.elm_panel_scrollable_set(RealHandle, enable);
133 /// Sets the scroll size of the panel.
135 /// <param name="ratio">
136 /// The size of the scroll area.
138 /// <since_tizen> preview </since_tizen>
139 [Obsolete("This has been deprecated in API12")]
140 public void SetScrollableArea(double ratio)
142 Interop.Elementary.elm_panel_scrollable_content_size_set(RealHandle, ratio);
146 /// Toggles the hidden state of the panel.
148 /// <since_tizen> preview </since_tizen>
149 [Obsolete("This has been deprecated in API12")]
152 Interop.Elementary.elm_panel_toggle(RealHandle);
156 /// Creates a widget handle.
158 /// <param name="parent">Parent EvasObject.</param>
159 /// <returns>Handle IntPtr.</returns>
160 /// <since_tizen> preview </since_tizen>
161 [Obsolete("This has been deprecated in API12")]
162 protected override IntPtr CreateHandle(EvasObject parent)
164 IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
165 Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
167 RealHandle = Interop.Elementary.elm_panel_add(handle);
168 Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);