diff options
author | Qian Sui <qian.sui@samsung.com> | 2017-08-16 16:27:16 +0800 |
---|---|---|
committer | Qian Sui <qian.sui@samsung.com> | 2017-08-18 09:42:00 +0800 |
commit | 55a6a7d7ee6d1b57ae04b145eac60b94bd7ab730 (patch) | |
tree | 236b0702cecd926122207dd836dff18cbe4bcc23 | |
parent | 9ddcafb722bc09f8d4dbdf2c65843d4fcd916742 (diff) | |
download | elm-sharp-55a6a7d7ee6d1b57ae04b145eac60b94bd7ab730.tar.gz elm-sharp-55a6a7d7ee6d1b57ae04b145eac60b94bd7ab730.tar.bz2 elm-sharp-55a6a7d7ee6d1b57ae04b145eac60b94bd7ab730.zip |
Add comments for PointerEventArgs,RotarySelector files
Change-Id: Icf5b176d9ffa90b1988f1e5b1851a875523bdefd
Signed-off-by: Qian Sui <qian.sui@samsung.com>
-rwxr-xr-x[-rw-r--r--] | ElmSharp.Wearable/ElmSharp.Wearable/PointerEventArgs.cs | 16 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp.Wearable/ElmSharp.Wearable/RotarySelector.cs | 41 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItem.cs | 87 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItemEventArgs.cs | 20 | ||||
-rwxr-xr-x[-rw-r--r--] | ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorList.cs | 16 |
5 files changed, 178 insertions, 2 deletions
diff --git a/ElmSharp.Wearable/ElmSharp.Wearable/PointerEventArgs.cs b/ElmSharp.Wearable/ElmSharp.Wearable/PointerEventArgs.cs index d746824..e0bf3c7 100644..100755 --- a/ElmSharp.Wearable/ElmSharp.Wearable/PointerEventArgs.cs +++ b/ElmSharp.Wearable/ElmSharp.Wearable/PointerEventArgs.cs @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Text; diff --git a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelector.cs b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelector.cs index eb0181c..48a2c80 100644..100755 --- a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelector.cs +++ b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelector.cs @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Linq; @@ -5,6 +21,11 @@ using System.Text; namespace ElmSharp.Wearable { + /// <summary> + /// The Rotary Selector is a widget to display a selector and multiple items surrounding the selector. + /// And an item can be selected by rotary event or user item click. + /// Inherits <see cref="Layout"/>. + /// </summary> public class RotarySelector : Layout { const string IconPartName = "selector,icon"; @@ -14,15 +35,29 @@ namespace ElmSharp.Wearable const string ItemSelectedEventName = "item,selected"; const string ItemClickedEventName = "item,clicked"; + /// <summary> + /// Selected will be triggered when selected an item. + /// </summary> public event EventHandler<RotarySelectorItemEventArgs> Selected; + + /// <summary> + /// Clicked will be triggered when selecting again the alredy selected item or selecting a selector. + /// </summary> public event EventHandler<RotarySelectorItemEventArgs> Clicked; SmartEvent<PointerEventArgs> _selectedEvent; SmartEvent<PointerEventArgs> _clickedEvent; Image _normalBgImage; + /// <summary> + /// Gets the rotary selector item list of a rotary selector object. + /// </summary> public IList<RotarySelectorItem> Items { get; private set; } + /// <summary> + /// Creates and initializes a new instance of the Rotary Selector class. + /// </summary> + /// <param name="parent">The parent of new Rotary Selector instance</param> public RotarySelector(EvasObject parent) : base(parent) { Items = new RotarySelectorList(this); @@ -42,6 +77,9 @@ namespace ElmSharp.Wearable }; } + /// <summary> + /// Sets or gets the selected item of a rotary selector object. + /// </summary> public RotarySelectorItem SelectedItem { get @@ -77,6 +115,9 @@ namespace ElmSharp.Wearable } } + /// <summary> + /// Sets or gets the background image of a rotary selector object. + /// </summary> public Image BackgroundImage { set => setPart(ref _normalBgImage, BgPartName, State.Normal, value); get => _normalBgImage; } protected override IntPtr CreateHandle(EvasObject parent) diff --git a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItem.cs b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItem.cs index d6abba8..38e46cb 100644..100755 --- a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItem.cs +++ b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItem.cs @@ -1,9 +1,28 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Text; namespace ElmSharp.Wearable { + /// <summary> + /// A instance to the Rotary Selector Item added. And an item can be selected by rotary event or user item click. + /// </summary> public class RotarySelectorItem { const string MainTextPartName = "selector,main_text"; @@ -37,6 +56,9 @@ namespace ElmSharp.Wearable IntPtr _handle; + /// <summary> + /// Sets or gets the handle of a rotary selector item object. + /// </summary> public IntPtr Handle { set @@ -128,28 +150,89 @@ namespace ElmSharp.Wearable } } + /// <summary> + /// Sets or gets the main text of a rotary selector item object. + /// </summary> public string MainText { set => setPart(ref _mainText, MainTextPartName, value); get => _mainText; } + + /// <summary> + /// Sets or gets the sub text of a rotary selector item object. + /// </summary> public string SubText { set => setPart(ref _subText, SubTextPartName, value); get => _subText; } + /// <summary> + /// Sets or gets the sub text color of a rotary selector item object. + /// </summary> public Color MainTextColor { set => setPart(ref _mainTextColor, MainTextPartName, ItemState.Normal, value); get => _mainTextColor; } - public Color SubextColor { set => setPart(ref _subTextColor, SubTextPartName, ItemState.Normal, value); get => _subTextColor; } + /// <summary> + /// Sets or gets the sub text color of a rotary selector item object. + /// </summary> + public Color SubTextColor { set => setPart(ref _subTextColor, SubTextPartName, ItemState.Normal, value); get => _subTextColor; } + + /// <summary> + /// Sets or gets the normal icon image of a rotary selector item object. + /// </summary> public Image NormalIconImage { set => setPart(ref _normalIconImage, IconPartName, ItemState.Normal, value); get => _normalIconImage; } + + /// <summary> + /// Sets or gets the press icon image of a rotary selector item object. + /// </summary> public Image PressedIconImage { set => setPart(ref _pressedIconImage, IconPartName, ItemState.Pressed, value); get => _pressedIconImage; } + + /// <summary> + /// Sets or gets the disable icon image of a rotary selector item object. + /// </summary> public Image DisabledIconImage { set => setPart(ref _disabledIconImage, IconPartName, ItemState.Disabled, value); get => _disabledIconImage; } - public Image SelectedIconImage { set => setPart(ref _selectedIconImage, IconPartName, ItemState.Selected, value); get => _selectedIconImage; } + /// <summary> + /// Sets or gets the selected icon image of a rotary selector item object. + /// </summary> + public Image SelectedIconImage { set => setPart(ref _selectedIconImage, IconPartName, ItemState.Selected, value); get => _selectedIconImage; } + /// <summary> + /// Sets or gets the normal background image of a rotary selector item object. + /// </summary> public Image NormalBackgroundImage { set => setPart(ref _normalBgImage, BgPartName, ItemState.Normal, value); get => _normalBgImage; } + + /// <summary> + /// Sets or gets the pressed background image of a rotary selector item object. + /// </summary> public Image PressedBackgroundImage { set => setPart(ref _pressedBgImage, BgPartName, ItemState.Pressed, value); get => _pressedBgImage; } + + /// <summary> + /// Sets or gets the disabled background image of a rotary selector item object. + /// </summary> public Image DisabledBackgroundImage { set => setPart(ref _disabledBgImage, BgPartName, ItemState.Disabled, value); get => _disabledBgImage; } + + /// <summary> + /// Sets or gets the selected background image of a rotary selector item object. + /// </summary> public Image SelectedBackgroundImage { set => setPart(ref _selectedBgImage, BgPartName, ItemState.Selected, value); get => _selectedBgImage; } + /// <summary> + /// Sets or gets the normal background color of a rotary selector item object. + /// </summary> public Color NormalBackgroundColor { set => setPart(ref _normalBgColor, BgPartName, ItemState.Normal, value); get => _normalBgColor; } + + /// <summary> + /// Sets or gets the pressed background color of a rotary selector item object. + /// </summary> public Color PressedBackgroundColor { set => setPart(ref _pressedBgColor, BgPartName, ItemState.Pressed, value); get => _pressedBgColor; } + + /// <summary> + /// Sets or gets the disabled background color of a rotary selector item object. + /// </summary> public Color DisabledBackgroundColor { set => setPart(ref _disabledBgColor, BgPartName, ItemState.Disabled, value); get => _disabledBgColor; } + + /// <summary> + /// Sets or gets the selected background color of a rotary selector item object. + /// </summary> public Color SelectedBackgroundColor { set => setPart(ref _selectedBgColor, BgPartName, ItemState.Selected, value); get => _selectedBgColor; } + /// <summary> + /// Sets or gets the selector icon image of a rotary selector item object. + /// </summary> public Image SelectorIconImage { set => setPart(ref _selectorIconImage, SelectorIconPartName, ItemState.Normal, value); get => _selectorIconImage; } internal enum ItemState diff --git a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItemEventArgs.cs b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItemEventArgs.cs index 401be2f..b6494d1 100644..100755 --- a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItemEventArgs.cs +++ b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorItemEventArgs.cs @@ -1,9 +1,29 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections.Generic; using System.Text; namespace ElmSharp.Wearable { + /// <summary> + /// <see cref="RotarySelector.Selected"> and <see cref="RotarySelector.Clicked"> events of RotarySelector contain RotarySelectorItemEventArgs as a parameter. + /// Inherits <see cref="EventArgs"/>. + /// </summary> public class RotarySelectorItemEventArgs : EventArgs { public RotarySelectorItem Item { get; set; } diff --git a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorList.cs b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorList.cs index 2f73984..39866b8 100644..100755 --- a/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorList.cs +++ b/ElmSharp.Wearable/ElmSharp.Wearable/RotarySelectorList.cs @@ -1,3 +1,19 @@ +/* + * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an AS IS BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + using System; using System.Collections; using System.Collections.Generic; |