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.
21 public class Panes : Layout
24 SmartEvent _unpressed;
25 public Panes(EvasObject parent) : base(parent)
27 _press = new SmartEvent(this, this.RealHandle, "press");
28 _unpressed = new SmartEvent(this, this.RealHandle, "unpressed");
30 _press.On += (s, e) => Pressed?.Invoke(this, e);
31 _unpressed.On += (s, e) => Unpressed?.Invoke(this, e);
34 public event EventHandler Pressed;
35 public event EventHandler Unpressed;
40 return Interop.Elementary.elm_panes_fixed_get(RealHandle);
44 Interop.Elementary.elm_panes_fixed_set(RealHandle, value);
48 public double Proportion
52 return Interop.Elementary.elm_panes_content_left_size_get(RealHandle);
56 Interop.Elementary.elm_panes_content_left_size_set(RealHandle, value);
60 public bool IsHorizontal
64 return Interop.Elementary.elm_panes_horizontal_get(RealHandle);
68 Interop.Elementary.elm_panes_horizontal_set(RealHandle, value);
72 protected override IntPtr CreateHandle(EvasObject parent)
74 IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
75 Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
77 RealHandle = Interop.Elementary.elm_panes_add(handle);
78 Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);