| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // ScrollView.cs
- //
- // Copyright 2015 Xamarin Inc. All rights reserved.
- using System;
- using System.Runtime.InteropServices;
- using System.Collections.Generic;
- using Urho.Urho2D;
- using Urho.Gui;
- using Urho.Resources;
- using Urho.IO;
- using Urho.Navigation;
- using Urho.Network;
- namespace Urho.Gui
- {
- /// <summary>
- /// Scrollable %UI element for showing a (possibly large) child element.
- /// </summary>
- public unsafe partial class ScrollView : UIElement
- {
- unsafe partial void OnScrollViewCreated ();
- [Preserve]
- public ScrollView (IntPtr handle) : base (handle)
- {
- OnScrollViewCreated ();
- }
- [Preserve]
- protected ScrollView (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnScrollViewCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int ScrollView_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (ScrollView_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ScrollView_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (ScrollView_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int ScrollView_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(ScrollView));
- return new StringHash (ScrollView_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ScrollView_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(ScrollView));
- return Marshal.PtrToStringAnsi (ScrollView_GetTypeNameStatic ());
- }
- [Preserve]
- public ScrollView () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ScrollView_ScrollView (IntPtr context);
- [Preserve]
- public ScrollView (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(ScrollView));
- handle = ScrollView_ScrollView ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnScrollViewCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(ScrollView));
- ScrollView_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_Update (IntPtr handle, float timeStep);
- /// <summary>
- /// Perform UI element update.
- /// </summary>
- public override void Update (float timeStep)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_Update (handle, timeStep);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_ApplyAttributes (IntPtr handle);
- /// <summary>
- /// Apply attribute changes that can not be applied immediately.
- /// </summary>
- public override void ApplyAttributes ()
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_ApplyAttributes (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_OnWheel (IntPtr handle, int delta, int buttons, int qualifiers);
- /// <summary>
- /// React to mouse wheel.
- /// </summary>
- public override void OnWheel (int delta, int buttons, int qualifiers)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_OnWheel (handle, delta, buttons, qualifiers);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_OnKey (IntPtr handle, int key, int buttons, int qualifiers);
- /// <summary>
- /// React to a key press.
- /// </summary>
- public override void OnKey (int key, int buttons, int qualifiers)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_OnKey (handle, key, buttons, qualifiers);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_OnResize (IntPtr handle, ref Urho.IntVector2 newSize, ref Urho.IntVector2 delta);
- /// <summary>
- /// React to resize.
- /// </summary>
- public override void OnResize (Urho.IntVector2 newSize, Urho.IntVector2 delta)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_OnResize (handle, ref newSize, ref delta);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool ScrollView_IsWheelHandler (IntPtr handle);
- /// <summary>
- /// Return whether the element could handle wheel input.
- /// </summary>
- private bool IsWheelHandler ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_IsWheelHandler (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetContentElement (IntPtr handle, IntPtr element);
- /// <summary>
- /// Set content element.
- /// </summary>
- private void SetContentElement (UIElement element)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetContentElement (handle, (object)element == null ? IntPtr.Zero : element.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetViewPosition (IntPtr handle, ref Urho.IntVector2 position);
- /// <summary>
- /// Set view offset from the top-left corner.
- /// </summary>
- private void SetViewPosition (Urho.IntVector2 position)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetViewPosition (handle, ref position);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetViewPosition0 (IntPtr handle, int x, int y);
- /// <summary>
- /// Set view offset from the top-left corner.
- /// </summary>
- public void SetViewPosition (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetViewPosition0 (handle, x, y);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetScrollBarsVisible (IntPtr handle, bool horizontal, bool vertical);
- /// <summary>
- /// Set scrollbars' visibility manually. Disables scrollbar autoshow/hide.
- /// </summary>
- public void SetScrollBarsVisible (bool horizontal, bool vertical)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetScrollBarsVisible (handle, horizontal, vertical);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetHorizontalScrollBarVisible (IntPtr handle, bool visible);
- /// <summary>
- /// Set horizontal scrollbar visibility manually. Disables scrollbar autoshow/hide.
- /// </summary>
- private void SetHorizontalScrollBarVisible (bool visible)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetHorizontalScrollBarVisible (handle, visible);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetVerticalScrollBarVisible (IntPtr handle, bool visible);
- /// <summary>
- /// Set vertical scrollbar visibility manually. Disables scrollbar autoshow/hide.
- /// </summary>
- private void SetVerticalScrollBarVisible (bool visible)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetVerticalScrollBarVisible (handle, visible);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetScrollBarsAutoVisible (IntPtr handle, bool enable);
- /// <summary>
- /// Set whether to automatically show/hide scrollbars. Default true.
- /// </summary>
- private void SetScrollBarsAutoVisible (bool enable)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetScrollBarsAutoVisible (handle, enable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetScrollStep (IntPtr handle, float step);
- /// <summary>
- /// Set arrow key scroll step. Also sets it on the scrollbars.
- /// </summary>
- private void SetScrollStep (float step)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetScrollStep (handle, step);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetPageStep (IntPtr handle, float step);
- /// <summary>
- /// Set arrow key page step.
- /// </summary>
- private void SetPageStep (float step)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetPageStep (handle, step);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetScrollDeceleration (IntPtr handle, float deceleration);
- /// <summary>
- /// Set scroll deceleration.
- /// </summary>
- private void SetScrollDeceleration (float deceleration)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetScrollDeceleration (handle, deceleration);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetScrollSnapEpsilon (IntPtr handle, float snap);
- /// <summary>
- /// Set scroll snap epsilon
- /// </summary>
- private void SetScrollSnapEpsilon (float snap)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetScrollSnapEpsilon (handle, snap);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetAutoDisableChildren (IntPtr handle, bool disable);
- /// <summary>
- /// Set whether child elements should be disabled while touch scrolling.
- /// </summary>
- private void SetAutoDisableChildren (bool disable)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetAutoDisableChildren (handle, disable);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetAutoDisableThreshold (IntPtr handle, float amount);
- /// <summary>
- /// Set how much touch movement is needed to trigger child element disabling.
- /// </summary>
- private void SetAutoDisableThreshold (float amount)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetAutoDisableThreshold (handle, amount);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 ScrollView_GetViewPosition (IntPtr handle);
- /// <summary>
- /// Return view offset from the top-left corner.
- /// </summary>
- private Urho.IntVector2 GetViewPosition ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetViewPosition (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ScrollView_GetContentElement (IntPtr handle);
- /// <summary>
- /// Return content element.
- /// </summary>
- private UIElement GetContentElement ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<UIElement> (ScrollView_GetContentElement (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ScrollView_GetHorizontalScrollBar (IntPtr handle);
- /// <summary>
- /// Return horizontal scroll bar.
- /// </summary>
- private ScrollBar GetHorizontalScrollBar ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<ScrollBar> (ScrollView_GetHorizontalScrollBar (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ScrollView_GetVerticalScrollBar (IntPtr handle);
- /// <summary>
- /// Return vertical scroll bar.
- /// </summary>
- private ScrollBar GetVerticalScrollBar ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<ScrollBar> (ScrollView_GetVerticalScrollBar (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr ScrollView_GetScrollPanel (IntPtr handle);
- /// <summary>
- /// Return scroll panel.
- /// </summary>
- private BorderImage GetScrollPanel ()
- {
- Runtime.ValidateRefCounted (this);
- return Runtime.LookupObject<BorderImage> (ScrollView_GetScrollPanel (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool ScrollView_GetScrollBarsAutoVisible (IntPtr handle);
- /// <summary>
- /// Return whether scrollbars are automatically shown/hidden.
- /// </summary>
- private bool GetScrollBarsAutoVisible ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetScrollBarsAutoVisible (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool ScrollView_GetHorizontalScrollBarVisible (IntPtr handle);
- /// <summary>
- /// Return whether the horizontal scrollbar is visible.
- /// </summary>
- private bool GetHorizontalScrollBarVisible ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetHorizontalScrollBarVisible (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool ScrollView_GetVerticalScrollBarVisible (IntPtr handle);
- /// <summary>
- /// Return whether the vertical scrollbar is visible.
- /// </summary>
- private bool GetVerticalScrollBarVisible ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetVerticalScrollBarVisible (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float ScrollView_GetScrollStep (IntPtr handle);
- /// <summary>
- /// Return arrow key scroll step.
- /// </summary>
- private float GetScrollStep ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetScrollStep (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float ScrollView_GetPageStep (IntPtr handle);
- /// <summary>
- /// Return arrow key page step.
- /// </summary>
- private float GetPageStep ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetPageStep (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float ScrollView_GetScrollDeceleration (IntPtr handle);
- /// <summary>
- /// Return scroll deceleration.
- /// </summary>
- private float GetScrollDeceleration ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetScrollDeceleration (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float ScrollView_GetScrollSnapEpsilon (IntPtr handle);
- /// <summary>
- /// Return scroll snap epsilon
- /// </summary>
- private float GetScrollSnapEpsilon ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetScrollSnapEpsilon (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool ScrollView_GetAutoDisableChildren (IntPtr handle);
- /// <summary>
- /// Return whether child element will be disabled while touch scrolling.
- /// </summary>
- private bool GetAutoDisableChildren ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetAutoDisableChildren (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float ScrollView_GetAutoDisableThreshold (IntPtr handle);
- /// <summary>
- /// Return how much touch movement is needed to trigger child element disabling.
- /// </summary>
- private float GetAutoDisableThreshold ()
- {
- Runtime.ValidateRefCounted (this);
- return ScrollView_GetAutoDisableThreshold (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void ScrollView_SetViewPositionAttr (IntPtr handle, ref Urho.IntVector2 value);
- /// <summary>
- /// Set view position attribute.
- /// </summary>
- public void SetViewPositionAttr (Urho.IntVector2 value)
- {
- Runtime.ValidateRefCounted (this);
- ScrollView_SetViewPositionAttr (handle, ref value);
- }
- public override StringHash Type {
- get {
- return UrhoGetType ();
- }
- }
- public override string TypeName {
- get {
- return GetTypeName ();
- }
- }
- [Preserve]
- public new static StringHash TypeStatic {
- get {
- return GetTypeStatic ();
- }
- }
- public new static string TypeNameStatic {
- get {
- return GetTypeNameStatic ();
- }
- }
- /// <summary>
- /// Return whether the element could handle wheel input.
- /// </summary>
- public override bool WheelHandler {
- get {
- return IsWheelHandler ();
- }
- }
- /// <summary>
- /// Return content element.
- /// Or
- /// Set content element.
- /// </summary>
- public UIElement ContentElement {
- get {
- return GetContentElement ();
- }
- set {
- SetContentElement (value);
- }
- }
- /// <summary>
- /// Return view offset from the top-left corner.
- /// Or
- /// Set view offset from the top-left corner.
- /// </summary>
- public Urho.IntVector2 ViewPosition {
- get {
- return GetViewPosition ();
- }
- set {
- SetViewPosition (value);
- }
- }
- /// <summary>
- /// Return whether the horizontal scrollbar is visible.
- /// Or
- /// Set horizontal scrollbar visibility manually. Disables scrollbar autoshow/hide.
- /// </summary>
- public bool HorizontalScrollBarVisible {
- get {
- return GetHorizontalScrollBarVisible ();
- }
- set {
- SetHorizontalScrollBarVisible (value);
- }
- }
- /// <summary>
- /// Return whether the vertical scrollbar is visible.
- /// Or
- /// Set vertical scrollbar visibility manually. Disables scrollbar autoshow/hide.
- /// </summary>
- public bool VerticalScrollBarVisible {
- get {
- return GetVerticalScrollBarVisible ();
- }
- set {
- SetVerticalScrollBarVisible (value);
- }
- }
- /// <summary>
- /// Return whether scrollbars are automatically shown/hidden.
- /// Or
- /// Set whether to automatically show/hide scrollbars. Default true.
- /// </summary>
- public bool ScrollBarsAutoVisible {
- get {
- return GetScrollBarsAutoVisible ();
- }
- set {
- SetScrollBarsAutoVisible (value);
- }
- }
- /// <summary>
- /// Return arrow key scroll step.
- /// Or
- /// Set arrow key scroll step. Also sets it on the scrollbars.
- /// </summary>
- public float ScrollStep {
- get {
- return GetScrollStep ();
- }
- set {
- SetScrollStep (value);
- }
- }
- /// <summary>
- /// Return arrow key page step.
- /// Or
- /// Set arrow key page step.
- /// </summary>
- public float PageStep {
- get {
- return GetPageStep ();
- }
- set {
- SetPageStep (value);
- }
- }
- /// <summary>
- /// Return scroll deceleration.
- /// Or
- /// Set scroll deceleration.
- /// </summary>
- public float ScrollDeceleration {
- get {
- return GetScrollDeceleration ();
- }
- set {
- SetScrollDeceleration (value);
- }
- }
- /// <summary>
- /// Return scroll snap epsilon
- /// Or
- /// Set scroll snap epsilon
- /// </summary>
- public float ScrollSnapEpsilon {
- get {
- return GetScrollSnapEpsilon ();
- }
- set {
- SetScrollSnapEpsilon (value);
- }
- }
- /// <summary>
- /// Return whether child element will be disabled while touch scrolling.
- /// Or
- /// Set whether child elements should be disabled while touch scrolling.
- /// </summary>
- public bool AutoDisableChildren {
- get {
- return GetAutoDisableChildren ();
- }
- set {
- SetAutoDisableChildren (value);
- }
- }
- /// <summary>
- /// Return how much touch movement is needed to trigger child element disabling.
- /// Or
- /// Set how much touch movement is needed to trigger child element disabling.
- /// </summary>
- public float AutoDisableThreshold {
- get {
- return GetAutoDisableThreshold ();
- }
- set {
- SetAutoDisableThreshold (value);
- }
- }
- /// <summary>
- /// Return horizontal scroll bar.
- /// </summary>
- public ScrollBar HorizontalScrollBar {
- get {
- return GetHorizontalScrollBar ();
- }
- }
- /// <summary>
- /// Return vertical scroll bar.
- /// </summary>
- public ScrollBar VerticalScrollBar {
- get {
- return GetVerticalScrollBar ();
- }
- }
- /// <summary>
- /// Return scroll panel.
- /// </summary>
- public BorderImage ScrollPanel {
- get {
- return GetScrollPanel ();
- }
- }
- }
- }
|