[ElmSharp*] Add Scrollable interface
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / GenList.cs
index cf1bc3e..c8c2c45 100755 (executable)
@@ -28,10 +28,12 @@ namespace ElmSharp
         /// if Normal is set then this item is normal item.
         /// </summary>
         Normal = 0,
+
         /// <summary>
         /// If tree is set then this item is displayed as an item that is able to expand and have child items.
         /// </summary>
         Tree = (1 << 0),
+
         /// <summary>
         /// if Group is set then this item is group index item that is displayed at the top until the next group comes.
         /// </summary>
@@ -49,16 +51,19 @@ namespace ElmSharp
         /// The genlist will respect the container's geometry and, if any of its items won't fit into its transverse axis, one won't be able to scroll it in that direction.
         /// </summary>
         Compress = 0,
+
         /// <summary>
         /// This is the same as Compress, with the exception that if any of its items won't fit into its transverse axis, one will be able to scroll it in that direction.
         /// </summary>
         Scroll,
+
         /// <summary>
         /// Sets a minimum size hint on the genlist object, so that containers may respect it (and resize itself to fit the child properly).
         /// More specifically, a minimum size hint will be set for its transverse axis, so that the largest item in that direction fits well.
         /// This is naturally bound by the genlist object's maximum size hints, set externally.
         /// </summary>
         Limit,
+
         /// <summary>
         /// Besides setting a minimum size on the transverse axis, just like on Limit, the genlist will set a minimum size on th longitudinal axis, trying to reserve space to all its children to be visible at a time.
         /// This is naturally bound by the genlist object's maximum size hints, set externally.
@@ -94,18 +99,22 @@ namespace ElmSharp
         /// Scrolls to nowhere.
         /// </summary>
         None = 0,
+
         /// <summary>
         /// Scrolls to the nearest viewport.
         /// </summary>
         In = (1 << 0),
+
         /// <summary>
         /// Scrolls to the top of the viewport.
         /// </summary>
         Top = (1 << 1),
+
         /// <summary>
         /// Scrolls to the middle of the viewport.
         /// </summary>
         Middle = (1 << 2),
+
         /// <summary>
         /// Scrolls to the bottom of the viewport.
         /// </summary>
@@ -119,8 +128,9 @@ namespace ElmSharp
     /// But the price to pay is more complexity when it comes to usage.
     /// If all you want is a simple list with icons and a single text, use the <see cref="List"/> widget.
     /// </summary>
-    public class GenList : Layout
+    public class GenList : Layout, IScrollable
     {
+        ScrollableAdapter _scroller;
         HashSet<GenListItem> _children = new HashSet<GenListItem>();
 
         SmartEvent<GenListItemEventArgs> _selected;
@@ -146,7 +156,13 @@ namespace ElmSharp
         /// <param name="parent">The parent is a given container which will be attached by GenList as a child. It's <see cref="EvasObject"/> type.</param>
         public GenList(EvasObject parent) : base(parent)
         {
-            InitializeSmartEvent();
+        }
+
+        /// <summary>
+        /// Creates and initializes a new instance of GenList class.
+        /// </summary>
+        protected GenList() : base()
+        {
         }
 
         /// <summary>
@@ -234,6 +250,124 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Gets or set the maximum number of items within an item block.
+        /// </summary>
+        public int BlockCount
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_block_count_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_block_count_set(RealHandle, value);
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets whether the genlist items should be highlighted when an item is selected.
+        /// </summary>
+        public bool IsHighlight
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_highlight_mode_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_highlight_mode_set(RealHandle, value);
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the timeout in seconds for the longpress event.
+        /// </summary>
+        public double LongPressTimeout
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_longpress_timeout_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_longpress_timeout_set(RealHandle, value);
+            }
+        }
+
+        /// <summary>
+        /// Gets or Sets focus upon items selection mode.
+        /// </summary>
+        /// <remarks>
+        /// When enabled, every selection of an item inside the <see cref="GenList"/> will automatically set focus to its first focusable widget from the left.
+        /// This is true of course if the selection was made by clicking an unfocusable area in an item or selecting it with a key movement.
+        /// Clicking on a focusable widget inside an item will couse this particular item to get focus as usual.
+        /// </remarks>
+        public bool FocusOnSelection
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_focus_on_selection_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_focus_on_selection_set(RealHandle, value);
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets whether enable multi-selection in the genlist.
+        /// </summary>
+        public bool IsMultiSelection
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_multi_select_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_multi_select_set(RealHandle, value);
+            }
+        }
+
+        /// <summary>
+        /// Gets the selected item in a given genlist widget.
+        /// </summary>
+        public GenListItem SelectedItem
+        {
+            get
+            {
+                IntPtr handle = Interop.Elementary.elm_genlist_selected_item_get(RealHandle);
+                return ItemObject.GetItemByHandle(handle) as GenListItem;
+            }
+        }
+
+        /// <summary>
+        /// Gets or sets the genlist select mode by <see cref="GenItemSelectionMode"/>.
+        /// </summary>
+        public GenItemSelectionMode SelectionMode
+        {
+            get
+            {
+                return (GenItemSelectionMode)Interop.Elementary.elm_genlist_select_mode_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_select_mode_set(RealHandle, (int)value);
+            }
+        }
+
+        /// <summary>
+        /// Gets count of items in a this genlist widget
+        /// </summary>
+        public int Count
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_items_count(RealHandle);
+            }
+        }
+
+        /// <summary>
         /// ItemSelected is raised when a new genlist item is selected.
         /// </summary>
         public event EventHandler<GenListItemEventArgs> ItemSelected;
