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 public class FloatingButton : Layout
27 /// Creates and initializes a new instance of the FloatingButton class.
29 /// <param name="parent">Created on this parent container..</param>
30 public FloatingButton(EvasObject parent) : base(parent)
35 /// Sets or gets floatingbutton mode.
37 public FloatingButtonMode Mode
41 return (FloatingButtonMode)Interop.Eext.eext_floatingbutton_mode_get(Handle);
45 Interop.Eext.eext_floatingbutton_mode_set(Handle, (int)value);
50 /// Gets floatingbutton Position.
52 public FloatingButtonPosition Position
56 return (FloatingButtonPosition)Interop.Eext.eext_floatingbutton_pos_get(Handle);
61 /// Sets or gets movability for a given floatingbutton widget.
63 public bool MovementBlock
67 return Interop.Eext.eext_floatingbutton_movement_block_get(Handle);
71 Interop.Eext.eext_floatingbutton_movement_block_set(Handle, value);
76 /// Get Opacity's value of the given FloatingButton.
78 public override int Opacity
82 return Color.Default.A;
87 Console.WriteLine("FloatingButton instance doesn't support to set Opacity.");
92 /// Set the floatingbutton position with animation or not.
94 /// <param name="position">Button position</param>
95 /// <param name="animated">Animat flag</param>
96 public void SetPosition(FloatingButtonPosition position, bool animated)
100 Interop.Eext.eext_floatingbutton_pos_bring_in(Handle, (int)position);
104 Interop.Eext.eext_floatingbutton_pos_set(Handle, (int)position);
108 protected override IntPtr CreateHandle(EvasObject parent)
110 return Interop.Eext.eext_floatingbutton_add(parent.Handle);
115 /// Enumeration for FloatingButtonMode
117 public enum FloatingButtonMode
120 /// Allows all positions
125 /// Allows LEFT and RIGHT positions only
131 /// Enumeration for FloatingButtonPosition
133 public enum FloatingButtonPosition
136 /// Hides in the left, but small handler will show only
141 /// Shows all of buttons, but lies on the left
146 /// Shows all of buttons, but lies on the center
151 /// Shows all of buttons, but lies on the right
156 /// Hides in the right, but small handler will show only