| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428 |
- // WARNING - AUTOGENERATED - DO NOT EDIT
- //
- // Generated using `sharpie urho`
- //
- // Button.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>
- /// Push button %UI element.
- /// </summary>
- public unsafe partial class Button : BorderImage
- {
- unsafe partial void OnButtonCreated ();
- [Preserve]
- public Button (IntPtr handle) : base (handle)
- {
- OnButtonCreated ();
- }
- [Preserve]
- protected Button (UrhoObjectFlag emptyFlag) : base (emptyFlag)
- {
- OnButtonCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Button_GetType (IntPtr handle);
- private StringHash UrhoGetType ()
- {
- Runtime.ValidateRefCounted (this);
- return new StringHash (Button_GetType (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Button_GetTypeName (IntPtr handle);
- private string GetTypeName ()
- {
- Runtime.ValidateRefCounted (this);
- return Marshal.PtrToStringAnsi (Button_GetTypeName (handle));
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern int Button_GetTypeStatic ();
- private static StringHash GetTypeStatic ()
- {
- Runtime.Validate (typeof(Button));
- return new StringHash (Button_GetTypeStatic ());
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Button_GetTypeNameStatic ();
- private static string GetTypeNameStatic ()
- {
- Runtime.Validate (typeof(Button));
- return Marshal.PtrToStringAnsi (Button_GetTypeNameStatic ());
- }
- [Preserve]
- public Button () : this (Application.CurrentContext)
- {
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern IntPtr Button_Button (IntPtr context);
- [Preserve]
- public Button (Context context) : base (UrhoObjectFlag.Empty)
- {
- Runtime.Validate (typeof(Button));
- handle = Button_Button ((object)context == null ? IntPtr.Zero : context.Handle);
- Runtime.RegisterObject (this);
- OnButtonCreated ();
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_RegisterObject (IntPtr context);
- /// <summary>
- /// Register object factory.
- /// </summary>
- public new static void RegisterObject (Context context)
- {
- Runtime.Validate (typeof(Button));
- Button_RegisterObject ((object)context == null ? IntPtr.Zero : context.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_Update (IntPtr handle, float timeStep);
- /// <summary>
- /// Perform UI element update.
- /// </summary>
- public override void Update (float timeStep)
- {
- Runtime.ValidateRefCounted (this);
- Button_Update (handle, timeStep);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_OnClickBegin (IntPtr handle, ref Urho.IntVector2 position, ref Urho.IntVector2 screenPosition, int button, int buttons, int qualifiers, IntPtr cursor);
- /// <summary>
- /// React to mouse click begin.
- /// </summary>
- public override void OnClickBegin (Urho.IntVector2 position, Urho.IntVector2 screenPosition, int button, int buttons, int qualifiers, Cursor cursor)
- {
- Runtime.ValidateRefCounted (this);
- Button_OnClickBegin (handle, ref position, ref screenPosition, button, buttons, qualifiers, (object)cursor == null ? IntPtr.Zero : cursor.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_OnClickEnd (IntPtr handle, ref Urho.IntVector2 position, ref Urho.IntVector2 screenPosition, int button, int buttons, int qualifiers, IntPtr cursor, IntPtr beginElement);
- /// <summary>
- /// React to mouse click end.
- /// </summary>
- public override void OnClickEnd (Urho.IntVector2 position, Urho.IntVector2 screenPosition, int button, int buttons, int qualifiers, Cursor cursor, UIElement beginElement)
- {
- Runtime.ValidateRefCounted (this);
- Button_OnClickEnd (handle, ref position, ref screenPosition, button, buttons, qualifiers, (object)cursor == null ? IntPtr.Zero : cursor.Handle, (object)beginElement == null ? IntPtr.Zero : beginElement.Handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_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);
- Button_OnKey (handle, key, buttons, qualifiers);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetPressedOffset (IntPtr handle, ref Urho.IntVector2 offset);
- /// <summary>
- /// Set offset to image rectangle used when pressed.
- /// </summary>
- private void SetPressedOffset (Urho.IntVector2 offset)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetPressedOffset (handle, ref offset);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetPressedOffset0 (IntPtr handle, int x, int y);
- /// <summary>
- /// Set offset to image rectangle used when pressed.
- /// </summary>
- public void SetPressedOffset (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetPressedOffset0 (handle, x, y);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetDisabledOffset (IntPtr handle, ref Urho.IntVector2 offset);
- /// <summary>
- /// Set offset to image rectangle used when disabled.
- /// </summary>
- private void SetDisabledOffset (Urho.IntVector2 offset)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetDisabledOffset (handle, ref offset);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetDisabledOffset1 (IntPtr handle, int x, int y);
- /// <summary>
- /// Set offset to image rectangle used when disabled.
- /// </summary>
- public void SetDisabledOffset (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetDisabledOffset1 (handle, x, y);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetPressedChildOffset (IntPtr handle, ref Urho.IntVector2 offset);
- /// <summary>
- /// Set offset of child elements when pressed.
- /// </summary>
- private void SetPressedChildOffset (Urho.IntVector2 offset)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetPressedChildOffset (handle, ref offset);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetPressedChildOffset2 (IntPtr handle, int x, int y);
- /// <summary>
- /// Set offset of child elements when pressed.
- /// </summary>
- public void SetPressedChildOffset (int x, int y)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetPressedChildOffset2 (handle, x, y);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetRepeat (IntPtr handle, float delay, float rate);
- /// <summary>
- /// Set repeat properties. Rate 0 (default) disables repeat.
- /// </summary>
- public void SetRepeat (float delay, float rate)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetRepeat (handle, delay, rate);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetRepeatDelay (IntPtr handle, float delay);
- /// <summary>
- /// Set repeat delay.
- /// </summary>
- private void SetRepeatDelay (float delay)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetRepeatDelay (handle, delay);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern void Button_SetRepeatRate (IntPtr handle, float rate);
- /// <summary>
- /// Set repeat rate.
- /// </summary>
- private void SetRepeatRate (float rate)
- {
- Runtime.ValidateRefCounted (this);
- Button_SetRepeatRate (handle, rate);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 Button_GetPressedOffset (IntPtr handle);
- /// <summary>
- /// Return pressed image offset.
- /// </summary>
- private Urho.IntVector2 GetPressedOffset ()
- {
- Runtime.ValidateRefCounted (this);
- return Button_GetPressedOffset (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 Button_GetDisabledOffset (IntPtr handle);
- /// <summary>
- /// Return disabled image offset.
- /// </summary>
- private Urho.IntVector2 GetDisabledOffset ()
- {
- Runtime.ValidateRefCounted (this);
- return Button_GetDisabledOffset (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern Urho.IntVector2 Button_GetPressedChildOffset (IntPtr handle);
- /// <summary>
- /// Return offset of child elements when pressed.
- /// </summary>
- private Urho.IntVector2 GetPressedChildOffset ()
- {
- Runtime.ValidateRefCounted (this);
- return Button_GetPressedChildOffset (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float Button_GetRepeatDelay (IntPtr handle);
- /// <summary>
- /// Return repeat delay.
- /// </summary>
- private float GetRepeatDelay ()
- {
- Runtime.ValidateRefCounted (this);
- return Button_GetRepeatDelay (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern float Button_GetRepeatRate (IntPtr handle);
- /// <summary>
- /// Return repeat rate.
- /// </summary>
- private float GetRepeatRate ()
- {
- Runtime.ValidateRefCounted (this);
- return Button_GetRepeatRate (handle);
- }
- [DllImport (Consts.NativeImport, CallingConvention = CallingConvention.Cdecl)]
- internal static extern bool Button_IsPressed (IntPtr handle);
- /// <summary>
- /// Return whether is currently pressed.
- /// </summary>
- public bool IsPressed ()
- {
- Runtime.ValidateRefCounted (this);
- return Button_IsPressed (handle);
- }
- 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 pressed image offset.
- /// Or
- /// Set offset to image rectangle used when pressed.
- /// </summary>
- public Urho.IntVector2 PressedOffset {
- get {
- return GetPressedOffset ();
- }
- set {
- SetPressedOffset (value);
- }
- }
- /// <summary>
- /// Return disabled image offset.
- /// Or
- /// Set offset to image rectangle used when disabled.
- /// </summary>
- public Urho.IntVector2 DisabledOffset {
- get {
- return GetDisabledOffset ();
- }
- set {
- SetDisabledOffset (value);
- }
- }
- /// <summary>
- /// Return offset of child elements when pressed.
- /// Or
- /// Set offset of child elements when pressed.
- /// </summary>
- public Urho.IntVector2 PressedChildOffset {
- get {
- return GetPressedChildOffset ();
- }
- set {
- SetPressedChildOffset (value);
- }
- }
- /// <summary>
- /// Return repeat delay.
- /// Or
- /// Set repeat delay.
- /// </summary>
- public float RepeatDelay {
- get {
- return GetRepeatDelay ();
- }
- set {
- SetRepeatDelay (value);
- }
- }
- /// <summary>
- /// Return repeat rate.
- /// Or
- /// Set repeat rate.
- /// </summary>
- public float RepeatRate {
- get {
- return GetRepeatRate ();
- }
- set {
- SetRepeatRate (value);
- }
- }
- }
- }
|