@@ -387,7 +521,6 @@ namespace ElmSharp
         /// <param name="itemClass">The itemClass defines how to display the data.</param>
         /// <param name="data">The item data.</param>
         /// <param name="type">The genlist item type.</param>
-        /// <param name="parent">The parent item, otherwise null if there is no parent item.</param>
         /// <returns>Return a new added genlist item that contains data and itemClass.</returns>
         public GenListItem Prepend(GenItemClass itemClass, object data, GenListItemType type)
         {
@@ -466,6 +599,67 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Inserts an item with <see cref="GenListItemType"/> after another item under a parent in a genlist widget.
+        /// </summary>
+        /// <param name="itemClass">The itemClass defines how to display the data.</param>
+        /// <param name="data">The item data.</param>
+        /// <param name="after">The item after which to place this new one.</param>
+        /// <param name="type">The genlist item type.</param>
+        /// <param name="parent">The parent item, otherwise null if there is no parent item.</param>
+        /// <returns>Return a new added genlist item that contains data and itemClass.</returns>
+        public GenListItem InsertAfter(GenItemClass itemClass, object data, GenListItem after, GenListItemType type, GenListItem parent)
+        {
+            GenListItem item = new GenListItem(data, itemClass);
+            // insert before the `before` list item
+            IntPtr handle = Interop.Elementary.elm_genlist_item_insert_before(
+                RealHandle, // genlist handle
+                itemClass.UnmanagedPtr, // item class
+                (IntPtr)item.Id, // data
+                parent, // parent
+                after, // after
+                (int)type, // item type
+                null, // select callback
+                (IntPtr)item.Id); // callback data
+            item.Handle = handle;
+            AddInternal(item);
+            return item;
+        }
+
+        /// <summary>
+        /// Insert an item in a genlist widget using a user-defined sort function.
+        /// </summary>
+        /// <param name="itemClass">The itemClass defines how to display the data.</param>
+        /// <param name="data">The item data.</param>
+        /// <param name="comparison">User defined comparison function that defines the sort order based on genlist item and its data.</param>
+        /// <param name="type">The genlist item type.</param>
+        /// <param name="parent">The parent item, otherwise null if there is no parent item.</param>
+        /// <returns>Return a genlist item that contains data and itemClass.</returns>
+        public GenListItem InsertSorted(GenItemClass itemClass, object data, Comparison<object> comparison, GenListItemType type, GenListItem parent)
+        {
+            GenListItem item = new GenListItem(data, itemClass);
+
+            Interop.Elementary.Eina_Compare_Cb compareCallback = (handle1, handle2) =>
+            {
+                GenListItem first = (ItemObject.GetItemByHandle(handle1) as GenListItem) ?? item;
+                GenListItem second = (ItemObject.GetItemByHandle(handle2) as GenListItem) ?? item;
+                return comparison(first.Data, second.Data);
+            };
+
+            IntPtr handle = Interop.Elementary.elm_genlist_item_sorted_insert(
+                RealHandle, // genlist handle
+                itemClass.UnmanagedPtr, // item clas
+                (IntPtr)item.Id, // data
+                parent, // parent
+                (int)type, // item type
+                compareCallback, // compare callback
+                null, //select callback
+                (IntPtr)item.Id); // callback data
+            item.Handle = handle;
+            AddInternal(item);
+            return item;
+        }
+
+        /// <summary>
         /// Shows the given item with position type in a genlist.
         /// When animated is true, genlist will jump to the given item and display it (by animatedly scrolling), if it is not fully visible. This may use animation and may take some time.
         /// When animated is false, genlist will jump to the given item and display it (by jumping to that position), if it is not fully visible.
@@ -508,6 +702,47 @@ namespace ElmSharp
             Interop.Elementary.elm_genlist_clear(RealHandle);
         }
 
