Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
IScrollInfo.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using SiliconStudio.Core.Mathematics;
4 using SiliconStudio.Paradox.UI.Controls;
5 
6 namespace SiliconStudio.Paradox.UI
7 {
8  /// <summary>
9  /// Represents the main scrollable region inside a <see cref="ScrollViewer"/> control.
10  /// </summary>
11  public interface IScrollInfo
12  {
13  /// <summary>
14  /// Gets a value that indicates if the <see cref="UIElement"/> can scroll in the provided direction.
15  /// </summary>
16  /// <param name="direction">The direction in which perform the scrolling</param>
17  bool CanScroll(Orientation direction);
18 
19  /// <summary>
20  /// Gets the size of the extent. That is the virtual total size of the <see cref="UIElement"/>.
21  /// </summary>
22  Vector3 Extent { get; }
23 
24  /// <summary>
25  /// Gets the offset of the scrolled content.
26  /// </summary>
27  Vector3 Offset { get; }
28 
29  /// <summary>
30  /// Gets the size of the viewport for this content.
31  /// </summary>
32  Vector3 Viewport { get; }
33 
34  /// <summary>
35  /// Gets or sets a <see cref="ScrollViewer"/> element that controls scrolling behavior.
36  /// </summary>
37  ScrollViewer ScrollOwner { get; set; }
38 
39  /// <summary>
40  /// Get the position of the horizontal, vertical and in depth scroll bars.
41  /// </summary>
42  /// <returns>A value between <value>0</value> and <value>1</value> for each component indicating the position of the scroll bar</returns>
43  /// <remarks>Return <value>0</value> for each direction the element cannot scroll</remarks>
44  Vector3 ScrollBarPositions { get; }
45 
46  /// <summary>
47  /// Go to the next line in the given the direction.
48  /// </summary>
49  /// <param name="direction">The direction in which to scroll</param>
50  void ScrollToNextLine(Orientation direction);
51 
52  /// <summary>
53  /// Go to the previous line in the given the direction.
54  /// </summary>
55  /// <param name="direction">The direction in which to scroll</param>
56  void ScrollToPreviousLine(Orientation direction);
57 
58  /// <summary>
59  /// Go to the next page in the given the direction.
60  /// </summary>
61  /// <param name="direction">The direction in which to scroll</param>
62  void ScrollToNextPage(Orientation direction);
63 
64  /// <summary>
65  /// Go to the previous page in the given the direction.
66  /// </summary>
67  /// <param name="direction">The direction in which to scroll</param>
68  void ScrollToPreviousPage(Orientation direction);
69 
70  /// <summary>
71  /// Go to the beginning of the element in the given the direction.
72  /// </summary>
73  /// <param name="direction">The direction in which to scroll</param>
74  void ScrollToBeginning(Orientation direction);
75 
76  /// <summary>
77  /// Go to the end of the element in the given the direction.
78  /// </summary>
79  /// <param name="direction">The direction in which to scroll</param>
80  void ScrollToEnd(Orientation direction);
81 
82  /// <summary>
83  /// Increase the amount of offset from the current scrolling position.
84  /// </summary>
85  /// <param name="offsets"></param>
86  void ScrollOf(Vector3 offsets);
87  }
88 }
Orientation
Defines the different orientations that a control or layout can have.
Definition: Orientation.cs:8
Represents a three dimensional mathematical vector.
Definition: Vector3.cs:42
Represents the main scrollable region inside a ScrollViewer control.
Definition: IScrollInfo.cs:11
Represents a scroll viewer. A scroll viewer element has an infinite virtual size defined by its Scrol...
Definition: ScrollViewer.cs:19