1 /** Copyright (c) 2016 Samsung Electronics Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
7 * http://www.apache.org/licenses/LICENSE-2.0
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
16 // This File has been auto-generated by SWIG and then modified using DALi Ruby Scripts
17 //------------------------------------------------------------------------------
20 // This file was automatically generated by SWIG (http://www.swig.org).
23 // Do not make changes to this file unless you know what you are doing--modify
24 // the SWIG interface file instead.
25 //------------------------------------------------------------------------------
30 using System.Runtime.InteropServices;
33 public class ScrollBar : View {
34 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
36 internal ScrollBar(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.ScrollBar_SWIGUpcast(cPtr), cMemoryOwn) {
37 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
40 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ScrollBar obj) {
41 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
48 public override void Dispose() {
50 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
53 NDalicPINVOKE.delete_ScrollBar(swigCPtr);
55 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
57 global::System.GC.SuppressFinalize(this);
64 public class PanFinishedEventArgs : EventArgs
68 public class ScrollPositionIntervalReachedEventArgs : EventArgs
70 private float _currentScrollPosition;
72 public float CurrentScrollPosition
76 return _currentScrollPosition;
80 _currentScrollPosition = value;
85 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
86 private delegate void PanFinishedEventCallbackDelegate();
87 private DaliEventHandler<object,PanFinishedEventArgs> _scrollBarPanFinishedEventHandler;
88 private PanFinishedEventCallbackDelegate _scrollBarPanFinishedEventCallbackDelegate;
90 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
91 private delegate void ScrollPositionIntervalReachedEventCallbackDelegate();
92 private DaliEventHandler<object,ScrollPositionIntervalReachedEventArgs> _scrollBarScrollPositionIntervalReachedEventHandler;
93 private ScrollPositionIntervalReachedEventCallbackDelegate _scrollBarScrollPositionIntervalReachedEventCallbackDelegate;
95 public event DaliEventHandler<object,PanFinishedEventArgs> PanFinished
101 // Restricted to only one listener
102 if (_scrollBarPanFinishedEventHandler == null)
104 _scrollBarPanFinishedEventHandler += value;
106 _scrollBarPanFinishedEventCallbackDelegate = new PanFinishedEventCallbackDelegate(OnScrollBarPanFinished);
107 this.PanFinishedSignal().Connect(_scrollBarPanFinishedEventCallbackDelegate);
116 if (_scrollBarPanFinishedEventHandler != null)
118 this.PanFinishedSignal().Disconnect(_scrollBarPanFinishedEventCallbackDelegate);
121 _scrollBarPanFinishedEventHandler -= value;
126 // Callback for ScrollBar PanFinishedSignal
127 private void OnScrollBarPanFinished()
129 PanFinishedEventArgs e = new PanFinishedEventArgs();
131 if (_scrollBarPanFinishedEventHandler != null)
133 //here we send all data to user event handlers
134 _scrollBarPanFinishedEventHandler(this, e);
139 public event DaliEventHandler<object,ScrollPositionIntervalReachedEventArgs> ScrollPositionIntervalReached
145 // Restricted to only one listener
146 if (_scrollBarScrollPositionIntervalReachedEventHandler == null)
148 _scrollBarScrollPositionIntervalReachedEventHandler += value;
150 _scrollBarScrollPositionIntervalReachedEventCallbackDelegate = new ScrollPositionIntervalReachedEventCallbackDelegate(OnScrollBarScrollPositionIntervalReached);
151 this.ScrollPositionIntervalReachedSignal().Connect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
160 if (_scrollBarScrollPositionIntervalReachedEventHandler != null)
162 this.ScrollPositionIntervalReachedSignal().Disconnect(_scrollBarScrollPositionIntervalReachedEventCallbackDelegate);
165 _scrollBarScrollPositionIntervalReachedEventHandler -= value;
170 // Callback for ScrollBar ScrollPositionIntervalReachedSignal
171 private void OnScrollBarScrollPositionIntervalReached()
173 ScrollPositionIntervalReachedEventArgs e = new ScrollPositionIntervalReachedEventArgs();
175 if (_scrollBarScrollPositionIntervalReachedEventHandler != null)
177 //here we send all data to user event handlers
178 _scrollBarScrollPositionIntervalReachedEventHandler(this, e);
183 public class Property : global::System.IDisposable {
184 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
185 protected bool swigCMemOwn;
187 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
188 swigCMemOwn = cMemoryOwn;
189 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
192 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
193 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
200 public virtual void Dispose() {
202 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
205 NDalicPINVOKE.delete_ScrollBar_Property(swigCPtr);
207 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
209 global::System.GC.SuppressFinalize(this);
213 public Property() : this(NDalicPINVOKE.new_ScrollBar_Property(), true) {
214 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
217 public static readonly int SCROLL_DIRECTION = NDalicPINVOKE.ScrollBar_Property_SCROLL_DIRECTION_get();
218 public static readonly int INDICATOR_HEIGHT_POLICY = NDalicPINVOKE.ScrollBar_Property_INDICATOR_HEIGHT_POLICY_get();
219 public static readonly int INDICATOR_FIXED_HEIGHT = NDalicPINVOKE.ScrollBar_Property_INDICATOR_FIXED_HEIGHT_get();
220 public static readonly int INDICATOR_SHOW_DURATION = NDalicPINVOKE.ScrollBar_Property_INDICATOR_SHOW_DURATION_get();
221 public static readonly int INDICATOR_HIDE_DURATION = NDalicPINVOKE.ScrollBar_Property_INDICATOR_HIDE_DURATION_get();
222 public static readonly int SCROLL_POSITION_INTERVALS = NDalicPINVOKE.ScrollBar_Property_SCROLL_POSITION_INTERVALS_get();
223 public static readonly int INDICATOR_MINIMUM_HEIGHT = NDalicPINVOKE.ScrollBar_Property_INDICATOR_MINIMUM_HEIGHT_get();
224 public static readonly int INDICATOR_START_PADDING = NDalicPINVOKE.ScrollBar_Property_INDICATOR_START_PADDING_get();
225 public static readonly int INDICATOR_END_PADDING = NDalicPINVOKE.ScrollBar_Property_INDICATOR_END_PADDING_get();
229 public ScrollBar (ScrollBar.Direction direction) : this (NDalicPINVOKE.ScrollBar_New__SWIG_0((int)direction), true) {
230 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
233 public ScrollBar () : this (NDalicPINVOKE.ScrollBar_New__SWIG_1(), true) {
234 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
237 public ScrollBar(ScrollBar scrollBar) : this(NDalicPINVOKE.new_ScrollBar__SWIG_1(ScrollBar.getCPtr(scrollBar)), true) {
238 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
241 public ScrollBar Assign(ScrollBar scrollBar) {
242 ScrollBar ret = new ScrollBar(NDalicPINVOKE.ScrollBar_Assign(swigCPtr, ScrollBar.getCPtr(scrollBar)), false);
243 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
247 public new static ScrollBar DownCast(BaseHandle handle) {
248 ScrollBar ret = new ScrollBar(NDalicPINVOKE.ScrollBar_DownCast(BaseHandle.getCPtr(handle)), true);
249 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
253 public void SetScrollPropertySource(Handle handle, int propertyScrollPosition, int propertyMinScrollPosition, int propertyMaxScrollPosition, int propertyScrollContentSize) {
254 NDalicPINVOKE.ScrollBar_SetScrollPropertySource(swigCPtr, Handle.getCPtr(handle), propertyScrollPosition, propertyMinScrollPosition, propertyMaxScrollPosition, propertyScrollContentSize);
255 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
258 public void SetScrollIndicator(Actor indicator) {
259 NDalicPINVOKE.ScrollBar_SetScrollIndicator(swigCPtr, Actor.getCPtr(indicator));
260 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
263 public Actor GetScrollIndicator() {
264 Actor ret = new Actor(NDalicPINVOKE.ScrollBar_GetScrollIndicator(swigCPtr), true);
265 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
269 public void SetScrollPositionIntervals(VectorFloat positions) {
270 NDalicPINVOKE.ScrollBar_SetScrollPositionIntervals(swigCPtr, VectorFloat.getCPtr(positions));
271 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
274 public VectorFloat GetScrollPositionIntervals() {
275 VectorFloat ret = new VectorFloat(NDalicPINVOKE.ScrollBar_GetScrollPositionIntervals(swigCPtr), true);
276 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280 public void SetScrollDirection(ScrollBar.Direction direction) {
281 NDalicPINVOKE.ScrollBar_SetScrollDirection(swigCPtr, (int)direction);
282 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
285 public ScrollBar.Direction GetScrollDirection() {
286 ScrollBar.Direction ret = (ScrollBar.Direction)NDalicPINVOKE.ScrollBar_GetScrollDirection(swigCPtr);
287 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
291 public void SetIndicatorHeightPolicy(ScrollBar.IndicatorHeightPolicyType policy) {
292 NDalicPINVOKE.ScrollBar_SetIndicatorHeightPolicy(swigCPtr, (int)policy);
293 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296 public ScrollBar.IndicatorHeightPolicyType GetIndicatorHeightPolicy() {
297 ScrollBar.IndicatorHeightPolicyType ret = (ScrollBar.IndicatorHeightPolicyType)NDalicPINVOKE.ScrollBar_GetIndicatorHeightPolicy(swigCPtr);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 public void SetIndicatorFixedHeight(float height) {
303 NDalicPINVOKE.ScrollBar_SetIndicatorFixedHeight(swigCPtr, height);
304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307 public float GetIndicatorFixedHeight() {
308 float ret = NDalicPINVOKE.ScrollBar_GetIndicatorFixedHeight(swigCPtr);
309 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313 public void SetIndicatorShowDuration(float durationSeconds) {
314 NDalicPINVOKE.ScrollBar_SetIndicatorShowDuration(swigCPtr, durationSeconds);
315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
318 public float GetIndicatorShowDuration() {
319 float ret = NDalicPINVOKE.ScrollBar_GetIndicatorShowDuration(swigCPtr);
320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
324 public void SetIndicatorHideDuration(float durationSeconds) {
325 NDalicPINVOKE.ScrollBar_SetIndicatorHideDuration(swigCPtr, durationSeconds);
326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 public float GetIndicatorHideDuration() {
330 float ret = NDalicPINVOKE.ScrollBar_GetIndicatorHideDuration(swigCPtr);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 public void ShowIndicator() {
336 NDalicPINVOKE.ScrollBar_ShowIndicator(swigCPtr);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340 public void HideIndicator() {
341 NDalicPINVOKE.ScrollBar_HideIndicator(swigCPtr);
342 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 public VoidSignal PanFinishedSignal() {
346 VoidSignal ret = new VoidSignal(NDalicPINVOKE.ScrollBar_PanFinishedSignal(swigCPtr), false);
347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351 public FloatSignal ScrollPositionIntervalReachedSignal() {
352 FloatSignal ret = new FloatSignal(NDalicPINVOKE.ScrollBar_ScrollPositionIntervalReachedSignal(swigCPtr), false);
353 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 public enum PropertyRange {
358 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
359 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000
362 public enum Direction {
367 public enum IndicatorHeightPolicyType {
372 public string ScrollDirection
377 GetProperty( ScrollBar.Property.SCROLL_DIRECTION).Get( out temp );
382 SetProperty( ScrollBar.Property.SCROLL_DIRECTION, new Dali.Property.Value( value ) );
385 public string IndicatorHeightPolicy
390 GetProperty( ScrollBar.Property.INDICATOR_HEIGHT_POLICY).Get( out temp );
395 SetProperty( ScrollBar.Property.INDICATOR_HEIGHT_POLICY, new Dali.Property.Value( value ) );
398 public float IndicatorFixedHeight
403 GetProperty( ScrollBar.Property.INDICATOR_FIXED_HEIGHT).Get( ref temp );
408 SetProperty( ScrollBar.Property.INDICATOR_FIXED_HEIGHT, new Dali.Property.Value( value ) );
411 public float IndicatorShowDuration
416 GetProperty( ScrollBar.Property.INDICATOR_SHOW_DURATION).Get( ref temp );
421 SetProperty( ScrollBar.Property.INDICATOR_SHOW_DURATION, new Dali.Property.Value( value ) );
424 public float IndicatorHideDuration
429 GetProperty( ScrollBar.Property.INDICATOR_HIDE_DURATION).Get( ref temp );
434 SetProperty( ScrollBar.Property.INDICATOR_HIDE_DURATION, new Dali.Property.Value( value ) );
437 public Dali.Property.Array ScrollPositionIntervals
441 Dali.Property.Array temp = new Dali.Property.Array();
442 GetProperty( ScrollBar.Property.SCROLL_POSITION_INTERVALS).Get( temp );
447 SetProperty( ScrollBar.Property.SCROLL_POSITION_INTERVALS, new Dali.Property.Value( value ) );
450 public float IndicatorMinimumHeight
455 GetProperty( ScrollBar.Property.INDICATOR_MINIMUM_HEIGHT).Get( ref temp );
460 SetProperty( ScrollBar.Property.INDICATOR_MINIMUM_HEIGHT, new Dali.Property.Value( value ) );
463 public float IndicatorStartPadding
468 GetProperty( ScrollBar.Property.INDICATOR_START_PADDING).Get( ref temp );
473 SetProperty( ScrollBar.Property.INDICATOR_START_PADDING, new Dali.Property.Value( value ) );
476 public float IndicatorEndPadding
481 GetProperty( ScrollBar.Property.INDICATOR_END_PADDING).Get( ref temp );
486 SetProperty( ScrollBar.Property.INDICATOR_END_PADDING, new Dali.Property.Value( value ) );