Merge changes I98ade8b7,Iedce8507 into tizen
[platform/core/csapi/tizenfx.git] / src / ElmSharp / ElmSharp / Scroller.cs
1 /*
2  * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 using System;
18
19 namespace ElmSharp
20 {
21     /// <summary>
22     /// Enumeration for visible type of scrollbar.
23     /// </summary>
24     public enum ScrollBarVisiblePolicy
25     {
26         /// <summary>
27         /// Show scrollbars as needed
28         /// </summary>
29         Auto = 0,
30
31         /// <summary>
32         /// Always show scrollbars
33         /// </summary>
34         Visible,
35
36         /// <summary>
37         /// Never show scrollbars
38         /// </summary>
39         Invisible
40     }
41
42     /// <summary>
43     /// Enumeration for visible type of scrollbar.
44     /// </summary>
45     public enum ScrollBlock
46     {
47         /// <summary>
48         /// Scrolling movement is allowed in both direction.(X axis and Y axis)
49         /// </summary>
50         None = 1,
51
52         /// <summary>
53         /// Scrolling movement is not allowed in Y axis direction.
54         /// </summary>
55         Vertical = 2,
56
57         /// <summary>
58         /// Scrolling movement is not allowed in X axis direction.
59         /// </summary>
60         Horizontal = 4
61     }
62
63     /// <summary>
64     /// Type that controls how the content is scrolled.
65     /// </summary>
66     public enum ScrollSingleDirection
67     {
68         /// <summary>
69         /// Scroll every direction.
70         /// </summary>
71         None,
72
73         /// <summary>
74         /// Scroll single direction if the direction is certain.
75         /// </summary>
76         Soft,
77
78         /// <summary>
79         /// Scroll only single direction.
80         /// </summary>
81         Hard,
82     }
83
84     /// <summary>
85     /// The Scroller is a container that holds and clips a single object and allows you to scroll across it.
86     /// </summary>
87     public class Scroller : Layout
88     {
89         SmartEvent _scroll;
90         SmartEvent _dragStart;
91         SmartEvent _dragStop;
92         SmartEvent _scrollpage;
93
94         /// <summary>
95         /// Creates and initializes a new instance of the Scroller class.
96         /// </summary>
97         /// <param name="parent">The <see cref="EvasObject"/> to which the new Scroller will be attached as a child.</param>
98         public Scroller(EvasObject parent) : base(parent)
99         {
100             _scroll = new SmartEvent(this, this.RealHandle, "scroll");
101             _dragStart = new SmartEvent(this, this.RealHandle, "scroll,drag,start");
102             _dragStop = new SmartEvent(this, this.RealHandle, "scroll,drag,stop");
103             _scrollpage = new SmartEvent(this, this.RealHandle, "scroll,page,changed");
104         }
105
106         /// <summary>
107         /// Scrolled will be triggered when the content has been scrolled.
108         /// </summary>
109         public event EventHandler Scrolled
110         {
111             add
112             {
113                 _scroll.On += value;
114             }
115             remove
116             {
117                 _scroll.On -= value;
118             }
119         }
120
121         /// <summary>
122         /// DragStart will be triggered when dragging the contents around has started.
123         /// </summary>
124         public event EventHandler DragStart
125         {
126             add
127             {
128                 _dragStart.On += value;
129             }
130             remove
131             {
132                 _dragStart.On -= value;
133             }
134         }
135
136         /// <summary>
137         /// DragStop will be triggered when dragging the contents around has stopped.
138         /// </summary>
139         public event EventHandler DragStop
140         {
141             add
142             {
143                 _dragStop.On += value;
144             }
145             remove
146             {
147                 _dragStop.On -= value;
148             }
149         }
150
151         /// <summary>
152         /// PageScrolled will be triggered when the visible page has changed.
153         /// </summary>
154         public event EventHandler PageScrolled
155         {
156             add
157             {
158                 _scrollpage.On += value;
159             }
160             remove
161             {
162                 _scrollpage.On -= value;
163             }
164         }
165
166         /// <summary>
167         /// Gets the current region in the content object that is visible through the Scroller.
168         /// </summary>
169         public Rect CurrentRegion
170         {
171             get
172             {
173                 int x, y, w, h;
174                 Interop.Elementary.elm_scroller_region_get(RealHandle, out x, out y, out w, out h);
175                 return new Rect(x, y, w, h);
176             }
177         }
178
179         /// <summary>
180         /// Sets or gets the value of HorizontalScrollBarVisiblePolicy
181         /// </summary>
182         /// <remarks>
183         /// ScrollBarVisiblePolicy.Auto means the horizontal scrollbar is made visible if it is needed, and otherwise kept hidden.
184         /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
185         /// </remarks>
186         public ScrollBarVisiblePolicy HorizontalScrollBarVisiblePolicy
187         {
188             get
189             {
190                 int policy;
191                 Interop.Elementary.elm_scroller_policy_get(RealHandle, out policy, IntPtr.Zero);
192                 return (ScrollBarVisiblePolicy)policy;
193             }
194             set
195             {
196                 ScrollBarVisiblePolicy v = VerticalScrollBarVisiblePolicy;
197                 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)value, (int)v);
198             }
199         }
200
201         /// <summary>
202         /// Sets or gets the value of VerticalScrollBarVisiblePolicy
203         /// </summary>
204         /// <remarks>
205         /// ScrollBarVisiblePolicy.Auto means the vertical scrollbar is made visible if it is needed, and otherwise kept hidden.
206         /// ScrollBarVisiblePolicy.Visible turns it on all the time, and ScrollBarVisiblePolicy.Invisible always keeps it off.
207         /// </remarks>
208         public ScrollBarVisiblePolicy VerticalScrollBarVisiblePolicy
209         {
210             get
211             {
212                 int policy;
213                 Interop.Elementary.elm_scroller_policy_get(RealHandle, IntPtr.Zero, out policy);
214                 return (ScrollBarVisiblePolicy)policy;
215             }
216             set
217             {
218                 ScrollBarVisiblePolicy h = HorizontalScrollBarVisiblePolicy;
219                 Interop.Elementary.elm_scroller_policy_set(RealHandle, (int)h, (int)value);
220             }
221         }
222
223         /// <summary>
224         /// Sets or gets the value of ScrollBlock.
225         /// </summary>
226         /// <remarks>
227         /// This function will block scrolling movement  in a given direction.One can disable movements in the X axis, the Y axis or both.
228         /// The default value is ScrollBlock.None, where movements are allowed in both directions.
229         /// </remarks>
230         public ScrollBlock ScrollBlock
231         {
232             get
233             {
234                 return (ScrollBlock)Interop.Elementary.elm_scroller_movement_block_get(RealHandle);
235             }
236             set
237             {
238                 Interop.Elementary.elm_scroller_movement_block_set(RealHandle, (int)value);
239             }
240         }
241
242         /// <summary>
243         /// Sets or gets scroll current page number.
244         /// </summary>
245         /// <remarks>
246         /// Current page means the page which meets the top of the viewport.
247         /// If there are two or more pages in the viewport, it returns the number of the page which meets the top of the viewport.
248         /// The page number starts from 0. 0 is the first page.
249         /// </remarks>
250         public int VerticalPageIndex
251         {
252             get
253             {
254                 int v, h;
255                 Interop.Elementary.elm_scroller_current_page_get(RealHandle, out h, out v);
256                 return v;
257             }
258         }
259
260         /// <summary>
261         /// Sets or gets scroll current page number.
262         /// </summary>
263         /// <remarks>
264         /// Current page means the page which meets the left of the viewport.
265         /// If there are two or more pages in the viewport, it returns the number of the page which meets the left of the viewport.
266         /// The page number starts from 0. 0 is the first page.
267         /// </remarks>
268         public int HorizontalPageIndex
269         {
270             get
271             {
272                 int v, h;
273                 Interop.Elementary.elm_scroller_current_page_get(RealHandle, out h, out v);
274                 return h;
275             }
276         }
277
278         /// <summary>
279         /// Sets or gets the maximum limit of the movable page at vertical direction.
280         /// </summary>
281         public int VerticalPageScrollLimit
282         {
283             get
284             {
285                 int v, h;
286                 Interop.Elementary.elm_scroller_page_scroll_limit_get(RealHandle, out h, out v);
287                 return v;
288             }
289             set
290             {
291                 int h = HorizontalPageScrollLimit;
292                 Interop.Elementary.elm_scroller_page_scroll_limit_set(RealHandle, h, value);
293             }
294         }
295
296         /// <summary>
297         /// Sets or gets the maximum limit of the movable page at horizontal direction.
298         /// </summary>
299         public int HorizontalPageScrollLimit
300         {
301             get
302             {
303                 int v, h;
304                 Interop.Elementary.elm_scroller_page_scroll_limit_get(RealHandle, out h, out v);
305                 return h;
306             }
307             set
308             {
309                 int v = VerticalPageScrollLimit;
310                 Interop.Elementary.elm_scroller_page_scroll_limit_set(RealHandle, value, v);
311             }
312         }
313
314         /// <summary>
315         /// Sets or gets the vertical bounce behaviour.
316         /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
317         /// This is a visual way to indicate the end has been reached.
318         /// This is enabled by default for both axis.
319         /// This API will set if it is enabled for the given axis with the boolean parameters for each axis.
320         /// </summary>
321         public bool VerticalBounce
322         {
323             get
324             {
325                 bool v, h;
326                 Interop.Elementary.elm_scroller_bounce_get(RealHandle, out h, out v);
327                 return v;
328             }
329             set
330             {
331                 bool h = HorizontalBounce;
332                 Interop.Elementary.elm_scroller_bounce_set(RealHandle, h, value);
333             }
334         }
335
336         /// <summary>
337         /// Sets or gets the horizontal bounce behaviour.
338         /// When scrolling, the scroller may "bounce" when reaching an edge of the content object.
339         /// This is a visual way to indicate the end has been reached.
340         /// This is enabled by default for both axis.
341         /// This API will set if it is enabled for the given axis with the boolean parameters for each axis.
342         /// </summary>
343         public bool HorizontalBounce
344         {
345             get
346             {
347                 bool v, h;
348                 Interop.Elementary.elm_scroller_bounce_get(RealHandle, out h, out v);
349                 return h;
350             }
351             set
352             {
353                 bool v = VerticalBounce;
354                 Interop.Elementary.elm_scroller_bounce_set(RealHandle, value, v);
355             }
356         }
357
358         /// <summary>
359         /// Gets the width of the content object of the scroller.
360         /// </summary>
361         public int ChildWidth
362         {
363             get
364             {
365                 int w, h;
366                 Interop.Elementary.elm_scroller_child_size_get(RealHandle, out w, out h);
367                 return w;
368             }
369         }
370
371         /// <summary>
372         /// Gets the height of the content object of the scroller.
373         /// </summary>
374         public int ChildHeight
375         {
376             get
377             {
378                 int w, h;
379                 Interop.Elementary.elm_scroller_child_size_get(RealHandle, out w, out h);
380                 return h;
381             }
382         }
383
384         /// <summary>
385         /// Set scrolling gravity values for a scroller.
386         /// The gravity, defines how the scroller will adjust its view when the size of the scroller contents increase.
387         /// The scroller will adjust the view to glue itself as follows.
388         /// 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
389         /// Default values for x and y are 0.0
390         /// </summary>
391         public double HorizontalGravity
392         {
393             get
394             {
395                 double v, h;
396                 Interop.Elementary.elm_scroller_gravity_get(RealHandle, out h, out v);
397                 return h;
398             }
399             set
400             {
401                 double v = VerticalGravity;
402                 Interop.Elementary.elm_scroller_gravity_set(RealHandle, value, v);
403             }
404         }
405
406         /// <summary>
407         /// Set scrolling gravity values for a scroller.
408         /// The gravity, defines how the scroller will adjust its view when the size of the scroller contents increase.
409         /// The scroller will adjust the view to glue itself as follows.
410         /// 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
411         /// Default values for x and y are 0.0
412         /// </summary>
413         public double VerticalGravity
414         {
415             get
416             {
417                 double v, h;
418                 Interop.Elementary.elm_scroller_gravity_get(RealHandle, out h, out v);
419                 return v;
420             }
421             set
422             {
423                 double h = HorizontalGravity;
424                 Interop.Elementary.elm_scroller_gravity_set(RealHandle, h, value);
425             }
426         }
427
428         /// <summary>
429         /// Get scroll last page number.
430         /// The page number starts from 0. 0 is the first page. This returns the last page number among the pages.
431         /// </summary>
432         public int LastVerticalPageNumber
433         {
434             get
435             {
436                 int v, h;
437                 Interop.Elementary.elm_scroller_last_page_get(RealHandle, out h, out v);
438                 return v;
439             }
440         }
441
442         /// <summary>
443         /// Get scroll last page number.
444         /// The page number starts from 0. 0 is the first page. This returns the last page number among the pages.
445         /// </summary>
446         public int LastHorizontalPageNumber
447         {
448             get
449             {
450                 int v, h;
451                 Interop.Elementary.elm_scroller_last_page_get(RealHandle, out h, out v);
452                 return h;
453             }
454         }
455
456         /// <summary>
457         /// Set an infinite loop_ for a scroller.
458         /// This function sets the infinite loop vertically.
459         /// If the content is set, it will be shown repeatedly.
460         /// </summary>
461         public bool VerticalLoop
462         {
463             get
464             {
465                 bool v, h;
466                 Interop.Elementary.elm_scroller_loop_get(RealHandle, out h, out v);
467                 return v;
468             }
469             set
470             {
471                 bool h = HorizontalLoop;
472                 Interop.Elementary.elm_scroller_loop_set(RealHandle, h, value);
473             }
474         }
475
476         /// <summary>
477         /// Set an infinite loop_ for a scroller.
478         /// This function sets the infinite loop horizontally.
479         /// If the content is set, it will be shown repeatedly.
480         /// </summary>
481         public bool HorizontalLoop
482         {
483             get
484             {
485                 bool v, h;
486                 Interop.Elementary.elm_scroller_loop_get(RealHandle, out h, out v);
487                 return h;
488             }
489             set
490             {
491                 bool v = VerticalLoop;
492                 Interop.Elementary.elm_scroller_loop_set(RealHandle, value, v);
493             }
494         }
495
496         /// <summary>
497         /// Get a given scroller widget's scrolling page size, relative to its viewport size.
498         /// </summary>
499         public double VerticalRelativePageSize
500         {
501             get
502             {
503                 double v, h;
504                 Interop.Elementary.elm_scroller_page_relative_get(RealHandle, out h, out v);
505                 return v;
506             }
507             set
508             {
509                 double h = HorizontalRelativePageSize;
510                 Interop.Elementary.elm_scroller_page_relative_set(RealHandle, h, value);
511             }
512         }
513
514         /// <summary>
515         /// Get a given scroller widget's scrolling page size, relative to its viewport size.
516         /// </summary>
517         public double HorizontalRelativePageSize
518         {
519             get
520             {
521                 double v, h;
522                 Interop.Elementary.elm_scroller_page_relative_get(RealHandle, out h, out v);
523                 return h;
524             }
525             set
526             {
527                 double v = VerticalRelativePageSize;
528                 Interop.Elementary.elm_scroller_page_relative_set(RealHandle, value, v);
529             }
530         }
531
532         /// <summary>
533         /// Gets or Sets the page snapping behavior of a scroller.
534         /// </summary>
535         public bool VerticalSnap
536         {
537             get
538             {
539                 bool v, h;
540                 Interop.Elementary.elm_scroller_page_snap_get(RealHandle, out h, out v);
541                 return v;
542             }
543             set
544             {
545                 bool h = HorizontalSnap;
546                 Interop.Elementary.elm_scroller_page_snap_set(RealHandle, h, value);
547             }
548         }
549
550         /// <summary>
551         /// Gets or Sets the page snapping behavior of a scroller.
552         /// </summary>
553         public bool HorizontalSnap
554         {
555             get
556             {
557                 bool v, h;
558                 Interop.Elementary.elm_scroller_page_snap_get(RealHandle, out h, out v);
559                 return h;
560             }
561             set
562             {
563                 bool v = VerticalSnap;
564                 Interop.Elementary.elm_scroller_page_snap_set(RealHandle, value, v);
565             }
566         }
567
568         /// <summary>
569         /// Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.
570         /// </summary>
571         public int PageHeight
572         {
573             get
574             {
575                 int w, h;
576                 Interop.Elementary.elm_scroller_page_size_get(RealHandle, out w, out h);
577                 return h;
578             }
579             set
580             {
581                 int w = PageWidth;
582                 Interop.Elementary.elm_scroller_page_size_set(RealHandle, w, value);
583             }
584         }
585
586         /// <summary>
587         /// Gets or sets the page size to an absolute fixed value, with 0 turning it off for that axis.
588         /// </summary>
589         public int PageWidth
590         {
591             get
592             {
593                 int w, h;
594                 Interop.Elementary.elm_scroller_page_size_get(RealHandle, out w, out h);
595                 return w;
596             }
597             set
598             {
599                 int h = PageHeight;
600                 Interop.Elementary.elm_scroller_page_size_set(RealHandle, value, h);
601             }
602         }
603
604         /// <summary>
605         /// Gets or sets the event propagation for a scroller.
606         /// This enables or disables event propagation from the scroller content to the scroller and its parent.
607         /// By default event propagation is enabled.
608         /// </summary>
609         public bool PropagateEvents
610         {
611             get
612             {
613                 return Interop.Elementary.elm_scroller_propagate_events_get(RealHandle);
614             }
615             set
616             {
617                 Interop.Elementary.elm_scroller_propagate_events_set(RealHandle, value);
618             }
619         }
620
621         /// <summary>
622         /// Gets or sets the step size to move scroller by key event.
623         /// </summary>
624         public int HorizontalStepSize
625         {
626             get
627             {
628                 int h, v;
629                 Interop.Elementary.elm_scroller_step_size_get(RealHandle, out h, out v);
630                 return h;
631             }
632             set
633             {
634                 int v = VerticalStepSize;
635                 Interop.Elementary.elm_scroller_step_size_set(RealHandle, value, v);
636             }
637         }
638
639         /// <summary>
640         /// Gets or sets the step size to move scroller by key event.
641         /// </summary>
642         public int VerticalStepSize
643         {
644             get
645             {
646                 int h, v;
647                 Interop.Elementary.elm_scroller_step_size_get(RealHandle, out h, out v);
648                 return v;
649             }
650             set
651             {
652                 int h = HorizontalStepSize;
653                 Interop.Elementary.elm_scroller_step_size_set(RealHandle, h, value);
654             }
655         }
656
657         /// <summary>
658         /// Gets or sets a value whether mouse wheel is enabled or not over the scroller.
659         /// </summary>
660         public bool WheelDisabled
661         {
662             get
663             {
664                 return Interop.Elementary.elm_scroller_wheel_disabled_get(RealHandle);
665             }
666             set
667             {
668                 Interop.Elementary.elm_scroller_wheel_disabled_set(RealHandle, value);
669             }
670         }
671
672         /// <summary>
673         /// Gets or sets the type of single direction scroll.
674         /// </summary>
675         public ScrollSingleDirection SingleDirection
676         {
677             get
678             {
679                 return (ScrollSingleDirection)Interop.Elementary.elm_scroller_single_direction_get(RealHandle);
680             }
681             set
682             {
683                 Interop.Elementary.elm_scroller_single_direction_set(RealHandle, (int)value);
684             }
685         }
686
687         /// <summary>
688         /// Sets the scroller minimum size limited to the minimum size of the content.
689         /// By default the scroller will be as small as its design allows, irrespective of its content.
690         /// This will make the scroller minimum size the right size horizontally and/or vertically to perfectly fit its content in that direction.
691         /// </summary>
692         /// <param name="horizontal">Enable limiting minimum size horizontally</param>
693         /// <param name="vertical">Enable limiting minimum size vertically</param>
694         public void MinimumLimit(bool horizontal, bool vertical)
695         {
696             Interop.Elementary.elm_scroller_content_min_limit(RealHandle, horizontal, vertical);
697         }
698
699         /// <summary>
700         /// Sets the page size to an absolute fixed value, with 0 turning it off for that axis.
701         /// </summary>
702         /// <param name="width">The horizontal page size.</param>
703         /// <param name="height">The vertical page size.</param>
704         public void SetPageSize(int width, int height)
705         {
706             Interop.Elementary.elm_scroller_page_size_set(RealHandle, width, height);
707         }
708
709         /// <summary>
710         /// Sets the scroll page size relative to the viewport size.
711         /// </summary>
712         /// <remarks>
713         /// The scroller is capable of limiting scrolling by the user to "pages".
714         /// That is to jump by and only show a "whole page" at a time as if the continuous area of the scroller
715         /// content is split into page sized pieces. This sets the size of a page relative to the viewport of the scroller.
716         /// 1.0 is "1 viewport" which is the size (horizontally or vertically). 0.0 turns it off in that axis.
717         /// This is mutually exclusive with the page size (see elm_scroller_page_size_set() for more information).
718         /// Likewise 0.5 is "half a viewport". Usable values are normally between 0.0 and 1.0 including 1.0.
719         /// If you only want 1 axis to be page "limited", use 0.0 for the other axis.
720         /// </remarks>
721         /// <param name="width">The horizontal page relative size.</param>
722         /// <param name="height">The vertical page relative size.</param>
723         public void SetPageSize(double width, double height)
724         {
725             Interop.Elementary.elm_scroller_page_relative_set(RealHandle, width, height);
726         }
727
728         /// <summary>
729         /// Shows a specific virtual region within the scroller content object by the page number.
730         /// (0, 0) of the indicated page is located at the top-left corner of the viewport.
731         /// </summary>
732         /// <param name="horizontalPageIndex">The horizontal page number.</param>
733         /// <param name="verticalPageIndex">The vertical page number.</param>
734         /// <param name="animated">True means slider with animation.</param>
735         public void ScrollTo(int horizontalPageIndex, int verticalPageIndex, bool animated)
736         {
737             if (animated)
738             {
739                 Interop.Elementary.elm_scroller_page_bring_in(RealHandle, horizontalPageIndex, verticalPageIndex);
740             }
741             else
742             {
743                 Interop.Elementary.elm_scroller_page_show(RealHandle, horizontalPageIndex, verticalPageIndex);
744             }
745         }
746
747         /// <summary>
748         /// Shows a specific virtual region within the scroller content object.
749         /// </summary>
750         /// <remarks>
751         /// This ensures that all (or part, if it does not fit) of the designated region in the virtual content object ((0, 0)
752         /// starting at the top-left of the virtual content object) is shown within the scroller.
753         /// If set "animated" to true, it will allows the scroller to "smoothly slide" to this location
754         /// (if configuration in general calls for transitions).
755         /// It may not jump immediately to the new location and may take a while and show other content along the way.
756         /// </remarks>
757         /// <param name="region">Rect struct of region.</param>
758         /// <param name="animated">True means allows the scroller to "smoothly slide" to this location.</param>
759         public void ScrollTo(Rect region, bool animated)
760         {
761             if (animated)
762             {
763                 Interop.Elementary.elm_scroller_region_bring_in(RealHandle, region.X, region.Y, region.Width, region.Height);
764             }
765             else
766             {
767                 Interop.Elementary.elm_scroller_region_show(RealHandle, region.X, region.Y, region.Width, region.Height);
768             }
769         }
770
771         protected override IntPtr CreateHandle(EvasObject parent)
772         {
773             IntPtr handle = Interop.Elementary.elm_layout_add(parent.Handle);
774             Interop.Elementary.elm_layout_theme_set(handle, "layout", "elm_widget", "default");
775
776             RealHandle = Interop.Elementary.elm_scroller_add(handle);
777             Interop.Elementary.elm_object_part_content_set(handle, "elm.swallow.content", RealHandle);
778
779             return handle;
780         }
781     }
782 }