add comments for Naviframe&NaviItem 88/124088/2
authorhongqingli <hongqing.li@samsung.com>
Mon, 10 Apr 2017 07:22:01 +0000 (15:22 +0800)
committerhongqingli <hongqing.li@samsung.com>
Mon, 10 Apr 2017 07:31:02 +0000 (15:31 +0800)
Change-Id: Icde694cd199fade24b03a4366ff8a83b93cedb90
Signed-off-by: hongqingli <hongqing.li@samsung.com>
ElmSharp/ElmSharp/NaviItem.cs [changed mode: 0644->0755]
ElmSharp/ElmSharp/Naviframe.cs [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index eabd003..f7da156
@@ -18,6 +18,10 @@ using System;
 
 namespace ElmSharp
 {
+    /// <summary>
+    /// The NaviItem is a widget to contain the contents to show in Naviframe.
+    /// Inherits ItemObject
+    /// </summary>
     public class NaviItem : ItemObject
     {
         EvasObject _content;
@@ -38,13 +42,22 @@ namespace ElmSharp
             Interop.Elementary.elm_naviframe_item_pop_cb_set(handle, _popped, IntPtr.Zero);
         }
 
+        /// <summary>
+        /// Popped will be triggered when NaviItem is removed.
+        /// </summary>
         public event EventHandler Popped;
 
+        /// <summary>
+        /// Gets the content object. The name of content part is "elm.swallow.content".
+        /// </summary>
         public EvasObject Content
         {
             get { return _content; }
         }
 
+        /// <summary>
+        /// Sets or gets a value whether title area is enabled or not.
+        /// </summary>
         public bool TitleBarVisible
         {
             get
@@ -57,6 +70,9 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        ///  Sets or gets the title bar background color
+        /// </summary>
         public Color TitleBarBackgroundColor
         {
             get
@@ -77,6 +93,9 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Sets or gets an item style.
+        /// </summary>
         public string Style
         {
             get
@@ -89,6 +108,10 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Invalidate the EventArgs if _isPopped is false.
+        /// The method should be overridden in children class.
+        /// </summary>
         protected override void OnInvalidate()
         {
             if (!_isPopped)
old mode 100644 (file)
new mode 100755 (executable)
index 0f9b3eb..8d31756
@@ -19,14 +19,30 @@ using System.Collections.Generic;
 
 namespace ElmSharp
 {
+    /// <summary>
+    /// The NaviframeEventArgs is a event args class for navi frame.
+    /// Inherits EventArgs
+    /// </summary>
     public class NaviframeEventArgs : EventArgs
     {
+        /// <summary>
+        /// Sets or gets the content object. The name of content part is "elm.swallow.content".
+        /// </summary>
         public EvasObject Content { get; set; }
     }
+    /// <summary>
+    /// Naviframe is a widget to stands for navigation frame. It's a views manager for applications.
+    /// Inherits Widget
+    /// </summary>
     public class Naviframe : Widget
     {
         SmartEvent _transitionFinished;
         readonly List<NaviItem> _itemStack = new List<NaviItem>();
+
+        /// <summary>
+        /// Creates and initializes a new instance of Naviframe class.
+        /// </summary>
+        /// <param name="parent">The parent is a given container which will be attached by Naviframe as a child. It's <see cref="EvasObject"/> type.</param>
         public Naviframe(EvasObject parent) : base(parent)
         {
             _transitionFinished = new SmartEvent(this, this.RealHandle, "transition,finished");
@@ -34,21 +50,32 @@ namespace ElmSharp
         }
 
         /// <summary>
-        /// 
+        /// Popped will be triggered when NaviItem is removed.
         /// </summary>
         /// <remarks>
         /// It is always called when NaviItem was removed.
         /// (even if removed by NaviItem.Delete())
-        /// This event will be invoked in progress of Pop/Delete operation. 
+        /// This event will be invoked in progress of Pop/Delete operation.
         /// After called Popped event, Pop/Delete method will be returned
         /// </remarks>
         public event EventHandler<NaviframeEventArgs> Popped;
+
+        /// <summary>
+        /// AnimationFinished will be triggered when animation is finished.
+        /// </summary>
         public event EventHandler AnimationFinished;
+
+        /// <summary>
+        /// Gets the list of navi item
+        /// </summary>
         public IReadOnlyList<NaviItem> NavigationStack
         {
             get { return _itemStack; }
         }
 
+        /// <summary>
+        /// Sets or gets the the preserve content objects when items are popped.
+        /// </summary>
         public bool PreserveContentOnPop
         {
             get
@@ -61,6 +88,9 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Sets or gets whether the default back button is enabled
+        /// </summary>
         public bool DefaultBackButtonEnabled
         {
             get
@@ -73,16 +103,36 @@ namespace ElmSharp
             }
         }
 
+        /// <summary>
+        /// Push a new item to the top of the naviframe stack and show it.
+        /// The title and style are null.
+        /// </summary>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem Push(EvasObject content)
         {
             return Push(content, null);
         }
 
+        /// <summary>
+        /// Push a new item to the top of the naviframe stack and show it.
+        /// The style are null.
+        /// </summary>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <param name="title">The current item title. null would be default.</param>
+        /// <returns></returns>
         public NaviItem Push(EvasObject content, string title)
         {
             return Push(content, title, null);
         }
 
+        /// <summary>
+        /// Push a new item to the top of the naviframe stack and show it.
+        /// </summary>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <param name="title">The current item title. null would be default.</param>
+        /// <param name="style">The current item style name. null would be default.</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem Push(EvasObject content, string title, string style)
         {
             IntPtr item = Interop.Elementary.elm_naviframe_item_push(RealHandle, title, IntPtr.Zero, IntPtr.Zero, content.Handle, style);
@@ -92,16 +142,39 @@ namespace ElmSharp
             return naviItem;
         }
 
+        /// <summary>
+        /// Insert a new item into the naviframe before item.
+        /// The title is "" and the style is null.
+        /// </summary>
+        /// <param name="before">The item which the new item is inserted before.</param>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem InsertBefore(NaviItem before, EvasObject content)
         {
             return InsertBefore(before, content, "");
         }
 
+        /// <summary>
+        /// Insert a new item into the naviframe before item.
+        /// The style is null.
+        /// </summary>
+        /// <param name="before">The item which the new item is inserted before.</param>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <param name="title">The current item title. null would be default.</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem InsertBefore(NaviItem before, EvasObject content, string title)
         {
             return InsertBefore(before, content, title, null);
         }
 
+        /// <summary>
+        /// Insert a new item into the naviframe before item.
+        /// </summary>
+        /// <param name="before">The item which the new item is inserted before.</param>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <param name="title">The current item title. null would be default.</param>
+        /// <param name="style">The current item style name. null would be default.</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem InsertBefore(NaviItem before, EvasObject content, string title, string style)
         {
             IntPtr item = Interop.Elementary.elm_naviframe_item_insert_before(RealHandle, before, title, IntPtr.Zero, IntPtr.Zero, content, null);
@@ -112,16 +185,39 @@ namespace ElmSharp
             return naviItem;
         }
 
+        /// <summary>
+        /// Insert a new item into the naviframe after item.
+        /// The title is "" and the style is null.
+        /// </summary>
+        /// <param name="after">The item which the new item is inserted after.</param>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem InsertAfter(NaviItem after, EvasObject content)
         {
             return InsertAfter(after, content, "");
         }
 
+        /// <summary>
+        /// Insert a new item into the naviframe after item.
+        /// The style is null.
+        /// </summary>
+        /// <param name="after">The item which the new item is inserted after.</param>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <param name="title">The current item title. null would be default.</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem InsertAfter(NaviItem after, EvasObject content, string title)
         {
             return InsertAfter(after, content, title, null);
         }
 
+        /// <summary>
+        /// Insert a new item into the naviframe after item.
+        /// </summary>
+        /// <param name="after">The item which the new item is inserted after.</param>
+        /// <param name="content">The main content object. The name of content part is "elm.swallow.content".</param>
+        /// <param name="title">The current item title. null would be default.</param>
+        /// <param name="style">The current item style name. null would be default.</param>
+        /// <returns>The created item or null upon failure.</returns>
         public NaviItem InsertAfter(NaviItem after, EvasObject content, string title, string style)
         {
             IntPtr item = Interop.Elementary.elm_naviframe_item_insert_after(RealHandle, after, title, IntPtr.Zero, IntPtr.Zero, content, null);
@@ -132,6 +228,9 @@ namespace ElmSharp
             return naviItem;
         }
 
+        /// <summary>
+        /// Pop an item that is on top of the stack.
+        /// </summary>
         public void Pop()
         {
             Interop.Elementary.elm_naviframe_item_pop(RealHandle);