+        /// <summary>
+        /// Get the item that is at the x, y canvas coords.
+        /// </summary>
+        /// <param name="x">The input x coordinate</param>
+        /// <param name="y">The input y coordinate</param>
+        /// <param name="pos">The position relative to the item returned here
+        ///  -1, 0, or 1, depending on whether the coordinate is on the upper portion of that item (-1), in the middle section (0), or on the lower part (1).
+        /// </param>
+        /// <returns></returns>
+        public GenListItem GetItemByPosition(int x, int y, out int pos)
+        {
+            IntPtr handle = Interop.Elementary.elm_genlist_at_xy_item_get(RealHandle, x, y, out pos);
+            return ItemObject.GetItemByHandle(handle) as GenListItem;
+        }
+
+        /// <summary>
+        /// Gets the nth item in a given genlist widget, placed at position nth, in its internal items list.
+        /// </summary>
+        /// <param name="index">The number of the item to grab (0 being the first)</param>
+        /// <returns></returns>
+        public GenListItem GetItemByIndex(int index)
+        {
+            IntPtr handle = Interop.Elementary.elm_genlist_nth_item_get(RealHandle, index);
+            return ItemObject.GetItemByHandle(handle) as GenListItem;
+        }
+
+        /// <summary>
+        /// The callback of Unrealize Event
+        /// </summary>
+        protected override void OnRealized()
+        {
+            base.OnRealized();
+            ListMode = GenListMode.Compress;
+            InitializeSmartEvent();
+        }
+
+        /// <summary>
+        /// Creates a widget handle.
+        /// </summary>
+        /// <param name="parent">Parent EvasObject</param>
+        /// <returns>Handle IntPtr</returns>
         protected override IntPtr CreateHandle(EvasObject parent)
         {
             IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
@@ -516,9 +751,396 @@ namespace ElmSharp
             RealHandle = Interop.Elementary.elm_genlist_add(handle);
             Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
 
+            _scroller = new ScrollableAdapter(this);
+
             return handle;
         }
 
