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 FloatingButton is a widget that to add floating area for buttons.
24 /// <since_tizen> preview </since_tizen>
25 public class FloatingButton : Layout
28 /// Creates and initializes a new instance of the FloatingButton class.
30 /// <param name="parent">Created on this parent container..</param>
31 /// <since_tizen> preview </since_tizen>
32 public FloatingButton(EvasObject parent) : base(parent)
37 /// Sets or gets floatingbutton mode.
39 /// <since_tizen> preview </since_tizen>
40 public FloatingButtonMode Mode
44 return (FloatingButtonMode)Interop.Eext.eext_floatingbutton_mode_get(Handle);
48 Interop.Eext.eext_floatingbutton_mode_set(Handle, (int)value);
53 /// Gets floatingbutton Position.
55 /// <since_tizen> preview </since_tizen>
56 public FloatingButtonPosition Position
60 return (FloatingButtonPosition)Interop.Eext.eext_floatingbutton_pos_get(Handle);
65 /// Sets or gets movability for a given floatingbutton widget.
67 /// <since_tizen> preview </since_tizen>
68 public bool MovementBlock
72 return Interop.Eext.eext_floatingbutton_movement_block_get(Handle);
76 Interop.Eext.eext_floatingbutton_movement_block_set(Handle, value);
81 /// Get Opacity's value of the given FloatingButton.
83 /// <since_tizen> preview </since_tizen>
84 public override int Opacity
88 return Color.Default.A;
93 Console.WriteLine("FloatingButton instance doesn't support to set Opacity.");
98 /// Set the floatingbutton position with animation or not.
100 /// <param name="position">Button position</param>
101 /// <param name="animated">Animat flag</param>
102 /// <since_tizen> preview </since_tizen>
103 public void SetPosition(FloatingButtonPosition position, bool animated)
107 Interop.Eext.eext_floatingbutton_pos_bring_in(Handle, (int)position);
111 Interop.Eext.eext_floatingbutton_pos_set(Handle, (int)position);
116 /// Creates a widget handle.
118 /// <param name="parent">Parent EvasObject</param>
119 /// <returns>Handle IntPtr</returns>
120 /// <since_tizen> preview </since_tizen>
121 protected override IntPtr CreateHandle(EvasObject parent)
123 return Interop.Eext.eext_floatingbutton_add(parent.Handle);
128 /// Enumeration for FloatingButtonMode
130 /// <since_tizen> preview </since_tizen>
131 public enum FloatingButtonMode
134 /// Allows all positions
139 /// Allows LEFT and RIGHT positions only
145 /// Enumeration for FloatingButtonPosition
147 /// <since_tizen> preview </since_tizen>
148 public enum FloatingButtonPosition
151 /// Hides in the left, but small handler will show only
156 /// Shows all of buttons, but lies on the left
161 /// Shows all of buttons, but lies on the center
166 /// Shows all of buttons, but lies on the right
171 /// Hides in the right, but small handler will show only