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 /// The Panes is a widget that adds a draggable bar between two contents.
23 /// When dragged, this bar resizes the contents' size.
25 /// <since_tizen> preview </since_tizen>
26 [Obsolete("This has been deprecated in API12")]
27 public class Panes : Layout
30 SmartEvent _unpressed;
33 /// Creates and initializes a new instance of the Panes class.
35 /// <param name="parent">The EvasObject to which the new Panes will be attached as a child.</param>
36 /// <since_tizen> preview </since_tizen>
37 [Obsolete("This has been deprecated in API12")]
38 public Panes(EvasObject parent) : base(parent)
40 _press = new SmartEvent(this, this.RealHandle, "press");
41 _unpressed = new SmartEvent(this, this.RealHandle, "unpress");
43 _press.On += (s, e) => Pressed?.Invoke(this, e);
44 _unpressed.On += (s, e) => Unpressed?.Invoke(this, e);
48 /// Pressed will be triggered when the panes have been pressed (button isn't released yet).
50 /// <since_tizen> preview </since_tizen>
51 [Obsolete("This has been deprecated in API12")]
52 public event EventHandler Pressed;
55 /// Unpressed will be triggered when the panes are released after being pressed.
57 /// <since_tizen> preview </since_tizen>
58 [Obsolete("This has been deprecated in API12")]
59 public event EventHandler Unpressed;
62 /// Sets or gets the resize mode of a given Panes widget.
63 /// True means the left and right panes resize homogeneously.
65 /// <since_tizen> preview </since_tizen>
66 [Obsolete("This has been deprecated in API12")]
71 return Interop.Elementary.elm_panes_fixed_get(RealHandle);
75 Interop.Elementary.elm_panes_fixed_set(RealHandle, value);
80 /// Sets or gets the size proportion of the Panes widget's left side.
83 /// By default, it's homogeneous, i.e., both sides have the same size. If something different is required,
84 /// it can be set with this function. For example, if the left content should be displayed over 75% of the panes size,
85 /// the size should be passed as 0.75. This way, the right content is resized to 25% of the panes size.
86 /// If displayed vertically, left content is displayed at the top and right content at the bottom.
87 /// This proportion changes when the user drags the panes bar.
89 /// The float type value between 0.0 and 1.0 represents the size proportion of the left side.
91 /// <since_tizen> preview </since_tizen>
92 [Obsolete("This has been deprecated in API12")]
93 public double Proportion
97 return Interop.Elementary.elm_panes_content_left_size_get(RealHandle);
101 Interop.Elementary.elm_panes_content_left_size_set(RealHandle, value);
106 /// Sets or gets the orientation of a given Panes widget.
109 /// Use this function to change how your panes are to be disposed: vertically or horizontally.
110 /// Horizontal panes have "top" and "bottom" contents, vertical panes have "left" and "right" contents.
111 /// By default, the panes are in a vertical mode.
113 /// <since_tizen> preview </since_tizen>
114 [Obsolete("This has been deprecated in API12")]
115 public bool IsHorizontal
119 return Interop.Elementary.elm_panes_horizontal_get(RealHandle);
123 Interop.Elementary.elm_panes_horizontal_set(RealHandle, value);
128 /// Sets or gets the absolute minimum size of panes widget's left side.
129 /// If displayed vertically, left content is displayed at the top.
130 /// The value represents minimum size of the left side in pixels.
132 /// <since_tizen> preview </since_tizen>
133 [Obsolete("This has been deprecated in API12")]
134 public int LeftMinimumSize
138 return Interop.Elementary.elm_panes_content_left_min_size_get(RealHandle);
142 Interop.Elementary.elm_panes_content_left_min_size_set(RealHandle, value);
147 /// Sets or gets the relative minimum size of the panes widget's left side.
148 /// The proportion of minimum size of the left side.
149 /// If displayed vertically, left content is displayed at the top.
150 /// The value between 0.0 and 1.0 represents size proportion of the minimum size of the left side.
152 /// <since_tizen> preview </since_tizen>
153 [Obsolete("This has been deprecated in API12")]
154 public double LeftMinimumRelativeSize
158 return Interop.Elementary.elm_panes_content_left_min_relative_size_get(RealHandle);
162 Interop.Elementary.elm_panes_content_left_min_relative_size_set(RealHandle, value);
167 /// Sets or gets the absolute minimum size of the panes widget's right side.
168 /// If displayed vertically, right content is displayed at the top.
169 /// The value represents the minimum size of the right side in pixels.
171 /// <since_tizen> preview </since_tizen>
172 [Obsolete("This has been deprecated in API12")]
173 public int RightMinimumSize
177 return Interop.Elementary.elm_panes_content_right_min_size_get(RealHandle);
181 Interop.Elementary.elm_panes_content_right_min_size_set(RealHandle, value);
186 /// Sets or gets the relative minimum size of the panes widget's right side.
187 /// Proportion of the minimum size of the right side.
188 /// If displayed vertically, right content is displayed at the top.
189 /// The value between 0.0 and 1.0 represents size proportion of the minimum size of the right side.
191 /// <since_tizen> preview </since_tizen>
192 [Obsolete("This has been deprecated in API12")]
193 public double RightMinimumRelativeSize
197 return Interop.Elementary.elm_panes_content_right_min_relative_size_get(RealHandle);
201 Interop.Elementary.elm_panes_content_right_min_relative_size_set(RealHandle, value);
206 /// Creates a widget handle.
208 /// <param name="parent">Parent EvasObject.</param>
209 /// <returns>Handle IntPtr.</returns>
210 /// <since_tizen> preview </since_tizen>
211 [Obsolete("This has been deprecated in API12")]
212 protected override IntPtr CreateHandle(EvasObject parent)
214 IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
215 Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
217 RealHandle = Interop.Elementary.elm_panes_add(handle);
218 Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);