+        #region IScroller Implementation
+
+        /// <summary>
+        /// Scrolled will be triggered when the content has been scrolled.
+        /// </summary>
+        public event EventHandler Scrolled
+        {
+            add => _scroller.Scrolled += value;
+            remove => _scroller.Scrolled -= value;
+        }
+
+        /// <summary>
+        /// DragStart will be triggered when dragging the contents around has started.
+        /// </summary>
+        public event EventHandler DragStart
+        {
+            add => _scroller.DragStart += value;
+            remove => _scroller.DragStart -= value;
+        }
+
+        /// <summary>
+        /// DragStop will be triggered when dragging the contents around has stopped.
+        /// </summary>
+        public event EventHandler DragStop
+        {
+            add => _scroller.DragStop += value;
+            remove => _scroller.DragStop -= value;
+        }
+
+        /// <summary>
+        /// PageScrolled will be triggered when the visible page has changed.
+        /// </summary>
+        public event EventHandler PageScrolled
+        {
+            add => _scroller.PageScrolled += value;
+            remove => _scroller.PageScrolled -= value;
+        }
+
+        /// <summary>
+        /// Gets the current region in the content object that is visible through the Scroller.
+        /// </summary>
+        public Rect CurrentRegion => _scroller.CurrentRegion;
+
+        /// <summary>
+        /// Sets or gets the value of HorizontalScrollBarVisiblePolicy
+        /// </summary>
+        /// <remarks>
+        /// ScrollBarVisiblePolicy.Auto means the horizontal scrollbar is made visible if it is needed, and otherwise kept hidden.
+        /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
+        /// </remarks>
+        public virtual ScrollBarVisiblePolicy HorizontalScrollBarVisiblePolicy
+        {
+            get => _scroller.HorizontalScrollBarVisiblePolicy;
+            set => _scroller.HorizontalScrollBarVisiblePolicy = value;
+        }
+
+        /// <summary>
+        /// Sets or gets the value of VerticalScrollBarVisiblePolicy
+        /// </summary>
+        /// <remarks>
+        /// ScrollBarVisiblePolicy.Auto means the vertical scrollbar is made visible if it is needed, and otherwise kept hidden.
+        /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
+        /// </remarks>
+        public virtual ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy
+        {
+            get => _scroller.VerticalScrollBarVisiblePolicy;
+            set => _scroller.VerticalScrollBarVisiblePolicy = value;
+        }
+
+        /// <summary>
+        /// Sets or gets the value of ScrollBlock.
+        /// </summary>
+        /// <remarks>
+        /// This function will block scrolling movement  in a given direction.One can disable movements in the X axis, the Y axis or both.
+        /// The default value is ScrollBlock.None, where movements are allowed in both directions.
+        /// </remarks>
+        public ScrollBlock ScrollBlock
+        {
+            get => _scroller.ScrollBlock;
+            set => _scroller.ScrollBlock = value;
+        }
+
+        /// <summary>
+        /// Sets or gets scroll current page number.
+        /// </summary>
+        /// <remarks>
+        /// Current page means the page which meets the top of the viewport.
+        /// If there are two or more pages in the viewport, it returns the number of the page which meets the top of the viewport.
+        /// The page number starts from 0. 0 is the first page.
+        /// </remarks>
+        public int VerticalPageIndex => _scroller.VerticalPageIndex;
+
+        /// <summary>
+        /// Sets or gets scroll current page number.
+        /// </summary>
+        /// <remarks>
+        /// Current page means the page which meets the left of the viewport.
+        /// If there are two or more pages in the viewport, it returns the number of the page which meets the left of the viewport.
+        /// The page number starts from 0. 0 is the first page.
+        /// </remarks>
+        public int HorizontalPageIndex => _scroller.HorizontalPageIndex;
+
+        /// <summary>
+        /// Sets or gets the maximum limit of the movable page at vertical direction.
+        /// </summary>
+        public int VerticalPageScrollLimit
+        {
+            get => _scroller.VerticalPageScrollLimit;
+            set => _scroller.VerticalPageScrollLimit = value;
+        }
+
+        /// <summary>
+        /// Sets or gets the maximum limit of the movable page at horizontal direction.
+        /// </summary>
+        public int HorizontalPageScrollLimit
+        {
+            get => _scroller.HorizontalPageScrollLimit;
+            set => _scroller.HorizontalPageScrollLimit = value;
+        }
+
+        /// <summary>
+        /// Sets or gets the vertical bounce behaviour.
+        /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
+        /// This is a visual way to indicate the end has been reached.
+        /// This is enabled by default for both axis.
+        /// This API will set if it is enabled for the given axis with the boolean parameters for each axis.
+        /// </summary>
+        public bool VerticalBounce
+        {
+            get => _scroller.VerticalBounce;
+            set => _scroller.VerticalBounce = value;
+        }
+
+        /// <summary>
+        /// Sets or gets the horizontal bounce behaviour.
+        /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
+        /// This is a visual way to indicate the end has been reached.
+        /// This is enabled by default for both axis.
+        /// This API will set if it is enabled for the given axis with the boolean parameters for each axis.
+        /// </summary>
+        public bool HorizontalBounce
+        {
+            get => _scroller.HorizontalBounce;
+            set => _scroller.HorizontalBounce = value;
+        }
+
+        /// <summary>
+        /// Gets the width of the content object of the scroller.
+        /// </summary>
+        public int ChildWidth
+        {
+            get => _scroller.ChildWidth;
+        }
+
+        /// <summary>
+        /// Gets the height of the content object of the scroller.
+        /// </summary>
+        public int ChildHeight
+        {
+            get => _scroller.ChildHeight;
+        }
+
+        /// <summary>
+        /// Set scrolling gravity values for a scroller.
+        /// The gravity, defines how the scroller will adjust its view when the size of the scroller contents increase.
+        /// The scroller will adjust the view to glue itself as follows.
+        /// x=0.0, for staying where it is relative to the left edge of the content x=1.0, for staying where it is relative to the rigth edge of the content y=0.0, for staying where it is relative to the top edge of the content y=1.0, for staying where it is relative to the bottom edge of the content
+        /// Default values for x and y are 0.0
+        /// </summary>
+        public double HorizontalGravity
+        {
+            get => _scroller.HorizontalGravity;
+            set => _scroller.HorizontalGravity = value;
+        }
+
+        /// <summary>
+        /// Set scrolling gravity values for a scroller.
+        /// The gravity, defines how the scroller will adjust its view when the size of the scroller contents increase.
+        /// The scroller will adjust the view to glue itself as follows.
+        /// x=0.0, for staying where it is relative to the left edge of the content x=1.0, for staying where it is relative to the rigth edge of the content y=0.0, for staying where it is relative to the top edge of the content y=1.0, for staying where it is relative to the bottom edge of the content
+        /// Default values for x and y are 0.0
+        /// </summary>
+        public double VerticalGravity
+        {
+            get => _scroller.VerticalGravity;
+            set => _scroller.VerticalGravity = value;
+        }
+
+        /// <summary>
+        /// Get scroll last page number.
+        /// The page number starts from 0. 0 is the first page. This returns the last page number among the pages.
+        /// </summary>
+        public int LastVerticalPageNumber => _scroller.LastVerticalPageNumber;
+
+        /// <summary>
+        /// Get scroll last page number.
+        /// The page number starts from 0. 0 is the first page. This returns the last page number among the pages.
+        /// </summary>
+        public int LastHorizontalPageNumber => _scroller.LastHorizontalPageNumber;
+
+        /// <summary>
+        /// Set an infinite loop_ for a scroller.
+        /// This function sets the infinite loop vertically.
+        /// If the content is set, it will be shown repeatedly.
+        /// </summary>
+        public bool VerticalLoop
+        {
+            get => _scroller.VerticalLoop;
+            set => _scroller.VerticalLoop = value;
+        }
+
+        /// <summary>
+        /// Set an infinite loop_ for a scroller.
+        /// This function sets the infinite loop horizontally.
+        /// If the content is set, it will be shown repeatedly.
+        /// </summary>
+        public bool HorizontalLoop
+        {
+            get => _scroller.HorizontalLoop;
+            set => _scroller.HorizontalLoop = value;
+        }
+
+        /// <summary>
+        /// Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.
+        /// </summary>
+        public int HorizontalPageSize
+        {
+            get => _scroller.HorizontalPageSize;
+            set => _scroller.HorizontalPageSize = value;
+        }
+
+        /// <summary>
+        /// Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.
+        /// </summary>
+        public int VerticalPageSize
+        {
+            get => _scroller.VerticalPageSize;
+            set => _scroller.VerticalPageSize = value;
+        }
+
+        /// <summary>
+        /// Gets or sets a given scroller widget's scrolling page size, relative to its viewport size.
+        /// </summary>
+        public double VerticalRelativePageSize
+        {
+            get => _scroller.VerticalRelativePageSize;
+            set => _scroller.VerticalRelativePageSize = value;
+        }
+
+        /// <summary>
+        /// Gets or sets a given scroller widget's scrolling page size, relative to its viewport size.
+        /// </summary>
+        public double HorizontalRelativePageSize
+        {
+            get => _scroller.HorizontalRelativePageSize;
+            set => _scroller.HorizontalRelativePageSize = value;
+        }
+
+        /// <summary>
+        /// Gets or Sets the page snapping behavior of a scroller.
+        /// </summary>
+        /// <remarks>
+        /// When scrolling, if a scroller is paged (see VerticalRelativePageSize),
+        /// the scroller may snap to pages when being scrolled, i.e., even if it had momentum to scroll further,
+        /// it will stop at the next page boundaries. This is disabled, by default, for both axis.
+        /// This function will set if it that is enabled or not, for each axis.
+        /// </remarks>
+        public bool VerticalSnap
+        {
+            get => _scroller.VerticalSnap;
+            set => _scroller.VerticalSnap = value;
+        }
+
+        /// <summary>
+        /// Gets or Sets the page snapping behavior of a scroller.
+        /// </summary>
+        /// <remarks>
+        /// When scrolling, if a scroller is paged (see HorizontalRelativePageSize),
+        /// the scroller may snap to pages when being scrolled, i.e., even if it had momentum to scroll further,
+        /// it will stop at the next page boundaries. This is disabled, by default, for both axis.
+        /// This function will set if it that is enabled or not, for each axis.
+        /// </remarks>
+        public bool HorizontalSnap
+        {
+            get => _scroller.HorizontalSnap;
+            set => _scroller.HorizontalSnap = value;
+        }
+
+        /// <summary>
+        /// Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.
+        /// </summary>
+        public int PageHeight
+        {
+            get => _scroller.PageHeight;
+            set => _scroller.PageHeight = value;
+        }
+
+        /// <summary>
+        /// Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.
+        /// </summary>
+        public int PageWidth
+        {
+            get => _scroller.PageWidth;
+            set => _scroller.PageWidth = value;
+        }
+
+        /// <summary>
+        /// Gets or sets the step size to move scroller by key event.
+        /// </summary>
+        public int HorizontalStepSize
+        {
+            get => _scroller.HorizontalStepSize;
+            set => _scroller.HorizontalStepSize = value;
+        }
+
+        /// <summary>
+        /// Gets or sets the step size to move scroller by key event.
+        /// </summary>
+        public int VerticalStepSize
+        {
+            get => _scroller.VerticalStepSize;
+            set => _scroller.VerticalStepSize = value;
+        }
+
+        /// <summary>
+        /// Gets or sets a value whether mouse wheel is enabled or not over the scroller.
+        /// </summary>
+        public bool WheelDisabled
+        {
+            get => _scroller.WheelDisabled;
+            set => _scroller.WheelDisabled = value;
+        }
+
+        /// <summary>
+        /// Gets or sets the type of single direction scroll.
+        /// </summary>
+        public ScrollSingleDirection SingleDirection
+        {
+            get => _scroller.SingleDirection;
+            set => _scroller.SingleDirection = value;
+        }
+
+        /// <summary>
+        /// Sets the scroller minimum size limited to the minimum size of the content.
+        /// By default the scroller will be as small as its design allows, irrespective of its content.
+        /// This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction.
+        /// </summary>
+        /// <param name="horizontal">Enable limiting minimum size horizontally</param>
+        /// <param name="vertical">Enable limiting minimum size vertically</param>
+        public void MinimumLimit(bool horizontal, bool vertical)
+        {
+            _scroller.MinimumLimit(horizontal, vertical);
+        }
+
+        /// <summary>
+        /// Shows a specific virtual region within the scroller content object by the page number.
+        /// (0, 0) of the indicated page is located at the top-left corner of the viewport.
+        /// </summary>
+        /// <param name="horizontalPageIndex">The horizontal page number.</param>
+        /// <param name="verticalPageIndex">The vertical page number.</param>
+        /// <param name="animated">True means slider with animation.</param>
+        public void ScrollTo(int horizontalPageIndex, int verticalPageIndex, bool animated)
+        {
+            _scroller.ScrollTo(horizontalPageIndex, verticalPageIndex, animated);
+        }
+
+        /// <summary>
+        /// Shows a specific virtual region within the scroller content object.
+        /// </summary>
+        /// <remarks>
+        /// This ensures that all (or part, if it does not fit) of the designated region in the virtual content object ((0, 0)
+        /// starting at the top-left of the virtual content object) is shown within the scroller.
+        /// If set "animated" to true, it will allows the scroller to "smoothly slide" to this location
+        /// (if configuration in general calls for transitions).
+        /// It may not jump immediately to the new location and may take a while and show other content along the way.
+        /// </remarks>
+        /// <param name="region">Rect struct of region.</param>
+        /// <param name="animated">True means allows the scroller to "smoothly slide" to this location.</param>
+        public void ScrollTo(Rect region, bool animated)
+        {
+            _scroller.ScrollTo(region, animated);
+        }
+
+        #endregion
+
         void InitializeSmartEvent()
         {
             _selected = new SmartEvent<GenListItemEventArgs>(this, this.RealHandle, "selected", GenListItemEventArgs.CreateFromSmartEvent);
@@ -564,4 +1186,4 @@ namespace ElmSharp
             _children.Remove((GenListItem)sender);
         }
     }
-}
+}
\ No newline at end of file