diff options
author | Kangho Hur <kangho.hur@samsung.com> | 2017-04-27 07:26:45 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2017-04-27 07:26:45 +0000 |
commit | b449cfb1b97fc9d0d3835be6e05445aca7b4c14d (patch) | |
tree | 19c9887036a0e9659147a475727a9058b661b805 | |
parent | 4b6e15f680e71ef222e7b5f4257449189a349c8e (diff) | |
parent | 59ea4786ba1d55db51c52940fcf191526b74efa9 (diff) | |
download | elm-sharp-b449cfb1b97fc9d0d3835be6e05445aca7b4c14d.tar.gz elm-sharp-b449cfb1b97fc9d0d3835be6e05445aca7b4c14d.tar.bz2 elm-sharp-b449cfb1b97fc9d0d3835be6e05445aca7b4c14d.zip |
Merge "Add IsIndicatorFocusable property in Slider" into tizen
-rw-r--r-- | ElmSharp.Test/TC/SliderTest1.cs | 29 | ||||
-rw-r--r--[-rwxr-xr-x] | ElmSharp/ElmSharp/Slider.cs | 19 | ||||
-rw-r--r-- | ElmSharp/Interop/Interop.Elementary.Slider.cs | 12 |
3 files changed, 53 insertions, 7 deletions
diff --git a/ElmSharp.Test/TC/SliderTest1.cs b/ElmSharp.Test/TC/SliderTest1.cs index 200d770..9113836 100644 --- a/ElmSharp.Test/TC/SliderTest1.cs +++ b/ElmSharp.Test/TC/SliderTest1.cs @@ -46,7 +46,28 @@ namespace ElmSharp.Test AlignmentX = -1, AlignmentY = 0.5, WeightX = 1, - WeightY = 1 + WeightY = 1, + IsIndicatorFocusable = true + }; + + Button btn = new Button(window) + { + AlignmentX = -1, + AlignmentY = 0, + WeightX = 1, + WeightY = 1, + Text = "Set IsIndicatorFocusable" + }; + btn.Clicked += (s, e) => + { + if (sld1.IsIndicatorFocusable) + { + sld1.IsIndicatorFocusable = false; + } + else + { + sld1.IsIndicatorFocusable = true; + } }; Label lb1 = new Label(window) @@ -58,9 +79,11 @@ namespace ElmSharp.Test }; table.Pack(sld1, 1, 1, 2, 1); - table.Pack(lb1, 1, 2, 2, 1); + table.Pack(btn, 1, 2, 2, 1); + table.Pack(lb1, 1, 3, 2, 1); sld1.Show(); + btn.Show(); lb1.Show(); sld1.ValueChanged += (s, e) => @@ -70,4 +93,4 @@ namespace ElmSharp.Test }; } } -} +}
\ No newline at end of file diff --git a/ElmSharp/ElmSharp/Slider.cs b/ElmSharp/ElmSharp/Slider.cs index 3db4388..7bad50e 100755..100644 --- a/ElmSharp/ElmSharp/Slider.cs +++ b/ElmSharp/ElmSharp/Slider.cs @@ -19,7 +19,7 @@ using System; namespace ElmSharp { /// <summary> - /// The Slider is a widget that adds a draggable “slider” widget for selecting the value of something within a range. + /// The Slider is a widget that adds a draggable slider widget for selecting the value of something within a range. /// </summary> public class Slider : Layout { @@ -282,6 +282,21 @@ namespace ElmSharp } } + /// <summary> + /// Sets or gets whether to Show the indicator of slider on focus. + /// </summary> + public bool IsIndicatorFocusable + { + get + { + return Interop.Elementary.elm_slider_indicator_show_on_focus_get(RealHandle); + } + set + { + Interop.Elementary.elm_slider_indicator_show_on_focus_set(RealHandle, value); + } + } + protected override IntPtr CreateHandle(EvasObject parent) { IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle); @@ -293,4 +308,4 @@ namespace ElmSharp return handle; } } -} +}
\ No newline at end of file diff --git a/ElmSharp/Interop/Interop.Elementary.Slider.cs b/ElmSharp/Interop/Interop.Elementary.Slider.cs index 5dc88f4..074311c 100644 --- a/ElmSharp/Interop/Interop.Elementary.Slider.cs +++ b/ElmSharp/Interop/Interop.Elementary.Slider.cs @@ -1,4 +1,4 @@ -/* +/* * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); @@ -31,10 +31,17 @@ internal static partial class Interop internal static extern bool elm_slider_indicator_show_get(IntPtr obj); [DllImport(Libraries.Elementary)] + internal static extern void elm_slider_indicator_show_on_focus_set(IntPtr obj, bool focus); + + [DllImport(Libraries.Elementary)] + internal static extern bool elm_slider_indicator_show_on_focus_get(IntPtr obj); + + [DllImport(Libraries.Elementary)] internal static extern void elm_slider_indicator_format_set(IntPtr obj, string indicator); [DllImport(Libraries.Elementary, EntryPoint = "elm_slider_indicator_format_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)] internal static extern IntPtr _elm_slider_indicator_format_get(IntPtr obj); + internal static string elm_slider_indicator_format_get(IntPtr obj) { var text = _elm_slider_indicator_format_get(obj); @@ -46,6 +53,7 @@ internal static partial class Interop [DllImport(Libraries.Elementary, EntryPoint = "elm_slider_unit_format_get", CallingConvention = CallingConvention.Cdecl, ExactSpelling = true, CharSet = CharSet.Ansi)] internal static extern IntPtr _elm_slider_unit_format_get(IntPtr obj); + internal static string elm_slider_unit_format_get(IntPtr obj) { var text = _elm_slider_unit_format_get(obj); @@ -94,4 +102,4 @@ internal static partial class Interop [DllImport(Libraries.Elementary)] internal static extern double elm_slider_step_get(IntPtr obj); } -} +}
\ No newline at end of file |