summaryrefslogtreecommitdiff
path: root/ElmSharp/ElmSharp/Entry.cs
diff options
context:
space:
mode:
authoryan97.zhao <yan97.zhao@samsung.com>2017-04-01 20:33:34 +0800
committeryan97.zhao <yan97.zhao@samsung.com>2017-04-06 16:28:16 +0800
commitf4bc8fd18f82223adc726a8a99df9f4554030d67 (patch)
tree6def196ea8eaab2dabf618c209d77086ac369593 /ElmSharp/ElmSharp/Entry.cs
parenta95a4f7cf673eab713c206e1486033ddc4986b4d (diff)
downloadelm-sharp-f4bc8fd18f82223adc726a8a99df9f4554030d67.tar.gz
elm-sharp-f4bc8fd18f82223adc726a8a99df9f4554030d67.tar.bz2
elm-sharp-f4bc8fd18f82223adc726a8a99df9f4554030d67.zip
add comments
for Elementary.cs/EdjeObject.cs/ElmScrollConfig.cs/Entry.cs/EvasKeyEventArgs.cs/EvasMap.cs Change-Id: Id5fbfcf01bbaa0cb7c9d02b582d39f47673d1dfa Signed-off-by: yan97.zhao <yan97.zhao@samsung.com>
Diffstat (limited to 'ElmSharp/ElmSharp/Entry.cs')
-rwxr-xr-xElmSharp/ElmSharp/Entry.cs128
1 files changed, 126 insertions, 2 deletions
diff --git a/ElmSharp/ElmSharp/Entry.cs b/ElmSharp/ElmSharp/Entry.cs
index 3f310a7..a274055 100755
--- a/ElmSharp/ElmSharp/Entry.cs
+++ b/ElmSharp/ElmSharp/Entry.cs
@@ -19,7 +19,7 @@ using System;
namespace ElmSharp
{
/// <summary>
- /// A enum to describle InputPanel layout type.
+ /// Enumeration for describing InputPanel layout type.
/// </summary>
public enum InputPanelLayout
{
@@ -94,19 +94,52 @@ namespace ElmSharp
Emoticon
}
+ /// <summary>
+ /// Enumeration that defines the "Return" key types on the input panel (virtual keyboard).
+ /// </summary>
public enum InputPanelReturnKeyType
{
+ /// <summary>
+ /// Default key type
+ /// </summary>
Default,
+ /// <summary>
+ /// Done key type
+ /// </summary>
Done,
+ /// <summary>
+ /// Go key type
+ /// </summary>
Go,
+ /// <summary>
+ /// Join key type
+ /// </summary>
Join,
+ /// <summary>
+ /// Login key type
+ /// </summary>
Login,
+ /// <summary>
+ /// Next key type
+ /// </summary>
Next,
+ /// <summary>
+ /// Search string or magnifier icon key type
+ /// </summary>
Search,
+ /// <summary>
+ /// Send key type
+ /// </summary>
Send,
+ /// <summary>
+ /// Sign-in key type
+ /// </summary>
Signin
}
+ /// <summary>
+ /// The entry is a convenience widget that shows a box in which the user can enter text.
+ /// </summary>
public class Entry : Layout
{
SmartEvent _clicked;
@@ -114,6 +147,10 @@ namespace ElmSharp
SmartEvent _cursorChanged;
SmartEvent _activated;
+ /// <summary>
+ /// Creates and initializes a new instance of the Entry class.
+ /// </summary>
+ /// <param name="parent">The EvasObject to which the new Entry will be attached as a child.</param>
public Entry(EvasObject parent) : base(parent)
{
_clicked = new SmartEvent(this, this.RealHandle, "clicked");
@@ -129,14 +166,29 @@ namespace ElmSharp
_activated.On += (s, e) => Activated?.Invoke(this, EventArgs.Empty);
}
+ /// <summary>
+ /// Activated will be triggered when the entry in Activated stated.
+ /// </summary>
public event EventHandler Activated;
+ /// <summary>
+ /// Clicked will be triggered when the entry is clicked.
+ /// </summary>
public event EventHandler Clicked;
+ /// <summary>
+ /// ChangedByUser will be triggered when the entry changed by user.
+ /// </summary>
public event EventHandler ChangedByUser;
+ /// <summary>
+ /// CursorChanged will be triggered when the Cursor in the entry is changed.
+ /// </summary>
public event EventHandler CursorChanged;
+ /// <summary>
+ /// Sets or gets the entry to the single line mode.
+ /// </summary>
public bool IsSingleLine
{
get
@@ -149,6 +201,9 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Sets or gets the entry to the password mode.
+ /// </summary>
public bool IsPassword
{
get
@@ -161,6 +216,9 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Sets or gets whether the entry is editable.
+ /// </summary>
public bool IsEditable
{
get
@@ -173,6 +231,9 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Sets or gets whether the entry is empty.
+ /// </summary>
public bool IsEmpty
{
get
@@ -180,7 +241,9 @@ namespace ElmSharp
return Interop.Elementary.elm_entry_is_empty(RealHandle);
}
}
-
+ /// <summary>
+ /// Sets or gets text currently shown in the object entry.
+ /// </summary>
public override string Text
{
get
@@ -193,6 +256,10 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Sets or gets the style on the top of the user style stack.
+ /// </summary>
+ /// <remarks>If there is styles in the user style stack, the properties in the top style of user style stack will replace the properties in current theme. The input style is specified in format tag='property=value' (i.e. DEFAULT='font=Sans font_size=60'hilight=' + font_weight=Bold').</remarks>
public string TextStyle
{
get
@@ -205,6 +272,9 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Sets or gets the current position of the cursor in the entry.
+ /// </summary>
public int CursorPosition
{
get
@@ -217,6 +287,9 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Sets or gets the scrollable state of the entry.
+ /// </summary>
public bool Scrollable
{
get
@@ -236,71 +309,122 @@ namespace ElmSharp
}
}
+ /// <summary>
+ /// Converts a markup (HTML-like) string into UTF-8.
+ /// </summary>
+ /// <param name="markup">The string (in markup) to be converted</param>
+ /// <returns>The converted string (in UTF-8) </returns>
public static string ConvertMarkupToUtf8(string markup)
{
return Interop.Elementary.elm_entry_markup_to_utf8(markup);
}
+ /// <summary>
+ /// Moves the cursor by one position to the right within the entry.
+ /// </summary>
+ /// <returns></returns>
public bool MoveCursorNext()
{
return Interop.Elementary.elm_entry_cursor_next(RealHandle);
}
+ /// <summary>
+ /// Moves the cursor one place to the left within the entry.
+ /// </summary>
+ /// <returns>TRUE on success, otherwise FALSE on failure</returns>
public bool MoveCursorPrev()
{
return Interop.Elementary.elm_entry_cursor_prev(RealHandle);
}
+ /// <summary>
+ /// Moves the cursor one line up within the entry.
+ /// </summary>
+ /// <returns>TRUE on success, otherwise FALSE on failure</returns>
public bool MoveCursorUp()
{
return Interop.Elementary.elm_entry_cursor_up(RealHandle);
}
+ /// <summary>
+ /// Moves the cursor one line down within the entry.
+ /// </summary>
+ /// <returns>TRUE on success, otherwise FALSE on failure</returns>
public bool MoveCursorDown()
{
return Interop.Elementary.elm_entry_cursor_down(RealHandle);
}
+ /// <summary>
+ /// Moves the cursor to the beginning of the entry.
+ /// </summary>
public void MoveCursorBegin()
{
Interop.Elementary.elm_entry_cursor_begin_set(RealHandle);
}
+ /// <summary>
+ /// Moves the cursor to the end of the entry.
+ /// </summary>
public void MoveCursorEnd()
{
Interop.Elementary.elm_entry_cursor_end_set(RealHandle);
}
+ /// <summary>
+ /// Moves the cursor to the beginning of the current line.
+ /// </summary>
public void MoveCursorLineBegin()
{
Interop.Elementary.elm_entry_cursor_line_begin_set(RealHandle);
}
+ /// <summary>
+ /// Moves the cursor to the end of the current line.
+ /// </summary>
public void MoveCursorLineEnd()
{
Interop.Elementary.elm_entry_cursor_line_end_set(RealHandle);
}
+ /// <summary>
+ /// Sets the input panel layout of the entry.
+ /// </summary>
+ /// <param name="layout">The layout type</param>
public void SetInputPanelLayout(InputPanelLayout layout)
{
Interop.Elementary.elm_entry_input_panel_layout_set(RealHandle, (Interop.Elementary.InputPanelLayout)layout);
}
+ /// <summary>
+ /// Sets the attribute to show the input panel automatically.
+ /// </summary>
+ /// <param name="enabled">If true the input panel appears when the entry is clicked or has focus, otherwise false</param>
public void SetInputPanelEnabled(bool enabled)
{
Interop.Elementary.elm_entry_input_panel_enabled_set(RealHandle, enabled);
}
+ /// <summary>
+ /// Sets the "return" key type. This type is used to set the string or icon on the "return" key of the input panel.
+ /// </summary>
+ /// <param name="keyType">The type of "return" key on the input panel</param>
public void SetInputPanelReturnKeyType(InputPanelReturnKeyType keyType)
{
Interop.Elementary.elm_entry_input_panel_return_key_type_set(RealHandle, (Interop.Elementary.ReturnKeyType)keyType);
}
+ /// <summary>
+ /// Selects all the text within the entry.
+ /// </summary>
public void SelectAll()
{
Interop.Elementary.elm_entry_select_all(RealHandle);
}
+ /// <summary>
+ /// Drops any existing text selection within the entry.
+ /// </summary>
public void SelectNone()
{
Interop.Elementary.elm_entry_select_none(RealHandle);